JP2017123614A - Quantization method, quantization device and quantization program - Google Patents

Quantization method, quantization device and quantization program Download PDF

Info

Publication number
JP2017123614A
JP2017123614A JP2016002850A JP2016002850A JP2017123614A JP 2017123614 A JP2017123614 A JP 2017123614A JP 2016002850 A JP2016002850 A JP 2016002850A JP 2016002850 A JP2016002850 A JP 2016002850A JP 2017123614 A JP2017123614 A JP 2017123614A
Authority
JP
Japan
Prior art keywords
value
class
significant
class boundary
histogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016002850A
Other languages
Japanese (ja)
Other versions
JP6538572B2 (en
Inventor
幸浩 坂東
Yukihiro Bando
幸浩 坂東
誠之 高村
Masayuki Takamura
誠之 高村
淳 清水
Atsushi Shimizu
淳 清水
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016002850A priority Critical patent/JP6538572B2/en
Publication of JP2017123614A publication Critical patent/JP2017123614A/en
Application granted granted Critical
Publication of JP6538572B2 publication Critical patent/JP6538572B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a quantization method, a quantization device and a quantization program which can reduce the amount of computation required for quantization even when minimizing conversion errors occurring in gradation conversion of signals.SOLUTION: A quantization method includes a step of comparing the position of a significant element corresponding to a value obtained by adding the maximum value of consecutive numbers of nonsignificant elements in each section whose lower end is the upper limit of a selectable range with the position of a significant element which can be taken as the upper limit of a class and is closest to the upper limit of the selectable range, and storing, in a memory, a quantization value for minimizing the cumulative value of the approximation error up to a class boundary and a minimum value of the cumulative value of the approximation error, and a step of excluding non-significant elements from calculation of the cumulative values of approximation error, obtaining the stored minimum value from the memory, and using the minimum value for calculation of the approximation error in selection of a class boundary when a class boundary is selected, thereby selecting a class boundary that minimizes the sum of approximation errors for all elements of the class boundary.SELECTED DRAWING: Figure 13

Description

本発明は、量子化方法、量子化装置及び量子化プログラムに関する。   The present invention relates to a quantization method, a quantization apparatus, and a quantization program.

近年、画像の高品質化に伴い、広ダイナミックレンジ映像への期待が高まっている。広ダイナミックレンジを有する画像信号に対する高いビット深度を用いた表現が検討されている。従来の8ビットから10ビット以上に拡張した高ビット深度信号を取得可能なデバイスが登場している。   In recent years, with the improvement of image quality, expectations for wide dynamic range images are increasing. Expression using a high bit depth for an image signal having a wide dynamic range has been studied. Devices that can acquire a high bit depth signal expanded from the conventional 8 bits to 10 bits or more have appeared.

画像の符号量は、画像信号の高ビット深度化に応じて増大する。このため、効率的な符号化方法が求められている。図18は、従来の高ビット深度信号の第1の符号化方法を示す図である。従来の高ビット深度信号の第1の符号化方法では、符号化装置は、高ビット深度信号の画像信号にビット深度変換処理を施すことで、画像信号を低ビット深度信号に変換して符号化及び復号処理を行う。さらに、符号化装置は、復号画像に対して逆ビット深度変換処理を行い、高ビット深度画像を生成する。最後に、符号化装置は、高ビット深度画像と入力信号との差分信号を符号化する。符号化装置の出力は、差分信号の符号化ストリームと、低ビット深度信号の符号化ストリームとである。このように、従来の高ビット深度信号の第1の符号化方法は、ビット深度のスケーラブル符号化に対応した方法である。   The code amount of the image increases as the bit depth of the image signal is increased. For this reason, an efficient encoding method is required. FIG. 18 is a diagram illustrating a first conventional encoding method for a high bit depth signal. In the first conventional high bit depth signal encoding method, the encoding apparatus performs bit depth conversion processing on the image signal of the high bit depth signal, thereby converting the image signal into a low bit depth signal and encoding the image signal. And decryption processing. Further, the encoding device performs inverse bit depth conversion processing on the decoded image to generate a high bit depth image. Finally, the encoding device encodes a differential signal between the high bit depth image and the input signal. The output of the encoding device is an encoded stream of a differential signal and an encoded stream of a low bit depth signal. As described above, the first conventional encoding method of a high bit depth signal is a method corresponding to the bit depth scalable encoding.

図19は、従来の高ビット深度信号の第2の符号化方法を示す図である。図19では、符号化装置は、差分信号の符号化ストリームを出力しない。符号化装置は、取得した画像信号にビット深度変換処理を施すことで、画像信号を復号信号に変換して符号化及び復号処理を行う。その後、符号化装置は、低ビット深度画像の復号信号に逆ビット深度変換処理を施し、高ビット深度画像の復号信号を出力する。   FIG. 19 is a diagram illustrating a second conventional encoding method of a high bit depth signal. In FIG. 19, the encoding apparatus does not output the encoded stream of the difference signal. The encoding device performs a bit depth conversion process on the acquired image signal, thereby converting the image signal into a decoded signal and performing encoding and decoding processes. Thereafter, the encoding apparatus performs inverse bit depth conversion processing on the decoded signal of the low bit depth image, and outputs the decoded signal of the high bit depth image.

図18に示す従来の高ビット深度信号の第1の符号化方法における符号化効率は、ビット深度変換処理に大きく依存する。従来の高ビット深度信号の第1の符号化方法においては、入力信号と逆ビット深度変換処理後の復号信号との差分値の二乗和(以下、「ビット深度変換誤差」という。)を抑えることで、符号化器の出力信号の符号量を抑えることができる。ビット深度変換処理において、いくつかのトーンマッピング(Tone Mapping)を用いた方法が非特許文献1に開示されている。符号化効率を向上させるためには、ビット深度変換誤差を最小化するようにビット深度変換が設計される必要がある。   The coding efficiency in the first coding method of the conventional high bit depth signal shown in FIG. 18 largely depends on the bit depth conversion processing. In the first conventional high bit depth signal encoding method, the sum of squares of the difference value between the input signal and the decoded signal after the inverse bit depth conversion process (hereinafter referred to as “bit depth conversion error”) is suppressed. Thus, the code amount of the output signal of the encoder can be suppressed. Non-Patent Document 1 discloses a method using several tone mappings in bit depth conversion processing. In order to improve the coding efficiency, the bit depth conversion needs to be designed so as to minimize the bit depth conversion error.

E. Reinhard, M. Stark, P. Shirley, and J. Ferwerda, "Photographic Tone Reproduction for Digital Images", In SIGGRAPH 2002 Conference Proceeding, ACM SIGGRAPH, Addison Wesley, pp. 267-277, August 2002.E. Reinhard, M. Stark, P. Shirley, and J. Ferwerda, "Photographic Tone Reproduction for Digital Images", In SIGGRAPH 2002 Conference Proceeding, ACM SIGGRAPH, Addison Wesley, pp. 267-277, August 2002.

画素値の振幅方向の疎性に着目すると、画像によっては、与えられたビット深度によって表現可能な値を全て含まない場合がある。例えば、10ビット信号の場合、0から1023までの1024種類の値を表現できる。振幅方向の疎性とは、画素値として画像内に含まれる値の種類が1024通り未満となる性質を指す。つまり、そうした画像では、画素値の頻度をヒストグラムとして表現した場合、頻度が零値になる画素値が存在する。なお、前述のビット深度変化処理は、ヒストグラムに対する一種の量子化処理とみなせる。   Focusing on the sparseness of the pixel values in the amplitude direction, some images may not include all values that can be expressed by a given bit depth. For example, in the case of a 10-bit signal, 1024 types of values from 0 to 1023 can be expressed. The sparseness in the amplitude direction refers to the property that there are less than 1024 kinds of values included in an image as pixel values. That is, in such an image, when the frequency of pixel values is expressed as a histogram, there are pixel values that have a zero frequency. The bit depth change process described above can be regarded as a kind of quantization process for the histogram.

頻度が零値になる画素値は、ビット深度変換誤差に影響を与えない。しかしながら、従来の量子化方法は、信号の階調変換を行う際に発生する変換誤差を最小化する場合、量子化に要する演算量を低減することができないという問題がある。   Pixel values whose frequency is zero do not affect the bit depth conversion error. However, the conventional quantization method has a problem that the amount of calculation required for quantization cannot be reduced when the conversion error that occurs when performing gradation conversion of a signal is minimized.

上記事情に鑑み、本発明は、信号の階調変換を行う際に発生する変換誤差を最小化する場合でも、量子化に要する演算量を低減することが可能となる量子化方法、量子化装置及び量子化プログラムを提供することを目的としている。   In view of the above circumstances, the present invention provides a quantization method and a quantization apparatus that can reduce the amount of calculation required for quantization even when the conversion error that occurs when performing gradation conversion of a signal is minimized. And to provide a quantization program.

本発明の一態様は、第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納するステップと、前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択するステップと、を含む量子化方法である。   According to one aspect of the present invention, a histogram of an input signal representing a value that can take a range expressed by the first number of levels is taken as a range expressed by a second number of levels smaller than the first level. A quantization method in a quantization apparatus that approximates with a histogram of an output signal representing a value to be obtained, wherein a class that is a set of elements of the histogram of the input signal is defined, and a candidate of a class boundary that is a boundary of the class is a significant element The upper limit and the lower limit are defined for the significant element that can be the class boundary, the significant element included in the range from the upper limit to the lower limit is determined as the class boundary candidate, and the class boundary selectable range The position of the significant element corresponding to a value obtained by subtracting the maximum value of the consecutive number of insignificant elements in each section having the upper limit of the selectable range as the lower end with respect to the upper limit; The position of the significant element that is closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class is compared, and the significant element showing a relatively large value is added to the new selectable range of the class boundary. An upper limit, a step of storing in a memory a quantized value for minimizing a cumulative value of approximation errors up to the class boundary and a minimum value of the cumulative value of approximation errors, and selecting the class boundary, Removing the insignificant element from the calculation of the cumulative value of the approximation error, obtaining the stored minimum value from the memory, and using the minimum value in the calculation of the approximation error in the selection of the class boundary, Selecting the class boundary that minimizes the sum of the approximation errors for all elements of the boundary.

本発明の一態様は、第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の下限に対して、前記選択可能範囲の下限を上端とする各区間内における非有意要素の連続数の最大値を加算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に小さな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな下限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納するステップと、前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択するステップと、を含む量子化方法である。   According to one aspect of the present invention, a histogram of an input signal representing a value that can take a range expressed by the first number of levels is taken as a range expressed by a second number of levels smaller than the first level. A quantization method in a quantization apparatus that approximates with a histogram of an output signal representing a value to be obtained, wherein a class that is a set of elements of the histogram of the input signal is defined, and a candidate of a class boundary that is a boundary of the class is a significant element The upper limit and the lower limit are defined for the significant element that can be the class boundary, the significant element included in the range from the upper limit to the lower limit is determined as the class boundary candidate, and the class boundary selectable range The position of the significant element corresponding to a value obtained by adding the maximum value of the continuous number of non-significant elements in each section having the lower limit of the selectable range as the upper end relative to the lower limit The position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class boundary is compared, and the significant element showing a relatively small value is added to the new selectable range of the class boundary. A lower limit, a step of storing in a memory a quantized value for minimizing a cumulative value of approximation error up to the class boundary and a minimum value of the cumulative value of approximation error, and selecting the class boundary, Removing the insignificant element from the calculation of the cumulative value of the approximation error, obtaining the stored minimum value from the memory, and using the minimum value in the calculation of the approximation error in the selection of the class boundary, Selecting the class boundary that minimizes the sum of the approximation errors for all elements of the boundary.

本発明の一態様は、第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置であって、前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納する近似誤差最小値決定部と、前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択する上端追跡部と、を備える量子化装置である。   According to one aspect of the present invention, a histogram of an input signal representing a value that can take a range expressed by the first number of levels is taken as a range expressed by a second number of levels smaller than the first level. A quantization device for approximating with a histogram of an output signal representing a value to be obtained, defining a class that is a set of elements of the histogram of the input signal, limiting class boundary candidates that are boundaries of the class to significant elements, An upper limit and a lower limit are set for the significant element that can be the class boundary, the significant element included in the range from the upper limit to the lower limit is determined as a candidate for the class boundary, and the upper limit of the selectable range of the class boundary is determined The position of the significant element corresponding to the value obtained by subtracting the maximum number of consecutive non-significant elements in each section having the upper limit of the selectable range as the lower end, and the upper limit of the class. Comparing the position of the significant element that is closest to the upper limit of the selectable range among the significant elements that can be determined, the significant element showing a relatively large value as a new upper limit of the selectable range of the class boundary, When selecting the class boundary, an approximate error minimum value determining unit that stores a quantized value that minimizes the cumulative value of the approximate error up to the class boundary and a minimum value of the cumulative value of the approximate error in a memory; Removing the insignificant element from the calculation of the cumulative value of the approximation error, obtaining the stored minimum value from the memory, and using the minimum value in the calculation of the approximation error in the selection of the class boundary, An upper end tracking unit that selects the class boundary that minimizes the sum of the approximation errors for all elements of the boundary.

本発明の一態様は、第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置のコンピュータに、前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納する手順と、前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択する手順と、を実行させるための量子化プログラムである。   According to one aspect of the present invention, a histogram of an input signal representing a value that can take a range expressed by the first number of levels is taken as a range expressed by a second number of levels smaller than the first level. A class of a set of elements of the histogram of the input signal is defined in a computer of a quantizer that approximates with a histogram of an output signal representing a value to be obtained, class boundary candidates that are boundaries of the class are limited to significant elements, An upper limit and a lower limit are set for the significant element that can be the class boundary, the significant element included in the range from the upper limit to the lower limit is determined as a candidate for the class boundary, and the upper limit of the selectable range of the class boundary is determined , The position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number of insignificant elements in each section having the upper limit of the selectable range as the lower end, and the upper limit of the class The significant element that is closest to the upper limit of the selectable range among the significant elements that can be taken, and the significant element showing a relatively large value is a new upper limit of the selectable range of the class boundary And a procedure for storing a quantized value for minimizing a cumulative value of approximation error up to the class boundary and a minimum value of the cumulative value of approximation error in a memory, and when selecting the class boundary, the non-significant Removing the element from the calculation of the cumulative value of the approximation error, obtaining the stored minimum value from the memory, and using the minimum value for the calculation of the approximation error in the selection of the class boundary. And a procedure for selecting the class boundary that minimizes the sum of the approximation errors for all elements.

本発明により、信号の階調変換を行う際に発生する変換誤差を最小化する場合でも、量子化に要する演算量を低減することが可能となる。   According to the present invention, it is possible to reduce the amount of calculation required for quantization even when the conversion error generated when performing gradation conversion of a signal is minimized.

実施形態における、参照テーブルρ[m]を生成する処理の例を示す図である。It is a figure which shows the example of the process which produces | generates reference table (rho) u [m] in embodiment. 実施形態における、参照テーブルρ[m]を生成する処理の例を示す図である。It is a figure which shows the example of the process which produces | generates reference table (rho) l [m] in embodiment. 実施形態における、ルックアップテーブルに格納する処理の例を示す図である。It is a figure which shows the example of the process stored in the lookup table in embodiment. 実施形態における、適応量子化処理の例を示すフローチャートである。It is a flowchart which shows the example of the adaptive quantization process in embodiment. 実施形態における、要素インデックスと有意要素インデックスとの対応関係を格納した参照テーブルを生成する処理の例を示す図である。It is a figure which shows the example of the process which produces | generates the reference table which stored the correspondence of an element index and a significant element index in embodiment. 実施形態における、非有意要素の個数を格納した参照テーブルを生成する処理の例を示す図である。It is a figure which shows the example of the process which produces | generates the reference table which stored the number of insignificant elements in embodiment. 実施形態における、演算量低減型適応量子化処理の例を示すフローチャートである。It is a flowchart which shows the example of the calculation amount reduction type | mold adaptive quantization process in embodiment. 実施形態における、近似誤差参照テーブルを生成する処理(ステップS205)の例を示すフローチャートである。It is a flowchart which shows the example of the process (step S205) which produces | generates an approximation error reference table in embodiment. 実施形態における、ステップS104−2及びステップS204−2での上界用の参照テーブルを生成する処理の例を示すフローチャートである。It is a flowchart which shows the example of the process which produces | generates the upper reference table in step S104-2 and step S204-2 in embodiment. 実施形態における、ステップS104−2及びステップS204−2での下界用の参照テーブルを生成する処理の例を示すフローチャートである。It is a flowchart which shows the example of the process which produces | generates the reference table for lower bounds by step S104-2 and step S204-2 in embodiment. 実施形態における、ステップS401での参照テーブルを生成する処理の例を示すフローチャートである。It is a flowchart which shows the example of the process which produces | generates the reference table in step S401 in embodiment. 実施形態における、ステップS501での参照テーブルを生成する処理の例を示すフローチャートである。It is a flowchart which shows the example of the process which produces | generates the reference table in step S501 in embodiment. 実施形態における、量子化装置の構成の第1例を示す図である。It is a figure which shows the 1st example of a structure of the quantization apparatus in embodiment. 実施形態における、量子化装置の構成の第2例を示す図である。It is a figure which shows the 2nd example of a structure of the quantization apparatus in embodiment. 実施形態における、適応量子化処理の基本処理の例を示す図である。It is a figure which shows the example of the basic process of an adaptive quantization process in embodiment. 実施形態における、適応量子化処理の演算量低減処理の例を示す図である。It is a figure which shows the example of the calculation amount reduction process of an adaptive quantization process in embodiment. 実施形態における、近似誤差参照テーブルを生成する処理の例を示す図である。It is a figure which shows the example of the process which produces | generates an approximate error reference table in embodiment. 従来の高ビット深度信号の第1の符号化方法を示す図である。It is a figure which shows the 1st encoding method of the conventional high bit depth signal. 従来の高ビット深度信号の第2の符号化方法を示す図である。It is a figure which shows the 2nd encoding method of the conventional high bit depth signal.

本発明の実施形態について、図面を参照して詳細に説明する。
以下、図又は式において変数等の上に付された記号(^:ハット、〜:チルダ)は、変数の前に記載する。例えば、「^」が上に付されたcは、「^c」と表記する。以下、図又は式において変数又は記号の下付きの記号等と上付きの記号等とでは、下付きの記号等を先に記載する。例えば、下付き「1」と上付き「*」とが付された変数Δは、「Δ 」と表記する。例えば、下付き「i=0」と上付き「m」とが付された記号Σは、「Σi=0 」と表記する。
Embodiments of the present invention will be described in detail with reference to the drawings.
In the following, symbols (^: hat, ~: tilde) attached to variables etc. in the figure or formula are described before the variables. For example, “c” with “^” on top is expressed as “^ c”. Hereinafter, the subscript symbols and the like are described first in the subscript symbols and the superscript symbols and the like of the variables or symbols in the drawings or formulas. For example, a variable Δ with a subscript “1” and a superscript “*” is expressed as “Δ 1 * ”. For example, a symbol Σ with a subscript “i = 0” and a superscript “m” is expressed as “Σ i = 0 m ”.

以下、Kは、入力信号のレベル数(以下、「入力レベル数」という。)を示す。M(M<K)は、量子化された入力信号に基づく出力信号のレベル数(以下、「量子化レベル数」という。)を示す。画素値kのヒストグラム(頻度)をh[k](k=0,…,K−1)と表記する。   Hereinafter, K represents the number of levels of the input signal (hereinafter referred to as “number of input levels”). M (M <K) indicates the number of levels of the output signal based on the quantized input signal (hereinafter referred to as “quantization level number”). A histogram (frequency) of the pixel value k is expressed as h [k] (k = 0,..., K−1).

[量子化器の設計]
画像信号(輝度信号)が8ビットである場合、画素値kの取り得る範囲は、0から「入力レベル数−1」までの整数、すなわち、0から255の値となる。入力レベル数Kの画像信号を量子化レベル数の画像信号に量子化する場合を考える。求めるべきパラメータは、式(1)を満たすM個のパラメータである。
[Quantizer design]
When the image signal (luminance signal) is 8 bits, the possible range of the pixel value k is an integer from 0 to “number of input levels−1”, that is, a value from 0 to 255. Consider a case in which an image signal having an input level number K is quantized into an image signal having a quantization level number. The parameters to be obtained are M parameters that satisfy Expression (1).

Figure 2017123614
Figure 2017123614

ここで、Lは、ヒストグラムにおける第m区間の上端であり、式(2)によって表される。 Here, L m is the upper end of the m-th section in the histogram, and is represented by Expression (2).

Figure 2017123614
Figure 2017123614

ここで、Δは、ヒストグラムの第m区間の区間幅を表す。また、量子化後の各階調が、少なくとも1個以上、量子化前の階調を含む必要があることから、L(0≦m≦M−2)は、m≦L≦K−(M−m)の範囲に制限される。LM−1はLM−1=K−1に固定されているので、Lについては、m=M−1を省略し、m≦M−2を考えれば良い。 Here, the delta m, represents the section width of the m section of the histogram. Further, since each gradation after quantization needs to include at least one gradation before quantization, L m (0 ≦ m ≦ M−2) is m ≦ L m ≦ K− ( M-m). Since L M-1 is fixed to L M-1 = K-1, for L m , m = M-1 may be omitted and m ≦ M-2 may be considered.

e(L−(Δ−1),L)は次式で求まる値であり、ヒストグラムの区間[L−(Δ−1),L]を代表値c(L−(Δ−1),L)で近似した場合の近似誤差である。 e (L m − (Δ m −1), L m ) is a value obtained by the following equation, and the histogram section [L m − (Δ m −1), L m ] is represented by a representative value c (L m − ( It is an approximation error when approximating with Δ m −1), L m ).

Figure 2017123614
Figure 2017123614

さらに、^c(L−(Δ−1),L)は、式(4)で求まる実数値c(L−(Δ−1),L)を四捨五入して整数化した値である。 Further, ^ c (L m − (Δ m −1), L m ) is an integer obtained by rounding off the real value c (L m − (Δ m −1), L m ) obtained by the equation (4). Value.

Figure 2017123614
Figure 2017123614

c(L−(Δ−1),L)は、ヒストグラムの区間[L−(Δ−1),L]における重心位置を表す。以下、ヒストグラムの区間[L−(Δ−1),L]を第m量子化クラスと呼ぶ。M個のパラメータ(Δ,…,Δ)の取り得る組み合わせは、Mとともに指数関数的に増加するため、この中から最適な組み合わせ(Δ,…,Δm)を総当りで探索するのは、計算量的に困難である。 c (L m − (Δ m −1), L m ) represents the position of the center of gravity in the section [L m − (Δ m −1), L m ] of the histogram. Hereinafter, the histogram interval [L m − (Δ m −1), L m ] is referred to as the m-th quantization class. Since possible combinations of M parameters (Δ 1 ,..., Δ m ) increase exponentially with M, an optimal combination (Δ 1 ,..., Δm) is searched from the round robin. Is computationally difficult.

そこで、第m量子化クラスの量子化誤差e(L−(Δ−1),L)が同クラスの上端Lと同クラスの区間幅Δmに依存することに着目し、以下のように最適解を算出する。さらに、その際、ヒストグラムの非有意要素に基づく演算量削減を行う。 Therefore, focusing on the fact that the quantization error e (L m − (Δ m −1), L m ) of the m-th quantization class depends on the upper end L m of the same class and the section width Δm of the same class, The optimal solution is calculated as follows. Further, at that time, the calculation amount is reduced based on the non-significant elements of the histogram.

[基本解法]
まず、ヒストグラムの区間[0,L]をm+1分割した際の近似誤差和Σi=0 e(L−(Δ−1),L)の最小値をS(L)として定義する。つまり、最適なΔ,…,Δを用いた場合のΣi=0 e(L−(Δ−1),L)に対する最小値である。ここで、e(L−(Δ−1),L)が第m量子化クラスの上端Lmと同クラスの区間幅Δに依存することに着目すると、S(L)はSm−1(L−Δ)を用いて、式(5)のように表わされる。
[Basic solution]
First, the histogram of the interval [0, L m] an approximation error sum during the m + 1 divided Σ i = 0 m e (L i - (Δ i -1), L i) the minimum value of S m (L m) Define as In other words, the optimal Δ m, ..., Σ i = 0 m e in the case of using the Δ 0 (L i - (Δ i -1), L i) is a minimum for. Here, focusing on the fact that e (L m − (Δ m −1), L m ) depends on the upper end Lm of the m-th quantization class and the section width Δ m of the same class, S m (L m ) is Using S m−1 (L m −Δ m ), it is expressed as in equation (5).

Figure 2017123614
Figure 2017123614

なお、m=1,…,M−1である。また、L=m,…,K−(M−m)である。
Δの範囲は、次のようになる。Lm−1=L−Δであることから、L−Δの範囲は、m−1≦L−Δ≦K−(M−m+1)となる。このため、Δの範囲は、与えられたLを用いて式(6)のように表わされる。
Note that m = 1,..., M-1. Further, L m = m,..., K− (M−m).
Range of delta m is as follows. Because it is L m-1 = L m -Δ m, the range of L m - [delta m is, m-1 ≦ L m -Δ m ≦ K- (M-m + 1) become. Therefore, the range of delta m is expressed by the equation (6) using the given L m.

Figure 2017123614
Figure 2017123614

さらに、Δ≧1であることを考慮すると、式(7)を得る。 Further, considering that Δ m ≧ 1, Equation (7) is obtained.

Figure 2017123614
Figure 2017123614

ここで、算出したS(L)を格納しておき、Sm+1(Lm+1)の計算で用いるものとする。さらに、式(5)の右辺を最小化するΔの値をΔ (Lm)として、各Lm(=m,…,K−M+m)に対して^Lm−1[L]=L−Δ (Lm)を格納する。式(1)の最小化問題は、式(8)のように表される。 Here, the calculated S m (L m ) is stored and used in the calculation of S m + 1 (L m + 1 ). Further, as an expression of the value of delta m that minimizes the right-hand side of (5) Δ m (Lm) , each Lm (= m, ..., K -M + m) with respect to ^ L m-1 [L m ] = L Store m −Δ m (Lm) . The minimization problem of Expression (1) is expressed as Expression (8).

Figure 2017123614
Figure 2017123614

式(8)を最小化するΔM−1をΔM−1 と表記する。ΔM−1 は、式(9)によって表される。 Δ M−1 that minimizes the expression (8) is expressed as Δ M−1 * . Δ M-1 * is expressed by the equation (9).

Figure 2017123614
Figure 2017123614

ΔM−1 を用いて、第M−2クラスの上端の最適値はLM−2=LM−1−ΔM−1 =K−1−ΔM−1 と求まる。第M−3クラスの上端の最適値は、LM−2に対する最適解として、^LM−3[LM−2]として格納されているので、該当する値を参照し、LM−3=^LM−3[LM−2]とする。この結果、第M−2クラスの区間幅は、ΔM−2 =LM−2 −LM−3 と求まる。以下、同様の参照処理をLM−4 =^LM−4[LM−3 ],…,L =^L[L ]として繰り返し、得られた各クラスの上端値を用いて、ΔM−3 =LM−3 −LM−4 ,…,Δ =L −L−1 として求める。なお、L−1 =−1である。 Using Δ M-1 * , the optimum value of the upper end of the M-2 class is obtained as L M−2 = L M−1 −ΔM −1 * = K−1−ΔM −1 * . Optimal value of the upper end of the M-3 class, L as the optimal solution for M-2, ^ L since M-3 is stored as [L M-2], with reference to the appropriate value, L M-3 = ^ L M-3 [L M-2 ]. As a result, the section width of the M-2 class is obtained as ΔM -2 * = LM -2 * -LM -3 * . Hereinafter, the same reference process is repeated as L M−4 * = ^ L M−4 [L M−3 * ],..., L 0 * = ^ L 0 [L 1 * ], and the upper end of each class obtained using the values, Δ M-3 * = L M-3 * -L M-4 *, ..., Δ 0 * = L 0 * calculated as -L -1 *. Note that L −1 * = − 1.

[ヒストグラムの非有意要素に基づく演算量削減]
ヒストグラムの非有意要素(頻度値が零値となる要素)に着目し、演算量を削減する方法を導入する。以下、ヒストグラムh[k](k=0,…,K−1)について、要素を指定するインデックスkを「要素インデックス」という。以下、ヒストグラムh[k]について、有意要素(〜K個)を指定するインデックス〜k(〜k=0,…,〜K−1)を「有意要素インデックス」という。
[Computation amount reduction based on non-significant elements of histogram]
Focusing on non-significant elements (elements whose frequency value is zero) in the histogram, a method for reducing the amount of calculation is introduced. Hereinafter, for the histogram h [k] (k = 0,..., K−1), the index k for designating the element is referred to as “element index”. Hereinafter, with respect to the histogram h [k], an index ˜k (˜k = 0,..., ˜K−1) that designates significant elements (˜K) is referred to as a “significant element index”.

画素値L+1における頻度値h[L+1]が零値である場合、即ち、h[L+1]=0の場合、ヒストグラムの区間[L−(Δ−1),L+1]に対する近似誤差は、ヒストグラムの区間[L−(Δ−1),L]に対する近似誤差と等しい。h[L+1]=0であることから、量子化の対象となる区間にh[L+1]を加えたとしても、量子化による近似には影響を与えないためである。従って、h[L+1]=0の場合、式(5)に基づくS(L+1)の算出は省略することが可能となる。 When the frequency value h [L m +1] at the pixel value L m +1 is zero, that is, when h [L m +1] = 0, the histogram interval [L m − (Δ m −1), L m The approximation error for +1] is equal to the approximation error for the histogram interval [L m − (Δ m −1), L m ]. Since h [L m +1] = 0, even if h [L m +1] is added to the section to be quantized, the approximation by quantization is not affected. Therefore, when h [L m +1] = 0, the calculation of S (L m +1) based on Expression (5) can be omitted.

ヒストグラムの非有意要素に着目した適応処理の準備として、以下の参照テーブルを用意する。Z[k](k=0,…,K−1)は、ヒストグラムの区間[0,k]に含まれる非有意要素の個数を格納する。F[〜K]は、第〜K番目の有意要素(非有意要素ではなく有意要素)に対応する要素インデックスを格納する。一方、F−1[k]は、第k番目の要素に対応する有意要素インデックスを格納する。なお、第k要素が非有意要素の場合、F−1[K]には“don’t care”を表す値を代入する。 The following reference tables are prepared as preparations for adaptive processing focusing on non-significant elements of the histogram. Z [k] (k = 0,..., K−1) stores the number of insignificant elements included in the histogram interval [0, k]. F [˜K] stores element indexes corresponding to the first to Kth significant elements (significant elements, not insignificant elements). On the other hand, F −1 [k] stores a significant element index corresponding to the kth element. When the k-th element is an insignificant element, a value representing “don't care” is substituted for F −1 [K].

Ψ[m](m=0,…,M−1)は第mビンの上端となりうる有意要素インデックスの最大値を格納する。Ψ[m](m=0,…,M−1)は第mビンの上端となりうる有意要素インデックスの最小値を格納する。ここで、Ψ[m],Ψ[m](m=0,…,M−1)は各々、次のように設定される。以下は参照テーブルZ[]を用いた場合のΨ[m],Ψ[m](m=0,…,M−1)の計算方法である。 Ψ u [m] (m = 0,..., M−1) stores the maximum value of the significant element index that can be the upper end of the m-th bin. Ψ l [m] (m = 0,..., M−1) stores the minimum value of the significant element index that can be the upper end of the m-th bin. Here, Ψ u [m], Ψ l [m] (m = 0,..., M−1) are set as follows. The following is a calculation method of Ψ u [m], Ψ l [m] (m = 0,..., M−1) when the reference table Z [] is used.

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

以下は参照テーブルF−1[]を用いた場合のΨ[m],Ψ[m](m=0,…,M−1)の計算方法である。 The following is a calculation method of Ψ u [m], Ψ l [m] (m = 0,..., M−1) when the reference table F −1 [] is used.

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

ここで、〜K−1は有意要素インデックスの最大値を表している。K−1−Z[K−1]は〜K−1と表される。ψ[m−M+K]は、ヒストグラムの区間[m,m−M+K]における有意要素の要素インデックスの最大値であり、ψ[m]は、ヒストグラムの区間[m,m−M+K]における有意要素の要素インデックスの最小値である。つまり、ψ[m−M+K]は、第mビンの上端として取りうる有意要素の中で、選択可能範囲の上限に最も近い有意要素であり、ψ[m]は、第mビンの上端として取りうる有意要素の中で、選択可能範囲の下限に最も近い有意要素である。 Here, ~ K-1 represents the maximum value of the significant element index. K-1-Z [K-1] is represented as ~ K-1. ψ u [m−M + K] is the maximum value of the element index of the significant element in the histogram interval [m, m−M + K], and ψ l [m] is significant in the histogram interval [m, m−M + K]. The minimum element index of the element. That is, ψ u [m−M + K] is a significant element closest to the upper limit of the selectable range among significant elements that can be taken as the upper end of the m-th bin, and ψ l [m] is the upper end of the m-th bin. Is the closest significant element to the lower limit of the selectable range.

図1は、参照テーブルρ[m]を生成する処理の例を示す図である。図2は、参照テーブルρ[m]を生成する処理の例を示す図である。式(10)から式(13)までは、一定の条件を満たす場合、ψ[m−M+K]およびψ[m]の指す有意要素が最適解の候補とはなりえず、最適解の探索候補から除外可能であることを示している。その条件とは、ψ[m−M+K]の場合は、ρ[m]で定まるインデックス値m−M+K−ρ[m]が、ψ[m−M+K]が表す要素インデックスよりも小さな値をとることであり、ψ[m]の場合は、ρ[m]で定まるインデックス値m+ρ[m]が、ψ[m]が表す要素インデックスよりも大きな値をとることである。ここで、ρ[m]は、ヒストグラムの区間[m−M+K,K−1]における非有意要素のみからなる部分区間の区間幅の最大値を表し、ρ[m]はヒストグラムの区間[0,m]における非有意要素のみからなる部分区間の区間幅の最大値を表す。つまり、ρ[m]およびρ[m]は、指定された各区間内における非有意要素の連続数の最大値を表している。各々、図1及び図2に示すように定まる。 FIG. 1 is a diagram illustrating an example of processing for generating the reference table ρ u [m]. FIG. 2 is a diagram illustrating an example of processing for generating the reference table ρ l [m]. From Expression (10) to Expression (13), when certain conditions are satisfied, the significant elements indicated by ψ u [m−M + K] and ψ l [m] cannot be candidates for the optimum solution. This indicates that it can be excluded from search candidates. Small and the condition, in the case of ψ u [m-M + K ], ρ u index value determined by [m] m-M + K -ρ u [m] is, than the element index represented by ψ u [m-M + K ] it is to take a value, in the case of ψ l [m], ρ l index value determined by [m] m + ρ l [ m] is, is to take a larger value than the element index represented by ψ l [m] . Here, ρ u [m] represents the maximum value of the section width of the partial section consisting only of insignificant elements in the histogram section [m−M + K, K−1], and ρ l [m] represents the histogram section [ 0, m] represents the maximum value of the section width of the partial section consisting only of insignificant elements. That is, ρ u [m] and ρ l [m] represent the maximum number of consecutive non-significant elements in each designated section. Each is determined as shown in FIG. 1 and FIG.

[最適解の求解]
非有意要素に対する不要な演算を省略し、演算量を低減するために、有意要素インデックスを用いた最適解の求解アルゴリズムを以下に示す。
[Find optimal solution]
In order to omit unnecessary operations on insignificant elements and reduce the amount of calculation, an algorithm for finding an optimal solution using a significant element index is shown below.

〜L番目の有意要素を上端とするヒストグラムの区間[0,F[〜L]]をm+1分割した場合を考える。同区間の分割により得られる部分区間[F[〜L−(〜Δ−1)],F[〜L]](ここで、i=0,…,m)を第iビンとする。第iビンに対して、重心で近似した場合の量子化誤差e(F[〜L−(〜Δ−1)],F[〜L])を算出する。ここで、〜Lは第iビンの上端にあたる有意要素インデックスであり、〜Δは第iビン内の有意要素数である。さらに、量子化誤差和Σi=0 e[〜L−(〜Δ−1),〜L]の最小値を格納する参照テーブルを〜S[〜L]として定義する。つまり、最適な〜Δ,…,〜Δを用いた場合のσi=0 e[〜L−(〜Δ−1),〜L]に対する最小値である。なお、〜S[〜L]はS[F[〜L]]と等しい。 Consider a case where the histogram section [0, F [˜L m ]] with the m- th significant element at the upper end is divided into m + 1. The partial section [F [˜L i − (˜Δ i −1)], F [˜L i ]] (where i = 0,..., M) obtained by dividing the same section is the i-th bin. . Against the i-th bin, the quantization error e in the case of approximate center of gravity (F [~L i - (~Δ i -1)], F [~L i]) is calculated. Here, ~ L i is a significant element index corresponding to the upper end of the i-th bin, and ~ Δ i is the number of significant elements in the i-th bin. Furthermore, the quantization error sum Σ i = 0 m e - define [~L i (~Δ i -1) , ~L i] a reference table for storing the minimum value as ~S m [~L m]. In other words, the optimal ~Δ m, ..., σ i = 0 m e in the case of using the ~Δ 0 [~L i - (~Δ i -1), ~L i] is a minimum for. Incidentally, ~S m [~L m] is equal to S m [F [~L m] ].

ここで、〜e(〜L−(〜Δ−1),〜L)が第m量子化クラスの上端の有意要素インデックス〜Lと同クラスの区間幅内の有意要素数〜Δに依存することに着目すると、〜S(〜L)は〜S−1(〜L−〜Δ)を用いて、式(14)のように表される。 Here, ~e (~L m - (~Δ m -1), ~L m) number significant elements in the section width of the significant element index ~L m the same class of the upper end of the first m quantized class ~Deruta focusing be dependent on m, ~S m (~L m) by using the ~S m -1 (~L m -~Δ m ), is expressed by the equation (14).

Figure 2017123614
Figure 2017123614

なお、m=0,…,M−1である。また、〜L=Ψ[m],…,Ψ[m]である。〜Δの範囲は、次のようになる。〜Lm−1=〜L−〜Δであることから、〜L−〜Δの範囲は、Ψ[m−1]≦〜L−〜Δ≦Ψ[m−1]となる。このため、〜Δの範囲は、与えられた〜Lを用いて式(15)のよう表される。 Note that m = 0,..., M-1. Further, ~L m = Ψ l [m ], ..., a Ψ u [m]. Range ~Deruta m is as follows. Since it is ~L m-1 = ~L m -~Δ m, the range of ~L m -~Δ m is, Ψ l [m-1] ≦ ~L m -~Δ m ≦ Ψ u [m- 1]. Therefore, the scope of ~Deruta m can be expressed as in equation (15) using a given ~L m.

Figure 2017123614
Figure 2017123614

さらに、〜Δ≧1であることを考慮すると、式(16)を得る。 Furthermore, considering that ~ Δ m ≧ 1, Expression (16) is obtained.

Figure 2017123614
Figure 2017123614

ここで、算出した〜S(〜L)を格納しておき、〜Sm+1(〜Lm+1)の計算で用いるものとする。さらに、式(14)の右辺を最小値化する〜Δを〜Δ (〜Lm)とし、第mビンの上端を〜Lとした場合の最適な第m−1ビンの上端として、^Lm−1[〜L]=〜L−〜Δ (〜Lm)を各〜L(=Ψ[m],…,Ψ[m])に対して格納しておくものとする。式(1)の最小化問題は、式(17)のように表される。 Here, the calculated to S m may be stored a (~L m), it shall be used in the calculation of ~S m + 1 (~L m + 1). Furthermore, the ~Deruta m to the minimum value of the right side of the equation (14) and ~Deruta m (to L m), as the upper end of optimal first m-1 bottle when the upper end of the m bins and ~L m, ^ L m−1 [˜L m ] = ˜L m −˜Δ m (˜Lm) is stored for each of −L m (= Ψ l [m],..., Ψ u [m]). Shall. The minimization problem of Equation (1) is expressed as Equation (17).

Figure 2017123614
Figure 2017123614

ここで、〜K=K−Z[K−1]である。式(17)を最小化する〜ΔM−1を〜ΔM−1 とおく。ΔM−1 は、式(18)によって表される。 Here, ~ K = KZ [K-1]. ˜ΔM −1 that minimizes the expression (17) is set to ˜ΔM −1 * . Δ M-1 * is expressed by Equation (18).

Figure 2017123614
Figure 2017123614

〜LM−1の取り得る値はK−Z[K−1]−1のみであることから、〜LM−1=K−Z[K−1]−1となる。〜LM−1及び〜ΔM−1 を用いて、第M−2クラスの上端の有意要素インデックスの最適値は〜LM−2 =〜LM−1−〜ΔM−1 =K−Z[K−1]−1−〜ΔM−1 と求まる。第M−3クラスの上端の有意要素インデックスの最適値は、〜LM−2 に対する最適解として、^LM−3[〜LM−2 ]として格納されているので、該当する値を参照し、〜LM−3 =^LM−3[〜LM−2 ]とする。この結果、第M−2クラスの区間幅内の有意要素数は、〜ΔM−2 =〜LM−2−〜LM−3と求まる。以下、同様の参照処理を〜LM−4 =^LM−4[〜LM−3 ],…,〜L =^L[〜L ]として繰り返し、得られた各クラスの上端の有意要素インデックスを用いて、〜ΔM−3 =〜LM−3 −〜LM−4 ,…,〜Δ =〜L −〜L−1 として求める。なお、〜L−1 =−1である。 Since ~ L M-1 can only have a value KZ [K-1] -1, ~ L M-1 = KZ [K-1] -1. Using ~ LM -1 and ~ ΔM -1 * , the optimal value of the significant element index at the upper end of class M-2 is ~ LM -2 * = ~ LM -1- ~ ΔM -1 *. = KZ [K-1] -1--ΔM -1 * . Optimal value of the significant element index of the upper end of the M-3 class, the optimal solution to ~L M-2 *, ^ L M-3 because it is stored as [~L M-2 *], the appropriate values ˜L M−3 * = ^ L M−3 [˜L M−2 * ]. As a result, the number of significant elements within the section width of the M-2 class is obtained as ~ ΔM -2 * = ˜LM -2− ˜LM -3 . Hereinafter, ~L similar reference process M-4 * = ^ L M -4 [~L M-3 *], ..., ~L 0 * = ^ L 0 repeatedly as [~L 1 *], resulting using significant element index of the upper end of each class, ~Δ M-3 * = ~L M-3 * -~L M-4 *, ..., ~Δ 0 * = ~L 0 * -~L -1 * Asking. In addition, it is -L < -1 > * =-1.

各クラスの上端の有意要素インデックス〜LM−1,〜LM−2 ,…,〜L から、F[〜LM−1],F[〜LM−2 ],…,F[〜L ]により、各クラスの上端が求まる。 Significant element index ~L M-1 at the upper end of each class, ~L M-2 *, ... , from ~L 0 *, F [~L M -1], F [~L M-2 *], ..., The upper end of each class is obtained by F [˜L 0 * ].

[量子化誤差のルックアップテーブルへの格納]
とΔの組み合わせによっては、異なる量子化クラス(mの値が異なるという意味)において、量子化誤差e(L−(Δ−1),L)が必要となる。その度に、量子化誤差e(L−(Δ−1),L)を算出するのは、計算コストの観点から得策ではない。計算結果を格納し、必要に応じて格納結果を呼び出すことで、演算量を低減できる。そこで、e(L−(Δ−1),L)として取りうる値をルックアップテーブル(M×K要素)に格納する。
[Storing quantization error in lookup table]
Depending on the combination of L m and Δ m , a quantization error e (L m − (Δ m −1), L m ) is required in different quantization classes (meaning that the value of m is different). It is not a good idea from the viewpoint of calculation cost to calculate the quantization error e (L m − (Δ m −1), L m ) each time. The calculation amount can be reduced by storing the calculation result and calling the storage result as necessary. Therefore, a value that can be taken as e (L m − (Δ m −1), L m ) is stored in a lookup table (M × K element).

図3は、ルックアップテーブルに格納する処理(格納処理)の例を示す図である。上述のルックアップテーブル((K−Z[K−1]−1)×(K−Z[K−1])要素)E[〜i,〜i]へ格納する量子化誤差e(F[〜i],F[〜i])の計算過程にも重複した計算が存在するため、そうした重複部分を省略することで、演算量の低減を図る。まず、以下の値を定義する。 FIG. 3 is a diagram illustrating an example of processing (storage processing) stored in the lookup table. Quantization error e (F stored in the lookup table ((K−Z [K−1] −1) × (K−Z [K−1]) element) E [˜i s , ˜i e ]. Since there are overlapping calculations in the calculation process of [˜i s ], F [˜i e ]), the amount of calculation is reduced by omitting such overlapping parts. First, the following values are defined.

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

これより、c(〜i,〜i)およびe(〜i,〜i)が以下の漸化関係を持つことが分かる。 From this, it can be seen that c (~ i s , ~ i e ) and e (~ i s , ~ i e ) have the following recurrence relationship.

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

漸化関係に基づきe(〜i,〜i)を算出し、算出結果をルックアップテーブル((K−Z[K−1]−1)×(K−Z[K−1])要素)に格納する。 E (~ i s , ~ i e ) is calculated based on the recurrence relation, and the calculation result is represented as a lookup table ((K−Z [K−1] −1) × (K−Z [K−1]) element. ).

[フローチャート:適応量子化処理]
適応量子化処理の実施形態について図面を参照して説明する。
図4は、適応量子化処理の例を示すフローチャートである。入力信号を読み込み、入力信号値のヒストグラムを生成する(ステップS101)。ヒストグラムの要素インデックスをk、ヒストグラムの有意要素インデックスを〜kとし、このkと〜kの対応関係を格納した参照テーブルとして、F[〜k]を生成する(ステップS102)。
[Flowchart: Adaptive quantization processing]
An embodiment of adaptive quantization processing will be described with reference to the drawings.
FIG. 4 is a flowchart illustrating an example of adaptive quantization processing. The input signal is read and a histogram of input signal values is generated (step S101). Assuming that the element index of the histogram is k and the significant element index of the histogram is ~ k, F [~ k] is generated as a reference table storing the correspondence between k and ~ k (step S102).

図5は、要素インデックスと有意要素インデックスとの対応関係を格納した参照テーブルを生成する処理の例を示す図である。F[〜k]の具体的な生成方法は、図5に示す通りである。ヒストグラムの区間[0,k]に含まれる非有意要素の個数を格納した参照テーブルとして、Z[k]を生成する(ステップS103)。   FIG. 5 is a diagram illustrating an example of processing for generating a reference table that stores the correspondence between element indexes and significant element indexes. A specific method for generating F [˜k] is as shown in FIG. Z [k] is generated as a reference table storing the number of insignificant elements included in the histogram section [0, k] (step S103).

図6は、非有意要素の個数を格納した参照テーブルを生成する処理の例を示す図である。Z[k]の具体的な生成方法は、図6に示す通りである。   FIG. 6 is a diagram illustrating an example of processing for generating a reference table storing the number of insignificant elements. A specific method for generating Z [k] is as shown in FIG.

図4に示すように、ヒストグラムを入力として読み込み、m=0,…,M−1に対して、ヒストグラムの区間[m,m−M+K]における有意要素の要素インデックスの最大値および最小値を各々、参照テーブルΨ[m−M+K]および参照テーブルΨ[m]に格納する(ステップS104−1)。非有意係数をスキップすることに伴うLmの最大値を格納した参照テーブルとして、Ψ[m](m=0,…,M−1)を生成する。具体的には、式(26)及び式(27)により設定する(ステップS104−2)。 As shown in FIG. 4, the histogram is read as an input, and for m = 0,..., M−1, the maximum value and the minimum value of the element index of the significant element in the histogram section [m, m−M + K] are respectively obtained. And stored in the reference table Ψ u [m−M + K] and the reference table Ψ l [m] (step S104-1). Ψ u [m] (m = 0,..., M−1) is generated as a reference table storing the maximum value of Lm that accompanies skipping insignificant coefficients. Specifically, it sets with Formula (26) and Formula (27) (step S104-2).

Figure 2017123614
Figure 2017123614

Figure 2017123614
Figure 2017123614

ステップS107までの処理をj=1,…,K−M−1−Z[K−M−1]として繰り返す(ステップS105)。
ヒストグラムの区間[0,F[j]]を代表値(式(4)により求まる重心)で近似した場合の近似誤差〜e[0,j]を求め、同近似誤差をS(j)に格納する(ステップS106)。
ステップS118までの処理をm=1,…,M−1として繰り返す(ステップS108)。
The processing up to step S107 is repeated as j = 1,..., KM-1-Z [KM-1] (step S105).
Approximation error to e [0, j] when the histogram section [0, F [j]] is approximated by the representative value (centroid obtained from the equation (4)) is obtained, and the approximation error is set to S 0 (j). Store (step S106).
The processing up to step S118 is repeated as m = 1,..., M−1 (step S108).

ステップS117までの処理を〜L=Ψ[m],…,Ψ[m]として繰り返す(ステップS109)。
ステップS114までの以下の処理を〜Δ=1,…,〜L−Ψ(m−1)として繰り返す(ステップS110)。
ヒトグラムの区間[F[〜L−(〜Δ−1)],F[〜L]]の代表値を式(4)により求める(ステップS111)。
The process up to step S117 is repeated as .about.L m = Ψ l [m],..., Ψ u [m] (step S109).
~Δ the following processing in steps S114 m = 1, ..., repeated as ~L m -Ψ l (m-1 ) ( step S110).
Hitoguramu interval [F [~L m - (~Δ m -1)], F [~L m]] is obtained by equation a representative value of (4) (step S111).

ヒストグラムの区間[F[〜L−(〜Δ−1)],F[〜L]]を代表値(ステップS111で求めた値)で近似した場合の近似誤差を式(3)より求める。同近似誤差を〜e(〜L−(〜Δ−1),〜L)とする(ステップS112)。
〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)の値を計算する(ステップS113)。
Histogram interval [F [~L m - (~Δ m -1)], F [~L m]] from the representative value formula (3) approximation error when approximated by (the value determined in step S111) Ask. The same approximation error ~e (~L m - (~Δ m -1), ~L m) to (step S112).
~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) to calculate the value of (step S113).

〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))の中での最小値を〜S(〜L)に格納する(ステップS115)。
〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))を最小化する〜Δmを用いて、〜L−〜Δを^Lm−1(〜L)に格納する。以下、^Lm−1(〜L)を「最適パス追跡用参照テーブル」という(ステップS116)。
~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) (~Δ m = 1, ..., ~L m - (m- storing the minimum value among the 1)) to ~S m (~L m) (step S115).
~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) (~Δ m = 1, ..., ~L m - (m- 1)) is minimized using ~ Δm, and ~ L m- ~ Δ m is stored in ^ L m-1 (~ L m ). Hereinafter, ^ L m−1 (˜L m ) is referred to as “optimum path tracking reference table” (step S116).

M−1 にK−1を代入する。〜LM−1 にK−Z[k−1]−1を代入する(ステップS119)。
ステップS122までの処理をm=M−1,…,1として繰り返す(ステップS120)。
^Lm−1(〜L )を読み込み、〜Lm−1 に代入する。F[〜Lm−1 ]を読み込み、Lm−1 に代入する(ステップS121)。
Substitute K-1 for L M-1 * . ZZ [k-1] -1 is substituted for ~ LM -1 * (step S119).
The process up to step S122 is repeated as m = M−1,..., 1 (step S120).
^ L m-1 reads the (~L m *), it is assigned to ~L m-1 *. F [˜L m−1 * ] is read and assigned to L m−1 * (step S121).

[フローチャート:演算量低減型適応量子化処理]
近似誤差を参照テーブルに格納し、適宜、同参照テーブルから近似誤差を読み込む形に拡張した適応量子化処理の実施形態について図面を参照して説明する。
[Flow chart: Adaptive quantization processing with reduced amount of computation]
An embodiment of adaptive quantization processing in which an approximation error is stored in a reference table and the approximation error is appropriately read from the reference table will be described with reference to the drawings.

図7は、演算量低減型適応量子化処理の例を示すフローチャートである。
ステップS201〜ステップS204−2は、ステップS101〜ステップS104と同じである。
ヒストグラムの各区間を代表値で近似した際の近似誤差を格納した参照テーブルを生成する(ステップS205)。
ステップS206〜ステップS212は、ステップS105〜ステップS111と同じである。
FIG. 7 is a flowchart illustrating an example of a calculation amount reduction type adaptive quantization process.
Step S201 to step S204-2 are the same as step S101 to step S104.
A reference table storing an approximation error when approximating each section of the histogram with a representative value is generated (step S205).
Steps S206 to S212 are the same as steps S105 to S111.

ヒストグラムの区間[F[〜L−(〜Δ−1)],F[〜L]]を代表値で近似した場合の近似誤差を参照テーブルE(〜L−(〜Δ−1),〜L)から読み込む(ステップS213)。
〜Sm−1(〜L−〜Δ)+E(〜L−(〜Δm−1),〜L)の値を計算する(ステップS214)。
Interval [F [~L m - (~Δ m -1)], F [~L m]] of the histogram reference table E the approximation error in the case of approximating the representative value (~L m - (~Δ m - 1) to L m ) (Step S213).
~S m-1 (~L m -~Δ m) + E (~L m - (~Δ m- 1), ~L m) to calculate the value of (step S214).

〜Sm−1(〜L−〜Δ)+E(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))の中での最小値を〜Sm(〜Lm)に格納する(ステップS216)。
〜S−1(〜L−〜Δ)+E(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))を最小化する〜Δを用いて、〜L−〜Δを^L−1(〜L)に格納する(ステップS217)。
ステップS220〜ステップS223は、ステップS119〜ステップS122と同じである。
~ S m-1 (~ L m- ~ Δ m ) + E (~ L m- (~ Δ m -1), ~ L m ) (~ Δ m = 1, ..., ~ L m- (m-1) ) Is stored in ~ Sm (~ Lm) (step S216).
~S m -1 (~L m -~Δ m ) + E (~L m - (~Δ m -1), ~L m) (~Δ m = 1, ..., ~L m - (m-1) ) using ~Deruta m that minimizes the stores ~L m -~Δ m ^ L m -1 to (~L m) (step S217).
Steps S220 to S223 are the same as steps S119 to S122.

図8は、近似誤差参照テーブルを生成する処理(ステップS205)の例を示すフローチャートである。入力信号のヒストグラムを読み込む(ステップS301)。
参照テーブルZ[k](k=0,…,k−1),F[〜k](〜k=0,…,K−Z[K−1]−1)を読み込む(ステップS302)。
ステップS305までの処理を〜k=1,…,K−Z[K−1]−1として繰り返す(ステップS303)。
[0,〜k],q[0,〜k],q[0,〜k]に0を格納する(ステップS304)。
ステップS316までの処理を〜i=0,…,K−Z[K−1]−2として繰り返す(ステップS306)。
〜i+K−Z[K−1]−M−1とK−Z[K−1]−1を比較して、小さい方の値を変数Uに格納する(ステップS307)。
FIG. 8 is a flowchart illustrating an example of processing (step S205) for generating an approximate error reference table. A histogram of the input signal is read (step S301).
The reference table Z [k] (k = 0,..., K-1), F [.about.k] (.about.k = 0,..., KZ [K-1] -1) is read (step S302).
The process up to step S305 is repeated as .about.k = 1,..., KZ [K-1] -1 (step S303).
0 is stored in q 1 [0, ˜k], q 2 [0, ˜k], q 3 [0, ˜k] (step S304).
The processing up to step S316 is repeated as ~ i s = 0,..., KZ [K−1] −2 (step S306).
~i s + K-Z [K -1] by comparing -M-1 and K-Z [K-1] -1, stores the smaller value to the variable U (step S307).

ステップS315までの処理を〜i=〜i+1,…,Uとして繰り返す(ステップS308)。
参照テーブルF[〜i]を読み込み、iにF[〜i]を代入する。参照テーブルF[〜i]を読み込み、isにF[〜i]を代入する(ステップS309)。
[i,i−1]、h[i]を読み込み、q[i,i−1]+h[i]を算出し、算出結果をq[i,i]に格納する(ステップS310)。
Through i the processes in steps S315 e = ~i s + 1, ..., repeated as U (step S308).
I read reference table F [~i e], substituting F [~i e] to i e. The reference table F [˜i s ] is read, and F [˜i s ] is substituted for is (step S309).
q 1 [i s , i e −1] and h [i e ] are read, q 1 [i s , i e −1] + h [i e ] is calculated, and the calculated result is q 1 [i s , i e ] (step S310).

[i,i−1]、h[i]、iを読み込み、q[i,i−1]+ieh[ie]を算出し、算出結果をq[i,i]に格納する(ステップS311)。
[i,i−1]、h[i]、iを読み込み、q[i,i−1]+i h[i]を算出し、算出結果をq[i,i]に格納する(ステップS312)。
q 2 [i s, i e -1], h [i e], reads the i e, q 2 [i s , i e -1] + ieh calculates [ie], a calculation result q 2 [i s , I e ] (step S311).
q 3 [i s, i e -1], h [i e], reads the i e, q 3 [i s , i e -1] + i e to calculate the 2 h [i e], the calculation result q 3 [i s , i e ] is stored (step S312).

[i,i−1]、q[i,i−1]を読み込み、q[i,i]q[i,i]を算出し、算出結果をc[i,i]に格納する(ステップS313)。
[i,i−1]、q[i,i−1]、q[i,i−1]、c[i,i]を読み込み、q[i,i]−2c[i,i]q[i,i]+c[i,i[i,i]を算出し、算出結果をE[〜i,〜i]に格納する(ステップS314)。
q 2 [i s, i e -1], q 3 [i s, i e -1] reads, calculates q 2 [i s, i e ] q 1 [i s, i e] the result of the calculation Is stored in c [i s , i e ] (step S313).
q 1 [i s, i e -1], q 2 [i s, i e -1], q 3 [i s, i e -1], reads the c [i s, i e] , q 3 [ i s , i e ] −2c [i s , i e ] q 2 [i s , i e ] + c [i s , i e ] 2 q 1 [i s , i e ]] Store in [˜i s , ˜i e ] (step S314).

[参照テーブル生成処理の流れ]
図9は、ステップS104−2及びステップS204−2での上界用の参照テーブルを生成する処理の例を示すフローチャートである。
ヒストグラムを入力として読み込み、ヒストグラムの区間[m−M+K,K−1]における非有意要素のみからなる部分区間の区間幅の最大値を求め、参照テーブルρ[m]、ρ[m](m=0,…,M−1に格納する(ステップS401)。具体的な処理の流れは、図11に示される。
m=0,…,M−1に対して、ステップS403〜ステップS408の処理を繰り返す(ステップS402)。
ヒストグラムを入力として読み込み、ヒストグラムの区間[m,m−M+K]における有意要素の要素インデックスの最大値を参照テーブルΨ[m−M+K]から読み込む。同参照テーブルは、図2のステップS104−1及び図7のステップS204−1で出力されたものである(ステップS403)。
ヒストグラムの区間[m−M+K,K−1]における非有意要素のみからなる部分区間の区間幅の最大値として、ステップS401で出力した参照テーブルψ[m]の値を読み出す(ステップS404)。
選択可能範囲の上限にあたる要素インデックスm−M+Kから、ステップS404で読み込んだ区間幅ρ[m]を減算した値として、m−M+K−ρ[m]の値を求める(ステップS405)。
ステップS403及びステップS405で求めた値を入力として読み込み、小さい方の値をmin(ψ[m−M+K],m−M+K−ρ[m])として求め、この値を選択可能範囲の新たな上限にあたる要素インデックスとする(ステップS406)。
ステップS406で求めた要素インデックスを入力として読み込み、同要素インデックスに対する有意要素インデックスを求める(ステップS407)。参照テーブルに格納する上記有意要素インデックスの算出に際しては、式(10)又は式(12)に従う。
有意要素インデックスを格納したテーブルΨ[m](m=0,…,M−1)を出力する(ステップS409)。
[Flow of reference table generation process]
FIG. 9 is a flowchart illustrating an example of processing for generating a reference table for the upper bound in step S104-2 and step S204-2.
The histogram is read as input, the maximum value of the section width of the partial section consisting only of insignificant elements in the section [m−M + K, K−1] of the histogram is obtained, and the reference tables ρ u [m], ρ l [m] ( The data is stored in m = 0,..., M-1 (step S401) A specific processing flow is shown in FIG.
The process from step S403 to step S408 is repeated for m = 0,..., M−1 (step S402).
The histogram is read as input, and the maximum value of the element index of the significant element in the histogram interval [m, m−M + K] is read from the reference table Ψ u [m−M + K]. The reference table is output in step S104-1 in FIG. 2 and step S204-1 in FIG. 7 (step S403).
The value of the reference table ψ u [m] output in step S401 is read as the maximum value of the section width of the partial section consisting only of insignificant elements in the histogram section [m−M + K, K−1] (step S404).
The value of m−M + K−ρ u [m] is obtained as a value obtained by subtracting the section width ρ u [m] read in step S404 from the element index m−M + K corresponding to the upper limit of the selectable range (step S405).
The value obtained in step S403 and step S405 is read as an input, and the smaller value is obtained as min (ψ u [m−M + K], m−M + K−ρ u [m]), and this value is added to the new selectable range. An element index corresponding to the upper limit is set (step S406).
The element index obtained in step S406 is read as an input, and a significant element index for the element index is obtained (step S407). When calculating the significant element index stored in the reference table, the equation (10) or the equation (12) is used.
A table Ψ l [m] (m = 0,..., M−1) storing significant element indexes is output (step S409).

図10は、ステップS104−2及びステップS204−2での下界用の参照テーブルを生成する処理の例を示すフローチャートである。ヒストグラムを読み込み、ヒストグラムの区間[0,m]における非有意要素のみからなる部分区間の区間幅の最大値を求め、参照テーブルρ[m]、ρ[m](m=0,…,M−1に格納する(ステップS501)。具体的な処理の流れは、図12に示される。m=0,…,M−2に対して、ステップS503〜ステップS508の処理を繰り返す(ステップS502)。 FIG. 10 is a flowchart illustrating an example of processing for generating a lower bound reference table in step S104-2 and step S204-2. The histogram is read, the maximum value of the section width of the partial section consisting only of insignificant elements in the section [0, m] of the histogram is obtained, and the reference tables ρ l [m], ρ l [m] (m = 0,. (Step S501) The specific processing flow is shown in Fig. 12. The processing from Step S503 to Step S508 is repeated for m = 0, ..., M-2 (Step S502). ).

ヒストグラムを読み込み、ヒストグラムの区間[m,m−M+K]における有意要素の要素インデックスの最小値を参照テーブルψ[m]から読み込む(ステップS503)。同参照テーブルは、図4のステップS104−1及び図7のステップS204−1で出力されたものである。 The histogram is read, and the minimum value of the element index of the significant element in the histogram section [m, m−M + K] is read from the reference table ψ l [m] (step S503). The reference table is output in step S104-1 in FIG. 4 and step S204-1 in FIG.

ヒストグラムの区間[0,m]における非有意要素のみからなる部分区間の区間幅の最大値として、ステップS501で出力した参照テーブルρ[m]の値を読み出す(ステップS504)。選択可能範囲の下限にあたる要素インデックスmから、ステップS504で読み込んだ区間幅ρ[m]を加算した値として、m+ρ[m]の値を求める(ステップS505)。 The value of the reference table ρ l [m] output in step S501 is read as the maximum value of the section width of the partial section consisting only of insignificant elements in the histogram section [0, m] (step S504). The value of m + ρ l [m] is obtained as a value obtained by adding the section width ρ l [m] read in step S504 from the element index m corresponding to the lower limit of the selectable range (step S505).

ステップS403及びステップS505で求めた値を読み込み、大きい方の値をmax(ψ[m],m+ρ[m])として求め、この値を選択可能範囲の新たな下限にあたる要素インデックスとする(ステップS506)。ステップS506で求めた要素インデックスを読み込み、同要素インデックスに対する有意要素インデックスを求める(ステップS507)。参照テーブルに格納する上記有意要素インデックスの算出に際しては、式(10)又は式(12)に従う。 The values obtained in step S403 and step S505 are read, the larger value is obtained as max (ψ l [m], m + ρ l [m]), and this value is set as an element index corresponding to a new lower limit of the selectable range ( Step S506). The element index obtained in step S506 is read, and a significant element index for the element index is obtained (step S507). When calculating the significant element index stored in the reference table, the equation (10) or the equation (12) is used.

有意要素インデックスの最大値〜K−1をΨ[M−1]の値として、参照テーブルΨ[M−1]に格納する(ステップS509)。有意要素インデックスを格納したテーブルΨ[m](m=0,…,M−1)を出力する(ステップS510)。 As the value of the significant elements maximum ~K-1 index Ψ l [M-1], and stores it in the reference table Ψ l [M-1] (step S509). A table Ψ u [m] (m = 0,..., M−1) storing significant element indexes is output (step S510).

図11は、ステップS401での参照テーブルを生成する処理の例を示すフローチャートである。ヒストグラムの要素h[K−1]を読み込み(ステップS601)、同要素値が零値でなければ、ステップS602に進み、それ以外の場合は、ステップS604に進む。変数cを0に設定する(ステップS602)。参照テーブルの要素ρ[M−1]を0に設定する(ステップS603)。変数cを1に設定する(ステップS604)。参照テーブルの要素ρ[M−1]を1に設定する(ステップS605)。 FIG. 11 is a flowchart illustrating an example of processing for generating a reference table in step S401. The histogram element h [K-1] is read (step S601). If the element value is not zero, the process proceeds to step S602, and otherwise, the process proceeds to step S604. The variable c is set to 0 (step S602). The element ρ u [M−1] of the reference table is set to 0 (step S603). The variable c is set to 1 (step S604). The element ρ u [M−1] of the reference table is set to 1 (step S605).

m=M−2,…,0として、ステップS607からステップS613の処理を繰り返す(ステップS606)。ヒストグラムの要素h[m−M+K]を読み込み(ステップS607)、同要素値が零値でなければ、ステップS608に進み、それ以外の場合は、ステップS609に進む。変数cを0に設定する(ステップS608)。変数cの値をインクリメントする(ステップS609)。   As m = M−2,..., 0, the processing from step S607 to step S613 is repeated (step S606). The histogram element h [m−M + K] is read (step S607). If the element value is not zero, the process proceeds to step S608, and otherwise, the process proceeds to step S609. The variable c is set to 0 (step S608). The value of variable c is incremented (step S609).

変数cの値が参照テーブルの第m+1要素ρ[m+1]よりも大きいか否かを判定する(ステップS610)。変数cの値が参照テーブルの第m+1要素ρ[m+1]よりも大きい場合、ステップS611に進み、それ以外の場合は、ステップS612に進む。参照テーブルの第m要素ρ[m]に変数cの値を設定する(ステップS611)。参照テーブルの第m要素ρ[m]に参照テーブルの第m+1要素ρ[m+1]の値を設定する(ステップS612)。参照テーブルρ[m](m=0,…,M−1)を出力する(ステップS613)。 It is determined whether or not the value of the variable c is larger than the (m + 1) th element ρ u [m + 1] of the reference table (step S610). When the value of the variable c is larger than the (m + 1) th element ρ u [m + 1] of the reference table, the process proceeds to step S611. Otherwise, the process proceeds to step S612. The value of the variable c is set to the m-th element ρ u [m] of the reference table (step S611). The value of the (m + 1) th element ρ u [m + 1] of the reference table is set in the m-th element ρ u [m] of the reference table (step S612). The reference table ρ u [m] (m = 0,..., M−1) is output (step S613).

図12は、ステップS501での参照テーブルを生成する処理の例を示すフローチャートである。ヒストグラムの要素h[0]を読み込み、同要素値が零値でなければ、ステップS702に進み、それ以外の場合は、ステップS704に進む(ステップS701)。変数cを0に設定する(ステップS702)。参照テーブルの要素ρ[0]を0に設定する(ステップS703)。変数cを1に設定する(ステップS704)。参照テーブルの要素ρ[0]を1に設定する(ステップS705)。m=1,…,M−1として、ステップS707〜ステップS713の処理を繰り返す(ステップS706)。 FIG. 12 is a flowchart illustrating an example of processing for generating a reference table in step S501. The histogram element h [0] is read. If the element value is not zero, the process proceeds to step S702. Otherwise, the process proceeds to step S704 (step S701). The variable c is set to 0 (step S702). The element ρ l [0] of the reference table is set to 0 (step S703). The variable c is set to 1 (step S704). The element ρ l [0] of the reference table is set to 1 (step S705). As m = 1,..., M−1, the processing from step S707 to step S713 is repeated (step S706).

ヒストグラムの要素h[m]を読み込み(ステップS707)、同要素値が零値でなければ、ステップS708に進み、それ以外の場合は、ステップS709に進む。変数cを0に設定する(ステップS708)。変数cの値をインクリメントする(ステップS709)。変数cの値が参照テーブルの第m−1要素ρ[m−1]よりも大きいか否かを判定する(ステップS710)。 The histogram element h [m] is read (step S707). If the element value is not zero, the process proceeds to step S708, and otherwise the process proceeds to step S709. The variable c is set to 0 (step S708). The value of the variable c is incremented (step S709). It is determined whether or not the value of the variable c is larger than the m−1 element ρ l [m−1] of the reference table (step S710).

変数cの値が参照テーブルの第m−1要素ρ[m−1]よりも大きい場合、ステップS711に進み、それ以外の場合は、ステップS712に進む。参照テーブルの第m要素ρ[m]に変数cの値を設定する(ステップS711)。参照テーブルの第m要素ρ[m]に参照テーブルの第m−1要素ρ[m−1]の値を設定する(ステップS712)。参照テーブルρ[m](m=0,…,M−1)を出力する(ステップS713)。 If the value of the variable c is larger than the m−1th element ρ l [m−1] of the reference table, the process proceeds to step S711. Otherwise, the process proceeds to step S712. The value of the variable c is set to the m-th element ρ l [m] of the reference table (step S711). The value of the (m−1) th element ρ l [m−1] of the reference table is set in the mth element ρ l [m] of the reference table (step S712). The reference table ρ l [m] (m = 0,..., M−1) is output (step S713).

[適応量子化装置]
図13は、量子化装置1a(適応量子化装置)の構成の例を示す図である。量子化装置1aは、パーソナルコンピュータ、タブレット端末、スマートフォン端末、サーバ装置等の情報処理装置である。量子化装置1aは、第1のレベル数(階調数)で範囲を表現する値を表す入力信号のヒストグラムを、第2のレベル数で範囲を表現する値を表す出力信号のヒストグラムで近似する量子化処理(適応量子化)を実行する。
[Adaptive quantizer]
FIG. 13 is a diagram illustrating an example of the configuration of the quantization device 1a (adaptive quantization device). The quantization device 1a is an information processing device such as a personal computer, a tablet terminal, a smartphone terminal, or a server device. The quantizing device 1a approximates the histogram of the input signal representing the value expressing the range with the first number of levels (the number of gradations) with the histogram of the output signal representing the value expressing the range with the second number of levels. Quantization processing (adaptive quantization) is executed.

量子化装置1aは、ヒストグラム生成部10と、第1要素数記憶部11と、クラス数記憶部12と、インデックス参照テーブル生成部13と、インデックス記憶部14と、要素数参照テーブル生成部15と、第2要素数記憶部16と、上界値参照テーブル生成部17と、上界値記憶部18と、下界値参照テーブル生成部19と、下界値記憶部20と、近似誤差最小値決定部21と、近似誤差最小値記憶部22と、上端記憶部23と、上端追跡部24とを備える。   The quantization device 1a includes a histogram generation unit 10, a first element number storage unit 11, a class number storage unit 12, an index reference table generation unit 13, an index storage unit 14, and an element number reference table generation unit 15. , Second element number storage unit 16, upper bound value reference table generation unit 17, upper bound value storage unit 18, lower bound value reference table generation unit 19, lower bound value storage unit 20, and approximate error minimum value determination unit 21, an approximate error minimum value storage unit 22, an upper end storage unit 23, and an upper end tracking unit 24.

ヒストグラム生成部10と、インデックス参照テーブル生成部13と、要素数参照テーブル生成部15と、上界値参照テーブル生成部17と、下界値参照テーブル生成部19と、近似誤差最小値決定部21と、上端追跡部24との一部または全部は、例えば、CPU(Central Processing Unit)等のプロセッサが、記憶部に記憶されたプログラムを実行することにより機能するソフトウェア機能部である。また、これらの機能部のうち一部または全部は、LSI(Large Scale Integration)やASIC(Application Specific Integrated Circuit)等のハードウェア機能部であってもよい。   Histogram generator 10, index reference table generator 13, element count reference table generator 15, upper bound reference table generator 17, lower bound reference table generator 19, and approximate error minimum value determiner 21 Part or all of the upper end tracking unit 24 is a software function unit that functions when a processor such as a CPU (Central Processing Unit) executes a program stored in the storage unit. Some or all of these functional units may be hardware functional units such as LSI (Large Scale Integration) and ASIC (Application Specific Integrated Circuit).

第1要素数記憶部11と、クラス数記憶部12と、インデックス記憶部14と、第2要素数記憶部16と、上界値記憶部18と、下界値記憶部20と、近似誤差最小値記憶部22と、上端記憶部23との一部または全部は、例えば、磁気ハードディスク装置や半導体記憶装置等の不揮発性の記憶媒体(非一時的な記録媒体)を有する記憶装置を用いて構成される。各記憶部は、例えば、RAM(Random Access Memory)やレジスタなどの揮発性の記憶媒体を有していてもよい。   First element number storage unit 11, class number storage unit 12, index storage unit 14, second element number storage unit 16, upper bound value storage unit 18, lower bound value storage unit 20, and approximate error minimum value Part or all of the storage unit 22 and the upper end storage unit 23 are configured using a storage device having a non-volatile storage medium (non-temporary recording medium) such as a magnetic hard disk device or a semiconductor storage device. The Each storage unit may include, for example, a volatile storage medium such as a RAM (Random Access Memory) or a register.

ヒストグラム生成部10は、入力信号を読み込む。ヒストグラム生成部10は、入力信号のヒストグラムを生成する。ヒストグラム生成部10は、入力信号のヒストグラムと入力信号のレベル数Kとを、第1要素数記憶部11に記憶させる。
第1要素数記憶部11(ヒストグラム・入力信号要素数記憶部)は、入力信号のヒストグラムと入力信号のレベル数Kとを記憶(格納)する。
クラス数記憶部12は、量子化クラス数Mを記憶する。
The histogram generator 10 reads an input signal. The histogram generator 10 generates a histogram of the input signal. The histogram generation unit 10 stores the histogram of the input signal and the number K of input signal levels in the first element number storage unit 11.
The first element number storage unit 11 (histogram / input signal element number storage unit) stores (stores) an input signal histogram and an input signal level number K.
The class number storage unit 12 stores a quantization class number M.

インデックス参照テーブル生成部13は、ヒストグラムの要素インデックスをk、ヒストグラムの有意要素インデックスを〜kとし、ヒストグラムの要素インデックスkとヒストグラムの有意要素インデックス〜kとの対応関係を格納した参照テーブルとして、F[〜k]を生成する。インデックス参照テーブル生成部13は、kと〜kの対応関係を格納した参照テーブルを、インデックス記憶部14に格納する。参照テーブルF[〜k]の具体的な生成方法は、図4のステップS102に示す通りである。
インデックス記憶部14は、ヒストグラムの要素インデックスkとヒストグラムの有意要素インデックス〜kとの対応関係を格納した参照テーブルを記憶する。
The index reference table generating unit 13 sets the histogram element index to k, the histogram significant element index to k, and stores the correspondence between the histogram element index k and the histogram significant element index to k as a reference table. [˜k] are generated. The index reference table generation unit 13 stores the reference table storing the correspondence between k and ˜k in the index storage unit 14. A specific method for generating the reference table F [˜k] is as shown in step S102 of FIG.
The index storage unit 14 stores a reference table that stores the correspondence relationship between the element index k of the histogram and the significant element indexes ˜k of the histogram.

要素数参照テーブル生成部15は、ヒストグラムの区間[0,K]に含まれる非有意要素の個数を格納した参照テーブルとして、Z[k]を生成する。参照テーブルを第2要素数記憶部16に格納する。参照テーブルZ[k]の具体的な生成方法は、図4のステップS103に示す通りである。
第2要素数記憶部16(非有意要素数記憶部)は、参照テーブルZ[k]を記憶する。
The element number reference table generation unit 15 generates Z [k] as a reference table storing the number of insignificant elements included in the histogram interval [0, K]. The reference table is stored in the second element number storage unit 16. A specific method for generating the reference table Z [k] is as shown in step S103 of FIG.
The second element number storage unit 16 (insignificant element number storage unit) stores a reference table Z [k].

上界値参照テーブル生成部17は、第mクラスの有意要素インデックスの最大値を格納した参照テーブルとして、Ψ[m](m=0,…,M−1)を生成する。上界値参照テーブル生成部17は、参照テーブルΨ[m]を上界値記憶部18に格納する。参照テーブルΨ[m]の具体的な生成方法は、図4のステップS104に示す通りである。
上界値記憶部18は、参照テーブルΨ[m]を記憶する。
The upper bound value reference table generation unit 17 generates Ψ u [m] (m = 0,..., M−1) as a reference table storing the maximum value of the m-th class significant element index. The upper bound value reference table generation unit 17 stores the reference table Ψ u [m] in the upper bound value storage unit 18. A specific method for generating the reference table Ψ u [m] is as shown in step S104 of FIG.
The upper bound value storage unit 18 stores a reference table Ψ u [m].

下界値参照テーブル生成部19は、第mクラスの有意要素インデックスの最小値を格納した参照テーブルとして、Ψ[m](m=0,…,M−1)を生成する。下界値参照テーブル生成部19は、参照テーブルΨ[m]を下界値記憶部20に格納する。参照テーブルΨ[m]の具体的な生成方法は、図4のステップS104に示す通りである。
下界値記憶部20は、参照テーブルΨ[m]を記憶する。
The lower bound value reference table generation unit 19 generates Ψ l [m] (m = 0,..., M−1) as a reference table storing the minimum value of the m-th class significant element index. The lower bound value reference table generation unit 19 stores the reference table Ψ l [m] in the lower bound value storage unit 20. A specific method for generating the reference table Ψ l [m] is as shown in step S104 of FIG.
The lower bound value storage unit 20 stores a reference table Ψ l [m].

近似誤差最小値決定部21は、入力信号のヒストグラムと、入力信号のレベル数と、量子化クラス数と、要素インデックスの参照テーブルと、非有意要素数の参照テーブルと、量子化クラスの上界値の参照テーブルと、量子化クラスの下界値の参照テーブルとを取得する。   The approximate error minimum value determination unit 21 includes an input signal histogram, the number of levels of the input signal, the number of quantization classes, an element index reference table, an insignificant element number reference table, and an upper bound of the quantization class. A reference table of values and a reference table of lower bound values of the quantization class are acquired.

近似誤差最小値決定部21は、ヒストグラムを量子化クラス数で指定されたクラス数に分割した場合の近似誤差の最小値を算出する。近似誤差最小値決定部21は、ヒストグラムを量子化クラス数で指定されたクラス数に分割した場合の近似誤差の最小値を、近似誤差最小値記憶部22に格納する。近似誤差最小値決定部21は、各量子化クラスにおいて近似誤差の累積値を最小化するクラスの上端を表す有意要素インデックスを、最適パス追跡用参照テーブルとして、上端記憶部23に格納する。具体的な処理は、図4に示すステップS105からステップS118までに示す通りである。近似誤差最小値記憶部22は、ヒストグラムを量子化クラス数で指定されたクラス数に分割した場合の近似誤差の最小値を記憶する。上端記憶部23は、最適パス追跡用参照テーブルを記憶する。   The approximate error minimum value determination unit 21 calculates the minimum value of the approximate error when the histogram is divided into the number of classes specified by the number of quantization classes. The approximate error minimum value determination unit 21 stores, in the approximate error minimum value storage unit 22, the minimum value of the approximate error when the histogram is divided into the number of classes specified by the number of quantization classes. The approximate error minimum value determination unit 21 stores a significant element index representing the upper end of the class that minimizes the accumulated value of the approximate error in each quantization class as the optimum path tracking reference table in the upper end storage unit 23. Specific processing is as shown in steps S105 to S118 shown in FIG. The approximate error minimum value storage unit 22 stores the minimum value of the approximate error when the histogram is divided into the number of classes designated by the number of quantization classes. The upper end storage unit 23 stores an optimum path tracking reference table.

上端追跡部24は、入力信号のレベル数と、量子化クラス数と、要素インデックス参照テーブルと、有意要素数参照テーブルと、最適パス追跡用参照テーブルとを取得する。上端追跡部24は、近似誤差の最小値を実現する際のクラスの上端を表す要素インデックスを算出する。具体的な処理は、図4に示すステップS119からステップ122までに示す通りである。   The upper end tracking unit 24 acquires the number of levels of the input signal, the number of quantization classes, the element index reference table, the significant element number reference table, and the optimal path tracking reference table. The upper end tracking unit 24 calculates an element index representing the upper end of the class when realizing the minimum value of the approximation error. The specific process is as shown in steps S119 to 122 shown in FIG.

[演算量低減型適応量子化装置]
近似誤差を参照テーブルに格納し、近似誤差を格納した参照テーブルから近似誤差を適宜に読み込む形に拡張した演算量低減型適応量子化装置の構成を説明する。
[Computational Complexity Reduced Adaptive Quantizer]
A configuration of an adaptive quantization apparatus with a reduced amount of computation will be described in which the approximation error is stored in a reference table and the approximation error is appropriately read from the reference table storing the approximation error.

図14は、量子化装置1b(演算量低減型適応量子化装置)の構成の例を示す図である。量子化装置1bは、パーソナルコンピュータ、タブレット端末、スマートフォン端末、サーバ装置等の情報処理装置である。量子化装置1bは、第1のレベル数(階調数)で範囲を表現する値を表す入力信号のヒストグラムを、第2のレベル数で範囲を表現する値を表す出力信号のヒストグラムで近似する量子化処理(適応量子化)を実行する。   FIG. 14 is a diagram illustrating an example of the configuration of the quantization device 1b (computation reduction type adaptive quantization device). The quantization device 1b is an information processing device such as a personal computer, a tablet terminal, a smartphone terminal, or a server device. The quantizing device 1b approximates the histogram of the input signal representing the value expressing the range with the first number of levels (number of gradations) with the histogram of the output signal representing the value representing the range with the second number of levels. Quantization processing (adaptive quantization) is executed.

量子化装置1bは、ヒストグラム生成部10と、第1要素数記憶部11と、クラス数記憶部12と、インデックス参照テーブル生成部13と、インデックス記憶部14と、要素数参照テーブル生成部15と、第2要素数記憶部16と、上界値参照テーブル生成部17と、上界値記憶部18と、下界値参照テーブル生成部19と、下界値記憶部20と、近似誤差最小値決定部21と、近似誤差最小値記憶部22と、上端記憶部23と、上端追跡部24と、近似誤差決定部25と、近似誤差記憶部26とを備える。   The quantization device 1b includes a histogram generation unit 10, a first element number storage unit 11, a class number storage unit 12, an index reference table generation unit 13, an index storage unit 14, and an element number reference table generation unit 15. , Second element number storage unit 16, upper bound value reference table generation unit 17, upper bound value storage unit 18, lower bound value reference table generation unit 19, lower bound value storage unit 20, and approximate error minimum value determination unit 21, an approximate error minimum value storage unit 22, an upper end storage unit 23, an upper end tracking unit 24, an approximate error determination unit 25, and an approximate error storage unit 26.

ヒストグラム生成部10と、インデックス参照テーブル生成部13と、要素数参照テーブル生成部15と、上界値参照テーブル生成部17と、下界値参照テーブル生成部19と、近似誤差最小値決定部21と、上端追跡部24と、近似誤差決定部25との一部または全部は、例えば、CPU等のプロセッサが、記憶部に記憶されたプログラムを実行することにより機能するソフトウェア機能部である。また、これらの機能部のうち一部または全部は、LSIやASIC等のハードウェア機能部であってもよい。   Histogram generator 10, index reference table generator 13, element count reference table generator 15, upper bound reference table generator 17, lower bound reference table generator 19, and approximate error minimum value determiner 21 Part or all of the upper end tracking unit 24 and the approximate error determination unit 25 is a software function unit that functions when a processor such as a CPU executes a program stored in the storage unit. Some or all of these functional units may be hardware functional units such as an LSI or an ASIC.

第1要素数記憶部11と、クラス数記憶部12と、インデックス記憶部14と、第2要素数記憶部16と、上界値記憶部18と、下界値記憶部20と、近似誤差最小値記憶部22と、上端記憶部23と、近似誤差記憶部26との一部または全部は、例えば、磁気ハードディスク装置や半導体記憶装置等の不揮発性の記憶媒体(非一時的な記録媒体)を有する記憶装置を用いて構成される。各記憶部は、例えば、RAMやレジスタなどの揮発性の記憶媒体を有していてもよい。   First element number storage unit 11, class number storage unit 12, index storage unit 14, second element number storage unit 16, upper bound value storage unit 18, lower bound value storage unit 20, and approximate error minimum value Part or all of the storage unit 22, the upper end storage unit 23, and the approximate error storage unit 26 include, for example, a nonvolatile storage medium (non-temporary recording medium) such as a magnetic hard disk device or a semiconductor storage device. It is configured using a storage device. Each storage unit may have, for example, a volatile storage medium such as a RAM or a register.

近似誤差最小値決定部21は、入力信号のヒストグラムと、入力信号のレベル数と、量子化クラス数と、要素インデックスの参照テーブルと、非有意要素数の参照テーブルと、量子化クラスの上界値の参照テーブルと、量子化クラスの下界値の参照テーブル近似誤差の参照テーブルとを取得する。   The approximate error minimum value determination unit 21 includes an input signal histogram, the number of levels of the input signal, the number of quantization classes, an element index reference table, an insignificant element number reference table, and an upper bound of the quantization class. A value reference table and a quantization table lower bound value reference table approximation error reference table are acquired.

近似誤差最小値決定部21は、入力信号のヒストグラムと、入力信号のレベル数と、量子化クラス数と、要素インデックスの参照テーブルと、非有意要素数の参照テーブルと、量子化クラスの上界値の参照テーブルと、量子化クラスの下界値の参照テーブル近似誤差の参照テーブルとに基づいて、量子化クラス数で指定されたクラス数にヒストグラムを分割した場合の近似誤差の最小値を算出する。近似誤差最小値決定部21は、近似誤差の最小値を近似誤差最小値記憶部22に格納する。近似誤差最小値決定部21は、各量子化クラスにおいて近似誤差の累積値を最小化するクラスの上端を表す有意要素インデックスを、最適パス追跡用参照テーブルとして、上端記憶部23に格納する。具体的な処理は、図7のステップS206からステップS219までに示す通りである。
近似誤差最小値記憶部22は、近似誤差の最小値を記憶する。
上端記憶部23は、最適パス追跡用参照テーブルを記憶する。
The approximate error minimum value determination unit 21 includes an input signal histogram, the number of levels of the input signal, the number of quantization classes, an element index reference table, an insignificant element number reference table, and an upper bound of the quantization class. Based on the value reference table and the quantization table lower bound reference table approximation error reference table, the minimum value of the approximation error when the histogram is divided into the number of classes specified by the number of quantization classes is calculated. . The approximate error minimum value determination unit 21 stores the minimum value of the approximate error in the approximate error minimum value storage unit 22. The approximate error minimum value determination unit 21 stores a significant element index representing the upper end of the class that minimizes the accumulated value of the approximate error in each quantization class as the optimum path tracking reference table in the upper end storage unit 23. Specific processing is as shown in steps S206 to S219 in FIG.
The approximate error minimum value storage unit 22 stores the minimum value of the approximate error.
The upper end storage unit 23 stores an optimum path tracking reference table.

上端追跡部24は、入力信号のレベル数と、量子化クラス数と、要素インデックス参照テーブルと、有意要素数参照テーブルと、最適パス追跡用参照テーブルとを取得する。上端追跡部24は、入力信号のレベル数と、量子化クラス数と、要素インデックス参照テーブルと、有意要素数参照テーブルと、最適パス追跡用参照テーブルとに基づいて、近似誤差の最小値を実現する際のクラスの上端を表す要素インデックスを算出する。具体的な処理は、図7のステップS220からステップS223までに示す通りである。   The upper end tracking unit 24 acquires the number of levels of the input signal, the number of quantization classes, the element index reference table, the significant element number reference table, and the optimal path tracking reference table. The upper end tracking unit 24 realizes the minimum value of the approximation error based on the number of levels of the input signal, the number of quantization classes, the element index reference table, the significant element number reference table, and the optimal path tracking reference table. Calculate the element index that represents the top of the class. Specific processing is as shown in steps S220 to S223 in FIG.

近似誤差決定部25は、入力信号のヒストグラムと、入力信号のレベル数と、量子化クラス数と、要素インデックスの参照テーブルと、非有意要素数の参照テーブルとを取得する。近似誤差決定部25は、入力信号のヒストグラムと、入力信号のレベル数と、量子化クラス数と、要素インデックスの参照テーブルと、非有意要素数の参照テーブルとに基づいて、近似誤差を算出する。近似誤差決定部25は、算出した近似誤差を、近似誤差の参照テーブルとして近似誤差記憶部26に格納する。具体的な処理は、図8に示す通りである。
近似誤差記憶部26は、近似誤差の参照テーブルを記憶する。
The approximate error determination unit 25 acquires an input signal histogram, the number of levels of the input signal, the number of quantization classes, an element index reference table, and an insignificant element number reference table. The approximate error determination unit 25 calculates an approximate error based on the histogram of the input signal, the number of levels of the input signal, the number of quantization classes, the reference table of element indexes, and the reference table of the number of insignificant elements. . The approximation error determination unit 25 stores the calculated approximation error in the approximation error storage unit 26 as an approximation error reference table. The specific processing is as shown in FIG.
The approximate error storage unit 26 stores an approximate error reference table.

図15は、適応量子化処理の基本処理の例を示す図である。非有意係数に対する不要な処理を削除した適応量子化処理の基本処理の流れを説明する。なお、処理の繰り返し(for文)の条件は、図15に示す通りである。   FIG. 15 is a diagram illustrating an example of basic processing of adaptive quantization processing. A flow of basic processing of adaptive quantization processing in which unnecessary processing for insignificant coefficients is deleted will be described. Note that the conditions for repetition of processing (for sentence) are as shown in FIG.

ヒストグラム生成部10は、入力信号のヒストグラム(クラス数K) を生成する。クラス数記憶部12は、量子化後のクラス数Mを読み込む。参照テーブルZ[k](k=0,…,K−1),Ψ[m],Ψ[m](m=0,…,M−1),F[〜k](〜k=0,…,K−Z[K−1]−1)を生成する。 The histogram generator 10 generates a histogram (number of classes K) of the input signal. The class number storage unit 12 reads the class number M after quantization. Reference table Z [k] (k = 0,..., K−1), Ψ l [m], Ψ u [m] (m = 0,..., M−1), F [˜k] (˜k = 0,..., KZ [K-1] -1) are generated.

ヒストグラムの区間[0,F[j]]を代表値(式(4)により求まる重心)で近似した場合の近似誤差を求め、近似した場合の近似誤差をS(j)に格納する。以下、近似した場合の近似誤差をS(j)に格納する処理を「第1格納処理」という。 An approximation error is approximated when the histogram section [0, F [j]] is approximated by a representative value (the center of gravity obtained by the equation (4)), and the approximation error when approximated is stored in S 0 (j). Hereinafter, the process of storing the approximation error in the case of approximation in S 0 (j) is referred to as “first storage process”.

ヒストグラムの区間[F[〜L−(〜Δ−1)],F[〜L]]を代表値で近似した場合の近似誤差を求める。代表値は式(4)により求め、同近似誤差は式(3)より求める。同近似誤差を〜e(〜L−(〜Δ−1),〜L)とする。〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)の値を計算する。〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))の中での最小値を〜S(〜L)に格納する。〜Sm−1(〜L−〜Δ)+〜e(〜L−(〜Δ−1),〜L)(〜Δ=1,…,〜L−(m−1))を最小化する〜Δを用いて、〜L−〜Δを^L−1(〜L)に格納する。 An approximation error is obtained when the histogram section [F [˜L m − (˜Δ m −1)], F [˜L m ]] is approximated with a representative value. The representative value is obtained from equation (4), and the approximation error is obtained from equation (3). The same approximation error ~e (~L m - (~Δ m -1), ~L m) and. ~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) to calculate the value of. ~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) (~Δ m = 1, ..., ~L m - (m- The minimum value in 1)) is stored in ~ S m (~ L m ). ~S m-1 (~L m -~Δ m) + ~e (~L m - (~Δ m -1), ~L m) (~Δ m = 1, ..., ~L m - (m- 1)) using the ~Deruta m that minimizes the stores ~L m -~Δ m ^ to L m -1 (~L m).

K−1をLM−1 に格納する。K−Z[K−1]−1を〜LM−1 に格納する。^Lm−1(〜L )を読み込む。^Lm−1(〜L )を〜Lm−1 に格納する。F[〜Lm−1 ]をLm−1 に格納する。 Store K-1 in LM -1 * . Store KZ [K-1] -1 in ~ LM -1 * . ^ L m−1 (˜L m * ) is read. ^ L m-1 the (~L m *) is stored in the ~L m-1 *. F [˜L m−1 * ] is stored in L m−1 * .

図16は、適応量子化処理の演算量低減処理の例を示す図である。前述のルックアップテーブルを参照する方式の場合における、演算量低減処理を実行する適応量子化処理の例を説明する。なお、処理の繰り返し(for文)の条件は、図16に示す通りである。   FIG. 16 is a diagram illustrating an example of the calculation amount reduction process of the adaptive quantization process. An example of an adaptive quantization process that executes a calculation amount reduction process in the case of a method that refers to the lookup table described above will be described. Note that the conditions for repetition of processing (for sentence) are as shown in FIG.

ヒストグラム生成部10は、入力信号のヒストグラム(クラス数K) を生成する。クラス数記憶部12は、量子化後のクラス数Mを読み込む。参照テーブルZ[k](k=0,…,K−1),Ψ[m],Ψ[m](m=0,…,M−1),F[〜k](〜k=0,…,K−Z[K−1]−1)を生成する。 The histogram generator 10 generates a histogram (number of classes K) of the input signal. The class number storage unit 12 reads the class number M after quantization. Reference table Z [k] (k = 0,..., K−1), Ψ l [m], Ψ u [m] (m = 0,..., M−1), F [˜k] (˜k = 0,..., KZ [K-1] -1) are generated.

図17に示す処理(近似誤差参照テーブル生成処理の流れ)に基づき、近似誤差を格納した参照テーブルE[〜i,〜i]を生成する。E[0,j]をS(j)に格納する。図15に示す処理(適応量子化処理の基本処理の流れ)における、第1格納処理よりも後の処理を実行する。 Based on the process shown in FIG. 17 (flow of approximate error reference table generation process), a reference table E [˜i s , ˜i e ] storing the approximate error is generated. E [0, j] is stored in S 0 (j). In the process shown in FIG. 15 (flow of basic process of adaptive quantization process), a process after the first storage process is executed.

図17は、近似誤差参照テーブルを生成する処理の例を示す図である。なお、処理の繰り返し(for文)の条件は、図17に示す通りである。   FIG. 17 is a diagram illustrating an example of processing for generating an approximate error reference table. Note that the conditions for repetition of processing (for sentence) are as shown in FIG.

[0,〜k]に0を格納する。q[0,〜k]に0を格納する。q[0,〜k]に0を格納する。iにF[〜i]を代入する。iにF[〜i]を代入する。
[i,i]にq[i,i−1]+h[i]を格納する。q[i,i]にq[i,i−1]+ih[i]を格納する。q[i,i]にq[i,i−1]+i h[i]を格納する。c[i,i]にq[i,i]/q[i,i]を格納する。E[〜i,〜i]にq[i,i]−2c[i,i]q[i,i]+c[i,i[i,i]を格納する。
0 is stored in q 1 [0,... k]. 0 is stored in q 2 [0, ˜k]. 0 is stored in q 3 [0, to k]. Substituting F [~i e] to i e. Substituting F [~i s] to i s.
q 1 [i s, i e ] to q 1 [i s, i e -1] stores + h [i e]. q 2 [i s , i e −1] + i e h [i e ] is stored in q 2 [i s , i e ]. q 3 [i s, i e ] to q 3 [i s, i e -1] + i e 2 h [i e] stores. q 2 [i s , i e ] / q 1 [i s , i e ] is stored in c [i s , i e ]. E [~i s, ~i e] to q 3 [i s, i e ] -2c [i s, i e] q 2 [i s, i e] + c [i s, i e] 2 q 1 [ i s , i e ] are stored.

以上のように、量子化方法は、第1のレベル数(入力信号レベル数)で表現される範囲を取り得る値を表す入力信号のヒストグラムを、第1のレベル数よりも少ない第2のレベル数(量子化レベル数)で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、格納するステップと、選択するステップとを含む。近似誤差最小値決定部21は、入力信号のヒストグラムの要素の集合であるクラスを定め、クラスの境界であるクラス境界の候補を有意要素に制限し、クラス境界となり得る有意要素に上限及び下限を定め、上限から下限までの範囲に含まれる有意要素をクラス境界の候補と定め、クラス境界の選択可能範囲の上限に対して、選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する有意要素の位置と、クラスの上限として取りうる有意要素のうち選択可能範囲の上限に最も近い有意要素の位置とを比較し、相対的に大きな値を示す有意要素をクラス境界の選択可能範囲の新たな上限と定め、クラス境界までの近似誤差の累積値を最小化する量子化値と近似誤差の累積値の最小値とをメモリに格納する。上端追跡部24は、クラス境界を選択する際、非有意要素を近似誤差の累積値の計算から除外し、格納した最小値をメモリから取得し、クラス境界の選択における近似誤差の計算に最小値を用いることで、クラス境界の全ての要素に対して近似誤差の総和を最小化するクラス境界を選択する。   As described above, in the quantization method, the histogram of the input signal representing the value that can take the range expressed by the first number of levels (number of input signal levels) is expressed as the second level smaller than the first number of levels. A quantization method in a quantization apparatus that approximates a histogram of an output signal that represents a value that can take a range expressed by a number (quantization level number), and includes a storing step and a selecting step. The approximate error minimum value determination unit 21 determines a class that is a set of elements of the histogram of the input signal, restricts class boundary candidates that are class boundaries to significant elements, and sets upper and lower limits to significant elements that can be class boundaries. Significant elements included in the range from the upper limit to the lower limit are determined as class boundary candidates, and the insignificant elements in each section with the upper limit of the selectable range as the lower end of the upper limit of the selectable range of the class boundary Compare the position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number and the position of the significant element that is closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class. Significant elements indicating the new limit of the class boundary selectable range are defined, and the quantized value that minimizes the approximate error accumulated value up to the class boundary and the minimum approximate error accumulated value are stored in memory. To. When selecting the class boundary, the upper end tracking unit 24 excludes the insignificant element from the calculation of the cumulative value of the approximation error, acquires the stored minimum value from the memory, and calculates the minimum value for the calculation of the approximation error in the selection of the class boundary. Is used to select a class boundary that minimizes the sum of approximation errors for all elements of the class boundary.

これによって、量子化方法は、信号の階調変換を行う際に発生する変換誤差を最小化する場合でも、量子化に要する演算量を低減することが可能となる。すなわち、量子化方法は、画素値の疎性を考慮することで、ビット深度変換誤差の最適性を保持しつつ、演算量を低減することが可能となる。   As a result, the quantization method can reduce the amount of calculation required for quantization even when the conversion error that occurs when performing gradation conversion of a signal is minimized. In other words, the quantization method can reduce the amount of calculation while maintaining the optimality of the bit depth conversion error by considering the sparseness of the pixel value.

量子化方法は、第1のレベル数(入力信号レベル数)で表現される範囲を取り得る値を表す入力信号のヒストグラムを、第1のレベル数よりも少ない第2のレベル数(量子化レベル数)で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、格納するステップと、選択するステップとを含む。近似誤差最小値決定部21は、入力信号のヒストグラムの要素の集合であるクラスを定め、クラスの境界であるクラス境界の候補を有意要素に制限し、クラス境界となり得る有意要素に上限及び下限を定め、上限から下限までの範囲に含まれる有意要素をクラス境界の候補と定め、クラス境界の選択可能範囲の下限に対して、選択可能範囲の下限を上端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する有意要素の位置と、クラスの上限として取りうる有意要素のうち選択可能範囲の上限に最も近い有意要素の位置とを比較し、相対的に小さな値を示す有意要素をクラス境界の選択可能範囲の新たな下限と定め、クラス境界までの近似誤差の累積値を最小化する量子化値と近似誤差の累積値の最小値とをメモリに格納する。上端追跡部24は、クラス境界を選択する際、非有意要素を近似誤差の累積値の計算から除外し、格納した最小値をメモリから取得し、クラス境界の選択における近似誤差の計算に最小値を用いることで、クラス境界の全ての要素に対して近似誤差の総和を最小化するクラス境界を選択する。   In the quantization method, a histogram of an input signal representing a value that can take a range expressed by a first number of levels (number of input signal levels) is expressed by a second number of levels (quantization level) smaller than the first level number. A quantization method in a quantization apparatus that approximates with a histogram of an output signal that represents a value that can take a range expressed by a number), and includes a storing step and a selecting step. The approximate error minimum value determination unit 21 determines a class that is a set of elements of the histogram of the input signal, restricts class boundary candidates that are class boundaries to significant elements, and sets upper and lower limits to significant elements that can be class boundaries. Define significant elements included in the range from the upper limit to the lower limit as class boundary candidates, and set the non-significant elements in each section with the lower limit of the selectable range as the upper limit relative to the lower limit of the selectable range of the class boundary. Compare the position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number and the position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class. Significant elements that indicate the value are defined as the new lower limit of the class boundary selectable range, and the quantized value that minimizes the approximate error accumulated value up to the class boundary and the minimum approximate error accumulated value are stored in memory. To. When selecting the class boundary, the upper end tracking unit 24 excludes the insignificant element from the calculation of the cumulative value of the approximation error, acquires the stored minimum value from the memory, and calculates the minimum value for the calculation of the approximation error in the selection of the class boundary. Is used to select a class boundary that minimizes the sum of approximation errors for all elements of the class boundary.

これによって、量子化方法は、信号の階調変換を行う際に発生する変換誤差を最小化する場合でも、量子化に要する演算量を低減することが可能となる。すなわち、量子化方法は、画素値の疎性を考慮することで、ビット深度変換誤差の最適性を保持しつつ、演算量を低減することが可能となる。   As a result, the quantization method can reduce the amount of calculation required for quantization even when the conversion error that occurs when performing gradation conversion of a signal is minimized. In other words, the quantization method can reduce the amount of calculation while maintaining the optimality of the bit depth conversion error by considering the sparseness of the pixel value.

上述した実施形態における量子化装置の少なくとも一部をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA(Field Programmable Gate Array)等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。   You may make it implement | achieve at least one part of the quantization apparatus in embodiment mentioned above with a computer. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Here, the “computer system” includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory inside a computer system serving as a server or a client in that case may be included and a program held for a certain period of time. Further, the program may be a program for realizing a part of the above-described functions, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system. You may implement | achieve using programmable logic devices, such as FPGA (Field Programmable Gate Array).

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

1a…量子化装置、1b…量子化装置、10…ヒストグラム生成部、11…第1要素数記憶部、12…クラス数記憶部、13…インデックス参照テーブル生成部、14…インデックス記憶部、15…要素数参照テーブル生成部、16…第2要素数記憶部、17…上界値参照テーブル生成部、18…上界値記憶部、19…下界値参照テーブル生成部、20…下界値記憶部、21…近似誤差最小値決定部、22…近似誤差最小値記憶部、23…上端記憶部、24…上端追跡部、25…近似誤差決定部、26…近似誤差記憶部 DESCRIPTION OF SYMBOLS 1a ... Quantizer, 1b ... Quantizer, 10 ... Histogram generation part, 11 ... 1st element number storage part, 12 ... Class number storage part, 13 ... Index reference table generation part, 14 ... Index storage part, 15 ... Element number reference table generation unit, 16 ... second element number storage unit, 17 ... upper bound value reference table generation unit, 18 ... upper bound value storage unit, 19 ... lower bound value reference table generation unit, 20 ... lower bound value storage unit, DESCRIPTION OF SYMBOLS 21 ... Approximate error minimum value determination part, 22 ... Approximate error minimum value memory | storage part, 23 ... Upper end memory | storage part, 24 ... Upper end tracking part, 25 ... Approximation error determination part, 26 ... Approximation error memory | storage part

Claims (4)

第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、
前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納するステップと、
前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択するステップと、
を含む量子化方法。
A histogram of an input signal representing a value that can take a range expressed by the first number of levels is represented by an output signal that represents a value that can take a range expressed by the second number of levels less than the first number of levels. A quantization method in a quantization device approximating with a histogram,
Defining a class that is a set of histogram elements of the input signal, limiting class boundary candidates that are boundaries of the class to significant elements, determining upper and lower limits for the significant elements that can be the class boundary, and from the upper limit The significant element included in the range up to the lower limit is determined as the candidate for the class boundary, and the insignificant element in each section having the upper limit of the selectable range as the lower end with respect to the upper limit of the selectable range of the class boundary The position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number of the number of the significant element and the position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class are compared. Quantifying the significant element showing a relatively large value as a new upper limit of the selectable range of the class boundary, and minimizing the cumulative value of the approximation error up to the class boundary And storing the minimum value of the cumulative value of the values and the approximation error in the memory,
When selecting the class boundary, the non-significant element is excluded from calculation of the cumulative value of the approximation error, the stored minimum value is obtained from the memory, and the approximation error is calculated in the selection of the class boundary. Selecting the class boundary that minimizes the sum of the approximation errors for all elements of the class boundary by using a minimum value;
Including a quantization method.
第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置における量子化方法であって、
前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の下限に対して、前記選択可能範囲の下限を上端とする各区間内における非有意要素の連続数の最大値を加算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に小さな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな下限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納するステップと、
前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択するステップと、
を含む量子化方法。
A histogram of an input signal representing a value that can take a range expressed by the first number of levels is represented by an output signal that represents a value that can take a range expressed by the second number of levels less than the first number of levels. A quantization method in a quantization device approximating with a histogram,
Defining a class that is a set of histogram elements of the input signal, limiting class boundary candidates that are boundaries of the class to significant elements, determining upper and lower limits for the significant elements that can be the class boundary, and from the upper limit The significant element included in the range up to the lower limit is determined as the class boundary candidate, and the non-significant element in each section whose upper end is the lower limit of the selectable range with respect to the lower limit of the selectable range of the class boundary The position of the significant element corresponding to the value obtained by adding the maximum value of the consecutive number of the number of the significant element is compared with the position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class. Quantifying the significant element showing a relatively small value as a new lower limit of the selectable range of the class boundary, and minimizing the cumulative value of the approximation error up to the class boundary And storing the minimum value of the cumulative value of the values and the approximation error in the memory,
When selecting the class boundary, the non-significant element is excluded from calculation of the cumulative value of the approximation error, the stored minimum value is obtained from the memory, and the approximation error is calculated in the selection of the class boundary. Selecting the class boundary that minimizes the sum of the approximation errors for all elements of the class boundary by using a minimum value;
Including a quantization method.
第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置であって、
前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納する近似誤差最小値決定部と、
前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択する上端追跡部と、
を備える量子化装置。
A histogram of an input signal representing a value that can take a range expressed by the first number of levels is represented by an output signal that represents a value that can take a range expressed by the second number of levels less than the first number of levels. A quantization device approximating with a histogram,
Defining a class that is a set of histogram elements of the input signal, limiting class boundary candidates that are boundaries of the class to significant elements, determining upper and lower limits for the significant elements that can be the class boundary, and from the upper limit The significant element included in the range up to the lower limit is determined as the candidate for the class boundary, and the insignificant element in each section having the upper limit of the selectable range as the lower end with respect to the upper limit of the selectable range of the class boundary The position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number of the number of the significant element and the position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class are compared. Quantifying the significant element showing a relatively large value as a new upper limit of the selectable range of the class boundary, and minimizing the cumulative value of the approximation error up to the class boundary An approximate error minimum value determining unit for storing the minimum value of the cumulative value of the values and the approximation error in the memory,
When selecting the class boundary, the non-significant element is excluded from calculation of the cumulative value of the approximation error, the stored minimum value is obtained from the memory, and the approximation error is calculated in the selection of the class boundary. An upper end tracking unit that selects the class boundary that minimizes the sum of the approximation errors for all elements of the class boundary by using a minimum value;
A quantization apparatus comprising:
第1のレベル数で表現される範囲を取り得る値を表す入力信号のヒストグラムを、前記第1のレベル数よりも少ない第2のレベル数で表現される範囲を取り得る値を表す出力信号のヒストグラムで近似する量子化装置のコンピュータに、
前記入力信号のヒストグラムの要素の集合であるクラスを定め、前記クラスの境界であるクラス境界の候補を有意要素に制限し、前記クラス境界となり得る前記有意要素に上限及び下限を定め、前記上限から前記下限までの範囲に含まれる前記有意要素を前記クラス境界の候補と定め、前記クラス境界の選択可能範囲の上限に対して、前記選択可能範囲の上限を下端とする各区間内における非有意要素の連続数の最大値を減算した値に対応する前記有意要素の位置と、前記クラスの上限として取りうる前記有意要素のうち前記選択可能範囲の上限に最も近い前記有意要素の位置とを比較し、相対的に大きな値を示す前記有意要素を前記クラス境界の選択可能範囲の新たな上限と定め、前記クラス境界までの近似誤差の累積値を最小化する量子化値と前記近似誤差の累積値の最小値とをメモリに格納する手順と、
前記クラス境界を選択する際、前記非有意要素を前記近似誤差の累積値の計算から除外し、格納した前記最小値を前記メモリから取得し、前記クラス境界の選択における前記近似誤差の計算に前記最小値を用いることで、前記クラス境界の全ての要素に対して前記近似誤差の総和を最小化する前記クラス境界を選択する手順と、
を実行させるための量子化プログラム。
A histogram of an input signal representing a value that can take a range expressed by the first number of levels is represented by an output signal that represents a value that can take a range expressed by the second number of levels less than the first number of levels. To the computer of the quantizer that approximates with a histogram,
Defining a class that is a set of histogram elements of the input signal, limiting class boundary candidates that are boundaries of the class to significant elements, determining upper and lower limits for the significant elements that can be the class boundary, and from the upper limit The significant element included in the range up to the lower limit is determined as the candidate for the class boundary, and the insignificant element in each section having the upper limit of the selectable range as the lower end with respect to the upper limit of the selectable range of the class boundary The position of the significant element corresponding to the value obtained by subtracting the maximum value of the consecutive number of the number of the significant element and the position of the significant element closest to the upper limit of the selectable range among the significant elements that can be taken as the upper limit of the class are compared. Quantifying the significant element showing a relatively large value as a new upper limit of the selectable range of the class boundary, and minimizing the cumulative value of the approximation error up to the class boundary A step of storing the minimum value of the cumulative value of the values and the approximation error in the memory,
When selecting the class boundary, the non-significant element is excluded from calculation of the cumulative value of the approximation error, the stored minimum value is obtained from the memory, and the approximation error is calculated in the selection of the class boundary. Selecting the class boundary that minimizes the sum of the approximation errors for all elements of the class boundary by using a minimum value;
Quantization program to execute.
JP2016002850A 2016-01-08 2016-01-08 Quantization method, quantization device and quantization program Active JP6538572B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016002850A JP6538572B2 (en) 2016-01-08 2016-01-08 Quantization method, quantization device and quantization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016002850A JP6538572B2 (en) 2016-01-08 2016-01-08 Quantization method, quantization device and quantization program

Publications (2)

Publication Number Publication Date
JP2017123614A true JP2017123614A (en) 2017-07-13
JP6538572B2 JP6538572B2 (en) 2019-07-03

Family

ID=59305880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016002850A Active JP6538572B2 (en) 2016-01-08 2016-01-08 Quantization method, quantization device and quantization program

Country Status (1)

Country Link
JP (1) JP6538572B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116108896A (en) * 2023-04-11 2023-05-12 上海登临科技有限公司 Model quantization method, device, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6065007A (en) * 1998-04-28 2000-05-16 Lucent Technologies Inc. Computer method, apparatus and programmed medium for approximating large databases and improving search efficiency
EP1591963A1 (en) * 2004-04-29 2005-11-02 Mitsubishi Electric Information Technology Centre Europe B.V. Adaptive quantisation of a depth map
US20090089731A1 (en) * 2007-10-01 2009-04-02 Carnegie Mellon Univ. Center For Tech Transfer Tunable integrated circuit design for nano-scale technologies
JP2012004616A (en) * 2010-06-14 2012-01-05 Nippon Telegr & Teleph Corp <Ntt> Adaptive quantization method, adaptive quantization apparatus and adaptive quantization program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6065007A (en) * 1998-04-28 2000-05-16 Lucent Technologies Inc. Computer method, apparatus and programmed medium for approximating large databases and improving search efficiency
EP1591963A1 (en) * 2004-04-29 2005-11-02 Mitsubishi Electric Information Technology Centre Europe B.V. Adaptive quantisation of a depth map
JP2005341555A (en) * 2004-04-29 2005-12-08 Mitsubishi Electric Information Technology Centre Europa Bv Method of representing image or sequence of image, descriptor representing image and method of using the same, apparatus for performing the methods, computer program, and storage medium
US20090089731A1 (en) * 2007-10-01 2009-04-02 Carnegie Mellon Univ. Center For Tech Transfer Tunable integrated circuit design for nano-scale technologies
JP2012004616A (en) * 2010-06-14 2012-01-05 Nippon Telegr & Teleph Corp <Ntt> Adaptive quantization method, adaptive quantization apparatus and adaptive quantization program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
坂東幸浩 他: "Rate constraint型量子化器の最適設計に関する検討", PCSJ/IMPS2015, JPN6018052122, 18 November 2015 (2015-11-18), pages 38-39頁 *
坂東幸浩 他: "信号値の疎性を考慮した動的計画法ベース最適量子化の演算量削減", FIT2015 第14回情報科学技術フォーラム 講演論文集, vol. 第3分冊, JPN6018052121, 24 August 2015 (2015-08-24), pages 273-279頁 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116108896A (en) * 2023-04-11 2023-05-12 上海登临科技有限公司 Model quantization method, device, medium and electronic equipment
CN116108896B (en) * 2023-04-11 2023-07-07 上海登临科技有限公司 Model quantization method, device, medium and electronic equipment

Also Published As

Publication number Publication date
JP6538572B2 (en) 2019-07-03

Similar Documents

Publication Publication Date Title
CN109429071A (en) Picture coding device, picture decoding apparatus and image processing method
CN113795869B (en) Neural network model processing method, device and medium
GB2561824A (en) Encoding and decoding of geometry data in a 3D model based on evaluated regularity of the model
US11531884B2 (en) Separate quantization method of forming combination of 4-bit and 8-bit data of neural network
JP5345977B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
JP2004007535A (en) Image-metadata providing apparatus and its method, and color temperature conversion apparatus for image metadata and its method
JP6538572B2 (en) Quantization method, quantization device and quantization program
JPWO2011111453A1 (en) Encoding method, decoding method, apparatus, program, and recording medium
JP6368287B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
JP2007259306A (en) Predictor and image encoder
JP5426506B2 (en) Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
JP2006501530A (en) Handling boundary information for graphical objects
Sitaram et al. Efficient codebooks for vector quantization image compression with an adaptive tree search algorithm
KR101714278B1 (en) Vector quantization
JPWO2018198454A1 (en) INFORMATION PROCESSING APPARATUS AND INFORMATION PROCESSING METHOD
SE514792C2 (en) Method and apparatus for decoding in channel optimized vector quantization
JP6441833B2 (en) Quantization method, quantization apparatus, and quantization program
Cormier et al. Towards lower precision quantization for pedestrian detection in crowded scenario
Wu et al. Design of optimal fixed-rate unrestricted polar quantizer for bivariate circularly symmetric sources
Chang et al. Novel full-search schemes for speeding up image coding using vector quantization
US9196255B2 (en) Low complexity target vector identification
Ulacha et al. A new fast multi-context method for lossless image coding
JP2000217115A (en) Image coder, its method, image decoder, its method and providing medium
WO2023277128A1 (en) Point cloud decoding device, point cloud decoding method, and program
WO2022239114A1 (en) Encoding and decoding device, encoding and decoding method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190319

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190509

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190606

R150 Certificate of patent or registration of utility model

Ref document number: 6538572

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150