JPH03254573A - Encoding device for color picture - Google Patents

Encoding device for color picture

Info

Publication number
JPH03254573A
JPH03254573A JP2054529A JP5452990A JPH03254573A JP H03254573 A JPH03254573 A JP H03254573A JP 2054529 A JP2054529 A JP 2054529A JP 5452990 A JP5452990 A JP 5452990A JP H03254573 A JPH03254573 A JP H03254573A
Authority
JP
Japan
Prior art keywords
signal
color
area
encoding
memory
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.)
Granted
Application number
JP2054529A
Other languages
Japanese (ja)
Other versions
JP2832059B2 (en
Inventor
Hideshi Osawa
大沢 秀史
Koji Hirabayashi
平林 康二
Tadashi Yoshida
正 吉田
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
Priority to JP2054529A priority Critical patent/JP2832059B2/en
Application filed by Canon Inc filed Critical Canon Inc
Priority to DE69133350T priority patent/DE69133350D1/en
Priority to DE69129950T priority patent/DE69129950T2/en
Priority to EP98200137A priority patent/EP0858210B1/en
Priority to AT98200137T priority patent/ATE256951T1/en
Priority to EP91301822A priority patent/EP0446018B1/en
Priority to AT91301822T priority patent/ATE169790T1/en
Publication of JPH03254573A publication Critical patent/JPH03254573A/en
Priority to US08/285,523 priority patent/US5844718A/en
Priority to US08/908,379 priority patent/US5917956A/en
Application granted granted Critical
Publication of JP2832059B2 publication Critical patent/JP2832059B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Color Image Communication Systems (AREA)

Abstract

PURPOSE:To attain the effective encoding of a color picture by encoding a multilevel color signal within a multivalued color picture area and a binary color signal outside of the multivalued color picture area separately and generating the position of the multivalued color picture area and a signal to indicate size. CONSTITUTION:A mask generator 28 outputs a mask signal 109 to execute the masking of binarizing processing by a binarizing circuit 21 to the area of an area multivalued color picture designated by an area designating signal 108 from an area designating part 19 to designate a multivalued color area at an area designating mode. For the binarizing processing, the second binarizing processing to encode and to transmit a multivalued color signal within the area designated as the multivalued color picture area by the area designating part 108 in the contents of a difference memory 24 with using an encoder B 26 is executed. Then, after that, the first encoding processing to encode and to transmit a binary color signal of the outside of the multivalued color picture area in the contents of a binary memory 22 with using an encoder A 25.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、カラー画像を通信するカラーファクシミリ装
置等におけるカラー画像の符号化装置社関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a color image encoding device for a color facsimile device or the like that communicates color images.

〔従来の技術〕[Conventional technology]

従来からカラー静止画像符号化方式に関して様々な提案
がなされている。また、対象となるカラー静止画像を大
別すると以下の2つになる。
Various proposals have been made regarding color still image encoding systems. Furthermore, the target color still images can be roughly divided into the following two types.

(1)赤、緑、青、シアン、マゼンタ、黄、白、黒の8
色を2値で扱う2値カラー画像 (2)赤、緑、青各を例えば256階調により1670
万色を表示する多値カラー画像2値カラー画像符号化方
式としては、現在ファクシミリ等で用いられている可変
長符号化方式であるモディファイドハフマン方式を各色
ごとに用いる方式が考えられている。またその他の方法
として、周囲画素から符号化画素を予測する予測符号化
方式も提案されている。これらの方法は、可逆符号化の
分類に入り、符号化・復号化におけるデータ保存がなさ
れている。
(1) Red, green, blue, cyan, magenta, yellow, white, black 8
Binary color image (2) where colors are treated as binary values (2) Red, green, and blue each have 1670 gradations with 256 gradations, for example.
As a multi-valued color image binary color image encoding method for displaying a million colors, a method using a modified Huffman method, which is a variable length encoding method currently used in facsimiles and the like, for each color has been considered. As another method, a predictive encoding method has been proposed in which a coded pixel is predicted from surrounding pixels. These methods fall under the category of lossless encoding, and data is preserved during encoding and decoding.

一方、多値カラー画像符号化方式としては、RGB各8
bit信号を輝度・色差信号に変換した後に、直交変換
(ll!散コサイン変換)を行った係数値を線形量子化
し、この量子化値を可変長符号化する方式が提案されて
いる。この方式は基本的には画像の空間周波数の低周波
側を残し、高周波側をカットして、画像データを削減す
る方式である。この方法は、非可逆符号化方式になり、
圧縮率と画質劣化がトレード・オフの関係にある。
On the other hand, as a multi-value color image encoding method, 8 each of RGB
A method has been proposed in which after converting a bit signal into a luminance/chrominance signal, linear quantization is performed on coefficient values subjected to orthogonal transformation (ll! dispersion cosine transformation), and variable length encoding is performed on the quantized values. This method basically reduces image data by leaving the low frequency side of the spatial frequency of the image and cutting the high frequency side. This method is a lossy encoding method,
There is a trade-off between compression rate and image quality deterioration.

〔発明(考案)が解決しようとしている課題)しかし、
上記従来例によって、カラー文章中にカラー写真がはめ
込まれているようなカラー文書画像を符号化する場合。
[Problem that the invention (device) is trying to solve] However,
A case where a color document image in which a color photograph is embedded in a color text is encoded using the above conventional example.

(1)2値力ラ一方式では、カラー文章画像部は圧縮率
を上げて符号化できても、カラー写真部の階調性ある画
像を効率よく符号化できない。
(1) In the binary power system, even if a color text image part can be encoded with a high compression rate, it is not possible to efficiently encode an image with gradation in a color photograph part.

(2)多値カラ一方式では、圧縮率を上げていくと、画
像の高周波成分が大きくカットされ文字等のエツジ部の
画質劣化が目立ってくるので、文意画像に対しては、写
真画像はどの高圧縮率は期待できない。
(2) In the multilevel color one-sided method, as the compression rate is increased, the high frequency components of the image are largely cut off, and the deterioration of the image quality at the edges of characters etc. becomes noticeable. You cannot expect a high compression ratio.

などの問題点がある。There are problems such as:

そこでカラー静止画像伝送装置において、高圧N率であ
り、かつ劣化の少ない画像を符号化するためには、2種
類の符号器を用意する必要がある。
Therefore, in a color still image transmission apparatus, in order to encode an image with a high voltage N rate and with little deterioration, it is necessary to prepare two types of encoders.

しかしながら、このような2種類の符号化を行う場合、
符号化対象領域が重なってしまう場合がある。
However, when performing these two types of encoding,
Encoding target regions may overlap.

例えば、第18図に示したようにカラー文書画像にカラ
ー写真画像(多値カラー画像)がある場合、2値カラー
画像符号器で全体を符号化した後多値カラー画像領域を
符号化する方法をとると、多値領域に対する2値符号語
が冗長した符号になってしまうという問題がある。
For example, as shown in FIG. 18, when a color document image includes a color photographic image (multi-valued color image), a method is to encode the entire image using a binary color image encoder and then encode the multi-valued color image area. If this is done, there is a problem that the binary code word for the multi-level region becomes a redundant code.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は以上の点に鑑みてなされたもので、2値カラー
画像と多値カラー画像の混在したカラー画像をも効率良
く符号化可能とすることを目的とし、カラー画像中の多
値カラー画像領域内の多値カラー信号を符号化する第1
符号化手段と、前記カラー画像中の多値カラー画像領域
外の2値カラー信号を符号化する′s2符号化手段と、
前記カラー画像中の多値カラー画像領域の位置、サイズ
を示す領域信号を発生する発生手段とを有するカラー画
像の符号化を提供するものである。
The present invention has been made in view of the above points, and an object of the present invention is to make it possible to efficiently encode a color image in which a binary color image and a multivalued color image are mixed. The first step is to encode a multivalued color signal within the region.
encoding means; 's2 encoding means for encoding a binary color signal outside the multivalued color image area in the color image;
and generating means for generating an area signal indicating the position and size of a multivalued color image area in the color image.

〔実施例〕〔Example〕

以下、本発明を好ましい実施例を用いて説明する。 The present invention will be explained below using preferred embodiments.

〔実施例〕〔Example〕

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

画像メモリ20には、図示しない例えばカラースキャナ
等のカラー静止画像入力手段から人力されたフルカラー
画像を表わす赤(R)、緑(G)。
In the image memory 20, red (R) and green (G) representing a full-color image manually input from a color still image input means such as a color scanner (not shown) are stored.

青(B)各8bitのカラー画像信号が記憶されている
Blue (B) color image signals of 8 bits each are stored.

画像メモリ20から読出された各色の画像信号100は
、2値化回路21で各色毎に2値化処理を施されてR,
G、B各1bitの2(1カラー信号に変換された後、
2値メモリ22に各色別に記憶される。2値メモリ22
から読出された2値カラー信号103は、2値カラー信
号符号化用の符号器Aで符号化処理され、符号語105
を出力する。この符号器Aによる符号化処理が第1の符
号化処理である。
The image signal 100 of each color read out from the image memory 20 is subjected to binarization processing for each color in a binarization circuit 21, and is converted into R,
2 of 1 bit each for G and B (after being converted to 1 color signal,
Each color is stored in the binary memory 22. Binary memory 22
The binary color signal 103 read out is encoded by the encoder A for binary color signal encoding, and the code word 105 is
Output. This encoding process by encoder A is the first encoding process.

画像メモリ20から、前述の第1の符号化処理がなされ
たと同じカラー画像信号を読出す。減算器23に、画像
メモリ20からのR,G、B8bit信号100及び2
値メモリ22からの出力を8ビツトの信号にレベル変換
した信号(0−0,1→255)102を人力し、信号
102から信号100を各色毎に減算処理する。この差
分信号104を各色別に差分メモリ24に記憶する。、
差分メモリ24の多値カラー信号110は多値カラー信
号符号化用の符号器Bで符号化処理され、符号語106
を出力する。以上の符号器Bによる符号化処理が′s2
の符号化処理である。
The same color image signal that has been subjected to the first encoding process described above is read out from the image memory 20. The subtracter 23 receives R, G, and B 8-bit signals 100 and 2 from the image memory 20.
A signal (0-0, 1→255) 102 obtained by level-converting the output from the value memory 22 into an 8-bit signal is manually input, and a signal 100 is subtracted from the signal 102 for each color. This difference signal 104 is stored in the difference memory 24 for each color. ,
The multi-value color signal 110 in the difference memory 24 is encoded by an encoder B for multi-value color signal encoding, and the code word 106 is
Output. The above encoding process by encoder B is 's2
This is the encoding process.

モード設定部29は第5表に示した様に、符号化モード
に応じたコントロール信号107をマスク信号発生器2
8と符号器27に出力し、それらを下記の如く制御する
As shown in Table 5, the mode setting section 29 sends the control signal 107 according to the encoding mode to the mask signal generator 2.
8 and the encoder 27, and control them as follows.

(1)2値モードの時は、2値化回路21にょる2値化
処理の対象を全領域にし、符号化処理は符号器A25に
よる第1の符号化処理のみを実行する。
(1) In the binary mode, the entire region is subjected to the binarization process by the binarization circuit 21, and only the first encoding process by the encoder A25 is executed.

(2)多値モードの時は、2値化回路21による2値化
処理を行わないようにマスク発生器28はマスク信号を
全領域に対して発生し、2値メモリ22の内容が全て零
になるようにする。また、符号化処理は符号器Bによる
第2符号化処理のみを実行する。
(2) In the multilevel mode, the mask generator 28 generates a mask signal for the entire area so that the binarization circuit 21 does not perform the binarization process, and the contents of the binary memory 22 are all zero. Make it so. Further, as for the encoding process, only the second encoding process by the encoder B is executed.

(3)領域指定モードの時は、多値カラー領域を指定す
る領域指定部19からの領域指定信号108により指定
された領域多値カラー画像の領域に対し、2値化回路2
1による2値化処理のマスクを行うように、マスク発生
器28はマスク信号109を出力する。’Jgl 5図
は、領域指定モードにおけるマスク領域を示す図で、画
像全領域2000のうち領域A2001と領域B200
2に対し、2値化処理のマスクを行っていることを示し
ている。
(3) In the area specification mode, the binarization circuit 2
The mask generator 28 outputs a mask signal 109 so as to mask the binarization process by 1. 'Jgl Figure 5 is a diagram showing mask areas in the area specification mode, where area A2001 and area B200 out of the entire image area 2000 are
2, it is shown that masking of the binarization process is performed.

領域指定部19は、多値カラー画像領域をカラー画像の
モニタにより自動的に判断して領域指定信号108を出
力しても良いし、また、キーボード、デジタイザ等で手
動による領域指定に従って信号108を出力してもよい
The area specifying unit 19 may automatically determine the multilevel color image area by monitoring the color image and output the area specifying signal 108, or may output the signal 108 according to manual area specification using a keyboard, digitizer, etc. You can also output it.

また、領域指定モードにおける符号化処理は、第1段階
として、符号器B26を使い、養分メモリ24の内容の
うち領域指定部108により多値カラー画像領域として
指定された領域内の多値カラー信号を符号化伝送する第
2の符号化処理を行なう、そして、その後、第2段階と
して符号器A25を使い、2値メモリ22の内容のうち
、多値カラー画像領域外の2値カラー信号を符号化伝送
する第1の符号化処理を行なう。
In addition, in the first step, the encoding process in the area specification mode uses the encoder B 26 to generate a multi-value color signal within the area specified as a multi-value color image area by the area specification unit 108 among the contents of the nutrient memory 24. Then, in the second stage, the encoder A25 is used to encode the binary color signal outside the multilevel color image area among the contents of the binary memory 22. A first encoding process is carried out for digitized transmission.

即ち、第17図に示す如く、第1段階における第2の符
号化処理の実行に際しては、マスク発生器28からのマ
スク信号190に従って、第17図(a)の一画面OG
中の多値カラー画像領域CA内の多値カラー信号(第1
7図(b))を差分メモリ24から読出して符号化する
。また、第2段階における第1の符号化処理の実行に際
しては、マスク信号190に従って多値カラー画像9r
i域CA外の2値カラー信号(第17図(C))を2値
メモリ22から読出して符号化する。
That is, as shown in FIG. 17, when executing the second encoding process in the first stage, one screen OG of FIG.
The multi-value color signal in the middle multi-value color image area CA (first
7(b)) is read out from the differential memory 24 and encoded. Furthermore, when executing the first encoding process in the second stage, the multi-valued color image 9r is
The binary color signal outside the i-area CA (FIG. 17(C)) is read out from the binary memory 22 and encoded.

また、3417図(b)に示す如く、多値カラー画像領
域CAの位置及びサイズを示す信号である領域指定信号
191を第1段階の符号化データの伝送前に受信側に伝
送しておく。復号に際しては、この領域指定信号191
に基づいて、復号した多値カラー画像及び2値カラー画
像の合成を行なう。
Further, as shown in FIG. 3417(b), an area designation signal 191, which is a signal indicating the position and size of the multivalued color image area CA, is transmitted to the receiving side before the first stage encoded data is transmitted. During decoding, this area designation signal 191
The decoded multi-valued color image and binary color image are combined based on the above.

(4)自動モードの時は、2値化回路21により全領域
を2値化し、2値メモリ22に2値化結果を記憶させ、
符号器A25による第1の符号化処理を行ない、2値カ
ラー静止画像の符号化・伝送を行う。次に、減算器23
により得られる2値画像をレベル変換した画像から原画
像を減算した差分画像110に対して、符号器B26を
用いて′s2の符号化処理を行ない、符号化・伝送する
(4) When in automatic mode, the entire area is binarized by the binarization circuit 21, the binarization result is stored in the binary memory 22,
A first encoding process is performed by the encoder A25, and a binary color still image is encoded and transmitted. Next, the subtractor 23
The difference image 110 obtained by subtracting the original image from the level-converted binary image obtained by the above is subjected to the encoding process 's2 using the encoder B26, and is encoded and transmitted.

第16図は、画像メモリ20から読出された線データ2
03を、2値化回路21において閾値Th206で2値
化し、更に、レベル変換した信号204.および、信号
204から信号203を減算した差分信号205を示し
ている。この様にして、減算器23により、多値カラー
画像中の線信号(またはエツジ信号)が除かれることに
なる。
FIG. 16 shows line data 2 read out from the image memory 20.
03 is binarized by a threshold Th206 in the binarization circuit 21, and the level-converted signal 204. A difference signal 205 obtained by subtracting the signal 203 from the signal 204 is also shown. In this way, the subtracter 23 removes line signals (or edge signals) from the multivalued color image.

第2図は2値化回路21のブロック図である。FIG. 2 is a block diagram of the binarization circuit 21.

比較器40ではしきい値Th206と原画像信号D10
0が比較され、D≧Thならば信号113を1に、それ
以外なら信号113を0にする。また、ゲート回路41
によりマスク信号が真の時に、信号101を強制的にO
にし、その他の場合は入力信号113を通す。
The comparator 40 uses the threshold value Th206 and the original image signal D10.
0 is compared, and if D≧Th, the signal 113 is set to 1; otherwise, the signal 113 is set to 0. In addition, the gate circuit 41
forces signal 101 to turn O when the mask signal is true.
otherwise, the input signal 113 is passed.

本実施例においては、単純に2値化を比較量で行ったが
、2値化処理はこれに限られるものではない。
In this embodiment, binarization was simply performed using comparative amounts, but the binarization process is not limited to this.

第3図は本発明を通用した復号部の実施例構成である。FIG. 3 shows the configuration of an embodiment of a decoding section that is compatible with the present invention.

多値カラー画像の符号語106は復号器B31で各色毎
に多値画像データに復元され、差分メモリ34に記憶さ
れる。この差分メモリ34の記憶データは第1図示の差
分メモリ24に格納された多値カラー画像領域内の差分
信号に対応する。また、記憶領域は、領域指定信号19
1に基づいて合成指示信号発生器37からの領域信号3
8により決定される。
The code word 106 of the multi-value color image is restored to multi-value image data for each color by the decoder B31 and stored in the difference memory 34. The data stored in the difference memory 34 corresponds to the difference signal in the multivalued color image area stored in the difference memory 24 shown in the first diagram. Furthermore, the storage area is specified by an area designation signal 19.
1 based on the area signal 3 from the composite instruction signal generator 37.
8.

また、2値カラー画像の符号語105は復号器A30で
各色毎にドツトイメージに復元され2値メモリ33に記
憶される。この記憶領域も領域信号38により決定され
るこのドツトイメージは第1図示の2値メモリ22に格
納された多値カラー画像領域外の2値信号に対応する。
Further, the code word 105 of the binary color image is restored to a dot image for each color by the decoder A30 and stored in the binary memory 33. This dot image, which is also determined by the area signal 38, corresponds to a binary signal outside the multilevel color image area stored in the binary memory 22 shown in the first figure.

合成器35では、領域信号38に従って、2値メモリ3
3からのRGB各1bit信号113をレベル変換した
画像と差分メモリ34からの差分信号114を合成し、
信号115を得て画像メモリD36に記憶する。
In the synthesizer 35, according to the area signal 38, the binary memory 3
The level-converted image of the 1-bit RGB signals 113 from 3 and the difference signal 114 from the difference memory 34 are combined,
A signal 115 is obtained and stored in the image memory D36.

合成器35における画像合或は、第1図示の減算器23
の逆の処理即ち、′!J16図の信号204から信号2
05を減算して元の信号203を得るような方法となる
Image combination in synthesizer 35 or subtracter 23 shown in the first diagram
In other words, ′! Signal 204 to signal 2 in diagram J16
05 to obtain the original signal 203.

尚、本実施例では、多値カラー画像の符号化伝送を、2
値カラー画像の符号化伝送に先だって実行したが、この
順に限るものではなく、2値カラー画像の符号化伝送後
に、多値カラー画像の伝送を行なってもよい。
Note that in this embodiment, the encoding and transmission of a multivalued color image is performed in two ways.
Although the process is performed prior to encoding and transmitting a value color image, the order is not limited to this, and the multivalue color image may be transmitted after encoding and transmitting a binary color image.

第4図は第1図示の符号器27のブロック図である。FIG. 4 is a block diagram of the encoder 27 shown in FIG.

2値カラー符号器A25は、予測状態回路A50と遅延
回路A51および動的符号器53から構成されており、
コントロール信号107によって動作するセレクタ52
.54により人出力が切り換えられる。また、多値カラ
ー符号器B26は、色変換回路55、直交変換回路56
、線形量子化器57および第1〜第64のページメモリ
58−1〜58−64、セレクタ59、予測状態決定回
路B60、遅延回路B61および動的符号器53から構
成されており、符号器A25と同様にコントロール信号
107によって動作するセレクタ52.54により入出
力が切り換えられる。
The binary color encoder A25 is composed of a prediction state circuit A50, a delay circuit A51, and a dynamic encoder 53.
Selector 52 operated by control signal 107
.. 54 switches the human output. Further, the multi-value color encoder B26 includes a color conversion circuit 55, an orthogonal conversion circuit 56,
, a linear quantizer 57, first to sixty-fourth page memories 58-1 to 58-64, a selector 59, a predicted state determination circuit B60, a delay circuit B61, and a dynamic encoder 53, and an encoder A25. Similarly, the input and output are switched by selectors 52 and 54 operated by the control signal 107.

ここで、符号器27の中心部になる動的符号器53を符
号器AおよびBで共通化する構成になっており、ハード
構成がこの部分において簡略化できる。以下符号器A、
符号器Bの処理を順を追って説明する。
Here, the dynamic encoder 53, which is the central part of the encoder 27, is shared by encoders A and B, and the hardware configuration can be simplified in this part. Below encoder A,
The processing of encoder B will be explained step by step.

まず、符号器Aについて説明する。First, encoder A will be explained.

2値メモリ22からの出力103は予測状態回路A50
に入る。予測状態回路A50は注目画素に関して、その
周囲符号化済画素から構成される予測状態信号S、11
4を出力する。また、遅延回路A51では予測状態信号
S、と同期した1bitの画素信号X、115を出力し
、両信号S、114、X、115はセレクタ52に人力
する。
The output 103 from the binary memory 22 is the predicted state circuit A50.
to go into. Regarding the pixel of interest, the prediction state circuit A50 generates a prediction state signal S, 11 composed of the surrounding coded pixels.
Outputs 4. Further, the delay circuit A51 outputs a 1-bit pixel signal X, 115 synchronized with the predicted state signal S, and both signals S, 114, X, 115 are input to the selector 52 manually.

第5図は予測状態決定回路A50のブロック図であり、
第6図は状態予測のために参照される各色別の画素位置
を示す。
FIG. 5 is a block diagram of the predicted state determination circuit A50,
FIG. 6 shows pixel positions for each color that are referred to for state prediction.

即ち、第6図(a)は符号化′fjS1色目(本実施例
ではR)の参照画素を示しており、*で示した符号化画
素の周囲の符号化済の7画素を参照することを表わして
いる。
That is, FIG. 6(a) shows the reference pixel of the first color of encoding 'fjS (R in this example), and it is possible to refer to the seven encoded pixels around the encoded pixel indicated by *. It represents.

また、第6図(b)は符号化第2色目(本実施例ではG
)の参照画素を示しており、(a)と同様の7画素およ
び第1色の同位置の画素のあわせて8画素を参照するこ
とを表わしている。
In addition, FIG. 6(b) shows the encoded second color (G in this example).
), which indicates that a total of eight pixels are referred to, including the same seven pixels as in (a) and the same position pixel of the first color.

また、第6図(C)は第3色(本実施例ではB)の参照
画素を示しており、(a)と同様の7画素および第1色
および′i42色の同位置の各画素のあわせて9画素を
参照することを表わしている。
In addition, FIG. 6(C) shows reference pixels of the third color (B in this example), including the same seven pixels as in FIG. 6(a) and each pixel at the same position of the first color and the This indicates that a total of nine pixels are referred to.

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

R,G、B各1bitからなる3bit信号である信号
103は、RGBデータ200〜202として、ラッチ
群67〜69に入力されるとともに、ラインメモリ61
.62.63にも入力され、ラインメモリ61〜63に
より1ライン遅延したRGBデータが保持される。また
ラッチ67a〜67h、ラッチ68 a 〜68 h及
びラッチ69a〜69hには、1画素クロック毎に遅延
されたデータが保持される。
The signal 103, which is a 3-bit signal consisting of 1 bit each for 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 memory 61.
.. 62 and 63, and RGB data delayed by one line is held by line memories 61 to 63. Furthermore, data delayed for each pixel clock is held in the latches 67a to 67h, latches 68a to 68h, and latches 69a to 69h.

ラッチ群67においてラインメモリ61の出力が入力さ
れるラッチ67 a、  67 b、 67 c。
In the latch group 67, the output of the line memory 61 is input to latches 67a, 67b, and 67c.

67dおよびラインメモリ61の出力により符号化ライ
ンの前ライン上の5画素のデータが参照できることにな
る。また、ラッチ67g、67hの出力により、符号化
ライン上の符号化済2画素が参照できることになる。こ
れら7画素のデータを合わせて符号化第1色であるRの
状態決定用の参照画素位置210とする。また、ラッチ
67fからは符号化画素のRのデータ211が他色G、
 Bの状態決定用に出力される。
67d and the output of the line memory 61, data of five pixels on the previous line of the encoding line can be referenced. Furthermore, the two encoded pixels on the encoding line can be referenced by the outputs of the latches 67g and 67h. The data of these seven pixels are combined and used as a reference pixel position 210 for determining the state of R, which is the first color to be encoded. Further, from the latch 67f, the R data 211 of the encoded pixel is transmitted to other colors G,
It is output for determining the state of B.

このラッチ群67と同じ構成のラッチ群68゜69がデ
ータG201及びB2O2に対して設けられており、こ
れらラッチ群68.69からは夫々、ラッチ群67と同
様の7画素のデータが参照画素信号212,214とし
て出力される。
Latch groups 68 and 69 having the same configuration as this latch group 67 are provided for data G201 and B2O2, and from these latch groups 68 and 69, seven pixel data similar to that of the latch group 67 are provided as reference pixel signals. 212 and 214.

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

セレクタ64においてはRGBの各色データの出力に対
応した色を示す2ビツトのカラー指示信号219に応じ
て参照画素信号を切り換える。即ち、カラー指示信号2
19がRの時は、参照画素信号210と零信号2bit
を選択する。また、Gの時は参照画素信号212および
R信号212と零信号1bitが選択される。また、B
の時は参照画素信号214およびR信号211、G信号
213が選択される。この9bitの選択信号215と
2bitのカラー指示信号219はバッキング回路65
により、1lbitの信号にまとめられて状態信号S+
 206になる。従って、状態信号S1は符号化すべき
画素の色と周囲の状態を示し、R,R,B各色に対して
27.2829個の状態を示す。
The selector 64 switches the reference pixel signal in response to a 2-bit color instruction signal 219 indicating the color corresponding to the output of each RGB color data. That is, color instruction signal 2
When 19 is R, reference pixel signal 210 and zero signal 2 bits
Select. Further, in the case of G, the reference pixel signal 212, the R signal 212, and 1 bit of the zero signal are selected. Also, B
At this time, the reference pixel signal 214, R signal 211, and G signal 213 are selected. The 9-bit selection signal 215 and the 2-bit color instruction signal 219 are sent to the backing circuit 65.
As a result, the state signal S+ is summarized into a 1-bit signal.
It becomes 206. Therefore, the state signal S1 indicates the color of the pixel to be encoded and the surrounding state, and indicates 27.2829 states for each of R, R, and B colors.

次に第4図示の符号器Bについて説明する。Next, the encoder B shown in FIG. 4 will be explained.

341図示の養分メモリ24から読出された画像信号1
10は色変換I!55において、RGB信号から輝度・
色差信号400に変換される。この変換には一般的に以
下の式が用いられている。
341 Image signal 1 read out from the nutrient memory 24 shown in FIG.
10 is color conversion I! 55, brightness and
The signal is converted into a color difference signal 400. The following formula is generally used for this conversion.

Yみ0.299R十0.587G 十 〇 、  114 B Cr=0.713 (R−Y) Cb=0.564 (B−Y) ただし、ここで示したR、G、B、Y、Cr。Y: 0.299R: 0.587G 100, 114 B Cr=0.713 (RY) Cb=0.564 (B-Y) However, R, G, B, Y, and Cr shown here.

cbは規格化した値である。cb is a standardized value.

次に直交変換回路56では離散コサイン変換により8×
8画素ブロック毎の画像を周波数ごとの変換係数(強度
)に変換する。$13図に示した変換係数は、やはり8
×8のブロックになっており、変換値に1から64の番
号をつける。500で示す係数番号1が直流成分を示し
ている。また、501.502で示す係数番号2.3・
・・は交流成分を示しており、番号が大きくなるに従っ
て低周波から高周波への交流成分を示すことになる。
Next, the orthogonal transform circuit 56 performs a discrete cosine transform to obtain 8×
The image of each 8-pixel block is converted into a conversion coefficient (intensity) for each frequency. The conversion coefficient shown in the $13 diagram is still 8
It is made up of ×8 blocks, and the converted values are numbered from 1 to 64. Coefficient number 1 indicated by 500 indicates the DC component. In addition, the coefficient number 2.3 indicated by 501.502
... indicates an alternating current component, and as the number increases, it indicates an alternating current component from low frequency to high frequency.

変換係数信号401は線形量子化器57で例えば、8ビ
ツトに量子化される。この線形量子化器57は、直流お
よび低周波の量子化ステップは細かく、高周波の量子化
ステップは粗くとるように量子化ステップが決められて
いる。前述の8×8のブロックを構成する64個の量子
化後の値は64枚の第1〜第64ページメモリ58−1
〜58−64に夫々記憶させる。即ち、第1ページメモ
リ58−1には8×8のブロックの係数番号1に対応す
る直流成分の量子化値が記憶され、第64ページメモリ
58−64には、8×8のブロックの係数番号64に対
応する最大高周波の交流成分の量子化値が記憶される。
The transform coefficient signal 401 is quantized to, for example, 8 bits by a linear quantizer 57. In this linear quantizer 57, the quantization steps are determined so that the quantization steps for direct current and low frequencies are fine, and the quantization steps for high frequencies are coarse. The 64 quantized values constituting the 8×8 block described above are stored in 64 first to 64th page memories 58-1.
~58-64, respectively. That is, the first page memory 58-1 stores the quantized value of the DC component corresponding to coefficient number 1 of the 8×8 block, and the 64th page memory 58-64 stores the coefficient of the 8×8 block. The quantized value of the maximum high frequency AC component corresponding to number 64 is stored.

従って、各ベージメモリ58−1〜58−64には、1
ページの画面を構成する複数の8×8ブロツクの同一位
置の量子化値が記憶される。
Therefore, each page memory 58-1 to 58-64 has 1
Quantized values at the same position of a plurality of 8×8 blocks constituting the screen of the page are stored.

第1〜第64ページメモリ58−1〜58−64のデー
タは、セレクタ59を通り予測状態決定回路B60と遅
延回路B81に入力される。このデータの送出方法は、
第1ページメモリ58−1の内容を全て送出した後、第
2ページメモリ58−2のデータを送出する如く、ペー
ジメモリ毎に行われ、これを順番に行い、最後に第64
ベージメモリ58−64の内容を送出する。これを図示
しない中央コントローラから出力される切り換え信号4
06によりセレクタ59を切り換え制御することにより
行う。
The data of the first to 64th page memories 58-1 to 58-64 are inputted to the predicted state determining circuit B60 and the delay circuit B81 through the selector 59. The method of sending this data is
After sending out all the contents of the first page memory 58-1, the data of the second page memory 58-2 is sent out, and this is done for each page memory in order.
The contents of the page memory 58-64 are sent out. This is a switching signal 4 output from a central controller (not shown).
This is done by switching and controlling the selector 59 using 06.

!13図は、予測状態決定回路Booのブロック図を示
している。基本的には第5図に示した参照方式と同様な
方式となる。符号化は最上位bitのブレーンからはじ
め、第n b i tのブレーンはすでに符号化済の第
1〜第n  1bitブレーンの画素参照する。また第
nbitブレーンは、既に符号化済の周囲7bitを参
照する。
! FIG. 13 shows a block diagram of the predicted state determination circuit Boo. Basically, the method is similar to the reference method shown in FIG. Encoding starts from the most significant bit brane, and the nbit-th brane refers to the pixels of the first to n1-th bit branes that have already been encoded. Further, the n-th bit brain refers to the surrounding 7 bits that have already been encoded.

第14図は状態予測のために参照される各ビット別の画
素位置を示す。
FIG. 14 shows pixel positions for each bit referenced for state prediction.

即ち、第14図(a)は符号化第1ビツト目D+(MS
B)の参照画素を示しており、*で示した符号化画素の
周囲の符号化済の7画素を参照することを表わしている
That is, FIG. 14(a) shows the encoded first bit D+(MS
The reference pixel in B) is shown, and indicates that seven encoded pixels around the encoded pixel indicated by * are referred to.

また、第14図(b)は符号化第2ビツト目D2の参照
画素を示しており、(a)と同様の7画素および1ビツ
トの同位置の画素のあわせて8画素を参照することを表
わしている。
In addition, FIG. 14(b) shows reference pixels for the second encoded bit D2, and a total of 8 pixels are referred to, including the same 7 pixels as in FIG. 14(a) and the pixel at the same position of 1 bit. It represents.

また、第14図(C)は第3ビツト目り、の参照画素を
示しており、(a)と同様の7画素および第1ビツトお
よび第2ビツトの同位置の各画素のあわせて9画素を参
照することを表わしている。
In addition, FIG. 14(C) shows the reference pixels for the third bit, including the same seven pixels as in FIG. It means to refer to.

また、第14図(d)は第8ヒ゛・ソト目り。Also, Figure 14(d) shows the 8th row.

(LSB)の参照画素を示しており、(a)と同様の7
画素および第1〜第7ビツトの同位置の各画素のあわせ
て14画素を参照することを表わしている。
(LSB) reference pixels are shown, and the same 7 as in (a) is shown.
This indicates that a total of 14 pixels are referred to, including the pixel and each pixel at the same position of the first to seventh bits.

第13図示の構成では、第14図(a)〜(d)に示す
各ビット毎の参照画素位置の複数画素を参照することに
より、各ビットブレーン毎の状態を決定する。以下、第
13図の動作を説明する。尚、第13図では、図面の煩
雑化を防ぐために、第4ビツト〜第6ビツトに関する回
路を省略しである。
In the configuration shown in FIG. 13, the state of each bit brain is determined by referring to a plurality of pixels at reference pixel positions for each bit shown in FIGS. 14(a) to 14(d). The operation shown in FIG. 13 will be explained below. Note that in FIG. 13, circuits related to the fourth to sixth bits are omitted to avoid complicating the drawing.

8ビット信号である信号110は各ビットブレーンデー
タ501〜508として、ラッチ群521〜528に人
力されるとともに、ラインメモリ511〜518にも入
力され、ラインメモリ511〜518により1ライン遅
延した各ビットブレーンのデータが保持される。またラ
ッチ群521〜528Cは、第5図示のラッチ群67〜
69と同様に1画素クロック毎に遅延されたデータが保
持される。
The signal 110, which is an 8-bit signal, is input to the latch groups 521-528 as each bit brain data 501-508, and is also input to the line memories 511-518, and each bit is delayed by one line by the line memories 511-518. Brain data is retained. Furthermore, the latch groups 521 to 528C are the latch groups 67 to 67 shown in FIG.
Similarly to 69, data delayed for each pixel clock is held.

ラッチ群52においてラインメモリ511の出力が人力
される4個のラッチおよびラインメモリ511の出力に
より符号化ラインの前ライン上の5画素のデータが参照
できることになる。また、データ501が直接人力され
る4個のラッチのうちの後段の2個のラッチの出力によ
り、符号化ライン上の符号化済2画素が参照できること
になる。これら7画素のデータを合わせて符号化第1ビ
ツト目であるデータD1の状態決定用の参照画素信号5
51とする。また、ラッチ群521からは符号化画素の
り、のデータ561が他ビットブレーンの状態決定用に
出力される。
In the latch group 52, the output of the line memory 511 is manually input to four latches, and the output of the line memory 511 makes it possible to refer to the data of five pixels on the previous line of the encoding line. Furthermore, the outputs of the latter two latches of the four latches into which the data 501 is directly input allow reference to the two encoded pixels on the encoding line. The data of these seven pixels are combined to form a reference pixel signal 5 for determining the state of data D1, which is the first encoded bit.
51. Furthermore, the latch group 521 outputs data 561 of encoded pixels for determining the state of other bit brains.

このラッチ群521と同し構成のラッチ群522.52
3〜527.528がデータD2゜D、〜D、及びD8
に対して設けられており、これらラッチ群522〜52
8からは夫々、ラッチ群521と同様の7画素のデータ
が参照画素信号561.562,563〜557.55
8として出力される。
A latch group 522.52 having the same configuration as this latch group 521
3 to 527.528 are data D2゜D, ~D, and D8
These latch groups 522 to 52
From 8 onwards, data of 7 pixels similar to the latch group 521 are reference pixel signals 561.562, 563 to 557.55, respectively.
Output as 8.

また、ラッチ群522から符号化画素のD2のデータ5
62が3ビツト目〜8ビツト目の各ヒ゛ットプレーンの
状態決定用に出力される。
Furthermore, the data 5 of encoded pixel D2 is received from the latch group 522.
62 is output for determining the state of each of the 3rd bit to 8th bit plane.

セレクタ530においては各ビットプレーン毎のデータ
の出力に対応したビットを示す3ビツトのビット指示信
号570に応じて参照画素信号を切り換える。即ち、ビ
ット指示信号570が第1ビットD、の時は、参照画素
信号551と零信号7bi tを選択する。*た、第2
ビットD、の時は参照画素信号552およびDI信号5
61と零信号6bitが選択される。また、第8ビット
D、の時は参照画素信号558およびり、信号561、
D2信号562、D3信号563〜D。
In the selector 530, the reference pixel signal is switched in accordance with a 3-bit bit instruction signal 570 indicating a bit corresponding to the output of data for each bit plane. That is, when the bit instruction signal 570 is the first bit D, the reference pixel signal 551 and the zero signal 7 bits are selected. *Ta, second
When bit D, reference pixel signal 552 and DI signal 5
61 and zero signal 6 bits are selected. Further, when the eighth bit is D, the reference pixel signal 558 and the signal 561,
D2 signal 562, D3 signal 563~D.

信号567が選択される。この14bitの選択信号2
15と3bitのカラー指示信号219はバッキング回
路540により、17bitの信号にまとめられて状態
信号52404になる。従って、状態信号S2は符号化
すべき画素のビットプレーンと周囲の状態を示す。
Signal 567 is selected. This 14-bit selection signal 2
The 15 and 3-bit color instruction signal 219 are combined into a 17-bit signal by a backing circuit 540 to become a status signal 52404. Therefore, the state signal S2 indicates the bit plane and surrounding state of the pixel to be coded.

この出力信号52404はYS4図示のセレクタ52に
入力される。また遅延回路B61は出力信号X2405
を参照信号S2と同期合わせなするものである。
This output signal 52404 is input to the selector 52 shown in YS4. Furthermore, the delay circuit B61 outputs the output signal X2405.
is synchronized with the reference signal S2.

以上の信号St、X+およびS2.X2を図示しない中
央コントローラから出力されるコントロール信号107
4:従って動作するセレクタ52により信号5116、
x117として選択する。
The above signals St, X+ and S2. Control signal 107 outputted from a central controller (not shown)
4: Accordingly, the operating selector 52 causes the signal 5116,
Select as x117.

また、この信号は動的符号器53で符合化し、信号11
8はコントロール信号107に従って動作するセレクタ
54で切り換えられて符号語106として出力される。
Further, this signal is encoded by a dynamic encoder 53, and the signal 11 is encoded by a dynamic encoder 53.
8 is switched by a selector 54 operating in accordance with a control signal 107 and output as a code word 106.

′i47図は′!J4図示の動的符号953のブロック
図である。
'i47 diagram is'! FIG. 9 is a block diagram of a dynamic code 953 illustrated in J4.

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

従来から知られている様に、算術符号は、入力信号列を
小数2進数で表わされる符号になるように算術演算によ
り符号形成がなされる方法である。この方法はLang
donおよびR15sanenらによる文献”Comp
ressionof  Black/White  I
magesWith  Arithmetic  Co
 d i ng  、IEEE  Tran  Com
、COM −29,6,(1981,6)等に発表され
ている。この文献によるとすでに符号化した人力信号列
をS、劣勢シンボル(LPS)の出る確率をq、演算レ
ジスタAugenaをA(S)、符号レジスタをC(S
)とした時に、入力信号ごとに以下の算術演算を行う。
As is conventionally known, arithmetic coding is a method in which a code is formed by arithmetic operations so that an input signal string becomes a code expressed in binary decimal numbers. This method uses Lang
The document by Don and R15sanen et al.
color of Black/White I
magesWith Arithmetic Co
d i ng , IEEE Tran Com
, COM-29, 6, (1981, 6), etc. According to this document, S is the manually encoded signal sequence, q is the probability of a less-common symbol (LPS), A(S) is the arithmetic register Augena, and C(S) is the code register.
), perform the following arithmetic operations for each input signal.

A (Sl)=A (S)XQ thPA (S ) X 2−Q    ・・・(1)
A (So)= <A (S)−A (31)> t・
・・(2) <  >7は有効桁j2bitで打ち切りを表すC(S
o)=C(S)       ・・・(3)C(Sl)
=C(S)+A (So)−” (4)ここで、符号化
データが優勢シンボル(MPSz上の例ではO)の場合
はA (50)、C(SO)を次のデータの符号化に使
う、また劣勢シンボル、(LPS :上の例では1)の
場合は、A(31)。
A (Sl)=A (S)XQ thPA (S)X2-Q...(1)
A (So) = <A (S) - A (31)> t・
...(2) <>7 is C(S
o)=C(S)...(3)C(Sl)
=C(S)+A(So)−” (4) Here, if the encoded data is the dominant symbol (O in the example above MPSz), A (50), C(SO) is the encoding of the next data. In the case of the inferior symbol (LPS: 1 in the above example), A(31) is used.

C(Sl)を次のデータの符号化に使う。C(Sl) is used to encode the next data.

新しいAの値は2s倍(Sは0以上の整数)され、0.
5≦A<1.0の範囲におさめられる。
The new value of A is multiplied by 2s (S is an integer greater than or equal to 0), and 0.
It falls within the range of 5≦A<1.0.

この処理は、ハードウェアでは演算レジスタAを5回シ
フトすることに相当する。符号レジスタCに対しても同
じ回数のシフトが行われ、シフトアウトされた信号が符
号となる0以上の処理を繰り返し符号形成がなされる。
This processing corresponds to shifting the calculation register A five times in hardware. The code register C is also shifted the same number of times, and a code is formed by repeating the process of 0 or more in which the shifted out signal becomes a code.

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

q 42−” + 2−Q2”・(s )また、算術符
号は符号化データごとにQの値を切換えることが可能な
ことから確率推定部を符号化と分離することができる。
q42-"+2-Q2".(s) Furthermore, since the arithmetic code allows the value of Q to be switched for each encoded data, the probability estimation section can be separated from the encoding.

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

以上の算術符号を行う第7図の符号器53のブロック図
の説明を行う。
A block diagram of the encoder 53 shown in FIG. 7 that performs the above arithmetic coding will be explained.

′!J4図示のセレクタ52からの状態信号5116は
、カウンタメモリ73、符号化条件メモリ74に入力さ
れる。
′! A status signal 5116 from the selector 52 shown in FIG. J4 is input to the counter memory 73 and the encoding condition memory 74.

符号化条件メモリ74には、状態信号5116で表わさ
れる各状態毎に、出現しやすいシンボルである優勢シン
ボルMPS308と、後述する算術符号のLPSの出現
確率を含む符号化条件を示すインデックス1307が記
憶されている。符号化条件メモリ74から符号化すべき
画像の色及び状態に応じて読み出されたMPS308は
予測変換回路77に入力され、予測変換回路77では第
4図示のセレクタ52からのシリアル画素信号X117
がMPS308と一致した時にOとなるYN信号301
を作る。YN信号301は更新回路75に人力され、更
新回路75では、YN信号が0の時に、カウンタメモリ
73に記憶されているカウント値のうち対応する状態の
カウントをインクリメントする。そして、カウンタメモ
リ73に記憶されているカウント値0306がカウント
テーブルROM72からの設定値MC305に一致した
ならば、インデックス1307が大きくなる方向(LP
Sの出現確率qが小さくなる方向)に更新する。(MP
Sの反転は行わない。)尚、カウントテーブルROM7
2は、LPSの出現確率qを表わすインデックスIに対
応して決められている第1表で示したMPSの数MC3
05を更新回路75に供給する。
The encoding condition memory 74 stores, for each state represented by the state signal 5116, a dominant symbol MPS 308, which is a symbol that is likely to appear, and an index 1307 indicating the encoding condition including the probability of occurrence of an LPS of an arithmetic code, which will be described later. has been done. The MPS 308 read out from the encoding condition memory 74 according to the color and state of the image to be encoded is input to the predictive conversion circuit 77, and the predictive conversion circuit 77 receives the serial pixel signal X117 from the selector 52 shown in FIG.
YN signal 301 which becomes O when matches MPS308
make. The YN signal 301 is input to the update circuit 75, and the update circuit 75 increments the count of the corresponding state among the count values stored in the counter memory 73 when the YN signal is 0. If the count value 0306 stored in the counter memory 73 matches the set value MC305 from the count table ROM 72, the index 1307 increases in the direction (LP
update in the direction in which the appearance probability q of S becomes smaller). (MP
S is not inverted. ) In addition, count table ROM7
2 is the number MC3 of MPS shown in Table 1, which is determined corresponding to the index I representing the probability q of appearance of LPS.
05 is supplied to the update circuit 75.

また、更新回路75では、MP5308と画素信号x1
17が不一致の場合、即ち、予測変換回路77からのY
N信号が1の時はインデックスl307が小さくなる方
向(LPSの出現確率qが大きくなる方向)に更新する
。また、インデックスが1の時に値が0のYN信号が来
ると、MPSを反転(O−1または1−O)する処理を
行う。
Also, in the update circuit 75, the MP5308 and the pixel signal x1
17 does not match, that is, Y from the prediction conversion circuit 77
When the N signal is 1, the index l307 is updated in a direction that decreases (in a direction that increases the LPS appearance probability q). Furthermore, when a YN signal with a value of 0 comes when the index is 1, processing is performed to invert the MPS (O-1 or 1-O).

更新回路75の出力I’ 309、MPS’310は更
新後のインデックスの値であり、符号化条件メモリ74
に再記憶される。
Outputs I' 309 and MPS' 310 of the update circuit 75 are updated index values, and are stored in the encoding condition memory 74.
will be re-memorized.

符号化パラメータ決定回路76では、インデックス13
07の値に基づいて算術符号の符号化パラメータQ31
1を算術符号器78にセットする。この算術符号器78
では、予測変換回路77からのYN信号301をパラメ
ータQ311を用いて算術符号化し符号302を得る。
In the encoding parameter determination circuit 76, the index 13
Coding parameter Q31 of arithmetic code based on the value of 07
1 is set in the arithmetic encoder 78. This arithmetic encoder 78
Then, the YN signal 301 from the predictive conversion circuit 77 is arithmetic encoded using the parameter Q311 to obtain a code 302.

尚、符号化条件メモリ74に初期値を与えておき、1.
MPSを更新しないようにすることにより、静的な符号
化が容易に実現できる。
Note that an initial value is given to the encoding condition memory 74, and 1.
By not updating the MPS, static encoding can be easily achieved.

第8図は予測変換回路77のブロック図である。シリア
ル画素信号X117とMPS308がEX−OR回路7
9に人力され、第2表の論理式に従ってシリアル画素信
号X115とMPS308が一致したときに01不一致
のときに1となるYN信号301が出力される。
FIG. 8 is a block diagram of the predictive conversion circuit 77. Serial pixel signal X117 and MPS308 are connected to EX-OR circuit 7
When the serial pixel signal X115 and the MPS 308 match, the YN signal 301 becomes 01 when the serial pixel signal X115 and the MPS 308 match, and becomes 1 when the serial pixel signal X115 and the MPS 308 do not match.

第9図は、更新回路75のブロック図である。FIG. 9 is a block diagram of the update circuit 75.

YN信号301が0の時、カウンタメモリ73からのカ
ウント値C306が加算器81で+1インクリメントさ
れ、信号C’312になる。この値は比較器83でカウ
ントテーブルROM72からのMC305と比較され、
C′の値がMCの値に一致したならば、更新信号UPA
313を1にセットする。またYN信号301は更新信
号UPB314となり、UPA、UPBはインデックス
変更回路85に入る。また、UPAとUPBはOR回路
87で論理ORがとられ、OR回路87の出力信号31
5はセレクタ82の切り換え信号となる。セレクタ82
では信号315が1の時はカウンタメモリ73の値をリ
セットするためO信号319を選び、それ以外は加算器
81の出力信号C’312を選び、カウンタ更新信号C
”316として出力し、これをカウンタメモリ73に記
憶させる。従って、シリアル画素信号X115とMPS
308が不一致の場合、及び一致状態が所定回連続した
場合に、カウンタメモリ73のカウント値がリセットさ
れる。
When the YN signal 301 is 0, the count value C306 from the counter memory 73 is incremented by +1 by the adder 81 and becomes the signal C'312. This value is compared with MC305 from count table ROM72 by comparator 83,
If the value of C' matches the value of MC, the update signal UPA
Set 313 to 1. Further, the YN signal 301 becomes an update signal UPB 314, and UPA and UPB enter the index change circuit 85. Further, UPA and UPB are logically ORed by an OR circuit 87, and the output signal 31 of the OR circuit 87 is
5 is a switching signal for the selector 82. selector 82
Then, when the signal 315 is 1, select the O signal 319 to reset the value of the counter memory 73, otherwise select the output signal C'312 of the adder 81, and select the counter update signal C.
"316" and stores this in the counter memory 73. Therefore, the serial pixel signal X115 and MPS
If 308 does not match, or if the matching state continues a predetermined number of times, the count value of the counter memory 73 is reset.

インデックス変更回路85には、インデックスの更新き
ざみを制御する信号d317(標準的にはd=1)とU
PA313、UPB314および符号化条件メモリ74
から現在のインデックス■307が人力されている。
The index change circuit 85 has signals d317 (standardly d=1) that control the index update increments and U
PA313, UPB314 and encoding condition memory 74
Since then, the current index ■307 has been manually created.

′s3表はインデックス変更回路85におけるインデッ
クス更新方法を示すテーブルである(第3表には更新き
ざみがd=1とd−2の場合を示している。)このテー
ブルを現在のインデックスI、更新きざみ条件d%UP
A%UPBで参照することにより更新したインデックス
I′を決定する。また、I−1でUPB−1(シリアル
画素信号X115とMPS308が不一致の場合)の時
はEX信号318をセットする。EX信号318が1の
時に反転器86では現在のMP3308のシンボルを反
転させ(0−1又は1−0)、更新MPS’310を得
る。また、EX信号が0(7)時はMPS’ は変化さ
せない、更新されたI′309およびMPS’310は
符号化条件メモリ74に記憶され、次の処理用のインデ
ックスI及びMPSとして用いられる。尚、343表に
示した更新法は、ROMなどによりテーブルでも構成で
きるし、加減算器を使ってロジックで構成することも可
能である。
's3 table is a table showing the index update method in the index change circuit 85 (Table 3 shows cases where the update increments are d=1 and d-2). Increment condition d%UP
The updated index I' is determined by referring to A%UPB. Further, when I-1 is UPB-1 (when the serial pixel signal X115 and MPS308 do not match), the EX signal 318 is set. When the EX signal 318 is 1, the inverter 86 inverts the symbol of the current MP 3308 (0-1 or 1-0) to obtain an updated MPS' 310. Furthermore, when the EX signal is 0 (7), MPS' is not changed. The updated I' 309 and MPS' 310 are stored in the encoding condition memory 74 and used as the index I and MPS for the next processing. Note that the updating method shown in Table 343 can be configured as a table using a ROM or the like, or it can also be configured as a logic using an adder/subtractor.

以上の如く、2のべき乗の多項式で近似したLPSの出
現確率qを表わすインデックスIの値に応じて定められ
たMPSの数分のMPSが発生したときには、インデッ
クスIをd加算し、算術符号に用いるLPSの出現確率
qを小さくせしめ、一方、LPSが発生したときには、
インデックス■をd減算し、算術符号に用いるLPSの
出現確率qを大きくせしめる。また、更にLPSの出現
N11qが0.5を表わす状!a(インデックス■が1
の状態)においてLPSが発生した場合は、MPSを反
転する。
As described above, when MPSs for the number of MPSs determined according to the value of the index I representing the appearance probability q of an LPS approximated by a polynomial of a power of 2 are generated, d is added to the index I and the arithmetic code is The appearance probability q of the LPS used is made small, and on the other hand, when an LPS occurs,
The index ■ is subtracted by d to increase the appearance probability q of LPS used for arithmetic codes. Furthermore, the appearance of LPS N11q is 0.5! a (index ■ is 1
If LPS occurs in the state), MPS is inverted.

この様に、入力画像に適応的にインデックスI及びMP
Sを更新することにより、符号化効率の良い算術符号化
が達成できる。
In this way, the index I and MP are adaptively applied to the input image.
By updating S, arithmetic coding with high coding efficiency can be achieved.

第10図は本実施例で用いる算術符号の符号化効率曲線
である。以下、インデックスIの値を小文字iで示す、
この曲線はLPSの出現確率をq、符号化時での近似確
率91皿とした時に式(6)で示される。そして、LP
Sの出現確t!qの値の大きい方から小さい方へ、順次
インデックスIを1.2.3、・・・と付与する。
FIG. 10 is a coding efficiency curve of the arithmetic code used in this embodiment. Hereinafter, the value of index I is indicated by lowercase i,
This curve is expressed by equation (6) when the LPS appearance probability is q and the approximate probability at the time of encoding is 91 dishes. And LP
S is sure to appear! Indexes I are sequentially assigned as 1, 2, 3, etc. from the larger value of q to the smaller value of q.

η 8 ・・・ (6) ここで、分子はエントロピであり、Qs+&f式(7)
で示される値である。
η 8 ... (6) Here, the numerator is entropy, and Qs+&f formula (7)
This is the value shown by .

q・ム”Q+ +Q2        ・・・(7)Q
1%Q2の値は2のべき乗の多項近似の値で第4表で与
えられている。例えば(8)〜(10)で示される。
q・mu”Q+ +Q2 ...(7)Q
The value of 1%Q2 is a polynomial approximation value of a power of 2 and is given in Table 4. For example, it is shown by (8) to (10).

Qe+  =2−’          ・・・(8)
QII2’ −2−’   2−’      ・・・
(9)9.3′ 冨2−’+2−’      −・・
(1o)となり、この確率において効率ηが1.0にな
るピーク点となるqlを以降実効確率と呼ぶ、また効率
曲線の交点を境界確率Qb+と呼び、この確率を境に隣
の実効確率を使って符号化するほうが効率が向上するこ
とは明らかである。
Qe+ =2-'...(8)
QII2'-2-'2-' ・・・
(9) 9.3' Tomi 2-'+2-' -...
(1o), and the peak point ql at which the efficiency η becomes 1.0 in this probability is hereinafter referred to as the effective probability.The intersection of the efficiency curves is also referred to as the boundary probability Qb+, and the effective probability of the neighbor is calculated using this probability as the boundary. It is clear that the efficiency is improved by encoding using

本実施例では、式(5)で示したように2つの項で近似
できる確率から第4表に示した実効確率q、五を選んで
いる。また、第4表のQ+、Q2 、Q3は算術符号器
78に送るパラメータQe311である。即ち、Ql、
Q2はシフトレジスタへ与えるシフト量であり、このシ
フト演算により2のべき乗計算を行っている。また、Q
In this embodiment, the effective probabilities q and 5 shown in Table 4 are selected from the probabilities that can be approximated by two terms as shown in equation (5). Furthermore, Q+, Q2, and Q3 in Table 4 are parameters Qe311 sent to the arithmetic encoder 78. That is, Ql,
Q2 is the shift amount given to the shift register, and a power of 2 calculation is performed by this shift operation. Also, Q
.

は第2項めの係数を示し、+、−の切り換えを行う。indicates the coefficient of the second term, and switches between + and -.

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

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

この式をNMで解くと式(12)になる。Solving this equation using NM gives equation (12).

NM=  NL  (1/q−1)J  ・・・(12
)ただし XJは小数点以下の切り上げを表ゎす6式(
12)におけるqに第10図に示したq、を与えること
により、そこでの優勢シンボル(M P S )の数N
MIが計算される。したがって、MC波式(13)から
計算される。
NM=NL (1/q-1)J...(12
) However, XJ is the formula 6 (
By giving q shown in FIG. 10 to q in 12), the number N of dominant symbols (M P S ) there
MI is calculated. Therefore, it is calculated from the MC wave equation (13).

MCi冨N□II−NMI      ・・・(13)
3@1表のMCの値は式(11)、(12)、(13)
からNL=2として計算したものである。
MCi Tomin□II-NMI...(13)
3@1 The value of MC in the table is expressed by formulas (11), (12), (13)
It is calculated using NL=2.

この様に、第10図示の如くの各境界確率Qb+に基づ
いて各インデックスIに対応した優勢シンボルMPSの
数N、ムを求め、隣り合ったインデックス間の優勢シン
ボルN工の差を各インデックスIに対するMCとする。
In this way, the number N of dominant symbols MPS corresponding to each index I is calculated based on each boundary probability Qb+ as shown in FIG. MC for

そして、このMeの値と発生する優勢シンボルMPSの
数を前述の如く比較し、MCの値と優勢シンボルMPS
の数が一致したならば、その状態は隣りのインデックス
Iを用いた符号化が通した状態と判断して、インデック
スIを変更する。これによって、優勢シンボルMPSの
発生数を基にして良好なタイミングでインデックスIの
変更がなされ、且つ、最適なインデックスIを用いた符
号化を適応的に達成できる。
Then, the value of Me and the number of generated dominant symbols MPS are compared as described above, and the value of MC and the number of dominant symbols MPS are
If the numbers match, it is determined that the state has passed the encoding using the adjacent index I, and the index I is changed. As a result, the index I is changed at a good timing based on the number of occurrences of the dominant symbol MPS, and encoding using the optimum index I can be adaptively achieved.

第11図は算術符号器78のブロック図である。FIG. 11 is a block diagram of arithmetic encoder 78.

符号パラメータ決定回路76で決められたコントロール
信号Q311(第4表)のうちシフトレジスタA90に
Qlを、シフトレジスタB91にQ2、セレクタ92に
Q3が人力される。
Of the control signals Q311 (Table 4) determined by the code parameter determination circuit 76, Ql is input to the shift register A90, Q2 to the shift register B91, and Q3 to the selector 92.

Q+、Qzは夫々シフトレジスタA、Bに対してAug
end信号であるA、323を何bit右にシフトする
かを指示する。シフトされた結果が出力信号330.3
31となる。
Q+ and Qz are Aug for shift registers A and B, respectively.
Instructs how many bits to shift the end signal A, 323 to the right. The shifted result is the output signal 330.3
It will be 31.

信号331は、反転器96により補数がとられ、セレク
タ92はコントロール信号Q、により信号331又は反
転器96の出力信号を選択し、出力信号332を得る。
The signal 331 is complemented by the inverter 96, and the selector 92 selects the signal 331 or the output signal of the inverter 96 using the control signal Q to obtain an output signal 332.

加算器93ではシフトレジスタA90からの信号330
とセレクタ92からの信号332の加算が行われ、AS
I信号324が出力される。減算器94では、AS倍信
号23からASI信号324を減算し、Aso信号32
5を得る。セレクタ95ではAB6信号325とAg1
信号324のいずれかをYN信号301により選択する
。即ちYN信号が1の時はAa16信号が、また、YN
信号が0の時はAi+信号がA′信号326になる。シ
フト回路89ではA′倍信号MSBが1になるまで左ヘ
シフトする処理が行われ、このシフトによりAs’信号
327が得られる。このシフトの回数に相当するシフト
信号332は、コードレジスタ99に入り、コードレジ
スタ99からはシフト回数に相当する数のbitがMS
Bから順番に出力され符号データ330になる。
Adder 93 receives signal 330 from shift register A90.
and the signal 332 from the selector 92 are added, and AS
An I signal 324 is output. The subtracter 94 subtracts the ASI signal 324 from the AS multiplied signal 23 to obtain the Aso signal 32.
Get 5. In the selector 95, AB6 signal 325 and Ag1
One of the signals 324 is selected by the YN signal 301. That is, when the YN signal is 1, the Aa16 signal is
When the signal is 0, the Ai+ signal becomes the A' signal 326. In the shift circuit 89, processing is performed to shift the A' times signal MSB to the left until it becomes 1, and as a result of this shift, an As' signal 327 is obtained. The shift signal 332 corresponding to the number of shifts is entered into the code register 99, and from the code register 99, bits corresponding to the number of shifts are MS.
The code data 330 is output in order starting from B.

符号データ330は、図示しないbit処理方法にて、
btttの連続が有限個内になるように処理され、復号
@14側に伝送されることになる。
The code data 330 is processed using a bit processing method (not shown).
The bttt sequence is processed to be within a finite number, and is transmitted to the decoding@14 side.

また、コードレジスタ99の内容CR32Bは加算器9
7で、Aso信号325と加算され、セレクタ98に入
る。また、As0侶号325の加算されていない信号C
R328もセレクタ98に入り、YN信号301が1の
時はCR’=CRYN信号がOの時はCR’ =CR+
AsoとなるCR’信号329として出力される。コー
ドレジスタ99に関して前述したシフト処理はCR’信
号に対しても行う。
Further, the content CR32B of the code register 99 is stored in the adder 9
7, it is added to the Aso signal 325 and enters the selector 98. In addition, the unadded signal C of As0 325
R328 also enters the selector 98, and when the YN signal 301 is 1, CR' = when the CRYN signal is O, CR' = CR+
It is output as a CR' signal 329 which becomes Aso. The shift processing described above regarding code register 99 is also performed on the CR' signal.

第 1 表 第 表 第4表 第3表 (−)はdon’ を 第5表 〔発明の効果〕 以上説明した様に、本発明によると多値カラー画像領域
内の多値カラー信号と多値カラー画像領域外の2値カラ
ー信号とを分けて符号化し、且つ、多値カラー画像領域
の位置、サイズを示す信号を発生するので、多値カラー
信号の符号化と2値カラー信号の符号化が重視してなさ
れてしまうことがなく、効率良いカラー画像の符号化が
可能となる。
Table 1 Table 4 Table 3 (-) indicates don'. Binary color signals outside the color image area are encoded separately, and signals indicating the position and size of the multi-value color image area are generated, so it is possible to encode the multi-value color signal and the binary color signal. This makes it possible to efficiently encode color images.

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

第1図は本発明を適用した符号部の構成例を示す図、 第2図は2値化回路のブロック図、 第3図は復号部の構成例を示す図、 第4図は符号器のブロック図、 第5図は予測状態決定回路Aのブロック図、第6図は参
照画素位置を示す図、 第7図は動的符号器のブロック図、 第8図は予測変換回路のブロック図、 第9図は更新回路のブロック図、 第10図は符号化効率曲線を示す図、 第11図は算術符号器のブロック図、 第12図は変換係数を示す図、 第13図は予測状態決定回路Bのブロック図、第14図
は参照画素位置を示す図、 第15図は、領域指定の例を示す図、 第16図は減算器の動作例を示す図、 第17図は符号化動作例を示す図、 第18図はカラー文書例を示す図である。 20は画像メモリ、21は2値化器、22は2値メモリ
、23は減算器、24は差分メモリ、25は符号器A、
26は符号器Bである。 イノ)°5タス 2e ())i 第74図 線 占直他 差外
Fig. 1 is a diagram showing an example of the configuration of the encoding unit to which the present invention is applied, Fig. 2 is a block diagram of the binarization circuit, Fig. 3 is a diagram showing an example of the configuration of the decoding unit, and Fig. 4 is a diagram of the encoder. Block diagram: FIG. 5 is a block diagram of the prediction state determination circuit A; FIG. 6 is a diagram showing reference pixel positions; FIG. 7 is a block diagram of the dynamic encoder; FIG. 8 is a block diagram of the prediction conversion circuit; Figure 9 is a block diagram of the update circuit, Figure 10 is a diagram showing a coding efficiency curve, Figure 11 is a block diagram of an arithmetic encoder, Figure 12 is a diagram showing transform coefficients, and Figure 13 is a diagram showing prediction state determination. A block diagram of circuit B. FIG. 14 is a diagram showing reference pixel positions, FIG. 15 is a diagram showing an example of area specification, FIG. 16 is a diagram showing an example of subtracter operation, and FIG. 17 is a diagram showing encoding operation. Figure 18 shows an example of a color document. 20 is an image memory, 21 is a binarizer, 22 is a binary memory, 23 is a subtracter, 24 is a difference memory, 25 is an encoder A,
26 is encoder B. Ino)°5 Tas 2e ())i Figure 74

Claims (1)

【特許請求の範囲】[Claims] カラー画像中の多値カラー画像領域内の多値カラー信号
を符号化する第1符号化手段と、前記カラー画像中の多
値ちカラー画像領域外の2値カラー信号を符号化する第
2符号化手段と、前記カラー画像中の多値カラー画像領
域の位置、サイズを示す領域信号を発生する発生手段と
を有することを特徴とするカラー画像の符号化装置。
a first encoding means for encoding a multi-value color signal within a multi-value color image area in a color image; and a second code for encoding a binary color signal outside the multi-value color image area in the color image. 1. A color image encoding apparatus, comprising: a color image encoding means; and a generation means for generating an area signal indicating the position and size of a multivalued color image area in the color image.
JP2054529A 1990-03-05 1990-03-05 Color image encoding device Expired - Fee Related JP2832059B2 (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP2054529A JP2832059B2 (en) 1990-03-05 1990-03-05 Color image encoding device
DE69129950T DE69129950T2 (en) 1990-03-05 1991-03-05 Image processing device
EP98200137A EP0858210B1 (en) 1990-03-05 1991-03-05 Image processing apparatus
AT98200137T ATE256951T1 (en) 1990-03-05 1991-03-05 IMAGE PROCESSING DEVICE
DE69133350T DE69133350D1 (en) 1990-03-05 1991-03-05 Image processing device
EP91301822A EP0446018B1 (en) 1990-03-05 1991-03-05 Image processing apparatus
AT91301822T ATE169790T1 (en) 1990-03-05 1991-03-05 IMAGE PROCESSING DEVICE
US08/285,523 US5844718A (en) 1990-03-05 1994-08-04 Image processing apparatus and method in which multi-level color signal with removed edge component is encoded
US08/908,379 US5917956A (en) 1990-03-05 1997-08-07 Image processing apparatus capable of removing an edge portion from a multi-level color signal based on a binary color signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2054529A JP2832059B2 (en) 1990-03-05 1990-03-05 Color image encoding device

Publications (2)

Publication Number Publication Date
JPH03254573A true JPH03254573A (en) 1991-11-13
JP2832059B2 JP2832059B2 (en) 1998-12-02

Family

ID=12973193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2054529A Expired - Fee Related JP2832059B2 (en) 1990-03-05 1990-03-05 Color image encoding device

Country Status (1)

Country Link
JP (1) JP2832059B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003348360A (en) * 2002-04-25 2003-12-05 Microsoft Corp Document encoding system, document decoding system and methods therefor
US7903888B2 (en) 2006-08-08 2011-03-08 Canon Kabushiki Kaisha Image encoding apparatus and image decoding apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5778277A (en) * 1980-10-31 1982-05-15 Ricoh Co Ltd Video coding method
JPS6282771A (en) * 1985-10-07 1987-04-16 Canon Inc Data communication equipment
JPS63190474A (en) * 1987-02-03 1988-08-08 Canon Inc Color picture data coder
JPH03104380A (en) * 1989-09-19 1991-05-01 Nippon Telegr & Teleph Corp <Ntt> Character separation coding method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5778277A (en) * 1980-10-31 1982-05-15 Ricoh Co Ltd Video coding method
JPS6282771A (en) * 1985-10-07 1987-04-16 Canon Inc Data communication equipment
JPS63190474A (en) * 1987-02-03 1988-08-08 Canon Inc Color picture data coder
JPH03104380A (en) * 1989-09-19 1991-05-01 Nippon Telegr & Teleph Corp <Ntt> Character separation coding method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003348360A (en) * 2002-04-25 2003-12-05 Microsoft Corp Document encoding system, document decoding system and methods therefor
US7903888B2 (en) 2006-08-08 2011-03-08 Canon Kabushiki Kaisha Image encoding apparatus and image decoding apparatus

Also Published As

Publication number Publication date
JP2832059B2 (en) 1998-12-02

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
US5844718A (en) Image processing apparatus and method in which multi-level color signal with removed edge component is encoded
US5317411A (en) Image encoding
JPH0955856A (en) Bit plane encoding device
US5761342A (en) Image processing apparatus and method
JPH09149260A (en) Information processor and information processing method
JPH03254573A (en) Encoding device for color picture
JP3119373B2 (en) Image coding device
JP2872334B2 (en) Color image encoding device
JP2952007B2 (en) Image coding device
JPH04316279A (en) Color picture encoder
JPH046948A (en) Binarizing method for color picture
JP2675903B2 (en) Image coding method
JPH0437369A (en) Color picture encoding/decoding system
JP2697897B2 (en) Color image encoding method and apparatus
JP2810478B2 (en) Image coding device
JP2877451B2 (en) Image coding method
JPH05145766A (en) Image processor
JPH0522605A (en) Image processing method and device
JPH046954A (en) Picture prediction coding system
JPH03102967A (en) Color image encoding system
JPH0393357A (en) Color picture coding system
JPH046955A (en) Color picture coding system
JPH09261067A (en) Information processor and its method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070925

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080925

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090925

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees