JP5959911B2 - Quantization apparatus and control method thereof - Google Patents

Quantization apparatus and control method thereof Download PDF

Info

Publication number
JP5959911B2
JP5959911B2 JP2012094182A JP2012094182A JP5959911B2 JP 5959911 B2 JP5959911 B2 JP 5959911B2 JP 2012094182 A JP2012094182 A JP 2012094182A JP 2012094182 A JP2012094182 A JP 2012094182A JP 5959911 B2 JP5959911 B2 JP 5959911B2
Authority
JP
Japan
Prior art keywords
scalar
value
quantization
allowable range
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2012094182A
Other languages
Japanese (ja)
Other versions
JP2013223143A (en
Inventor
秀往 松井
秀往 松井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012094182A priority Critical patent/JP5959911B2/en
Publication of JP2013223143A publication Critical patent/JP2013223143A/en
Application granted granted Critical
Publication of JP5959911B2 publication Critical patent/JP5959911B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は画像における画素値等のスカラー量を量子化する技術に関するものである。 The present invention relates to a technique for quantizing the scalar quantity such as your Keru pixel values in the image.

従来から、与えられたスカラー量を、任意に定めたいくつかの代表値のいずれかで近似することで、スカラー量の記録に必要なビット数を削減する量子化技術が知られている。当然ながら、代表値の数が増えるほど、量子化の際の近似誤差は小さくなるが、それに伴い1つのスカラー量を記録するのに必要なビット数は増加する。また、代表値の数が同じであっても、各代表値にどのような値を選択するかによって、量子化によって発生する誤差は変わる。従って、代表値としてどのような値を設定するかが、データを精度良く量子化する為にキーになる。量子化の際、低ビット表現の各値がどの代表値に対応するかの対応関係は表として記録されることが多く、その表を代表値テーブルと呼ぶ。   Conventionally, a quantization technique is known that reduces the number of bits required for recording a scalar quantity by approximating a given scalar quantity with any of several arbitrarily determined representative values. Of course, as the number of representative values increases, the approximation error during quantization decreases, but the number of bits necessary to record one scalar quantity increases accordingly. Even if the number of representative values is the same, an error generated by quantization varies depending on what value is selected for each representative value. Therefore, what value is set as the representative value is a key for accurately quantizing the data. At the time of quantization, the correspondence relationship of which representative value corresponds to each value in the low bit representation is often recorded as a table, and this table is called a representative value table.

量子化を行う場合は、一般に、複数のスカラー量に対して、共通の代表値テーブルを用いる。例えば、グレー画像の場合は各画素の輝度値が1つのスカラー量であり、画像の全画素の輝度値に対して共通の代表値テーブルを用いて量子化することが一般的である。従って、代表値テーブルは、複数のスカラー量に対して、量子化による劣化が小さくなるように定めるのが一般的である。   When quantization is performed, a common representative value table is generally used for a plurality of scalar quantities. For example, in the case of a gray image, the luminance value of each pixel is one scalar quantity, and the luminance value of all the pixels of the image is generally quantized using a common representative value table. Therefore, the representative value table is generally determined so that deterioration due to quantization is reduced for a plurality of scalar quantities.

代表値テーブルの定め方として良く知られた技術に、ロイド―マックス量子化がある(特許文献1)。ロイド―マックス量子化では、各スカラー量と、そのスカラー量を近似する代表値との二乗誤差の和E:   A well-known technique for determining a representative value table is Lloyd-Max quantization (Patent Document 1). In Lloyd-Max quantization, the sum of squared errors E of each scalar quantity and a representative value approximating the scalar quantity E:

Figure 0005959911
を最小にすることを目的にして代表値を定める。ここでsi(i=1,…,K)は量子化対象のスカラー量で、si'は量子化の際に、siを近似するために割り当てられる代表値である。
Figure 0005959911
A representative value is determined for the purpose of minimizing. Here, s i (i = 1,..., K) is a scalar quantity to be quantized, and s i ′ is a representative value assigned to approximate s i during quantization.

特開2005−341555号公報JP-A-2005-341555

既に述べたように、量子化の際に割り当てられる代表値数が決まっている場合は、量子化による劣化は代表値テーブルによって決まる。劣化の基準はロイド―マックス法のように、量子化前のスカラー量と、そのスカラー量を近似する代表値との差を用いるのが一般的である。   As described above, when the number of representative values to be assigned at the time of quantization is determined, deterioration due to quantization is determined by the representative value table. As a criterion for degradation, as in the Lloyd-Max method, it is common to use a difference between a scalar quantity before quantization and a representative value approximating the scalar quantity.

しかし、一方で、劣化をその様な基準で評価するのが適切でない場合も存在する。例えば、画像の各画素の輝度値を量子化する場合には、その画像の中でも重要なオブジェクトを含む注目領域は許容される誤差が小さく、その他の領域は許容される誤差が大きくしたい。   However, on the other hand, there are cases in which it is not appropriate to evaluate degradation based on such criteria. For example, when the luminance value of each pixel of an image is quantized, an allowable area including an important object in the image has a small allowable error, and other areas have a large allowable error.

本発明は上記従来例の課題を顧みてなされたものであり、量子化対象の各スカラー量に対して、割り当てられる代表値の許容範囲を計算し、その許容範囲を考慮して量子化のための複数の代表値を決定する技術を提供しようとするものである。   The present invention has been made in consideration of the above-described problems of the conventional example, and calculates an allowable range of representative values to be assigned to each scalar quantity to be quantized, and performs quantization in consideration of the allowable range. It is intended to provide a technique for determining a plurality of representative values.

この課題を解決するため、例えば本発明の量子化装置は以下の構成を備える。すなわち、
各スカラー量の取り得る値がT1〜TIである、量子化対象のN個のスカラー量S(1)〜S(N)を入力し、各スカラー量を複数の代表値の中の1つで表わすことで、量子化する量子化装置であって、
各スカラー量S(n)(nは1、…、Nのいずれか)の、量子化した際の変化の許容範囲を特定する情報を取得する取得手段と、
前記情報に応じた許容範囲を量子化対象のスカラー量毎に設定する設定手段と、
量子化対象のスカラー量を入力する入力手段と、
該入力手段で入力した着目スカラー量S(n)について、前記設定手段で設定された記着目スカラー量S(n)に対する許容範囲をTmin(n)〜Tmax(n)と表わしたとき、前記着目スカラー量S(n)に対して、前記Tmin(n)〜Tmax(n)で表わされる範囲の複数のスカラー量が入力されたものと見なし、T1〜TIの各値が入力された個数を累積カウントするカウント手段と、
前記入力手段で前記N個のスカラー量を入力した場合の前記カウント手段で求めたT1〜TIのカウント値に従い、前記複数の代表値を決定する決定手段と、
該決定手段で得られた複数の代表値を用いて、前記N個のスカラー量を量子化する量子化手段とを有する。
In order to solve this problem, for example, the quantization apparatus of the present invention has the following configuration. That is,
N scalar quantities S (1) to S (N) to be quantized, each having a value which can be taken by each scalar quantity, are input, and each scalar quantity is one of a plurality of representative values. Representing a quantizer that quantizes,
Obtaining means for obtaining information for specifying an allowable range of change when quantized for each scalar quantity S (n) (n is any one of 1,..., N);
Setting means for setting an allowable range according to the information for each scalar quantity to be quantized;
An input means for inputting a scalar quantity to be quantized;
The interest was entered with the input means scalar S (n), when the allowable range for the set pre-Symbol focused scalar S (n) by the setting unit expressed as Tmin (n) ~Tmax (n) , wherein It is assumed that a plurality of scalar amounts in the range represented by Tmin (n) to Tmax (n) are input with respect to the target scalar amount S (n), and the number of input values of T1 to TI is the number of input. A counting means for cumulatively counting;
Determining means for determining the plurality of representative values according to the count values of T1 to TI obtained by the counting means when the N scalar amounts are input by the input means;
Quantization means for quantizing the N scalar quantities using a plurality of representative values obtained by the determining means.

本発明によれば、量子化対象の各スカラー量に対して、割り当てられる代表値の許容範囲を計算し、その許容範囲を考慮して量子化のための複数の代表値を決定する。この結果、各スカラー量に許容される誤差の特性を反映した量子化を行うことで、量子化に伴う劣化を軽減することが可能になる。   According to the present invention, the allowable range of the assigned representative value is calculated for each scalar quantity to be quantized, and a plurality of representative values for quantization are determined in consideration of the allowable range. As a result, it is possible to reduce the deterioration due to the quantization by performing the quantization reflecting the error characteristic allowed for each scalar quantity.

第1の実施形態の処理内容を示すフローチャート。The flowchart which shows the processing content of 1st Embodiment. 図1のS102の計算方法の詳細を示すフローチャート。The flowchart which shows the detail of the calculation method of S102 of FIG. 図1のS107の詳細を示すフローチャート。The flowchart which shows the detail of S107 of FIG. 量子化対象画像の例を示す図。The figure which shows the example of a quantization object image. 第1の実施形態で求める、許容範囲とカウント値の例を示す図。The figure which shows the example of the tolerance | permissible_range and count value calculated | required in 1st Embodiment. 第2の実施形態の自由視点画像を再生可能なシステムの構成例を示す図。The figure which shows the structural example of the system which can reproduce | regenerate the free viewpoint image of 2nd Embodiment. 多視点画像を撮影するカメラと、被写体の位置関係を示す図。The figure which shows the positional relationship of the camera which image | photographs a multi-viewpoint image, and a to-be-photographed object. 多視点撮影されたカラー画像の例を示す図。The figure which shows the example of the color image image | photographed from multiple viewpoints. 量子化対象となる視差画像を示す図。The figure which shows the parallax image used as quantization object. 視差の許容範囲とカラー画像との関係を説明する図。The figure explaining the relationship between the parallax tolerance | permissible_range and a color image. 第2の実施形態で求める、許容範囲の例を示す図。The figure which shows the example of the tolerance | permissible_range calculated | required by 2nd Embodiment. 第2の実施形態の変形例における、図1のS107の詳細を示すフローチャート。The flowchart which shows the detail of S107 of FIG. 1 in the modification of 2nd Embodiment. 第2の実施形態における図1のS102の詳細を示すフローチャート。The flowchart which shows the detail of S102 of FIG. 1 in 2nd Embodiment. 図13のS1302の詳細を示すフローチャート。14 is a flowchart showing details of S1302 in FIG. 代表値数を自動判定する場合のフローチャート。The flowchart in the case of automatically determining the number of representative values. コンピュータのブロック構成図。The block block diagram of a computer.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。なお、以下説明する各実施形態は、本発明を具体的に実施した場合の例を示すもので、特許請求の範囲に記載の構成の具体的な実施形態の1つである。   Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Each embodiment described below shows an example in the case where the present invention is specifically implemented, and is one of the specific embodiments having the configurations described in the claims.

[第1の実施形態]
本第1の実施形態における量子化装置として機能する情報処理装置のブロック構成図を図16に示す。
[First Embodiment]
A block diagram of an information processing apparatus that functions as a quantizing apparatus according to the first embodiment shown in FIG. 16.

CPU1601は、RAM1602やROM1603に格納されているコンピュータプログラムやデータを用いて、コンピュータ全体の制御を行うと共に、多視点画像符号化装置が行うものとして説明した上述の各処理を実行する。RAM1602は、コンピュータ読み取り可能な記憶媒体の一例である。RAM1602は、外部記憶装置1607や記憶媒体ドライブ1608、更にはネットワークインタフェース1610からロードされたコンピュータプログラムやデータを一時的に記憶するためのエリアを有する。更に、RAM1602は、CPU1601が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM1602は、各種のエリアを適宜提供することができる。ROM1603は、コンピュータ読み取り可能な記憶媒体の一例であり、コンピュータの設定データや、ブートプログラムなどが格納されている。キーボード1604、マウス1605は、コンピュータの操作者が操作することで、各種の指示をCPU1601に対して入力することができる。表示装置1606は、CRTや液晶画面などにより構成されており、CPU1601による処理結果を画像や文字などでもって表示することができる。例えば、上記量子化対象のグレー画像の表示や、量子化した結果の表示ができる。   The CPU 1601 controls the entire computer using computer programs and data stored in the RAM 1602 and the ROM 1603 and executes the above-described processes described as being performed by the multi-viewpoint image encoding apparatus. The RAM 1602 is an example of a computer-readable storage medium. The RAM 1602 has an area for temporarily storing computer programs and data loaded from the external storage device 1607, the storage medium drive 1608, and the network interface 1610. Further, the RAM 1602 has a work area used when the CPU 1601 executes various processes. That is, the RAM 1602 can provide various areas as appropriate. The ROM 1603 is an example of a computer-readable storage medium, and stores computer setting data, a boot program, and the like. The keyboard 1604 and the mouse 1605 can be operated by a computer operator to input various instructions to the CPU 1601. The display device 1606 is configured by a CRT, a liquid crystal screen, or the like, and can display a processing result by the CPU 1601 with an image, text, or the like. For example, the gray image to be quantized can be displayed, and the quantized result can be displayed.

外部記憶装置1607は、コンピュータ読み取り記憶媒体の一例であり、ハードディスクドライブ装置に代表される大容量情報記憶装置である。外部記憶装置1607には、OS(オペレーティングシステム)や、図1に示した各処理をCPU1601に実現させるためのコンピュータプログラムやデータ、上記の各種テーブル、データベース等が保存されている。外部記憶装置1607に保存されているコンピュータプログラムやデータは、CPU1601による制御に従って適宜RAM1602にロードされ、CPU1601による処理対象となる。   The external storage device 1607 is an example of a computer-readable storage medium, and is a large-capacity information storage device represented by a hard disk drive device. The external storage device 1607 stores an OS (Operating System), computer programs and data for causing the CPU 1601 to perform the processes shown in FIG. 1, the above-described various tables, databases, and the like. Computer programs and data stored in the external storage device 1607 are appropriately loaded into the RAM 1602 under the control of the CPU 1601 and are processed by the CPU 1601.

記憶媒体ドライブ1608は、CD−ROMやDVD−ROMなどの記憶媒体に記録されているコンピュータプログラムやデータを読み出し、読み出したコンピュータプログラムやデータを外部記憶装置1607やRAM1602に出力する。なお、外部記憶装置1607に保存されているものとして説明した情報の一部若しくは全部をこの記憶媒体に記録させておき、この記憶媒体ドライブ1608に読み取らせても良い。   The storage medium drive 1608 reads a computer program and data recorded on a storage medium such as a CD-ROM or DVD-ROM, and outputs the read computer program or data to the external storage device 1607 or the RAM 1602. Note that part or all of the information described as being stored in the external storage device 1607 may be recorded on this storage medium and read by this storage medium drive 1608.

I/F1609は、外部から量子化対象のグレー画像を入力するための、インタフェースであり、一例として示すのであればUSB(Universal Serial Bus)である。1610は、上述の各部を繋ぐバスである。   An I / F 1609 is an interface for inputting a gray image to be quantized from the outside, and is USB (Universal Serial Bus) as an example. A bus 1610 connects the above-described units.

上述構成において、本コンピュータの電源がONになると、CPU1601はROM1603に格納されているブートプログラムに従って、外部記憶装置1607からOSをRAM1602にロードする。この結果、キーボード1604、マウス1605を介した情報入力操作が可能となり、表示装置1606にGUIを表示することが可能となる。ユーザが、キーボード1604やマウス1605を操作し、外部記憶装置1607に格納されたグレー画像量子化用のアプリケーションプログラムの起動指示を入力すると、CPU1601はこのプログラムをRAM1602にロードし、実行する。これにより、本コンピュータが画像を量子化する画像処理装置として機能することになる。   In the above configuration, when the computer is turned on, the CPU 1601 loads the OS from the external storage device 1607 to the RAM 1602 according to the boot program stored in the ROM 1603. As a result, an information input operation can be performed via the keyboard 1604 and the mouse 1605, and a GUI can be displayed on the display device 1606. When the user operates the keyboard 1604 or mouse 1605 and inputs an instruction to start an application program for gray image quantization stored in the external storage device 1607, the CPU 1601 loads the program into the RAM 1602 and executes it. Thus, the computer functions as an image processing apparatus that quantizes the image.

以下では、量子化対象の画像データは外部記憶装置1607に既に格納されており、量子化後のデータも外部記憶装置1607にファイルとして格納する例を説明する。だたし、量子化対象の画像データはネットワークからダウンロードしても構わないし、イメージスキャナ等で読み取るものでも構わない。また、量子化後のデータをファイルとして記憶装置に格納するのではなく、ネットワーク上に送信するものとしても構わない。すなわち、量子化対象の画像データの入力源、量子化後の画像データの出力先の種類が本願発明を限定するものではない。   Hereinafter, an example in which image data to be quantized is already stored in the external storage device 1607 and the quantized data is also stored in the external storage device 1607 as a file will be described. However, the image data to be quantized may be downloaded from a network or read by an image scanner or the like. Further, the quantized data may not be stored as a file in the storage device but may be transmitted over the network. That is, the input source of the image data to be quantized and the type of output destination of the image data after quantization do not limit the present invention.

図1は、所定形式の画像データの量子化を行う画像処理装置として機能する場合のCPU1601が実行する手順を示すフローチャートである。以下図1に従って本第1の実施形態による量子化処理を説明する。   FIG. 1 is a flowchart illustrating a procedure executed by the CPU 1601 when functioning as an image processing apparatus that performs quantization of image data in a predetermined format. Hereinafter, the quantization processing according to the first embodiment will be described with reference to FIG.

図4(a)に示すグレー画像の、各画素の輝度値を量子化する場合を例に、注目領域(関心領域)に生じる誤差を抑えることができる量子化方法を示す。代表値の個数は量子化を行う上で、重要なパラメータであるが、本実施形態では簡単のために、3つ代表値の中から選ぶこととする。なお図4(a)のグレー画像の各画素は8ビットで表わされ、その輝度値は0〜255の256階調で表現される。図4(a)の網点領域401は、2つの色が混ざった領域であり、輝度値「249」と輝度値「245」の画素が入り混じっている。同図の横線領域402は、単色の領域であり、全ての画素が輝度値「9」である。同様に斜線領域403は、全ての画素が輝度値「5」の単色領域である。   A quantization method capable of suppressing an error occurring in a region of interest (region of interest) will be described by taking as an example the case where the luminance value of each pixel of the gray image shown in FIG. The number of representative values is an important parameter for quantization, but in the present embodiment, the number of representative values is selected from three representative values for simplicity. Note that each pixel of the gray image in FIG. 4A is represented by 8 bits, and its luminance value is represented by 256 gradations from 0 to 255. A halftone dot region 401 in FIG. 4A is a region in which two colors are mixed, and pixels having a luminance value “249” and a luminance value “245” are mixed. The horizontal line area 402 in FIG. 5 is a monochrome area, and all the pixels have a luminance value “9”. Similarly, the hatched area 403 is a single color area in which all pixels have a luminance value of “5”.

まず、図1のS101では、CPU1601は、量子化対象となるスカラー量を設定する。このステップでは複数のスカラー量を選び、選ばれたスカラー量はこの後の処理により共通の代表値テーブルを用いて量子化される。例えば1枚のグレー画像を共通の代表値テーブルで量子化する場合には、グレー画像の全画素の輝度値が、量子化対象となるスカラー量である。本実施形態では、説明を簡単にするために、図4(a)に示す画像全体ではなく、図4(b)に番号1〜15で示した、1ラインの画素の輝度値を量子化対象とする。   First, in S101 of FIG. 1, the CPU 1601 sets a scalar amount to be quantized. In this step, a plurality of scalar quantities are selected, and the selected scalar quantities are quantized using a common representative value table by subsequent processing. For example, when one gray image is quantized using a common representative value table, the luminance values of all the pixels of the gray image are scalar quantities to be quantized. In this embodiment, in order to simplify the description, not the entire image shown in FIG. 4A but the luminance values of the pixels of one line indicated by numbers 1 to 15 shown in FIG. And

S102では、与えられた量子化対象スカラー量に対して割り当てられる代表値の許容範囲を計算する。ここで本実施形態での許容範囲の定義を説明する。許容範囲とは、量子化に伴う各スカラー量の変化として許容できる範囲であり、許容範囲内の値で近似することができれば劣化が十分に小さいと見なせる範囲のことである。   In S102, an allowable range of representative values assigned to the given quantization target scalar quantity is calculated. Here, the definition of the allowable range in the present embodiment will be described. The allowable range is a range that can be allowed as a change in each scalar amount accompanying quantization, and is a range that can be regarded as sufficiently small if it can be approximated by a value within the allowable range.

本実施形態ではS102において、各画素の輝度値の量子化を行う際に、ユーザが指定する注目領域内の画素であるかどうかに応じて、許容範囲を定める。別の実施形態では、量子化対象のスカラー量と共に装置外部から直接許容範囲が与えられるようにしても構わない。本実施形態におけるS102の詳細を図2に示す。   In the present embodiment, in S102, when the luminance value of each pixel is quantized, an allowable range is determined depending on whether or not the pixel is in a region of interest specified by the user. In another embodiment, the allowable range may be given directly from the outside of the apparatus together with the scalar amount to be quantized. Details of S102 in the present embodiment are shown in FIG.

図2のS201では注目領域の指定を行う。注目領域は画像の中で特に重要であり、量子化による画質劣化を抑えたい領域である。本実施形態では注目領域の指定はユーザからの入力によって成されることを想定する。例えば、量子化対象の画像をディスプレイ等に表示し、タッチパネルやマウス等で画像の一部を囲み込むことにより指定される。以下では図4(a)の領域402、403を含む矩形領域が注目領域として指定されたものとする。S202では量子化対象画像の画素を1つ選択する。S203ではS202で選択した画素がS201で指定された注目領域内にあるかどうかを判定する。S203の判定の結果、注目領域内(関心領域内)の画素であれば、S204において、その画素の輝度値の許容範囲を、輝度値±Dinと設定する。逆に、注目領域外(関心領域外)の画素であれば、S205において、その画素の輝度値の許容範囲を、輝度値±Doutと設定する。当然のことながら、Dout>Din≧0であることが望ましい。本実施形態ではDoutを2、Dinを1に設定したものとする。次にS206では全画素に対して許容範囲を設定したかを判定する。許容範囲を設定していない画素があれば、S202においてその画素を選択して許容範囲を設定する処理を繰り返すことで、全ての画素に対して許容範囲を設定する。   In S201 of FIG. 2, the attention area is designated. A region of interest is particularly important in an image, and is a region where image quality degradation due to quantization is to be suppressed. In the present embodiment, it is assumed that the attention area is specified by an input from the user. For example, the image to be quantized is displayed on a display or the like, and is specified by surrounding a part of the image with a touch panel or a mouse. In the following, it is assumed that a rectangular area including the areas 402 and 403 in FIG. In S202, one pixel of the quantization target image is selected. In S203, it is determined whether or not the pixel selected in S202 is within the attention area specified in S201. As a result of the determination in S203, if the pixel is in the region of interest (within the region of interest), in S204, the allowable range of the luminance value of the pixel is set as the luminance value ± Din. Conversely, if the pixel is outside the region of interest (outside the region of interest), in S205, the allowable range of the luminance value of the pixel is set as the luminance value ± Dout. As a matter of course, it is desirable that Dout> Din ≧ 0. In the present embodiment, it is assumed that Dout is set to 2 and Din is set to 1. In step S206, it is determined whether an allowable range is set for all pixels. If there is a pixel for which the allowable range is not set, the allowable range is set for all the pixels by repeating the process of selecting the pixel and setting the allowable range in S202.

図1のフローチャートの説明に戻る。S103では、S102で求めた許容範囲を利用して、各輝度値のカウント値を求める。以下でカウント値の求め方を詳しく説明する。   Returning to the flowchart of FIG. In S103, the count value of each luminance value is obtained using the allowable range obtained in S102. The method for obtaining the count value will be described in detail below.

まず、S102で求めた各画素の許容範囲から、図5(a)に示すグラフを求める。図5(a)の水平軸はスカラー量(本実施形態の場合は輝度値)、垂直軸は量子化対象のスカラー量に割り振られる番号(本実施形態の場合は画素番号)である。以下、画素番号をiとしたとき、その画素値を画素P(i)と表現する。   First, the graph shown in FIG. 5A is obtained from the allowable range of each pixel obtained in S102. In FIG. 5A, the horizontal axis is a scalar quantity (luminance value in this embodiment), and the vertical axis is a number (pixel number in this embodiment) assigned to the scalar quantity to be quantized. Hereinafter, when the pixel number is i, the pixel value is expressed as pixel P (i).

図5(a)の斜線501は画素P(10)の輝度値が「9」であることを示している。斜線501の左右にある、白い帯は、画素P(10)の許容範囲を示している。画素P(10)は図2のS201において注目領域内に選ばれた画素であり、S204において許容範囲が9±1つまり8〜10に設定されており、白い帯はその範囲にまたがっている。また、斜線502は画素P(4)の輝度値を表しており、その周囲の白い帯が画素P(4)の許容範囲を示している。画素P(4)は注目領域に選ばれなかった画素であるため、許容範囲は249±2つまり247〜251の範囲にまたがっている。図5(a)では他の画素についても同様に、画素の輝度値を斜線で示し、画素の許容範囲を、斜線を内包する白い帯で示した。   A hatched line 501 in FIG. 5A indicates that the luminance value of the pixel P (10) is “9”. White bands on the left and right of the oblique line 501 indicate the allowable range of the pixel P (10). The pixel P (10) is a pixel selected in the attention area in S201 of FIG. 2, and the allowable range is set to 9 ± 1, that is, 8 to 10 in S204, and the white band extends over the range. A hatched line 502 represents the luminance value of the pixel P (4), and the white band around it indicates the allowable range of the pixel P (4). Since the pixel P (4) is a pixel that has not been selected as a region of interest, the allowable range is 249 ± 2, that is, the range of 247 to 251. In FIG. 5 (a), the luminance values of the pixels are indicated by diagonal lines similarly to the other pixels, and the allowable range of the pixels is indicated by white bands including the diagonal lines.

カウント値は、各輝度値を許容範囲に含む画素数を表すもので、図5(a)のグラフで垂直方向に和を取ることで得られる。図5(b)に、図5(a)から導かれる、輝度値毎のカウント値を示す。例えば図5(a)において、輝度値5を許容範囲内に含む画素は、画素P(7)、P(8)、P(9)であるため、図5(b)において、輝度値5のカウント値は「3」になっている。   The count value represents the number of pixels including each luminance value in the allowable range, and is obtained by summing in the vertical direction in the graph of FIG. FIG. 5B shows the count value for each luminance value derived from FIG. For example, in FIG. 5A, the pixels including the luminance value 5 within the allowable range are the pixels P (7), P (8), and P (9). Therefore, in FIG. The count value is “3”.

なお、S103でカウント値を求める際の別の実施形態として、図5(a)のグラフで垂直方向に和を取る際に、重み付けを行っても良い。例えば、図5(a)中の斜線領域は「2」、白い帯の領域は「1」を加算して輝度毎のカウント値を求めても良い。この場合、図5(b)の、輝度毎のカウント値を示すヒストグラムの形状が変わるが、それ以外は、本実施形態と同様の処理を行えばよい。   As another embodiment for obtaining the count value in S103, weighting may be performed when taking the sum in the vertical direction in the graph of FIG. For example, “2” may be added to the hatched area in FIG. 5A and “1” may be added to the white band area to obtain the count value for each luminance. In this case, the shape of the histogram indicating the count value for each luminance in FIG. 5B changes, but otherwise, the same processing as in this embodiment may be performed.

次のS104では代表値を1つ決定する。代表値はカウント値が最も高い輝度値を選ぶ。本実施形態では、図5(b)から明らかなように、「247」を1つ目の代表値に選ぶ。   In the next S104, one representative value is determined. As the representative value, the luminance value having the highest count value is selected. In this embodiment, as is clear from FIG. 5B, “247” is selected as the first representative value.

次のS105ではカウント対象の削減を行う。これは、次の代表値を決める場合に、許容範囲内に代表値がある画素はS103でカウント値を再計算する際に考慮しない為である。本実施形態の場合は、「247」が代表値に既に選ばれている為、「247」を許容範囲に含む画素P(1)〜P(5)、P(11)〜P(15)をカウント対象から削減する。   In the next S105, the count target is reduced. This is because when determining the next representative value, pixels having a representative value within the allowable range are not considered when recalculating the count value in S103. In this embodiment, since “247” has already been selected as the representative value, the pixels P (1) to P (5) and P (11) to P (15) that include “247” in the allowable range are included. Reduce from counting.

次のS106では、代表値が目標数に達した、或いは、カウント対象の画素が無くなった、いずれかを満たすかを判定する。本実施形態では先に述べた通り、代表値を3つ選ぶ必要があり、まだ1つしか選んでいず、且つ、カウント対象の画素も未だ残っているので、この条件を満たさず、S106の判定は偽(False)となり、再びS103に戻る。   In next step S106, it is determined whether the representative value has reached the target number or the pixel to be counted has been eliminated. In the present embodiment, as described above, it is necessary to select three representative values, and since only one is selected and the pixels to be counted still remain, this condition is not satisfied, and S106 The determination is false (False), and the process returns to S103 again.

2つ目以降の代表値を選ぶ処理は、基本的にはS103〜S105の処理を1つ目の代表値を決めた際と同様に行えば良い。2週目以降の違いは、既に述べた通り、S103でカウント値の計算を行う際に、S105でカウント対象から削減した画素を無視する点である。例えば本実施形態で、2つ目の代表値を求める際に、S103で求めるカウント値は図5(c)になる。図5(c)は、図5(a)において、1つ目の代表値247によって許容範囲内の誤差で近似できなかった画素P(6)〜P(10)のみを対象に、カウント値を求めたものである。このカウント値が最大になる輝度値を、S104で代表値に決定すれば良い。なお、図5(c)ではカウント値が最大になる輝度値が4、5、6の3つ存在する。このように、カウント値が最大となる輝度値、つまり、代表値の候補が複数存在する場合の処理を補足する。例えば、代表値の候補それぞれに対して、代表値の候補と、その代表値の候補を許容範囲内に含む画素の、量子化前の輝度値、との差分の二乗和を計算し、その結果が最も小さいものを代表値として選ぶ方法が考えられる。本実施形態の場合は、代表値の候補である輝度値4、5、6は全て、画素7、8、9の許容範囲に含まれており、画素7、8、9の量子前の輝度値5との差分の二乗和が最小になる輝度値5が、2つ目の代表値に選ばれる。   The process of selecting the second and subsequent representative values may be basically performed in the same manner as when the first representative value is determined in steps S103 to S105. As described above, the difference after the second week is that when the count value is calculated in S103, the pixels reduced from the count target in S105 are ignored. For example, in this embodiment, when obtaining the second representative value, the count value obtained in S103 is as shown in FIG. FIG. 5C shows a count value for only the pixels P (6) to P (10) that cannot be approximated by an error within the allowable range by the first representative value 247 in FIG. 5A. It is what I have sought. The luminance value that maximizes the count value may be determined as a representative value in S104. In FIG. 5C, there are three luminance values 4, 5, and 6 that maximize the count value. In this way, a supplementary description will be made of the processing in the case where there are a plurality of candidates for the luminance value with the maximum count value, that is, the representative value. For example, for each representative value candidate, the sum of squares of the difference between the representative value candidate and the luminance value before quantization of the pixel that includes the representative value candidate within the allowable range is calculated. A method of selecting the smallest value as the representative value is conceivable. In the case of this embodiment, the luminance values 4, 5, and 6 that are candidates for representative values are all included in the allowable range of the pixels 7, 8, and 9, and the luminance values before the quantum of the pixels 7, 8, and 9 The luminance value 5 that minimizes the sum of squares of the difference from 5 is selected as the second representative value.

以上の処理を繰り返すと、「247」、「5」、「9」の順に代表値が選ばれる。そしてS106の判定が真(true)と判定される。この場合、次にS107に進み、各画素の輝度値を代表値に置き換えることで、量子化する。本実施形態でのS107の詳細を図3に示す。   When the above processing is repeated, representative values are selected in the order of “247”, “5”, and “9”. Then, the determination in S106 is determined to be true. In this case, the process proceeds to S107, and quantization is performed by replacing the luminance value of each pixel with a representative value. Details of S107 in the present embodiment are shown in FIG.

S301では、各画素に対して、許容範囲内に代表値があるかを判定する。許容範囲は当然、S102で求めたものを用いる。許容範囲内に代表値がある場合はS302に、無い場合はS303に進む。   In S301, it is determined whether each pixel has a representative value within an allowable range. Naturally, the allowable range is obtained in S102. If there is a representative value within the allowable range, the process proceeds to S302; otherwise, the process proceeds to S303.

S302では、許容範囲内にある代表値を割り当てる。この際、許容範囲内に複数の代表値がある場合は、量子化前の輝度値に最も近い代表値を割り当てる。S303では、許容範囲に代表値が存在しないため、許容範囲外にある代表値のうち、量子化前の輝度値に最も近い代表値を割り当てる。   In S302, a representative value within the allowable range is assigned. At this time, if there are a plurality of representative values within the allowable range, the representative value closest to the luminance value before quantization is assigned. In S303, since there is no representative value in the allowable range, a representative value closest to the luminance value before quantization is assigned among the representative values outside the allowable range.

なお、図3の量子化処理であるが、量子化結果の画像データのデータ量を削減する場合には、代表値「5」、「9」、「247」を2ビットで00、01、10と表現し、量子化対象の画素値(8ビット)を、最も近い代表値を表わす2ビットのデータで置換したファイルを生成する。この場合、ファイルヘッダには、00、01、10に対して、画素値5、9、247を割り当てることを示す情報を格納すれば良い。   In the quantization process of FIG. 3, when reducing the amount of image data of the quantization result, the representative values “5”, “9”, and “247” are 00, 01, 10 in 2 bits. And a file in which the pixel value to be quantized (8 bits) is replaced with 2-bit data representing the closest representative value is generated. In this case, information indicating that pixel values 5, 9, 247 are assigned to 00, 01, 10 may be stored in the file header.

以上、図1のフローチャートに基づいて、本発明における量子化の方法を説明した。上記実施形態では、量子化対象のスカラー量が図4(b)に示すように15個の画素値であり、許容範囲も±1、±2の例であったが、これはあくまで一例であることに留意願いたい。   The quantization method in the present invention has been described above based on the flowchart of FIG. In the above embodiment, the scalar quantity to be quantized is 15 pixel values as shown in FIG. 4B and the allowable range is ± 1, ± 2, but this is only an example. Please note that.

なお、図1のフローチャートの説明で述べたように、S103、S105では、2つ目以降の代表値を求める際に、S105でカウント対象を削減し、S103でカウント値を再計算することでカウント値を再計算した。しかし、このカウント値の再計算までを量子化装置に含めることが、必ずしも必要とは限らない。例えば、S104で1つ目の代表値を決めた際に、その周囲±1画素の範囲のカウント値を0で上書きし、そのカウント値によって2つ目の代表値を定めることもできる。ここで、周囲±1画素のカウント値を0にしたのは、本実施例で最も高精度に量子化したい着目領域の許容範囲が±1だったことに由来する。このように、2つ目以降の代表値を定める際のカウント値の再計算方法を変えたとしても、本発明の特徴であるカウント値を利用した代表値の決定方法を利用することは可能である。   As described in the description of the flowchart of FIG. 1, in S103 and S105, when obtaining the second and subsequent representative values, the count target is reduced in S105, and the count value is recalculated in S103. The value was recalculated. However, it is not always necessary to include in the quantizer until the count value is recalculated. For example, when the first representative value is determined in S104, the count value of the surrounding ± 1 pixel range can be overwritten with 0, and the second representative value can be determined by the count value. Here, the reason why the count value of the surrounding ± 1 pixel is set to 0 is derived from the fact that the permissible range of the region of interest to be quantized with the highest accuracy in this embodiment is ± 1. As described above, even if the count value recalculation method for determining the second and subsequent representative values is changed, it is possible to use the representative value determination method using the count value, which is a feature of the present invention. is there.

従って本実施形態における技術思想を一般化した場合の量子化装置は、以下の構成を有することになる。すなわち、
各スカラー量の取り得る値がT1〜TIである、量子化対象のN個のスカラー量S(1)〜S(N)を入力し、各スカラー量を複数の代表値の中の1つで表わすことで、量子化する量子化装置であって、
各スカラー量S(n)(nは1、…、Nのいずれか)の、量子化した際の変化の許容範囲を特定する情報を取得する取得手段と、
量子化対象のスカラー量を入力する入力手段と、
該入力手段で入力した着目スカラー量S(n)について、前記取得手段で取得した情報が示す前記着目スカラー量S(n)に対する許容範囲をTmin(n)〜Tmax(n)と表わしたとき、前記着目スカラー量S(n)に対して、前記Tmin(n)〜Tmax(n)で表わされる範囲の複数のスカラー量が入力されたものと見なし、T1〜TIの各値が入力された個数を累積カウントするカウント手段と、
前記入力手段で前記N個のスカラー量を入力した場合の前記カウント手段で求めたT1〜TIのカウント値に従い、前記複数の代表値を決定する決定手段と、
該決定手段で得られた複数の代表値を用いて、前記N個のスカラー量を量子化する量子化手段とを有する構成とすれば良い。
Therefore, the quantization apparatus when the technical idea in the present embodiment is generalized has the following configuration. That is,
N scalar quantities S (1) to S (N) to be quantized, each having a value which can be taken by each scalar quantity, are input, and each scalar quantity is one of a plurality of representative values. Representing a quantizer that quantizes,
Obtaining means for obtaining information for specifying an allowable range of change when quantized for each scalar quantity S (n) (n is any one of 1,..., N);
An input means for inputting a scalar quantity to be quantized;
When the allowable range for the target scalar amount S (n) indicated by the information acquired by the acquisition unit is expressed as Tmin (n) to Tmax (n) for the target scalar amount S (n) input by the input unit, It is assumed that a plurality of scalar amounts in the range represented by Tmin (n) to Tmax (n) are input with respect to the target scalar amount S (n), and the number of input values of T1 to TI. Counting means for cumulatively counting,
Determining means for determining the plurality of representative values according to the count values of T1 to TI obtained by the counting means when the N scalar amounts are input by the input means;
What is necessary is just to set it as the structure which has the quantization means which quantizes said N scalar quantity using the some representative value obtained by this determination means.

[第2の実施形態]
本第2の実施形態では、自由視点画像合成に用いる、距離画像の量子化を行う例を示す。
[Second Embodiment]
In the second embodiment, an example of quantizing a distance image used for free viewpoint image synthesis will be described.

まず自由視点画像合成と距離画像について概要を説明する。自由視点画像合成とは、カメラ等の撮影装置を用いて、或る視点から画像を撮影し、その視点の画像を利用して、実際には撮影を行っていない別の視点から見える画像を合成する技術である。自由視点画像合成の手法の1つに、距離画像を利用する方法が知られている。距離画像とは撮影した視点の各画素の距離情報が格納された画像である。距離画像があれば、撮影した被写体の3次元空間上の座標が特定できるため、別の視点から見た際に、被写体が画像上のどこの位置に写るかを推測することができる。   First, an outline of the free viewpoint image synthesis and the distance image will be described. Free viewpoint image composition is to shoot an image from a certain viewpoint using a camera or other imaging device, and synthesize an image that can be seen from another viewpoint that is not actually photographed. Technology. A method using a distance image is known as one of free viewpoint image synthesis methods. A distance image is an image in which distance information of each pixel of a photographed viewpoint is stored. If there is a distance image, the coordinates of the photographed subject in the three-dimensional space can be specified, so it can be estimated where the subject appears in the image when viewed from another viewpoint.

距離画像の取得には大きく分けてアクティブ方式とパッシブ方式がある。アクティブ方式は被写体にレーザーなどを照射することで距離を取得する方式で、代表的なものとしてレーザーが往復してくるまでの時間から距離を推測するタイムオブフライト方式がある。パッシブ方式は撮影した画像を用いて距離を取得する方式で、代表的なものとして、異なる2視点の撮影画像を用いるステレオマッチング法がある。   There are an active method and a passive method for obtaining a distance image. The active method is a method of acquiring a distance by irradiating a subject with a laser or the like. As a representative method, there is a time-of-flight method of estimating the distance from the time until the laser reciprocates. The passive method is a method of acquiring a distance using a photographed image, and a typical example is a stereo matching method using photographed images from two different viewpoints.

アクティブ取得した距離画像を用いて自由視点画像合成を行う場合は、撮影した多視点画像に加えて、アクティブ取得した距離画像の符号化を行う必要がある。距離画像をパッシブ取得する場合は、多視点画像から距離画像を取得することができるため距離画像の符号化は不要である。しかし、再生時の処理負荷低減などを目的に、撮影時に距離画像のパッシブ取得を行って符号化し、再生時には距離画像の再取得を行わない場合は、やはり距離画像の符号化が必要となる。   When free viewpoint image composition is performed using an actively acquired distance image, it is necessary to encode an actively acquired distance image in addition to the captured multi-viewpoint image. When the distance image is passively acquired, it is not necessary to encode the distance image because the distance image can be acquired from the multi-viewpoint image. However, for the purpose of reducing the processing load at the time of reproduction or the like, if the distance image is passively acquired and encoded at the time of shooting and the distance image is not re-acquired at the time of reproduction, the distance image needs to be encoded.

自由視点画像合成に用いられる距離画像は、視差画像の形で符号化されることが多い。視差とは、異なる2つの視点で同一の被写体(点)を撮影した際に、一方の視点に映った点が、もう一方の視点での撮影画像のどこに写っているかを示す量である。一般には異なる画像間で、同一の被写体が写っている点(以下、対応点)同士が何画素ずれているかで表現される。より具体的には、光軸が平行で、水平軸に沿った左右にb(mm)の間隔で並べた2つのカメラで、撮影面(光軸に垂直かつ、2つのカメラを通る平面)からz(mm)離れた点を撮影した場合、2つの撮影画像内の対応点の視差d(pix)は、
d=bfW/(zC) …(式1)
である。ここで,fはカメラの焦点距離(mm)、Wは撮影画像の幅(pix)、Cは撮影素子の幅(mm)である。なお、カメラが左右に正確に配置されている場合は、対応点の垂直方向の視差は0であることが保証できる(エピポーラ拘束)。従ってここで説明した視差は、対応点同士の水平方向のずれを示していることになる。
A distance image used for free viewpoint image composition is often encoded in the form of a parallax image. The parallax is an amount indicating where a point reflected in one viewpoint is captured in a captured image at the other viewpoint when the same subject (point) is captured from two different viewpoints. In general, it is expressed by how many pixels the points (hereinafter referred to as corresponding points) in which the same subject appears in different images are shifted. More specifically, the two optical cameras are parallel to each other and arranged at an interval of b (mm) on the left and right along the horizontal axis, from the photographing surface (a plane perpendicular to the optical axis and passing through the two cameras). When a point separated by z (mm) is photographed, the parallax d (pix) of the corresponding points in the two photographed images is
d = bfW / (zC) (Formula 1)
It is. Here, f is the focal length (mm) of the camera, W is the width (pix) of the captured image, and C is the width (mm) of the imaging element. When the cameras are accurately arranged on the left and right, it can be ensured that the vertical parallax of the corresponding points is 0 (epipolar constraint). Therefore, the parallax described here indicates a horizontal shift between corresponding points.

以上で、自由視点画像合成と、距離画像の概要についての説明を終える。以下では自由視点画像合成に用いる距離画像を、視差画像として符号化することを前提に、視差画像の量子化方法を説明する。   This completes the description of the free viewpoint image composition and the outline of the distance image. Hereinafter, a parallax image quantization method will be described on the assumption that a distance image used for free viewpoint image synthesis is encoded as a parallax image.

ここで視差画像の性質について補足をする。視差を近似する際には、特に、その視差画像と同一の視点から撮影されたカラー画像の、エッジ付近の精度が重要である。既に述べたように、視差画像とは、異なる画像間の対応画素がどれだけずれているかを示す情報である。視差を用いて自由視点画像合成を行う際には、画像を合成したい視点の位置と、視差の大きさに応じて、撮影した視点の画像の画素をずらす(ワープさせる)ことで行う。従って視差が変わるということは、自由視点画像合成においては、ある画素を、本来のワープ先とは別の位置にワープさせることを意味する。色の変化が僅かな領域では、本来の位置とずれた位置にワープさせても、見た目上の劣化は小さい。一方で、カラー画像のエッジ付近でワープ先を間違えると、自由視点画像上のある画素の色が、本来あるべき色と大きく異なる色になるため、劣化が目立つ。従って、視差画像を符号化する際には、カラー画像のエッジ付近程高い精度が必要となる。   Here, it supplements about the property of a parallax image. When approximating the parallax, the accuracy near the edge of the color image taken from the same viewpoint as the parallax image is particularly important. As already described, the parallax image is information indicating how much the corresponding pixels between different images are shifted. When performing free viewpoint image composition using parallax, pixels of the captured viewpoint image are shifted (warped) in accordance with the position of the viewpoint where the image is to be synthesized and the magnitude of the parallax. Therefore, the change in parallax means that in free viewpoint image synthesis, a certain pixel is warped to a position different from the original warp destination. In a region where the color change is slight, even if the warp is made to a position shifted from the original position, the apparent deterioration is small. On the other hand, if the warp destination is wrong in the vicinity of the edge of the color image, the color of a certain pixel on the free viewpoint image becomes significantly different from the color that should originally be, and thus deterioration is conspicuous. Therefore, when encoding a parallax image, higher accuracy is required near the edge of the color image.

本第2の実施形態で想定するシステムを図6に示す。図6は撮影装置による画像の撮影から、撮影画像を用いて、自由視点画像合成結果を表示するまでの各部の構成と、データの流れを示したものである。   The system assumed in the second embodiment is shown in FIG. FIG. 6 shows the configuration of each part from the shooting of an image by the shooting apparatus to the display of the free viewpoint image synthesis result using the shot image, and the data flow.

まず撮影部601、602、603においてカラー画像を撮影する。撮影は光軸が平行で、左、中央、右に並べた3つのデジタルカメラで行う。左視点の画像をI1、中央視点の画像をI2、右視点の画像をI3として示している。   First, a color image is photographed by the photographing units 601, 602, and 603. Photographing is performed with three digital cameras having parallel optical axes and arranged on the left, center, and right. The left viewpoint image is indicated by I1, the central viewpoint image is indicated by I2, and the right viewpoint image is indicated by I3.

次に視差画像生成部604では画像I2の視差画像S2を生成する。視差画像はI1、I2、I3を用いて、ステレオマッチング法により求める。ここで、3枚の画像を使ったステレオマッチング法について補足する。既に述べたように、ステレオマッチング法は基本的には2つの画像を用いて視差を求める手法である。しかし、I2とI1、I2とI3の組み合わせでそれぞれステレオマッチングを行い、最後に2つの結果を統合することにより、より正確にI2の視差を求める手法が知られており、ここでもその様な手法を用いることを想定する。もちろん、アクティブ方式によって、被写体までの距離を計測し、(式1)に従って視差を求めても良い。   Next, the parallax image generation unit 604 generates a parallax image S2 of the image I2. The parallax image is obtained by the stereo matching method using I1, I2, and I3. Here, it supplements about the stereo matching method using three images. As already described, the stereo matching method is basically a method for obtaining parallax using two images. However, there is known a method for obtaining the I2 parallax more accurately by performing stereo matching with combinations of I2 and I1, and I2 and I3, and finally integrating the two results. Is assumed to be used. Of course, the distance to the subject may be measured by the active method, and the parallax may be obtained according to (Equation 1).

次に視差画像量子化部605では視差画像の量子化を行う。本実施形態における特徴は視差画像量子化部605での量子化処理であり、後で詳しく説明する。量子化の結果、S2が低ビット表現に量子化された視差画像S2’と、代表値テーブルT2を得る。   Next, the parallax image quantization unit 605 quantizes the parallax image. A feature in the present embodiment is a quantization process in the parallax image quantization unit 605, which will be described in detail later. As a result of the quantization, a parallax image S2 'obtained by quantizing S2 into a low bit representation and a representative value table T2 are obtained.

次に、符号化部C1、C2、C3ではそれぞれI2、S2’、T2を符号化する。符号化には例えばZIP等の可逆圧縮を用いれば良い。これら符号化データを送信部606から送信する。自由視点画像を生成する装置では、その受信部607で上記の符号化データを受信し、復号部D1、D2、D3にてそれぞれI2、S2’、T2を復号する。次に逆量子化部608においてS2’を逆量子化した視差画像S2''を得る。   Next, the encoding units C1, C2, and C3 encode I2, S2 ', and T2, respectively. For encoding, lossless compression such as ZIP may be used. These encoded data are transmitted from the transmission unit 606. In the apparatus that generates the free viewpoint image, the reception unit 607 receives the encoded data, and the decoding units D1, D2, and D3 decode I2, S2 ', and T2, respectively. Next, the inverse quantization unit 608 obtains a parallax image S2 ″ obtained by inversely quantizing S2 ′.

最後に、自由視点画像合成部609においてカラー画像I2と視差画像S2''を用いて自由視点画像合成を行い、自由視点画像I4を再生する。本第2の実施形態では自由視点画像I4は、右視点を撮影したカメラと左視点を撮影したカメラを結んだ直線上の、いずれかに配置された視点の画像であることを想定する。従って、視差画像量子化部605でも、その範囲内にある視点から見た画像を合成する際に、視差画像の量子化による画質劣化の影響が少なくなるように量子化を行う。   Finally, the free viewpoint image composition unit 609 performs free viewpoint image composition using the color image I2 and the parallax image S2 '' to reproduce the free viewpoint image I4. In the second embodiment, it is assumed that the free viewpoint image I4 is an image of a viewpoint arranged on any one of the straight lines connecting the camera capturing the right viewpoint and the camera capturing the left viewpoint. Therefore, the parallax image quantization unit 605 also performs quantization so as to reduce the influence of image quality deterioration due to quantization of the parallax image when synthesizing an image viewed from a viewpoint within the range.

以下では本第2の実施形態の特徴である、視差画像量子化部605の詳細を説明する。   Details of the parallax image quantization unit 605, which is a feature of the second embodiment, will be described below.

まず、図6に示した、視差画像量子化部605への入力である、カラー画像I1、I2、I3と、視差画像S2について説明する。本実施形態ではカラー画像I1、I2、I3はデジタルカメラによる撮影画像とする。本実施形態で入力するカラー画像の、被写体とカメラの位置関係を図7に示す。カメラ701〜703が、図6における撮影部601、602、603に対応するものであって、それぞれがカラー画像I1、I2、I3を生成するものである。カメラ701〜703は撮影面708上に並んでおり、カメラの光軸は全て撮影面708に垂直であるものとする。これら3台のカメラで平面704〜707を撮影する。これら4つの平面は全て撮影面708と平行であり、撮影面708からの距離は(式1)に従って視差に換算すると、平面704が視差6、平面705、706が視差4、平面707が視差1である。平面704〜707はそれぞれ単色の平面であり、平面704〜706が黒色、平面707が白色であるとする。以上、図7を用いて述べた条件の下で撮影されたカラー画像I1、I2、I3をそれぞれ図8(a)、(b)、(c)に示す。図8(a)、(b)、(c)には当然、平面704、705、706、707が写っており、それらが画像のどの部分に対応するかは図8内に示した。図8中の黒い領域は平面704、705、706からなっており、全て黒色で同一の色であるため、図8内では白色の点線で区切ることで平面間の区切れを示したが、実際のカラー画像には白色の点線は存在しない。また図8の白色の領域は全て平面707である。図8(b)の視差画像S2を図9に示す。当然ながら、斜線領域901、横線領域902、横線領域903、白色領域904がそれぞれ平面704、705、706、707に対応しており、それぞれの視差は6、4、4、1である。既に述べたように、視差画像S2はI2上の各画素の対応点が、I1もしくはI3のどの点であるかを、I2上の画素の位置から左右に何画素ずれているかで表現したものである。なお、I1上にある対応点は必ずI2上の対応点の右側にあり、I3上にある対応点は必ずI2上の対応点の左側にあることは、カメラ配置から必然的に定まる。   First, the color images I1, I2, and I3 and the parallax image S2 that are inputs to the parallax image quantization unit 605 illustrated in FIG. 6 will be described. In this embodiment, the color images I1, I2, and I3 are taken by a digital camera. FIG. 7 shows the positional relationship between the subject and the camera in the color image input in this embodiment. The cameras 701 to 703 correspond to the imaging units 601 602 603 in FIG. 6, and generate color images I1, I2, and I3, respectively. The cameras 701 to 703 are arranged on the photographing surface 708, and the optical axes of the cameras are all perpendicular to the photographing surface 708. The planes 704 to 707 are photographed with these three cameras. These four planes are all parallel to the imaging plane 708, and the distance from the imaging plane 708 is converted to parallax according to (Equation 1), the plane 704 is parallax 6, the planes 705 and 706 are parallax 4, and the plane 707 is parallax 1. It is. The planes 704 to 707 are monochromatic planes, and the planes 704 to 706 are black and the plane 707 is white. The color images I1, I2, and I3 photographed under the conditions described with reference to FIG. 7 are shown in FIGS. 8A, 8B, and 8C, respectively. Naturally, planes 704, 705, 706, and 707 are shown in FIGS. 8A, 8B, and 8C, and the corresponding portions of the images are shown in FIG. The black area in FIG. 8 is made up of planes 704, 705, and 706, all of which are black and the same color. In FIG. There is no white dotted line in the color image. In addition, the white area in FIG. FIG. 9 shows the parallax image S2 of FIG. Naturally, the hatched area 901, the horizontal line area 902, the horizontal line area 903, and the white area 904 correspond to the planes 704, 705, 706, and 707, respectively, and the parallaxes are 6, 4, 4, and 1, respectively. As described above, the parallax image S2 represents which point of the corresponding point of each pixel on I2 is I1 or I3 by how many pixels are shifted to the left and right from the position of the pixel on I2. is there. It is inevitably determined from the camera arrangement that the corresponding point on I1 is always on the right side of the corresponding point on I2, and the corresponding point on I3 is always on the left side of the corresponding point on I2.

次に、視差画像量子化部605の処理の詳細を説明する。基本的な処理の流れは実施形態1で示した図1と同様である。第1の実施形態との主な違いはS102の許容範囲の計算方法である。以下では図1に沿って、S102を中心に、第1の実施形態と違う部分に絞って説明する。   Next, details of the processing of the parallax image quantization unit 605 will be described. The basic processing flow is the same as that shown in FIG. The main difference from the first embodiment is the allowable range calculation method in S102. In the following, with reference to FIG. 1, the description will focus on S102 and focus on the differences from the first embodiment.

まず、S101では量子化対象スカラー量として、視差画像S2を設定する。本実施形態では、説明の簡単のために、図9に示す如く、d1〜d22の1ラインの視差値を量子化対象のスカラー量とする。   First, in S101, a parallax image S2 is set as a quantization target scalar quantity. In the present embodiment, for simplicity of explanation, as shown in FIG. 9, the parallax values of one line d1 to d22 are set as a scalar quantity to be quantized.

次にS102では許容範囲の計算を行う。本実施形態の特徴は視差画像S2の許容範囲の計算に、カラー画像I1、I2、I3を用いる。S102の許容範囲の計算の詳細を図13に示す。図13のS1301では視差画像S2の中で、量子化対象となっている視差d1〜d22から1つ選ぶ。ここではdi(i=1,・・・,22)を選んだとする。S1302では、I1とI2を用いて視差diの許容範囲を計算する。この処理の詳細は後に図14を用いて説明する。同様にS1303ではI3とI2を用いて許容範囲を計算する。次にS1304では、S1302とS1303で算出された許容範囲を統合する。統合の際に、両方の許容範囲に含まれている範囲のみを、diの許容範囲とする。次にS1305において、d1〜d22の全ての許容範囲を計算したかを判定する。許容範囲を計算していない画素があればS1301に戻り、全ての画素の許容範囲を求めるまでくり返し、終了する。   Next, in S102, the allowable range is calculated. A feature of the present embodiment is that color images I1, I2, and I3 are used for calculation of the allowable range of the parallax image S2. Details of the calculation of the allowable range in S102 are shown in FIG. In S1301 of FIG. 13, one of the parallax images S2 is selected from the parallaxes d1 to d22 to be quantized. Here, it is assumed that di (i = 1,..., 22) is selected. In S1302, the allowable range of the parallax di is calculated using I1 and I2. Details of this processing will be described later with reference to FIG. Similarly, in S1303, the allowable range is calculated using I3 and I2. In step S1304, the allowable ranges calculated in steps S1302 and S1303 are integrated. At the time of integration, only the range included in both allowable ranges is set as the allowable range of di. In step S1305, it is determined whether all allowable ranges of d1 to d22 have been calculated. If there is a pixel for which the allowable range has not been calculated, the process returns to S1301, and the process is repeated until the allowable range of all pixels is obtained.

ここでS1302におけるI1とI2を用いた許容範囲の算出方法について図14を用いて説明する。上で述べたようにS1302の目的は視差diの許容範囲を求めることである。そこで、S1302ではdiの許容範囲の最大値をdmax、最小値をdminとし、dmaxとdminを求める。以下ではdiの許容範囲を求める処理を説明する。なお、以下で、ciはカラー画像I2上の画素であり、視差diと同じ位置にある画素とする。   Here, a calculation method of the allowable range using I1 and I2 in S1302 will be described with reference to FIG. As described above, the purpose of S1302 is to obtain an allowable range of the parallax di. Therefore, in S1302, dmax and dmin are obtained by setting dmax as the maximum value of the allowable range of di and dmin as the minimum value. Hereinafter, a process for obtaining the allowable range of di will be described. In the following, ci is a pixel on the color image I2, and is a pixel at the same position as the parallax di.

まず、図14のS1401ではdmaxとdminをdiで初期化する。S1402では、ciのI1上の対応点をcrefとする。当然ながらcrefはI1上で、画素ciの位置から、視差diだけ右にずらした点である。次にS1403ではcrefを右に1ずらす。次にS1404では画素ciと画素crefの色の差が閾値以下かを判定する。例えば本実施形態では、RGB各色を256階調で表し、各色の差分の絶対値の和が20以下であるかどうかを判定する。S1404で色の差が閾値以下の場合は、S1405でdmaxをcrefとciの視差に更新し、S1403〜S1404を繰り返す。S1402からS1406を終えると、I1上のciの対応点の右側で、ciと近い色を持った画素がある範囲が求まり、その範囲内で一番左の画素とciとの視差がdmaxとして求まる。同様にS1406〜S1408を繰り返すことで、I1上のciの対応点の左側で、ciと近い色を持った画素がある範囲が求まり、その範囲内で一番左の画素と、ciとの視差がdminとして求まる。最後S1410ではdmaxとdminを、図13のS1302における、I1とI2を用いた許容範囲として出力する。具体例として、図10に、I1とI2を用いて算出した、d7の視差の許容範囲を示す。図10の左側がカラー画像I1、右側がカラー画像I2である。I1の対応点1001が、I2の画素c7の、視差d7によって定まる対応点である。対応点1001から右側に伸びた白色矢印の先にある画素と、c7との視差がdmaxである。また、対応点1001から左側に伸びた白色矢印の先にある画素と、c7との視差がdminである。   First, in S1401 of FIG. 14, dmax and dmin are initialized with di. In S1402, the corresponding point on ci I1 is set to cref. Of course, cref is the point shifted to the right by the parallax di from the position of the pixel ci on I1. Next, in S1403, cref is shifted by 1 to the right. In step S1404, it is determined whether the color difference between the pixel ci and the pixel cref is equal to or less than a threshold value. For example, in this embodiment, each RGB color is represented by 256 gradations, and it is determined whether or not the sum of absolute values of differences between the colors is 20 or less. If the color difference is equal to or smaller than the threshold value in S1404, dmax is updated to the disparity of cref and ci in S1405, and S1403 to S1404 are repeated. When S1402 to S1406 are completed, a range having a pixel having a color close to ci is obtained on the right side of the corresponding point of ci on I1, and the parallax between the leftmost pixel and ci in the range is obtained as dmax. . Similarly, by repeating S1406 to S1408, a range where there is a pixel having a color close to ci on the left side of the corresponding point of ci on I1 is obtained, and the parallax between the leftmost pixel in the range and ci Is obtained as dmin. In the last S1410, dmax and dmin are output as allowable ranges using I1 and I2 in S1302 of FIG. As a specific example, FIG. 10 shows the allowable range of d7 parallax calculated using I1 and I2. The left side of FIG. 10 is the color image I1, and the right side is the color image I2. The corresponding point 1001 of I1 is a corresponding point determined by the parallax d7 of the pixel c7 of I2. The parallax between the pixel at the tip of the white arrow extending to the right from the corresponding point 1001 and c7 is dmax. The parallax between the pixel at the tip of the white arrow extending to the left from the corresponding point 1001 and c7 is dmin.

S1303では、S1302と同様に、I3とI2を用いた許容範囲の算出を行う。S1303は基本的には図14を用いて説明した手順と同様の事を行う。ただし、S1403でcrefを右にずらす処理を、左にずらす処理に入れ替え、S1408でcrefを左にずらす処理を、右にずらす処理に入れ替える必要がある。   In S1303, similar to S1302, the allowable range is calculated using I3 and I2. In step S1303, basically the same procedure as described with reference to FIG. 14 is performed. However, the process of shifting cref to the right in S1403 needs to be replaced with the process of shifting to the left, and the process of shifting cref to the left in S1408 needs to be replaced with a process of shifting to the right.

以上で本第2の実施形態におけるS102の許容範囲の算出の説明を終える。S102を終えると、d1〜d22の許容範囲が図11に示す如く求まる。ここで、本第2の実施形態で得られた許容範囲の役割について、図11を用いて補足する。図11のd6やd17は許容範囲が狭い。これは図8(b)で示したカラー画像I2上で、d6、d17に対応する画素c6、c17が、カラー画像のエッジ付近にあることを反映している。逆に、d11やd12のように、対応するカラー画像上の画素の周りには似た色が多い場合は、許容範囲が広くなる。この様に、本第2の実施形態で得られた許容範囲は、カラー画像のエッジ付近程高い精度が必要である、という視差画像の特性を反映していることが分かる。   This is the end of the description of the calculation of the allowable range in S102 in the second embodiment. When S102 ends, the allowable range of d1 to d22 is obtained as shown in FIG. Here, the role of the allowable range obtained in the second embodiment will be supplemented with reference to FIG. In FIG. 11, d6 and d17 have a narrow allowable range. This reflects that the pixels c6 and c17 corresponding to d6 and d17 are near the edge of the color image on the color image I2 shown in FIG. 8B. Conversely, when there are many similar colors around pixels on the corresponding color image, such as d11 and d12, the allowable range is widened. Thus, it can be seen that the allowable range obtained in the second embodiment reflects the characteristic of the parallax image that higher accuracy is required near the edge of the color image.

以下、S103〜S107は第1の実施形態と同様の手順で行えば良い。本第2の実施形態の処理を全て終えると、図9の視差d1〜d22の代表値として、「1」、「4」が選ばれる。   Hereinafter, S103 to S107 may be performed in the same procedure as in the first embodiment. When all the processes of the second embodiment are finished, “1” and “4” are selected as representative values of the parallaxes d1 to d22 in FIG.

[第2の実施形態の変形例]
第2の実施形態の変形例として、図1のS107の代表値に基づいた量子化において、視差画像の量子化を行う場合に適した方法を説明する。本変形例における処理は、図1のS107以外は全て第2の実施形態と同様である。
[Modification of Second Embodiment]
As a modification of the second embodiment, a method suitable for quantizing a parallax image in the quantization based on the representative value in S107 of FIG. 1 will be described. The processing in this modification is the same as that of the second embodiment except for S107 in FIG.

本変形例におけるS107の詳細を、図12を用いて説明する。S107では量子化対象の全ての視差di(i=1,・・・,22)に対して図12で示した処理を行う。   Details of S107 in this modification will be described with reference to FIG. In S107, the processing shown in FIG. 12 is performed for all the parallaxes di (i = 1,..., 22) to be quantized.

まず、S1201ではdiの許容範囲内に代表値があるかを判定し、ある場合はS1202に、無い場合はS1203へ進む。   First, in S1201, it is determined whether there is a representative value within the allowable range of di. If there is a representative value, the process proceeds to S1202, and if not, the process proceeds to S1203.

S1202では、許容範囲内ある全ての代表値をdiに割り当てる代表値の候補として選ぶ。S1203では許容範囲内に代表値が無いため、diより大きい代表値の中からdiに最も近い代表値を1つ、diより小さい代表値の中からdiも最も近い代表値を1つの計2つを代表値の候補として選ぶ。   In S1202, all representative values within the allowable range are selected as representative value candidates to be assigned to di. In S1203, since there is no representative value within the allowable range, one representative value closest to di is selected from among representative values larger than di, and one representative value closest to di is selected from among representative values smaller than di. Is selected as a representative candidate.

S1204ではS1202もしくはS1203で選んだ代表値の候補から1つを選ぶ。この際、代表値の選び方は、
Er=diff(ci,cr1)+diff(ci,cr3)
を最小にするという優先順位に従って選ぶ。ここで、ciはI2上の画素で、視差diと同一の座標にある点であるとする。また、cr1、cr3はそれぞれI1、I3上の画素であり、diの代わりに代表値rを視差とみなした場合の、ciの対応画素である。diffは2つの画素間の色差を表しており、例えばRGB各成分の差分の絶対値の和を用いる。
In S1204, one is selected from the representative value candidates selected in S1202 or S1203. In this case, how to choose the representative value:
Er = diff (ci, cr1) + diff (ci, cr3)
Select according to the priority of minimizing. Here, ci is a pixel on I2, and is a point at the same coordinate as the parallax di. Cr1 and cr3 are pixels on I1 and I3, respectively, and corresponding to ci when the representative value r is regarded as parallax instead of di. diff represents the color difference between two pixels, and for example, the sum of absolute values of differences between RGB components is used.

上記実施形態2の変形例で説明した代表値の選び方は、視差の量子化の際には、視差自体の値の変化よりも、視差によって対応づけられる画素間の色差が重要であるという、視差の特性を反映した方法となっている。   The method of selecting the representative value described in the modification of the second embodiment is that the color difference between pixels associated with the parallax is more important than the change in the value of the parallax when the parallax is quantized. It is a method that reflects the characteristics of.

[第3の実施形態]
第2の実施形態において、図1のS106で、代表値を選ぶ処理を打ち切る基準を変えた例を述べる。S106においては、代表値が事前に定めた目標数に達した、或いは、カウント対象のスカラー量が無くなったかによって判定をしていた。この判定を行うためには、事前に代表値の目標数を定める必要がある。しかし、本第3の実施形態では、代表値の目標数を定めることなく、画像の内容に応じて切り替える例を示す。
[Third Embodiment]
In the second embodiment, an example will be described in which the reference for stopping the process of selecting the representative value is changed in S106 of FIG. In S106, the determination is made based on whether the representative value has reached a predetermined target number or the scalar quantity to be counted has been exhausted. In order to make this determination, it is necessary to determine the target number of representative values in advance. However, the third embodiment shows an example in which switching is performed according to the content of an image without determining the target number of representative values.

本実施形態のフローチャートを図15に示す。本実施形態の特徴はS1501、S1502であり、他の部分は第2の実施形態で図1を用いて説明した処理と同様である。従ってS1501とS1502のみ説明する。   A flowchart of the present embodiment is shown in FIG. The features of this embodiment are S1501 and S1502, and the other parts are the same as those described in the second embodiment with reference to FIG. Therefore, only S1501 and S1502 will be described.

S1501ではS104で決定した代表値のカウント値が、全画素数のX%以下かどうかを判定する。ここで、カウント値はS103において求めたものを用いる。また、Xは任意に定める割合を示す閾値であり、例えばX=1等と設定すれば良い。ここでカウント値が全画素数のX%以下の場合は、S1502に進み、最後に選んだ代表値のみ、代表値から外す。   In S1501, it is determined whether the count value of the representative value determined in S104 is X% or less of the total number of pixels. Here, the count value obtained in S103 is used. X is a threshold value indicating an arbitrarily determined ratio, and for example, X = 1 or the like may be set. If the count value is less than or equal to X% of the total number of pixels, the process proceeds to S1502, and only the last selected representative value is excluded from the representative value.

本第3の実施形態で述べた方法を用いて代表値数を決めると、画像の内容に応じて代表値数を割り当てることができるようになる。つまり、量子化後に、各画素の視差を表現するために必要なビット数を画像の内容に応じて自動で切り替えることが出来る。   When the number of representative values is determined using the method described in the third embodiment, the number of representative values can be assigned according to the content of the image. That is, after quantization, the number of bits necessary to express the parallax of each pixel can be automatically switched according to the content of the image.

(その他の実施例)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other examples)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (12)

各スカラー量の取り得る値がT1〜TIである、量子化対象のN個のスカラー量S(1)〜S(N)を入力し、各スカラー量を複数の代表値の中の1つで表わすことで、量子化する量子化装置であって、
各スカラー量S(n)(nは1、…、Nのいずれか)の、量子化した際の変化の許容範囲を特定する情報を取得する取得手段と、
前記情報に応じた許容範囲を量子化対象のスカラー量毎に設定する設定手段と、
量子化対象のスカラー量を入力する入力手段と、
該入力手段で入力した着目スカラー量S(n)について、前記設定手段で設定された記着目スカラー量S(n)に対する許容範囲をTmin(n)〜Tmax(n)と表わしたとき、前記着目スカラー量S(n)に対して、前記Tmin(n)〜Tmax(n)で表わされる範囲の複数のスカラー量が入力されたものと見なし、T1〜TIの各値が入力された個数を累積カウントするカウント手段と、
前記入力手段で前記N個のスカラー量を入力した場合の前記カウント手段で求めたT1〜TIのカウント値に従い、前記複数の代表値を決定する決定手段と、
該決定手段で得られた複数の代表値を用いて、前記N個のスカラー量を量子化する量子化手段と
を有することを特徴とする量子化装置。
N scalar quantities S (1) to S (N) to be quantized, each having a value which can be taken by each scalar quantity, are input, and each scalar quantity is one of a plurality of representative values. Representing a quantizer that quantizes,
Obtaining means for obtaining information for specifying an allowable range of change when quantized for each scalar quantity S (n) (n is any one of 1,..., N);
Setting means for setting an allowable range according to the information for each scalar quantity to be quantized;
An input means for inputting a scalar quantity to be quantized;
The interest was entered with the input means scalar S (n), when the allowable range for the set pre-Symbol focused scalar S (n) by the setting unit expressed as Tmin (n) ~Tmax (n) , wherein It is assumed that a plurality of scalar amounts in the range represented by Tmin (n) to Tmax (n) are input with respect to the target scalar amount S (n), and the number of input values of T1 to TI is the number of input. A counting means for cumulatively counting;
Determining means for determining the plurality of representative values according to the count values of T1 to TI obtained by the counting means when the N scalar amounts are input by the input means;
And a quantization unit that quantizes the N scalar quantities using a plurality of representative values obtained by the determination unit.
前記量子化対象のスカラー量は、所定の視点で撮影したカラー画像の距離画像であり、前記取得手段は、異なる視点で撮影した複数のカラー画像を取得し、The scalar quantity to be quantized is a distance image of a color image captured from a predetermined viewpoint, and the acquisition unit acquires a plurality of color images captured from different viewpoints,
前記設定手段は、上記カラー画像を利用して、各距離の許容範囲を算出することを特徴とする請求項1に記載の量子化装置。The quantization apparatus according to claim 1, wherein the setting unit calculates an allowable range of each distance using the color image.
前記情報は、前記カラー画像における注目画素について、前記注目画素の近傍に色差の小さい画素があるか否かを特定する情報であることを特徴とする請求項2に記載の量子化装置。The quantization apparatus according to claim 2, wherein the information is information specifying whether or not there is a pixel having a small color difference in the vicinity of the target pixel for the target pixel in the color image. 前記設定手段は、前記注目画素について、前記注目画素の近傍に色差の小さい画素がない場合は、前記注目画素の近傍に色差の小さい画素がある場合よりも、前記注目画素の許容範囲を小さく設定することを特徴とする請求項3に記載の量子化装置。The setting unit sets the permissible range of the target pixel to be smaller when the pixel of interest has no small color difference near the target pixel than when the pixel of small color difference exists near the target pixel. The quantization apparatus according to claim 3, wherein: 更に、スカラー量S(1)〜S(N)のうち、それまでに選択した代表値のいずれかを許容範囲に含むスカラー量S(n)以外をカウント対象として設定するカウント対象設定手段を持ち、
前記カウント手段は、前記カウント対象設定手段で設定されたカウント対象のスカラー量のみを考慮してカウント値を求め、
前記決定手段は、カウント値が最大となる値Ti(iは1、・・・、Iのいずれか)を代表値の1つとして選択し、
予め目標とする代表値の個数の選択が行われる、又は、前記代表値の候補がなくなるまで、前記カウント対象設定手段によるカウント対象のスカラー値の設定、前記カウント手段による累積値のカウント、前記決定手段による代表値の選択を繰り返し実行する
ことを特徴とする請求項1乃至4の何れか一項に記載の量子化装置。
In addition, there is a counting target setting means for setting the scalar quantities S (1) to S (N) other than the scalar quantity S (n) that includes any of the representative values selected so far as the count target. ,
The counting means obtains a count value considering only the scalar quantity to be counted set by the counting object setting means,
The determination means selects a value Ti (i is one of 1,..., I) that maximizes the count value as one of the representative values,
The target number of representative values is selected in advance, or until the representative value candidates are exhausted, the counting target setting unit sets the counting target scalar value, the counting unit counts the accumulated value, and the determination quantization apparatus according to any one of claims 1 to 4, characterized in that repeatedly executing the selection of the representative value by means.
前記決定手段は、更に、選択した代表値のカウント値が、前記Nに対して閾値以下の割合であった場合に、代表値の選択を打ち切ることを特徴とする請求項に記載の量子化装置。 6. The quantization according to claim 5 , wherein the determination unit further stops the selection of the representative value when the count value of the selected representative value is a ratio equal to or less than a threshold value with respect to the N. apparatus. 前記カウント手段は、
当該着目スカラー量S(n)に対し、許容範囲Tmin(n)〜Tmax(n)における前記着目スカラー量S(n)を、それ以外のスカラー量よりも大きい重みを持つものとしてカウントすることを特徴とする請求項1乃至のいずれか1項に記載の量子化装置。
The counting means includes
Counting the focused scalar quantity S (n) in the allowable range Tmin (n) to Tmax (n) with respect to the focused scalar quantity S (n) as having a greater weight than the other scalar quantities. quantization device according to any one of claims 1 to 6, wherein.
前記量子化対象のスカラー量は画像を構成する画素値であって、
前記取得手段は、前記画像における関心領域を示す情報を、前記量子化した際の変化の許容範囲を特定する情報として取得し、
前記設定手段は、前記関心領域内の画素の量子化の許容範囲を、前記関心領域外の画素の量子化の許容範囲よりも小さくすることを特徴とする請求項に記載の量子化装置。
The scalar quantity to be quantized is a pixel value constituting an image, and
The acquisition means acquires information indicating a region of interest in the image as information for specifying an allowable range of change when the quantization is performed,
The quantization apparatus according to claim 1 , wherein the setting unit makes an allowable range of quantization of pixels in the region of interest smaller than an allowable range of quantization of pixels outside the region of interest.
前記量子化手段は、画素の距離を近似する代表値の候補が複数ある場合に、距離によって対応つけられる画素間の色差が、小さくなる候補を優先して選択して量子化することを特徴とする請求項に記載の量子化装置。 In the case where there are a plurality of representative value candidates that approximate the pixel distance, the quantization means preferentially selects and quantizes a candidate that has a smaller color difference between pixels associated with the distance. The quantization apparatus according to claim 8 . 各スカラー量の取り得る値がT1〜TIである、量子化対象のN個のスカラー量S(1)〜S(N)を入力し、各スカラー量を複数の代表値の中の1つで表わすことで、量子化する量子化装置の制御方法であって、
取得手段が、各スカラー量S(n)(nは1、…、Nのいずれか)の、量子化した際の変化の許容範囲を特定する情報を取得する取得工程と、
設定手段が、前記情報に応じた許容範囲を量子化対象のスカラー量毎に設定する設定工程と、
入力手段が、量子化対象のスカラー量を入力する入力工程と、
カウント手段が、前記入力工程で入力した着目スカラー量S(n)について、前記設定工程で設定された情報が示す前記着目スカラー量S(n)に対する許容範囲をTmin(n)〜Tmax(n)と表わしたとき、前記着目スカラー量S(n)に対して、前記Tmin(n)〜Tmax(n)で表わされる範囲の複数のスカラー量が入力されたものと見なし、T1〜TIの各値が入力された個数を累積カウントするカウント工程と、
決定手段が、前記入力工程で前記N個のスカラー量を入力した場合の前記カウント工程で求めたT1〜TIのカウント値に従い、前記複数の代表値を決定する決定工程と、
量子化手段が、前記決定工程で得られた複数の代表値を用いて、前記N個のスカラー量を量子化する量子化工程と
を有することを特徴とする量子化装置の制御方法。
N scalar quantities S (1) to S (N) to be quantized, each having a value which can be taken by each scalar quantity, are input, and each scalar quantity is one of a plurality of representative values. Representing a method for controlling a quantizing device for quantizing,
An acquisition step in which an acquisition unit acquires information for specifying an allowable range of change when quantized for each scalar quantity S (n) (n is any one of 1,..., N);
A setting step in which a setting unit sets an allowable range corresponding to the information for each scalar quantity to be quantized;
An input step in which the input means inputs a scalar quantity to be quantized;
For the noted scalar quantity S (n) input by the counting means in the input process, an allowable range for the noted scalar quantity S (n) indicated by the information set in the setting process is Tmin (n) to Tmax (n). It is assumed that a plurality of scalar amounts in the range represented by Tmin (n) to Tmax (n) are input to the target scalar amount S (n), and each value of T1 to TI A counting process for cumulatively counting the number of input
A determining step for determining the plurality of representative values according to the count values of T1 to TI obtained in the counting step when the N scalar amounts are input in the input step;
And a quantization unit that quantizes the N scalar quantities using a plurality of representative values obtained in the determination step.
コンピュータに読み込ませ実行させることで、前記コンピュータを、請求項1乃至のいずれか1項に記載の量子化装置が有する各手段として機能させるためのプログラム。 By executing read into the computer, the computer program for causing to function as each unit included in the quantizer according to any one of claims 1 to 9. 請求項11に記載のプログラムを格納したことを特徴とするコンピュータが読み取り可能な記憶媒体。 A computer-readable storage medium storing the program according to claim 11 .
JP2012094182A 2012-04-17 2012-04-17 Quantization apparatus and control method thereof Expired - Fee Related JP5959911B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012094182A JP5959911B2 (en) 2012-04-17 2012-04-17 Quantization apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012094182A JP5959911B2 (en) 2012-04-17 2012-04-17 Quantization apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2013223143A JP2013223143A (en) 2013-10-28
JP5959911B2 true JP5959911B2 (en) 2016-08-02

Family

ID=49593819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012094182A Expired - Fee Related JP5959911B2 (en) 2012-04-17 2012-04-17 Quantization apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP5959911B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000013608A (en) * 1998-06-23 2000-01-14 Ricoh Co Ltd Image processing method
DE602004014901D1 (en) * 2004-04-29 2008-08-21 Mitsubishi Electric Corp Adaptive quantization of a depth map
JP4860763B2 (en) * 2010-03-29 2012-01-25 シャープ株式会社 Image encoding apparatus, image encoding apparatus control method, control program, and recording medium

Also Published As

Publication number Publication date
JP2013223143A (en) 2013-10-28

Similar Documents

Publication Publication Date Title
CN102326391B (en) Multi-view image coding device, multi-view image decoding method, multi-view image decoding device, multi-view image decoding method
CN102308584B (en) Multi-view image encoding method, multi-view image decoding method, multi-view image encoding device, and multi-view image decoding device
Artusi et al. JPEG XT: A compression standard for HDR and WCG images [standards in a nutshell]
JP4658223B2 (en) Image generating method, apparatus, program thereof, and recording medium recording program
JP5947977B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
US8355596B2 (en) Image generation method and apparatus, program therefor, and storage medium which stores the program
KR101855980B1 (en) Hole filling method and apparatus
JP2008252860A (en) Image processing method and image processing apparatus
JP6232075B2 (en) Video encoding apparatus and method, video decoding apparatus and method, and programs thereof
JP4050472B2 (en) Image generation method, apparatus and system
JP5746370B2 (en) Method and apparatus for forming predictive values
WO2015056712A1 (en) Moving image encoding method, moving image decoding method, moving image encoding device, moving image decoding device, moving image encoding program, and moving image decoding program
JP5959911B2 (en) Quantization apparatus and control method thereof
KR101316196B1 (en) Apparatus and method for enhancing stereoscopic image, recording medium thereof
JP6614822B2 (en) Image encoding apparatus, control method thereof, program, and storage medium
Verma et al. Splatty-A unified image demosaicing and rectification method
JP2020092327A (en) Image encoding device, image encoding method, and program
WO2023023918A1 (en) Decoding method, encoding method, decoder and encoder
WO2023240455A1 (en) Point cloud encoding method and apparatus, encoding device, and storage medium
JP2014099716A (en) Image encoder and control method of the same
WO2023159428A1 (en) Encoding method, encoder, and storage medium
WO2022257155A1 (en) Decoding method, encoding method, decoder, encoder, encoding device and decoding device
Monteiro et al. Disparity compensation using geometric transforms
JP2017098789A (en) Image encoding device and control method therefor, and program and storage medium
JP2009003656A (en) Image processing device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150410

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160317

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160401

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160426

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160622

R151 Written notification of patent or utility model registration

Ref document number: 5959911

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees