JP2001101427A - Image compressing method, image compressing device, image expanding device and recording medium - Google Patents

Image compressing method, image compressing device, image expanding device and recording medium

Info

Publication number
JP2001101427A
JP2001101427A JP27951099A JP27951099A JP2001101427A JP 2001101427 A JP2001101427 A JP 2001101427A JP 27951099 A JP27951099 A JP 27951099A JP 27951099 A JP27951099 A JP 27951099A JP 2001101427 A JP2001101427 A JP 2001101427A
Authority
JP
Japan
Prior art keywords
image
layer
compression
file
shape
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.)
Pending
Application number
JP27951099A
Other languages
Japanese (ja)
Inventor
Kazuo Hikawa
和生 飛河
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP27951099A priority Critical patent/JP2001101427A/en
Publication of JP2001101427A publication Critical patent/JP2001101427A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce a file size after compression without damaging the quality of an image being a source image. SOLUTION: An image file 1 is separated into a layer 3 expressing the area and shape of an image, a layer 4 expressing the line and painting-out part of the image and a layer 4 replacing the line and the painting-out part with the same color as that of a proximate part, then an optimal compressing method is applied to each of layers.

Description

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

【発明の属する技術分野】本発明は、マンガやアニメー
ション等の比較的使用する色数が限られた画像を圧縮す
るための画像圧縮方法、画像圧縮装置、画像伸長装置、
記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image compression method, an image compression apparatus, an image decompression apparatus for compressing an image having a relatively limited number of colors, such as a manga or an animation.
It relates to a recording medium.

【従来の技術】近年、雑誌や単行本等の紙媒体によって
頒布していた漫画や、アニメーションの画像及び音声等
をインターネット等のネットワークを通じて配信するこ
とが行われている。漫画の画像データやアニメーション
のように動きのある動画像データは非常に多くの画像か
ら成り立っており、各画像の情報をそのままの形で配信
しようとすると、非常に膨大なデータ容量が必要とな
る。従って、これらの画像データを、なるべく情報量を
落とさないように圧縮する画像圧縮方法、画像圧縮装
置、そしてこのように圧縮された画像を伸長する伸長装
置、このように圧縮された画像を記録する記録媒体が提
案されている。図6は、漫画やアニメーションのコンテ
ンツを配信するシステムを示すブロック図である。同図
によれば、漫画やアニメーションの原画をスキャナ等で
取り込む原画スキャン工程、取り込んだ原画を修正する
レタッチ工程、レタッチの終了した原画に必要に応じて
色付けを行う色付け工程が行われる。その後、これを電
子データとして配信するために、編集作業であるオーサ
リング工程と所望のファイル形式に変換するフォーマッ
タ工程を経て、漫画やアニメーションの画像ファイルを
集めた完パケファイルが生成される。この完パケファイ
ルは必要に応じて、CD−ROM等の記録媒体に記録し
たり、インターネット等のネットワークを通じて配信す
るためにサーバに記憶したりする。サーバでは、これら
の完パケファイルをユーザー側の再生環境や通信環境に
応じてユーザー側に最適な条件で配信できるように、フ
ァイルビルダーによって配信用のファイルを作成し、配
信ソフトによって、各端末に配信されることとなる。ユ
ーザ側では、インターネット等のネットワークを通じ
て、パソコン内の再生用のアプリケーションやインター
ネットのブラウザに付加するプラグインソフト、専用の
マルチメディアプレーヤ等によって所望の漫画やアニメ
ーションの画像を再生する。また、このような画像に合
わせて、画像のエフェクト効果やセリフ、BGMなどの
音声が付加される場合もある。このようなシステムで
は、一般公衆回線などのユーザ側での低い転送レート環
境下でも実用に耐えうる画像圧縮方式として、従来から
JPEGやGIF等のビットマップ形式で圧縮を行う方
法や、ベクトルグラフィックスなどの様々な画像圧縮方
法が提案されている。しかし、このようなシステムで
は、配信されるコンテンツの画質やファイルサイズにお
いて、十分に満足できる品質や圧縮性能を持ち、かつ、
これらのコンテンツに最適化された圧縮方式が存在しな
かった。特に、配信されるコンテンツのファイルサイズ
において、上述した圧縮方式を用いて漫画やアニメーシ
ョンの1話分の画像圧縮を行った場合、そのファイルサ
イズは膨大なものとなり、配信を考慮したものとはいえ
なかった。また、これらのファイルを記憶するサーバ側
で必要なファイルサイズもコンテンツのタイトル数が増
えるに従って膨大なものとなり、対応が困難であった。
例えば、JPEGによる画像圧縮方式の場合、これは変
換ロスを含む方式であり、圧縮時に多くの情報が失われ
てしまう。また、ロスレス・コーディングであるGIF
やPNGは、パレット化された色テーブルを用いるた
め、画像で用いられている色の構成の一貫性に大きく依
存してしまう。つまり、漫画等の配信では、各コマ毎
に、次々と同じ画面に表示を行うため、コマ単位で画像
を圧縮エンコードするときに、1ページに複数のコマを
同時に表示すると、各コマで用いる色に制限が出てしま
う。また、ベクトルグラフィックスによる画像圧縮方式
の場合、適切に使用すれば、ある程度ファイルサイズも
小さくなり、しかも幅広い解像度を持った状態で画像を
レンダリングできる。しかし、事前にアートワークがベ
クトルフォーマットによって描かれていない場合、ベク
トルフォーマットに変換するためには、熟練したアーチ
ストや技術者によって手動で作業しなければならないた
め、効率が非常に悪い。また、時によって必要とされる
大幅な変更を行わずに、ベクトル・アートワークを用い
て、アートワークの複雑で微妙な詳細部分を正確にレン
ダリングするのは困難である。これらのプロセスを自動
的に行うツールがあるものの、追加の手修正を行わずに
十分な品質が得られることはなかった。上述したJPE
G方式のような、DCT(離散コサイン変換)を用いた
圧縮のアルゴリズムは、画像イメージを小さなブロック
に分け、冗長な情報や細かすぎて不要な情報を取り除
き、前述した小さく分けられたブロック毎に、元とは異
なる色空間へと画像情報を変換するものである。また、
DCTに基づく圧縮アルゴリズムは、主に写真のような
自然画を最適に圧縮することを目的としているので、こ
れらの圧縮コンバータは、高い圧縮率を得ようとする場
合に、様々なブロックにまたがる微妙な部分について、
ある程度の選択をしながら切り捨てている。更に、各ブ
ロック内であっても、細かい部分が不鮮明になったり、
圧縮の課程で完全に情報が失われてしまうことがあるた
め、これらの圧縮方式はロスのある圧縮方式であるとい
える。一方、ランレングス・コーディングと呼ばれる圧
縮方式があるが、これは原画像の詳細情報を残しなが
ら、様々な色深度に対応し、更に、TRANSPARE
NCY情報や、コントロール情報も記述できるものであ
る。しかし、ランレングス・コーディングによる圧縮方
式では、圧縮率が原画像に含まれる色の一貫性に大きく
依存してしまうため、原画像が複雑になるにつれ、ファ
イルサイズが増大してしまう。また、GIFのようなS
tring Keyに基づいた圧縮方式では、ランレン
グス・コーディングと同様な不具合があるが、複雑な画
像もある程度は圧縮可能である。しかし、この圧縮方式
ではより多くのCPUのパワーを必要としてしまってい
た。
2. Description of the Related Art In recent years, comics, animation images, sounds, and the like, which have been distributed on paper media such as magazines and books, have been distributed through networks such as the Internet. Moving image data such as manga image data and animation is composed of a very large number of images, and if you try to distribute the information of each image as it is, a very large data capacity will be required . Therefore, an image compression method and an image compression device for compressing such image data so as not to reduce the amount of information as much as possible, an expansion device for expanding the image thus compressed, and recording the image thus compressed Recording media have been proposed. FIG. 6 is a block diagram showing a system for distributing cartoon or animation contents. According to the figure, an original image scanning step of taking in an original image of a manga or animation by a scanner or the like, a retouching step of correcting the taken-in original image, and a coloring step of coloring the retouched original image as necessary are performed. After that, in order to distribute the data as electronic data, a complete package file including a collection of cartoon or animation image files is generated through an authoring process, which is an editing operation, and a formatter process, which converts the file into a desired file format. This complete packet file is recorded on a recording medium such as a CD-ROM or stored in a server for distribution through a network such as the Internet, as necessary. The server creates a file for distribution using a file builder and distributes it to each terminal using distribution software so that these complete packet files can be distributed to the user under optimal conditions according to the user's playback environment and communication environment. Will be delivered. On the user side, through a network such as the Internet, a desired cartoon or animation image is reproduced by a reproduction application in a personal computer, plug-in software added to an Internet browser, a dedicated multimedia player, or the like. In addition, sound such as effect effects of the image, dialogue, BGM, etc. may be added in accordance with such an image. In such a system, as an image compression method that can be put to practical use even in a low transfer rate environment on the user side such as a general public line, a method of conventionally performing compression in a bitmap format such as JPEG or GIF, a vector graphics method, or the like. Various image compression methods have been proposed. However, such a system has sufficiently satisfactory quality and compression performance in the image quality and file size of the distributed content, and
There was no compression scheme optimized for these contents. In particular, when the image size of one episode of a manga or animation is compressed using the above-described compression method with respect to the file size of the content to be distributed, the file size becomes enormous, and although the distribution is taken into consideration. Did not. Further, the file size required on the server side for storing these files also becomes enormous as the number of content titles increases, and it is difficult to cope with them.
For example, in the case of an image compression method based on JPEG, this is a method including a conversion loss, and much information is lost at the time of compression. Also, GIF which is lossless coding
Since PNG and PNG use a palletized color table, they greatly depend on the consistency of the color configuration used in the image. In other words, in the distribution of comics and the like, each frame is displayed on the same screen one after another. Therefore, when compressing and encoding an image in units of frames, if a plurality of frames are simultaneously displayed on one page, the color used in each frame is changed. Is limited. In the case of an image compression method using vector graphics, if used properly, the file size can be reduced to some extent and an image can be rendered with a wide range of resolutions. However, if the artwork was not previously drawn in vector format, conversion to vector format would have to be done manually by a skilled artist or technician, which is very inefficient. Also, it is difficult to accurately render complex and subtle details of the artwork using vector artwork without making the necessary significant changes from time to time. Although there are tools to automate these processes, they have not been of sufficient quality without additional manual modifications. JPE mentioned above
A compression algorithm using DCT (Discrete Cosine Transform), such as the G method, divides an image into small blocks, removes redundant information or information that is too fine and unnecessary, and performs a process for each of the small blocks described above. , For converting image information into a color space different from the original color space. Also,
Since compression algorithms based on DCT are primarily aimed at optimally compressing natural images such as photographs, these compression converters require subtle differences over various blocks when trying to achieve high compression ratios. About the part
They are truncating with some choice. Furthermore, even within each block, small parts are blurred,
Since information may be completely lost during the compression process, it can be said that these compression methods are lossy compression methods. On the other hand, there is a compression method called run-length coding, which supports various color depths while retaining detailed information of the original image.
NCY information and control information can also be described. However, in the compression method based on run-length coding, the compression ratio greatly depends on the consistency of the colors included in the original image, so that the file size increases as the original image becomes more complicated. Also, S like GIF
The compression method based on the string key has a problem similar to that of the run-length coding, but can compress a complicated image to some extent. However, this compression method requires more CPU power.

【発明が解決しようとする課題】以上のように、従来の
配信システムにおいて、一般公衆回線等のユーザー側で
の低い転送レート環境下でも実用に耐えうる画像圧縮方
式として、従来のJPEGやGIF等のビットマップ方
式による圧縮方式や、ベクトルグラフィックス等の様々
な画像圧縮方法が提案されているが、これらの画像圧縮
方法ではコンテンツの画質やファイルサイズにおいて、
十分に満足できる品質や圧縮性能を持ち、且つ、これら
のコンテンツに最適化された画像圧縮方法が存在しなか
った。特に、配信するためのファイルが、漫画やアニメ
ーションの1話分の分量であるとすると、これら従来の
画像圧縮方法を用いて圧縮したコンテンツの配信は、フ
ァイルサイズの面から見てとても実用的なものではなか
った。また、サーバ側で必要な記憶ファイルサイズもタ
イトル数が増えるに従って膨大なものとなってしまって
いた。
As described above, in the conventional distribution system, a conventional JPEG, GIF, or the like is used as an image compression method that can be practically used even under a low transfer rate environment on the user side such as a general public line. Various image compression methods such as a compression method using a bitmap method and vector graphics have been proposed.
There has been no image compression method that has sufficiently satisfactory quality and compression performance and is optimized for these contents. In particular, assuming that the file to be distributed is the size of one episode of a manga or animation, the distribution of content compressed using these conventional image compression methods is very practical from the viewpoint of file size. It was not something. Also, the storage file size required on the server side has become enormous as the number of titles increases.

【課題を解決するための手段】上述した課題を解決する
ために、画像ファイル1を、画像の領域及び形状を表す
透過層3と、画像の線及び塗りつぶし部分を表すマスク
層4と、前記線及び塗りつぶし部分をこれに近接した部
分の色と同じ色で置き換えた形状層5とに分離し、前記
それぞれの層に最適な圧縮方法を適用することを特徴と
する画像圧縮方法を提供するものである。また、画像フ
ァイル1を、画像の領域及び形状を表す透過層3と、画
像の線及び塗りつぶし部分を表すマスク層4と、前記線
及び塗りつぶし部分をこれに近接した部分の色と同じ色
で置き換えた形状層5とに分離する階層分離部2と、前
記透過層3に最適化された圧縮アルゴリズムに基づいて
前記透過層3を圧縮する第1の圧縮エンコーダ6と、前
記マスク層4に最適化された圧縮アルゴリズムに基づい
て前記マスク層4を圧縮する第2の圧縮エンコーダ7
と、前記形状層5に最適化された圧縮アルゴリズムに基
づいて前記形状層5を圧縮する第3の圧縮エンコーダ8
と、前記第1の圧縮エンコーダ6乃至前記第3の圧縮エ
ンコーダ8から出力された圧縮ファイルを合成する圧縮
ファイル合成手段9とを有する画像圧縮装置を提供する
ものである。更に、圧縮された画像ファイル10を、画
像の領域及び形状を表す透過層3と、画像の線及び塗り
つぶし部分を表すマスク層4と、前記線及び塗りつぶし
部分をこれに近接した部分の色と同じ色で置き換えた形
状層5とに分離するファイル分離手段12と、前記透過
層3に最適化された圧縮アルゴリズムに基づいて伸長を
行う第1の伸長デコーダ13と、前記マスク層4に最適
化された圧縮アルゴリズムに基づいて伸長を行う第2の
伸長デコーダ14と、前記形状層5に最適化された圧縮
アルゴリズムに基づいて伸長を行う第3の伸長デコーダ
15と、前記第1の伸長デコーダ13乃至前記第3の伸
長デコーダ15から出力された画像を合成する画像合成
手段19とを有する画像伸長装置を提供するものであ
る。また更に、画像ファイル1を、画像の領域及び形状
を表す透過層3と、画像の線及び塗りつぶし部分を表す
マスク層4と、前記線及び塗りつぶし部分をこれに近接
した部分の色と同じ色で置き換えた形状層5とに分離
し、前記それぞれの層に最適な圧縮方法を適用して圧縮
した圧縮ファイル10を記録することを特徴とする記録
媒体。
In order to solve the above-mentioned problems, an image file 1 is divided into a transparent layer 3 representing an area and a shape of an image, a mask layer 4 representing a line and a filled portion of the image, and And an image compression method characterized in that the filled part is separated into a shape layer 5 in which the color of the part adjacent thereto is replaced by the same color as the shape layer 5, and an optimal compression method is applied to each of the layers. is there. Further, the image file 1 is replaced with a transmissive layer 3 representing an area and a shape of an image, a mask layer 4 representing a line and a filled portion of the image, and replacing the line and the filled portion with the same color as a color of a portion adjacent thereto. Layer separation section 2 for separating the transmission layer 3 into a shape layer 5, a first compression encoder 6 for compressing the transmission layer 3 based on a compression algorithm optimized for the transmission layer 3, and optimization for the mask layer 4. A second compression encoder 7 for compressing the mask layer 4 based on the compression algorithm
And a third compression encoder 8 for compressing the shape layer 5 based on a compression algorithm optimized for the shape layer 5
The present invention provides an image compression apparatus having a compression file synthesizing unit 9 for synthesizing the compressed files output from the first compression encoder 6 to the third compression encoder 8. Further, the compressed image file 10 is converted into a transparent layer 3 representing the area and shape of the image, a mask layer 4 representing the lines and painted portions of the image, and the lines and painted portions having the same color as that of the portion adjacent thereto. A file separating unit 12 for separating into a shape layer 5 replaced by a color, a first decompression decoder 13 for performing decompression based on a compression algorithm optimized for the transmission layer 3, and an optimization for the mask layer 4. A second decompression decoder 14 for decompression based on the compression algorithm, a third decompression decoder 15 for decompression based on the compression algorithm optimized for the shape layer 5, and the first decompression decoders 13 to An image decompression device having an image synthesizing unit 19 for synthesizing an image output from the third decompression decoder 15 is provided. Further, the image file 1 is obtained by converting the image file 1 into a transmissive layer 3 representing an area and a shape of an image, a mask layer 4 representing a line and a filled portion of the image, and the line and the filled portion having the same color as the color of a portion adjacent thereto. A recording medium characterized by recording a compressed file (10) separated into a replaced shape layer (5) and compressed by applying an optimal compression method to each layer.

【発明の実施の形態】以下、図面を参照して本発明に係
る画像圧縮方法について説明する。図1は本発明に係る
画像圧縮装置の一実施例を示す図であり、同図によれ
ば、原画となる画像1を階層(layer)分離部2に
て3つの階層に分離する。3つの階層とは、原画となる
画像のコマの領域を示すTRANSPARENCY層
3、原画となる画像において線画および線画と同色によ
って塗りつぶされた(ベタ塗り)領域を示すMASK層
4、前述した線画及び塗りつぶされた領域をこの領域に
近接する色に置き換えたSHAPE層5である。そし
て、これらの階層毎に最適な圧縮効率が得られるよう
に、高能率符号化アルゴリズムを使用し、画像ファイル
の圧縮を行う。具体的には、TRANSPARENCY
層3をこの階層のデータの特徴を基に最適化された圧縮
エンコーダ6を使用して圧縮し、MASK層4をこの階
層のデータの特徴を基に最適化された圧縮エンコーダ7
で圧縮し、SHAPE層5をこの階層のデータの特徴を
基に最適化された圧縮エンコーダ8で圧縮する。このよ
うに、各階層毎に圧縮されたものはファイルフォーマッ
タ9によってパッケージ化され一つの圧縮されたパッケ
ージファイル10となる。次に、圧縮されたファイルを
伸長して原画となる画像を得る方法について図2を参照
して説明する。まず、圧縮されたファイル10はファイ
ル解析・分離手段12によってTRANSPARENC
Y層のデータ、MASK層のデータ、SHAPE層のデ
ータに解析・分離される。そして、TRANSPARE
NCY層のデータは、このデータの特徴を基に最適化圧
縮アルゴリズムに基づいて伸長デコーダ13によって伸
長される。また、MASK層のデータも同様に、このデ
ータの特徴を基に最適化圧縮アルゴリズムに基づいて伸
長デコーダ14によって伸長される。更に、SHAPE
層も、このデータの特徴を基に最適化圧縮アルゴリズム
に基づいて伸長デコーダ15によって伸長される。この
ような処理によってTRANSPARENCY層3、M
ASK層4、SHAPE層5がそれぞれ伸長され、再合
成手段19によって再合成されて原画となる画像1が得
られる。ところで、漫画やアニメーションでは、その画
像が、ある領域を固定の色や決まったパターンで埋めて
いくような手法で、絵が描かれる場合が多い。そこで、
このような特徴に着目し、マンガを例にとって図3を参
照して本発明に係る画像圧縮方法について説明する。通
常、漫画はコマ単位で描画されており、それぞれのコマ
は枠線によって囲まれている。この枠線の形状は様々で
ある。この枠線の大きさや形状、レイアウト位置等の情
報を記述するのがTRANSPARENCY層である。
まず、原画となる画像1をスキャナー等によってスキャ
ンしてデータ化する(31)。その後、原画となる画像
1のデータを使用して漫画の各コマの最外周の輪郭を抽
出する(32)。ここで、原画となる画像1は各コマ毎
に分類されるので前述した行程で取得した輪郭を基にコ
マ抜き出しを行う(33)。そして、抜き出したコマの
中から読者がコマを読み進める順番にコマ画像を切り出
す(34)。このとき、切り出す順番を規定せずに読者
がコマを読み進める順番に各コマに番号を付して、任意
の順番にコマ画像を切り出し、後の行程でコマ画像を順
番に並べ替えても良い。次に、各コマを形成するコマ画
像のコマ番号、コマの位置、コマの形状の検出を行い
(35)、検出された情報を基に、TRANSPARE
NCY層のファイルを作成する(36)。このTRAN
SPARENCY層ファイル37を所定の圧縮方法によ
り圧縮する(44)。ここで、TRANSPARENC
Y層が必要な理由は、漫画のコマの形状が必ずしも長方
形とは限らないことにある。次に、原画となる画像1を
しきい値によって二階調化するが、これは、漫画で言え
ば、ペンなどによって描かれる黒の線画や黒のベタ塗り
に相当する部分のみを取り出すことで、線及びベタ塗り
部分を1、その他の部分を全て0とすることであり、二
階調化する境界の輝度のしきい値を線及びベタ塗り部分
の輝度(明度)に近づけて二階調化処理することで、線
及びベタ塗り部分とそれ以外の部分とを分離することが
できる。このように二値化し(38)、MASK層ファ
イル40を作成して(39)、このMASK層ファイル
を所定の圧縮方法により圧縮する(45)。続いてSH
APE層ファイル43を作成する。SHAPE層のデー
タの特徴を基に最適化された圧縮アルゴリズムを、例え
ば仮に画面に対して水平方向に行うランレングス・コー
ディングとすると、以下のようにSHAPE層ファイル
43を作成することができる。図4に示すように、コマ
画像の切り出し34によって切り出された基のコマ画像
と、MASK層のコマ画像とを同時に上から順にピクセ
ル単位で直線スキャンする。図4中のa部分及びa´部
分がこれにあたるが、基のコマ画像のスキャンラインa
は図5(A)に示すような形状となり、MASK層のス
キャンラインa´は図5(B)に示すような形状とな
る。ここで、基のコマ画像のスキャンラインaとMAS
K層のスキャンラインa´とを左から1ドットずつ調べ
る。まず最初の1ドット目はMASK層スキャンライン
が黒となっていることから、ここはMASK領域である
ことが分かる。基のコマ画像におけるMASK領域はS
HAPE層ファイルに変換されるときに、何らかの色デ
ータに変換される。この色データはMASK領域の直前
か、直後に現れる色と置き換えることにより行われ、こ
れにより、SHAPE層における同じ色の領域が長くな
り、ランレングス・コーディング圧縮時に有利になる。
本実施例では、最初のドットからMASK領域であるた
め、色データは基のコマ画像のスキャンラインaを見れ
ば取り出すことが可能である。つまり、図5(B)に示
すように直後の色はB色であるため、基のコマ画像のス
キャンラインaにおけるMASK領域(A色)は全てB
色に置き換えられる。次に、基のコマ画像のスキャンラ
インaを見ると、B色の色領域を経た後、再びMASK
領域となる。このMASK領域の直後にはC色の領域が
ある。従って、このMASK領域はB色かC色の色デー
タに置き換えれば良い。同様に、その次のMASK領域
もB色かC色に置き換える。更に、その次のMASK領
域であるが、この領域の直前、直後ともにB色であるの
で、これはそのままB色に置き換える。そして、このよ
うな処理を繰り返し、図5(C)に示すようなSHAP
E層のスキャンラインを得ることができる。これをラン
レングス・コーディングすれば、基のコマ画像のスキャ
ンラインaやMASK層スキャンラインa´と比較して
明らかなように、大きく圧縮率を向上することが可能と
なる。また、MASK層を挟むことなく、二つの色領域
が隣り合うこともあるが、この場合は、そのまま次のM
ASK領域になるまで何も処理を行わない。また、前述
したように、MASK領域の直前がB色、直後がC色の
場合、どちらの色に置き換えるかは、圧縮時に有利にな
るようにすれば良い。例えば、なるべく同じ値が含まれ
るようにする方が有利になるGZIP圧縮方式の場合で
は、以前に存在したRUN−LENGTHになるように
色領域の長さをMASK領域内で調整しても良い。直前
のB色の領域の長さが10ドット、MASK領域の長さ
が7ドット、C色の領域の長さが13ドット、MASK
領域が2ドット以上となっていて、既にB色の長さが1
2ドット、C色の長さが20ドット存在する場合に、B
色は12ドット(基からの10ドット+MASK領域の
最初の2ドット)で、C色は20ドット(MASK領域
の残りの5ドット+基からの13ドット+次のMASK
領域の2ドット)の様に分割しても良い。このようにS
HAPE層ファイル43を作成し(42)、このSHA
PE層ファイル43を所定の圧縮方法により圧縮する
(46)。引き続いて、次のコマ画像の切り出しを行い
(44)、全てのコマについて同様の処理を行う。な
お、本実施例では水平方向のスキャンラインを用いて説
明を行ったが、スキャンする方向はこれに限定されるも
のではない。そして、圧縮されたTRANSPAREN
CY層ファイル37、MASK層ファイル40、SHA
PE層ファイル43はそれぞれ所定の圧縮方法により圧
縮された後、1コマ毎にファイル合成されて(47)、
コマ単位で圧縮された画像ファイル48となる。コマ単
位で圧縮された画像ファイル48は、漫画の吹き出しに
当てはまるテキストファイル、テキスト部分を音声とし
たアフレコ音声ファイル、効果音や音楽などの音声ファ
イル、コマに効果的なエフェクトをかけるコマ表示エフ
ェクトファイルなどのその他のファイル49と共に、こ
れらのデータを配信するための配信ファイルフォーマッ
ター50に送られる。そして、配信ファイル51が作成
される。なお、上述した実施例では、原画となる画像が
カラー画像である場合の画像圧縮方法について説明して
いるが、モノクロの画像の場合でも、SHAPE層全体
を白として、SHAPE層の圧縮を省略することで本願
発明に対応可能である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image compression method according to the present invention will be described with reference to the drawings. FIG. 1 is a diagram showing an embodiment of an image compression apparatus according to the present invention. According to FIG. 1, an image 1 serving as an original image is separated into three layers by a layer separation unit 2. The three hierarchies include a TRANSPARENCY layer 3 indicating an area of a frame of an image serving as an original image, a MASK layer 4 indicating a line-painted area in the image serving as an original image and a (solid-painted) area painted with the same color as the line-work, and the above-described line-art and fill-in area. This is the SHAPE layer 5 in which the shaded area is replaced with a color close to this area. Then, the image file is compressed using a high-efficiency encoding algorithm so that the optimum compression efficiency is obtained for each of these layers. Specifically, TRANSPARENCY
The layer 3 is compressed using a compression encoder 6 optimized based on the characteristics of the data of this layer, and the MASK layer 4 is compressed using a compression encoder 7 optimized based on the characteristics of the data of this layer.
Then, the SHAPE layer 5 is compressed by the compression encoder 8 optimized based on the characteristics of the data of this layer. In this way, the files compressed for each layer are packaged by the file formatter 9 to become one compressed package file 10. Next, a method of decompressing a compressed file to obtain an image serving as an original image will be described with reference to FIG. First, the compressed file 10 is subjected to TRANSPARENC by the file analysis / separation means 12.
The data is analyzed and separated into Y layer data, MASK layer data, and SHAPE layer data. And TRANSPARE
The data of the NCY layer is expanded by the expansion decoder 13 based on the characteristics of the data and based on the optimized compression algorithm. Similarly, the data of the MASK layer is decompressed by the decompression decoder 14 based on the characteristics of the data and based on an optimized compression algorithm. Furthermore, SHAPE
The layers are also decompressed by the decompression decoder 15 based on the characteristics of this data and based on an optimized compression algorithm. By such processing, the TRANSPARENCY layer 3, M
The ASK layer 4 and the SHAPE layer 5 are respectively decompressed and recombined by the recombining means 19 to obtain the image 1 serving as the original image. By the way, in cartoons and animations, pictures are often drawn in such a manner that the image fills a certain area with a fixed color or a fixed pattern. Therefore,
Focusing on such characteristics, an image compression method according to the present invention will be described with reference to FIG. 3 taking a manga as an example. Usually, comics are drawn in frame units, and each frame is surrounded by a frame line. The shape of this frame line varies. The TRANSPARENCY layer describes information such as the size and shape of the frame line and the layout position.
First, an image 1 serving as an original image is scanned and converted into data by a scanner or the like (31). Then, the outermost contour of each comic frame is extracted using the data of the image 1 serving as the original image (32). Here, since the image 1 serving as the original image is classified for each frame, frame extraction is performed based on the contour obtained in the above-described process (33). Then, frame images are cut out from the extracted frames in the order in which the reader reads the frames (34). At this time, the frame image may be cut out in an arbitrary order by assigning a number to each frame in the order in which the reader proceeds to read the frame without defining the cutout order, and the frame images may be rearranged in order in a later process. . Next, the frame number, the position of the frame, and the shape of the frame of the frame image forming each frame are detected (35), and TRANSPARE is performed based on the detected information.
An NCY layer file is created (36). This TRAN
The SPARENCY layer file 37 is compressed by a predetermined compression method (44). Here, TRANSPARENC
The reason that the Y layer is necessary is that the shape of the comic frame is not always rectangular. Next, the original image 1 is binarized by a threshold value. In the case of comics, this is done by extracting only a portion corresponding to a black line drawing or a solid black painting drawn with a pen or the like. The line and solid portion are set to 1 and all other portions are set to 0, and the two-tone processing is performed by bringing the threshold value of the luminance of the boundary to be binarized close to the luminance (brightness) of the line and the solid portion. This makes it possible to separate the line and solid-painted portions from other portions. In this way, the binarization is performed (38), a MASK layer file 40 is created (39), and the MASK layer file is compressed by a predetermined compression method (45). Then SH
An APE layer file 43 is created. If the compression algorithm optimized based on the characteristics of the data of the SHAPE layer is, for example, run-length coding that is performed in the horizontal direction with respect to the screen, the SHAPE layer file 43 can be created as follows. As shown in FIG. 4, the base frame image cut out by the frame image cutout 34 and the frame image of the MASK layer are simultaneously linearly scanned in pixel units from the top. The portions a and a 'in FIG. 4 correspond to the scan line a of the original frame image.
Has a shape as shown in FIG. 5A, and the scan line a 'of the MASK layer has a shape as shown in FIG. 5B. Here, the scan line a of the original frame image and the MAS
The scan line a ′ of the K layer is examined one dot at a time from the left. First, since the first dot is black in the MASK layer scan line, it can be seen that this is the MASK area. The MASK area in the base frame image is S
When converted to a HAPE layer file, it is converted to some color data. This color data is performed by replacing the color that appears immediately before or immediately after the MASK area, thereby lengthening the area of the same color in the SHAPE layer, which is advantageous during run-length coding compression.
In this embodiment, since the area is the MASK area from the first dot, the color data can be extracted by looking at the scan line a of the original frame image. That is, as shown in FIG. 5B, the color immediately after is the B color, so that the MASK area (A color) in the scan line a of the original frame image is all B colors.
Replaced by color. Next, looking at the scan line a of the original frame image, after passing through the B color area, the MASK
Area. Immediately after this MASK area, there is an area of C color. Therefore, this MASK area may be replaced with color data of B color or C color. Similarly, the next MASK area is replaced with B color or C color. Further, the next MASK area is a B color both immediately before and immediately after this area, so that it is replaced with the B color as it is. Then, such processing is repeated, and the SHAP as shown in FIG.
A scan line of the E layer can be obtained. If this is run-length coded, it is possible to greatly improve the compression ratio, as is apparent from comparison with the scan line a of the original frame image and the MASK layer scan line a '. In addition, two color regions may be adjacent to each other without the MASK layer interposed therebetween.
No processing is performed until the ASK area is reached. In addition, as described above, when the B color is immediately before the MASK area and the C color is immediately after the MASK area, which color should be replaced may be advantageous during compression. For example, in the case of the GZIP compression method in which it is more advantageous to include the same value as much as possible, the length of the color area may be adjusted within the MASK area so as to obtain the previously existing RUN-LENGTH. The length of the immediately preceding B color area is 10 dots, the length of the MASK area is 7 dots, the length of the C color area is 13 dots, MASK
The area is 2 dots or more and the length of the B color is already 1
If there are 2 dots and the length of the C color is 20 dots,
The color is 12 dots (10 dots from the base + the first two dots in the MASK area), and the C color is 20 dots (the remaining 5 dots in the MASK area + 13 dots from the base + the next MASK area).
(2 dots in the area). Thus S
A HAPE layer file 43 is created (42), and this SHA
The PE layer file 43 is compressed by a predetermined compression method (46). Subsequently, the next frame image is cut out (44), and the same processing is performed for all frames. In the present embodiment, the description has been made using the horizontal scan lines, but the scanning direction is not limited to this. And the compressed TRANSPAREN
CY layer file 37, MASK layer file 40, SHA
Each of the PE layer files 43 is compressed by a predetermined compression method and then synthesized for each frame (47),
The image file 48 is compressed on a frame basis. The image file 48 compressed in units of frames is a text file corresponding to a comic speech bubble, an after-recording audio file in which a text portion is voiced, an audio file such as sound effects and music, and a frame display effect file for applying an effect to a frame. Along with other files 49, etc., to a distribution file formatter 50 for distributing these data. Then, the distribution file 51 is created. In the above-described embodiment, the image compression method in the case where the original image is a color image is described. However, even in the case of a monochrome image, the entire SHAPE layer is set to white and the compression of the SHAPE layer is omitted. Thus, the present invention can be dealt with.

【発明の効果】以上、詳述したように、本発明に係る画
像圧縮方法によれば、画像ファイルを、画像の領域及び
形状を表す層と、画像の線及び塗りつぶし部分を表す層
と、線及び塗りつぶし部分を近接した部分の色と同じ色
で置き換えた層とに分離し、それぞれの層に最適な圧縮
方法を適用することで、原画となる画像の品質を損なう
ことなく、圧縮後のファイルサイズを削減することがで
きるという効果を奏するものである。
As described in detail above, according to the image compression method of the present invention, an image file is divided into a layer representing an area and a shape of an image, a layer representing a line and a filled portion of the image, By separating the filled part into layers where the colors of the adjacent parts have been replaced with the same color and applying the optimal compression method to each layer, the compressed file can be saved without impairing the quality of the original image. The effect is that the size can be reduced.

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

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

【図2】本発明に係る画像伸長装置の一実施例を示すブ
ロック図である。
FIG. 2 is a block diagram showing an embodiment of an image decompression device according to the present invention.

【図3】本発明に係る画像圧縮方法の一実施例示すブロ
ック図である。
FIG. 3 is a block diagram showing an embodiment of an image compression method according to the present invention.

【図4】本発明に係る原画となる画像及びMASK層の
画像を示す図である。
FIG. 4 is a diagram showing an image serving as an original image and an image of a MASK layer according to the present invention.

【図5】本発明に係る原画となる画像、MASK層の画
像及びSHAPE層の画像のスキャン部分を示す拡大図
である。
FIG. 5 is an enlarged view showing a scanned portion of an image serving as an original image, an image of a MASK layer, and an image of a SHAPE layer according to the present invention.

【図6】漫画データ配信システムを示すブロック図であ
る。
FIG. 6 is a block diagram illustrating a comic data distribution system.

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

1 原画となる画像 2 階層分離部 3 TRANPARENCY層 4 MASK層 5 SHAPE層 6,7,8 圧縮エンコーダ 9 ファイルフォーマッタ 10 圧縮されたファイル 12 ファイル解析・分離部 13,14,15 伸長デコーダ 19 再合成部 DESCRIPTION OF SYMBOLS 1 Original image 2 Layer separation part 3 TRANSPARENCY layer 4 MASK layer 5 SHAPE layer 6,7,8 Compression encoder 9 File formatter 10 Compressed file 12 File analysis and separation part 13,14,15 Decompression part 19 Recomposition part

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】画像ファイルを、画像の領域及び形状を表
す透過層と、画像の線及び塗りつぶし部分を表すマスク
層と、前記線及び塗りつぶし部分をこれに近接した部分
の色と同じ色で置き換えた形状層とに分離し、前記それ
ぞれの層に最適な圧縮方法を適用することを特徴とする
画像圧縮方法。
An image file is replaced with a transmissive layer representing a region and a shape of an image, a mask layer representing a line and a filled portion of the image, and replacing the line and the filled portion with the same color as a color of a portion adjacent thereto. An image compression method, wherein the compression method is applied to each of the layers.
【請求項2】画像ファイルを、画像の領域及び形状を表
す透過層と、画像の線及び塗りつぶし部分を表すマスク
層と、前記線及び塗りつぶし部分をこれに近接した部分
の色と同じ色で置き換えた形状層とに分離する階層分離
部と、 前記透過層に最適化された圧縮アルゴリズムに基づいて
前記透過層を圧縮する第1の圧縮エンコーダと、 前記マスク層に最適化された圧縮アルゴリズムに基づい
て前記マスク層を圧縮する第2の圧縮エンコーダと、 前記形状層に最適化された圧縮アルゴリズムに基づいて
前記形状層を圧縮する第3の圧縮エンコーダと、 前記第1の圧縮エンコーダ乃至前記第3の圧縮エンコー
ダから出力された圧縮ファイルを合成する圧縮ファイル
合成手段とを有する画像圧縮装置。
2. The image file is replaced with a transmissive layer representing a region and a shape of the image, a mask layer representing a line and a filled portion of the image, and replacing the line and the filled portion with the same color as a color of a portion adjacent thereto. A layer separation unit that separates the transmission layer into a plurality of shape layers, a first compression encoder that compresses the transmission layer based on a compression algorithm optimized for the transmission layer, and a compression algorithm that is optimized for the mask layer. A second compression encoder that compresses the mask layer by compression, a third compression encoder that compresses the shape layer based on a compression algorithm optimized for the shape layer, a first compression encoder to a third compression encoder. And a compressed file synthesizing means for synthesizing a compressed file output from the compression encoder.
【請求項3】圧縮された画像ファイルを、画像の領域及
び形状を表す透過層と、画像の線及び塗りつぶし部分を
表すマスク層と、前記線及び塗りつぶし部分をこれに近
接した部分の色と同じ色で置き換えた形状層とに分離す
るファイル分離手段と、 前記透過層に最適化された圧縮アルゴリズムに基づいて
伸長を行う第1の伸長デコーダと、 前記マスク層に最適化された圧縮アルゴリズムに基づい
て伸長を行う第2の伸長デコーダと、 前記形状層に最適化された圧縮アルゴリズムに基づいて
伸長を行う第3の伸長デコーダと、 前記第1の伸長デコーダ乃至前記第3の伸長デコーダか
ら出力された画像を合成する画像合成手段とを有する画
像伸長装置。
3. A compressed image file is converted into a transmissive layer representing an area and a shape of an image, a mask layer representing a line and a filled portion of the image, and the line and the filled portion having the same color as that of a portion adjacent thereto. File separation means for separating into a shape layer replaced by a color, a first decompression decoder for performing expansion based on a compression algorithm optimized for the transmission layer, and a compression algorithm optimized for the mask layer A second decompression decoder that performs decompression according to a compression algorithm optimized for the shape layer, a third decompression decoder that performs decompression based on a compression algorithm optimized for the shape layer, and outputs from the first to third decompression decoders. An image decompression device having an image synthesizing unit for synthesizing an image.
【請求項4】画像ファイルを、画像の領域及び形状を表
す透過層と、画像の線及び塗りつぶし部分を表すマスク
層と、前記線及び塗りつぶし部分をこれに近接した部分
の色と同じ色で置き換えた形状層とに分離し、前記それ
ぞれの層に最適な圧縮方法を適用して圧縮した圧縮ファ
イルを記録することを特徴とする記録媒体。
4. The image file is replaced with a transmissive layer representing a region and a shape of the image, a mask layer representing a line and a filled portion of the image, and replacing the line and the filled portion with the same color as a color of a portion adjacent thereto. And recording a compressed file compressed by applying an optimal compression method to each layer.
JP27951099A 1999-09-30 1999-09-30 Image compressing method, image compressing device, image expanding device and recording medium Pending JP2001101427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27951099A JP2001101427A (en) 1999-09-30 1999-09-30 Image compressing method, image compressing device, image expanding device and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27951099A JP2001101427A (en) 1999-09-30 1999-09-30 Image compressing method, image compressing device, image expanding device and recording medium

Publications (1)

Publication Number Publication Date
JP2001101427A true JP2001101427A (en) 2001-04-13

Family

ID=17612051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27951099A Pending JP2001101427A (en) 1999-09-30 1999-09-30 Image compressing method, image compressing device, image expanding device and recording medium

Country Status (1)

Country Link
JP (1) JP2001101427A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005074182A1 (en) * 2004-01-28 2005-08-11 Nec Corporation Content distribution method, encoding method, reception/reproduction method and device, and program
JP2010074394A (en) * 2008-09-17 2010-04-02 Dainippon Screen Mfg Co Ltd Image processing apparatus and method, and program
WO2013172207A1 (en) * 2012-05-17 2013-11-21 富士フイルム株式会社 Digital comics data compression device, method, and program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005074182A1 (en) * 2004-01-28 2005-08-11 Nec Corporation Content distribution method, encoding method, reception/reproduction method and device, and program
JPWO2005074182A1 (en) * 2004-01-28 2008-01-10 日本電気株式会社 Content distribution method, encoding method, reception and reproduction method and apparatus, and program
US7856585B2 (en) 2004-01-28 2010-12-21 Nec Corporation Content distribution method, encoding method, reception/reproduction method and apparatus, and program
US8055974B2 (en) 2004-01-28 2011-11-08 Nec Corporation Content distribution method, encoding method, reception/reproduction method and apparatus, and program
JP2010074394A (en) * 2008-09-17 2010-04-02 Dainippon Screen Mfg Co Ltd Image processing apparatus and method, and program
WO2013172207A1 (en) * 2012-05-17 2013-11-21 富士フイルム株式会社 Digital comics data compression device, method, and program
JPWO2013172207A1 (en) * 2012-05-17 2016-01-12 富士フイルム株式会社 Electronic comic data compression apparatus, method and program

Similar Documents

Publication Publication Date Title
US6192155B1 (en) Systems and methods for reducing boundary artifacts in hybrid compression
US5751865A (en) Method and apparatus for image rotation with reduced memory using JPEG compression
JP3966691B2 (en) Continuous tone compression apparatus and method, data processing apparatus and device, and recording medium on which program for executing the method is recorded
US20090324065A1 (en) Image processing apparatus and method
JPH07236062A (en) Picture processor and method therefor
JP2006101521A (en) Method, computer program, and data processing system for determining visual representation of input media object
JP2006135939A (en) Method for encoding media objects, computer program and data processing system
JP2006155580A (en) Method of generating media object, computer program and data processing system
US6563946B2 (en) Image processing apparatus and method
JP2000306103A (en) Method and device for information processing
CN1413017A (en) Coding method for special effect data
JP2001244819A (en) Digital signal encoding accompanied by tile division
JPH08205144A (en) Image encoding device
JP2001101427A (en) Image compressing method, image compressing device, image expanding device and recording medium
JP2000184183A (en) Electronic pasting method of compressed picture data and method for processing digital picture
JP4215269B2 (en) Region-based scalable image coding
JP2006013590A (en) Image processing apparatus, image processing method, program, and information recording medium
KR20000029715A (en) Image mapping device and method, and image generating device and method
JP2007005907A (en) Image processing method, image processor, image processing program, and recording medium
JPH10108011A (en) Data-processing unit
JPH04332261A (en) Picture reproducing device
JP3624013B2 (en) Image processing method and apparatus
JP3859325B2 (en) Image iterative transform decoding apparatus and method, and recording medium
JP4166399B2 (en) Data format converter
US6965642B2 (en) Method and device for compressing and decompressing moving image data and information recording medium