JP4078337B2 - Codebook creation method and apparatus for use in vector quantization, and recording medium - Google Patents

Codebook creation method and apparatus for use in vector quantization, and recording medium Download PDF

Info

Publication number
JP4078337B2
JP4078337B2 JP2004212184A JP2004212184A JP4078337B2 JP 4078337 B2 JP4078337 B2 JP 4078337B2 JP 2004212184 A JP2004212184 A JP 2004212184A JP 2004212184 A JP2004212184 A JP 2004212184A JP 4078337 B2 JP4078337 B2 JP 4078337B2
Authority
JP
Japan
Prior art keywords
data
value
minimum value
code
assigned
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
JP2004212184A
Other languages
Japanese (ja)
Other versions
JP2005012824A (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.)
Foundation for Advancement of International Science
Original Assignee
Foundation for Advancement of International Science
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 Foundation for Advancement of International Science filed Critical Foundation for Advancement of International Science
Priority to JP2004212184A priority Critical patent/JP4078337B2/en
Publication of JP2005012824A publication Critical patent/JP2005012824A/en
Application granted granted Critical
Publication of JP4078337B2 publication Critical patent/JP4078337B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、ベクトル量子化で用いるコードブックの作成方法および装置、更にはこれらの処理を行うためのプログラムや所定のデータ構造を有するコードブックを記憶した記録媒体に関するものである。   The present invention relates to a method and apparatus for creating a code book used in vector quantization, and further relates to a recording medium storing a program for performing these processes and a code book having a predetermined data structure.

従来、データ圧縮の手法が種々提案されている。その中で、圧縮データの伸長処理を非常に簡単に行うことが可能なデータ圧縮アルゴリズムの1つとして、「ベクトル量子化」という手法が良く知られている。このアルゴリズムは、古くから信号処理の分野で知られており、特に、画像信号や音声信号のデータ圧縮、あるいはパターン認識に応用されてきた。   Conventionally, various data compression techniques have been proposed. Among them, a technique called “vector quantization” is well known as one of data compression algorithms that can perform decompression processing of compressed data very easily. This algorithm has been known for a long time in the field of signal processing, and in particular has been applied to data compression or pattern recognition of image signals and audio signals.

このベクトル量子化では、ある大きさ(例えば4×4画素のブロック)の画素パターン(コード)を幾つか用意しておき、それぞれにユニークな番号などを与える(この集合体を「コードブック」という)。そして、例えば2次元配列の画像データ中から同じ大きさ(例えば4×4画素)のブロックを順次取り出し、それと最も似通ったパターンをコードブック中から見つけ出して、そのパターンの番号を当該ブロックに当てはめるというデータ圧縮を行う。ベクトル量子化では、1つのブロック内のデータ列が1つのベクトルに対応する。   In this vector quantization, several pixel patterns (codes) of a certain size (for example, a 4 × 4 pixel block) are prepared, and each is given a unique number or the like (this set is called a “codebook”) ). Then, for example, blocks of the same size (for example, 4 × 4 pixels) are sequentially extracted from the image data of a two-dimensional array, and the most similar pattern is found from the code book, and the pattern number is assigned to the block. Perform data compression. In vector quantization, a data string in one block corresponds to one vector.

このようにコード化された圧縮データの受信側あるいは伸長側では、各ブロック毎に番号に対応するパターンをコードブックの中から取り出すだけで、元の画像を再現することができる。したがって、伸長側では、コードブックさえ受け取っているか、あるいはあらかじめ保持していれば、特に特殊な演算は必要としないため、非常に簡単なハードウェアで元の画像を再生することが可能となる。   On the reception side or decompression side of the compressed data encoded in this way, the original image can be reproduced simply by taking out the pattern corresponding to the number for each block from the code book. Therefore, on the decompression side, if the code book is received or held in advance, no special operation is required, and the original image can be reproduced with very simple hardware.

上述のようなベクトル量子化を実行する上で、必ず必要となるのがコードブックの作成である。そして、ベクトル量子化の特性上、再現される再生画像の良否は、使用するコードブックの良否と密接に関係している。したがって、例えば画像のデータ圧縮を行う際に、高い圧縮率を保持したまま高画質の再生画像を得るようにするためには、このコードブックとしていかに性能の良いものを作成するかが課題となっている。   In order to execute the vector quantization as described above, it is necessary to create a code book. The quality of the reproduced image to be reproduced is closely related to the quality of the code book to be used due to the characteristics of vector quantization. Therefore, for example, when performing data compression of an image, in order to obtain a high-quality reproduced image while maintaining a high compression ratio, it is a problem how to create a high-performance codebook. ing.

従来、コードブックの最適化の手法としては、Kohonen の自己組織化マップの手法などを始めとして幾つかの手法が知られている。これらの手法では、サンプル画像などを用いて適当な数式処理を行うことにより、コードブックの最適化を図るものである。しかしながら、従来の最適化技術は何れも、得られるコードブックは、最適化の際に使用したデータに対してのみ有用なコードブックとなってしまうという問題があった。   Conventionally, several methods have been known as codebook optimization methods, including Kohonen's self-organizing map method. In these methods, the code book is optimized by performing appropriate mathematical processing using a sample image or the like. However, all the conventional optimization techniques have a problem that the obtained code book is a useful code book only for the data used in the optimization.

すなわち、例えば、ある人の顔の画像データを用いて最適化されたコードブックは、その最適化に用いた画像に対しては最良のコードブックとなるが、他の画像に対しては必ずしも最良のコードブックになるとは限らない。したがって、例えば、そのコードブックを他の人の顔の画像データに対して用いてデータ圧縮を実施すると、圧縮データから再生した画像の画質は低下することになる。   That is, for example, a codebook optimized using image data of a person's face is the best codebook for the image used for the optimization, but is not necessarily best for other images. Not necessarily a codebook. Therefore, for example, if the code book is used for image data of another person's face and data compression is performed, the image quality of an image reproduced from the compressed data is lowered.

さらに、最適化に用いた画像と同じ"人の顔"という分類に含まれる画像に対しては、再生画像として比較的良好な画質が得られても、風景や文字といった異なる分類の画像に対しては、画質が劣化してしまうことが多い。つまり、コードブックに含まれているパターンが画像によって全く異なっているため、汎用性の低いコードブックになってしまうという問題があった。   Furthermore, for images that are included in the same “human face” category as the images used for optimization, images with different classifications such as landscapes and characters can be used, even if a relatively good image quality is obtained as a playback image. As a result, the image quality often deteriorates. That is, since the patterns included in the code book are completely different depending on the image, there is a problem that the code book becomes less versatile.

また、上記従来の最適化技術では、最適化されたコードブック中にどのようなパターンが含まれているのか分からないという問題もあった。   Further, the conventional optimization technique has a problem that it is not possible to know what pattern is included in the optimized code book.

本発明は、このような問題を解決するために成されたものであり、データ値が急激に変化するパターンのデータ、例えば文字画像のデータに対して汎用性の高いコードブックを実現できるようにすることを第1の目的とする。
また、本発明は、最適化されたコードブック中にどのようなパターンが含まれているのかを容易に認識できるようにすることを第2の目的とする。
The present invention has been made to solve such a problem, so that a highly versatile code book can be realized for pattern data whose data values change rapidly, for example, character image data. This is the first purpose.
The second object of the present invention is to make it easy to recognize what pattern is included in an optimized codebook.

本発明によるベクトル量子化で用いるコードブックの作成方法は、少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する方法において、上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定し、上記設定された割合に従って上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成することを特徴とする。ここで、上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに対して中間値を割り当てるようにしても良い。
本発明によるベクトル量子化で用いるコードブックの作成装置は、少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する装置において、上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定する割合設定手段と、上記設定された割合に従って、上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成するコードベクトル作成手段とを備えたことを特徴とする。ここで、上記コードベクトル作成手段は、上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに中間値を割り当てるようにしても良い。
本発明によるコンピュータ読み取り可能な記録媒体は、少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する手順のプログラムを記憶した記録媒体であって、上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定し、上記設定された割合に従って上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成する手順をコンピュータに実行させるためのプログラムを記録したことを特徴とする。
また、本発明による他のコンピュータ読み取り可能な記録媒体は、少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックであって、上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合に従って、上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当て、上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに対して中間値を割り当てることによって1つのコードベクトルとするデータ構造を有するコードブックが記録されたことを特徴とする。
According to the present invention, there is provided a method of creating a codebook used in vector quantization, which comprises a set of code vectors, which is a data string having at least one or more data. In the data sequence that constitutes the vector, the ratio of the maximum value or the minimum value that each data of the data sequence can take is set, and the maximum value is set in any data that constitutes the data sequence according to the set ratio Alternatively, the code vector data string is created by assigning a minimum value and assigning the minimum value or the maximum value to data other than the data to which the maximum value or the minimum value is assigned. Here, an intermediate value may be assigned to predetermined data according to the arrangement state of the data to which the minimum value is assigned.
An apparatus for creating a code book used in vector quantization according to the present invention comprises a set of code vectors, which is a data string having at least one or more data. In the apparatus for creating a code book used in vector quantization, the code book In the data sequence constituting the vector, ratio setting means for setting the proportion of the maximum value or the minimum value that each data of the data sequence can take, and any data constituting the data sequence according to the set ratio Code vector creating means for assigning the maximum value or the minimum value to the data, and creating a data string of the code vector by assigning the minimum value or the maximum value to data other than the data to which the maximum value or the minimum value is assigned, respectively; It is provided with. Here, the code vector creating means may assign an intermediate value to predetermined data according to the arrangement state of the data to which the minimum value is assigned.
A computer-readable recording medium according to the present invention is a recording medium that includes a set of code vectors, which are data strings having at least one or more data, and stores a program of a procedure for creating a code book used in vector quantization. In the data sequence constituting the code vector, the ratio of the maximum value or the minimum value that can be taken by each data of the data sequence is set, and the data sequence is configured according to the set ratio. The computer executes the procedure for creating the data sequence of the code vector by assigning the maximum value or minimum value to the data and assigning the minimum value or maximum value to data other than the data to which the maximum value or minimum value is assigned. It is characterized by having recorded a program for making it happen.
Another computer-readable recording medium according to the present invention is a codebook used in vector quantization, which is a codebook used in vector quantization, which is a set of code vectors that is a data string having at least one data. The maximum value or the minimum value is assigned to any data constituting the data string according to the ratio of the maximum value or the minimum value that each data of the data string can take in the data string constituting the data string, and the maximum value Alternatively, one code is assigned by assigning a minimum value or a maximum value to data other than the data to which the minimum value is assigned, and assigning an intermediate value to predetermined data according to the arrangement state of the data to which the minimum value is assigned. A codebook having a data structure as a vector is recorded.

本発明によれば、ベクトルを構成するデータ列において、データ列の各データがとり得る値の最大値または最小値が占める割合を設定し、設定された割合に従って上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって1つのコードベクトルを作成するようにしたので、少なくともデータ値が急激に変化するパターンのデータ、例えば文字画像のデータに対しては汎用性の高いコードブックを容易に作成することができる。また、作成されたコードブック中にどのようなパターンが含まれているのかを容易に認識することもできる。   According to the present invention, in the data string constituting the vector, the ratio of the maximum value or the minimum value that each data string can take is set, and any data constituting the data string according to the set ratio Since one code vector is created by assigning the minimum value or the maximum value to data other than the data to which the maximum value or the minimum value is assigned, and at least the data value A highly versatile codebook can be easily created for pattern data in which the abruptly changes, for example, character image data. It is also possible to easily recognize what pattern is included in the created codebook.

以上のように、本発明によれば、所望の値をコードベクトルのデータに与えることで、単調に変化するデータや急激に変化するデータを含む種々のデータに対応できる汎用性の高いコードブックを実現することができる。そして、本発明により作成したコードブックを用いることにより、種々の画像について、高い圧縮率であっても高品位の画像を再生できる、汎用性の高いデータ圧縮・伸長システムを実現することが可能となる。   As described above, according to the present invention, a highly versatile codebook that can deal with various data including monotonously changing data and rapidly changing data can be obtained by giving a desired value to the code vector data. Can be realized. By using the code book created according to the present invention, it is possible to realize a highly versatile data compression / decompression system that can reproduce high-quality images for various images even at a high compression rate. Become.

以下、本発明の一実施形態を図面に基づいて説明する。
(第1の実施形態)
第1の実施形態では、例えば顔画像用のコードブックを作成する装置および方法について説明する。図1は、本実施形態によるコードブック作成装置の構成例を示す機能ブロック図であり、図2は、本実施形態によるコードブック作成装置の動作を示すフローチャートである。また、図3は、本実施形態による顔画像用のコードブックの作成方法を説明するための概念図である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
(First embodiment)
In the first embodiment, an apparatus and method for creating a code book for a face image, for example, will be described. FIG. 1 is a functional block diagram illustrating a configuration example of the code book creation device according to the present embodiment, and FIG. 2 is a flowchart illustrating the operation of the code book creation device according to the present embodiment. FIG. 3 is a conceptual diagram for explaining a method of creating a face image code book according to the present embodiment.

一般に、顔画像は画素値が全体的に滑らかに変化するパターンが大半を占めており、その変化は単調で、変化量は非常に小さいものである。そこで、本実施形態では、顔画像用コードブックの典型的なコードパターンとして、図3に示すように、8つの方向に単調に変化するパターンを作成することとした。   In general, most of the face image has a pattern in which pixel values change smoothly as a whole, the change is monotonous, and the amount of change is very small. Therefore, in this embodiment, as a typical code pattern of the face image code book, a pattern that changes monotonously in eight directions is created as shown in FIG.

すなわち、例えば4画素×4画素のブロックから成る各画素値の集合をコードブック中の1つのベクトル(以下、コードベクトルと言う)とし、ブロックのエッジ部分(上下左右の各辺および四隅の各点)の何れかを始点として、ブロック内の画素値(例えば輝度値)が徐々に変化するパターンを作成する。なお、ここでは一例として4×4画素単位のコードベクトルを作成しているが、この大きさに限定されるものではない。   That is, for example, a set of pixel values each composed of a block of 4 pixels × 4 pixels is defined as one vector (hereinafter referred to as a code vector) in the code book, and the edge portion of the block (upper and lower left and right sides and four corner points) ) Is used as a starting point to create a pattern in which pixel values (for example, luminance values) in the block gradually change. Here, as an example, a code vector in units of 4 × 4 pixels is created, but the size is not limited to this.

図3(a)において、パターン1(図では丸付き数字で示す)は、ブロックの左辺を始点として、縦1列を1単位として輝度値が右辺に向かってA→B→C→Dのように徐々に大きくなっていくパターンである。変化の度合いは、例えば図3(b)に示すように、1画素ごとに輝度値で20ずつ変化させていくものとする。すなわち、ブロック内の最左列の輝度値をKとすると、2列目、3列目、最右列の輝度値はそれぞれK+20、K+40、K+60となる。   In FIG. 3A, pattern 1 (indicated by a circled number in the figure) is such that the luminance value is A → B → C → D with the left side of the block as the starting point and the vertical column as one unit toward the right side. The pattern gradually increases. For example, as shown in FIG. 3B, the degree of change is changed by 20 brightness values for each pixel. That is, if the luminance value of the leftmost column in the block is K, the luminance values of the second, third, and rightmost columns are K + 20, K + 40, and K + 60, respectively.

本実施形態では、この変化の度合いとして輝度値で20を最大とし、度合いを例えば10、5、2、1と様々に変えてパターンを生成する。さらに、変化の始点となる画素の輝度値Kは、とり得る最小値と最大値を与えてその間にわたって適宜分散して与える。これにより、パターン1のようにブロック内で左から右に向かって輝度値が徐々に変化していくパターンにもバリエーションを持たせてある。なお、徐々に変化する輝度値のステップ幅は、上述した例に限定されるものではない。   In the present embodiment, the luminance value is set to 20 as the degree of change, and the pattern is generated by changing the degree to various values such as 10, 5, 2, and 1, for example. Furthermore, the luminance value K of the pixel that is the starting point of the change is given as a minimum value and a maximum value that can be taken, and is distributed in an appropriate manner therebetween. As a result, the pattern in which the luminance value gradually changes from the left to the right in the block as in the pattern 1 is also given variations. Note that the step width of the gradually changing luminance value is not limited to the above-described example.

ここでは図3(a)中のパターン1についてのみ詳しく説明したが、他のパターン2〜8(図では丸付き数字で示す)についても同様である。ちなみに、パターン2はブロックの右辺を始点として、縦1列を1単位として輝度値が左辺に向かって徐々に大きくなっていくパターン、パターン3はブロックの下辺を始点として、横1列を1単位として輝度値が上辺に向かって徐々に大きくなっていくパターン、パターン4はブロックの上辺を始点として、横1列を1単位として輝度値が下辺に向かって徐々に大きくなっていくパターンである。   Here, only the pattern 1 in FIG. 3A has been described in detail, but the same applies to the other patterns 2 to 8 (indicated by circled numbers in the figure). By the way, pattern 2 is a pattern in which the luminance value gradually increases toward the left side starting from the right side of the block, starting from the right side of the block, and pattern 3 is 1 unit starting from the bottom side of the block. As a pattern in which the luminance value gradually increases toward the upper side, and the pattern 4 is a pattern in which the luminance value gradually increases toward the lower side with the upper side of the block as the starting point and one horizontal row as one unit.

また、パターン5はブロックの左上角を始点として、斜め1列を1単位として輝度値が右下角に向かって徐々に大きくなっていくパターン、パターン6はブロックの右上角を始点として、斜め1列を1単位として輝度値が左下角に向かって徐々に大きくなっていくパターン、パターン7はブロックの左下角を始点として、斜め1列を1単位として輝度値が右上角に向かって徐々に大きくなっていくパターン、パターン8はブロックの右下角を始点として、斜め1列を1単位として輝度値が左上角に向かって徐々に大きくなっていくパターンである。これらのパターン5〜8では、輝度値が7段階にわたって徐々に変化していく。   Pattern 5 starts with the upper left corner of the block as a starting point, and the luminance value gradually increases toward the lower right corner with one diagonal column as one unit. Pattern 6 starts with the upper right corner of the block as a starting point. The pattern in which the brightness value gradually increases toward the lower left corner with 1 as the unit. Pattern 7 starts with the lower left corner of the block as the starting point, and the brightness value gradually increases toward the upper right corner with 1 row as one unit. The pattern 8 is a pattern in which the luminance value gradually increases toward the upper left corner, starting from the lower right corner of the block as a starting point, with one row as one unit. In these patterns 5 to 8, the luminance value gradually changes over seven stages.

次に、上記図3に示したようなコードベクトルを作成する装置の機能構成およびその動作を、図1に示すブロック図および図2に示すフローチャートを用いて説明する。
図2において、まずステップS1で、例えば4×4画素単位のブロックを幾つかのグループ(グループ数N)に分類する。例えば、図3(a)に示したパターン1のコードベクトルを作成する場合は、縦1列を1つのグループとしてA〜Dの4つのグループに分ける。
Next, the functional configuration and operation of the apparatus for creating a code vector as shown in FIG. 3 will be described using the block diagram shown in FIG. 1 and the flowchart shown in FIG.
In FIG. 2, first, in step S1, for example, blocks of 4 × 4 pixel units are classified into several groups (number of groups N). For example, when the code vector of the pattern 1 shown in FIG. 3A is created, the vertical column is divided into four groups A to D as one group.

このグループ分けを行う際には、まず図1の始点設定部1を用いて、ブロック内のどこを始点にするかを設定する。例えば図3(a)のパターン1を作成する場合は、ブロック内の左辺4つの画素(グループA)を始点として設定する。なお、この始点設定部1は、例えばキーボードやマウス等の入力デバイスによって構成し、ユーザが任意の始点を設定するようにしても良いし、図3(a)に示した8つのパターン1〜8を順に作成するべく、装置自身が自動的に始点を設定するように構成しても良い。   When this grouping is performed, first, the start point setting unit 1 in FIG. 1 is used to set where in the block the start point is set. For example, when creating the pattern 1 in FIG. 3A, four pixels (group A) on the left side in the block are set as the starting points. The start point setting unit 1 may be configured by an input device such as a keyboard and a mouse, for example, and the user may set an arbitrary start point, or the eight patterns 1 to 8 shown in FIG. May be configured so that the apparatus itself automatically sets the starting point.

グループ化部2は、始点設定部1によってどこが始点として設定されたかに応じて、グループ分けを行う。例えば、図3(a)のパターン1やパターン2を作成する場合は、縦方向の1列を1つのグループとしてグループ分けを行い、パターン3やパターン4を作成する場合は、横方向の1列を1つのグループとしてグループ分けを行う。また、パターン5〜8を作成する場合は、斜め方向の1列を1つのグループとしてグループ分けを行う。   The grouping unit 2 performs grouping according to where the start point setting unit 1 sets the start point. For example, when creating pattern 1 or pattern 2 in FIG. 3A, grouping is performed with one column in the vertical direction as one group, and when creating pattern 3 or pattern 4, one column in the horizontal direction. Are grouped as one group. Further, when creating patterns 5 to 8, grouping is performed with one column in an oblique direction as one group.

次に、ステップS2で、図1の増分設定部3を用いて、隣り合うグループ間の輝度値の増分(step)を設定する。なお、この増分設定部3も、例えばキーボードやマウス等の入力デバイスによって構成し、ユーザが任意の増分を設定するようにしても良いし、あらかじめ決められたデフォルト値を装置が自動的に設定するように構成しても良い。また、このステップS2では、処理済のグループ数をカウントするためのカウント値iを0に初期化する処理も行う。   Next, in step S2, the increment setting unit 3 in FIG. 1 is used to set the increment (step) of the luminance value between adjacent groups. The increment setting unit 3 may also be configured by an input device such as a keyboard or a mouse, for example, and the user may set an arbitrary increment, or the apparatus automatically sets a predetermined default value. You may comprise as follows. In step S2, a process of initializing a count value i for counting the number of processed groups to 0 is also performed.

次に、ステップS3では、図1の始点輝度値設定部4により、上記ブロック内の始点の輝度値を設定する。ここで始点の輝度値を与えるときは、例えば、
0〜(最大輝度値(=255)−(N−1)×step)
の間をn等分し、それぞれの等分値を始点の輝度値として夫々設定する。なお、ここでは、等分値を与えているが、上記0〜(255−(N−1)×step)の範囲内であれば、必ずしも等分値である必要はない。また、ここでは演算によって複数の輝度値を与えているが、上記の範囲内でユーザが自分の判断で始点の輝度値を任意に入力するようにしても良い。
Next, in step S3, the start point brightness value setting unit 4 in FIG. 1 sets the start point brightness value in the block. Here, when giving the luminance value of the starting point, for example,
0 (maximum luminance value (= 255) − (N−1) × step)
Are divided into n equal parts, and each equal value is set as the luminance value of the starting point. Here, although an equal value is given, it is not always necessary to be an equal value as long as it is within the range of 0 to (255− (N−1) × step). Further, although a plurality of luminance values are given by calculation here, the user may arbitrarily input the luminance value of the starting point within the above range based on his / her own judgment.

このようにして始点の輝度値、輝度の増分などの必要な情報が設定されると、それらの情報が図1のコードブック作成部5に与えられる。コードブック作成部5は、図2のステップS4以降の処理を実行することにより、1つのコードベクトルを作成する。すなわち、ステップS3の処理までで、1つのコードベクトル中の始点となる輝度値が設定されたので、次のステップS4では、始点の隣りのグループに処理を移すとともに、カウント値iを1つ増やす。   When necessary information such as the luminance value of the starting point and the luminance increment is set in this way, the information is given to the code book creation unit 5 of FIG. The code book creation unit 5 creates one code vector by executing the processing from step S4 onward in FIG. That is, since the luminance value that is the starting point in one code vector has been set up to the processing in step S3, in the next step S4, the processing is moved to the group adjacent to the starting point, and the count value i is increased by one. .

そして、ステップS5でカウント値iがグループ数Nの値よりも小さいかどうかを判断し、小さい場合は、未処理のグループが残っているということなのでステップS6に進み、現在のグループに対して、(始点のグループの輝度値+i×step)で計算される輝度値を与える。また、カウント値iを1つ増やしてステップS5に戻り、未処理のグループがなくなるまで同様の処理を繰り返す。   In step S5, it is determined whether or not the count value i is smaller than the value of the number of groups N. If the count value i is smaller, it means that an unprocessed group remains, and the process proceeds to step S6. A luminance value calculated by (luminance value of starting point group + i × step) is given. Further, the count value i is incremented by one, the process returns to step S5, and the same process is repeated until there is no unprocessed group.

全てのグループに対して輝度値を与え終わると、始点から終点に向かってグループ毎に徐々に輝度値が大きくなっていくパターンのコードベクトルが生成されたことになる。この場合は、ステップS7に進み、そのとき生成した1つのコードベクトルを図1のコードブックデータメモリ6に格納する。   When luminance values have been given to all groups, a code vector having a pattern in which the luminance value gradually increases from group to group from the start point to the end point is generated. In this case, the process proceeds to step S7, and one code vector generated at that time is stored in the code book data memory 6 of FIG.

以上のように、図2に示したフローチャートの処理が1回終わると、1つのコードベクトルが作成され、それがコードブックデータメモリ6に格納される。このような処理を、ブロック内の始点の位置、始点の輝度値および増分の値を様々に変えながら複数回行うことにより、図3(a)に示したような8つのパターン1〜8のコードベクトルが、異なる輝度値で複数生成されることになる。これら複数のコードベクトルの集合が顔画像用のコードブックとなる。コードブックサイズは、例えば512である。   As described above, when the process of the flowchart shown in FIG. 2 is completed once, one code vector is created and stored in the code book data memory 6. By performing such processing a plurality of times while changing the position of the starting point in the block, the luminance value of the starting point, and the increment value, the codes of the eight patterns 1 to 8 as shown in FIG. A plurality of vectors are generated with different luminance values. A set of these plural code vectors becomes a code book for face images. The code book size is, for example, 512.

図4は、本実施形態の手法により作成したサイズ512のコードブックを使用して、5つの顔画像に対してベクトル量子化(VQ)処理を行った後、それを同じコードブックを用いて復元した各画像のPSNR(Peak signal to noise ratio)特性を示す図である。参考のために、それぞれの画像を用いてKohonen の自己組織化マップの手法によりコードブックを個別に最適化し、それぞれのコードブックを使って各画像にVQ処理をした後で、VQ時に使用したのと同じそれぞれのコードブックを使って復元した各画像のPSNR特性も示した。   FIG. 4 illustrates a vector quantization (VQ) process performed on five face images using a code book of size 512 created by the method of the present embodiment, and then restored using the same code book. It is a figure which shows the PSNR (Peak signal to noise ratio) characteristic of each image. For reference, codebooks were individually optimized using Kohonen's self-organizing map method for each image, and each image was used for VQ processing and then used for VQ. The PSNR characteristics of each image restored using the same codebook are also shown.

この図4の結果から明らかなように、本実施形態の手法により作成した1つのコードブックを用いた場合に得られるPSNR特性は、Kohonen のアルゴリズムにより作成した5つのコードブックを用いた場合に得られるPSNR特性に匹敵するものとなっている。このように、本実施形態によれば、たった1つのコードブックでも、それぞれの顔画像に対してKohonen のアルゴリズムで最適に作成した場合のPSNR特性とほぼ同等な特性が得られており、極めて汎用性の高いコードブックを作成できていることが確認される。   As is clear from the results of FIG. 4, the PSNR characteristic obtained when using one codebook created by the method of the present embodiment is obtained when five codebooks created by Kohonen's algorithm are used. The PSNR characteristics are comparable. As described above, according to the present embodiment, even with only one codebook, the PSNR characteristic when the face image is optimally created by the Kohonen algorithm is obtained, which is extremely versatile. It is confirmed that a highly functional codebook can be created.

以上のように、第1の実施形態によれば、1つのコードブックだけで種々の顔画像に対応することが可能な汎用性の高いコードブックを得ることができる。また、本実施形態においては、あらかじめ決められた所定の演算パターンに従って個々のコードベクトルを作成しているので、最適化されたコードブック中にどのようなパターンが含まれているのかを容易に認識することもできる。   As described above, according to the first embodiment, it is possible to obtain a highly versatile code book that can correspond to various face images with only one code book. In this embodiment, each code vector is created according to a predetermined calculation pattern, so that it is easy to recognize what pattern is included in the optimized code book. You can also

なお、上記実施形態では、ブロック内の始点から終点に向かって輝度値が徐々に大きくなるパターンを生成したが、これとは逆に、輝度値が徐々に小さくなるパターンを生成するようにしても良い。
また、本実施形態では変化の度合いの最大値を20としたが、必ずしも20を用いる必要はなく、例えば40や10などの任意の値を適宜与えてやれば良い。また、コードブックサイズも512である必要はない。
In the above embodiment, a pattern in which the luminance value gradually increases from the start point to the end point in the block is generated. On the contrary, a pattern in which the luminance value gradually decreases may be generated. good.
In the present embodiment, the maximum value of the degree of change is 20. However, 20 is not necessarily used, and an arbitrary value such as 40 or 10 may be appropriately given. Also, the codebook size need not be 512.

(第2の実施形態)
第2の実施形態では、例えば風景画像用のコードブックを作成する装置および方法について説明する。図5は、本実施形態によるコードブック作成装置の構成例を示す機能ブロック図であり、図6は、本実施形態によるコードブック作成装置の動作を示すフローチャートである。また、図7は、本実施形態による風景画像用のコードブックの作成方法を説明するための概念図である。
(Second Embodiment)
In the second embodiment, an apparatus and method for creating a codebook for landscape images, for example, will be described. FIG. 5 is a functional block diagram illustrating a configuration example of the code book creation device according to the present embodiment, and FIG. 6 is a flowchart illustrating the operation of the code book creation device according to the present embodiment. FIG. 7 is a conceptual diagram for explaining a method for creating a codebook for landscape images according to the present embodiment.

風景画像を調べたところ、顔画像の典型パターンと同様に画素値が単調に変化するパターンが多く見受けられるが、その変化の度合いが非常に大きなものが多く含まれていることが分かった。そこで、本実施形態では、ブロック内で輝度値が徐々に変化し、かつ、輝度値のダイナミックレンジをほぼ全範囲にわたって使用するパターンのコードベクトルを作成することとした。   When landscape images were examined, it was found that there were many patterns in which the pixel values changed monotonously as in the typical pattern of the face image, but many patterns with very large changes were included. Therefore, in this embodiment, a code vector having a pattern in which the luminance value gradually changes in the block and the dynamic range of the luminance value is used over almost the entire range is created.

すなわち、ブロックの四隅の何れかを始点とし、その対角側を終点として輝度値が徐々に変化するパターンを使い、ブロック内を例えば5つの領域に分けて定義する。一方、256レベルから成る輝度値のダイナミックレンジを5つの範囲に分けて定義する。そして、ブロック内のそれぞれの領域の輝度値をそれぞれのレベル範囲内で適宜与えることによって、風景用のパターンを作成する。本実施形態では、このような風景用パターンとして、ブロックの四隅を始点として4つの方向に輝度値が徐々に変化するパターンを作成する。   That is, a pattern in which the luminance value gradually changes with one of the four corners of the block as the starting point and the diagonal side as the end point is used, and the inside of the block is defined, for example, divided into five regions. On the other hand, the dynamic range of luminance values consisting of 256 levels is defined by dividing it into five ranges. Then, a landscape pattern is created by appropriately giving the luminance value of each region in the block within each level range. In this embodiment, as such a landscape pattern, a pattern in which luminance values gradually change in four directions starting from the four corners of the block is created.

図7(a)は、ブロックの左上角を始点として、輝度値が右下角に向かって徐々に大きくなっていくパターンを示している。この図7(a)に示すように、4画素×4画素単位のブロックを斜め方向に5つの領域A〜Eに分けて定義する。一方、図7(b)に示すように、0〜255の輝度値のダイナミックレンジを上記5つの領域A〜Eに対応して5つの範囲に分けて定義する。   FIG. 7A shows a pattern in which the luminance value gradually increases toward the lower right corner, starting from the upper left corner of the block. As shown in FIG. 7A, a block of 4 pixels × 4 pixels is divided into five areas A to E in an oblique direction. On the other hand, as shown in FIG. 7B, the dynamic range of luminance values from 0 to 255 is defined by being divided into five ranges corresponding to the five regions A to E.

この例では、領域Aに対して輝度値0〜63、領域Bに対して輝度値63〜95、領域Cに対して輝度値95〜159、領域Dに対して輝度値159〜191、領域Eに対して輝度値191〜255を定義する。そして、ブロック内のそれぞれの領域A〜Eの輝度値として、それぞれに割り当てられたレベルの範囲に属する値を適宜選んで与えることにより、風景用のパターンを作成する。   In this example, the luminance value 0 to 63 for the region A, the luminance value 63 to 95 for the region B, the luminance value 95 to 159 for the region C, the luminance value 159 to 191 for the region D, and the region E. In this case, luminance values 191 to 255 are defined. Then, as a luminance value of each of the areas A to E in the block, a value for a level range assigned to each of the areas is appropriately selected and given to create a landscape pattern.

次に、上記図7に示したようなコードベクトルを作成する装置の機能構成およびその動作を、図5に示すブロック図および図6に示すフローチャートを用いて説明する。
図6において、まずステップS11で、例えば4×4画素単位のブロックを幾つかのグループ(グループ数N)に分類する。例えば、図7(a)に示したパターンのコードベクトルを作成する場合は、ブロック内の各画素をA〜Eの5つのグループに分ける。
Next, the functional configuration and operation of the apparatus for creating a code vector as shown in FIG. 7 will be described using the block diagram shown in FIG. 5 and the flowchart shown in FIG.
In FIG. 6, first, in step S11, for example, blocks of 4 × 4 pixel units are classified into several groups (group number N). For example, when the code vector having the pattern shown in FIG. 7A is created, each pixel in the block is divided into five groups A to E.

このグループ分けを行う際には、まず図5の始点設定部11を用いて、ブロック内のどこを始点にするかを設定する。例えば図7(a)のパターンを作成する場合は、ブロック内の左上角の3画素を始点として設定する。なお、この始点設定部11は、例えばキーボードやマウス等の入力デバイスによって構成し、ユーザが任意の始点を設定するようにしても良いし、4つの方向に変化するパターンを順に作成するべく、装置が自動的に始点を設定するように構成しても良い。グループ化部12は、始点設定部11によってどこが始点として設定されたかに応じて、グループ分けを行う。   When this grouping is performed, first, the start point setting unit 11 in FIG. 5 is used to set where in the block the start point is set. For example, when creating the pattern of FIG. 7A, the upper left corner of the block is set as the start pixel. The start point setting unit 11 may be configured by an input device such as a keyboard or a mouse, for example, and the user may set an arbitrary start point, or a device that sequentially creates patterns that change in four directions. May be configured to automatically set the starting point. The grouping unit 12 performs grouping according to where the start point setting unit 11 sets the start point.

次に、ステップS12で、図5のダイナミックレンジ分割部13を用いて、上記グループ化したN個の領域に対応して、輝度値のダイナミックレンジをN個(S0 ,S1 ,…,SN-1 )に分ける。また、このステップS12では、処理済のグループ数をカウントするためのカウント値iを0に初期化する処理も行う。このようにしてブロックのグループ化やダイナミックレンジの分割が行われると、それらの情報が図1のコードブック作成部14に与えられる。 Next, in step S12, the dynamic range dividing unit 13 of FIG. 5 is used, and N dynamic ranges of luminance values (S 0 , S 1 ,. N-1 ). In step S12, a process of initializing a count value i for counting the number of processed groups to 0 is also performed. When block grouping and dynamic range division are performed in this way, such information is provided to the code book creation unit 14 of FIG.

コードブック作成部14は、図6のステップS13以降の処理を実行することにより、1つのコードベクトルを作成する。すなわち、ステップS13では、始点となるグループ(図7の例ではグループA)に対して、そのグループに対応する輝度のレベル範囲S0 内に属する何れかの輝度値を設定する。次のステップS14では、始点の隣りのグループ(図7の例ではグループB)に処理を移すとともに、カウント値iを1つ増やす。 The code book creation unit 14 creates one code vector by executing the processing from step S13 onward in FIG. That is, in step S13, with respect to (the group A in the example of FIG. 7) group of the starting point, to set one of luminance values belonging to the level range S 0 of the luminance corresponding to the group. In the next step S14, the processing is moved to the group adjacent to the starting point (group B in the example of FIG. 7), and the count value i is incremented by one.

そして、ステップS15でカウント値iがグループ数Nの値よりも小さいかどうかを判断し、小さい場合は、未処理のグループが残っているということなのでステップS16に進み、現在のグループに対して、そのグループに対応する輝度のレベル範囲Si 内に属する何れかの輝度値を設定する。また、カウント値iを1つ増やしてステップS15に戻り、未処理のグループがなくなるまで同様の処理を繰り返す。 In step S15, it is determined whether or not the count value i is smaller than the value of the number of groups N. If the count value i is smaller, it means that an unprocessed group remains, and the process proceeds to step S16. Any luminance value belonging to the luminance level range S i corresponding to the group is set. Further, the count value i is incremented by one, the process returns to step S15, and the same process is repeated until there is no unprocessed group.

全てのグループに対して輝度値を与え終わると、始点から終点に向かってグループ毎に徐々に輝度値が大きくなっていくパターンのコードベクトルが生成されたことになる。この場合は、ステップS17に進み、そのとき生成した1つのコードベクトルを図5のコードブックデータメモリ15に格納する。   When luminance values have been given to all groups, a code vector having a pattern in which the luminance value gradually increases from group to group from the start point to the end point is generated. In this case, the process proceeds to step S17, and one code vector generated at that time is stored in the code book data memory 15 of FIG.

以上のように、図6に示したフローチャートの処理が1回終わると、1つのコードベクトルが作成され、それがコードブックデータメモリ15に格納される。このような処理を、ブロック内の始点の位置、各領域の画素に与える輝度値を様々に変えながら複数回行うことにより、4つの方向に変化するパターンのコードベクトルが、異なる輝度値で複数生成されることになる。これら複数のコードベクトルの集合が風景画像用のコードブックとなる。   As described above, when the process of the flowchart shown in FIG. 6 is completed once, one code vector is created and stored in the code book data memory 15. By performing this process multiple times while changing the position of the start point in the block and the luminance value given to the pixels in each area, multiple code vectors of patterns that change in four directions are generated with different luminance values. Will be. A set of these code vectors is a code book for landscape images.

なお、ここでは図示を省略しているが、本実施形態で作成したコードブックを第1の実施形態と同様に数種類の風景画像に対して適用したところ、それぞれの風景画像に対してKohonen のアルゴリズムで最適に作成したコードブックのPSNR特性とほぼ同等な特性が得られ、比較的良好なPSNR特性を得ることができた。   Although not shown here, when the code book created in this embodiment is applied to several types of landscape images as in the first embodiment, Kohonen's algorithm is applied to each landscape image. Thus, a characteristic almost equivalent to the PSNR characteristic of the codebook optimally prepared by the above method was obtained, and a relatively good PSNR characteristic was obtained.

以上のように、第2の実施形態によれば、1つのコードブックだけで種々の風景画像に対応することが可能な汎用性の高いコードブックを得ることができる。また、本実施形態においては、あらかじめ決められた所定のパターンに従って個々のコードベクトルを作成しているので、最適化されたコードブック中にどのようなパターンが含まれているのかを容易に認識することもできる。   As described above, according to the second embodiment, it is possible to obtain a highly versatile code book that can correspond to various landscape images with only one code book. Further, in the present embodiment, individual code vectors are created according to a predetermined pattern determined in advance, so that it is easy to recognize what pattern is included in the optimized code book. You can also.

なお、上記実施形態では、ブロック内の始点から終点に向かって輝度値が徐々に大きくなるパターンを生成したが、これとは逆に、輝度値が徐々に小さくなるパターンを生成するようにしても良い。
また、本実施形態では、ブロック内の領域を5つに区切ったが、これはコードベクトルを5つの領域に分けただけであって、5つである必要はない。
In the above embodiment, a pattern in which the luminance value gradually increases from the start point to the end point in the block is generated. On the contrary, a pattern in which the luminance value gradually decreases may be generated. good.
In this embodiment, the area in the block is divided into five areas. However, this is only the code vector divided into five areas, and does not need to be five.

(第3の実施形態)
第3の実施形態では、例えば文字が入った画像用のコードブックを作成する装置および方法について説明する。図8は、本実施形態によるコードブック作成装置の構成例を示す機能ブロック図であり、図9は、本実施形態によるコードブック作成装置の動作を示すフローチャートである。また、図10は、本実施形態による文字画像用のコードブックの作成方法を説明するための概念図である。
(Third embodiment)
In the third embodiment, for example, an apparatus and method for creating an image code book containing characters will be described. FIG. 8 is a functional block diagram illustrating a configuration example of the code book creation device according to the present embodiment, and FIG. 9 is a flowchart illustrating the operation of the code book creation device according to the present embodiment. FIG. 10 is a conceptual diagram for explaining a method for creating a code book for character images according to the present embodiment.

文字が入った画像を調べたところ、非常に変化に富んだパターンが大半を占めていることが分かった。また、輝度値の変化も256レベルのダイナミックレンジをフルに使い切るものがほとんどであった。そこで、本実施形態では、文字画像用のコードベクトルとして、図10に示すように4つの典型的なパターンのベクトルを作成することとした。   Examining the images with letters, it was found that most of the patterns were very varied. In addition, most of the changes in the luminance value are those that fully use the 256 level dynamic range. Therefore, in this embodiment, four typical pattern vectors are created as code vectors for character images as shown in FIG.

1つ目のパターンは、図10(a)に示すように、4画素×4画素の背景白パターン(最大輝度値のパターン)に対して、1×1,1×2,1×3,1×4,2×2,2×3,2×4の7種類の黒パターン(最小輝度値のパターン)を適宜埋め込んだパターンである。2つ目のパターンは、図10(b)に示すように、ブロック内において斜線状に黒点を埋め込んだパターンである。   As shown in FIG. 10A, the first pattern is 1 × 1, 1 × 2, 1 × 3, 1 with respect to a background white pattern (maximum luminance value pattern) of 4 × 4 pixels. This is a pattern in which seven types of black patterns (patterns of minimum luminance values) of × 4, 2 × 2, 2 × 3, and 2 × 4 are appropriately embedded. As shown in FIG. 10B, the second pattern is a pattern in which black dots are embedded in a diagonal line in the block.

3つ目のパターンは、図10(c)に示すように、黒点を十字状に交わるように埋め込んだパターンである。また、4つ目のパターンは、図10(d)に示すように、黒点で成る線を途中で折れ曲がったように埋め込んだパターンである。さらに、これらのパターンにおいて、ブロック内における黒点の占め方が直線的であるか否かに応じて、黒点に隣接する画素値を中間値に設定する。   As shown in FIG. 10C, the third pattern is a pattern in which black dots are embedded so as to cross. In addition, the fourth pattern is a pattern in which a black dot line is embedded in the middle as shown in FIG. Further, in these patterns, the pixel value adjacent to the black point is set to an intermediate value depending on whether the black point in the block is linear or not.

次に、上記図10に示したようなコードベクトルを作成する装置の機能構成およびその動作を、図8に示すブロック図および図9に示すフローチャートを用いて説明する。
図9において、まずステップS21で、例えば4×4画素単位のブロックの中で、黒点(最小輝度値)の画素の占める割合を決定する。
Next, the functional configuration and operation of the code vector generating apparatus as shown in FIG. 10 will be described with reference to the block diagram shown in FIG. 8 and the flowchart shown in FIG.
In FIG. 9, first, in step S21, for example, the proportion of pixels of black spots (minimum luminance values) in a 4 × 4 pixel unit block is determined.

このブロック内に占める黒点の割合は、図8の最小輝度割合設定部21によって行う。なお、この最小輝度割合設定部21は、例えばキーボードやマウス等の入力デバイスによって構成し、ユーザが任意の割合を設定するようにしても良いし、様々なパターンを順に作成するべく、装置が自動的に設定するように構成しても良い。   The ratio of black spots in the block is performed by the minimum luminance ratio setting unit 21 in FIG. The minimum luminance ratio setting unit 21 may be configured by an input device such as a keyboard or a mouse, for example, and the user may set an arbitrary ratio, or the apparatus automatically sets various patterns in order. You may comprise so that it may set automatically.

次に、ステップS22で、図8の最大/最小輝度値設定部22を用いて、上記設定された黒点の割合に従って、ブロック内の所定の画素位置に黒点(最小輝度値)を与え、その他の画素位置に白点(最大輝度値)を与える。次に、ステップS23で、ブロック内における黒点の占め方が直線的であるかどうかを判断する。直線的でない場合は、上記ステップS22までの処理で作成されたコードベクトルを図8のコードブックデータメモリ24に格納する。   Next, in step S22, the maximum / minimum luminance value setting unit 22 of FIG. 8 is used to give a black point (minimum luminance value) to a predetermined pixel position in the block according to the set black dot ratio, A white point (maximum luminance value) is given to the pixel position. Next, in step S23, it is determined whether or not the black spots in the block are linear. If not linear, the code vector created by the processing up to step S22 is stored in the codebook data memory 24 of FIG.

一方、ブロック内における黒点の占め方が直線的である場合は、ステップS24に進み、図8の輝度値変更部23を用いて、黒点の画素に隣接する白点の画素の輝度値を、中間色の輝度値に変更する。そして、このようにして作成されたコードベクトルを、図8のコードブックデータメモリ24に格納する。   On the other hand, if the black dot occupancy in the block is linear, the process proceeds to step S24, and the luminance value changing unit 23 in FIG. 8 is used to set the luminance value of the white dot pixel adjacent to the black dot pixel to the intermediate color. Change to the brightness value. Then, the code vector created in this way is stored in the code book data memory 24 of FIG.

以上のように、図9に示したフローチャートの処理が1回終わると、1つのコードベクトルが作成され、それがコードブックデータメモリ24に格納される。このような処理を、ブロック内で黒点の占める割合、黒点の与える位置等を様々に変えながら複数回行うことにより、様々なパターンのコードベクトルが複数生成されることになる。これら複数のコードベクトルの集合が文字画像用のコードブックとなる。   As described above, when the process of the flowchart shown in FIG. 9 is completed once, one code vector is created and stored in the codebook data memory 24. By performing such processing a plurality of times while changing the proportion of black spots in the block, the positions where the black spots are given, and the like, a plurality of code vectors having various patterns are generated. A set of these plural code vectors becomes a code book for character images.

なお、ここでは図示を省略しているが、本実施形態で作成したコードブックを第1の実施形態と同様に数種類の文字画像に対して適用したところ、それぞれの文字画像に対してKohonen のアルゴリズムで最適に作成したコードブックのPSNR特性とほぼ同等な特性が得られ、比較的良好なPSNR特性を得ることができた。   Although not shown here, when the code book created in this embodiment is applied to several types of character images as in the first embodiment, Kohonen's algorithm is applied to each character image. Thus, a characteristic almost equivalent to the PSNR characteristic of the codebook optimally prepared by the above method was obtained, and a relatively good PSNR characteristic could be obtained.

以上のように、第3の実施形態によれば、1つのコードブックだけで種々の文字画像に対応することが可能な汎用性の高いコードブックを得ることができる。また、本実施形態においては、あらかじめ決められた所定の規則に従って個々のコードベクトルを作成しているので、作成されたコードブック中にどのようなパターンが含まれているのかを容易に認識することもできる。   As described above, according to the third embodiment, it is possible to obtain a highly versatile code book that can correspond to various character images with only one code book. In the present embodiment, individual code vectors are created in accordance with predetermined rules, so that it is easy to recognize what patterns are included in the created codebook. You can also.

なお、上記実施形態では、ブロック内における黒点の占めるパターンとして、1×1,1×2,1×3,1×4,2×2,2×3,2×4の7種類にパターン分けしたが、7種類である必要はない。   In the above embodiment, the patterns occupied by the black dots in the block are divided into seven patterns of 1 × 1, 1 × 2, 1 × 3, 1 × 4, 2 × 2, 2 × 3, and 2 × 4. However, there is no need for seven types.

(第4の実施形態)
第4の実施形態は、上記第1〜第3の実施形態で示した方法により作成したそれぞれのコードブックを、サイズ1024の1つのコードブックにまとめたものである。
(Fourth embodiment)
In the fourth embodiment, each code book created by the method shown in the first to third embodiments is combined into one code book of size 1024.

図11は、本実施形態によるサイズ1024のコードブックを使用して、顔画像、風景画像、文字画像を含む19種類の画像A〜Sに対してベクトル量子化(VQ)処理を行った後、それを同じコードブックを用いて復元した各画像のPSNR特性を示す図である。参考のために、それぞれの画像を用いてKohonen の自己組織化マップの手法によりコードブックを個別に最適化し、それぞれのコードブックを使って各画像にVQ処理をした後で、VQ時に使用したのと同じそれぞれのコードブックを使って復元した各画像のPSNR特性も示した。   FIG. 11 illustrates a vector quantization (VQ) process performed on 19 types of images A to S including a face image, a landscape image, and a character image using a code book of size 1024 according to the present embodiment. It is a figure which shows the PSNR characteristic of each image which decompress | restored it using the same codebook. For reference, codebooks were individually optimized using Kohonen's self-organizing map method for each image, and each image was used for VQ processing after each codebook was used for VQ. The PSNR characteristics of each image restored using the same codebook are also shown.

この図11の結果から明らかなように、本実施形態の手法により作成した1つのコードブックを用いた場合に得られるPSNR特性は、Kohonen のアルゴリズムにより作成した19個のコードブックを用いた場合に得られるPSNR特性に匹敵するものとなっている。このように、本実施形態によれば、たった1つのコードブックでも、それぞれの画像に対してKohonen のアルゴリズムで最適に作成した場合のPSNR特性とほぼ同等な特性が得られており、単調に変化する画像や急激に変化する画像を含む様々な画像に対して高品位の画像を再生することができ、極めて汎用性の高いコードブックが作成できていることが確認される。   As is clear from the results of FIG. 11, the PSNR characteristic obtained when using one codebook created by the method of the present embodiment is obtained when 19 codebooks created by Kohonen's algorithm are used. It is comparable to the PSNR characteristics obtained. As described above, according to the present embodiment, even with only one codebook, a characteristic almost equal to the PSNR characteristic when each image is optimally created by the Kohonen algorithm is obtained, and the change is monotonous. It is confirmed that high-quality images can be reproduced for various images including images that change or images that change rapidly, and a highly versatile codebook can be created.

なお、本実施形態ではコードブックのサイズを1024としたが、必ずしも1024である必要はなく、例えば用途に応じて128や512などと適宜決めてやることが可能である。また、3種類のコードブックを1つにまとめたが、適当な2種類のコードブックを1つにまとめるようにしても良い。   In this embodiment, the code book size is 1024. However, the code book size is not necessarily 1024. For example, the code book can be appropriately determined as 128 or 512 according to the application. Further, although the three types of code books are combined into one, appropriate two types of code books may be combined into one.

また、以上に述べた第1〜第4の各実施形態では、4画素×4画素単位のコードベクトルを作成する例を示したが、4画素×4画素である必要はなく、またベクトル量子化の対象が画像データである必要もない。   In each of the first to fourth embodiments described above, an example of generating a code vector in units of 4 pixels × 4 pixels has been shown. However, the code vector need not be 4 pixels × 4 pixels, and vector quantization It is not necessary that the target of the image data.

(本発明の他の実施形態)
なお、以上に説明した本実施形態のコードブック作成装置は、CPU、ROMおよびRAM等を備えたマイクロコンピュータシステムによって構成され、その動作はROMやRAMに格納された作業プログラムに従って実現される。この場合、上記コードブック作成装置の各機能ブロックの機能を実現するためのプログラムを外部から記録媒体を介してコンピュータに供給し、そのプログラムに従って上記各機能ブロックを動作させるようにしても良い。
(Other embodiments of the present invention)
Note that the code book creation device of the present embodiment described above is configured by a microcomputer system including a CPU, a ROM, a RAM, and the like, and the operation is realized according to a work program stored in the ROM or the RAM. In this case, a program for realizing the function of each function block of the codebook creation apparatus may be supplied from the outside to a computer via a recording medium, and the function block may be operated according to the program.

この場合、かかるプログラムを記憶する記録媒体としては、例えばフロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−I、CD−R、CD−RW、DVD、zip、磁気テープ、あるいは不揮発性のメモリカード等を用いることができる。   In this case, as a recording medium for storing such a program, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-I, CD-R, CD-RW, DVD, zip, magnetic A tape or a non-volatile memory card can be used.

また、コンピュータが供給されたプログラムを実行することにより上述の実施形態の機能が実現されるだけでなく、そのプログラムがコンピュータにおいて稼働しているOS(オペレーティングシステム)あるいは他のアプリケーションソフト等と共同して上述の実施形態の機能が実現される場合や、供給されたプログラムの処理の全てあるいは一部がコンピュータの機能拡張ボードや機能拡張ユニットにより行われて上述の実施形態の機能が実現される場合も、かかるプログラムは本発明の実施形態に含まれる。   In addition, the functions of the above-described embodiments are realized by executing a program supplied by a computer, and the program is jointly operated with an OS (operating system) or other application software running on the computer. When the functions of the above-described embodiment are realized, or when all or part of the processing of the supplied program is performed by a function expansion board or a function expansion unit of the computer, the function of the above-described embodiment is realized. Such a program is included in the embodiment of the present invention.

第1の実施形態による顔画像用のコードブック作成装置の構成例を示す機能ブロック図である。It is a functional block diagram which shows the structural example of the code book creation apparatus for face images by 1st Embodiment. 第1の実施形態による顔画像用のコードブック作成装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the code book creation apparatus for face images by 1st Embodiment. 第1の実施形態による顔画像用のコードブックの作成方法を説明するための概念図である。It is a conceptual diagram for demonstrating the creation method of the code book for face images by 1st Embodiment. 第1の実施形態により作成されたコードブックと、Kohonen の自己組織化マップの手法により個々に最適化されたコードブックとのPSNR特性の比較結果を示す図である。It is a figure which shows the comparison result of the PSNR characteristic of the code book produced by 1st Embodiment, and the code book optimized by the technique of Kohonen's self-organization map individually. 第2の実施形態による風景画像用のコードブック作成装置の構成例を示す機能ブロック図である。It is a functional block diagram which shows the structural example of the code book creation apparatus for landscape images by 2nd Embodiment. 第2の実施形態による風景画像用のコードブック作成装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the code book preparation apparatus for landscape images by 2nd Embodiment. 第2の実施形態による風景画像用のコードブックの作成方法を説明するための概念図である。It is a conceptual diagram for demonstrating the creation method of the code book for landscape images by 2nd Embodiment. 第3の実施形態による文字画像用のコードブック作成装置の構成例を示す機能ブロック図である。It is a functional block diagram which shows the structural example of the code book preparation apparatus for character images by 3rd Embodiment. 第3の実施形態による文字画像用のコードブック作成装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the code book preparation apparatus for character images by 3rd Embodiment. 第3の実施形態による文字画像用のコードブックの作成方法を説明するための概念図である。It is a conceptual diagram for demonstrating the creation method of the code book for character images by 3rd Embodiment. 第4の実施形態により作成されたコードブックと、Kohonen の自己組織化マップの手法により個々に最適化されたコードブックとのPSNR特性の比較結果を示す図である。It is a figure which shows the comparison result of the PSNR characteristic of the code book produced by 4th Embodiment, and the code book optimized by the technique of Kohonen's self-organization map individually.

符号の説明Explanation of symbols

1 始点設定部
2 グループ化部
3 増分設定部
4 始点輝度値設定部
5 コードブック作成部
6 コードブックデータメモリ
11 始点設定部
12 グループ化部
13 ダイナミックレンジ分割部
14 コードブック作成部
15 コードブックデータメモリ
21 最小輝度割合設定部
22 最大/最小輝度値設定部
23 輝度値変更部
24 コードブックデータメモリ
DESCRIPTION OF SYMBOLS 1 Start point setting part 2 Grouping part 3 Increment setting part 4 Start point luminance value setting part 5 Code book creation part 6 Code book data memory 11 Start point setting part 12 Grouping part 13 Dynamic range division part 14 Code book creation part 15 Code book data Memory 21 Minimum luminance ratio setting unit 22 Maximum / minimum luminance value setting unit 23 Luminance value changing unit 24 Codebook data memory

Claims (7)

少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する方法において、
上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定し、上記設定された割合に従って上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成することを特徴とするベクトル量子化で用いるコードブックの作成方法。
In a method of creating a codebook that is composed of a set of code vectors, which is a data string having at least one or more data, and is used in vector quantization,
In the data sequence that constitutes the code vector, the ratio of the maximum value or the minimum value that can be taken by each data of the data sequence is set, and the arbitrary data that constitutes the data sequence according to the set ratio is set as described above. A vector quantization characterized by creating a data string of the code vector by assigning a maximum value or a minimum value and assigning a minimum value or a maximum value to data other than the data to which the maximum value or the minimum value is assigned, respectively. How to create a codebook for use in
上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに対して中間値を割り当てることを特徴とする請求項1に記載のベクトル量子化で用いるコードブックの作成方法。   2. The method for creating a codebook used in vector quantization according to claim 1, wherein an intermediate value is assigned to predetermined data in accordance with an arrangement state of data to which the minimum value is assigned. 少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する装置において、
上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定する割合設定手段と、
上記設定された割合に従って、上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成するコードベクトル作成手段とを備えたことを特徴とするベクトル量子化で用いるコードブックの作成装置。
In an apparatus for creating a codebook, which is composed of a set of code vectors, which is a data string having at least one data, and is used in vector quantization,
In the data string constituting the code vector, a ratio setting means for setting a ratio occupied by the maximum value or the minimum value of each value of the data string,
According to the set ratio, the maximum value or the minimum value is assigned to arbitrary data constituting the data string, and the minimum value or the maximum value is assigned to data other than the data to which the maximum value or the minimum value is assigned. A code book creating apparatus used in vector quantization, comprising:
上記コードベクトル作成手段は、上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに中間値を割り当てることを特徴とする請求項3に記載のベクトル量子化で用いるコードブックの作成装置。   4. The code book used in vector quantization according to claim 3, wherein the code vector creating means assigns an intermediate value to predetermined data according to an array state of the data to which the minimum value is assigned. apparatus. 少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックを作成する手順のプログラムを記憶した記録媒体であって、
上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合を設定し、上記設定された割合に従って上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当てることによって上記コードベクトルのデータ列を作成する手順をコンピュータに実行させるためのプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。
A recording medium comprising a set of code vectors, which is a data string having at least one data, and storing a program of a procedure for creating a code book used in vector quantization,
In the data sequence that constitutes the code vector, the ratio of the maximum value or the minimum value that can be taken by each data of the data sequence is set, and the arbitrary data that constitutes the data sequence according to the set ratio is set as described above. A method for causing a computer to execute a procedure for creating a data string of the code vector by assigning a maximum value or a minimum value and assigning a minimum value or a maximum value to data other than the data to which the maximum value or the minimum value is assigned, respectively. A computer-readable recording medium on which a program is recorded.
上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに対して中間値を割り当てる手順を更にコンピュータに実行させるためのプログラムを記録したことを特徴とする請求項5に記載のコンピュータ読み取り可能な記録媒体。   6. The computer according to claim 5, further comprising a program for causing the computer to further execute a procedure of assigning an intermediate value to predetermined data in accordance with an arrangement state of the data to which the minimum value is assigned. A readable recording medium. 少なくとも1つ以上のデータを有するデータ列であるコードベクトルの集合から成り、ベクトル量子化で用いられるコードブックであって、上記コードベクトルを構成するデータ列において、上記データ列の各データがとり得る値の最大値または最小値が占める割合に従って、上記データ列を構成する任意のデータに上記最大値または最小値を割り当てるとともに、上記最大値または最小値を割り当てたデータ以外のデータにそれぞれ最小値または最大値を割り当て、上記最小値が割り当てられたデータの配列状態に応じて、所定のデータに対して中間値を割り当てることによって1つのコードベクトルとするデータ構造を有するコードブックが記録されたコンピュータ読み取り可能な記録媒体。   A code book that is composed of a set of code vectors, which is a data sequence having at least one or more data, and is used in vector quantization, and each data of the data sequence can take in the data sequence constituting the code vector According to the ratio of the maximum value or the minimum value, the maximum value or the minimum value is assigned to any data constituting the data column, and the data other than the data to which the maximum value or the minimum value is assigned is assigned a minimum value or A computer-readable recording of a codebook having a data structure in which one code vector is assigned by assigning a maximum value and assigning an intermediate value to predetermined data according to the arrangement state of the data to which the minimum value is assigned. Possible recording media.
JP2004212184A 1998-04-17 2004-07-20 Codebook creation method and apparatus for use in vector quantization, and recording medium Expired - Fee Related JP4078337B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004212184A JP4078337B2 (en) 1998-04-17 2004-07-20 Codebook creation method and apparatus for use in vector quantization, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP12428398 1998-04-17
JP2004212184A JP4078337B2 (en) 1998-04-17 2004-07-20 Codebook creation method and apparatus for use in vector quantization, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP30980898A Division JP3998348B2 (en) 1998-04-17 1998-10-30 Codebook creation method and apparatus for use in vector quantization, and recording medium

Publications (2)

Publication Number Publication Date
JP2005012824A JP2005012824A (en) 2005-01-13
JP4078337B2 true JP4078337B2 (en) 2008-04-23

Family

ID=34106043

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004212184A Expired - Fee Related JP4078337B2 (en) 1998-04-17 2004-07-20 Codebook creation method and apparatus for use in vector quantization, and recording medium

Country Status (1)

Country Link
JP (1) JP4078337B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8617254B2 (en) 2004-03-10 2013-12-31 Ossur Hf Control system and method for a prosthetic knee

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8617254B2 (en) 2004-03-10 2013-12-31 Ossur Hf Control system and method for a prosthetic knee

Also Published As

Publication number Publication date
JP2005012824A (en) 2005-01-13

Similar Documents

Publication Publication Date Title
JP4033836B2 (en) Compression of paletted color images using variable-length color codes
US5991449A (en) Method and apparatus for encoding and decoding an image
JP2005516554A6 (en) Compression of paletted color images using variable-length color codes
JP3986011B2 (en) Data encoding apparatus and image data encoding method
JP3284932B2 (en) Image processing device
WO2010064486A1 (en) Image processing apparatus, image processing method and program
US5838833A (en) Fractal image compression method and device and fractal image restoration method and device
JP3640318B2 (en) Digital image encoding method and system
JP4078337B2 (en) Codebook creation method and apparatus for use in vector quantization, and recording medium
JP3998348B2 (en) Codebook creation method and apparatus for use in vector quantization, and recording medium
KR100823498B1 (en) Method and recording format for image compression
WO1999055007A1 (en) Method and apparatus for making code book, vector quantizing device, device and method for data compression, device and method for data decompression, system for data compression/decompression
JP3509397B2 (en) Markov model image coding device
JP3675429B2 (en) Adaptive predictive encoding and decoding method and apparatus thereof, and recording medium recording adaptive predictive encoding and decoding program
JP3527415B2 (en) Apparatus and method for creating codebook used in vector quantization, vector quantization method, and recording medium
JP4077771B2 (en) Data reproduction apparatus, reproduction method, data compression apparatus, and compression method
JP2000040966A (en) Device and method for data compression, device and method for data expansion, data compression and expansion system, and recording medium
JPH06225160A (en) Picture data compressor
JP2000201078A (en) Data compression device and method, data decompression device and method, data compression and decompression system and method, code book preparing method and recording medium
WO2006029501A1 (en) Compression method for binary images
JP3344177B2 (en) Fractal image compression device
JP4069393B2 (en) Decoding apparatus and method
JP2002112263A (en) Method and device for companding image data
JPH0923428A (en) Restoration device for fractal picture compression data
Kasambe et al. Modified fractal image compression using genetic algorithms

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051026

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20070525

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080111

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080204

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees