JP2003348359A - Color image compressing apparatus and method therefor - Google Patents

Color image compressing apparatus and method therefor

Info

Publication number
JP2003348359A
JP2003348359A JP2002149778A JP2002149778A JP2003348359A JP 2003348359 A JP2003348359 A JP 2003348359A JP 2002149778 A JP2002149778 A JP 2002149778A JP 2002149778 A JP2002149778 A JP 2002149778A JP 2003348359 A JP2003348359 A JP 2003348359A
Authority
JP
Japan
Prior art keywords
data
color image
regularity
compression method
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002149778A
Other languages
Japanese (ja)
Other versions
JP3792600B2 (en
Inventor
Taiji Kawai
泰治 河合
Koji Ishida
幸司 石田
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.)
Sharp NEC Display Solutions Ltd
Original Assignee
NEC Viewtechnology 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 NEC Viewtechnology Ltd filed Critical NEC Viewtechnology Ltd
Priority to JP2002149778A priority Critical patent/JP3792600B2/en
Publication of JP2003348359A publication Critical patent/JP2003348359A/en
Application granted granted Critical
Publication of JP3792600B2 publication Critical patent/JP3792600B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a color image compressing apparatus and a method therefor in which no noise is generated on the block boundary of an expanded image while suppressing transmission costs or medium costs with respect to an image wherein a pattern of a gradation system exists over processing unit blocks. <P>SOLUTION: A color image of the gradation system is divided into respective R, G and B planes, a primary difference with respect to data of elements in the respective planes is calculated and further, a secondary difference with respect to the primary difference is calculated to discriminate the presence/non- presence of regularity in the secondary difference. When there is regularity in the secondary difference, a reversible compression scheme of high compressibility specialized for the gradation system is used but when there is no regularity, an irreversible compression scheme is used. Thus, a color image is compressed while reducing the transmission costs or the medium costs and securing a quality in the case of expansion. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、カラー画像圧縮装
置およびその方法に関し、特に、グラデーション系のパ
ターンが処理単位ブロックをまたがって存在するような
画像で、伝送コストまたは媒体コストを抑制しつつ、展
開した画像のブロック境界にノイズが発生しないように
したカラー画像圧縮装置およびその方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and method for compressing a color image, and more particularly to an image in which a gradation pattern is present over a processing unit block, while suppressing transmission costs or medium costs. The present invention relates to a color image compression apparatus and method for preventing noise from occurring at block boundaries of an expanded image.

【0002】[0002]

【従来の技術】ホスト装置上に存在する画像データを、
伝送路または媒体を介して他の表示装置で表示する場
合、画像データをホスト側で圧縮し、表示装置上で展開
することにより、伝送コスト(伝送時間等)または媒体
コスト(メモリ領域等)を抑える方法がとられている。
このような場合における画像の圧縮方法として、JPE
G(Joint Photographic Experts Group)方式などの、
伝送後に予測点の補完ができない不可逆圧縮方式が使用
されている。JPEG方式は、自然画などで人間の目で
見たときの違和感を抑えた定評のある圧縮方式の一つで
ある。
2. Description of the Related Art Image data existing on a host device is
When the image data is displayed on another display device via a transmission path or a medium, the image data is compressed on the host side and decompressed on the display device to reduce the transmission cost (transmission time or the like) or the medium cost (memory area or the like). A method of suppressing it is taken.
As a method of compressing an image in such a case, JPE
G (Joint Photographic Experts Group)
An irreversible compression method that cannot complement a predicted point after transmission is used. The JPEG method is one of the well-established compression methods that suppresses discomfort when viewed with human eyes in natural images and the like.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、不可逆
圧縮であるJPEG方式を使用した圧縮方法では、伝送
コストまたは媒体コストを抑制できるものの、グラデー
ション(図形)系のパターンが、処理単位ブロックをま
たがって存在するような画像では、展開した画像のブロ
ック境界にノイズが発生するという問題があった。
However, in the compression method using the JPEG method, which is irreversible compression, although the transmission cost or the medium cost can be suppressed, a gradation (graphic) pattern exists across processing unit blocks. In such an image, there is a problem that noise occurs at the block boundary of the developed image.

【0004】本発明は、上記の事情にかんがみなされた
もので、グラデーション系のパターンが処理単位ブロッ
クをまたがって存在するような画像で、伝送コストまた
は媒体コストを抑制しつつ、展開した画像のブロック境
界にノイズが発生しないようにしたカラー画像圧縮装置
およびその方法の提供を目的とする。
The present invention has been made in view of the above circumstances, and is an image in which a gradation type pattern is present over a processing unit block. It is an object of the present invention to provide a color image compression apparatus and a method thereof in which noise does not occur at a boundary.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
請求項1記載の発明は、ホスト装置上に存在する画像デ
ータを、伝送路または媒体を介して他の表示装置で表示
する場合に、前記画像データをホスト装置側で圧縮し、
前記表示装置上で展開するようにしたカラー画像圧縮装
置において、前記画像データをR,G,Bの各プレーン
に分割するRGBプレーン分割手段(21)と、該RG
Bプレーン分割手段が分割した各プレーンにおける隣接
データの一次差分を算出する一次差分算出手段(22)
と、該一次差分算出手段が算出した一次差分の隣接デー
タの二次差分を算出する二次差分算出手段(23)と、
該二次差分算出手段が算出した隣接データの間に規則性
があるかどうかを検出する規則性有無検出手段(24)
と、該規則性有無検出手段が検出したデータに規則性が
ある場合には、前記画像データを可逆圧縮方式で圧縮
し、前記検出したデータに規則性がない場合には、前記
画像データを不可逆圧縮方式で圧縮することを選択する
圧縮方式選択手段(25)とを備えた構成としてある。
According to a first aspect of the present invention, there is provided an image processing apparatus comprising: a display device for displaying image data existing on a host device on another display device via a transmission path or a medium; Compressing the image data on the host device side,
An RGB plane dividing means (21) for dividing the image data into R, G, and B planes in the color image compression apparatus developed on the display device;
Primary difference calculating means (22) for calculating a primary difference of adjacent data in each plane divided by the B plane dividing means (22)
A secondary difference calculation unit (23) for calculating a secondary difference between adjacent data of the primary difference calculated by the primary difference calculation unit;
Regularity detecting means (24) for detecting whether there is regularity between adjacent data calculated by said secondary difference calculating means (24)
When the data detected by the regularity detecting means has regularity, the image data is compressed by a reversible compression method, and when the detected data has no regularity, the image data is irreversible. And a compression method selection means (25) for selecting compression by a compression method.

【0006】前記構成において、二次差分算出手段(2
3)が一次差分の隣接データを算出すると、図1に示す
ように、第一と第二と第三のパターンでは、それぞれ規
則性があるが、第四のパターンでは規則性がない。規則
性有無検出手段(24)は、前記規則性の有無を検出す
る。圧縮方式選択手段(25)は、規則性がある場合に
は可逆圧縮方式を選択し、規則性がない場合には不可逆
圧縮方式を選択する。
In the above construction, the secondary difference calculating means (2
When 3) calculates the adjacent data of the primary difference, as shown in FIG. 1, the first, second, and third patterns have regularity, but the fourth pattern has no regularity. The regularity detecting means (24) detects the regularity. The compression method selection means (25) selects a reversible compression method when there is regularity, and selects an irreversible compression method when there is no regularity.

【0007】このようにすれば、規則性がある場合はグ
ラデーション系用の可逆圧縮方式(例えば、後述の圧縮
率の高い「カラー画像圧縮方式」)を採用するので、画
像品質を劣化させずに、伝送コストまたは媒体コストを
抑制することができる。逆に、規則性がない場合は、圧
縮率の高い不可逆圧縮方式(例えば、JPEG方式)を
採用するので、画像品質が劣化することはない。従っ
て、画像データの全体を見ると、画像品質を高く維持し
ながら、伝送コストまたは媒体コストを、低く抑制する
ことができる。
In this way, when there is regularity, a lossless compression method for gradation system (for example, a "color image compression method" having a high compression rate described later) is adopted, so that image quality is not degraded. In addition, transmission costs or medium costs can be reduced. Conversely, when there is no regularity, an irreversible compression method with a high compression ratio (for example, JPEG method) is employed, so that image quality does not deteriorate. Therefore, when looking at the entire image data, it is possible to keep transmission cost or medium cost low while maintaining high image quality.

【0008】請求項2記載の発明は、請求項1記載のカ
ラー画像圧縮装置において、前記可逆圧縮方式を、グラ
デーション系のカラー画像をRGBの各プレーンに分割
し、各プレーンにおける要素のデータに対する一次差分
を算出し、さらに、一次差分に対する二次差分を算出し
て、該二次差分が零でないときに、当該二次差分を用い
て、各プレーンを可変長符号化し、さらに、前記二次差
分が連続して零となるときに、当該零の連続数を用い
て、各プレーンを可変長符号化する構成としてある。こ
のようにすれば、グラデーション系の画像を、差分方式
を応用して可変長符号化することにより、圧縮率を改善
するとともに画質品質を劣化させないカラー画像圧縮方
法とすることができる。
According to a second aspect of the present invention, in the color image compression apparatus according to the first aspect, the reversible compression method divides a gradation color image into RGB planes, and performs primary conversion on element data in each plane. Calculating a difference, further calculating a secondary difference with respect to the primary difference, and when the secondary difference is not zero, using the secondary difference, performing variable length coding on each plane; Are continuously zero, each plane is variable-length coded using the number of consecutive zeros. In this way, a gradation image is subjected to variable-length coding by applying the difference method, thereby providing a color image compression method that improves the compression ratio and does not degrade the image quality.

【0009】請求項3記載の発明は、請求項1または請
求項2記載のカラー画像圧縮装置において、前記規則性
有無検出手段を、前記隣接データの二次差分が全て
「0」であることを検出する構成としてある。このよう
にすれば、図1の第一と第二のパターンに示すように、
二次差分は全て「0」である。この場合は、「カラー画
像圧縮方式」により二次差分の連続数をカウントし、そ
のカウント数を圧縮すればよいので、圧縮率を高めるこ
とが可能となり、伝送コストまたは媒体コストを抑制す
るという効果がある。
According to a third aspect of the present invention, in the color image compression apparatus according to the first or second aspect, the regularity detecting means determines that all secondary differences between the adjacent data are "0". It is configured to detect. By doing so, as shown in the first and second patterns of FIG.
The secondary differences are all “0”. In this case, the continuous number of secondary differences may be counted by the "color image compression method" and the count number may be compressed, so that the compression ratio can be increased, and the transmission cost or the medium cost is suppressed. There is.

【0010】請求項4記載の発明は、請求項1または請
求項2記載のカラー画像圧縮装置において、前記規則性
有無検出手段は、前記隣接データの二次差分の絶対値が
全て「1」以下であることを検出する構成としてある。
このようにすれば、例えば、図1の第三のパターンに示
すように、二次差分は「1,−1,1」または「−1,
1,−1」(即ち、絶対値が全て「1」以下)である。
この場合は、「カラー画像圧縮方式」によりコードブッ
クに基づいて二次差分を圧縮するので、圧縮率を高める
ことが可能となり、伝送コストまたは媒体コストを抑制
するという効果がある。
According to a fourth aspect of the present invention, in the color image compressing apparatus according to the first or second aspect, the regularity detecting means determines that the absolute value of the secondary difference between the adjacent data is all “1” or less. Is detected.
In this way, for example, as shown in the third pattern of FIG. 1, the secondary difference is “1, −1, 1” or “−1,
1, -1 "(that is, all the absolute values are" 1 "or less).
In this case, since the secondary difference is compressed based on the codebook by the “color image compression method”, it is possible to increase the compression rate and to suppress the transmission cost or the medium cost.

【0011】請求項5記載の発明は、ホスト装置上に存
在する画像データを、伝送路または媒体を介して他の表
示装置で表示する場合に、前記画像データをホスト装置
側で圧縮し、前記表示装置上で展開するようにしたカラ
ー画像圧縮方法において、前記画像データをR,G,B
の各プレーンに分割するステップと、該分割した各プレ
ーンにおける隣接データの一次差分を算出するステップ
と、該算出した一次差分の隣接データの二次差分を算出
するステップと、該算出した隣接データの間に規則性が
あるかどうかを検出するステップと、該検出したデータ
に規則性がある場合には、前記画像データを可逆圧縮方
式で圧縮し、前記検出したデータに規則性がない場合に
は、前記画像データを不可逆圧縮方式で圧縮するステッ
プとを備えた方法としてある。
According to a fifth aspect of the present invention, when image data present on the host device is displayed on another display device via a transmission line or a medium, the image data is compressed on the host device side, In a color image compression method designed to be expanded on a display device, the image data is converted to R, G, B
, Calculating a primary difference between adjacent data in each of the divided planes, calculating a secondary difference between adjacent data of the calculated primary difference, Detecting whether there is regularity in between, and if the detected data has regularity, the image data is compressed by a lossless compression method; if the detected data does not have regularity, Compressing the image data by an irreversible compression method.

【0012】このようにすれば、請求項1の場合と同様
に、規則性がある場合はグラデーション系用の可逆圧縮
方式(「カラー画像圧縮方式」)を採用するので、画像
品質を劣化させずに、伝送コストまたは媒体コストを抑
制することができる。逆に、規則性がない場合は、圧縮
率の高い不可逆圧縮方式(例えば、定評のあるJPEG
方式)を採用するので、画像品質が劣化することはな
い。従って、画像データの全体を見ると、画像品質を高
く維持しながら、伝送コストまたは媒体コストを、低く
抑制することができる。
In this way, as in the case of the first aspect, when there is regularity, the lossless compression method ("color image compression method") for the gradation system is adopted, so that the image quality is not degraded. In addition, transmission costs or medium costs can be reduced. Conversely, when there is no regularity, an irreversible compression method with a high compression ratio (for example, the well-established JPEG
Method), the image quality does not deteriorate. Therefore, when looking at the entire image data, it is possible to keep transmission cost or medium cost low while maintaining high image quality.

【0013】請求項6記載の発明は、請求項5記載のカ
ラー画像圧縮方法において、前記規則性の有無を検出す
るステップは、前記隣接データの二次差分が全て「0」
であることを検出する。このようにすれば、請求項2の
場合と同様に、「カラー画像圧縮方式」により二次差分
の連続数をカウントし、そのカウント数を圧縮すればよ
いので、圧縮率を高めることが可能となり、伝送コスト
または媒体コストを抑制するという効果がある。
According to a sixth aspect of the present invention, in the color image compression method according to the fifth aspect, the step of detecting the presence / absence of the regularity is such that all the secondary differences between the adjacent data are “0”.
Is detected. With this configuration, as in the case of the second aspect, the continuous number of secondary differences is counted by the “color image compression method”, and the count number may be compressed, so that the compression ratio can be increased. This has the effect of reducing transmission costs or medium costs.

【0014】請求項7記載の発明は、請求項5記載のカ
ラー画像圧縮方法において、前記規則性の有無を検出す
るステップは、前記隣接データの二次差分の絶対値が全
て「1」以下であることを検出する。このようにすれ
ば、請求項3の場合と同様に、「カラー画像圧縮方式」
によりコードブックに基づいて二次差分を圧縮するの
で、圧縮率を高めることが可能となり、伝送コストまた
は媒体コストを抑制するという効果がある。
According to a seventh aspect of the present invention, in the color image compression method according to the fifth aspect, the step of detecting the presence / absence of the regularity is performed when the absolute value of the secondary difference between the adjacent data is all “1” or less. Detect that there is. With this configuration, as in the case of the third aspect, the “color image compression method”
, The secondary difference is compressed based on the codebook, so that the compression ratio can be increased and the transmission cost or the medium cost can be suppressed.

【0015】[0015]

【発明の実施の形態】以下、本発明のカラー画像圧縮装
置およびその方法を、図示の実施形態に基づいて説明す
る。 (1)本発明の概要説明 本実施形態の説明に先立ち、本発明の概要を説明する。
本発明は、JPEG方式などの不可逆圧縮方式と、グラ
デーション系に特化した可逆圧縮方式(例えば、後述の
「カラー画像圧縮方式」)とを適切に選択することによ
り、前記問題点を解決するための、画像データのエリア
(処理ブロック)毎に圧縮方式を選択する画像適用型圧
縮方式である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A color image compression apparatus and method according to the present invention will be described below with reference to the illustrated embodiments. (1) Outline of the present invention Prior to the description of the present embodiment, the outline of the present invention will be described.
The present invention solves the above-mentioned problem by appropriately selecting an irreversible compression method such as a JPEG method and a lossless compression method specialized in a gradation system (for example, a “color image compression method” described later). This is an image application type compression method for selecting a compression method for each area (processing block) of image data.

【0016】グラデーション系のカラー画像は、R,
G,Bの要素に分けた場合、各要素で徐々に値が増減す
る特徴がある。そこで、まず画像をR,G,Bの各プレ
ーンに分割し、分割した各プレーンに着目する。図1に
示すように、分割した各プレーンにおける隣接データと
の一次差分、前回の一次差分と現状処理した二次差分を
求める。グラデーションのパターンとしては、図示のよ
うに、データが一つずつ増減していく第一のパターン
と、データがN(自然数)ずつ増減していく第二のパタ
ーンと、データがNとN+1が規則的に切り替わって増
減していく第三のパターンがある。一方、通常の画像の
場合には、第四のパターンのように、一次差分,二次差
分ともに規則性は認められない。
The color image of the gradation system is represented by R,
When divided into G and B elements, the characteristic is that the value gradually increases and decreases in each element. Therefore, first, the image is divided into R, G, and B planes, and each divided plane is focused on. As shown in FIG. 1, a primary difference between adjacent data in each of the divided planes, a previous primary difference, and a currently processed secondary difference are obtained. As shown in the figure, a gradation pattern includes a first pattern in which data increases and decreases one by one, a second pattern in which data increases and decreases by N (natural number), and a rule that data is N and N + 1. There is a third pattern in which the frequency is switched and increases / decreases. On the other hand, in the case of a normal image, regularity is not recognized in both the primary difference and the secondary difference as in the fourth pattern.

【0017】本発明は、これらの特徴に着目し、以下の
ようなアルゴリズムで圧縮方式を選択する。当該処理ブ
ロックにおいて、各プレーンの当該二次差分の値が等し
い場合には、二次差分の値が全て「0」なら、グラデー
ション系用の可逆圧縮方式(例えば、次に詳述する「カ
ラー画像圧縮方式」)を採用する。前記と同一条件で、
当該処理ブロック内の隣接する二次差分に「1,−1,
1」または「−1,1,−1」の並びがある場合(即
ち、二次差分の絶対値の全てが「1」以下の場合)に
も、前記グラデーション系の可逆圧縮方式を採用する。
ここに、前記二次差分が「0」である場合、および
「1,−1,1」または「−1,1,−1」(即ち、二
次差分の絶対値が「1」以下)の並びがある場合を、
「規則性」があると称する。前述以外の場合(「規則
性」がない場合)には、不可逆圧縮方式(例えば、JP
EG方式)を採用する。
The present invention focuses on these characteristics and selects a compression method by the following algorithm. In the processing block, when the values of the secondary differences of the respective planes are equal, if the values of the secondary differences are all “0”, a lossless compression method for a gradation system (for example, a “color image Compression method)). Under the same conditions as above,
The adjacent secondary differences in the processing block are "1, -1,
Also when there is a sequence of "1" or "-1, 1, -1" (that is, when the absolute values of the secondary differences are all "1" or less), the gradation-based lossless compression method is adopted.
Here, when the secondary difference is “0”, and when “1, −1,1” or “−1,1, −1” (that is, the absolute value of the secondary difference is “1” or less) If there is a line,
It is called "regular". In other cases (when there is no “regularity”), the lossy compression method (for example, JP
EG method).

【0018】(2)「カラー画像圧縮方式」の説明 「カラー画像圧縮方式」とは、たとえば、本願出願人が
先に特願2002−100553として出願したカラー
画像圧縮方法を好適に用いることができる。従来技術の
グラデーション系画像の圧縮方法は、一次差分値を圧縮
したり、二次差分が零でない場合に、原画像のデータそ
のものを圧縮したりしているため、圧縮率を改善するこ
とができないといった問題があった。特願2002−1
00553号にかかる「カラー画像圧縮方式」は、前記
問題を解決すべくなされたものであり、グラデーション
系の画像を、差分方式を応用して可変長符号化すること
により、圧縮率を改善するとともに画質品質を劣化させ
ないカラー画像圧縮方法である。
(2) Description of "Color Image Compression Method" As the "color image compression method", for example, a color image compression method previously filed by the present applicant as Japanese Patent Application No. 2002-100553 can be suitably used. . The conventional compression method of a gradation image compresses the primary difference value or compresses the original image data itself when the secondary difference is not zero, so that the compression ratio cannot be improved. There was such a problem. Japanese Patent Application 2002-1
The “color image compression method” according to No. 00553 is intended to solve the above-mentioned problem. The compression rate is improved by applying a variable-length coding to a gradation image by applying a difference method. This is a color image compression method that does not degrade image quality.

【0019】特願2002−100553号にかかる
「カラー画像圧縮方式」の実施形態を説明する。図4
は、「カラー画像圧縮方式」の実施形態のフローチャー
ト図、図5は、同実施形態で用いるコードブックであっ
て、(a)はデータ圧縮のコードブック、(b)はラン
レングス圧縮のコードブックである。図6は、「カラー
画像圧縮方式」を実施する画像圧縮装置のブロック図で
ある。
An embodiment of a "color image compression system" according to Japanese Patent Application No. 2002-100553 will be described. FIG.
FIG. 5 is a flowchart of an embodiment of the “color image compression method”, FIG. 5 is a codebook used in the embodiment, (a) is a data compression codebook, and (b) is a run-length compression codebook. It is. FIG. 6 is a block diagram of an image compression device that implements the “color image compression method”.

【0020】図4において、まず、グラデーション系の
カラー画像をRGBプレーンに分割する(ステップS5
1)。次に、分割したプレーンから画像のデータを取得
する(ステップS52)。このデータの取得では、画像
の要素のなかから任意の1バイトを取得する。次に、取
得した画像データが、最初のバイト、すなわち、1バイ
ト目か否かの判断を行う(ステップS53)。ここで、
取得した画像データが1バイト目であるときは、この画
像データに対しデータ圧縮を行う(ステップS54)。
In FIG. 4, first, a gradation color image is divided into RGB planes (step S5).
1). Next, image data is obtained from the divided planes (step S52). In obtaining this data, an arbitrary one byte is obtained from the elements of the image. Next, it is determined whether or not the acquired image data is the first byte, that is, the first byte (step S53). here,
If the acquired image data is the first byte, data compression is performed on the image data (step S54).

【0021】このデータ圧縮は、図5(a)に示すデータ
圧縮のコードブックにもとづいて行われる。同図におい
て、データ圧縮のコードブックは、合計ビット数,識別
コード,コードの長さ及びデータ値の範囲とからなって
おり、データ値の範囲の各区分けに対応して、合計ビッ
ト数,識別コード及びコードの長さがそれぞれ設定され
ている。合計ビット数は、識別コードとデータ値の合計
ビット数を示しており、圧縮するデータ値が零に近けれ
ば近いほど小さなサイズに圧縮することができる。ま
た、コードの長さは、データ値を圧縮する際のデータビ
ット数であり、識別コードは、そのコードの長さを示す
データに付加するビットデータである。
This data compression is performed based on the data compression codebook shown in FIG. In the figure, the codebook for data compression includes a total number of bits, an identification code, a code length, and a data value range. A code and a code length are set. The total number of bits indicates the total number of bits of the identification code and the data value. The closer the data value to be compressed is to zero, the smaller the size can be. The length of the code is the number of data bits when compressing the data value, and the identification code is bit data added to data indicating the length of the code.

【0022】データ値の範囲は、データ値(−255か
ら255までの整数)に応じて、(0),(−1,
1),(−3、−2,2,3),(−7〜−4,4〜
7),(−15〜−8,8〜15),(−31〜−1
6,16〜31),(−63〜−32,32〜−6
3),(−127〜−64,64〜127)及び(−2
55〜−128,128〜255)の8つに区分けされ
ている。データ圧縮は、1バイト目の画像データの値に
応じた“データ値の範囲”の識別コードと、コードの長
さ分のビット数で表示した1バイト目のデータとを組み
合わせて圧縮を行う。
The range of the data value is (0), (-1, -1) depending on the data value (an integer from -255 to 255).
1), (-3, -2, 2, 3), (-7 to -4, 4 to
7), (-15 to -8, 8 to 15), (31 to -1)
6, 16 to 31), (−63 to −32, 32 to −6)
3), (-127 to -64, 64-127) and (-2)
55-128, 128-255). The data compression is performed by combining the identification code of “data value range” corresponding to the value of the image data of the first byte and the data of the first byte represented by the number of bits corresponding to the length of the code.

【0023】たとえば、1バイト目のデータが「5」の
場合、“データ値の範囲”から、識別コードは2進数で
表すと「11110」となる。また、コードの長さは
「3」であるため、1バイト目のデータ「5」は2進数
で表すと「101」となる。この「11110」と「1
01」を組み合わせて「11110101」という形で
出力する。
For example, if the data of the first byte is "5", the identification code is "11110" in binary from the "range of data values". In addition, since the code length is “3”, the data “5” of the first byte is “101” when represented by a binary number. This "11110" and "1
01 "and output in the form of" 11110101 ".

【0024】次に、最後のデータかどうかを判断し(ス
テップS66)、データが続いているときは、上記ステ
ップS52に戻り、次のデータを取得する。そして、再
びステップS53において、取得したデータが1バイト
目か否かの判断を行う。このデータは、2バイト目であ
るためステップS55へ進み、2バイト目か否かの判断
を行う(ステップS55)。ここで、取得したデータは
2バイト目であるため、ステップS56へ進み、1バイ
ト目と2バイト目の一次差分を算出し、(ステップS5
6)、続いて、算出した一次差分値を圧縮する(ステッ
プS57)。なお、一次差分値の圧縮方法は、ステップ
S54のデータ圧縮と同様に行う。
Next, it is determined whether or not the data is the last data (step S66). If the data is continued, the process returns to step S52 to acquire the next data. Then, in step S53 again, it is determined whether or not the acquired data is the first byte. Since this data is the second byte, the process proceeds to step S55, and it is determined whether or not the data is the second byte (step S55). Here, since the acquired data is the second byte, the process proceeds to step S56, where the primary difference between the first byte and the second byte is calculated (step S5).
6) Subsequently, the calculated primary difference value is compressed (step S57). The method of compressing the primary difference value is performed in the same manner as the data compression in step S54.

【0025】次に、最後のデータかどうかを判断し(ス
テップS66)、データが続いているときは、上記ステ
ップS52に戻り、次のデータを取得する。そして、3
バイト目以降は、データ取得(ステップS52)後、ス
テップS53及びステップS55を経由して、ステップ
S58へ進む。そして、前回取得したデータと今回取得
したデータとの一次差分を求め(ステップS58)、続
いて、前回取得した一次差分と今回取得した一次差分と
の二次差分を求める(ステップS59)。
Next, it is determined whether or not the data is the last data (step S66). If data is continued, the process returns to step S52 to acquire the next data. And 3
After the byte, data acquisition (step S52) is followed by step S58 via steps S53 and S55. Then, a primary difference between the previously acquired data and the currently acquired data is obtained (step S58), and subsequently, a secondary difference between the previously acquired primary difference and the currently acquired primary difference is obtained (step S59).

【0026】次に、ステップS59で求めた二次差分が
零か否かを判断し(ステップS60)、二次差分が零の
とき、ランレングスカウントを1つ加算して(ステップ
S61)、ステップS66へ進む。これに対し、二次差
分が零以外のとき、ランレングスカウントが零か否かを
判断(ステップS62)する。そして、ステップS62
において、ランレングスカウントが零のとき、ステップ
S65に進み、次に、ステップS59で求めた二次差分
値を圧縮し(ステップS65)、続いて、最後のデータ
かどうかを判断し(ステップS66)、データが続いて
いるときは、上記ステップS52に戻り、次のデータを
取得する。なお、この二次差分値の圧縮方法は、ステッ
プS54のデータ圧縮と同様の方法で行う。
Next, it is determined whether or not the secondary difference obtained in step S59 is zero (step S60). When the secondary difference is zero, one run length count is added (step S61). Proceed to S66. On the other hand, when the secondary difference is not zero, it is determined whether or not the run length count is zero (step S62). Then, step S62
When the run length count is zero, the process proceeds to step S65, then compresses the secondary difference value obtained in step S59 (step S65), and determines whether the data is the last data (step S66). If the data continues, the process returns to step S52 to acquire the next data. This method of compressing the secondary difference value is performed in the same manner as the data compression in step S54.

【0027】これに対し、ステップS62において、ラ
ンレングスカウントが零でないとき、ランレングスカウ
ントの圧縮(ステップS63)を行う。このランレング
スカウントの圧縮は、図5(b)に示すランレングス圧
縮のコードブックにもとづいて行う。同図(b)におい
て、ランレングス圧縮のコードブックは、合計ビット
数,識別コード,コードの長さ及びデータ値の範囲とか
らなっており、データ値の範囲の各区分けに対応して、
合計ビット数,識別コード及びコードの長さがそれぞれ
設定されている。なお、合計ビット数及びコードの長さ
は、上記合計ビット数及びコードの長さと同様としてあ
る。
On the other hand, if the run length count is not zero in step S62, the run length count is compressed (step S63). The compression of the run length count is performed based on the code book of the run length compression shown in FIG. In FIG. 2B, the code book of the run-length compression includes a total number of bits, an identification code, a code length, and a data value range.
The total number of bits, the identification code, and the length of the code are set. The total bit number and the code length are the same as the total bit number and the code length.

【0028】データ値の範囲は、データ値(1から25
5までの整数)に応じて、(1),(2,3),(4〜
7),(8〜15),(16〜31),(32〜−6
3),(64〜127)及び(128〜255)の8つ
に区分けされている。ランレングス圧縮は、1バイト目
のランレングスカウントの値に応じた“データ値の範
囲”の識別コードと、コードの長さ分のビット数で表示
したランレングスカウントのデータとを組み合わせて圧
縮を行う。たとえば、ランレングスカウントが「5」の
場合は、“データ値の範囲”から、認識コードは、2進
数で表すと「01110」となる。
The range of the data value is the data value (1 to 25).
(Integer up to 5), (1), (2, 3), (4 to
7), (8-15), (16-31), (32-6)
3), (64-127) and (128-255). Run-length compression is performed by combining an identification code of "data value range" according to the value of the run-length count in the first byte with the data of the run-length count indicated by the number of bits corresponding to the length of the code. Do. For example, when the run length count is "5", the recognition code is "01110" in binary from the "range of data values".

【0029】ランレングスカウントが「5」の場合は、
2進数で表すと「101」になるが、通常の値とは異な
り、ランレングスカウントの値には負の値が無いため、
最上位ビットには必ず1が立つことになるため、解凍側
で最上位ビットの1を付加する仕様とし、最上位ビット
の1を省略し、「01」と表す。したがって、コードの
長さは、「2」としてあり、1ビット分データを削減し
てある。この「01110」と「01」を組み合わせて
「0111001」という形で出力する。
When the run length count is "5",
Although expressed as a binary number, it is "101". Unlike a normal value, the run length count value has no negative value.
Since 1 is always set in the most significant bit, the specification is such that the most significant bit 1 is added on the decompression side, and the most significant bit 1 is omitted and represented as “01”. Therefore, the length of the code is “2”, and data of one bit is reduced. The combination of “01110” and “01” is output in the form of “0111001”.

【0030】次に、ランレングスカウントを零に初期化
(ステップS64)し、ステップ65に進み、ステップ
S59で求めた二次差分値を圧縮し(ステップS6
5)、続いて、最後のデータか否かを判断し(ステップ
S66)、データが続いているときは、上記ステップS
52に戻り、次のデータを取得する。ステップS66に
おいて、最後のデータか否かをチェックし、最後のデー
タになるまでステップS52に戻り、上記処理を繰り返
す。そして、最後のデータとなったとき、ステップS6
7に進み、ステップS62と同様にラングレンスカウン
トが零か否かを判断し(ステップS67)、ラングレン
スカウントが零のとき、処理を終了する。
Next, the run length count is initialized to zero (step S64), and the flow advances to step 65 to compress the secondary difference value obtained in step S59 (step S6).
5) Then, it is determined whether or not the data is the last data (step S66).
Returning to step 52, the next data is acquired. In step S66, it is checked whether the data is the last data, and the process returns to step S52 until the last data is reached, and the above processing is repeated. Then, when the last data is obtained, step S6
The process proceeds to step S7, where it is determined whether or not the run count is zero as in step S62 (step S67). When the run count is zero, the process ends.

【0031】これに対し、ステップS67において、ラ
ングレンスカウントが零でないとき、ステップS63と
同様にラングレンスカウントの圧縮を行い(ステップS
68)、続いて、ステップS64と同様にラングレンス
カウントを零に初期化し(ステップS69)、処理を終
了する。
On the other hand, if the run count is not zero at step S67, the run count is compressed as in step S63 (step S63).
68) Then, similarly to step S64, the run count is initialized to zero (step S69), and the process ends.

【0032】次に、上記カラー画像圧縮方法を行う、画
像圧縮装置について、図6を参照して説明する。同図に
おいて、画像圧縮装置100は、対象画像を入力するた
めの入力装置110と、入力画像,出力圧縮データを記
憶しておく記憶装置140と、プログラム制御により動
作するデータ処理装置130とを備えている。記憶装置
140は、入力画像データバッファ領域141と出力デ
ータバッファ領域142とを備えており、入力及び出力
データを一時的に記憶する。また、データ処理装置13
0は、差分手段131と、ラングレンス加算手段132
と、データ圧縮手段133とを備えており、入力された
画像の圧縮処理を行い出力装置120に出力する。
Next, an image compression apparatus for performing the above-described color image compression method will be described with reference to FIG. In FIG. 1, an image compression device 100 includes an input device 110 for inputting a target image, a storage device 140 for storing input images and output compressed data, and a data processing device 130 that operates under program control. ing. The storage device 140 includes an input image data buffer area 141 and an output data buffer area 142, and temporarily stores input and output data. The data processing device 13
0 is the difference means 131 and the rungence addition means 132
And a data compression unit 133 for compressing the input image and outputting the compressed image to the output device 120.

【0033】以上説明したように、本実施形態のカラー
画像圧縮方法によれば、グラデーション系のカラー画像
の特徴、すなわち、画像のデータの二次差分値が、ほぼ
必ず零、1、−1であることを利用して、二次差分値と
して零が連続するとき、零の連続数自体をカウントしそ
のカウント数を圧縮しているので、圧縮率を大幅に向上
させることができる。また、零の連続数をラングレンス
カウントにより圧縮しているので、零が多く連続するほ
ど圧縮効率を向上させることができる。
As described above, according to the color image compression method of the present embodiment, the characteristics of the gradation color image, that is, the secondary difference values of the image data are almost always zero, 1, and -1. Utilizing this fact, when zeros are consecutive as the secondary difference value, the number of consecutive zeros is counted and the counted number is compressed, so that the compression ratio can be greatly improved. Further, since the number of consecutive zeros is compressed by the run count, the compression efficiency can be improved as the number of consecutive zeros increases.

【0034】また、画像の二次差分値が零以外の場合で
あっても、二次差分値を圧縮し原画像のデータを圧縮し
ないので、ほぼ必ず1又は−1を圧縮すればすむ。つま
り、圧縮する値が零に近いほど合計ビット数を低減する
ことができ、画像の圧縮効率を改善することができる。
たとえば、図1に示す第三のパターンを圧縮するには、
一次差分を圧縮すると74ビット必要なのに対し、二次
差分を圧縮すると42ビットあればよいことから、圧縮
率を大幅に改善することができる。
Even when the secondary difference value of the image is other than zero, since the secondary difference value is compressed and the data of the original image is not compressed, it is almost always necessary to compress 1 or -1. That is, as the value to be compressed is closer to zero, the total number of bits can be reduced, and the image compression efficiency can be improved.
For example, to compress the third pattern shown in FIG.
Since the compression of the primary difference requires 74 bits, while the compression of the secondary difference requires only 42 bits, the compression ratio can be greatly improved.

【0035】また、各プレーンから最初に取得するデー
タを、データ値の範囲に区分けしたデータ圧縮のコード
ブックにもとづいて圧縮する方法としてあり、このよう
にすることにより、複雑な処理を行わなくても、データ
を容易に圧縮することができる。さらに、上記コードブ
ックにもとづいて、二次差分を圧縮する方法としてあ
り、このようにすることにより、グラデーション系のカ
ラー画像の二次差分、すなわち、零,−1,1を容易に
かつ効率良く圧縮することができる。また、画像の二次
差分が零でない場合であっても、二次差分値を圧縮し、
この二次差分値から原画像のデータを再現するとよく、
このようにすることにより、各プレーンを可逆的に可変
長符号化することができ、画像品質が低下してしまうと
いった不具合を回避することができる。
Further, there is a method of compressing data obtained first from each plane based on a data compression codebook divided into ranges of data values. By doing so, complicated processing is not performed. Also, the data can be easily compressed. Further, there is a method of compressing the secondary difference based on the codebook. By doing so, the secondary difference of the gradation color image, that is, zero, -1, 1 can be easily and efficiently obtained. Can be compressed. Also, even when the secondary difference of the image is not zero, the secondary difference value is compressed,
It is good to reproduce the data of the original image from this secondary difference value,
By doing so, each plane can be reversibly encoded in a variable length, and the problem that the image quality is reduced can be avoided.

【0036】なお、この「カラー画像圧縮方式」は、グ
ラデーション系のカラー画像に限定するものではなく、
画像のデータが連続的に増減する画像、すなわち、二次
差分が零に近い値となる画像であれば、上述したような
圧縮効果を得ることができることは勿論である。
This "color image compression method" is not limited to gradation type color images, but
It is a matter of course that the above-described compression effect can be obtained for an image in which the image data continuously increases and decreases, that is, for an image in which the secondary difference is a value close to zero.

【0037】以上説明したように、この「カラー画像圧
縮方式」によれば、グラデーション画像において、二次
差分の値を直接圧縮することにより、圧縮の合計ビット
数を減らすことができ、画像の圧縮効率を大幅に改善す
ることができる。また、可逆的に再生できるように画像
を圧縮することもできるので、圧縮による画像の劣化が
無く、画像品質の低下を防止することもできる。
As described above, according to the "color image compression system", the total number of bits of the compression can be reduced by directly compressing the value of the secondary difference in the gradation image, and the compression of the image can be reduced. Efficiency can be greatly improved. Further, since the image can be compressed so that the image can be reversibly reproduced, the image is not deteriorated by the compression, and the deterioration of the image quality can be prevented.

【0038】(3)本発明の実施形態 図2は、本実施形態のカラー画像圧縮装置のブロック図
である。図2に示すように、カラー画像圧縮装置KA
は、処理対象の画像データを入力する入力装置10と、
前記画像データの各種処理を行うプログラム制御のデー
タ処理装置20と、各種データを記憶する記憶装置30
と、圧縮データを展開して出力する出力装置40と、を
備えている。
(3) Embodiment of the Present Invention FIG. 2 is a block diagram of a color image compression apparatus according to this embodiment. As shown in FIG. 2, the color image compression device KA
An input device 10 for inputting image data to be processed;
A program-controlled data processing device 20 for performing various processes on the image data, and a storage device 30 for storing various data
And an output device 40 for decompressing and outputting the compressed data.

【0039】データ処理装置20は、RGBプレーン分
割手段21と、一次差分算出手段22と、二次差分算出
手段23と、規則性有無検出手段24と、圧縮方式選択
手段25と、不可逆圧縮手段26と、可逆圧縮手段27
とを備える。RGBプレーン分割手段21は、処理対象
の画像データをR,G,Bの各プレーンに分割する。一
次差分算出手段22は、RGBプレーン分割手段21が
分割した各プレーンにおける隣接データの一次差分を算
出する(図1参照)。二次差分算出手段23は、一次差
分算出手段22が算出した一次差分の隣接データの二次
差分を算出する。
The data processing device 20 comprises an RGB plane dividing means 21, a primary difference calculating means 22, a secondary difference calculating means 23, a regularity detecting means 24, a compression method selecting means 25, an irreversible compressing means 26 And the reversible compression means 27
And The RGB plane dividing means 21 divides the image data to be processed into R, G, and B planes. The primary difference calculating means 22 calculates a primary difference between adjacent data in each plane divided by the RGB plane dividing means 21 (see FIG. 1). The secondary difference calculation means 23 calculates a secondary difference between adjacent data of the primary difference calculated by the primary difference calculation means 22.

【0040】規則性有無検出手段24は、二次差分算出
手段23が算出した隣接データの間における規則性の有
無を検出する。圧縮方式選択手段25は、図1に示すよ
うに、規則性有無検出手段24が検出したデータに規則
性がある場合(例えば、二次差分が全て「0」の場合)
には、前記画像データを可逆圧縮方式で圧縮し、前記検
出したデータに規則性がない場合には、前記画像データ
を不可逆圧縮方式で圧縮することを選択する。不可逆圧
縮手段26としては、圧縮率が高く(数十分の一)、ま
た、圧縮率を任意に調整できるJPEG方式を用いる。
可逆圧縮手段27としては、前記「カラー画像圧縮方
式」を用いる。
The regularity detecting means 24 detects the regularity between the adjacent data calculated by the secondary difference calculating means 23. As shown in FIG. 1, the compression method selection unit 25 performs a case where the data detected by the regularity detection unit 24 has a regularity (for example, a case where all the secondary differences are “0”).
Then, the image data is compressed by a lossless compression method, and when the detected data has no regularity, the image data is compressed by an irreversible compression method. As the irreversible compression means 26, a JPEG method having a high compression ratio (several tenths) and capable of arbitrarily adjusting the compression ratio is used.
As the reversible compression means 27, the above-mentioned "color image compression method" is used.

【0041】即ち、前記圧縮方式選択手段25は、二次
差分の検出データに「規則性がある」場合は、グラデー
ション系に特化した圧縮率の高い可逆圧縮方式(「カラ
ー画像圧縮方式」)を採用し、伝送コストまたは媒体コ
ストを抑える。逆に、二次差分の検出データに「規則性
がない」場合は、圧縮率の高い不可逆圧縮方式(例え
ば、JPEG方式)を採用する。このようにすれば、規
則性のあるデータと規則性のないデータの双方を含む画
像データ(グラデーション系のデータ)の全体を見る
と、圧縮率を高くしても画像品質を高く維持できるの
で、伝送コストまたは媒体コストを低く抑制することが
可能となる。
That is, if the detection data of the secondary difference has "regularity", the compression method selection means 25 determines whether the reversible compression method ("color image compression method") having a high compression rate specialized for the gradation system is used. To reduce transmission or media costs. Conversely, when the detection data of the secondary difference is “irregular”, an irreversible compression method with a high compression ratio (for example, JPEG method) is adopted. In this manner, when the entire image data (gradation-based data) including both regular data and irregular data is viewed, the image quality can be maintained high even if the compression ratio is increased. Transmission cost or medium cost can be reduced.

【0042】記憶装置30は、入力画像データを記憶す
る入力画像データバッファ領域31と、出力圧縮データ
を記憶しておく出力圧縮データバッファ領域32と、圧
縮判定処理(後述)で使用する圧縮方式判定処理用ワー
ク領域33とを備える。出力装置40は、データ処理装
置20で圧縮され、伝送されてきたデータを復号展開す
る圧縮データ展開手段41を備えており、展開したデー
タを画面(表示装置)などに表示する。
The storage device 30 includes an input image data buffer area 31 for storing input image data, an output compressed data buffer area 32 for storing output compressed data, and a compression method determination used in compression determination processing (described later). And a work area 33 for processing. The output device 40 includes a compressed data decompression unit 41 that decodes and decompresses the data that has been compressed and transmitted by the data processing device 20, and displays the decompressed data on a screen (display device) or the like.

【0043】次に本実施形態の動作を、図3に示すフロ
ーチャート図を参照しつつ説明する。ここでは、R,
G,Bの各データがそれぞれ1バイト(8ビット)から
なる24ビットカラー画像の処理を例に説明する。あら
かじめR,G,Bの各プレーンに分割した後、図3に示
すフローチャート図に従った処理を行う。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG. Here, R,
The processing of a 24-bit color image in which each of G and B data is composed of 1 byte (8 bits) will be described as an example. After dividing into R, G, and B planes in advance, processing according to the flowchart shown in FIG. 3 is performed.

【0044】図3において、count, seq_c等の用語
は、それぞれ以下の意味を持つ。count:各プレーン共
通で処理対象のデータのバイト位置を示すカウンタseq_
c:第三のパターンの検出用カウンタ R[x],G[x],B[x] :各プレーンのx番目のデータ Diff1_R[x],Diff1_G,[x],Diff1_B[x] :x番目の一次差分データの保持配列 Diff2_R[x],Diff2_G,[x],Diff2_B[x] :x番目の二次差分データの保持配列 これらのデータは、記憶装置30の圧縮方式判定処理用
ワーク33に確保される。
In FIG. 3, terms such as count and seq_c have the following meanings, respectively. count: A counter seq_ indicating the byte position of the data to be processed in each plane.
c: Third pattern detection counter R [x], G [x], B [x]: x-th data of each plane Diff1_R [x], Diff1_G, [x], Diff1_B [x]: x-th Holding array of primary difference data Diff2_R [x], Diff2_G, [x], Diff2_B [x]: holding array of x-th secondary difference data These data are sent to the compression method determination work 33 of the storage device 30. Secured.

【0045】以下、図3に示すフローチャート図の処理
順に説明する。 ステップS1:カウンタ(count,seq_c)を初期化す
る。 ステップS2:各プレーンの1バイト目と0バイト目の
データの一次差分を求め、Diff1_R[1],Diff1_G[1],Di
ff1_B[1]に保持し、countを1インクリメントする。 ステップS3:各プレーンのcount+1バイト目とcountバ
イト目の一次差分を求め、Diff1_R[count],Diff1_G[co
unt],Diff1_B[count]に保持する。 ステップS4:各プレーンでcount番目とcount-1番目
の2つの一次差分データから二次差分を求め、二次差分
データ保持配列に保持する。
The processing will be described below in the order of processing in the flowchart shown in FIG. Step S1: Initialize a counter (count, seq_c). Step S2: The primary difference between the first byte and the 0th byte of each plane is calculated, and Diff1_R [1], Diff1_G [1], Di1
ff1_B [1] is held, and count is incremented by one. Step S3: The primary difference between the (count + 1) th byte and the (count) th byte of each plane is calculated, and Diff1_R [count], Diff1_G [co
unt], Diff1_B [count]. Step S4: In each plane, a secondary difference is obtained from the two primary difference data of the count and count-1 and is stored in the secondary difference data holding array.

【0046】ステップS5:もし、各プレーンの二次差
分が等しいならば(例えば、R,G,Bの二次差分が、
全て「0」であれば)、ステップS6に進む。そうでな
ければ、ステップS12に進みカウンタseq_cを初期化
する。 ステップS6:もし、二次差分の絶対値が1より小さい
ならば、ステップS7に進む。そうでなければ、ステッ
プS12に進む。 ステップS7:もし、二次差分が「0」ならば、グラデ
ーション系と判別し終了する(ステップS20)。即ち、
グラデーション系に特化した可逆圧縮を行って圧縮率を
高め(例えば、「カラー画像圧縮方式」を用いる)、伝
送コストまたは媒体コストを抑制する。そうでなけれ
ば、ステップS8に進む。
Step S5: If the secondary differences of the respective planes are equal (for example, the secondary differences of R, G, B are
If all are “0”, the process proceeds to step S6. Otherwise, the process proceeds to step S12 to initialize the counter seq_c. Step S6: If the absolute value of the secondary difference is smaller than 1, go to step S7. Otherwise, go to step S12. Step S7: If the secondary difference is “0”, it is determined to be a gradation system and the process ends (step S20). That is,
The compression ratio is increased by performing reversible compression specialized for gradation systems (for example, using a “color image compression method”), and transmission costs or medium costs are suppressed. Otherwise, go to step S8.

【0047】ステップS8:もし、第三のパターン検出
用カウンタseq_cが0ならば、ステップS10に進み該
カウンタseq_cを1インクリメントする。そうでなけれ
ばステップS9に進む。 ステップS9:一つ前の二次差分値との合計が0ならば
(例えば、二次差分「1」+「−1」=0)、第三のパ
ターンの検出処理を継続するためにステップS10に進
む。そうでなければ、ステップS12に進む。 ステップS10:第三のパターン検出用カウンタseq_c
を1インクリメントし、ステップS11に進む。 ステップS11:もし、第三のパターン検出用カウンタ
seq_cが2以上なら、第三のパターンを検出したものと
して終了する(ステップS20)。そうでなければ、ステ
ップS13に進む。
Step S8: If the third pattern detection counter seq_c is 0, the flow advances to step S10 to increment the counter seq_c by one. Otherwise, go to step S9. Step S9: If the sum with the immediately preceding secondary difference value is 0 (for example, secondary difference “1” + “− 1” = 0), step S10 is performed to continue the third pattern detection process. Proceed to. Otherwise, go to step S12. Step S10: Third pattern detection counter seq_c
Is incremented by 1 and the process proceeds to step S11. Step S11: If the third pattern detection counter
If seq_c is 2 or more, the process is terminated assuming that the third pattern has been detected (step S20). Otherwise, the process proceeds to step S13.

【0048】ステップS12:パターン検出用カウンタ
seq_cをリセットする。(0に初期化) ステップS13:バイト位置カウンタcountを1インク
リメントする。 ステップS14:もしバイト位置カウンタcountが処理
ブロック長(この場合は24ビット)を超えた場合は、
第四のパターンと判断し、終了する(ステップS21)。
そうでなければ、処理継続のためステップS3に進む。
Step S12: Counter for pattern detection
Reset seq_c. (Initialized to 0) Step S13: The byte position counter count is incremented by one. Step S14: If the byte position counter count exceeds the processing block length (24 bits in this case),
It is determined that the pattern is the fourth pattern, and the process ends (step S21).
Otherwise, the process proceeds to step S3 to continue the processing.

【0049】ステップS21:グラデーションパターン
を検出して終了する。可逆圧縮処理(例えば、「カラー
画像圧縮方式」)へ進む。 ステップS21:グラデーションパターンを検出せず終
了する。不可逆圧縮処理(例えば、JPEG方式)へ進
む。以上のようにして、二次差分の規則性の有無に基づ
いて圧縮方式を選択した後、可逆圧縮方式または不可逆
圧縮方式を実施することで、適切な品質を確保した圧縮
処理が可能となる。
Step S21: A gradation pattern is detected, and the processing ends. The process proceeds to a reversible compression process (for example, “color image compression method”). Step S21: end without detecting a gradation pattern. Proceed to irreversible compression processing (for example, JPEG method). As described above, after selecting the compression method based on the presence or absence of the regularity of the secondary difference, the lossless compression method or the irreversible compression method is performed, so that compression processing with appropriate quality can be performed.

【0050】[0050]

【発明の効果】以上説明したように本発明によれば、不
可逆圧縮と可逆圧縮を適切に選択することにより、伝送
コストまたは媒体コストを抑制しつつ、展開時の品質を
確保したカラー画像圧縮が可能となる。
As described above, according to the present invention, by appropriately selecting irreversible compression and lossless compression, it is possible to suppress the transmission cost or the medium cost and to achieve the color image compression which ensures the quality at the time of decompression. It becomes possible.

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

【図1】グラデーション系のカラー画像の各要素におけ
るデータが、四つの増減パターンを持つことを示す図で
ある。
FIG. 1 is a diagram showing that data in each element of a gradation-based color image has four increase / decrease patterns.

【図2】本発明の実施形態を適用するカラー画像圧縮装
置のブロック図である。
FIG. 2 is a block diagram of a color image compression apparatus to which an embodiment of the present invention is applied.

【図3】本発明のカラー画像圧縮装置の処理を説明する
フローチャート図である。
FIG. 3 is a flowchart illustrating the processing of the color image compression device of the present invention.

【図4】「カラー画像圧縮方式」のカラー画像圧縮方法
を説明するフローチャート図である。
FIG. 4 is a flowchart illustrating a color image compression method of a “color image compression method”.

【図5】「カラー画像圧縮方式」の実施形態で用いるコ
ードブックであって、(a)はデータ圧縮のコードブッ
ク、(b)はランレングス圧縮のコードブックである。
5A and 5B are codebooks used in the embodiment of the “color image compression method”, wherein FIG. 5A is a codebook for data compression, and FIG. 5B is a codebook for run-length compression.

【図6】「カラー画像圧縮方式」のカラー画像圧縮方法
を実施する画像圧縮装置のブロック図である。
FIG. 6 is a block diagram of an image compression apparatus that performs a color image compression method of a “color image compression method”.

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

KA カラー画像圧縮装置 10 入力装置 20 データ処理装置 21 RGBプレーン分割手段 22 一次差分算出手段 23 二次差分算出手段 24 規則性有無検出手段 25 圧縮方式選択手段 26 不可逆圧縮手段 27 可逆圧縮手段 30 記憶装置 31 入力画像データバッファ領域 32 出力圧縮データバッファ領域 33 圧縮方式判定処理ワーク 40 出力装置 41 圧縮データ展開手段 100 「カラー画像圧縮方式」を実施する画像圧縮装
置 110 入力装置 120 出力装置 130 データ処理装置 131 差分手段 132 ランレングス加算手段 133 データ圧縮手段 140 記憶装置 141 入力圧縮データバッファ領域 142 出力圧縮データバッファ領域
KA color image compression apparatus 10 input apparatus 20 data processing apparatus 21 RGB plane division means 22 primary difference calculation means 23 secondary difference calculation means 24 regularity detection means 25 compression method selection means 26 irreversible compression means 27 reversible compression means 30 storage device 31 Input image data buffer area 32 Output compressed data buffer area 33 Compression method determination processing work 40 Output device 41 Compressed data expansion means 100 Image compression device 110 that implements “color image compression method” 110 Input device 120 Output device 130 Data processing device 131 Difference means 132 Run length addition means 133 Data compression means 140 Storage device 141 Input compressed data buffer area 142 Output compressed data buffer area

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C057 AA11 BA13 DC11 EA01 EL01 EM00 5C059 MA00 MA45 ME01 ME05 PP01 PP15 UA02 5C078 AA09 BA22 BA32 CA02 CA21 DA01 5J064 AA01 BA09 BB01 BB05 BC25 BD03    ────────────────────────────────────────────────── ─── Continuation of front page    F term (reference) 5C057 AA11 BA13 DC11 EA01 EL01                       EM00                 5C059 MA00 MA45 ME01 ME05 PP01                       PP15 UA02                 5C078 AA09 BA22 BA32 CA02 CA21                       DA01                 5J064 AA01 BA09 BB01 BB05 BC25                       BD03

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 ホスト装置上に存在する画像データを、
伝送路または媒体を介して他の表示装置で表示する場合
に、前記画像データをホスト装置側で圧縮し、前記表示
装置上で展開するようにしたカラー画像圧縮装置におい
て、 前記画像データをR,G,Bの各プレーンに分割するR
GBプレーン分割手段と、 該RGBプレーン分割手段が分割した各プレーンにおけ
る隣接データの一次差分を算出する一次差分算出手段
と、 該一次差分算出手段が算出した一次差分の隣接データの
二次差分を算出する二次差分算出手段と、 該二次差分算出手段が算出した隣接データの間に規則性
があるかどうかを検出する規則性有無検出手段と、 該規則性有無検出手段が検出したデータに規則性がある
場合には、前記画像データを可逆圧縮方式で圧縮し、前
記検出したデータに規則性がない場合には、前記画像デ
ータを不可逆圧縮方式で圧縮することを選択する圧縮方
式選択手段とを備えたことを特徴とするカラー画像圧縮
装置。
1. An image data residing on a host device,
A color image compression device configured to compress the image data on the host device side and expand the image data on the display device when displaying the image data on another display device via a transmission path or a medium; R divided into G and B planes
GB plane dividing means, primary difference calculating means for calculating a primary difference between adjacent data in each plane divided by the RGB plane dividing means, and calculating a secondary difference between adjacent data of the primary difference calculated by the primary difference calculating means Secondary difference calculating means, regularity detecting means for detecting whether there is regularity between the adjacent data calculated by the secondary difference calculating means, and a rule for the data detected by the regularity detecting means. If there is a characteristic, the image data is compressed by a lossless compression method, and if the detected data has no regularity, a compression method selection unit that selects to compress the image data by an irreversible compression method. A color image compression device comprising:
【請求項2】 請求項1記載のカラー画像圧縮装置にお
いて、 前記可逆圧縮方式は、グラデーション系のカラー画像を
RGBの各プレーンに分割し、各プレーンにおける要素
のデータに対する一次差分を算出し、さらに、一次差分
に対する二次差分を算出して、該二次差分が零でないと
きに、当該二次差分を用いて、各プレーンを可変長符号
化し、さらに、前記二次差分が連続して零となるとき
に、当該零の連続数を用いて、各プレーンを可変長符号
化するカラー画像圧縮方式であることを特徴とするカラ
ー画像圧縮装置。
2. The color image compression apparatus according to claim 1, wherein the lossless compression method divides a gradation color image into RGB planes, calculates a first-order difference with respect to element data in each plane, Calculate the secondary difference for the primary difference, and when the secondary difference is not zero, use the secondary difference to perform variable length coding on each plane, and further, the secondary difference is continuously zero. A color image compression system that employs the number of consecutive zeros to perform variable-length encoding on each plane using a color image compression method.
【請求項3】 請求項1または請求項2記載のカラー画
像圧縮装置において、 前記規則性有無検出手段は、前記隣接データの二次差分
が全て「0」であることを検出する手段であることを特
徴とするカラー画像圧縮装置。
3. The color image compression device according to claim 1, wherein said regularity detecting means is means for detecting that all secondary differences of said adjacent data are “0”. A color image compression device characterized by the above-mentioned.
【請求項4】 請求項1または請求項2記載のカラー画
像圧縮装置において、 前記規則性有無検出手段は、前記隣接データの二次差分
の絶対値が全て絶対値「1」以下であることを検出する
手段であることを特徴とするカラー画像圧縮装置。
4. The color image compression apparatus according to claim 1, wherein said regularity detection means determines that all absolute values of secondary differences between said adjacent data are less than or equal to an absolute value “1”. A color image compression device, which is a means for detecting.
【請求項5】 ホスト装置上に存在する画像データを、
伝送路または媒体を介して他の表示装置で表示する場合
に、前記画像データをホスト装置側で圧縮し、前記表示
装置上で展開するようにしたカラー画像圧縮方法におい
て、 前記画像データをR,G,Bの各プレーンに分割するス
テップと、 該分割した各プレーンにおける隣接データの一次差分を
算出するステップと、 該算出した一次差分の隣接データの二次差分を算出する
ステップと、 該算出した隣接データの間に規則性があるかどうかを検
出するステップと、 該検出したデータに規則性がある場合には、前記画像デ
ータを可逆圧縮方式で圧縮し、前記検出したデータに規
則性がない場合には、前記画像データを不可逆圧縮方式
で圧縮するステップとを備えたことを特徴とするカラー
画像圧縮方法。
5. An image data existing on a host device,
A color image compression method for compressing the image data on the host device side and expanding the image data on the display device when displaying the image data on another display device via a transmission path or a medium; Dividing the plane into G and B planes, calculating a primary difference between adjacent data in each of the divided planes, calculating a secondary difference between adjacent data of the calculated primary differences, Detecting whether there is regularity between adjacent data; and, if the detected data has regularity, compressing the image data by a lossless compression method, and the detected data has no regularity. A step of compressing the image data by an irreversible compression method.
【請求項6】 請求項5記載のカラー画像圧縮方法にお
いて、 前記規則性の有無を検出するステップは、前記隣接デー
タの二次差分が全て「0」であることを検出するステッ
プであることを特徴とするカラー画像圧縮方法。
6. The color image compression method according to claim 5, wherein the step of detecting the presence or absence of the regularity is a step of detecting that all the secondary differences of the adjacent data are “0”. Characteristic color image compression method.
【請求項7】 請求項5記載のカラー画像圧縮方法にお
いて、 前記規則性の有無を検出するステップは、前記隣接デー
タの二次差分の絶対値が全て「1」以下であることを検
出するステップであることを特徴とするカラー画像圧縮
方法。
7. The color image compression method according to claim 5, wherein the step of detecting the presence or absence of the regularity includes the step of detecting that the absolute values of the secondary differences between the adjacent data are all “1” or less. A color image compression method, characterized in that:
JP2002149778A 2002-05-23 2002-05-23 Color image compression apparatus and method Expired - Fee Related JP3792600B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002149778A JP3792600B2 (en) 2002-05-23 2002-05-23 Color image compression apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002149778A JP3792600B2 (en) 2002-05-23 2002-05-23 Color image compression apparatus and method

Publications (2)

Publication Number Publication Date
JP2003348359A true JP2003348359A (en) 2003-12-05
JP3792600B2 JP3792600B2 (en) 2006-07-05

Family

ID=29767836

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002149778A Expired - Fee Related JP3792600B2 (en) 2002-05-23 2002-05-23 Color image compression apparatus and method

Country Status (1)

Country Link
JP (1) JP3792600B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005189937A (en) * 2003-12-24 2005-07-14 Olympus Corp Gradation image forming device and method
JP2008042687A (en) * 2006-08-08 2008-02-21 Canon Inc Image processing apparatus and its control method, computer program and computer readable storage medium
JP2008042682A (en) * 2006-08-08 2008-02-21 Canon Inc Image processing apparatus and its control method, computer program and computer readable storage medium
JP2014082660A (en) * 2012-10-17 2014-05-08 Dainippon Printing Co Ltd Method and device to compress and expand array data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005189937A (en) * 2003-12-24 2005-07-14 Olympus Corp Gradation image forming device and method
US7660012B2 (en) 2003-12-24 2010-02-09 Olympus Corporation Gradation image forming apparatus and gradation image forming method
JP2008042687A (en) * 2006-08-08 2008-02-21 Canon Inc Image processing apparatus and its control method, computer program and computer readable storage medium
JP2008042682A (en) * 2006-08-08 2008-02-21 Canon Inc Image processing apparatus and its control method, computer program and computer readable storage medium
JP2014082660A (en) * 2012-10-17 2014-05-08 Dainippon Printing Co Ltd Method and device to compress and expand array data

Also Published As

Publication number Publication date
JP3792600B2 (en) 2006-07-05

Similar Documents

Publication Publication Date Title
US6501859B1 (en) Image compression using wavelet data or original image data depending on code amount
US6219456B1 (en) Picture coding apparatus and method thereof
US6798833B2 (en) Video frame compression/decompression hardware system
JP4697967B2 (en) Image coding apparatus and control method thereof
JP2005191939A (en) Image compression apparatus and program for generating predicted difference compressed data of fixed bit length, and, image expansion apparatus, image expansion program, and electronic camera
JPH07240917A (en) Data compression method
JP2001204022A (en) Data compressor and data compression method
US6157327A (en) Encoding/decoding device
JP2003348359A (en) Color image compressing apparatus and method therefor
JP3952116B2 (en) Image compression apparatus and method
JP3282527B2 (en) Image coding device
JP2581421B2 (en) Video compression encoding method
US9936211B2 (en) Compression device and compression method
JP3709381B2 (en) Color image compression method
JP4241517B2 (en) Image encoding apparatus and image decoding apparatus
JP2735001B2 (en) Image coding device
US20070154102A1 (en) Image decompression system, method and program
JP4731972B2 (en) Image encoding method and image encoding apparatus
JP2004320711A (en) Data processing apparatus, falsification discrimination apparatus, data processing program, and falsification discrimination program
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit
US20150245029A1 (en) Image processing system and method
JPH0896141A (en) Image processor
JP2000068855A (en) Compression method for digital data
JP2000138933A (en) Image coder
JP2833235B2 (en) Orthogonal transform coding device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050704

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050712

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051025

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051118

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060314

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060405

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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: 20100414

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110414

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120414

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120414

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130414

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20130414

Year of fee payment: 7

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees