JP4996501B2 - Multidimensional data encoding apparatus, decoding apparatus, and control method therefor - Google Patents

Multidimensional data encoding apparatus, decoding apparatus, and control method therefor Download PDF

Info

Publication number
JP4996501B2
JP4996501B2 JP2008037951A JP2008037951A JP4996501B2 JP 4996501 B2 JP4996501 B2 JP 4996501B2 JP 2008037951 A JP2008037951 A JP 2008037951A JP 2008037951 A JP2008037951 A JP 2008037951A JP 4996501 B2 JP4996501 B2 JP 4996501B2
Authority
JP
Japan
Prior art keywords
data
difference
dimensional
encoding
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008037951A
Other languages
Japanese (ja)
Other versions
JP2008278464A (en
Inventor
浩 梶原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2008037951A priority Critical patent/JP4996501B2/en
Priority to CN2008100900809A priority patent/CN101282410B/en
Priority to EP08154015.5A priority patent/EP1978749B1/en
Priority to US12/062,907 priority patent/US8213729B2/en
Publication of JP2008278464A publication Critical patent/JP2008278464A/en
Application granted granted Critical
Publication of JP4996501B2 publication Critical patent/JP4996501B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は多次元データの符号化、復号技術に関するものである。   The present invention relates to a technique for encoding and decoding multidimensional data.

スキャナ、デジカメ、プリンタなどの画像入/出力装置は、それぞれ固有の色空間の画像の入力、或いは出力を行なう。これら固有の色空間を持つデバイス間で、カラー画像データを交換する場合、各デバイス独自の色とデバイスに依存しない色とを対応付けるカラープロファイルが用いられる。カラープロファイルの形式としては、International Colour Consortium(ICC)が策定したフォーマット(ICCプロファイル)が良く知られている。   Image input / output devices such as scanners, digital cameras, and printers each input or output an image in a specific color space. When color image data is exchanged between devices having these unique color spaces, a color profile that associates a color unique to each device with a color independent of the device is used. As a color profile format, a format (ICC profile) established by the International Color Consortium (ICC) is well known.

多くの場合、カラープロファイルには異なる2つの色空間を対応づけるカラーのルックアップテーブルが含まれている。このようなカラールックアップテーブルは複数成分を有する多次元配列データとみることができる。例えば、入力デバイスのRGBカラーとLabなどデバイスに依存しない標準色空間への対応を示したカラールックアップテーブルは、3次元3成分の多次元配列である。また、標準色空間と出力デバイスのCMYKデータとの対応づけるカラールックアップテーブルは、3次元4成分の多次元配列である。更に、CMYKと表示デバイスでのsRGBへの対応を示したカラールックアップテーブルは4次元3成分の多次元配列と見ることができる。   In many cases, a color profile includes a color lookup table that associates two different color spaces. Such a color lookup table can be regarded as multidimensional array data having a plurality of components. For example, a color look-up table showing the correspondence between RGB colors of input devices and standard color spaces that do not depend on devices such as Lab is a multi-dimensional array of three-dimensional three components. The color lookup table that associates the standard color space with the CMYK data of the output device is a three-dimensional, four-component multidimensional array. Furthermore, the color look-up table showing the correspondence between CMYK and sRGB in the display device can be viewed as a four-dimensional, three-component multidimensional array.

近年、カラー画像デバイスの高精度化により、このようなカラールックアップテーブルの各要素のデータ表現も8ビットから16ビットへと増加している。また、2つの色空間のマッピング方法も単一ではなく、用途に応じて使い分けられるように複数個定義されることがある。   In recent years, with the increase in accuracy of color image devices, the data representation of each element of such a color lookup table has also increased from 8 bits to 16 bits. Also, the mapping method of the two color spaces is not single, and a plurality of mapping methods may be defined so that they can be used properly according to the application.

複数の入力、出力デバイスに対応してカラーマッチングを行う画像処理装置用のソフトウェアを配布する場合には、そのアプリケーションと一緒に、対応するカラープロファイルデータを配布する必要がある。   When distributing software for an image processing apparatus that performs color matching corresponding to a plurality of input / output devices, it is necessary to distribute corresponding color profile data together with the application.

カラープロファイルの数が増えていくと、アプリケーションソフトウェアを記憶メディアに格納して配布する場合には多くの記憶容量を必要とするといった問題や、インターネット上でのダウンロードにより配布する場合には、伝送時間がかかってしまう。   As the number of color profiles increases, there is a problem that a large amount of storage capacity is required when distributing application software stored on storage media, and transmission time when distributing by downloading over the Internet. It will take.

かかる点に鑑み、例えば特許文献1は、プロファイルのカラールックアップテーブルを蛇行スキャンして1次元化し、前値との差分をランレングス、ハフマン符号化、LZ符号化などを用いて符号化する手法を開示している。
特開平11−17971号公報
In view of this point, for example, Patent Document 1 discloses a method in which a profile color lookup table is scanned in a meandering manner to be one-dimensional, and a difference from the previous value is encoded using run length, Huffman encoding, LZ encoding, or the like. Is disclosed.
Japanese Patent Laid-Open No. 11-17971

しかしながら、上記のような一元化する場合の圧縮率は高いものとは言えず、未だ、カラールックアップテーブルに適した圧縮手法は確立していないのが現状である。   However, it cannot be said that the compression rate in the case of unification as described above is high, and a compression method suitable for a color lookup table has not yet been established.

本願発明は、上述の問題点に鑑みてなされたものである。すなわち、本発明は、カラールックアップテーブルのような空間内の隣接する要素が互いに相関度の高い関係を有する多次元データを、簡単な構成で、高い圧縮率で可逆符号化すると共に、その符号化データを復号する技術を提供しようとするものである。   The present invention has been made in view of the above-mentioned problems. That is, the present invention reversibly encodes multidimensional data such as a color look-up table in which adjacent elements in a space have a high correlation with each other with a simple configuration and a high compression rate. The present invention intends to provide a technique for decoding encrypted data.

この課題を解決するため、例えば本発明の多次元データの符号化装置は以下の構成を備える。すなわち、
M(M≧3)次元で表される多次元空間における、Nビットで表わされ、非負の値を持つ要素データを可逆符号化する符号化装置であって、
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力手段と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成手段と、
該生成手段により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化手段とを備え
前記生成手段は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングすることを特徴とする
In order to solve this problem, for example, the multidimensional data encoding apparatus of the present invention comprises the following arrangement. That is,
An encoding device that losslessly encodes element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
Input means for sequentially updating the value α of one dimension axis of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) Generating means for calculating element difference data represented by the N bits and indicating a difference of the two-dimensional difference element data set D (α) composed of the element difference data;
Encoding means for predictively encoding the two-dimensional difference element data set D (α) generated by the generation means within the two-dimensional difference element data set D (α) ;
The generating means includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
As a result, the difference element data Dv is mapped to the same N bits as the element data to be encoded .

本発明によれば、カラールックアップテーブルのような空間内の隣接する要素が互いに相関度の高い関係を有する多次元データを、簡単な構成で、高い圧縮率で可逆符号化すると共に、その符号化データを復号することが可能になる。   According to the present invention, multidimensional data in which adjacent elements in a space such as a color look-up table have a high correlation with each other are losslessly encoded with a high compression rate with a simple configuration. It becomes possible to decode the digitized data.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。   Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

<第1の実施形態>
先ず、多次元データの代表として色空間の変換用のカラールックアップテーブルを構成するデータを符号化する多次元データ符号化装置を説明する。
<First Embodiment>
First, a multidimensional data encoding apparatus that encodes data constituting a color lookup table for color space conversion as a representative of multidimensional data will be described.

図1は本第1の実施形態に係る多次元データ符号化装置のブロック構成図である。   FIG. 1 is a block diagram of the multidimensional data encoding apparatus according to the first embodiment.

図1に示すように、本実施形態に係る装置は、多次元データ入力部101、プレーンバッファ102、プレーン間差分生成部103、バッファ104、多値データ予測部105、予測誤差生成部106、予測誤差符号化部107、ハフマンテーブル用メモリ108、符号列形成部109、及び、装置全体の制御を司る制御部150を備える。同図において110、111、112は信号線を表す。なお、本実施形態では、多次元データ入力部101は、予め符号化対象となる多次元データを記憶してある記憶媒体をアクセスする装置とする。しかしながら、そのデータがネットワーク上のサーバに格納されている場合には、ネットワークインタフェースで構成しても良く、その種類は問わない。   As illustrated in FIG. 1, the apparatus according to the present embodiment includes a multidimensional data input unit 101, a plane buffer 102, an interplane difference generation unit 103, a buffer 104, a multilevel data prediction unit 105, a prediction error generation unit 106, and a prediction. An error encoding unit 107, a Huffman table memory 108, a code string forming unit 109, and a control unit 150 that controls the entire apparatus are provided. In the figure, reference numerals 110, 111, and 112 denote signal lines. In the present embodiment, the multidimensional data input unit 101 is an apparatus that accesses a storage medium in which multidimensional data to be encoded is stored in advance. However, when the data is stored in a server on the network, it may be configured with a network interface, and the type is not limited.

以下、図1を参照して、本第1の実施形態の多次元データ符号化装置の処理について説明する。   Hereinafter, processing of the multidimensional data encoding apparatus according to the first embodiment will be described with reference to FIG.

まず、前提として、本第1の実施形態に係る多次元データ符号化装置において処理対象となる多次元データは、X,Y、Zの3軸を有する3次元配列であるとする。また、3次元配列の各要素は16ビットで表現される非負の整数値データ(以降、多値データと称する)であるとする。そして、この多次元データの範囲は、各座標軸X,Y,Zについて“0”から“N−1”までの範囲とする。すなわち、多次元データは、N×N×N個の多値データで構成されるものとする。1つのデータは座標軸X,Y,Zの各値x,y,zで特定できるので、その多次元データI(x,y,z)と表す。なお、多次元データI(x,y,z)で示される多値データはN×N×N個の3次元配列に限らず、4次元の配列であっても良い。また、N×M×L個といった具合に各次元と取り得る範囲が異なっても構わない。   First, as a premise, the multidimensional data to be processed in the multidimensional data encoding device according to the first embodiment is assumed to be a three-dimensional array having three axes of X, Y, and Z. Each element of the three-dimensional array is assumed to be non-negative integer value data (hereinafter referred to as multi-value data) expressed by 16 bits. The range of the multidimensional data is a range from “0” to “N−1” for each coordinate axis X, Y, Z. That is, the multidimensional data is assumed to be composed of N × N × N multivalued data. Since one data can be specified by the respective values x, y, z of the coordinate axes X, Y, Z, it is expressed as multidimensional data I (x, y, z). The multi-value data indicated by the multi-dimensional data I (x, y, z) is not limited to N × N × N three-dimensional arrays, and may be a four-dimensional array. Further, the range that can be taken for each dimension may be different, such as N × M × L.

また、座標(x,y,z)で特定される3次元配列の要素が、例えばI0(x,y,z)、I1(x、y、z)、…、In(x,y,z)といった具合に、複数の成分値を有するものであっても構わない。これは、カラールックアップテーブルの場合に相当するが、説明を単純なものとするため、実施形態では、1つの座標につき、1つデータ(先に説明したように16ビットの多値データ)が格納される多次元データを符号化対象とする。なお、各要素のビット数も16にビットに限らず、8、10、12ビットなどであっても良い。上記はあくまで一例であると認識されたい。   The elements of the three-dimensional array specified by the coordinates (x, y, z) are, for example, I0 (x, y, z), I1 (x, y, z),..., In (x, y, z). For example, it may have a plurality of component values. Although this corresponds to the case of a color lookup table, in order to simplify the description, in the embodiment, one data (16-bit multi-value data as described above) is obtained for one coordinate. The stored multidimensional data is the encoding target. The number of bits of each element is not limited to 16, but may be 8, 10, 12 bits, or the like. It should be recognized that the above is merely an example.

図2は、本実施形態で入力される多次元データの概略図である。実施形態では、各次元の長さがNとしているので、図示の如く、3方が長さNの立方体形状を成している。   FIG. 2 is a schematic diagram of multidimensional data input in the present embodiment. In the embodiment, since the length of each dimension is N, three sides form a cube shape having a length N as illustrated.

まず、多次元データ入力部101は、符号化対象の多次元データを構成する個々の多値データを入力される。多値データの入力順はZ軸のパラメータzを0からN−1に向けて順番に変化させる。そして、パラメータzの値で定義される、パラメータx、yで表わされる平面を以下プレーンと呼ぶ。多値データは、このプレーンのラスタースキャン順に入力されるものとする。符号化対象が3次元空間であるのに対し、1つのプレーンはそれより1次元少ない2次元の要素の集合とも言える。   First, the multidimensional data input unit 101 receives individual multivalued data constituting the multidimensional data to be encoded. The input order of the multi-value data changes the Z-axis parameter z in order from 0 to N-1. The plane defined by the parameters x and y defined by the value of the parameter z is hereinafter referred to as a plane. It is assumed that multi-value data is input in the raster scan order of this plane. While the encoding target is a three-dimensional space, one plane can be said to be a set of two-dimensional elements one dimension less than that.

図3(a)で斜線で示した部分は、z=0に固定して、x、yを変化させて構成されるプレーンである。最初に、このプレーンを構成する多値データがラスタースキャン順に入力される。そして、続いてz=1、z=2、…、z=N−1まで、順番に各プレーンの多値データがラスタースキャン順に走査されて入力される。   A portion indicated by hatching in FIG. 3A is a plane configured by changing x and y while fixing z = 0. First, multi-value data constituting this plane is input in the raster scan order. Subsequently, the multi-value data of each plane is scanned and input in order of raster scan until z = 1, z = 2,..., Z = N−1.

図3(b)は、0≦α<N(但し、値αは非負の整数)の任意の値αについて、z=αとしたプレーン(データ集合I(α))を図示したものである。以降の説明において、個々のプレーンを指す場合には、z=0であるプレーンをプレーンz0、z=1であるプレーンをプレーンz1というように、記号zとその値を「プレーン」に後続させて表現する。従って、図3(b)に示されるプレーンは「プレーンzα」と表現できる。   FIG. 3B illustrates a plane (data set I (α)) where z = α for an arbitrary value α of 0 ≦ α <N (where the value α is a non-negative integer). In the following description, when referring to individual planes, the symbol z and its value follow the “plane” so that the plane where z = 0 is the plane z0 and the plane where z = 1 is the plane z1. Express. Therefore, the plane shown in FIG. 3B can be expressed as “plane zα”.

プレーンバッファ102は1プレーン分の多値データ、即ち、N×N個の多値データを格納するための領域を持つFIFOのバッファで構成される。このプレーンバッファ102は内部に常にN×N個の要素を保持し、多値データ入力部101から入力される多値データI(x,y,z)を格納すると同時に、1プレーン前のデータI(x,y,z−1)を出力する。符号化開始時は、プレーンバッファ102に格納されるN×N個のデータは全て“0”に初期化される。この初期化されたデータは、多値画素データI(x,y,0)を入力した際のI(x,y,−1)に相当するデータと言えば分かりやすい。   The plane buffer 102 is composed of a FIFO buffer having an area for storing multi-level data for one plane, that is, N × N multi-level data. The plane buffer 102 always holds N × N elements therein and stores the multi-value data I (x, y, z) input from the multi-value data input unit 101, and at the same time, the data I one plane before (X, y, z-1) is output. At the start of encoding, all the N × N data stored in the plane buffer 102 are initialized to “0”. The initialized data is easy to understand if it is data corresponding to I (x, y, −1) when the multi-value pixel data I (x, y, 0) is input.

プレーン間差分生成部103は、多次元データ入力部101から信号線110を介して入力される要素の多値データI(x,y,z)と、プレーンバッファ102から出力されてくる1つ前のプレーンの要素の多値データI(x,y,z−1)の差分を求める。これは、要素データ集合I(z)と要素集合I(z−1)との差分を算出することに相当する。プレーン間差分生成部103は、更に、差分のビット数の増加を抑えるために2^15(ここで「i^j」は値iのj乗を表わす)をその差分に加算した後に、その加算結果の2^16の剰余演算を行ってプレーン間差分値D(x,y,z−1)を生成する。これは差分要素データ集合Dを算出するとも言える。プレーン間差分値D(着目要素差分データ)は次式で表される。
D(x,y,z)=Mod(I(x,y,z)−I(x,y,z-1) + 2^15 , 2^16 )
上式において、Mod(i,j)は整数値iを整数jで割った剰余を表す。値jは正の整数である。 値iは非負の整数の場合には説明は不要であろう。そこで、値iが負の場合について簡単に説明する。
The inter-plane difference generation unit 103 receives the element multi-value data I (x, y, z) input from the multi-dimensional data input unit 101 via the signal line 110 and the previous one output from the plane buffer 102. The difference of the multi-value data I (x, y, z-1) of the elements of the plane is obtained. This corresponds to calculating the difference between the element data set I (z) and the element set I (z−1). The inter-plane difference generation unit 103 further adds 2 ^ 15 (where "i ^ j" represents the value i to the power of j) to the difference in order to suppress an increase in the number of bits of the difference, and then adds the difference. The resulting 2 @ 16 residue operation is performed to generate an interplane difference value D (x, y, z-1). This can be said to calculate the difference element data set D. The inter-plane difference value D (target element difference data) is expressed by the following equation.
D (x, y, z) = Mod (I (x, y, z) -I (x, y, z-1) + 2 ^ 15, 2 ^ 16)
In the above equation, Mod (i, j) represents a remainder obtained by dividing the integer value i by the integer j. The value j is a positive integer. The value i will not be explained if it is a non-negative integer. Therefore, the case where the value i is negative will be briefly described.

値iは、i=n×m +rの式を満たす0からm−1の範囲の整数値rを持つものと見なす。例えば、値i=−5,除数が“3”のMod(−5,3)の場合、
条件1:i=−5=n×3+r
条件2:0≦r≦2
を満たさなければならないわけであるから、n=−2、r=1となる。すなわち、Mod(−5,3)は、Mod(1,3)と見なして演算する。
The value i is considered to have an integer value r in the range of 0 to m−1 that satisfies the equation i = n × m + r. For example, in the case of Mod (−5, 3) where the value i = −5 and the divisor is “3”,
Condition 1: i = −5 = n × 3 + r
Condition 2: 0 ≦ r ≦ 2
Therefore, n = -2 and r = 1. That is, Mod (−5, 3) is calculated assuming that it is Mod (1, 3).

上記を更に分かりやすく説明すると次の通りである。説明を簡単なものとするため、2つの値Va,Vbが共に8ビットで表わされる非負の整数であるものとする。値Va,Vbは共に8ビットであるから、それぞれの取り得る範囲は0〜255の値であり、これ以外はあり得ないことに注意されたい。減算「Va−Vb」は、単純には−255〜+255の値を取り得る。しかし、Vaが“0”の場合、「Va−Vb」の値は、必ず−255〜0の範囲、すなわち、256種類中の1つの値となる。一方、Vbが“0”の場合には、「Va−Vb」の値は0〜+255、やはり、256種類中の1つの値となる。つまり、8ビットで表わされる2つの値の減算結果は、常に256種類の中の1つとなる、と言える。この減算結果に中間値128を加算して、256で剰余(あまり)を求めることで、減算結果を0〜255の値にマッピングできる。Va=0の例では、−255〜−129の値は129〜255に、−128〜0の値は0〜128に割り当てられる。また、Vb=0の例では、0〜127の値は128〜255に、128〜255の値は0〜127に割り当てられる。   The above will be explained in a more easy-to-understand manner as follows. In order to simplify the description, it is assumed that the two values Va and Vb are both non-negative integers represented by 8 bits. It should be noted that since the values Va and Vb are both 8 bits, each possible range is a value from 0 to 255, and there is no other possible value. The subtraction “Va−Vb” can simply take a value of −255 to +255. However, when Va is “0”, the value of “Va−Vb” is always in the range of −255 to 0, that is, one value in 256 types. On the other hand, when Vb is “0”, the value of “Va−Vb” is 0 to +255, which is also one of 256 types. That is, it can be said that the subtraction result of two values represented by 8 bits is always one of 256 types. By adding the intermediate value 128 to this subtraction result and obtaining a remainder (too much) at 256, the subtraction result can be mapped to a value of 0-255. In the example of Va = 0, a value of −255 to −129 is assigned to 129 to 255, and a value of −128 to 0 is assigned to 0 to 128. In the example of Vb = 0, the value of 0 to 127 is assigned to 128 to 255, and the value of 128 to 255 is assigned to 0 to 127.

さて、上記のようにして生成されるプレーン間差分値D(x,y,z)は入力多値データI(x,y,z)と同じビット数の情報となる。   The inter-plane difference value D (x, y, z) generated as described above is information having the same number of bits as the input multi-value data I (x, y, z).

バッファ104は信号線111から入力されるプレーン間差分値D(x,y,z)をN+1個分格納する容量を有する。   The buffer 104 has a capacity for storing N + 1 inter-plane difference values D (x, y, z) input from the signal line 111.

図4の斜線部はD(x,y,z)の入力時点でバッファ104に格納されるN+1個のプレーン間差分値Dデータを模式的に示したものである。以下、この座標(x,y,z)のプレーン間差分値D(x,y,z)を、着目データDi(要素差分データDiとも言う)と表現する。また、着目データDiの近傍に位置し、符号化処理済みの3つのデータをDa,Db,Dcとし、それら3つのデータを着目データDiの近傍データと呼ぶ。図5は、着目データDi(図示の*印)と、近傍データDa,Db,Dcとの相対位置関係を示している。近傍データDa,Db,Dcは次のように表わせる。
Da=D(x−1,y,z)(すなわち、着目データの左隣位置にあるデータ)
Db=D(x,y−1,z)(すなわち、着目データの真上位置にあるデータ)
Dc=D(x−1,y−1,z)(すなわち、着目データの左上位置にあるデータ)
The hatched portion in FIG. 4 schematically shows N + 1 inter-plane difference value D data stored in the buffer 104 when D (x, y, z) is input. Hereinafter, the inter-plane difference value D (x, y, z) of the coordinates (x, y, z) is expressed as the data of interest Di (also referred to as element difference data Di). Also, the three data that are located in the vicinity of the data of interest Di and have been encoded are Da, Db, and Dc, and these three data are called the data of the vicinity of the data of interest Di. FIG. 5 shows the relative positional relationship between the data of interest Di (* in the drawing) and the neighboring data Da, Db, Dc. The neighborhood data Da, Db, Dc can be expressed as follows.
Da = D (x-1, y, z) (that is, data at the position adjacent to the left of the data of interest)
Db = D (x, y-1, z) (that is, data at a position directly above the data of interest)
Dc = D (x-1, y-1, z) (that is, data at the upper left position of the data of interest)

多値データ予測部105は、着目データDiの入力のタイミングに同期して、バッファ104をアクセスし、バッファ104内の着目データDiの近傍データDa,Db,Dcを入力する。そして、多値データ予測部105は、着目データDiの予測値pを以下の予測式に従って算出し、その算出した予測値pを予測誤差生成部106に出力する。
p=Da+Db−Dc
The multi-value data prediction unit 105 accesses the buffer 104 in synchronization with the input timing of the target data Di, and inputs the neighborhood data Da, Db, Dc of the target data Di in the buffer 104. Then, the multi-value data prediction unit 105 calculates the predicted value p of the data of interest Di according to the following prediction formula, and outputs the calculated predicted value p to the prediction error generation unit 106.
p = Da + Db-Dc

なお、予測値pの算出には例外がある。着目データDiの座標がプレーンの左上隅位置(X、Y座標が共に“0”)にあるとき、近傍データDa,Db,Dcはいずれもプレーン外となってしまう。この場合には、多値データ予測部105は、予測値pを“32768”(16ビットで表わされる最大値の半分の値)であるものとして出力する。また、着目データDiの座標がプレーンの左上隅位置以外の、最初のライン上にある場合(Y座標が“0”)には、多値データ予測部105は、データDaを予測値pとして出力する。そして、着目データDiの座標がプレーンの左上隅位置以外の、左端位置にある場合(X座標が“0”)、多値データ予測部105は、データDbを予測値pとして出力する。なお、この例外ルールは、復号装置と同じにすれば良いので、上記によって本発明が限定されるものではない。   There is an exception in the calculation of the predicted value p. When the coordinates of the data of interest Di are at the upper left corner position of the plane (both X and Y coordinates are “0”), the neighboring data Da, Db, and Dc are all out of the plane. In this case, the multi-value data prediction unit 105 outputs the predicted value p as “32768” (half the maximum value represented by 16 bits). When the coordinates of the data of interest Di are on the first line other than the upper left corner position of the plane (Y coordinate is “0”), the multi-value data prediction unit 105 outputs the data Da as the predicted value p. To do. When the coordinate of the data of interest Di is at the left end position other than the upper left corner position of the plane (X coordinate is “0”), the multi-value data prediction unit 105 outputs the data Db as the predicted value p. The exception rule may be the same as that of the decryption device, and the present invention is not limited to the above.

予測誤差生成部106は信号線111を介して入力した着目データDi(=プレーン間差分値D(x,y,z))と、多値データ予測部105から入力した予測値pとの差分値を求め、その差分値を予測誤差eとして予測誤差符号化部107に出力する。   The prediction error generation unit 106 is a difference value between the target data Di (= inter-plane difference value D (x, y, z)) input via the signal line 111 and the prediction value p input from the multi-value data prediction unit 105. And the difference value is output to the prediction error encoding unit 107 as a prediction error e.

予測誤差符号化部107は、まず、予測誤差生成部106から入力される予測誤差eが複数のグループのいずれに分類できるかを判定し、そのグループ番号SSSSと、グループごとに定められるビット長の付加ビットを生成する。   The prediction error encoding unit 107 first determines whether the prediction error e input from the prediction error generation unit 106 can be classified into a plurality of groups, and the group number SSSS and the bit length determined for each group are determined. Generate additional bits.

図6に予測誤差eとグループ番号SSSSの関係を示す。付加ビットはグループ内で予測誤差を特定するための情報であり、そのビット長はグループ番号SSSSで与えられる。なお、SSSS=16である場合には例外的に付加ビットのビット長は0である。また、予測誤差eが正であるならば予測誤差eの下位SSSSビットが付加ビットとなり、負である場合にはe−1の下位SSSSビットが付加ビットとなる。付加ビットの最上位ビットは予測誤差eが正であれば1、負であれば0となる。予測誤差符号化部107の予測誤差eに対する符号の生成処理は、先ず、ハフマンテーブル用メモリ108に格納されているハフマンテーブル(図7)を参照して、グループ番号SSSSに対応する符号化データを出力する。次いで、SSSSが0または16でない場合には、続いてグループ番号により定まるビット長の付加ビットを出力する、という順序で行われる。   FIG. 6 shows the relationship between the prediction error e and the group number SSSS. The additional bits are information for specifying the prediction error within the group, and the bit length is given by the group number SSSS. Note that the bit length of the additional bits is exceptionally 0 when SSSS = 16. If the prediction error e is positive, the lower SSSS bits of the prediction error e are additional bits, and if it is negative, the lower SSSS bits of e-1 are additional bits. The most significant bit of the additional bits is 1 if the prediction error e is positive, and 0 if it is negative. The code generation process for the prediction error e of the prediction error encoding unit 107 is performed by first referring to the Huffman table (FIG. 7) stored in the Huffman table memory 108 and encoding data corresponding to the group number SSSS. Output. Next, when SSSS is not 0 or 16, an additional bit having a bit length determined by the group number is output.

符号列形成部109は、符号化処理の初期段階で、付加情報(ヘッダ)を生成し、信号線112上に出力する。この付加情報は、符号化対象となる多次元データのX,Y,Z軸方向の要素数(本実施形態の場合は全てN)、多次元データの各要素を構成する成分の数(本実施形態では1)、各成分の精度(実施形態では16ビット)や、予測誤差符号化部107で使用したハフマンテーブルの情報など復号時に必要とされる情報である。そして、符号列形成部109は、そのヘッダに後続して、予測誤差符号化部107から出力される各プレーンの符号化データを信号線112上に出力する。この結果、信号線112を介して出力された符号化データは、図8の構造を持つことになる。なお、信号線112の出力先はハードディスク等の記憶媒体或いは記憶装置とするが、ネットワークとしても良く、その出力先の種類は問わない。   The code string forming unit 109 generates additional information (header) and outputs it on the signal line 112 at the initial stage of the encoding process. This additional information includes the number of elements in the X, Y, and Z-axis directions of the multidimensional data to be encoded (all N in this embodiment) and the number of components constituting each element of the multidimensional data (this embodiment). 1) in the form, and information required at the time of decoding, such as the accuracy of each component (16 bits in the embodiment) and information of the Huffman table used in the prediction error encoding unit 107. Then, the code string forming unit 109 outputs the encoded data of each plane output from the prediction error encoding unit 107 onto the signal line 112 following the header. As a result, the encoded data output via the signal line 112 has the structure shown in FIG. Although the output destination of the signal line 112 is a storage medium such as a hard disk or a storage device, it may be a network, and the type of output destination is not limited.

次に、上記多次元データ符号化装置で生成された符号化データを復号する復号装置について説明する。図9は復号装置のブロック構成図である。本装置は、図示の如く、符号バッファ901、ヘッダ解析部902、予測誤差復号部903、プレーン間差分復号部904、多次元データ復号部905、多次元データ出力部906、ハフマンテーブル用メモリ108、バッファ104、多値データ予測部105、プレーンバッファ102、及び、装置全体の制御を司る制御部950とを備える。同図において907、908は信号線を示す。図1に示した符号化側のブロックと同じ動作をするブロックについては同じ番号を付し、説明を省略する。   Next, a decoding apparatus that decodes encoded data generated by the multidimensional data encoding apparatus will be described. FIG. 9 is a block diagram of the decoding apparatus. As illustrated, the apparatus includes a code buffer 901, a header analysis unit 902, a prediction error decoding unit 903, an interplane difference decoding unit 904, a multidimensional data decoding unit 905, a multidimensional data output unit 906, a Huffman table memory 108, A buffer 104, a multi-value data prediction unit 105, a plane buffer 102, and a control unit 950 that controls the entire apparatus are provided. In the figure, reference numerals 907 and 908 denote signal lines. Blocks that operate in the same way as the encoding-side block shown in FIG.

以下、本実施形態の復号装置の各処理部の処理内容について説明する。   Hereinafter, processing contents of each processing unit of the decoding device of the present embodiment will be described.

復号対象となる符号化データは信号線907から順に入力され、符号バッファ901に格納される。バッファ901には、全符号化データを格納しても良いし、後述する復号処理によって復号処理によって空エリアが発生する都度、符号化データを入力し、格納するようにしても構わない。   The encoded data to be decoded are sequentially input from the signal line 907 and stored in the code buffer 901. All encoded data may be stored in the buffer 901, or encoded data may be input and stored every time an empty area is generated by a decoding process, which will be described later.

ヘッダ解析部902は符号バッファ901に格納される符号化データのヘッダ部分を解析し、付加情報を抽出する。付加情報は先に説明したように、ハフマンテーブルに関する情報、多次元データのX,Y,Z軸方向の要素数、各要素を構成する成分の数、各成分の精度(ビット数)などの情報である。ヘッダ解析部902は、抽出した付加情報を制御部950に通知する。制御部950は、ヘッダ解析部902からの付加情報を受けとると、先ず、プレーンバッファ102内のN×N個のデータ(16ビット)を“0”クリアする。そして、制御部950は、付加情報に基づき、各処理部に復号処理に必要な設定を行ない、復号処理を開始させる。なお、ヘッダ解析部902は、ヘッダより取り出したハフマンテーブルのデータをハフマンテーブル用メモリ108に格納する。ここでは符号化装置と同様に、図7のハフマンテーブルがハフマンテーブル用メモリ108に格納されるものとして説明する。   The header analysis unit 902 analyzes the header portion of the encoded data stored in the code buffer 901 and extracts additional information. As described above, the additional information includes information on the Huffman table, the number of elements in the X, Y, and Z-axis directions of multidimensional data, the number of components constituting each element, and the accuracy (number of bits) of each component. It is. The header analysis unit 902 notifies the control unit 950 of the extracted additional information. When receiving the additional information from the header analysis unit 902, the control unit 950 first clears “0” of N × N data (16 bits) in the plane buffer 102. Then, based on the additional information, the control unit 950 makes settings necessary for the decoding process in each processing unit and starts the decoding process. The header analysis unit 902 stores the Huffman table data extracted from the header in the Huffman table memory 108. Here, the description will be made assuming that the Huffman table of FIG. 7 is stored in the Huffman table memory 108 as in the case of the encoding device.

予測誤差復号部(第1の復号部として機能する)903は符号バッファ901から必要な長さのビットデータを取り出し、ハフマンテーブル用メモリ108に格納されるハフマンテーブルを参照して、着目するプレーン間差分値の予測誤差eを復号して出力する。予測誤差eの復号は上述の予測符号化部107の処理を逆の手順で行うことにより実施される。即ち、まず、ハフマンテーブル用メモリ108を参照して予測誤差eのグループ番号SSSSを復号する。グループ番号SSSSが0または16でない場合には続いてグループ番号により定まるビット長で付加ビットを取得する。グループ番号SSSSと付加ビットから予測誤差eを復号し、プレーン間差分復号部904へと出力する。   A prediction error decoding unit (functioning as a first decoding unit) 903 takes out bit data having a necessary length from the code buffer 901, refers to the Huffman table stored in the Huffman table memory 108, and focuses on the interplanes of interest. The prediction error e of the difference value is decoded and output. The decoding of the prediction error e is performed by performing the process of the prediction encoding unit 107 in the reverse procedure. That is, first, the group number SSSS of the prediction error e is decoded with reference to the Huffman table memory 108. If the group number SSSS is not 0 or 16, then additional bits are acquired with a bit length determined by the group number. The prediction error e is decoded from the group number SSSS and the additional bits and output to the interplane difference decoding unit 904.

多値データ予測部105では先に述べた符号化時と同じ動作により、バッファ104に格納されている既に復号済みのプレーン間差分値Da,Db,Dcから、着目プレーン間差分値Diの予測値pを生成する。   The multi-value data prediction unit 105 performs the same operation as the above-described encoding, and predicts the inter-plane difference value Di from the already decoded inter-plane difference values Da, Db, and Dc stored in the buffer 104. p is generated.

プレーン間差分復号部904では多値データ予測部105から出力される予測値pと予測誤差復号部903から出力される予測誤差eとを加算して着目プレーン間差分値Diを復元し、信号線908へと出力する。   The inter-plane difference decoding unit 904 restores the inter-plane difference value Di by adding the prediction value p output from the multi-value data prediction unit 105 and the prediction error e output from the prediction error decoding unit 903 to obtain the signal line To 908.

多次元データ復号部(第2の復号部として機能する)905は、プレーン間差分復号部904から出力される着目プレーン間差分値Di(=D(x,y,z))と、直前のプレーンの多値データI(x,y,z−1)を取り出す。そして、多次元データ復号部905は、プレーン間差分生成部103の処理と逆の手順により、着目位置の多値データ I(x,y,z)を復号する。復号した多値データI(x、y、z)は、多次元データ出力部906へと渡されると共に、プレーンバッファ102へと格納される。   A multi-dimensional data decoding unit (functioning as a second decoding unit) 905 includes the inter-plane difference value Di (= D (x, y, z)) output from the inter-plane difference decoding unit 904 and the immediately preceding plane. Multi-value data I (x, y, z-1) is taken out. Then, the multidimensional data decoding unit 905 decodes the multilevel data I (x, y, z) at the position of interest by a procedure reverse to the processing of the interplane difference generation unit 103. The decoded multi-value data I (x, y, z) is passed to the multi-dimensional data output unit 906 and stored in the plane buffer 102.

多次元データ出力部906は、復号した多次元データを装置外部に出力するものであり、本実施形態においては記憶媒体であるとするが、ネットワークへのインターフェース等、その種類は問わない。   The multi-dimensional data output unit 906 outputs the decoded multi-dimensional data to the outside of the apparatus. In this embodiment, the multi-dimensional data output unit 906 is a storage medium, but the type of interface such as a network interface is not limited.

以上であるが、ここで3次元配列の要素 I (x,y,z)を符号化する場合について考察する。この場合の、多値データ予測部105で生成される予測値をP(x,y,z)、予測誤差符号化部107で符号化される予測誤差eをE(x、y、z)と表すと、予測誤差E(x,y,z)は次式によって表わされる。
E(x,y,z) =D(x,y,z)−P(x,y,z)
=D(x,y,z)−{D(x-1,y,z)+D(x,y-1,z)−D(x-1,y-1,z)}
ここで、D(x,y,z)は、多値データI(x、y、z)とI(x,y,z−1)の差分であるから、上式は更に次のように展開できる。
E(x,y,z) ={I(x,y,z)−I(x,y,z-1)}
−{I(x-1,y,z)-I(x-1,y,z-1)+I(x,y-1,z)-I(x,y-1,z-1)
+I(x-1,y-1,z)-I(x-1,y-1,z-1)}
=I(x,y,z)−{I(x-1,y,z)+I(x,y-1,z)+I(x-1,y-1,z)}−
{I(x,y,z-1)−{I(x-1,y,z-1)+I(x,y-1,z-1)+I(x-1,y-1,z-1)}}
これは要素I(x,y,z)を、予測値P’(x、y、z)=I(x−1,y,z)+I(x,y−1,z)- I(x−1、y−1、z)で符号化する場合に、直前のプレーンで発生した予測誤差E’(x、y、z−1)=I(x,y,z−1)−{I(x−1,y,z−1)+I(x,y−1,z−1)− I(x−1、y−1、z−1) }をフィードバックしていることを示している。従って、プレーン間で予測誤差がE’が近い値をもつような多次元ルックアップテーブルの場合、圧縮率は非常に高いものとすることができるのが理解できよう。
As described above, consider the case where the element I (x, y, z) of the three-dimensional array is encoded. In this case, the prediction value generated by the multilevel data prediction unit 105 is P (x, y, z), and the prediction error e encoded by the prediction error encoding unit 107 is E (x, y, z). When expressed, the prediction error E (x, y, z) is expressed by the following equation.
E (x, y, z) = D (x, y, z) -P (x, y, z)
= D (x, y, z)-{D (x-1, y, z) + D (x, y-1, z) -D (x-1, y-1, z)}
Here, D (x, y, z) is the difference between the multi-value data I (x, y, z) and I (x, y, z-1), so the above expression is further expanded as follows: it can.
E (x, y, z) = {I (x, y, z) -I (x, y, z-1)}
-{I (x-1, y, z) -I (x-1, y, z-1) + I (x, y-1, z) -I (x, y-1, z-1)
+ I (x-1, y-1, z) -I (x-1, y-1, z-1)}
= I (x, y, z)-{I (x-1, y, z) + I (x, y-1, z) + I (x-1, y-1, z)}-
{I (x, y, z-1)-{I (x-1, y, z-1) + I (x, y-1, z-1) + I (x-1, y-1, z-1) )}}
This means that the element I (x, y, z) is converted into the predicted value P ′ (x, y, z) = I (x−1, y, z) + I (x, y−1, z) −I (x− 1, y−1, z), encoding error E ′ (x, y, z−1) = I (x, y, z−1) − {I (x −1, y, z−1) + I (x, y−1, z−1) −I (x−1, y−1, z−1)} is fed back. Therefore, it can be understood that the compression ratio can be very high in the case of a multidimensional lookup table in which the prediction error has a value close to E ′ between planes.

以上説明したように本実施形態によれば、カラールックアップテーブルのように多次元(3次元以上)データの多次元空間内の隣接するデータの差が十分に小さいことを利用して可逆符号化している。従って、オリジナルの多次元データに対して高い圧縮率で可逆の符号化データを生成することが可能になる。   As described above, according to the present embodiment, lossless encoding is performed using the fact that the difference between adjacent data in a multidimensional space of multidimensional data (three or more dimensions) is sufficiently small as in a color lookup table. ing. Therefore, it is possible to generate lossless encoded data with high compression rate for the original multidimensional data.

なお、実施形態では、3次元空間中の1つの要素は1成分で構成されるものとしたが、1要素は複数成分を備える場合にも適用できる。例えば、デバイス依存のRGB空間を標準色空間Labに変換するルックアップテーブルの場合、R、G、Bの各成分値が座標値とし、その座標値で特定される要素は(L,a,b)の3つの成分値を持つことになる。この場合、それぞれの成分毎に上記処理を行なえば良いのは明らかである。   In the embodiment, one element in the three-dimensional space is configured by one component, but the present invention can also be applied to a case where one element includes a plurality of components. For example, in the case of a lookup table that converts a device-dependent RGB space into a standard color space Lab, each component value of R, G, and B is a coordinate value, and elements specified by the coordinate value are (L, a, b ) Have three component values. In this case, it is obvious that the above-described processing should be performed for each component.

また、実施形態では、次元数を“3”の例を説明したが、次元数は“3”に限定されるものではない。ここでは、M次元(Mは3以上の値である)のデータについて考察する。1つの要素はM個の座標軸Q0、Q1、Q2、Q3、…、QM-1の各座標値で特定される。各座標軸における座標値をq0,q1,q2、…、qM-1とすると、1つの要素のデータはI(q0,q1,q2,…qM-1)と定義できる。このM次元の空間を、そのM次元に特化したスキャン方向にスキャンして符号する場合について考察する。 In the embodiment, the example in which the number of dimensions is “3” has been described, but the number of dimensions is not limited to “3”. Here, consider data of M dimensions (M is a value of 3 or more). One element is specified by the coordinate values of M coordinate axes Q 0 , Q 1 , Q 2 , Q 3 ,..., Q M−1 . If the coordinate values on each coordinate axis are q 0 , q 1 , q 2 ,..., Q M−1 , the data of one element can be defined as I (q 0 , q 1 , q 2 ,... Q M−1 ). . Consider a case where this M-dimensional space is scanned and coded in a scan direction specialized for the M dimension.

この場合、或る座標軸、例えば最後の座標軸QM-1の値qM-1=αである仮想2次元プレーン「α」(実際はM−1次元の空間であるが敢えてこのように表現する)と定義した場合、この多次元データは仮想2次元プレーンの集合と見ることができる。そこで、仮想2次元プレーン「α」と、仮想2次元プレーン「α−1」と差分を、先に示した仮想プレーン間差分値D(q0,q1,…,qM-2,α)として求める。
D(q0,q1,…,qM-2,α)=I(q0,q1,…qM-2,…,α)−I(q0,q1,…,qM-2,α−1)
In this case, a virtual two-dimensional plane “α” having a certain coordinate axis, for example, the value q M−1 = α of the last coordinate axis Q M−1 (actually an M−1 dimensional space, but expressed in this way) This multidimensional data can be viewed as a set of virtual two-dimensional planes. Therefore, the difference between the virtual two-dimensional plane “α” and the virtual two-dimensional plane “α-1” is calculated as the difference value D (q 0 , q 1 ,..., Q M−2 , α). Asking.
D (q 0 , q 1 , ..., q M-2 , α) = I (q 0 , q 1 , ... q M-2 , ..., α) -I (q 0 , q 1 , ..., q M- 2 , α-1)

これ以降は、上記と同様に、着目データDi(=D(q0,q1,…,qM-2,α))の近傍の、符号化済みの座標位置にある1つ又は複数のプレーン間差分値Dから予測値pを求め、着目データDiと予測値pとの差分を予測誤差として符号化することで、M次元の着目データ集合Dの符号化データを生成することができる。 Thereafter, similarly to the above, one or more planes at the encoded coordinate positions in the vicinity of the data of interest Di (= D (q 0 , q 1 ,..., Q M−2 , α)). By obtaining the predicted value p from the inter-difference value D and encoding the difference between the target data Di and the predicted value p as a prediction error, encoded data of the M-dimensional target data set D can be generated.

なお、上記実施形態では、符号化側と復号側の装置がそれぞれ別々の装置であるものとしたが、1つの装置内にこの2つの機能を持つものでも構わない。   In the above embodiment, the encoding side and decoding side apparatuses are separate apparatuses, but one apparatus may have these two functions.

<第1の実施形態の変形例>
上記第1の実施形態を、例えばパーソナルコンピュータ等の汎用の情報処理装置のソフトウェア(コンピュータプログラム)でもって、上記と等価の処理を行なうことも可能である。
<Modification of First Embodiment>
The first embodiment can be processed equivalent to the above by using software (computer program) of a general-purpose information processing apparatus such as a personal computer.

図10は本変形例に係る情報処理装置の基本構成を示す図である。   FIG. 10 is a diagram showing a basic configuration of an information processing apparatus according to this modification.

図中、1401は装置全体の制御を司るCPUである。1402はCPU1401のワークエリアとして使用するRAMであり、1403はBIOS及びブートプログラムを格納しているROMである。1404はキーボード、1405はポインティングデバイスの1つであるマウスである。1406は表示制御部であって、内部にはビデオメモリ及びCPU1401の制御によってビデオメモリへの描画、及び、ビデオメモリに可能されたデータをビデオ信号として表示装置1412に出力する表示コントローラを内蔵している。表示装置1412はCRTや液晶表示装置である。1407はハードディスク装置等の外部記憶装置であり、これにはOS(オペレーティングシステム)、多次元データ処理を行なうアプリケーションプログラムが格納されている。なお、外部記憶装置1407は、各種アプリケーションで作成されたファイルを格納するためにも利用される。1408は記憶媒体ドライブであり、フレキシブルディスク、メモリカード、CD−ROM等の記憶媒体に対してリード/ライトを行なう。1409は本装置とイメージスキャナ1411とを接続するためのスキャナインタフェース(USBやSCSIインタフェース等)ある。1413はネットワークインタフェースである。   In the figure, reference numeral 1401 denotes a CPU that controls the entire apparatus. Reference numeral 1402 denotes a RAM used as a work area of the CPU 1401, and reference numeral 1403 denotes a ROM storing a BIOS and a boot program. Reference numeral 1404 denotes a keyboard, and 1405 denotes a mouse which is one of pointing devices. Reference numeral 1406 denotes a display control unit, which internally includes a video memory and a display controller that draws data in the video memory under the control of the CPU 1401 and outputs data stored in the video memory to the display device 1412 as a video signal. Yes. The display device 1412 is a CRT or a liquid crystal display device. Reference numeral 1407 denotes an external storage device such as a hard disk device, in which an OS (Operating System) and an application program for performing multidimensional data processing are stored. The external storage device 1407 is also used for storing files created by various applications. A storage medium drive 1408 reads / writes data from / to a storage medium such as a flexible disk, a memory card, and a CD-ROM. Reference numeral 1409 denotes a scanner interface (USB, SCSI interface, etc.) for connecting this apparatus and the image scanner 1411. Reference numeral 1413 denotes a network interface.

本装置の電源がONになると、CPU1401はROM1403のブートプログラムに従って、外部記憶装置1407からOSをRAM1402にロードする。この結果、OSの制御の下で、表示制御部1406にGUIを描画して、表示装置1412にそのGUIを表示させる。操作者は、表示装置1412の表示を見て、キーボード1404やマウス1405を操作することになる。ここで、多次元データ処理アプリケーションの起動指示が操作者より与えられると、CPU1401は外部記憶装置1407内の多次元データ処理アプリケーションプログラムをRAM1402にロードし、実行する。この結果、本装置が多次元データ処理装置として機能することになる。   When the power of the apparatus is turned on, the CPU 1401 loads the OS from the external storage device 1407 to the RAM 1402 in accordance with the boot program stored in the ROM 1403. As a result, under the control of the OS, the GUI is drawn on the display control unit 1406, and the GUI is displayed on the display device 1412. The operator views the display on the display device 1412 and operates the keyboard 1404 and the mouse 1405. Here, when an activation instruction for the multidimensional data processing application is given by the operator, the CPU 1401 loads the multidimensional data processing application program in the external storage device 1407 into the RAM 1402 and executes it. As a result, this apparatus functions as a multidimensional data processing apparatus.

CPU1401が多次元データ処理アプリケーションを実行し、操作者より符号化対象となる画像の入力指示を受けると、外部記憶装置1407から多次元データ、またはその符号化データを入力し、符号化、復号を行なうことになる。符号化結果、復号結果は、外部記憶装置1407にファイルとして格納する。   When the CPU 1401 executes a multidimensional data processing application and receives an instruction to input an image to be encoded from the operator, the multidimensional data or the encoded data is input from the external storage device 1407 to perform encoding and decoding. Will do. The encoding result and the decoding result are stored in the external storage device 1407 as a file.

ここで、多次元データ処理アプリケーションは、図1に示す各構成要素に相当するモジュール(サブルーチン、関数と言い換えることもできる)、或いは図9に示す各構成要素に相当するモジュールを有する。ただし、プレーンバッファ102、バッファ104、符号バッファ109については、RAM1402に確保されることになる。   Here, the multidimensional data processing application has modules corresponding to the respective components shown in FIG. 1 (which can also be referred to as subroutines and functions), or modules corresponding to the respective components shown in FIG. However, the plane buffer 102, buffer 104, and code buffer 109 are secured in the RAM 1402.

図11は、本実施形態に係る多次元データ処理装置による符号化処理の流れを示すフローチャートである。以下、同図のフローチャートに従い、CPU1401が実行する手順(多次元データ処理アプリケーションの符号化処理)を説明する。なお、説明を簡単なものとするため、符号化対象のデータは第1の実施形態と同様3次元ルックアップテーブルであり、1つの要素は1つの成分で構成されており、ルックアップテーブルの取り得る範囲は各座標軸とも0乃至N−1であるものとして説明する。   FIG. 11 is a flowchart showing a flow of encoding processing by the multidimensional data processing apparatus according to the present embodiment. The procedure executed by the CPU 1401 (encoding process of a multidimensional data processing application) will be described below with reference to the flowchart of FIG. In order to simplify the description, the data to be encoded is a three-dimensional lookup table as in the first embodiment, and one element is composed of one component. The range to be obtained will be described on the assumption that each coordinate axis is 0 to N-1.

まず、符号化処理の開始に先立ち、装置の初期化処理が行われる(ステップS1100)。プレーンバッファ102の初期値設定はこのタイミングで行われ、N×N個のデータの初期値として0が設定される。続いて、符号化対象の多次元データに関する情報や、ハフマンテーブルの情報からファイルヘッダを生成し、外部記憶装置1407に書き込む(ステップS1101)。次いで、ステップS1102、S1103、S1104において、変数z、y、xをそれぞれ“0”に初期化する。   First, prior to the start of the encoding process, the apparatus is initialized (step S1100). The initial value of the plane buffer 102 is set at this timing, and 0 is set as the initial value of N × N data. Subsequently, a file header is generated from the information regarding the multidimensional data to be encoded and the information of the Huffman table, and written to the external storage device 1407 (step S1101). Next, in steps S1102, S1103, and S1104, variables z, y, and x are initialized to “0”, respectively.

ステップS1105では、多値データ I(x,y,z)を着目データとして入力する。ステップS1106において、着目多値データI(x,y,z)と直前のプレーンのX、Y座標値が着目多値データと同じ多値データI(x,y,z−1)との差分をプレーン間差分D(x,y,z)として算出する。続いて、ステップS1107にて予測値pを算出し、予測誤差eを算出する。ステップS1108では予測誤差eの符号化処理が行われ、その符号化データをファイルヘッダに後続するデータとして外部記憶装置1407に書き込む。   In step S1105, multi-value data I (x, y, z) is input as the data of interest. In step S1106, the difference between the target multi-value data I (x, y, z) and the multi-value data I (x, y, z−1) in which the X and Y coordinate values of the immediately preceding plane are the same as the target multi-value data is calculated. Calculated as the interplane difference D (x, y, z). Subsequently, in step S1107, a predicted value p is calculated, and a prediction error e is calculated. In step S1108, the prediction error e is encoded, and the encoded data is written in the external storage device 1407 as data subsequent to the file header.

この後、ステップS1109に進み、変数xに“1”を加えることで変数xを更新する。そして、ステップS1110にて、変数xの値とNとを比較する。x<Nであると判断した場合にはステップS1105へ、x≧N(実際はx=N)の場合にはステップS1111へと処理を移す。   Thereafter, the process proceeds to step S1109, and the variable x is updated by adding “1” to the variable x. In step S1110, the value of the variable x is compared with N. If it is determined that x <N, the process proceeds to step S1105. If x ≧ N (actually x = N), the process proceeds to step S1111.

ステップS1111では、変数yに“1”を加え、ステップS1112で変数yの値とNとを比較する。y<Nである場合にはステップS1104へと処理を移し、y≧N(y=N)の場合にはステップS1113へと処理を移す。ステップS1113では、変数zに“1”を加えて更新し、ステップS114において変数zの値とNとを比較する。z<Nである場合にはステップS1103に処理を移し、z≧N(z=N)の場合には、本符号化処理を終了する。   In step S1111, “1” is added to the variable y, and the value of the variable y is compared with N in step S1112. If y <N, the process proceeds to step S1104. If y ≧ N (y = N), the process proceeds to step S1113. In step S1113, the variable z is updated by adding “1”, and the value of the variable z is compared with N in step S114. If z <N, the process proceeds to step S1103. If z ≧ N (z = N), the encoding process ends.

以上説明したように、先に説明した第1の実施形態と同様の処理を、コンピュータプログラムにとっても実現できるようになる。   As described above, the same processing as that of the first embodiment described above can be realized for a computer program.

次に、CPU1401が実行する多次元データ処理アプリケーションの復号処理を図12のフローチャートに従って説明する。   Next, the decoding process of the multidimensional data processing application executed by the CPU 1401 will be described with reference to the flowchart of FIG.

まず、復号処理の開始に先立ち、装置の初期化処理が行われる(ステップS1200)。プレーンバッファ102の初期値設定はこのタイミングで行われ、N×N個のデータを初期値“0”に設定する。続いて、復号対象のファイルヘッダを読込み、復号対象の多次元データに関する情報や、ハフマンテーブルの情報をそのヘッダから取得する(ステップS1201)。ステップS1202、S1203、S1204にて、変数z,y,xをそれぞれを“0”に設定する。   First, prior to starting the decoding process, the apparatus is initialized (step S1200). The initial value of the plane buffer 102 is set at this timing, and N × N pieces of data are set to the initial value “0”. Subsequently, the file header to be decoded is read, and information on the multidimensional data to be decoded and information on the Huffman table are acquired from the header (step S1201). In steps S1202, S1203, and S1204, variables z, y, and x are set to “0”.

ステップS1205では、ハフマンテーブルを参照して予測誤差eを復号する。そして、ステップS1206にて、既に復号済みのデータから予測値pを求め、予測誤差eに予測値pを加算することで、プレーン間差分値D(x,y,z)を復元する。ステップS1207では、直前のプレーンの復号結果を格納するバッファ中の該当する多値データI(x,y,z-1)を読込み、着目プレーン中の着目データを復号し、復号結果を格納する外部記憶装置に出力する。   In step S1205, the prediction error e is decoded with reference to the Huffman table. In step S1206, the prediction value p is obtained from the already decoded data, and the prediction value p is added to the prediction error e to restore the inter-plane difference value D (x, y, z). In step S1207, the corresponding multi-value data I (x, y, z-1) in the buffer storing the decoding result of the immediately preceding plane is read, the attention data in the attention plane is decoded, and the decoding result is stored. Output to storage device.

この後、ステップS1208に進み、変数xに“1”を加えることで変数xを更新する。そして、ステップS1209にて、変数xの値とNとを比較する。x<Nであると判断した場合にはステップS1205へ、x≧N(実際はx=N)の場合にはステップS1210へと処理を移す。   Thereafter, the process proceeds to step S1208, and the variable x is updated by adding “1” to the variable x. In step S1209, the value of the variable x is compared with N. If it is determined that x <N, the process proceeds to step S1205. If x ≧ N (actually x = N), the process proceeds to step S1210.

ステップS1210では、変数yに“1”を加え、ステップS1211で変数yの値とNとを比較する。y<Nである場合にはステップS1204へと処理を移し、y≧N(y=N)の場合にはステップS1212へと処理を移す。ステップS1212では、変数zに“1”を加えて更新し、ステップS1213において変数zの値とNとを比較する。z<Nである場合にはステップS1203に処理を移し、z≧N(z=N)の場合には、本復号処理を終了する。   In step S1210, “1” is added to the variable y, and the value of the variable y is compared with N in step S1211. If y <N, the process proceeds to step S1204. If y ≧ N (y = N), the process proceeds to step S1212. In step S1212, the variable z is updated by adding “1”. In step S1213, the value of the variable z is compared with N. If z <N, the process proceeds to step S1203. If z ≧ N (z = N), the decoding process ends.

以上説明したように第1の実施形態と同様の機能をコンピュータプログラムによっても実現でき、同様の作用効果を奏することが可能になる。   As described above, the same function as in the first embodiment can be realized by a computer program, and the same function and effect can be achieved.

なお、上記では、符号化対象の多次元データは外部記憶装置1407から読み出すものとしたが、符号化対象の多次元データは記憶媒体に格納されていても良いし、ネットワーク上のサーバからダウンロードする場合にも適用可能である。また符号化結果の出力先も、外部記憶装置1407に限らず、ネットワークでも構わないし、その出力先は如何なるものでも構わない。   In the above description, the multidimensional data to be encoded is read from the external storage device 1407, but the multidimensional data to be encoded may be stored in a storage medium or downloaded from a server on the network. It is also applicable to cases. Also, the output destination of the encoding result is not limited to the external storage device 1407, and may be a network, and any output destination may be used.

<第2の実施形態>
第2の実施形態では、ICCプロファイルデータの中のカラールックアップテーブルを圧縮してICCプロファイル圧縮データを符号化する例とそれを復号する例を説明する。
<Second Embodiment>
In the second embodiment, an example in which a color lookup table in ICC profile data is compressed to encode ICC profile compressed data and an example in which the data is decoded will be described.

図13は本第2の実施形態に係る多次元データの符号化装置のブロック構成図である。本第2の実施形態に係る符号化装置は、ICCプロファイル入力部1301、ICCプロファイル格納用メモリ1302、タグテーブル解析部1303、CLUT抽出部1304、プレーンバッファ1305、プレーン間差分変換部1306、JPEG可逆符号化部1307、CLUT符号化データ格納用メモリ1308、ICCプロファイルデータ形成部1309、ICCプロファイル圧縮データ出力部1310、そして、装置全体の制御を司る制御部1350を備える。同図において1311、1312は信号線を示す。   FIG. 13 is a block diagram of a multidimensional data encoding apparatus according to the second embodiment. The encoding apparatus according to the second embodiment includes an ICC profile input unit 1301, an ICC profile storage memory 1302, a tag table analysis unit 1303, a CLUT extraction unit 1304, a plane buffer 1305, an interplane difference conversion unit 1306, and a JPEG reversible unit. An encoding unit 1307, a CLUT encoded data storage memory 1308, an ICC profile data forming unit 1309, an ICC profile compressed data output unit 1310, and a control unit 1350 that controls the entire apparatus are provided. In the figure, reference numerals 1311 and 1312 denote signal lines.

以下、同図を参照して、本第2の実施形態の符号化装置の多次元データであるICCプロファイルデータの符号化処理について説明する。   Hereinafter, an encoding process of ICC profile data which is multidimensional data of the encoding apparatus of the second embodiment will be described with reference to FIG.

ICCプロファイルは、入力デバイス、出力デバイス、表示デバイスをPCS(Profile Connection Space)と呼ばれるデバイス非依存の標準色空間を介して結びつけ、カラー画像データの互換性を保つ技術である。この技術は、現在、カラーマネージメントを行う上での標準的な手法として広く利用されている。ICCプロファイルの詳細については公知であるので、ここでは説明を省略する。   The ICC profile is a technique for maintaining compatibility of color image data by connecting an input device, an output device, and a display device through a device-independent standard color space called PCS (Profile Connection Space). This technology is currently widely used as a standard method for color management. Since the details of the ICC profile are publicly known, the description thereof is omitted here.

本第2の実施形態に係る符号化装置は、International Colour Consortium (ICC)の策定したフォーマットによるカラープロファイルデータ(ICCプロファイルデータ)を符号化対象とする。図14にICCプロファイルデータの構造を図示する。ICCプロファイルデータは128バイトのプロファイルヘッダ(Profile header)1401を備える。そして、ヘッダに後続して、タグ付き要素データ(Tagged Element Data)の数を示したタグカウント(Tag Count)1402、各タグ付き要素データのタイプを示したシグネチャ、データ格納位置へのオフセット値、及び、データサイズを記述したタグテーブル(Tag Table)1404、そして、タグ付き要素データ1405から構成される。   The encoding apparatus according to the second embodiment uses color profile data (ICC profile data) in a format established by the International Color Consortium (ICC) as an encoding target. FIG. 14 shows the structure of ICC profile data. The ICC profile data includes a 128-byte profile header 1401. Subsequently to the header, a tag count 1402 indicating the number of tagged element data (Tag Count) 1402, a signature indicating the type of each tagged element data, an offset value to the data storage position, A tag table 1404 describing the data size, and element data 1405 with tag.

特に、本第2の実施形態での符号化対象とするICCプロファイルデータには、タグ付き要素データに一つのlut16Typeのタグ付き要素データ(図14の1403)が存在するものとする。また、そのタグ付き要素データの他に、カラールックアップテーブル(CLUT)を含むタグ付き要素データを含まないものとする。しかしながら、本発明は同様にlut8Typeのタグ付き要素データや、lutAtoBType、lutBtoATypeのタグ付き要素データに対しても適用可能である。また、このようなタグ付き要素データを複数含むICCプロファイルデータに対しても適用可能である。複数存在する場合には、以下に説明するlut16Typeのタグ付き要素データに対する処理と同様の処理をそれぞれのタグ付き要素データに対して適用すれば良い。   In particular, in the ICC profile data to be encoded in the second embodiment, it is assumed that there is one lut16Type tagged element data (1403 in FIG. 14) in the tagged element data. Further, in addition to the tagged element data, the tagged element data including the color lookup table (CLUT) is not included. However, the present invention is also applicable to lut8Type tagged element data and lutAtoBType and lutBtoAType tagged element data. The present invention can also be applied to ICC profile data including a plurality of such tagged element data. When there are a plurality of elements, the same process as that described below for the lut16Type tagged element data may be applied to each tagged element data.

次に、本第2の実施形態の画像処理装置での各部の動作について説明する。   Next, the operation of each unit in the image processing apparatus according to the second embodiment will be described.

まず、符号化対象となるICCプロファイルがICCプロファイル入力部1301から入力される。ICCプロファイル入力部1301は外部記憶媒体へのインターフェース、またはネットワークへのインターフェース等であり、符号化対象となるICCプロファイルデータを装置内部に取り込む役割を果たす。ICCプロファイル入力部1301は、入力したICCプロファイルデータを、一旦、ICCプロファイル格納用メモリ1302へ格納する。   First, an ICC profile to be encoded is input from an ICC profile input unit 1301. An ICC profile input unit 1301 is an interface to an external storage medium, an interface to a network, or the like, and plays a role of capturing ICC profile data to be encoded into the apparatus. The ICC profile input unit 1301 temporarily stores the input ICC profile data in the ICC profile storage memory 1302.

ICCプロファイルデータがICCプロファイル格納用メモリ1302に格納されると、タグテーブル解析部1303ではICCプロファイルのタグテーブルを解析し、lut16Typeのタグ付き要素データを抜き出してCLUT抽出部1304に送る。   When the ICC profile data is stored in the ICC profile storage memory 1302, the tag table analysis unit 1303 analyzes the tag table of the ICC profile, extracts the lut16Type tagged element data, and sends it to the CLUT extraction unit 1304.

CLUT抽出部1304はその内部に不図示のバッファを有し、タグテーブル解析部1303により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものであり、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。CLUTはi次元の配列であり、各配列要素がo個の成分値を有する。lut16Typeのタグ付き要素データには付加情報として、i、oの他、CLUTの各次元の要素数gが記される。CLUT抽出部1304はlut16Typeのフォーマットに従って、i,o,gを取得し、CLUTの各要素の各成分を順番にプレーン間差分変換部1306へ出力する。   The CLUT extraction unit 1304 has a buffer (not shown) therein, and stores lut16Type tagged element data extracted by the tag table analysis unit 1303. The lut16Type tagged element data associates an i-dimensional color space with another o-dimensional color space, and is a 3 × 3 array, a one-dimensional input table, a multi-dimensional color lookup table (CLUT), and a one-dimensional output table. Consists of. The CLUT is an i-dimensional array, and each array element has o component values. In addition to i and o, the number of elements g in each dimension of the CLUT is written as additional information in the tagged element data of lut16Type. The CLUT extraction unit 1304 acquires i, o, g in accordance with the format of lut16Type, and outputs each component of each element of the CLUT to the interplane difference conversion unit 1306 in order.

CLUTには3次元3成分、3次元4成分、4次元3成分などがあるが、本第2の実施形態では3次元3成分であり、各次元の要素数g=Nの場合を例に説明する。従って、本実施形態でのCLUTの要素数はN×N×Nであり、成分の総数はN×N×N×3である。よってCLUTの構成は第1の実施形態で符号化対象とした図2の多次元データと同じであり、各要素が3成分で構成されている点が異なる。   The CLUT includes three-dimensional three-components, three-dimensional four-components, four-dimensional three-components, etc., but in the second embodiment, there are three-dimensional three-components, and an example in which the number of elements in each dimension g = N will be described. To do. Therefore, the number of elements of the CLUT in this embodiment is N × N × N, and the total number of components is N × N × N × 3. Therefore, the configuration of the CLUT is the same as the multidimensional data of FIG. 2 that is the encoding target in the first embodiment, and is different in that each element is composed of three components.

X,Y,Z軸の位置がそれぞれx、y、zである3次元配列の要素の第1成分をI0(x,y,z)、第2成分をI1(x,y,z)、第3成分をI2(x,y,z)と記す。lut16Typeの場合、各成分値は16ビットで表現される。   The first component of the elements of the three-dimensional array whose X, Y, and Z axis positions are x, y, and z are I0 (x, y, z), the second component is I1 (x, y, z), the second The three components are denoted as I2 (x, y, z). In the case of lut16Type, each component value is expressed by 16 bits.

プレーンバッファ1305はCLUT抽出部1304から出力される3次元配列の要素を1プレーン分格納する。プレーンの概念は第1実施形態と同じであるが、各要素が3成分で構成されるため、プレーンバッファ1305にはN×N×N×2×3バイト分の容量が必要となる。プレーンバッファ1305は符号化処理の開始時点で全ての値を0に初期化する。   The plane buffer 1305 stores one plane of the elements of the three-dimensional array output from the CLUT extraction unit 1304. The concept of the plane is the same as that of the first embodiment, but each element is composed of three components, so that the plane buffer 1305 needs to have a capacity of N × N × N × 2 × 3 bytes. The plane buffer 1305 initializes all values to 0 at the start of the encoding process.

プレーン間差分変換部1306はCLUT抽出部1304から出力されるIn(x、y、z)(nは0、1,2のいずれか)について、プレーンバッファ1305から当該成分値の直前のプレーンの値In(x、y、z−1)を読み出す。そして、プレーン間差分変換部1306は、プレーン間差分値Dn(x、y、z)を生成し、出力する。具体的には以下の式を用いる。
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y、z−1)+(2^15),(2^16))
The inter-plane difference conversion unit 1306 obtains the value of the plane immediately before the component value from the plane buffer 1305 for In (x, y, z) (n is 0, 1, or 2) output from the CLUT extraction unit 1304. Read In (x, y, z-1). Then, the inter-plane difference conversion unit 1306 generates and outputs an inter-plane difference value Dn (x, y, z). Specifically, the following formula is used.
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y, z-1) + (2 ^ 15), (2 ^ 16))

JPEG可逆符号化部1307はプレーン間差分変換部1306から順次入力されるN×N×N個、3成分、各16ビットのプレーン間差分値Dn(x、y、z)を水平方向画素数N、垂直方向画素数N×Nの3成分、16ビットの画像データとしてJPEG(ISO/IEC 10918−1)に規定される可逆符号化(Lossless Process)により符号化し、符号化データをCLUT符号化データ格納用メモリ1308に格納する。JPEGの可逆符号化処理については規格書「ITU−T T.81|ISO/IEC10918−1 Information technology - Digital compression and coding of continuous-tone still images : Requirements and guidelines」や各種解説書に詳細が書かれているのでここでは説明を省略する。   The JPEG lossless encoding unit 1307 receives N × N × N three-component, 16-bit inter-plane difference values Dn (x, y, z) sequentially input from the inter-plane difference conversion unit 1306 as the number of horizontal pixels N. The encoded data is encoded by CLUT encoded data by encoding with lossless process defined by JPEG (ISO / IEC 10918-1) as 3-component, 16-bit image data of N × N pixels in the vertical direction. Store in the storage memory 1308. The details of JPEG lossless encoding are described in the standard document “ITU-T T.81 | ISO / IEC 10918-1 Information technology-Digital compression and coding of continuous-tone still images: Requirements and guidelines” and various explanations. Therefore, the description is omitted here.

JPEGの可逆符号化では予測なしを含めて8通りの予測式を選択することができる。ここでは、ここでは予測式の選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用する(詳しくは、上記規格書のAnnex H Table H.1 - Predictors for lossless codingを参照されたい)。なお、本第2の実施形態では水平方向画素数をN、垂直方向画素数をN×Nとしているが、水平方向画素数をN×N、垂直方向画素数をNとして符号化しても構わない。   In JPEG lossless encoding, eight prediction formulas including no prediction can be selected. Here, the selection number m = 4 of the prediction formula, that is, Px = Ra + Rb−Rc is used here (for details, see Annex H Table H.1-Predictors for lossless coding in the above-mentioned standard). In the second embodiment, the number of horizontal pixels is N and the number of vertical pixels is N × N. However, the number of horizontal pixels may be N × N and the number of vertical pixels may be N. .

CLUT符号化データ格納用メモリ1308にCLUT符号化データが格納されたとする。この場合、ICCプロファイル圧縮データ形成部1309は、ICCプロファイル格納用メモリ1302に格納されるICCプロファイルデータと、CLUT符号化データ格納用メモリ1308に格納されるCLUT符号化データから必要なデータを取り出す。そし、ICCプロファイル圧縮データを形成して出力する。ICCプロファイル圧縮データはICCプロファイル格納用メモリに格納されるICCプロファイルデータのうち、CLUT抽出部1304で抽出されたCLUTをCLUT符号化データ格納用メモリに格納されているCLUT符号化データで置き換えたものである。図15はICCプロファイル圧縮データ形成部1309で生成されるICCプロファイル圧縮データの構造を示したものである。圧縮前の図14との違いは、CLUTの圧縮によりCLUTを含むタグ付き要素データ1403(図14)のCLUT部分がCLUT符号化データ格納用メモリ1308に格納されるCLUT符号化データによって置き換えられ、図15のようにCLUT圧縮データを含むタグ付き要素データ1501になる。また、CLUTの符号化によるタグ付き要素データのサイズ変更に伴い、タグテーブル中、CLUT圧縮データを含むタグ付き要素データのサイズを記した部分(図15の参照番号1502)が書き換えられる。更に、CLUT圧縮データを含むタグ付き要素データの後に続くタグ付き要素データ1504のオフセット位置が変わるため、それらのオフセットを記した部分(図15の参照番号1503)も更新される。   Assume that CLUT encoded data is stored in the CLUT encoded data storage memory 1308. In this case, the ICC profile compressed data forming unit 1309 extracts necessary data from the ICC profile data stored in the ICC profile storage memory 1302 and the CLUT encoded data stored in the CLUT encoded data storage memory 1308. Then, ICC profile compressed data is formed and output. The ICC profile compressed data is the ICC profile data stored in the ICC profile storage memory, in which the CLUT extracted by the CLUT extraction unit 1304 is replaced with the CLUT encoded data stored in the CLUT encoded data storage memory. It is. FIG. 15 shows the structure of ICC profile compressed data generated by the ICC profile compressed data forming unit 1309. The difference from FIG. 14 before compression is that the CLUT portion of the tagged element data 1403 (FIG. 14) including the CLUT is replaced by CLUT encoded data stored in the CLUT encoded data storage memory 1308 by CLUT compression. As shown in FIG. 15, the tagged element data 1501 including the CLUT compressed data is obtained. As the size of the tagged element data is changed by encoding the CLUT, a portion (reference number 1502 in FIG. 15) in which the size of the tagged element data including the CLUT compressed data is written in the tag table is rewritten. Furthermore, since the offset position of the tagged element data 1504 following the tagged element data including the CLUT compressed data changes, the portion (reference number 1503 in FIG. 15) in which those offsets are also updated.

ICCプロファイル圧縮データ出力部1310はICCプロファイル圧縮データ形成部1309から出力されるICCプロファイル圧縮データを装置外部へと出力する。ICCプロファイル圧縮データ出力部1310は外部記憶装置へのインターフェースであり、圧縮データをファイルとして格納する。なお、このICCプロファイル圧縮データ出力部1310はネットワークへのインターフェース等であっても良い。   The ICC profile compressed data output unit 1310 outputs the ICC profile compressed data output from the ICC profile compressed data forming unit 1309 to the outside of the apparatus. The ICC profile compressed data output unit 1310 is an interface to an external storage device, and stores the compressed data as a file. The ICC profile compressed data output unit 1310 may be an interface to a network.

図16は本第2の実施形態に係る多次元データの符号化装置による符号化処理の流れを示すフローチャートである。以下、図16に示したフローチャートに従い、本第2の実施形態に係る制御部1350のICCプロファイルデータの符号化処理の全体的な流れについて説明する。   FIG. 16 is a flowchart showing the flow of encoding processing by the multidimensional data encoding apparatus according to the second embodiment. The overall flow of the ICC profile data encoding process of the control unit 1350 according to the second embodiment will be described below with reference to the flowchart shown in FIG.

まず、ICCプロファイル入力部1301は、符号化対象となるICCプロファイルデータを入力し、ICCプロファイル格納用メモリ1302に格納する(ステップS1600)。続いて、タグテーブル解析部1303は、ICCプロファイルデータに格納されている各タグ付き要素データのタイプ判別を行ない、CLUTを含んだタグ付き要素データ(本第2の実施形態ではlut16Typeのタグ付き要素データ)を取り出し、CLUT抽出部1304に出力する。CLUT抽出部1304ではタグ付き要素データの内部からCLUTを抽出し、CLUTの各要素を順番に出力する(ステップS1602)。   First, the ICC profile input unit 1301 inputs ICC profile data to be encoded and stores it in the ICC profile storage memory 1302 (step S1600). Subsequently, the tag table analysis unit 1303 determines the type of each tagged element data stored in the ICC profile data, and includes tagged element data including a CLUT (in the second embodiment, a tagged element of lut16Type). Data) is extracted and output to the CLUT extraction unit 1304. The CLUT extraction unit 1304 extracts the CLUT from the inside of the tagged element data, and outputs each element of the CLUT in order (step S1602).

プレーン間差分変換部1306は、CLUT抽出部1304から抽出されるCLUTの要素I0(x,y,z)、I1(x,y,z)、I2(x、y、z)と、プレーンバッファ1305に格納されている直前のプレーンの各要素要素I0(x,y,z−1)、I1(x,y,z−1)、I2(x、y、z−1)とのそれぞれの差分を求め、プレーン間差分D0(x、y、z)、D1(x,y,z)、D2(x、y、z)をJPEG可逆符号化部1307に出力する(ステップS1603)。   The inter-plane difference conversion unit 1306 includes CLUT elements I0 (x, y, z), I1 (x, y, z), I2 (x, y, z) extracted from the CLUT extraction unit 1304, and a plane buffer 1305. The respective differences from the element elements I0 (x, y, z-1), I1 (x, y, z-1), I2 (x, y, z-1) of the immediately preceding plane stored in The interplane differences D0 (x, y, z), D1 (x, y, z), and D2 (x, y, z) are output to the JPEG lossless encoding unit 1307 (step S1603).

JPEG可逆符号化部1307はプレーン間差分変換部1306からのプレーン間差分値D0(x,y,z)、D1(x、y、z)、D2(x,y,z)を水平方向画素数N、垂直方向画素数N×Nの画像の1画素を構成する3つの成分値とみなして、JPEG可逆符号化(Lossless Process)による符号化処理を行う(ステップS1604)。   The JPEG lossless encoding unit 1307 uses the inter-plane difference values D0 (x, y, z), D1 (x, y, z), and D2 (x, y, z) from the inter-plane difference conversion unit 1306 as the number of horizontal pixels. N is regarded as three component values constituting one pixel of an image of N × N pixels in the vertical direction, and encoding processing by JPEG lossless encoding (lossless process) is performed (step S1604).

CLUTの全ての要素を符号化し終えた場合には処理をステップS1606へと移し、そうでない場合にはステップS1602へと処理を移し、CLUTの次の要素についてステップS1602からステップS1604の処理により符号化を行う(ステップS1605)。   If all the elements of the CLUT have been encoded, the process proceeds to step S1606. If not, the process proceeds to step S1602, and the next element of the CLUT is encoded by the processes from step S1602 to step S1604. Is performed (step S1605).

ステップS1606ではICCプロファイル圧縮データ形成部1309によりICCプロファイル圧縮データの生成が行われる。最後にステップS1607でICCプロファイル圧縮データ出力部1310からICCプロファイル圧縮データが装置外部へと出力される。   In step S1606, the ICC profile compressed data forming unit 1309 generates ICC profile compressed data. Finally, in step S1607, the ICC profile compressed data output unit 1310 outputs the ICC profile compressed data to the outside of the apparatus.

以上の処理により、ICCプロファイルデータの符号化処理が行われ、装置外部へとICCプロファイル圧縮データが出力される。   Through the above processing, the ICC profile data is encoded, and the ICC profile compressed data is output outside the apparatus.

次に、上記のようにして符号化されたICCプロファイルデータを復号する復号装置について説明する。   Next, a decoding apparatus that decodes the ICC profile data encoded as described above will be described.

図17は本第2の実施形態に係る多次元データの復号装置の復号側のブロック構成図である。図17に示すように、本実施形態に係る多次元データの復号装置は、ICCプロファイル圧縮データ入力部1701、ICCプロファイル圧縮データ格納用メモリ1702、タグテーブル解析部1703、CLUT圧縮データ抽出部1704、JPEG可逆符号化データ復号部1705、CLUT要素データ復号部1706、プレーンバッファ1707、CLUT格納用メモリ1708、ICCプロファイルデータ復元部1709、ICCプロファイル出力部1710、そして、装置全体の制御を司る制御部1750を備える。同図において1711、1712は信号線を示す。   FIG. 17 is a block diagram of the decoding side of the multidimensional data decoding apparatus according to the second embodiment. As shown in FIG. 17, the multidimensional data decoding apparatus according to this embodiment includes an ICC profile compressed data input unit 1701, an ICC profile compressed data storage memory 1702, a tag table analysis unit 1703, a CLUT compressed data extraction unit 1704, JPEG lossless encoded data decoding unit 1705, CLUT element data decoding unit 1706, plane buffer 1707, CLUT storage memory 1708, ICC profile data restoration unit 1709, ICC profile output unit 1710, and control unit 1750 that controls the entire apparatus Is provided. In the figure, reference numerals 1711 and 1712 denote signal lines.

以下、図17を参照して、本第2の実施形態に係る多次元データの復号装置の制御部1750が行うICCプロファイルデータの復号処理について説明する。   The ICC profile data decoding process performed by the control unit 1750 of the multidimensional data decoding apparatus according to the second embodiment will be described below with reference to FIG.

本第2の実施形態に係る復号装置は、上述の符号化装置(図13)で生成した図15の構造を有するICCプロファイル圧縮データを入力し、元のICCプロファイルデータを復元する。   The decoding apparatus according to the second embodiment receives the ICC profile compressed data having the structure of FIG. 15 generated by the above-described encoding apparatus (FIG. 13), and restores the original ICC profile data.

まず、ICCプロファイル圧縮データ入力部1701は、復号対象となるICCプロファイル圧縮データを入力する。ICCプロファイル圧縮データ入力部1701は外部記憶媒体へのインターフェース、またはネットワークへのインターフェース等であり、復号対象となるICCプロファイルデータを装置内部に取り込む役割を果たす。ICCプロファイル圧縮データ入力部1701は、入力されるICCプロファイルデータを、一旦、ICCプロファイル格納用メモリ1702に格納する。   First, the ICC profile compressed data input unit 1701 inputs ICC profile compressed data to be decoded. An ICC profile compressed data input unit 1701 is an interface to an external storage medium, an interface to a network, or the like, and plays a role of taking ICC profile data to be decoded into the apparatus. The ICC profile compressed data input unit 1701 temporarily stores input ICC profile data in the ICC profile storage memory 1702.

ICCプロファイルデータがICCプロファイル圧縮データ格納用メモリ1702に格納されると、タグテーブル解析部1703は、ICCプロファイルのタグテーブルを解析し、lut16Typeのタグ付き要素データを抜き出してCLUT抽出部1704に送る。   When the ICC profile data is stored in the ICC profile compressed data storage memory 1702, the tag table analysis unit 1703 analyzes the tag table of the ICC profile, extracts the lut16Type tagged element data, and sends the extracted element data to the CLUT extraction unit 1704.

CLUT抽出部1704は、その内部に不図示のバッファを有し、タグテーブル解析部1703により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものである。ICCプロファイルデータにおいては、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。先に説明したように、ICCプロファイル圧縮データにおいては、このCLUTがJPEG可逆符号化データに置き換えられている。CLUT抽出部1704はlut16Typeのフォーマットに従って、CLUTの配列次元数i,各配列要素の成分数o,各次元の要素数gを取得し、本来CLUTが格納されているべき位置(JPEG可逆符号化データの開始位置に相当)を特定する。   The CLUT extraction unit 1704 has a buffer (not shown) therein, and stores lut16Type tagged element data extracted by the tag table analysis unit 1703. The lut16Type tagged element data associates the i-dimensional color space with another o-dimensional color space. The ICC profile data includes a 3 × 3 array, a one-dimensional input table, a multi-dimensional color lookup table (CLUT), and a one-dimensional output table. As described above, in the ICC profile compressed data, this CLUT is replaced with JPEG lossless encoded data. The CLUT extraction unit 1704 acquires the number of array dimensions i of the CLUT, the number of components o of each array element, and the number of elements g of each dimension in accordance with the format of lut16Type, and the position where the CLUT should originally be stored (JPEG lossless encoded data). (Corresponding to the start position).

JPEG可逆符号化データ復号部1705は、CLUT圧縮データ抽出部1704で指定されるJPEG可逆符号化データの先頭位置からJPEG可逆符号化データの復号処理を開始し、CLUTの各要素のプレーン間差分値D0(x、y、z)、D1(x、y、z)、D2(x、y、z)を順に復号する。   The JPEG lossless encoded data decoding unit 1705 starts decoding the JPEG lossless encoded data from the start position of the JPEG lossless encoded data designated by the CLUT compressed data extraction unit 1704, and the inter-plane difference value of each element of the CLUT D0 (x, y, z), D1 (x, y, z), and D2 (x, y, z) are sequentially decoded.

CLUT要素データ復号部1706は、JPEG可逆符号化データ復号部1705により復号されるプレーン間差分値D0(x、y、z)、D1(x、y、z)、D2(x、y、z)について、プレーンバッファ1707からI0(x、y、z−1)、I1(x、y、z−1)、I2(x、y、z−1)を読み出し、上述のプレーン間差分変換部1306(図13)と対になる処理により、着目するCLUTの要素の各成分値I0(x,y,z)、I1(x,y,z)、I2(x、y、z)をそれぞれ復号する。   The CLUT element data decoding unit 1706 includes interplane difference values D0 (x, y, z), D1 (x, y, z), and D2 (x, y, z) decoded by the JPEG lossless encoded data decoding unit 1705. , I0 (x, y, z-1), I1 (x, y, z-1), and I2 (x, y, z-1) are read from the plane buffer 1707, and the above-described interplane difference conversion unit 1306 ( With the processing paired with FIG. 13), each component value I0 (x, y, z), I1 (x, y, z), I2 (x, y, z) of the element of the target CLUT is decoded.

プレーンバッファ1707はCLUT要素復号部1706から出力される3次元配列の要素を1プレーン分格納する。なお、説明が前後するが、制御部1750は、復号処理開始時に、プレーンバッファ1705を全ての値を0に初期化する。   The plane buffer 1707 stores one plane of the elements of the three-dimensional array output from the CLUT element decoding unit 1706. Although the description will be mixed, the control unit 1750 initializes all values of the plane buffer 1705 to 0 at the start of the decoding process.

CLUT格納用メモリ1708には復号されたCLUTの各要素が順次格納される。プレーン間差分からCLUT要素を復号する点を明記するため、プレーンバッファ1707とCLUT格納用メモリ1708を記したが、直前のプレーンの要素値はCLUT格納用メモリ1708にも格納されているので、CLUT格納用メモリ1708のみを有してプレーンバッファ1707の機能を持たせても良い。   Each element of the decrypted CLUT is sequentially stored in the CLUT storage memory 1708. The plane buffer 1707 and the CLUT storage memory 1708 are shown to clearly indicate the point at which the CLUT element is decoded from the interplane difference. However, since the element value of the previous plane is also stored in the CLUT storage memory 1708, the CLUT Only the storage memory 1708 may be provided to have the function of the plane buffer 1707.

CLUT格納用メモリ1708にCLUTの全ての要素が格納されると、ICCプロファイル復元部1709は、ICCプロファイル圧縮データ格納用メモリ1702に格納されるICCプロファイル圧縮データと、CLUT格納用メモリ1708に格納されるCLUTデータから必要なデータを取り出し、ICCプロファイルデータを復元して出力する。ICCプロファイルデータはICCプロファイル圧縮データ格納用メモリ1702に格納されるICCプロファイル圧縮データのうち、CLUT圧縮データ抽出部で抽出されたCLUT圧縮データ(JPEG可逆符号化データ)をCLUT格納用メモリに格納されているCLUTデータで置き換えたものである。復元されるICCプロファイルは図14に示した構造をもつICCプロファイルデータである。ICCプロファイル圧縮データ(図15)との違いは、CLUTの復号によりCLUT圧縮データを含むタグ付き要素データ1501(図15)のCLUT圧縮データ部分がCLUT格納用メモリ1708に格納されるCLUTデータによって置き換えられ、図14のようにCLUTを含むタグ付き要素データ1403になる点である。また、CLUTの復号によるタグ付き要素データのサイズ変更に伴い、タグテーブル中、CLUT圧縮データを含むタグ付き要素データのサイズを記した部分(図15の参照番号1502)が書き換えられる。更に、CLUT圧縮データを含むタグ付き要素データの後に続くタグ付き要素データ1504のオフセット位置が変わるため、それらのオフセットを記した部分(図15の参照番号1503)も更新される。   When all the elements of the CLUT are stored in the CLUT storage memory 1708, the ICC profile restoration unit 1709 stores the ICC profile compressed data stored in the ICC profile compressed data storage memory 1702 and the CLUT storage memory 1708. Necessary data is extracted from the CLUT data to be restored, and the ICC profile data is restored and output. The ICC profile data is the CLUT compressed data (JPEG lossless encoded data) extracted by the CLUT compressed data extraction unit among the ICC profile compressed data stored in the ICC profile compressed data storage memory 1702, and is stored in the CLUT storage memory. The data is replaced with the CLUT data. The ICC profile to be restored is ICC profile data having the structure shown in FIG. The difference from the ICC profile compressed data (FIG. 15) is that the CLUT data of the tagged element data 1501 (FIG. 15) including the CLUT compressed data is replaced by the CLUT data stored in the CLUT storage memory 1708 by the CLUT decoding. As shown in FIG. 14, the tagged element data 1403 including the CLUT is obtained. As the size of the tagged element data is changed by decoding the CLUT, the portion (reference number 1502 in FIG. 15) in which the size of the tagged element data including the CLUT compressed data is written in the tag table is rewritten. Furthermore, since the offset position of the tagged element data 1504 following the tagged element data including the CLUT compressed data changes, the portion (reference number 1503 in FIG. 15) in which those offsets are also updated.

ICCプロファイルデータ出力部1710はICCプロファイルデータ復元部1709から出力されるICCプロファイルデータを装置外部へと出力する。ICCプロファイルデータ出力部1710は外部記憶装置へのインターフェースであり、圧縮データをファイルとして格納する。なお、このICCプロファイルデータ出力部1710はネットワークへのインターフェース等であっても良い。   The ICC profile data output unit 1710 outputs the ICC profile data output from the ICC profile data restoration unit 1709 to the outside of the apparatus. An ICC profile data output unit 1710 is an interface to an external storage device, and stores compressed data as a file. The ICC profile data output unit 1710 may be an interface to a network.

図18は本実施形態に係る多次元データ処理装置による復号処理の流れを示すフローチャートである。以下、図18に示したフローチャートに従い、本第2の実施形態に係る多次元データの復号装置の制御部1750が行うICCプロファイルデータの符号化処理の全体的な流れについて説明する。   FIG. 18 is a flowchart showing the flow of decoding processing by the multidimensional data processing apparatus according to this embodiment. The overall flow of the ICC profile data encoding process performed by the control unit 1750 of the multidimensional data decoding apparatus according to the second embodiment will be described below with reference to the flowchart shown in FIG.

まず、制御部1750は、ICCプロファイル圧縮データ入力部1701を制御し、復号対象となるICCプロファイル圧縮データを入力させ、それをICCプロファイル圧縮データ格納用メモリ1702に格納させる(ステップS1800)。続いて、制御部1750は、タグテーブル解析部1703を制御し、ICCプロファイル圧縮データに格納されている各タグ付き要素データのタイプ判別が行わせる。そして、制御部1750は、タグテーブル解析部1703を制御し、CLUT圧縮データを含んだタグ付き要素データ(本実施形態ではlut16Typeのタグ付き要素データ)を取り出させ、CLUT圧縮データ抽出部1704へ出力させる。CLUT抽出部1704は、制御部1750の制御の下で、タグ付き要素データの内部からCLUT圧縮データを抽出し、JPEG可逆符号化データ復号部1705に出力する。JPEG可逆符号化データ復号部1705は、プレーン間差分値D0(x,y,z)、D1(x、y、z)、D2(x,y,z)を順に復号する(ステップS1802)。   First, the control unit 1750 controls the ICC profile compressed data input unit 1701 to input ICC profile compressed data to be decoded, and stores it in the ICC profile compressed data storage memory 1702 (step S1800). Subsequently, the control unit 1750 controls the tag table analysis unit 1703 to determine the type of each tagged element data stored in the ICC profile compressed data. Then, the control unit 1750 controls the tag table analysis unit 1703 to extract tagged element data including CLUT compressed data (in this embodiment, tagged element data of lut16Type), and outputs it to the CLUT compressed data extraction unit 1704. Let The CLUT extraction unit 1704 extracts the CLUT compressed data from the inside of the tagged element data under the control of the control unit 1750 and outputs it to the JPEG lossless encoded data decoding unit 1705. The JPEG lossless encoded data decoding unit 1705 sequentially decodes the inter-plane difference values D0 (x, y, z), D1 (x, y, z), and D2 (x, y, z) (step S1802).

CLUT要素復号部1706は、CLUT要素の各成分I0(x,y,z)、I1(x,y,z)、I2(x、y、z)を復号し(ステップS1803)、復号された要素の各成分はプレーンバッファ1707とCLUT格納用メモリ1708に格納する(ステップS1804)。CLUTの全ての要素を復号し終えた場合には処理をステップS1806へと移し、そうでない場合にはステップS1802へと処理を移し、CLUTの次の要素についてステップS1802からステップS1804の処理により復号処理を行う(ステップS1805)。ステップS1806に処理が進むと、ICCプロファイルデータ復元部1809は、ICCプロファイルデータの復元を行なう。最後にステップS1807でICCプロファイルデータ出力部1810から復元されたICCプロファイルデータが装置外部へと出力される。   The CLUT element decoding unit 1706 decodes each component I0 (x, y, z), I1 (x, y, z), I2 (x, y, z) of the CLUT element (step S1803), and the decoded element Are stored in the plane buffer 1707 and the CLUT storage memory 1708 (step S1804). If all elements of the CLUT have been decoded, the process proceeds to step S1806. If not, the process proceeds to step S1802, and the next element of the CLUT is decoded by the process from step S1802 to step S1804. Is performed (step S1805). When the processing proceeds to step S1806, the ICC profile data restoration unit 1809 restores the ICC profile data. Finally, in step S1807, the ICC profile data restored from the ICC profile data output unit 1810 is output to the outside of the apparatus.

以上の処理により、ICCプロファイルデータの復号処理が行われ、装置外部へと復号されたICCプロファイルデータが出力される。   Through the above processing, the ICC profile data is decrypted, and the decrypted ICC profile data is output to the outside of the apparatus.

以上の説明のように、本第2の実施形態に係る多次元データ処理装置では、ICCプロファイルデータに含まれるカラールックアップテーブル(CLUT)をプレーン間差分へ変換した後にJPEG可逆符号化による符号化を行う。ICCプロファイルに含まれるCLUTはプレーン間での予測誤差が近い値をもつ傾向があり、第1の実施形態で述べた効果により圧縮の性能を向上することができる。本実施の形態によれば、プレーン間差分(1次元予測)へ変換後、プレーン内部で平面予測(2次元予測)を適用することで、3次元全ての軸に対して、近隣要素間の相関を利用することができ、高効率な圧縮が可能となる。特に、近隣要素間の相関の高いカラールックアップテーブルの圧縮には有効であると言える。なお、同様の効果をもたらす手法として、プレーン間で2次元予測を用いた誤差に変換した後、プレーン内で前値予測を用いるという場合でも本実施形態と同様の効果を得ることができる。また、本実施の形態の多次元データ処理装置では、カラーマッチングのためのICCプロファイルデータの圧縮に静止画像の可逆符号化方式を用いている。カラー画像の圧縮と、カラーマッチングのための情報(即ちICCプロファイルデータ)の圧縮に同じ方式を用いることで、新たな圧縮方式を必要とせず、簡易にかつ、多次元の相関を有効利用した高効率な符号化が実現できる。本実施形態の場合、機器間でのカラー画像データの受け渡しに際してもJPEG可逆符号化を用いれば良い。反対に例えばJPEG−LSなど、別の可逆符号化方式を適用するのであれば、上述の実施形態においてJPEG可逆符号化に代えて、その符号化方式を適用すれば良い。   As described above, in the multidimensional data processing device according to the second embodiment, the color lookup table (CLUT) included in the ICC profile data is converted into the inter-plane difference and then encoded by JPEG lossless encoding. I do. The CLUT included in the ICC profile tends to have a close prediction error between planes, and the compression performance can be improved by the effects described in the first embodiment. According to the present embodiment, after conversion to inter-plane difference (one-dimensional prediction), by applying plane prediction (two-dimensional prediction) inside the plane, correlation between neighboring elements for all three-dimensional axes. Can be used, and highly efficient compression becomes possible. In particular, it can be said that it is effective for compression of a color lookup table having a high correlation between neighboring elements. Note that, as a technique that brings about the same effect, the same effect as in the present embodiment can be obtained even when the previous value prediction is used within a plane after conversion into an error using two-dimensional prediction between the planes. In the multidimensional data processing apparatus according to the present embodiment, a lossless encoding method for still images is used for compression of ICC profile data for color matching. By using the same method for compression of color images and information for color matching (ie, ICC profile data), a new compression method is not required, and simple and effective use of multidimensional correlation is achieved. Efficient encoding can be realized. In the case of the present embodiment, JPEG lossless encoding may be used when transferring color image data between devices. On the other hand, if another lossless encoding method such as JPEG-LS is applied, the encoding method may be applied instead of JPEG lossless encoding in the above-described embodiment.

また、上記第2の実施形態は、第1の実施形態の変形例と同様、コンピュータが該当するプログラムを実行することでも実施できる。この場合、そのコンピュータプログラムは、図13、17に示すような各構成に対応するモジュールを備え、メイン処理では図16、18の処理を行なえばよいのは容易に理解できよう。   Moreover, the said 2nd Embodiment can be implemented also by running the program which a computer corresponds similarly to the modification of 1st Embodiment. In this case, the computer program includes modules corresponding to the respective configurations as shown in FIGS. 13 and 17, and it can be easily understood that the processing of FIGS. 16 and 18 may be performed in the main processing.

<第3の実施形態>
第2の実施形態では、CLUTが3次元、3成分である場合について説明した。しかしながら、4次元や4成分であっても本発明は適用可能である。また、第2の実施形態では、3次元データのz軸を固定してプレーンを定義したが、多次元データのスキャン順序としては複数の方法が考えられ、上述の例に限定されるものではない。第3の実施形態では、ICCプロファイルデータの中の4次元3成分のカラールックアップテーブルを例に、複数のスキャン順序のうち、符号量が少なくなるスキャン順序を選択して適用する例について説明する。
<Third Embodiment>
In the second embodiment, the case where the CLUT is three-dimensional and three-component has been described. However, the present invention can also be applied to four dimensions or four components. In the second embodiment, the plane is defined by fixing the z-axis of the three-dimensional data. However, a plurality of methods can be considered as the scan order of the multidimensional data, and the present invention is not limited to the above example. . In the third embodiment, an example of selecting and applying a scan order in which the code amount decreases among a plurality of scan orders will be described using a four-dimensional three-component color lookup table in ICC profile data as an example. .

図20に本第3の実施形態に係る符号化装置のブロック構成図を示す。同図に示す通り、第2の実施形態で説明した図13のCLUT抽出部1304を、動作の異なるCLUT抽出部2001に置き換え、さらにスイッチ2002、予測誤差絶対値平均算出部2003を追加した構成となっている。   FIG. 20 shows a block configuration diagram of an encoding apparatus according to the third embodiment. As shown in the figure, the CLUT extraction unit 1304 in FIG. 13 described in the second embodiment is replaced with a CLUT extraction unit 2001 having a different operation, and a switch 2002 and a prediction error absolute value average calculation unit 2003 are added. It has become.

以下、第2の実施形態と共通のブロックについては説明を省略し、動作の異なる点について説明する。   In the following, description of blocks common to the second embodiment will be omitted, and differences in operation will be described.

先に述べたように、本第3の実施形態では4次元3成分のCLUTを例に説明する。第2の実施形態と同様に各次元の要素数g=Nであるとする。つまり、CLUTが有する要素数はN×N×N×N個であり、成分の総数はN×N×N×N×3である。   As described above, in the third embodiment, a four-dimensional three-component CLUT will be described as an example. As in the second embodiment, it is assumed that the number of elements g in each dimension is g = N. That is, the number of elements that the CLUT has is N × N × N × N, and the total number of components is N × N × N × N × 3.

CLUT抽出部2001はその内部に不図示のバッファを有し、タグテーブル解析部1303により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものであり、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。CLUTはi次元の配列であり、各配列要素がo個の成分値を有する。lut16Typeのタグ付き要素データには付加情報として、i、oの他、CLUTの各次元の要素数gが記される。CLUT抽出部1304はlut16Typeのフォーマットに従って、i,o,gを取得し、CLUTの各要素の各成分を順番にプレーン間差分変換部1306へ出力する。先に説明した第2の実施形態では、X,Y,Zの3軸で表現される3次元のCLUTの圧縮について述べたが、本実施形態では、W,X,Y,Zの4軸で表現される4次元のCLUTの圧縮を行う。各次元の要素数g=Nである場合、W軸の値を0からN−1まで変化させて得られるX,Y,Zの3次元データN個について符号化処理を行う。   The CLUT extraction unit 2001 has a buffer (not shown) therein, and stores lut16Type tagged element data extracted by the tag table analysis unit 1303. The lut16Type tagged element data associates an i-dimensional color space with another o-dimensional color space, and is a 3 × 3 array, a one-dimensional input table, a multi-dimensional color lookup table (CLUT), and a one-dimensional output table. Consists of. The CLUT is an i-dimensional array, and each array element has o component values. In addition to i and o, the number of elements g in each dimension of the CLUT is written as additional information in the tagged element data of lut16Type. The CLUT extraction unit 1304 acquires i, o, g in accordance with the format of lut16Type, and outputs each component of each element of the CLUT to the interplane difference conversion unit 1306 in order. In the second embodiment described above, compression of a three-dimensional CLUT expressed by three axes of X, Y, and Z has been described. In this embodiment, four axes of W, X, Y, and Z are used. Performs compression of the four-dimensional CLUT represented. When the number of elements in each dimension is g = N, encoding processing is performed on N pieces of X, Y, and Z three-dimensional data obtained by changing the value of the W axis from 0 to N-1.

以下、個々の3次元データの処理について述べる。   Hereinafter, processing of individual three-dimensional data will be described.

本第3の実施形態におけるCLUT抽出部1304では1つの3次元データについて、走査順序を決定する目的で3次元データの要素を読み出す「前走査」と、実際に符号化を行うために読み出す「本走査」を行う。   In the third embodiment, the CLUT extraction unit 1304 performs “pre-scan” for reading the elements of the three-dimensional data for the purpose of determining the scanning order for one three-dimensional data, and “book” for reading for actual encoding. Scan ".

前走査では、走査順序を変えて3回の読み出しを行う。まず、第1回目の前走査の読み出しでは、図19(a)に示すように、Z軸を固定して得られるXYプレーンをZ軸の値N−1から0まで降順に読み出す。第2回目の前走査の読み出しでは、図19(b)に示すように、Y軸を固定して得られるXZプレーンをY軸の値N−1から0まで順番に読み出す。また、第3回目の前走査の読み出しでは、図19(c)に示すように、X軸を固定して得られるYZプレーンをX軸の値N−1から0まで順番に読み出す。   In pre-scanning, reading is performed three times by changing the scanning order. First, in the first pre-scan reading, as shown in FIG. 19A, the XY plane obtained by fixing the Z axis is read in descending order from the value N−1 of the Z axis to 0. In the second pre-scan reading, as shown in FIG. 19B, XZ planes obtained by fixing the Y axis are read in order from the Y axis values N-1 to 0. In the third pre-scan reading, as shown in FIG. 19C, the YZ plane obtained by fixing the X axis is sequentially read from the X axis value N-1 to 0.

なお、1つのプレーンを表わす2つの軸をA,Bと定義したとき、そのプレーン内を走査する順序は、B軸の値を0に固定にし、Aの軸の座標の値を0、1、…、N−1に変化させる。そして、A軸の座標の値がN−1に到達したとき、B軸の値を1だけ加算し、Aの軸の座標の値を0、1、…、N−1に変化させる。以下、これをB軸の値がN−1、A軸の値がN−1になるまで繰り返すものとする。すなわち、B軸の値をA軸の値よりも優先して変化させるものとする。しかしながら、この逆、すなわち、A軸の値をB軸の値よりも優先しても構わない。   When two axes representing one plane are defined as A and B, the order of scanning in the plane is such that the value of the B axis is fixed to 0 and the coordinate value of the A axis is set to 0, 1, ..., changed to N-1. When the value of the A-axis coordinate reaches N−1, the value of the B-axis is incremented by 1, and the value of the A-axis coordinate is changed to 0, 1,. Hereinafter, this is repeated until the value of the B axis is N-1 and the value of the A axis is N-1. That is, the B-axis value is changed with priority over the A-axis value. However, the opposite, that is, the value of the A axis may be given priority over the value of the B axis.

さて、本走査では、前走査で行った3回の読み出しのいずれかひとつと同じ読み出し方で配列要素の読み出しを行う。走査方法の選択は後述する予測誤差絶対値平均算出部2003から出力される制御信号に基づく。予測誤差絶対値平均算出部2003から信号線2004を介して入力される制御信号が0である場合、前走査における第1回目の読み出しと同じ走査方法で読み出すことで本走査を行なう。また、制御信号が1である場合には第2回目と、また、制御信号が2である場合には第3回目と同じ走査方法で読み出すことで本走査を行なう。   Now, in the main scan, the array elements are read in the same way as any one of the three readings performed in the previous scan. The selection of the scanning method is based on a control signal output from the prediction error absolute value average calculation unit 2003 described later. When the control signal input from the prediction error absolute value average calculation unit 2003 via the signal line 2004 is 0, the main scanning is performed by reading out by the same scanning method as the first reading in the previous scanning. Further, when the control signal is 1, the main scanning is performed by reading by the same scanning method as the second time and when the control signal is 2, the third scanning time.

先ず、前走査を更に詳しく説明する。   First, the pre-scan will be described in more detail.

プレーンバッファ1305はCLUT抽出部1304から出力される3次元配列の要素を1プレーン分格納する。プレーンの概念は第2実施形態と同じであるが、第2の実施形態ではZ軸を固定して形成されるXYプレーンが格納されたのに対し、本第3の実施形態では、固定する軸を変えて3回の読み出しが行われるため、第1回目の読み出しではXYプレーン、第2回目の読み出しではXZプレーン、第3回目ではYZプレーンと格納されるプレーンが変わる。ただし、プレーンバッファ1305は3回の読み出しの開始時点で全ての値を0に初期化される。   The plane buffer 1305 stores one plane of the elements of the three-dimensional array output from the CLUT extraction unit 1304. The concept of the plane is the same as that of the second embodiment, but the XY plane formed by fixing the Z axis is stored in the second embodiment, whereas the fixed axis is stored in the third embodiment. Since the reading is performed three times, the XY plane is changed in the first reading, the XZ plane is changed in the second reading, and the YZ plane is changed in the third reading. However, all values of the plane buffer 1305 are initialized to 0 at the start of reading three times.

プレーン間差分変換部1306は第2の実施形態と同様にCLUT抽出部1304から出力されるIn(x,y,z)(nは0,1,2のいずれか)について、プレーンバッファ1305から当該成分値の直前のプレーンの値を読み出す。ここで直前のプレーンの値とは、第1回目の前走査の読み出しにおいてはIn(x、y, z+1)である。第2回目の前走査の読み出しではIn(x, y+1, z)、そして、第3回目の前走査の読出しではIn(x+1,y, z)である。 そして、プレーン間差分変換部1306は、プレーン間差分値Dn(x、y、z)を生成し、出力する。具体的には以下の式を用いる。
・第1回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y、z+1)+(2^15),(2^16))
・第2回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y+1、z)+(2^15),(2^16))
・第3回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x+1、y、z)+(2^15),(2^16))
Similar to the second embodiment, the inter-plane difference conversion unit 1306 receives the In (x, y, z) (n is 0, 1, or 2) output from the CLUT extraction unit 1304 from the plane buffer 1305. Read the value of the plane immediately before the component value. Here, the value of the immediately preceding plane is In (x, y, z + 1) in the first pre-scan reading. In the second pre-scan reading, In (x, y + 1, z), and in the third pre-scan reading, In (x + 1, y, z). Then, the inter-plane difference conversion unit 1306 generates and outputs an inter-plane difference value Dn (x, y, z). Specifically, the following formula is used.
・ In the case of the first pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y, z + 1) + (2 ^ 15), (2 ^ 16))
・ In the case of the second pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y + 1, z) + (2 ^ 15), (2 ^ 16))
・ In the case of the third pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x + 1, y, z) + (2 ^ 15), (2 ^ 16))

スイッチ2002はCLUT抽出部2001において前走査が行われている間は、端子Ta側に接続され、本走査を行う際には端子Tb側に接続される。   The switch 2002 is connected to the terminal Ta side during pre-scanning in the CLUT extraction unit 2001, and is connected to the terminal Tb side during main scanning.

予測誤差絶対値平均算出部2003は前走査における3回の前走査の読み出しのそれぞれについて、プレーン間差分変換部1306で生成されるプレーン間差分値Dn(x,y,z)を水平方向画素数N,垂直方向画素数NxNの3成分、16ビットの画像データとみなし、JPEGの可逆符号化における予測式の選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用した場合の予測誤差を求め、その絶対値平均を求める。第1回目、第2回目、第3回目の前走査の読み出しについて、それぞれ予測誤差の絶対値平均値を求めることになる。前走査における3回の読み出しそれぞれの、予測誤差の絶対値平均値を算出すると、それら3つ絶対値平均値を比較する。そして、予測誤差が最小となる前走査の読み出しが何回目であったのかを示す制御信号を信号線2004へと出力する。   The prediction error absolute value average calculation unit 2003 uses the inter-plane difference value Dn (x, y, z) generated by the inter-plane difference conversion unit 1306 for each of the three previous scanning reads in the previous scanning. N, 3 components of N × N pixels in the vertical direction, 16-bit image data, and the prediction error when using the selection number m = 4 of the prediction formula in JPEG lossless encoding, that is, Px = Ra + Rb−Rc is obtained. Find the average of its absolute values. For the first, second, and third prescan readings, the absolute value average value of the prediction error is obtained. When the absolute value average value of prediction errors for each of the three readings in the previous scan is calculated, the three absolute value average values are compared. Then, a control signal indicating how many times the pre-scanning reading at which the prediction error is minimized is output to the signal line 2004.

ここで、3回の前走査の絶対平均値のうち、第1回目の前走査の読み出しによる絶対値平均が最小となる場合には、予測誤差絶対値平均値算出部2003は、制御信号2004に“0”を出力する。また、絶対値平均が最小が、第2回目の前走査の読出しであった場合には“1”、第3回目の前走査の読出しであった場合には“2”を制御信号2004として出力する。   Here, when the absolute value average by the first pre-scan reading out of the absolute average values of the three previous scans is minimized, the prediction error absolute value average value calculation unit 2003 outputs the control signal 2004 to the control signal 2004. Outputs “0”. Further, “1” is output as the control signal 2004 when the absolute value average is the minimum for the second previous scan, and “2” is output for the third previous scan. To do.

ここで算出している3つの予測誤差絶対値平均について説明する。図21(a)乃至(c)における黒丸が3次元データの着目する要素であるとする。第1回目の前走査の読み出し時における予測誤差絶対平均値は、図21(a)に斜線でしめした7個の要素を参照して予測した誤差の絶対値平均を示す。第2回目の前走査の読み出し時における予測誤差絶対平均値は図21(b)の斜線で示した7個の要素を参照した予測誤差の絶対値平均である。そして、第3回目の前走査の読み出し時における予測誤差絶対平均値は図21(c)の斜線で示した7個の要素を参照した予測誤差の絶対値平均である。   The three prediction error absolute value averages calculated here will be described. Assume that the black circles in FIGS. 21A to 21C are elements of interest in the three-dimensional data. The prediction error absolute average value at the time of reading of the first pre-scan shows the absolute value average of errors predicted with reference to the seven elements shown by hatching in FIG. The prediction error absolute average value at the time of the second pre-scan reading is the absolute value average of the prediction error with reference to the seven elements indicated by hatching in FIG. Then, the prediction error absolute average value at the time of the third pre-scan reading is the absolute value average of the prediction error with reference to the seven elements indicated by diagonal lines in FIG.

本来、3次元データの各要素について、ある着目する要素とその隣接要素を頂点とする立方体を考えるならば、8通りのやり方があるが、本実施形態ではそのうちの3通りについて予測誤差の絶対値が最小となる走査方法を探索している。もちろん、言うまでもなく、前走査の読み出し回数を増やし、全ての方法について探索するようにしても構わない。   Originally, for each element of the three-dimensional data, there are eight ways to consider a cube having a certain element of interest and its neighboring elements as vertices. In the present embodiment, the absolute value of the prediction error for three of them. Searching for a scanning method that minimizes. Of course, it goes without saying that the number of pre-scanning readings may be increased to search for all methods.

3回の前走査における読み出しが終了し、予測誤差絶対値平均算出部2003から制御信号が出力されると、制御部1350は、スイッチ2002の出力を端子Tbへと切り替える。そして、CLUT抽出部2001は本走査を開始する。先に述べた通り、制御信号2004が“0”の場合には第1回目の前走査の読み出し方と同じ走査方法を用いる。また、制御信号2004が“1”の場合には第2回目の前走査の読出し方、“2”の場合には第3回目の前走査の読み出し方に従って走査を行う。   When the readout in the three pre-scans is completed and a control signal is output from the prediction error absolute value average calculation unit 2003, the control unit 1350 switches the output of the switch 2002 to the terminal Tb. Then, the CLUT extraction unit 2001 starts the main scan. As described above, when the control signal 2004 is “0”, the same scanning method as the reading method of the first pre-scan is used. When the control signal 2004 is “1”, scanning is performed according to the second pre-scan reading method, and when it is “2”, the third pre-scan reading method is performed.

JPEG可逆符号化部1307は、第2の実施形態と同様に、プレーン間差分変換部1306から順次入力されるN×N×N個の要素(1つの要素は3成分であり各々は16ビット)のプレーン間差分値Dn(x、y、z)を水平方向画素数N、垂直方向画素数N×Nの3成分、16ビットの画像データとしてJPEGに規定される可逆符号化(Lossless Process)により符号化し、符号化データをCLUT符号化データ格納用メモリ1308に格納する。JPEGの可逆符号化で用いる予測式についても第2の実施形態と同じく選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用する(詳しくは、規格書のAnnex H Table H.1 - Predictors for lossless codingを参照されたい)。なお、復号時に符号化と同じ走査順序で復号されるよう、符号量が最小となった走査順序に関する情報を、例えば、JPEGのAPPマーカやCOMマーカなどを利用して符号化データ内部に保持するものとする。   The JPEG lossless encoding unit 1307 has N × N × N elements sequentially input from the inter-plane difference conversion unit 1306 (one element is 3 components and each is 16 bits), as in the second embodiment. The inter-plane difference value Dn (x, y, z) is obtained by lossless processing defined by JPEG as three-component, 16-bit image data of horizontal pixel number N and vertical pixel number N × N. The encoded data is stored in the CLUT encoded data storage memory 1308. As with the second embodiment, the selection number m = 4, that is, Px = Ra + Rb−Rc is used for the prediction formula used in JPEG lossless encoding (specifically Annex H Table H.1-Predictors for See lossless coding). In addition, information about the scanning order with the smallest code amount is held in the encoded data using, for example, a JPEG APP marker or a COM marker so that decoding is performed in the same scanning order as encoding. Shall.

上述の処理を4次元のCLUTの1軸を固定して得られるN個の3次元データに対して繰り返して行うことにより、N個のJPEG圧縮データが生成され、格納される。なお、本第3の実施形態では、N個の3次元データについて符号量が最小となると思われる走査方法を探索するという都合上、N個の符号化データを生成する方法について述べたが、第2の実施形態のように固定された走査方法で3次元データを読み出す場合には、必ずしもN個の符号化データとして分ける必要はなく、例えば水平方向画素数N、垂直方向画素数N×N×Nの画像データとして1つの符号化データにまとめるようにしても構わない。   N JPEG compressed data is generated and stored by repeatedly performing the above processing on N three-dimensional data obtained by fixing one axis of a four-dimensional CLUT. In the third embodiment, a method for generating N encoded data has been described for the sake of exploring a scanning method that seems to have the smallest code amount for N three-dimensional data. When three-dimensional data is read by a fixed scanning method as in the second embodiment, it is not always necessary to divide the data into N pieces of encoded data. For example, the number of horizontal pixels N and the number of vertical pixels N × N × N encoded image data may be combined into one encoded data.

なお、本第3の実施形態で生成したICCプロファイル圧縮データは、元が4次元のCLUTであるために、N個の3次元データとして符号化されていること、それぞれの3次元データに対する走査方法が可変となっているが、符号化データから読み出される走査順序に関する情報に基づいてデータを復元し、符号化時と逆の処理でN個の3次元データから4次元データへと復元すれば、第2の実施形態で説明した復号装置とほぼ同じ構成で復号できる。従って、その復号処理についての説明を省略する。   Note that since the ICC profile compressed data generated in the third embodiment is originally a four-dimensional CLUT, it is encoded as N three-dimensional data, and a scanning method for each three-dimensional data. However, if the data is restored based on the information regarding the scanning order read from the encoded data, and is restored from the N three-dimensional data to the four-dimensional data by the reverse process of the encoding, Decoding can be performed with substantially the same configuration as the decoding device described in the second embodiment. Therefore, description of the decoding process is omitted.

以上述べたように、本第3の実施形態では多次元データを2次元化して符号化する際の走査方法について、符号量が少なくなる方法を選択して適用する方法を用いることで、更なる圧縮性能の向上を図っている。   As described above, in the third embodiment, a method of selecting and applying a method that reduces the amount of code is used as a scanning method when two-dimensionally encoding multidimensional data. The compression performance is improved.

<他の実施形態>
本発明は上述した実施の形態に限定されるものではない。例えば、第2の実施形態ではカラールックアップテーブル(CLUT)をJPEGに規定される可逆符号化(Lossless Process)により符号化する例を示した。しかし、これ以外として、JPEG−LS Baseline方式(ITU−T T.87|ISO/IEC14495)など、その他の符号化技術を用いても構わない。また、上述の実施形態では特に言及しなかったが、JPEGの可逆符号化を用いる場合、ハフマン符号の最適化を適用しても良いし、あらかじめ定めたハフマンテーブルを用いる構成としても良い。
<Other embodiments>
The present invention is not limited to the embodiment described above. For example, in the second embodiment, an example in which a color look-up table (CLUT) is encoded by a lossless process defined in JPEG is shown. However, other encoding techniques such as JPEG-LS Baseline system (ITU-T T.87 | ISO / IEC14495) may be used. Although not specifically mentioned in the above-described embodiment, when JPEG lossless encoding is used, optimization of Huffman code may be applied, or a configuration using a predetermined Huffman table may be employed.

また、第2の実施形態で、CLUTが3次元、3成分である場合、第3の実施形態ではCLUTが4次元、3成分である場合を例に説明した。しかしながら、4次元以上の次元数であったり、4成分であっても適用可能である。例えば、例えば5次元4成分、各次元の要素数がNであるCLUTの場合、軸を2つを固定して定義されるN×N×Nの4成分の3次元データがN×N個存在するものとみなして圧縮するといった具合に適用すれば良い。   Further, in the second embodiment, the case where the CLUT has three dimensions and three components is described, and in the third embodiment, the case where the CLUT has four dimensions and three components has been described as an example. However, it is applicable even if the number of dimensions is four or more or four components. For example, in the case of a CLUT with 5 dimensions and 4 components and the number of elements in each dimension is N, there are N × N 4 elements of N × N × N 3D data defined by fixing two axes. It may be applied to such a condition that it is considered to be compressed and compressed.

なお、第2の実施形態のように複数成分を有する多次元データを符号化対象とする場合、更なる可逆符号化の性能向上を図るには、複数成分間での可逆の色変換処理を適用して、成分間の相関を除去するなどの処理を適用しても良い。   When multidimensional data having a plurality of components is to be encoded as in the second embodiment, a reversible color conversion process between a plurality of components is applied to further improve the lossless encoding performance. Then, processing such as removing the correlation between components may be applied.

また、同じく第2の実施形態でICCプロファイルデータをICCプロファイル圧縮データへの符号化する例について述べたが、CLUT圧縮データを必ずしも同じファイル内に収める必要はない。例えば、符号化対象のICCプロファイルデータからCLUTを抜き取ったものと、CLUT圧縮データとを別ファイルとして持つようにしても構わない。更には、複数のICCプロファイルを圧縮する場合など、これらの圧縮データを一つのファイルとして格納したり、共通のタグ付き要素データを共有するようにしても構わない。 以上の説明から明らかなように、本発明は、3次元以上のルックアップテーブルを圧縮する場合に、好適なものであることが理解できよう。   Similarly, in the second embodiment, the example in which the ICC profile data is encoded into the ICC profile compressed data has been described. However, it is not always necessary to store the CLUT compressed data in the same file. For example, the CLUT extracted from the encoding target ICC profile data and the CLUT compressed data may be provided as separate files. Further, when compressing a plurality of ICC profiles, the compressed data may be stored as one file, or common tagged element data may be shared. As is apparent from the above description, it can be understood that the present invention is suitable for compressing a lookup table having three or more dimensions.

また、上記各実施形態からも明らかなように、本発明はコンピュータプログラムをもその範疇とするものである。通常、コンピュータプログラムはCD−ROM等のコンピュータ可読記憶媒体に格納されて、コンピュータのシステムにコピーもしくはインストールすることで実行可能となる。従って、このようなコンピュータ可読記憶媒体も本発明の範疇にあることも明らかである。   Further, as is clear from the above embodiments, the present invention also includes computer programs. Usually, a computer program is stored in a computer-readable storage medium such as a CD-ROM, and can be executed by copying or installing it in a computer system. Therefore, it is obvious that such a computer-readable storage medium is also within the scope of the present invention.

第1の実施形態に係る多次元データの符号化装置のブロック構成図である。It is a block block diagram of the encoding apparatus of the multidimensional data which concerns on 1st Embodiment. 符号化対象の多次元データの概略を示す図である。It is a figure which shows the outline of the multidimensional data of encoding object. 符号化対象の多次元データとプレーンの関係を示す図である。It is a figure which shows the relationship between the multidimensional data of an encoding target, and a plane. バッファ104に格納されるデータの範囲を示す図である。FIG. 4 is a diagram illustrating a range of data stored in a buffer 104. 着目するプレーン間差分値Diの位置と、その周囲のプレーン間差分値の位置Da、Db、Dcとの相対位置関係を示す図である。It is a figure which shows the relative positional relationship of the position of the difference value Di between the attention planes, and position Da, Db, Dc of the difference value between the surrounding planes. 予測誤差eとカテゴリSSSSの対応を示す図である。It is a figure which shows a response | compatibility with the prediction error e and category SSSS. カテゴリSSSSと符号語の対応テーブルを示す図である。It is a figure which shows the correspondence table of category SSSS and a code word. 第1の実施形態における符号化装置が生成する符号化データのデータ構造を示す図である。It is a figure which shows the data structure of the encoding data which the encoding apparatus in 1st Embodiment produces | generates. 第1の実施形態に係る多次元データの復号装置のブロック構成図である。It is a block block diagram of the decoding device of multidimensional data concerning a 1st embodiment. 第1の実施形態の変形例におけるコンピュータのブロック構成図である。It is a block block diagram of the computer in the modification of 1st Embodiment. コンピュータプログラムの符号化処理手順を示すフローチャートである。It is a flowchart which shows the encoding process sequence of a computer program. コンピュータプログラムの復号処理手順を示すフローチャートである。It is a flowchart which shows the decoding processing procedure of a computer program. 第2の実施形態に係る多次元データの符号化装置のブロック構成図である。It is a block block diagram of the encoding apparatus of the multidimensional data which concerns on 2nd Embodiment. 第2の実施形態で符号化対象とするICCプロファイルデータの構造を示す図である。It is a figure which shows the structure of the ICC profile data made into encoding object in 2nd Embodiment. 第2の実施形態の符号化後のICCプロファイル圧縮データの構造を示す図である。It is a figure which shows the structure of the ICC profile compression data after the encoding of 2nd Embodiment. 第2の実施形態に係る多次元データの符号化処理手順を示すフローチャートである。It is a flowchart which shows the encoding process procedure of the multidimensional data which concerns on 2nd Embodiment. 第2の実施形態に係る多次元データの復号装置のブロック構成図である。It is a block block diagram of the decoding device of multidimensional data concerning a 2nd embodiment. 第2の実施形態に係る多次元データの復号装置の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the decoding apparatus of the multidimensional data which concerns on 2nd Embodiment. 符号化対象の3次元データの3つのスキャン方法を示す図である。It is a figure which shows the three scanning methods of the three-dimensional data to be encoded. 第3の実施形態に係る多次元データの符号化装置のブロック構成図である。It is a block block diagram of the encoding apparatus of the multidimensional data which concerns on 3rd Embodiment. 3回の前走査それぞれにおける着目要素と参照要素の関係を表す図である。It is a figure showing the relationship between the attention element and reference element in each of 3 times of previous scanning.

Claims (16)

M(M≧3)次元で表される多次元空間における、Nビットで表わされ、非負の値を持つ要素データを可逆符号化する符号化装置であって、
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力手段と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成手段と、
該生成手段により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化手段とを備え
前記生成手段は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングする
ことを特徴とする符号化装置。
An encoding device that losslessly encodes element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
Input means for sequentially updating the value α of one dimension axis of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) Generating means for calculating element difference data represented by the N bits and indicating a difference of the two-dimensional difference element data set D (α) composed of the element difference data;
Encoding means for predictively encoding the two-dimensional difference element data set D (α) generated by the generation means within the two-dimensional difference element data set D (α) ;
The generating means includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
As a result, the difference element data Dv is mapped to the same N bits as the element data to be encoded.
前記多次元空間は3次元空間であることを特徴とする請求項1に記載の符号化装置。   The encoding apparatus according to claim 1, wherein the multidimensional space is a three-dimensional space. 前記符号化手段は、
差分要素データ集合D(α)中の着目している要素差分データをDiとし、当該着目している要素差分データDiの近傍に位置し、符号化処理済みの3つの要素差分データをDa,Db,Dcとしたとき、
着目している要素差分データDiに対する予測値pを次式に従って算出し、
p=Da+Db−Dc
着目している要素差分データDiと前記予測値pとの差である予測誤差を符号化する
ことを特徴とする請求項1又は2に記載の符号化装置。
The encoding means includes
The element difference data of interest in the difference element data set D (α) is set to Di, and the three element difference data that are located in the vicinity of the element difference data Di of interest and have been subjected to the encoding process are represented by Da and Db. , Dc,
The predicted value p for the element difference data Di of interest is calculated according to the following equation:
p = Da + Db-Dc
The encoding apparatus according to claim 1, wherein a prediction error that is a difference between the element difference data Di of interest and the predicted value p is encoded.
符号化対象の前記多次元空間は、異なる2つの色空間の変換用のカラープロファイルデータに含まれるカラールックアップテーブルであり、
更に、前記カラープロファイルデータからカラールックアップテーブルを抽出するCLUT抽出手段と、
前記符号化手段により得られる多次元データの符号化データで、前記カラープロファイルデータに含まれるカラールックアップテーブルを置き換える更新手段と
を備えることを特徴とする請求項1乃至3のいずれか1項に記載の符号化装置。
The multidimensional space to be encoded is a color lookup table included in color profile data for conversion between two different color spaces,
A CLUT extraction means for extracting a color lookup table from the color profile data;
The update means for replacing a color lookup table included in the color profile data with encoded data of multidimensional data obtained by the encoding means, according to any one of claims 1 to 3, The encoding device described.
前記カラープロファイルデータはICCプロファイルデータであることを特徴とする請求項4に記載の符号化装置。   5. The encoding apparatus according to claim 4, wherein the color profile data is ICC profile data. 前記多次元空間の1つの次元の軸は、前記符号化手段において生成される符号量が少なくなるように選択されることを特徴とする請求項1に記載の符号化装置。   The encoding apparatus according to claim 1, wherein an axis of one dimension of the multidimensional space is selected so that a code amount generated by the encoding unit is reduced. M(M≧3)次元で表される多次元空間における、Nビットで表わされ、非負の値を持つ要素データを可逆符号化する符号化装置の制御方法であって、
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力工程と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成工程と、
該生成工程により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化工程とを備え
前記生成工程は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングする
ことを特徴とする符号化装置の制御方法。
A control method of an encoding device that performs lossless encoding of element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
An input step of sequentially updating one-dimensional axis value α of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) shows the difference, a generation step of the calculating element difference data represented by N bits to produce a two-dimensional element difference data set D (alpha) comprised in the element difference data,
An encoding step of predictively encoding the two-dimensional difference element data set D (α) generated by the generation step in the two-dimensional difference element data set D (α) ,
The generating step includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
By calculating as above, the difference element data Dv is mapped to the same N bits as the element data to be encoded.
前記多次元空間は3次元空間であることを特徴とする請求項7に記載の符号化装置の制御方法。   The method according to claim 7, wherein the multidimensional space is a three-dimensional space. コンピュータが読込み実行することで、前記コンピュータを請求項1乃至6のいずれか1項に記載の符号化装置として機能させることを特徴とするコンピュータプログラム。   A computer program for causing a computer to function as the encoding device according to claim 1 by being read and executed by the computer. 請求項1に記載の符号化装置により生成された符号化データを復号する復号装置であって、
符号化データを入力する入力手段と、
入力した符号化データを復号し、差分要素データ集合D(α)を生成する第1の復号手段と、
1つ前に復号したデータ集合I(α−1)と、前記第1の復号手段で生成された差分要素データ集合D(α)とを加算することで、着目データ集合D(α)を生成する第2の復号手段と
を備えることを特徴とする復号装置。
A decoding device that decodes encoded data generated by the encoding device according to claim 1,
Input means for inputting encoded data;
First decoding means for decoding the input encoded data and generating a difference element data set D (α);
The data set I (α-1) decoded one before and the difference element data set D (α) generated by the first decoding means are added to generate the data set D (α) of interest. And a second decoding means.
前記第1の復号手段は、
差分要素データ集合D(α)中の着目データをDiとし、当該着目データの近傍に位置し、復号済みのデータをDa,Db,Dcとしたとき、
着目データDiに対する予測値pを次式で算出し、
p=Da+Db−Dc
着目データDiの値と前記予測値pとの和を算出することで、前記差分要素データ集合D(α)中の着目位置のデータを復号する
ことを特徴とする請求項10に記載の復号装置。
The first decoding means includes
When the data of interest in the difference element data set D (α) is Di, and is located near the data of interest and the decoded data is Da, Db, Dc,
The predicted value p for the data of interest Di is calculated by the following formula,
p = Da + Db-Dc
The decoding device according to claim 10, wherein the data of the position of interest in the difference element data set D (α) is decoded by calculating the sum of the value of the data of interest Di and the predicted value p. .
前記復号対象の符号化データは、異なる2つの色空間の対応を示したカラープロファイルデータに含まれるカラールックアップテーブルの符号化データであり、
更に、カラープロファイルデータからカラールックアップテーブルの符号化データを抽出する抽出手段と、
前記第2の復号手段により復号された多次元データで、カラープロファイルデータに含まれるカラールックアップテーブルの前記符号化データを置き換えてカラープロファイルデータを復元する更新手段と
を備えることを特徴とする請求項10又は11に記載の復号装置。
The encoded data to be decoded is encoded data of a color lookup table included in color profile data indicating correspondence between two different color spaces,
And extraction means for extracting encoded data of the color lookup table from the color profile data;
And updating means for restoring the color profile data by replacing the encoded data of the color look-up table included in the color profile data with the multidimensional data decoded by the second decoding means. Item 12. The decoding device according to Item 10 or 11.
前記更新手段により復元されるカラープロファイルデータはICCプロファイルデータであることを特徴とする請求項12に記載の復号装置。   The decoding apparatus according to claim 12, wherein the color profile data restored by the updating means is ICC profile data. 請求項1に記載の符号化装置により生成された符号化データを復号する復号装置の制御方法であって、
符号化データを入力する入力工程と、
入力した符号化データを復号し、差分要素データ集合D(α)を生成する第1の復号工程と、
1つ前に復号したデータ集合I(α−1)と、前記第1の復号工程で生成された差分要素データ集合D(α)とを加算することで、着目データ集合D(α)を生成する第2の復号工程と
を備えることを特徴とする復号装置の制御方法。
A control method for a decoding device for decoding encoded data generated by the encoding device according to claim 1, comprising:
An input process for inputting encoded data;
A first decoding step of decoding the input encoded data and generating a difference element data set D (α);
The data set I (α-1) decoded previously and the difference element data set D (α) generated in the first decoding step are added to generate the data set D (α) of interest. A decoding method comprising: a second decoding step.
コンピュータが読込み実行することで、前記コンピュータを請求項10乃至13のいずれか1項に記載の復号装置として機能させることを特徴とするコンピュータプログラム。   A computer program that causes a computer to function as the decoding device according to any one of claims 10 to 13 when the computer reads and executes the computer program. 請求項9又は15に記載のコンピュータプログラムを格納したことを特徴とするコンピュータ可読記憶媒体。   A computer-readable storage medium storing the computer program according to claim 9 or 15.
JP2008037951A 2007-04-06 2008-02-19 Multidimensional data encoding apparatus, decoding apparatus, and control method therefor Expired - Fee Related JP4996501B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2008037951A JP4996501B2 (en) 2007-04-06 2008-02-19 Multidimensional data encoding apparatus, decoding apparatus, and control method therefor
CN2008100900809A CN101282410B (en) 2007-04-06 2008-04-02 Multidimensional data encoding apparatus and decoding apparatus, and control method thereof
EP08154015.5A EP1978749B1 (en) 2007-04-06 2008-04-03 Compression of multidimensional look-up tables for colour space conversion
US12/062,907 US8213729B2 (en) 2007-04-06 2008-04-04 Multidimensional data encoding apparatus and decoding apparatus, and control method thereof

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007101048 2007-04-06
JP2007101048 2007-04-06
JP2008037951A JP4996501B2 (en) 2007-04-06 2008-02-19 Multidimensional data encoding apparatus, decoding apparatus, and control method therefor

Publications (2)

Publication Number Publication Date
JP2008278464A JP2008278464A (en) 2008-11-13
JP4996501B2 true JP4996501B2 (en) 2012-08-08

Family

ID=40014668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008037951A Expired - Fee Related JP4996501B2 (en) 2007-04-06 2008-02-19 Multidimensional data encoding apparatus, decoding apparatus, and control method therefor

Country Status (2)

Country Link
JP (1) JP4996501B2 (en)
CN (1) CN101282410B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101767950B1 (en) 2009-11-24 2017-08-14 에스케이텔레콤 주식회사 Apparatus and Method for extracting correlation parameters between color planes to make prediction image in video codec, and Video Encoding/Decoding Apparatus and Method using the same
WO2011065728A2 (en) * 2009-11-24 2011-06-03 에스케이텔레콤 주식회사 Device and method for extracting correlation parameters between colour planes for prediction, and a recording medium for the same
JP2012044502A (en) * 2010-08-20 2012-03-01 Tomey Corporation Medical color image compression method
KR101355570B1 (en) * 2012-07-13 2014-01-27 (주)자인미디어 Apparatus and method for compressing look up table
US10271034B2 (en) * 2013-03-05 2019-04-23 Qualcomm Incorporated Simplified depth coding
CN109951714B (en) 2013-04-08 2022-11-11 杜比国际公司 Method for encoding and decoding a LUT and corresponding devices
KR102028186B1 (en) * 2013-09-20 2019-10-02 브이아이디 스케일, 인크. Systems and methods for providing 3d look-up table coding for color gamut scalability
JP6661285B2 (en) * 2014-06-02 2020-03-11 三星ディスプレイ株式會社Samsung Display Co.,Ltd. Display panel, method of compensating pixel luminance of display panel and method of compensating pixel parameters
DK3166795T3 (en) * 2015-05-15 2019-02-18 Hewlett Packard Development Co PRINTER CARTRIDGES AND MEMORY UNITS CONTAINING COMPRESSED MULTI-DIMENSIONAL COLOR TABLES
WO2018009226A1 (en) * 2016-07-08 2018-01-11 Hewlett-Packard Development Company, L.P. Color look up table compression
CN106534874B (en) * 2016-11-18 2019-11-29 上海兆芯集成电路有限公司 The compression of texture brick and decompression method and the device using this method
CN110753224B (en) * 2018-07-23 2022-02-01 中国石油化工股份有限公司 Data rearrangement method and system for measurement while drilling data compression

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1330129A3 (en) * 1991-04-10 2006-03-15 Mitsubishi Denki Kabushiki Kaisha Encoder and Decoder
JP3131305B2 (en) * 1992-09-30 2001-01-31 富士通株式会社 Method and apparatus for orthogonal transformation encoding of three-dimensional volume data
US5883976A (en) * 1994-12-28 1999-03-16 Canon Kabushiki Kaisha Selectively utilizing multiple encoding methods
JPH1117971A (en) * 1997-06-24 1999-01-22 Canon Inc Image processor, its method, data processing method and storage medium
JPH11146396A (en) * 1997-11-13 1999-05-28 Nippon Telegr & Teleph Corp <Ntt> Moving image compression coding/decoding method, moving image compression coder/decoder, moving image coding transmission method/system, and recording medium for moving image compression coding/decoding program
JP2002209114A (en) * 2000-12-28 2002-07-26 Canon Inc Method for storing color conversion table and image processing apparatus
JP2002218208A (en) * 2001-01-16 2002-08-02 Sharp Corp Image processor and image formation device provide with the same
JP3504256B1 (en) * 2002-12-10 2004-03-08 株式会社エヌ・ティ・ティ・ドコモ Video encoding method, video decoding method, video encoding device, and video decoding device
JP2005303576A (en) * 2004-04-09 2005-10-27 Sony Corp Image signal processing apparatus and method, recording medium, program, and video camera

Also Published As

Publication number Publication date
JP2008278464A (en) 2008-11-13
CN101282410A (en) 2008-10-08
CN101282410B (en) 2010-11-24

Similar Documents

Publication Publication Date Title
JP4996501B2 (en) Multidimensional data encoding apparatus, decoding apparatus, and control method therefor
EP1978749B1 (en) Compression of multidimensional look-up tables for colour space conversion
US6985630B2 (en) Image processing apparatus and method, program and storage medium
KR100415878B1 (en) Image encoding method and image decoding method
KR20120065394A (en) Image processing apparatus and processing method therefor
JP4522199B2 (en) Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP5158096B2 (en) Encoding data generation apparatus, encoding data generation method, decoding apparatus, and decoding method
KR100475041B1 (en) Image information high-speed compressing method and real-time moving picture transferring method using the same
JP2011254405A (en) Image processor and image processing method
JP4633576B2 (en) Data compression apparatus and data compression program
JP2004201302A (en) Image resolution conversion method
JP2003189109A (en) Image processor and image processing method, and computer program
JP3346051B2 (en) Image processing device
US8494261B2 (en) Image processing apparatus, image processing method, and computer-readable medium
US20050238245A1 (en) Image compression/decompression apparatus and method
JP4629512B2 (en) Data compression apparatus and data compression program
JP4699307B2 (en) Data compression apparatus and data compression program
JP4696738B2 (en) Image data compression method and apparatus, and pseudo gradation image restoration method
JP3736107B2 (en) Image processing device
JP6428232B2 (en) Image processing apparatus and image composition method
JP4633577B2 (en) Data compression apparatus and data compression program
KR100495001B1 (en) Image compression encoding method and system
JP5595142B2 (en) Image processing apparatus and image processing method
JP5523177B2 (en) Image coding apparatus and control method thereof
JP2012095227A (en) Image processing system, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120319

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120511

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

Free format text: PAYMENT UNTIL: 20150518

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4996501

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20150518

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees