JP2798025B2 - Video coding method and apparatus - Google Patents

Video coding method and apparatus

Info

Publication number
JP2798025B2
JP2798025B2 JP30883695A JP30883695A JP2798025B2 JP 2798025 B2 JP2798025 B2 JP 2798025B2 JP 30883695 A JP30883695 A JP 30883695A JP 30883695 A JP30883695 A JP 30883695A JP 2798025 B2 JP2798025 B2 JP 2798025B2
Authority
JP
Japan
Prior art keywords
data
difference
frame
processing
moving image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP30883695A
Other languages
Japanese (ja)
Other versions
JPH09154139A (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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP30883695A priority Critical patent/JP2798025B2/en
Publication of JPH09154139A publication Critical patent/JPH09154139A/en
Application granted granted Critical
Publication of JP2798025B2 publication Critical patent/JP2798025B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、動画像データの符
号化方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for encoding moving picture data.

【0002】[0002]

【従来の技術】現在、書籍、新聞、雑誌、マンガ本、ア
ニメーション等の文字、線画、写真、動画などの内容を
文字データや2値または多値の画像データなどのデータ
として電子的、光学的あるいは磁気的な記録媒体に記録
したり、これら記録されたデータを記録媒体から読み出
して表示イメージに変換し、各種の表示装置に表示した
りする機器の開発が行われている。表示装置としては、
例えば、CRT装置やプラズマディスプレイ装置、ある
いは、携帯端末にしばしば使用される液晶ディスプレイ
装置などが挙げられる。これらの機器の開発目的として
は、今までは紙に印刷することにより固定されまた流通
してきた情報を、記録媒体に記録し供給することによ
り、紙資源の保護を図り、また、紙の本にはない機能を
付加することにより密度の濃い情報を提供することなど
が挙げられる。
2. Description of the Related Art At present, the contents of characters such as books, newspapers, magazines, comic books, animations, etc., line drawings, photographs, moving images, etc. are converted into electronic data and optical data as character data and binary or multi-valued image data. Alternatively, devices have been developed that record the data on a magnetic recording medium, read the recorded data from the recording medium, convert the data into a display image, and display the image on various display devices. As a display device,
For example, a CRT device, a plasma display device, a liquid crystal display device often used for a portable terminal, and the like can be given. The purpose of developing these devices is to record and supply information that has been fixed and distributed by printing on paper to a recording medium, to protect paper resources, and to create a paper book. To provide information with a high density by adding a function that does not exist.

【0003】また、近年のマルチメディア化の傾向によ
り、動画や音など、紙に印刷する形態では表現できない
ものも、データに含まれるようになってきている。これ
らのデータには、アニメーションなどの、簡易動画像と
いわれ複数のフレームで構成された2値または多値の画
像データなどがある。
[0003] In addition, due to the recent trend toward multimedia, data that cannot be expressed in the form of printing on paper, such as moving images and sounds, has been included in data. These data include binary or multi-valued image data, such as animation, which is called a simple moving image and is composed of a plurality of frames.

【0004】2値または多値の画像データは、8色また
は16色表示可能な液晶ディスプレイ装置で表示するた
めに、ディザ処理を施されることがある。ディザ処理さ
れた画像データ(ディザ画像データ)は、1画素ずつ観
察すると2値データであるが、画像を一定距離以上離れ
て観察すると、白画素が比較的多くを占める領域では輝
度が高いように見え、黒画素が比較的多くを占める領域
では輝度が低いように見え、結果として画像の濃淡を表
示することができるというものである。
[0004] Binary or multi-valued image data may be subjected to dither processing in order to be displayed on a liquid crystal display device capable of displaying eight or sixteen colors. The dithered image data (dither image data) is binary data when observed one pixel at a time. However, when an image is observed at a certain distance or more, the luminance is high in an area where white pixels are relatively large. In a region where black pixels occupy a relatively large amount, the luminance appears to be low, and as a result, the density of an image can be displayed.

【0005】ディザ処理としては、組織的ディザ法と誤
差拡散ディザ法が広く用いられている。組織的ディザ法
は、対象画像をn×nドットのサブマトリクスの集合と
みなし、サブマトリクス内の座標情報のみによってしき
い値を定め、このしきい値と比較し、しきい値より大な
ら“1”(白)、小なら“0”(黒)となる2値信号に
変換するものである。誤差拡散ディザ法は、2値化しよ
うとする画素の周囲の画素の濃淡に応じてしきい値処理
を変化させ、比較して得られた誤差を次の画素の値に加
算していくものである。
As the dither processing, an organized dither method and an error diffusion dither method are widely used. In the systematic dither method, the target image is regarded as a set of sub-matrices of n × n dots, a threshold is determined only by coordinate information in the sub-matrix, and the threshold is compared with the threshold. This is converted into a binary signal which is 1 "(white) and" 0 "(black) if small. The error diffusion dither method changes the threshold processing according to the density of pixels around the pixel to be binarized, and adds the error obtained by comparison to the value of the next pixel. is there.

【0006】一方、フロッピィディスクなどの記録容量
が小さい記録媒体に記録する場合や、データ量が多い画
像データが膨大にある場合には、データ圧縮を行う必要
が生じる。2値または多値の画像データの圧縮方法とし
ては、同一ライン内の画像信号の相関のみを利用する1
次元符号化方式であるModified Huffman(モディファイ
ド・ハフマン)符号化(以下MH符号化あるいはMHと
呼ぶ)法や、隣接するライン間の相関も利用する2次元
符号化方式であるModified Read(モディファイド・リ
ード)符号化(以下MR符号化あるいはMRと呼ぶ)法
などが知られており、MH符号化、MR符号化はファク
シミリなどで広く使用されている。
On the other hand, when recording is performed on a recording medium having a small recording capacity such as a floppy disk, or when there is a huge amount of image data having a large data amount, it is necessary to perform data compression. As a compression method of binary or multi-valued image data, only the correlation of image signals in the same line is used.
Modified Huffman coding (hereinafter referred to as MH coding or MH), which is a two-dimensional coding method, and Modified Read, which is a two-dimensional coding method that also uses the correlation between adjacent lines. ) Coding (hereinafter referred to as MR coding or MR) is known, and MH coding and MR coding are widely used in facsimile and the like.

【0007】ところで、MH符号化、MR符号化を用い
てディザ画像を符号化した場合には、その符号量が原画
像信号の総ビット数より大きくなる、すなわち、符号化
したためにかえって符号量が大きくなることが多い。こ
れは、ディザ処理によって得られた画像データは、周期
性が全くなく、また近傍画素との相関もほとんどないの
で、データ圧縮に適していないためである。そこで、デ
ィザ法による中間調画像を効率よく圧縮するための符号
化方法が、各種検討されている。
When a dither image is coded using MH coding or MR coding, the code amount is larger than the total number of bits of the original image signal. Often becomes large. This is because the image data obtained by the dither processing has no periodicity and has almost no correlation with neighboring pixels, and is not suitable for data compression. Therefore, various encoding methods for efficiently compressing a halftone image by the dither method have been studied.

【0008】特開昭64−77371号公報には、ディ
ザ法を用いた中間調画像の符号化方法であって、中間調
画像の画質を低下させることなく符号化効率を向上させ
ることができる方法として、前回処理した2値信号と今
回処理している2値信号の差分成分のみを符号化する方
法が開示されている。図11は、特開昭64−7737
1号公報に開示された符号化装置の構成を示すブロック
図である。この符号化装置は、ディザ処理を施される前
の中間調画像を格納する中間調画像バッファ401と、
例えば図12に示すようなBayer(バイヤー)型デ
ィザマトリクスを備え中間調画像バッファ401中の画
像データに対してディザ処理を施すディザ処理回路40
2と、組織的ディザ処理を施された前回と今回の2値信
号を比較する比較処理回路403と、比較処理回路40
3での比較を行うために2値信号を一時的に格納する比
較データ格納バッファ404と、比較処理回路403で
の比較結果を符号化する符号化回路405と、符号化さ
れたデータを格納する符号メモリ406とによって、構
成されている。
Japanese Patent Application Laid-Open No. 64-77371 discloses a method of encoding a halftone image using a dither method, which can improve the encoding efficiency without deteriorating the image quality of the halftone image. Discloses a method of encoding only a difference component between a previously processed binary signal and a currently processed binary signal. FIG.
FIG. 1 is a block diagram illustrating a configuration of an encoding device disclosed in Japanese Patent No. The encoding apparatus includes a halftone image buffer 401 that stores a halftone image before being subjected to dither processing,
For example, a dither processing circuit 40 having a Bayer type dither matrix as shown in FIG. 12 and performing dither processing on image data in the halftone image buffer 401.
2, a comparison processing circuit 403 for comparing the previous and current binary signals subjected to the systematic dither processing, and a comparison processing circuit 40
A comparison data storage buffer 404 for temporarily storing a binary signal for performing the comparison in 3, an encoding circuit 405 for encoding the comparison result in the comparison processing circuit 403, and storing the encoded data. A code memory 406 is used.

【0009】次に、この符号化装置の動作について、図
13〜図15を用い、順を追って説明する。中間調画像
バッファ401は、M行×N列、M・N階調の中間調画
像を格納するものであり、ここでは、4行×4列の16
階調であるとする。中間調バッファ401から中間調画
像を順次読み出すと、ディザ処理回路402は、これら
の中間調画像を入力として組織的ディザ法により2値化
処理を実行し、ディザ画像を比較処理回路403に送出
する。ここでは、中間調画像バッファ401中のn番目
の中間調画像の符号化について注目する。
Next, the operation of the encoding apparatus will be described step by step with reference to FIGS. The halftone image buffer 401 stores a halftone image of M rows × N columns and M · N gradations, and here, 16 rows of 4 rows × 4 columns.
It is assumed that it is gradation. When the halftone images are sequentially read from the halftone buffer 401, the dither processing circuit 402 performs a binarization process by the systematic dither method with these halftone images as input, and sends the dither image to the comparison processing circuit 403. . Here, attention is paid to the encoding of the n-th halftone image in the halftone image buffer 401.

【0010】図13(a),(b),(c)は、n−1,n,n+1
番目に得られてそれぞれ比較処理回路403に送出され
る2値パターンを示している。前回処理されたn−1番
目の2値パターンが比較データ格納バッファ404に格
納されているとすると、比較データ格納バッファ404
からn−1番目の2値パターンが読み出され、比較処理
回路403において、現在処理中のn番目の2値パター
ンと比較され、これら2値パターンの差分パターンが求
められる。ここでは、図14(a)に示すような差分パタ
ーンが得られ、差分パターンの要素が全て0なので、n
−1番目とn番目の2値パターンは同一であると判別さ
れてその旨が符号化回路405に伝達される。また、比
較処理回路403は、次のn+1番目の2値パターンに
対する比較見本とするために、n番目の2値パターンを
比較データ格納バッファ404に格納する。
FIGS. 13A, 13B, and 13C show n-1, n, and n + 1.
The binary patterns obtained secondly and sent to the comparison processing circuit 403 are shown. Assuming that the (n-1) -th binary pattern processed last time is stored in the comparison data storage buffer 404,
, The (n−1) -th binary pattern is read out, and compared with the n-th binary pattern currently being processed in the comparison processing circuit 403, and a difference pattern between these binary patterns is obtained. Here, a difference pattern as shown in FIG. 14 (a) is obtained, and since all the elements of the difference pattern are 0, n
It is determined that the -1st and n-th binary patterns are the same, and that fact is transmitted to the encoding circuit 405. Further, the comparison processing circuit 403 stores the n-th binary pattern in the comparison data storage buffer 404 so as to be used as a comparison sample for the next (n + 1) -th binary pattern.

【0011】続いて、n+1番目の中間調画像の2値パ
ターンが図13(c)に示すように求められたとすると、
n番目の2値パターンの場合と同様にして、比較処理回
路403において、n+1番目の2値パターンがn番目
の2値パターンと比較され、差分パターンとして図14
(b)に示すようなパターンが得られる。この差分パター
ン中、“1”である要素は不一致箇所を示している。こ
こで、図15(c)に示すマトリクスを用いて不一致箇所
のアドレスを表わすことにすると、5番目、7番目、1
1番目および15番目のアドレスにおいて不一致が存在
することになる。
Next, assuming that a binary pattern of the (n + 1) th halftone image is obtained as shown in FIG.
In the same manner as in the case of the n-th binary pattern, the comparison processing circuit 403 compares the (n + 1) -th binary pattern with the n-th binary pattern.
A pattern as shown in (b) is obtained. In this difference pattern, an element of “1” indicates a mismatched portion. Here, if the address of the mismatched portion is represented using the matrix shown in FIG.
There will be a mismatch at the first and fifteenth addresses.

【0012】符号化回路405は、n番目の2値パター
ンとn−1番目の2値パターンとが同一であることか
ら、n番目の2値パターンに対応して、一致コード
“E”にカウント数“+1”が付随した符号を生成す
る。そして同じ2値パターンが連続する場合には、カウ
ント数が累算される。そして、この符号は符号化回路4
05から符号メモリ406に格納される。また、n番目
の2値パターンとn+1番目の2値パターンが既に述ベ
たように不一致であることから、この場合には、符号化
回路405は、図15(b)に示すように、不一致コード
“B”に不一致箇所情報が付随した符号を生成して符号
メモリ406に格納する。不一致箇所情報は16ビット
長であり、不一致に対応した位置のビット、ここでは、
5番目、7番目、11番目および15番目のビットを
“1”とすることで不一致箇所を表現する。
Since the n-th binary pattern and the (n-1) -th binary pattern are the same, the encoding circuit 405 counts the coincidence code "E" corresponding to the n-th binary pattern. A code with the number "+1" is generated. If the same binary pattern continues, the count number is accumulated. This code is encoded by the encoding circuit 4
05 is stored in the code memory 406. In addition, since the n-th binary pattern and the (n + 1) -th binary pattern do not match as described above, in this case, the encoding circuit 405 determines whether the mismatching occurs as shown in FIG. A code having the code “B” and unmatched portion information is generated and stored in the code memory 406. The mismatch location information is 16 bits long, and the bit at the position corresponding to the mismatch, here,
By setting the fifth, seventh, eleventh, and fifteenth bits to “1”, a mismatched portion is represented.

【0013】また、連続画像の隣接フレーム間に相関の
高い連続した複数の画像情報を圧縮する連続画像符号化
装置の一例が、特開平1−303988号公報に記載さ
れている。この連続画像符号化装置は、複数のフレーム
にまたがる画像データの画素を時間軸方向にランレング
ス符号化することによって、フレーム間でデータの変わ
っているところ、すなわち動いているところだけを符号
化し、動きの少ない場面でのデータ量を減らし、さらに
グラフィック等によるアニメーションの動きを滑らかに
することを目的としている。図16は、特開平1−30
3988号公報に記載された連続画像符号化装置を示し
ている。すなわちこの連続画像符号化装置は、複数のフ
レームに連続する画像情報(連続画像データ)を取り込
む画像データ入力部501と、画像データ入力部501
に入力した連続画像データから各画素を時系列方向にラ
ンレングス圧縮する連続画像圧縮部502と、連続画像
圧縮部502で符号化された各フレームごとの画素情報
を記憶する例えば光ディスク等の記憶メディア503
と、記憶メディア503から各フレームごとの画素情報
を読み出して時系列方向にランレングス伸張を行う連続
画像伸張部504と、連続画像伸張部504で伸張され
た表示データが書き込まれる表示メモリ505と、表示
メモリ505に書き込まれた表示データを表示するため
のディスプレイ506と、から構成されている。
An example of a continuous image coding apparatus for compressing a plurality of pieces of continuous image information having a high correlation between adjacent frames of a continuous image is described in JP-A-1-303988. This continuous image encoding device encodes only the place where data changes between frames, that is, only the moving part, by performing run-length encoding in the time axis direction on pixels of image data spanning a plurality of frames, It is intended to reduce the amount of data in a scene with little movement and to further smooth the movement of animation such as graphics. FIG.
1 shows a continuous image encoding device described in Japanese Patent No. 3988. That is, the continuous image encoding device includes an image data input unit 501 that captures image information (continuous image data) continuous to a plurality of frames, and an image data input unit 501.
A continuous image compression unit 502 that performs run-length compression of each pixel in the time series direction from the continuous image data input to the storage unit, and a storage medium such as an optical disk that stores pixel information for each frame encoded by the continuous image compression unit 502 503
A continuous image expansion unit 504 that reads out pixel information for each frame from the storage medium 503 and performs run-length expansion in a time-series direction, and a display memory 505 in which display data expanded by the continuous image expansion unit 504 is written. And a display 506 for displaying the display data written in the display memory 505.

【0014】次に、この連続画像符号化装置の動作を説
明する。アニメーションを行うべき全フレームの画像デ
ータを画像データ入力部501に入力してフレームごと
にデジタル化し、フレーム番号の若い順に連続画像圧縮
部502に出力する。連続画像圧縮部502は、入力し
たデジタルデータをフレーム単位で順次比較して、色デ
ータの変化のあった画素の色データとその色データが続
いたフレーム数を出力することにより、各画素の時系列
方向のランレングス圧縮を行い、記憶メディア503に
色データとフレーム数(表示時間データ)をフレーム単
位に記録する。一方、連続画像伸張部504は、記憶メ
ディア503から圧縮データをフレーム単位に読み出し
て、時系列方向にランレングス符号を伸張し、表示メモ
リ505に書き込む。表示メモリ505は、ディスプレ
イ506上の表示画素とアドレスが1対1に対応したビ
ットマップメモリであり、表示メモリ505の各アドレ
スに書き込まれた表示データは、そのまま変換されてデ
ィスプレイ506上に表示される。
Next, the operation of the continuous picture coding apparatus will be described. Image data of all frames to be animated is input to the image data input unit 501, digitized for each frame, and output to the continuous image compression unit 502 in ascending frame number order. The continuous image compression unit 502 sequentially compares the input digital data on a frame-by-frame basis, and outputs the color data of the pixel in which the color data has changed and the number of frames in which the color data has continued. Run length compression in the sequence direction is performed, and the color data and the number of frames (display time data) are recorded in the storage medium 503 in frame units. On the other hand, the continuous image decompression unit 504 reads out the compressed data from the storage medium 503 in frame units, decompresses the run-length code in the time series direction, and writes it in the display memory 505. The display memory 505 is a bitmap memory in which addresses correspond to display pixels on the display 506 on a one-to-one basis. Display data written to each address of the display memory 505 is directly converted and displayed on the display 506. You.

【0015】図17は、連続画像圧縮部502の構成を
示している。連続画像圧縮部502は、入力した1フレ
ーム分の画素データをそれぞれ記憶する第1のフレーム
メモリ521及び第2のフレームメモリ522と、フレ
ームメモリ521,522にそれぞれ記憶されたフレー
ムにおいて同じ位置の画素データを比較してその情報を
出力するフレーム比較回路523と、現在使用している
フレームの各画素の色データを記憶する色データメモリ
524と、色データメモリ524に現在記憶されている
各画素の色データが現在のフレームまで何フレーム連続
して同じ値(同じ色)であるかを示す表示時間データメ
モリ525と、フレーム比較回路523での比較の結
果、色が異なる画素がいくつあったかをカウントする変
化画素数カウンタ526と、1回のフレーム間の比較で
同じ位置の画素同士で変化した画素の色データとそれに
対応する表示時間データを2つのフレームの比較が全て
終わるまで保存しておくためのデータ出力用FIFOメ
モリ527と、1回のフレーム間の比較が終わるごとに
変化画素数カウンタ526とデータ出力用FIFOメモ
リ527の出力を制御する出力制御回路528と、一番
初めの画面(初期画面)のデータを記憶しておく初期画
面用メモリ529と、比較されて書き換えられたデータ
が初期画面のデータであるかどうかを判別する初期値判
別回路530と、初期値判別回路530の判別結果に従
ってデータを初期画面用メモリ529に入力するかデー
タ出力用FIFOメモリ527に入力するかを切り替え
るスイッチ531と、から構成されている。
FIG. 17 shows the configuration of the continuous image compression unit 502. The continuous image compression unit 502 includes a first frame memory 521 and a second frame memory 522 for respectively storing the input pixel data of one frame, and a pixel at the same position in the frames respectively stored in the frame memories 521 and 522. A frame comparison circuit 523 for comparing data and outputting the information, a color data memory 524 for storing color data of each pixel of the currently used frame, and a color data memory 524 for each pixel currently stored in the color data memory 524. The display time data memory 525 indicating how many consecutive frames of the color data have the same value (same color) up to the current frame, and the number of pixels having different colors are counted as a result of comparison by the frame comparison circuit 523. Changed pixel counter 526 and pixels that have changed between pixels at the same position in one comparison between frames The data output FIFO memory 527 for storing the color data and the corresponding display time data until the comparison of the two frames is completed, and the change pixel number counter 526 each time the comparison between one frame is completed And an output control circuit 528 for controlling the output of the data output FIFO memory 527; an initial screen memory 529 for storing the data of the first screen (initial screen); An initial value discriminating circuit 530 for discriminating whether the data is screen data, and a switch for switching between inputting data to the initial screen memory 529 or inputting data to the data output FIFO memory 527 according to the discrimination result of the initial value discriminating circuit 530 531.

【0016】ここで、アドレスの相対関係を概念的に示
す図18を用いて、第1のフレームメモリ521及び第
2のフレームメモリ522と色データメモリ524と表
示時間データメモリ525との関係を説明する。各フレ
ームメモリ521,522と色データメモリ524と表
示時間データメモリ525は、いずれも同じ大きさのア
ドレス空間を持つメモリであって、図に示すように相対
的に同じ位置関係になるように配置されている。ここ
で、第1のフレームメモリ521と第2のフレームメモ
リ522に、比較すべき2つのフレームの画素情報をそ
れぞれ書き込み、同じ表示位置の画素同士を比較する。
同じ表示位置の画素同士を比較した結果は、色データメ
モリ524と表示時間データメモリ525において、相
対位置関係が同じになるようなアドレスに書き込まれ
る。これにより各画素の情報が各メモリ521,522,
524,525において相対的に同じ位置関係になるよ
うに記憶される。
The relationship among the first frame memory 521 and the second frame memory 522, the color data memory 524, and the display time data memory 525 will be described with reference to FIG. I do. Each of the frame memories 521 and 522, the color data memory 524, and the display time data memory 525 are memories having an address space of the same size, and are arranged so as to have a relatively same positional relationship as shown in the drawing. Have been. Here, pixel information of two frames to be compared is written into the first frame memory 521 and the second frame memory 522, respectively, and pixels at the same display position are compared.
The result of comparing the pixels at the same display position is written in the color data memory 524 and the display time data memory 525 at addresses where the relative positional relationship is the same. As a result, the information of each pixel is stored in each of the memories 521, 522,
At 524 and 525, they are stored so as to have the same relative positional relationship.

【0017】ここで、図19のフローチャートを用い
て、連続画像圧縮部522で行われる時系列方向ランレ
ングス符号化の手順を説明する。
Here, the procedure of the time-series direction run-length encoding performed by the continuous image compression unit 522 will be described with reference to the flowchart of FIG.

【0018】まず、連続画像圧縮部522を初期設定す
る(ステップ601)。具体的には、図20(a)に示す
ように、変化画素数カウンタ526を“0”にセットし
(ステップ621)、データ出力用FIFOメモリ52
7をリセットし、表示時間データメモリ525を“1”
でクリアし(ステップ622)、第1のフレームメモリ
521に最初のフレームのデータを書き込み(ステップ
623)、色データメモリ524に第1のフレームメモ
リ521の内容をコピーする(ステップ624)。ステ
ップ601での初期化処理が終われば、続いて、第2の
フレームメモリ522に次のフレームのデータを書き込
み(ステップ602)、第1のフレームメモリ521と
第2のフレームメモリ522の対応する位置の画素の色
をを比較し(ステップ603)、比較した画素の色が同
じかどうかを判断する(ステップ604)。比較した画
素で色データが同じ場合には、対応する表示時間データ
メモリ225の内容に1を加算してステップ611に移
行する。
First, the continuous image compression unit 522 is initialized (step 601). Specifically, as shown in FIG. 20A, the changing pixel number counter 526 is set to “0” (step 621), and the data output FIFO memory 52 is set.
7 and reset the display time data memory 525 to "1".
(Step 622), the data of the first frame is written to the first frame memory 521 (step 623), and the contents of the first frame memory 521 are copied to the color data memory 524 (step 624). When the initialization processing in step 601 is completed, the data of the next frame is subsequently written into the second frame memory 522 (step 602), and the corresponding positions of the first frame memory 521 and the second frame memory 522 are written. Are compared (step 603), and it is determined whether the colors of the compared pixels are the same (step 604). If the color data is the same for the compared pixels, 1 is added to the contents of the corresponding display time data memory 225, and the routine proceeds to step 611.

【0019】一方、ステップ604で画素の色が異なる
場合には、初期値判別回路530により初期画面データ
であるかどうか、すなわち、対応する色データメモリ5
24の色データの内容が初めて出力されるものであるか
どうかを判断する(ステップ606)。初期画面データ
でない場合には、このデータをデータ出力用FIFOメ
モリ527に出力して、第2のフレームメモリ522の
対応する画素の色データを新しいデータとして色データ
メモリ524に書き込む(ステップ607)。そして、
対応する表示時間データメモリ525の内容もデータ出
力用FIFOメモリ527に出力して、“1”を新しい
データとして表示時間データメモリ525に書き込む
(ステップ608)。続いて、変化画素数カウンタの内
容に1を加算し(ステップ609)、ステップ611に
移行する。一方、ステップ606で初期画面データであ
ると判断された場合には、初期画面処理を実行し(ステ
ップ610)、ステップ611に移行する。初期画面処
理は、このとき比較した画素位置に対応する色データメ
モリ524の内容をスイッチ531の切り替えによって
初期画面用メモリ529の対応する位置に書き込み、第
2のフレームメモリ522の対応する画素の色データを
新しいデータとして第1のフレームメモリ521に書き
込み、さらに、対応する表示時間メモリ525の内容も
初期画面用メモリ529の対応する位置に書き込み、
“1”を新しいデータとして表示時間データメモリ52
5に書き込むことによって、行われる。
On the other hand, if the colors of the pixels are different in step 604, whether the image data is the initial screen data by the initial value discriminating circuit 530, that is, the corresponding color data memory 5
It is determined whether the contents of the 24 color data are to be output for the first time (step 606). If the data is not the initial screen data, the data is output to the data output FIFO memory 527, and the color data of the corresponding pixel in the second frame memory 522 is written to the color data memory 524 as new data (step 607). And
The contents of the corresponding display time data memory 525 are also output to the data output FIFO memory 527, and "1" is written to the display time data memory 525 as new data (step 608). Subsequently, 1 is added to the content of the change pixel number counter (step 609), and the process proceeds to step 611. On the other hand, if it is determined in step 606 that the data is the initial screen data, an initial screen process is executed (step 610), and the process proceeds to step 611. In the initial screen processing, the contents of the color data memory 524 corresponding to the pixel position compared at this time are written into the corresponding position of the initial screen memory 529 by switching the switch 531, and the color of the corresponding pixel in the second frame memory 522 is written. The data is written as new data in the first frame memory 521, and the contents of the corresponding display time memory 525 are also written in the corresponding positions of the initial screen memory 529,
Display time data memory 52 with "1" as new data
5 is performed.

【0020】ステップ611では、1フレーム分の画素
データの全てを比較したかを判断する。比較していない
画素が残っている場合には、その画素の比較を上述と同
様に行うためにステップ602に移行し、全ての画素デ
ータの比較が済んでいたら、出力制御回路528による
出力処理を実行する(ステップ612)。この出力処理
は、図20(b)に示すように、変化画素数カウンタ52
6の内容を出力し(ステップ631)、次に、データ出
力用FIFOメモリ527に書き込まれた内容をそのま
ま出力し(ステップ632)、最後に、エンド(終了)
コードを出力する(ステップ633)処理である。この
出力処理が終了したら、第2のフレームメモリ522に
書き込まれたフレームデータが最後のデータかどうかを
判定して(ステップ613)、第2のフレームメモリ5
22に書き込まれたフレームデータが最後のデータでな
いときには、第2のフレームメモリ522の内容を全て
第1のフレームメモリ521にコピーし(ステップ61
4)、第2のフレームメモリ522に次のフレームデー
タを書き込むためにステップ602に移行する。一方、
ステップ613において、第2のフレームメモリ522
に書き込まれたフレームデータが最後のデータであると
判定された場合には、全てのフレームデータを比較した
ことになり、出力制御回路528による出力処理を行っ
て(ステップ615)、処理を終了する。ステップ61
5における出力処理は、ステップ613における出力処
理と同様のものである。以上の動作を行うことにより、
アニメーションの初期画面データとそれに続く書き換え
画面データとをフレーム単位で得ることができる。
In step 611, it is determined whether all the pixel data for one frame have been compared. If there is a pixel that has not been compared, the process proceeds to step 602 to compare the pixel in the same manner as described above. If all the pixel data have been compared, the output process by the output control circuit 528 is performed. Execute (step 612). This output processing is performed as shown in FIG.
6 is output (step 631), then the content written in the data output FIFO memory 527 is output as it is (step 632), and finally, the end (end)
This is the process of outputting a code (step 633). When the output processing is completed, it is determined whether or not the frame data written in the second frame memory 522 is the last data (step 613).
If the frame data written in the second frame memory 22 is not the last data, the entire contents of the second frame memory 522 are copied to the first frame memory 521 (step 61).
4) Go to step 602 to write the next frame data to the second frame memory 522. on the other hand,
In step 613, the second frame memory 522
When it is determined that the frame data written in is the last data, it means that all the frame data have been compared, and the output processing is performed by the output control circuit 528 (step 615), and the processing ends. . Step 61
The output processing in step 5 is the same as the output processing in step 613. By performing the above operations,
The initial screen data of the animation and the subsequent rewritten screen data can be obtained in frame units.

【0021】この連続画像符号化装置では、連続画像圧
縮部502で得られる連続画像の時系列方向ランレング
ス符号化データは、図21(a)に示すような初期画面デ
ータと、図21(b)に示すような書き換え画面データと
からなる。図21(a),(b)は、記憶メディア503に記
憶されるときのデータ構造として、これら初期画面デー
タと書き換え画面データを表わしている。
In this continuous image coding apparatus, the time-series run-length coded data of a continuous image obtained by the continuous image compression unit 502 includes initial screen data as shown in FIG. ) And rewrite screen data as shown in FIG. FIGS. 21A and 21B show these initial screen data and rewritten screen data as data structures when stored in the storage medium 503. FIG.

【0022】初期画面データの先頭には、ここから時系
列方向ランレングス符号化データが始まることを示す初
期画面コードが付加され、最後部には、フレームの終わ
りを示すエンドコードが付加される。各フレームの書き
換え画面データの先頭には、そのフレームでいくつの画
素が書き換えられるかを示した変化数データが付加さ
れ、最後部にはエンドコードが付加される。そして、初
期画面コードとエンドコードの間(初期画面データの場
合)、変化数データとエンドコードの間(書き換え画面
データの場合)には、図示するように、色データと表示
時間データが交互に配置する。なお、初期画面コード、
変化数コードおよびエンドマークはデータ取り扱い上の
便宜のためのものあり、必須のものではない。
At the head of the initial screen data, an initial screen code indicating that the time-series run-length encoded data starts from here is added, and at the end, an end code indicating the end of the frame is added. Change number data indicating how many pixels are rewritten in the frame is added to the head of the rewrite screen data of each frame, and an end code is added to the last part. Then, between the initial screen code and the end code (in the case of the initial screen data) and between the change number data and the end code (in the case of the rewritten screen data), the color data and the display time data alternately as shown in the figure. Deploy. Note that the initial screen code,
The change number code and the end mark are provided for convenience in data handling, and are not essential.

【0023】[0023]

【発明が解決しようとする課題】上述した特開昭64−
77371号公報に記載の方法では、組織的ディザ法を
用いた2値化処理後の2値信号を、前回処理した2値信
号と比較して差分のみを符号化しており、原理的に、前
回と今回の2値信号が連続して一致する場合にのみ圧縮
率が高くなる。逆に、両者が連続して一致しない場合に
は、付加した一致コードおよび不一致コードの分だけデ
ータ量が多くなり、かえって圧縮率は低下する。ディザ
処理した2値信号は、4×4のマトリクスで216=65
356通りのパターンが考えられることから、前回と今
回の2値信号が連続して一致する可能性は低いと考えら
れ、結局、特開昭64−77371号公報の方法では、
圧縮率の向上は困難である。
SUMMARY OF THE INVENTION The above-mentioned Japanese Patent Laid-Open Publication No.
In the method described in Japanese Patent No. 77371, the binary signal after the binarization processing using the systematic dither method is compared with the previously processed binary signal, and only the difference is encoded. Only when the current and the current binary signals match continuously, the compression ratio increases. On the other hand, if the two do not coincide with each other, the amount of data increases by the amount of the added matching code and non-matching code, and the compression rate is rather reduced. The dithered binary signal is 2 16 = 65 in a 4 × 4 matrix.
Since there are 356 possible patterns, it is considered that there is a low possibility that the previous and current binary signals are continuously coincident. In the end, according to the method disclosed in Japanese Patent Application Laid-Open No. Sho 64-77371,
It is difficult to improve the compression ratio.

【0024】また、特開平1−303988号公報に記
載の方法は、複数フレームからなる連続画像における隣
接フレーム間の画素情報に高い相関があることに着目
し、時間軸方向にランレングス符号化を行っているの
で、ディザ処理を行うことができないという問題点があ
る。
The method described in JP-A-1-303988 focuses on the fact that there is a high correlation between pixel information between adjacent frames in a continuous image composed of a plurality of frames, and performs run-length encoding in the time axis direction. Therefore, there is a problem that dither processing cannot be performed.

【0025】本発明の目的は、上記従来技術の問題点を
解決し、ディザ処理した画像データの符号化効率を向上
するとともに、複数フレームで構成される画像データす
なわち動画像データを少ない符号量で符号化できる符号
化方法及び装置を提供することにある。
An object of the present invention is to solve the above-mentioned problems of the prior art, to improve the encoding efficiency of dither-processed image data, and to reduce image data composed of a plurality of frames, that is, moving image data, with a small code amount. An object of the present invention is to provide an encoding method and apparatus capable of encoding.

【0026】[0026]

【課題を解決するための手段】本発明の動画像符号化方
法は、複数のフレームで構成される動画像データを符号
化する動画像符号化方法において、動画像データにディ
ザ処理を施こすディザ処理工程と、ディザ処理が施され
た動画像データに対してその一部の領域を同一色で塗り
つぶす塗りつぶし処理工程と、塗りつぶし処理工程を経
た動画像データに対して圧縮符号化を行う圧縮処理工程
と、を有する。
According to the present invention, there is provided a moving picture coding method for coding moving picture data composed of a plurality of frames, wherein the dither processing is performed on the moving picture data. A processing step, a filling processing step of painting a part of the region of the moving image data subjected to the dither processing with the same color, and a compression processing step of performing compression encoding on the moving image data that has passed through the filling processing step And

【0027】本発明の動画像符号化方法においては、塗
りつぶし処理工程の実施後に、現フレームの動画像デー
タと前フレームの動画像データとの差分データを求める
差分処理工程を設け、差分データに基づいて圧縮符号化
を行なわれるようにしてもよい。
In the moving picture coding method according to the present invention, a difference processing step for obtaining difference data between the moving picture data of the current frame and the moving picture data of the previous frame is provided after the painting processing step, and the difference processing step is performed based on the difference data. Compression encoding may be performed.

【0028】本発明の動画像符号化装置は、複数のフレ
ームで構成される動画像データを符号化する動画像符号
化装置において、動画像データをディザ処理を施すディ
ザ処理手段と、ディザ処理手段が出力したデータにおけ
る一部の領域を同一色で塗りつぶす塗りつぶし処理手段
と、塗りつぶし処理手段が出力したデータに基づいて圧
縮符号化を行う圧縮処理手段と、を有する。
A moving picture coding apparatus according to the present invention is a moving picture coding apparatus for coding moving picture data composed of a plurality of frames, wherein a dither processing means for dithering the moving picture data; And a compression processing unit for performing a compression encoding based on the data output from the painting processing unit.

【0029】本発明の動画像符号化装置においては、デ
ィザ処理手段に入力する動画像データをフレーム間引き
する間引き処理手段を設けてもよく、また、現フレーム
の動画像データと前フレームの動画像データとの差分デ
ータを求める差分処理手段を塗りつぶし手段の出力側に
設け、この差分データが圧縮処理手段に入力して符号化
されるようにしてもよい。差分処理手段としては、現フ
レーム及び前フレームの同じ表示位置の画素の排他的論
理和を求めて差分データとするものを使用することがで
きる。さらに、差分処理手段としては、現フレームのデ
ータと直前のフレームのデータとの画素ごとの差分値を
取得する差分値取得手段と、この差分値と予め定められ
たしきい値とを比較して差分データを決定する差分値比
較手段とを有し、差分値がしきい値以下である場合には
当該画素について現フレームと直前のフレームとの間に
差がなかったものとするものも使用することができる。
In the moving picture coding apparatus of the present invention, there may be provided a thinning-out processing means for thinning out the moving picture data inputted to the dither processing means, and the moving picture data of the current frame and the moving picture data of the previous frame may be provided. Difference processing means for obtaining difference data from the data may be provided on the output side of the painting means, and the difference data may be input to the compression processing means and encoded. As the difference processing means, means for obtaining exclusive OR of pixels at the same display position in the current frame and the previous frame to obtain difference data can be used. Further, as the difference processing means, a difference value obtaining means for obtaining a difference value for each pixel between the data of the current frame and the data of the immediately preceding frame, and comparing the difference value with a predetermined threshold value A difference value comparing unit that determines difference data, and when the difference value is equal to or smaller than the threshold value, a pixel that has no difference between the current frame and the immediately preceding frame for the pixel is also used. be able to.

【0030】すなわち本発明では、ディザ処理後の画像
データのうちの一部の領域、典型的には、動きのない領
域もしくは背景領域を同一色に塗りつぶすことにより、
ディザ領域の面積を小さくして、符号化後のデータ量を
削減している。特に、塗りつぶし処理を行った後に、現
フレームと前フレームの差分を求めてこの差分データに
よって圧縮符号化を行うことにより、ランダム性のある
データが白ランまたは黒ランの長いデータに転換され、
符号化後のデータ量をさらに削減することが可能にな
る。この場合、差分値としきい値とを比較して比較結果
に応じて差分データを決定するようにすると、フレーム
間で相関が少ないデータでも差分をとることができるよ
うになるとともに、ラン長の長いデータが得られる。さ
らに、ディザ処理を行う前にフレーム間引きを行うこと
によって入力データを削減することにより、符号化後の
データ量を削減することも可能である。
That is, in the present invention, a partial area of the image data after the dither processing, typically, a non-moving area or a background area is painted in the same color.
The area of the dither region is reduced to reduce the amount of data after encoding. In particular, after performing the filling process, by calculating the difference between the current frame and the previous frame and performing compression encoding with this difference data, random data is converted to long white or black run data,
It is possible to further reduce the data amount after encoding. In this case, if the difference data is determined based on the comparison result by comparing the difference value with the threshold value, the difference can be obtained even for data having a small correlation between frames, and the run length is long. Data is obtained. Furthermore, by reducing the input data by performing frame thinning before performing dither processing, it is also possible to reduce the amount of data after encoding.

【0031】[0031]

【発明の実施の形態】次に、本発明の実施の形態につい
て、図面を参照して説明する。
Next, an embodiment of the present invention will be described with reference to the drawings.

【0032】《第1の実施の形態》図1は、本発明の第
1の実施の形態の動画像符号化装置の構成を示すブロッ
ク図である。この動画像符号化装置は、入力画像データ
に対してフレームごとにディザ処理を行うディザ処理手
段11と、ディザ処理が施された画像データ中の動きの
ない領域や背景領域に対して同一色で塗りつぶす処理を
施す塗りつぶし手段12と、塗りつぶし手段12の出力
側に設けられ前フレームデータと現フレームデータとの
差分をとって差分データを取得する差分処理手段13
と、差分処理手段13の出力するデータに対して圧縮処
理を施し符号化データを出力する圧縮処理手段14と、
から構成されている。
<< First Embodiment >> FIG. 1 is a block diagram showing a configuration of a moving picture coding apparatus according to a first embodiment of the present invention. The moving picture coding apparatus includes a dither processing unit 11 for performing dither processing on input image data for each frame, and a same color for a non-moving area and a background area in the dither-processed image data. A filling means 12 for performing a filling process, and a difference processing means 13 provided on the output side of the filling means 12 for obtaining a difference between the previous frame data and the current frame data to obtain difference data
A compression processing unit 14 that performs compression processing on data output by the difference processing unit 13 and outputs encoded data;
It is composed of

【0033】ディザ処理手段11は、複数フレームで構
成される2値または多値の画像データを入力として、誤
差拡散ディザ法、組織的ディザ法もしくは乱数発生ディ
ザ法などを用い、入力画像データの全領域に対してディ
ザ処理を実行し、ディザ処理されたデータを塗りつぶし
手段12に供給する。差分処理手段13は、図2に示す
ように、前フレームのデータを格納する前フレームデー
タ格納手段21と、現フレームのデータと前フレームの
データについて画素ごとに排他的論理和をとるフレーム
間差分処理手段22とから、構成されている。圧縮処理
手段14におけるデータ圧縮、符号化方法としては、圧
縮されるデータが2値または多値の階調を持ったデータ
ということから、ファクシミリ等で使用されているMH
符号化、MR符号化、MMR(Modified MR)符号化、高
速な伸張が行えるスライド辞書型LZ(Lempel-Ziv)符号
化、ランレングス符号化など、さまざまな可逆符号化方
法を用いることができる。
The dither processing means 11 receives the binary or multi-valued image data composed of a plurality of frames and uses an error diffusion dithering method, an organized dithering method or a random number generating dithering method, etc. The dither processing is performed on the area, and the dither-processed data is supplied to the filling means 12. As shown in FIG. 2, the difference processing unit 13 includes a previous frame data storage unit 21 that stores data of the previous frame, and an inter-frame difference that calculates an exclusive OR for each pixel between the data of the current frame and the data of the previous frame. And a processing means 22. As a data compression and encoding method in the compression processing means 14, since the data to be compressed is data having binary or multi-valued gradation, the MH used in facsimile or the like is used.
Various lossless encoding methods such as encoding, MR encoding, MMR (Modified MR) encoding, slide dictionary type LZ (Lempel-Ziv) encoding that can perform high-speed decompression, and run-length encoding can be used.

【0034】次に、この動画像符号化装置の動作につい
て説明する。図3は、この動画像符号化装置での処理を
示すフローチャートであり、図4(a),(b)は、時系列に
隣接する2フレームでの画像データの例を示す図であ
る。図4中、白抜きの領域Aは、動きを持った領域を意
味しており、n番目のフレームからn+1番目のフレー
ムにおいて、右斜め上に移動している。一方、図中の斜
線が付された領域Bは、動きのない領域もしくは背景領
域などを意味している。また、点線は、直前のフレーム
での領域Aの位置を示している。ここでは、図4(a),
(b)に示すような画像データがディザ処理手段11に入
力したとする。
Next, the operation of the moving picture coding apparatus will be described. FIG. 3 is a flowchart showing processing in the moving picture coding apparatus, and FIGS. 4A and 4B are diagrams showing examples of image data in two frames adjacent in time series. In FIG. 4, an outline area A means an area having a motion, and is shifted to the upper right from the nth frame to the (n + 1) th frame. On the other hand, a hatched area B in the figure indicates a static area or a background area. The dotted line indicates the position of the area A in the immediately preceding frame. Here, FIG. 4 (a),
It is assumed that image data as shown in (b) is input to the dither processing means 11.

【0035】まず、画像データの全領域のディザ処理が
行われる(ステップ101)。この処理は、入力される
フレームデータがなくなるまで、フレーム単位で行われ
る(ステップ102)。続いて、ディザ処理されたデー
タが、塗りつぶし処理手段12に入力し、各フレーム単
位で塗りつぶし処理が行われる(ステップ103)。塗
りつぶし処理では、上述したように、動きのない領域や
背景領域などを同一色に塗りつぶす。例えば、ゴルフス
ウィングをしている一連のフレームからなる画像データ
の場合、ゴルフスウィングをしている領域を残し、それ
以外の背景領域の画素の色を同一色に変える。図4でい
うと、ゴルフスウィングの部分が領域Aで、風景などの
背景領域が領域Bとなり、領域Bの部分が同一色に塗り
つぶされる。この塗りつぶし処理は、入力されるデータ
がなくなるまで行われる(ステップ104) 次に、ディザ処理されたままの領城Aと同一色で塗りつ
ぶされた領域Bとからなる画像データが差分処理手段1
3に入力され、差分処理が行われる(ステップ10
5)。ここで、差分処理手段13から出力される差分デ
ータについて説明する。図5は差分処理の概念を示す図
である。まず、1フレーム目を準備し、このデータを前
フレームデータ格納手段21に格納し、2フレーム目の
データを準備する。そして、フレーム間差分処理手段2
2により、同じ画素位置での、前フレームデータ格納手
段21に格納された1フレーム目のデータ(前フレーム
データ)での値と、2フレーム目のデータ(現フレーム
データ)での値との排他的論理和を求め、これを差分デ
ータとする。全ての画素に対して排他的論理和をとる
と、2フレーム目のデータを前フレームデータ格納手段
21に格納し、次のフレームのデータを準備する。そし
て、この差分処理は、入力されるデータがなくなるまで
行われる(ステップ106)。
First, dither processing is performed on the entire area of the image data (step 101). This process is performed on a frame basis until there is no more frame data to be input (step 102). Subsequently, the data subjected to the dither processing is input to the filling processing means 12, and the filling processing is performed for each frame (step 103). In the painting process, as described above, a non-moving area, a background area, and the like are painted in the same color. For example, in the case of image data composed of a series of golf swing frames, the color of the pixels in the background area is changed to the same color while leaving the golf swing area. In FIG. 4, the golf swing portion is the region A, the background region such as landscape is the region B, and the region B portion is painted in the same color. This filling process is performed until there is no more data to be input (step 104). Next, image data composed of the castle area A that has been subjected to the dither processing and the area B that has been filled with the same color is processed by the difference processing unit 1.
3 and a difference process is performed (step 10).
5). Here, the difference data output from the difference processing unit 13 will be described. FIG. 5 is a diagram illustrating the concept of the difference processing. First, the first frame is prepared, this data is stored in the previous frame data storage means 21, and the data of the second frame is prepared. And the inter-frame difference processing means 2
2, the value of the first frame data (previous frame data) stored in the previous frame data storage unit 21 at the same pixel position and the value of the second frame data (current frame data) are excluded. A logical OR is obtained, and this is used as difference data. When the exclusive OR is calculated for all the pixels, the data of the second frame is stored in the previous frame data storage means 21, and the data of the next frame is prepared. This difference processing is performed until there is no more data to be input (step 106).

【0036】そして、差分処理手段13から供給される
データ(差分データ)を圧縮処理手段14に入力して圧
縮処理を行う(ステップ107)。圧縮処理は、データ
がなくなるまで行われる(ステップ108)。以上の処
理を行うことによって、入力動画像データの符号化が行
われたことになる。
Then, the data (difference data) supplied from the difference processing means 13 is input to the compression processing means 14 to perform compression processing (step 107). The compression process is performed until there is no more data (step 108). By performing the above processing, the input moving image data has been encoded.

【0037】以上説明したようにこの第1の実施の形態
では、ディザ処理したデータにおいて動きのない領域も
しくは背景領域を同一色で塗りつぶすことにより、符号
化効率が向上し、動画像データの符号化後のデータ量を
少なくすることができる。
As described above, in the first embodiment, the coding efficiency is improved by painting the non-moving area or the background area in the dithered data with the same color, thereby improving the coding efficiency of the moving image data. The amount of subsequent data can be reduced.

【0038】《第2の実施の形態》上述の第1の実施の
形態によれば、符号量の少ない動画像符号化を行うこと
ができるが、さらにデータ量を少なくするためには、入
力データの間引きを行えばよい。図6は、データの間引
きを行うようにした動画像符号化装置を示している。
<< Second Embodiment >> According to the above-described first embodiment, it is possible to perform video coding with a small code amount. What is necessary is just to thin out. FIG. 6 shows a moving picture coding apparatus that performs data thinning.

【0039】この動画像符号化装置は、図1に示す動画
像符号化装置の入力端に、動画像データの間引き処理を
行う間引き処理手段15を付加した構成となっている。
This moving picture coding apparatus has a configuration in which a thinning processing means 15 for performing a thinning processing of moving picture data is added to the input terminal of the moving picture coding apparatus shown in FIG.

【0040】まず、動画像データの間引き処理について
説明する。図7は間引き処理を説明するための図であ
る。図のように時系列に連続した画像データ41がフレ
ーム単位に並んでいると、間引き処理手段15は、斜線
が付されたフレームの画像データを削除する。これによ
り、入力する動画像データのデータ量が1/2に削減さ
れる。
First, the thinning processing of moving image data will be described. FIG. 7 is a diagram for explaining the thinning processing. As shown in the figure, when the image data 41 that is continuous in time series is arranged in frame units, the thinning processing unit 15 deletes the image data of the hatched frame. Thereby, the data amount of the input moving image data is reduced to half.

【0041】次に、この動画像符号化装置の動作につい
て、図8を用いて説明する。
Next, the operation of the moving picture coding apparatus will be described with reference to FIG.

【0042】入力した動画像データは、まず、間引き処
理手段15に入力し、ここで間引き処理が行われてデー
タ量が削減される(ステップ111)。この間引き処理
は、データがなくなるまで行われる(ステップ11
2)。間引きされたデータは、ディザ処理手段11に入
力し、フレーム内のすべての領域に対して、ディザ処理
(ステップ113)が、データがなくなるまで行われる
(ステップ114)。続いて、ディザ処理されたデータ
は塗りつぶし処理手段12に入力し、塗りつぶし処理に
より、動きのない領域や背景領域が同一色に塗りつぶさ
れる(ステップ115)。塗りつぶし処理はデータがな
くなるまで行われる(ステップ116)。
The input moving image data is first input to the thinning processing means 15, where the thinning processing is performed to reduce the data amount (step 111). This thinning process is performed until there is no more data (step 11).
2). The thinned data is input to the dither processing means 11, and dither processing (step 113) is performed on all areas in the frame until there is no more data (step 114). Subsequently, the data subjected to the dither processing is input to the filling processing means 12, and the area with no motion and the background area are filled with the same color by the filling processing (step 115). The painting process is performed until there is no more data (step 116).

【0043】ところで、本実施の形態では、間引き処理
を行っているので、フレーム間での相関がなくなり、差
分処理を行うことによりデータ量が増えることがある。
そこで、塗りつぶし処理の実行後、まず、差分処理を実
行するかどうかの判定を行う(ステップ117)。間引
きされるデータが多く、フレーム間での相関がなくなる
場合には、差分処理を行わずにステップ120に移行
し、そうでない場合には、差分処理を行う(ステップ1
18)。差分処理では、塗りつぶし処理されたデータが
差分処理手段13に入力する。差分処理はデータがなく
なるまで行われ(ステップ119)、その後、ステップ
120に移行する。
In the present embodiment, since the thinning process is performed, the correlation between the frames is lost, and the data amount may be increased by performing the difference process.
Therefore, after executing the filling process, first, it is determined whether or not to execute the difference process (step 117). If there is much data to be thinned out and the correlation between the frames is lost, the process proceeds to step 120 without performing the difference processing, otherwise, the difference processing is performed (step 1).
18). In the difference processing, the data subjected to the filling processing is input to the difference processing unit 13. The difference processing is performed until there is no more data (step 119), and then the process proceeds to step 120.

【0044】ステップ120では、データが圧縮処理手
段14に入力して圧縮処理が行われる。圧縮処理はデー
タがなくなるまで行われ(ステップ121)、その後、
処理を終了する。
In step 120, the data is input to the compression processing means 14 and compression processing is performed. The compression process is performed until there is no more data (step 121).
The process ends.

【0045】以上説明したようにこの第2の実施の形態
では、ディザ処理を実施する前に間引き処理を行い、デ
ィザ処理したデータ中の動きのない領域もしくは背景領
域を塗りつぶしてデータ量を削減し、データの性質に応
じて差分処理を行ってから圧縮処理を行うことにより、
動画像データの符号化後のデータ量をさらに少なくして
いる。
As described above, in the second embodiment, the thinning processing is performed before the dither processing is performed, and the area without motion or the background area in the dither-processed data is painted to reduce the data amount. By performing difference processing according to the nature of the data and then performing compression processing,
The data amount of the moving image data after encoding is further reduced.

【0046】《第3の実施の形態》上述の第1の実施の
形態及び第2の実施の形態では、差分処理手段13での
差分処理が、図5に示すように、同じ表示位置での画素
値の排他的論理和を求めて差分データとする処理であっ
た。しかし、間引き処理を行ったデータやディザ処理し
たデータなどフレーム間での相関が少ない場合には、排
他的論理和による差分処理では、データ量の削減が不十
分な場合がある。そこで、この第3の実施の形態では、
同じ表示位置の画素の色データの差分をとるようにし
た。
<< Third Embodiment >> In the above-described first and second embodiments, the difference processing by the difference processing means 13 is performed at the same display position as shown in FIG. This is a process in which exclusive OR of pixel values is calculated to be difference data. However, when there is little correlation between frames such as thinned data or dithered data, difference processing using exclusive OR may not sufficiently reduce the data amount. Therefore, in the third embodiment,
The difference between the color data of the pixels at the same display position is calculated.

【0047】すなわちこの第3の実施の形態の動画像符
号化装置では、図1及び図6にそれぞれ記載された第1
の実施の形態及び第2の実施の形態の動画像符号化装置
において、差分処理手段13の代りに、図9に示す構成
の差分処理手段20を使用する。この差分処理手段20
は、前フレームのフレームデータを格納する前フレーム
データ格納手段21と、同じ表示位置の画素での前フレ
ームの色データと現フレームの色データの差分値(絶対
値)を取得する差分値取得手段23と、所定のしきい値
が予め入力されてこれを保持するしきい値入力手段24
と、差分値取得手段23で取得した差分値としきい値入
力手段24に保持されているしきい値とを比較し、差分
値の方が小さければ“0”を、そうでなければ“1”を
差分データとして圧縮処理手段14に出力する差分値比
較手段25と、から構成されている。
That is, in the moving picture coding apparatus according to the third embodiment, the first moving picture coding apparatus shown in FIGS.
In the moving picture coding apparatus according to the present embodiment and the moving picture coding apparatus according to the second embodiment, a difference processing means 20 having a configuration shown in FIG. This difference processing means 20
Is a previous frame data storage unit 21 for storing the frame data of the previous frame, and a difference value obtaining unit for obtaining a difference value (absolute value) between the color data of the previous frame and the color data of the current frame at the pixel at the same display position. 23, and a threshold input means 24 for inputting and holding a predetermined threshold in advance
And the difference value acquired by the difference value acquiring means 23 and the threshold value held in the threshold value input means 24. If the difference value is smaller, “0” is set. Otherwise, “1” is set. Is output to the compression processing means 14 as differential data.

【0048】以下、差分値取得手段23による差分値の
取得を図10を用いて説明する。図10は、画像データ
の1フレーム分のRGBデータ(R:赤、G:緑、B:
青)を示しており、1つのフレームは、Rデータのプレ
ーン51、Gデータのプレーン52及びBデータのプレ
ーン53に分解することができ、各色のデータは画素当
り、それぞれ1ビットで表わされるものとする。差分値
の取得は、Rデータ、Gデータ、Bデータの3ビットを
単位として処理される。今、1つ前のフレームのRGB
データが、例えば、[R,G,B]=[1,1,0]、現フ
レームでのRGBデータが、例えば、[R,G,B]=
[1,1,1]であるとすると、差分値は1となる。この
ようにして求められた差分値は、差分値比較手段25に
おいてしきい値と比較され、その結果、差分データが出
力する。
Hereinafter, the acquisition of the difference value by the difference value acquiring means 23 will be described with reference to FIG. FIG. 10 shows one frame of RGB data of image data (R: red, G: green, B:
Blue), one frame can be decomposed into a plane 51 of R data, a plane 52 of G data, and a plane 53 of B data, and each color data is represented by one bit per pixel. And The acquisition of the difference value is processed in units of three bits of R data, G data, and B data. Now the previous frame's RGB
The data is, for example, [R, G, B] = [1,1,0], and the RGB data in the current frame is, for example, [R, G, B] =
If it is [1,1,1], the difference value is 1. The difference value thus obtained is compared with a threshold value by the difference value comparison means 25, and as a result, difference data is output.

【0049】以上説明したように本実施の形態では、色
データの基づいて差分値を求めた上で差分値としきい値
を比較して差分データを生成しているので、フレームデ
ータ中の変化の少ないデータが省略されることになっ
て、圧縮処理での符号化効率がさらに向上する。
As described above, in the present embodiment, the difference value is obtained based on the color data, and the difference value is compared with the threshold value to generate the difference data. Since a small amount of data is omitted, the encoding efficiency in the compression processing is further improved.

【0050】[0050]

【発明の効果】以上説明したように本発明は、ディザ処
理後の画像データのうちの一部の領域、典型的には、動
きのない領域もしくは背景領域を同一色に塗りつぶすこ
とにより、ディザデータの領域の面積が小さくなって、
符号化後のデータ量が削減し、符号化効率が向上すると
いう効果がある。
As described above, according to the present invention, a part of the image data after the dither processing, typically, a non-moving area or a background area is painted in the same color to obtain the dither data. The area of the area becomes smaller,
This has the effect of reducing the amount of data after encoding and improving encoding efficiency.

【0051】また、塗りつぶし後に差分処理を行うこと
によって、ランダム性のあるデータがラン長の長いデー
タに転換されることとなり、符号化後のデータ量がさら
に削減する。差分値としきい値とを比較して差分データ
を決めるようにした場合には、フレーム間で相関が少な
いデータに対しても差分処理の効果が表れるとともに、
フレームデータ間での変化の少ない部分のデータが省略
されることになって、圧縮処理での符号化効率がさらに
向上する。さらに、ディザ処理を行う前にフレーム間引
きを行うことによって、符号化の対象となるデータの量
が削減される。
Further, by performing the difference processing after painting, data having randomness is converted to data having a long run length, and the data amount after encoding is further reduced. When the difference data is determined by comparing the difference value with the threshold value, the effect of the difference processing is exhibited even for data having a small correlation between the frames,
Since the data of the portion where there is little change between the frame data is omitted, the encoding efficiency in the compression processing is further improved. Furthermore, by performing frame thinning before performing dither processing, the amount of data to be encoded is reduced.

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

【図1】本発明の第1の実施の形態の動画像符号化装置
の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a video encoding device according to a first embodiment of the present invention.

【図2】差分処理手段の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a difference processing unit.

【図3】図1の動画像符号化装置の処理を示すフローチ
ャートである。
FIG. 3 is a flowchart showing a process of the moving picture encoding device of FIG. 1;

【図4】(a),(b)は、塗りつぶし処理を説明するための
図である。
FIGS. 4A and 4B are diagrams for explaining a filling process;

【図5】差分処理の概念を説明する図である。FIG. 5 is a diagram illustrating the concept of a difference process.

【図6】本発明の第2の実施の形態の動画像符号化装置
の構成を示すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of a video encoding device according to a second embodiment of the present invention.

【図7】間引き処理を説明するための図である。FIG. 7 is a diagram illustrating a thinning process.

【図8】図6の動画像符号化装置の処理を示すフローチ
ャートである。
FIG. 8 is a flowchart showing a process of the moving picture encoding device of FIG. 6;

【図9】第3の実施の形態の動画像符号化装置での差分
処理手段の構成を示すブロック図である。
FIG. 9 is a block diagram illustrating a configuration of a difference processing unit in the video encoding device according to the third embodiment.

【図10】第3の実施の形態での差分処理を説明するた
めの図である。
FIG. 10 is a diagram illustrating a difference process according to the third embodiment.

【図11】ディザ法による中間調画像の符号化を行う従
来の符号化装置の構成の一例を示す図である。
FIG. 11 is a diagram illustrating an example of a configuration of a conventional encoding device that encodes a halftone image by a dither method.

【図12】Bayer型のディザマトリクスを示す図で
ある。
FIG. 12 is a diagram illustrating a Bayer-type dither matrix.

【図13】(a)〜(c)は、ディザ処理後の2値パターンの
例を示す図である。
FIGS. 13A to 13C are diagrams illustrating examples of binary patterns after dither processing.

【図14】(a),(b)は差分パターンの例を示す図であ
る。
FIGS. 14A and 14B are diagrams showing examples of difference patterns.

【図15】(a)は一致時のデータを示す図、(b)は不一致
時のデータを示す図、(c)は不一致箇所アドレスとマト
リクスとの対応を示す図である。
15A is a diagram showing data at the time of coincidence, FIG. 15B is a diagram showing data at the time of non-coincidence, and FIG. 15C is a diagram showing a correspondence between a non-coincidence location address and a matrix.

【図16】従来の連続画像時系列処理システムを示すブ
ロック図である。
FIG. 16 is a block diagram showing a conventional continuous image time series processing system.

【図17】連続画像圧縮部の構成を示すブロック図であ
る。
FIG. 17 is a block diagram illustrating a configuration of a continuous image compression unit.

【図18】第1のフレームメモリ及び第2のフレームメ
モリと色データメモリと表示時間データメモリのアドレ
スの相対関係を示す概念図である。
FIG. 18 is a conceptual diagram showing a relative relationship among addresses of a first frame memory and a second frame memory, a color data memory, and a display time data memory.

【図19】時系列方向ランレングス符号化を行うための
手順を示したフローチャートである。
FIG. 19 is a flowchart showing a procedure for performing time-series direction run-length encoding.

【図20】(a)は初期化処理を示すフローチャート、(b)
は出力制御回路による出力処理を示すフローチャートで
ある。
FIG. 20A is a flowchart illustrating an initialization process, and FIG.
5 is a flowchart showing output processing by the output control circuit.

【図21】記憶メディアに記憶されるデータのデータ構
造を示した図であり、(a)は第1フレーム、(b)は第2フ
レームを示している。
FIGS. 21A and 21B are diagrams showing a data structure of data stored in a storage medium, wherein FIG. 21A shows a first frame and FIG. 21B shows a second frame.

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

11 ディザ処理手段 12 塗りつぶし処理手段 13,20 差分処理手段 14 圧縮処理手段 15 間引き処理手段 21 前フレームデータ格納手段 22 フレーム間差分処理手段 23 差分値取得手段 24 しきい値入力手段 25 差分値比較手段 REFERENCE SIGNS LIST 11 dither processing means 12 fill processing means 13, 20 difference processing means 14 compression processing means 15 thinning processing means 21 previous frame data storage means 22 inter-frame difference processing means 23 difference value acquisition means 24 threshold value input means 25 difference value comparison means

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のフレームで構成される動画像デー
タを符号化する動画像符号化方法において、 前記動画像データにディザ処理を施こすディザ処理工程
と、 前記ディザ処理が施された動画像データに対してその一
部の領域を同一色で塗りつぶす塗りつぶし処理工程と、 前記塗りつぶし処理工程を経た動画像データに対して圧
縮符号化を行う圧縮処理工程と、を有することを特徴と
する動画像符号化方法。
1. A moving image encoding method for encoding moving image data composed of a plurality of frames, comprising: a dither processing step of performing dither processing on the moving image data; and a moving image subjected to the dither processing. A moving image characterized by comprising: a filling processing step of filling a partial area of the data with the same color; and a compression processing step of performing compression encoding on moving image data that has passed through the filling processing step. Encoding method.
【請求項2】 前記塗りつぶし処理工程の実施後に、現
フレームの動画像データと前フレームの動画像データと
の差分データを求める差分処理工程を有し、前記圧縮処
理工程は前記差分データに基づいて圧縮符号化を行う、
請求項1に記載の動画像符号化方法。
2. The method according to claim 1, further comprising a difference processing step of obtaining difference data between the moving image data of the current frame and the moving image data of the previous frame after performing the filling processing step, wherein the compression processing step is performed based on the difference data. Perform compression encoding,
The moving picture coding method according to claim 1.
【請求項3】 複数のフレームで構成される動画像デー
タを符号化する動画像符号化装置において、 前記動画像データをディザ処理を施すディザ処理手段
と、 前記ディザ処理手段が出力したデータにおける一部の領
域を同一色で塗りつぶす塗りつぶし処理手段と、 前記塗りつぶし処理手段が出力したデータに基づいて圧
縮符号化を行う圧縮処理手段と、を有することを特徴と
する動画像符号化装置
3. A moving picture coding apparatus for coding moving picture data composed of a plurality of frames, comprising: a dither processing means for dithering the moving picture data; and one of data output by the dither processing means. A moving image encoding apparatus comprising: a filling processing unit that fills a region of a part with the same color; and a compression processing unit that performs compression encoding based on data output by the filling processing unit.
【請求項4】 前記ディザ処理手段に入力する動画像デ
ータをフレーム間引きする間引き処理手段を有する請求
項3に記載の動画像符号化装置
4. The moving picture coding apparatus according to claim 3, further comprising a thinning-out processing means for thinning out frames of the moving image data input to said dither processing means.
【請求項5】 現フレームの動画像データと前フレーム
の動画像データとの差分データを求める差分処理手段が
前記塗りつぶし手段の出力側に設けられ、前記差分デー
タが前記圧縮処理手段に入力して符号化される請求項3
または4に記載の動画像符号化装置。
5. A difference processing means for obtaining difference data between moving image data of a current frame and moving image data of a previous frame is provided on an output side of the painting means, and the difference data is inputted to the compression processing means. Claim 3 to be encoded
Or the moving image encoding device according to 4.
【請求項6】 前記差分処理手段が、現フレームのデー
タと直前のフレームのデータとの画素ごとの差分値を取
得する差分値取得手段と、前記差分値と予め定められた
しきい値とを比較して差分データを決定する差分値比較
手段とを有し、前記差分値が前記しきい値以下である場
合には当該画素について現フレームと直前のフレームと
の間に差がなかったものとする、請求項5に記載の動画
像符号化装置。
6. A difference value acquiring means for acquiring a difference value for each pixel between data of a current frame and data of a previous frame, and a difference value acquiring means for acquiring the difference value and a predetermined threshold value. And a difference value comparing means for comparing to determine difference data, wherein when the difference value is equal to or less than the threshold value, there is no difference between the current frame and the immediately preceding frame for the pixel. The moving picture encoding apparatus according to claim 5, wherein
JP30883695A 1995-11-28 1995-11-28 Video coding method and apparatus Expired - Lifetime JP2798025B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30883695A JP2798025B2 (en) 1995-11-28 1995-11-28 Video coding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30883695A JP2798025B2 (en) 1995-11-28 1995-11-28 Video coding method and apparatus

Publications (2)

Publication Number Publication Date
JPH09154139A JPH09154139A (en) 1997-06-10
JP2798025B2 true JP2798025B2 (en) 1998-09-17

Family

ID=17985876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30883695A Expired - Lifetime JP2798025B2 (en) 1995-11-28 1995-11-28 Video coding method and apparatus

Country Status (1)

Country Link
JP (1) JP2798025B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9560371B2 (en) * 2003-07-30 2017-01-31 Avocent Corporation Video compression system

Also Published As

Publication number Publication date
JPH09154139A (en) 1997-06-10

Similar Documents

Publication Publication Date Title
JP2861890B2 (en) Color image display
US6771830B2 (en) Differential pulse code modulation image compression with varying levels of quantizers
JP2968582B2 (en) Method and apparatus for processing digital data
JP2656897B2 (en) Image data compression and decompression device
JPH07226934A (en) Picture edge detector for picture compression system by segmentation, digital data compressor, coded picture generator and picture element storage memory
JPH11161782A (en) Method and device for encoding color picture, and method and device for decoding color picture
JP2006014341A (en) Method and apparatus for storing image data using mcu buffer
US4853971A (en) Method and apparatus for processing image data
US9286698B2 (en) Method and device for storing a compression ratio indication in a pixel value buffer in tile encoding
JPS61228794A (en) Time-base compression system, decompressor and display unit
JPS62232689A (en) Display of part of image selected by operator
CN112118449A (en) Method and device for compressing and decompressing image
US5999112A (en) Data compression apparatus and method, data expansion apparatus and method, and recording medium
US7154420B2 (en) Image coding apparatus and method thereof and coded image decoding apparatus and method thereof
US6873738B2 (en) Hierarchical image processor for encoding or decoding, and memory on the same chip
JP2798025B2 (en) Video coding method and apparatus
JPH11308465A (en) Encoding method for color image, encoder therefor, decoding method for color image and decoder therefor
US6556209B2 (en) Memory apparatus of digital video signal
CA2058363C (en) Method for decoding compressed images
JP4364729B2 (en) Image data compression / decompression method and image processing apparatus
JP3193285B2 (en) Coding noise reduction filter circuit
JPH1130978A (en) Color image encoding method and its encoder and color image decoding method and its decoder
JPH07170410A (en) Color image data compression method
JPH0396071A (en) Dither image data compression system
JPH10200715A (en) Picture data storage method/device

Legal Events

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

Free format text: PAYMENT UNTIL: 20070703

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080703

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090703

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100703

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110703

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20110703

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20130703

Year of fee payment: 15

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

Free format text: PAYMENT UNTIL: 20130703

Year of fee payment: 15

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term