JP2023070055A - Image encoding device, control method thereof, and program - Google Patents

Image encoding device, control method thereof, and program Download PDF

Info

Publication number
JP2023070055A
JP2023070055A JP2022134421A JP2022134421A JP2023070055A JP 2023070055 A JP2023070055 A JP 2023070055A JP 2022134421 A JP2022134421 A JP 2022134421A JP 2022134421 A JP2022134421 A JP 2022134421A JP 2023070055 A JP2023070055 A JP 2023070055A
Authority
JP
Japan
Prior art keywords
quantization parameter
image
horizontal
ratio
subband
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.)
Pending
Application number
JP2022134421A
Other languages
Japanese (ja)
Inventor
貴史 村田
Takashi Murata
成記 望月
Shigeki Mochizuki
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 GB2215702.8A priority Critical patent/GB2614381A/en
Priority to US17/974,611 priority patent/US20230133895A1/en
Priority to CN202211375088.6A priority patent/CN116074538A/en
Publication of JP2023070055A publication Critical patent/JP2023070055A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To generate encoded data that is suitable for an image in which compression ratios in both of optically horizontal and vertical directions are different.SOLUTION: An image encoding device comprises: a DWT transformation unit that performs wavelet transformation of image data and generates a plurality of pieces of sub-band data; a determination unit that determines a quantization parameter for transformation coefficients in a plurality of sub-bands obtained by the DWT transformation unit; and an encoding unit that performs quantizing and encoding of the transformation coefficients in the sub-band data obtained by the DWT transformation unit, following the quantization parameter determined by the determination unit. Here, the determination unit determines such that a quantization parameter which is applied to a LH sub-band having the same decomposition level is smaller than a quantization parameter which is applied to a HL sub-band in a case where for example a compression ratio between an optically horizontal and vertical directions indicates a compression ratio in which an image in a horizontal direction is α (α<1) times relative to a vertical direction in the image obtained by an imaging unit.SELECTED DRAWING: Figure 1

Description

本発明は、画像の符号化技術に関するものである。 The present invention relates to image coding technology.

現在、デジタルビデオカメラ等、動画像を記録するデジタルの撮像装置が普及している。近年ではRAW画像を記録する方式が、静止画のみならず動画にも適用されている。RAW画像は記録に必要なデータ量が膨大になるものの、オリジナル画像に対する補正や劣化を最低限に抑えることができ、記録後でも画像編集の自由度が高いからと考えられる。 2. Description of the Related Art At present, digital imaging devices for recording moving images, such as digital video cameras, are widely used. In recent years, the method of recording RAW images has been applied not only to still images but also to moving images. Although the amount of data required to record RAW images is enormous, it is possible to minimize the correction and deterioration of the original image, and it is thought that there is a high degree of freedom in image editing even after recording.

RAW動画像を記録媒体に記録する場合、十分な時間の動画像が記録できることが望まれる。それ故、記録前のRAW動画像を圧縮符号化することが望まれる。一般に、RAW画像は、R,G,B各色の画素がモザイク状に配置されたベイヤ配列の画像である。ベイヤ配列における隣接する画素は、異なる色成分を有するため、隣接画素間の相関が低い。それ故、そのまま符号化しても高い圧縮効率を得ることは難しい。そこで、RAW画像から同じ色成分の画素のみを抜き出して複数の単一成分のプレーンを生成する。そして、プレーン毎に符号化を行うことで、プレーン内の画素間の相関を高めて圧縮効率を向上させる、プレーン変換技術が圧縮符号化の手法の一つとして一般的に利用される。 When recording a RAW moving image on a recording medium, it is desired that the moving image can be recorded for a sufficient time. Therefore, it is desired to compression-encode the RAW moving image before recording. In general, a RAW image is a Bayer array image in which R, G, and B pixels are arranged in a mosaic pattern. Adjacent pixels in the Bayer array have different color components, so the correlation between adjacent pixels is low. Therefore, it is difficult to obtain high compression efficiency even if the data is encoded as it is. Therefore, only pixels of the same color component are extracted from the RAW image to generate a plurality of single component planes. A plane transform technique is generally used as one of compression encoding methods, in which encoding is performed for each plane to increase the correlation between pixels in the plane and improve the compression efficiency.

また、従来の代表的な圧縮符号化方式として、H.264(H.264/MPEG-4 Part10:Advanced Video Coding)が知られている。この圧縮符号化方式では、1フレーム内の所定画素数からなるブロック毎に、動画像が有する時間冗長性と空間冗長性を利用したデータ量の圧縮が行われる。H.264では、時間冗長性に対する動き検出及び動き補償、空間冗長性に対する周波数変換として離散コサイン変換(Discrete Cosine Transform:DCT)、更に量子化やエントロピー符号化といった技術を組み合わせることで圧縮符号化を実現している。ただし、ある程度以上圧縮率を上げると、DCT変換特有のブロック歪みが顕著になり、主観的に画像劣化が目立つようになる。 Also, H.264 (H.264/MPEG-4 Part 10: Advanced Video Coding) is known as a typical conventional compression encoding method. In this compression encoding method, the amount of data is compressed using the temporal redundancy and spatial redundancy of moving images for each block of a predetermined number of pixels in one frame. In H.264, motion detection and motion compensation for temporal redundancy, Discrete Cosine Transform (DCT) as frequency transform for spatial redundancy, and compression coding are combined with quantization and entropy coding. Realized. However, if the compression rate is increased to a certain extent or more, the block distortion peculiar to DCT conversion becomes noticeable, and image deterioration becomes noticeable subjectively.

そこで、水平及び垂直方向に低域と高域フィルタリングをそれぞれ適用し、サブバンドと呼ばれる周波数帯に分解する離散ウェーブレット変換(Discrete Wavelet Transform:DWT)を用いるサブバンド符号化技術がJPEG2000方式等で採用されている。サブバンド符号化は、DCTを用いた符号化技術に比べ、ブロック歪みが生じにくく、高圧縮時の圧縮特性が良いといった特徴を有する。 Therefore, JPEG2000 adopts sub-band coding technology using Discrete Wavelet Transform (DWT), which applies low-pass and high-pass filtering in the horizontal and vertical directions, respectively, and decomposes into frequency bands called sub-bands. It is Subband coding is characterized by less block distortion and better compression characteristics at high compression than coding techniques using DCT.

例えば、特許文献1に記載の技術は、RAW画像をプレーン変換、DWT変換を用いて周波数成分を分離して複数のサブバンドを生成した後、サブバンド毎に量子化を行い符号化することで、効率的にRAWデータを圧縮している。特許文献1では、サブバンド毎に設定する量子化パラメータの大小関係に関して、人間の視覚特性を鑑みて、低周波成分寄りのサブバンドほど量子化パラメータを小さく、高周波成分寄りのサブバンドほど量子化パラメータを大きくするとしている。したがって、同一分解レベルにおけるHLサブバンドとLHサブバンドは同等の周波数レベル帯であるため、量子化パラメータの大小関係に関しても同等の設定することになるため、水平、垂直方向の量子化歪も同程度となる。 For example, the technology described in Patent Document 1 separates frequency components from a RAW image using plane transform and DWT transform to generate a plurality of subbands, and then quantizes and encodes each subband. , which efficiently compresses RAW data. In Patent Document 1, regarding the magnitude relationship of the quantization parameters set for each subband, the quantization parameter is set smaller for subbands closer to low frequency components, and quantized for subbands closer to high frequency components, in consideration of human visual characteristics. I am trying to increase the parameters. Therefore, since the HL sub-band and LH sub-band at the same resolution level have the same frequency level band, the quantization parameter magnitude relationship is also set to be the same. to some extent.

特開2019-4428号公報Japanese Patent Application Laid-Open No. 2019-4428

しかしながら、水平と垂直方向とで光学的な圧縮比率が異なるRAW画像に対して特許文献1を用いて符号化して表示する場合、光学的に圧縮した方向に対して伸張するので、その方向に対する量子化歪も増大してしまう。このとき、光学的に圧縮する方向が水平或いは垂直方向のいずれか一方向の場合、それに伴う伸張方向も一方向となり、その方向の量子化歪が増大してしまうため、表示時にその歪が画質劣化として視認されてしまうといった問題が発生する。 However, when a RAW image with different optical compression ratios in the horizontal and vertical directions is encoded using Patent Document 1 and displayed, the expansion is performed in the optically compressed direction. The distortion will also increase. At this time, if the direction of optical compression is either the horizontal or vertical direction, the expansion direction is also the same, and the quantization distortion in that direction increases. A problem arises that it is visually recognized as deterioration.

本発明は上記の問題点を鑑み、水平と垂直方向とで光学的な圧縮比率が異なる画像を符号化したものを表示することに伴う、水平或いは垂直方向いずれか一方向への量子化歪の増大を抑制する画像符号化装置を提供することを目的とする。 In view of the above problems, the present invention solves the problem of quantization distortion in either the horizontal or vertical direction accompanying the display of encoded images with different optical compression ratios in the horizontal and vertical directions. An object of the present invention is to provide an image encoding device that suppresses the increase.

この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
撮像手段により得た画像データを符号化する画像符号化装置であって、
前記撮像手段の光学的な水平方向と垂直方向の圧縮比率を表す情報を取得する取得手段と、
前記画像データをウェーブレット変換し、複数のサブバンドデータを生成するDWT変換手段と、
該DWT変換手段で得た複数のサブバンドにおける変換係数に対する量子化パラメータを決定する決定手段と、
前記DWT変換手段で得たサブバンドデータにおける変換係数を、前記決定手段で決定された量子化パラメータに従って量子化し、符号化する符号化手段とを備え、
前記決定手段は、
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における垂直方向に対する水平方向の像がα(α<1)倍となる圧縮比率を示している場合には、同一分解レベルのLHサブバンドに適用する量子化パラメータを、HLサブバンドに適用する量子化パラメータよりも小さくなるように決定することを特徴とする。
In order to solve this problem, for example, the image encoding device of the present invention has the following configuration. i.e.
An image encoding device for encoding image data obtained by imaging means,
Acquisition means for acquiring information representing the optical horizontal and vertical compression ratios of the imaging means;
DWT transform means for wavelet transforming the image data to generate a plurality of subband data;
determining means for determining quantization parameters for transform coefficients in a plurality of subbands obtained by the DWT transform means;
encoding means for quantizing and encoding the transform coefficients in the subband data obtained by the DWT transform means according to the quantization parameter determined by the determining means;
The determining means is
If the optical horizontal and vertical compression ratios indicate a compression ratio that makes the horizontal image of the image obtained by the imaging means α (α<1) times as large as the vertical direction, the same decomposition The quantization parameter applied to the LH sub-band of the level is determined to be smaller than the quantization parameter applied to the HL sub-band.

本発明によれば、光学的な水平と垂直方向の圧縮比率が異なる画像に適した符号化データを生成することができる。 According to the present invention, it is possible to generate encoded data suitable for images with different optical horizontal and vertical compression ratios.

第1の実施形態に係る画像符号化装置のブロック構成図。1 is a block configuration diagram of an image encoding device according to a first embodiment; FIG. 第1の実施形態にプレーン変換を説明するための図。FIG. 4 is a diagram for explaining plane conversion in the first embodiment; 離散ウェーブレット(DWT)の垂直、水平フィルタリングをそれぞれ3回施した場合のサブバンド形成図る。Subband formation when vertical and horizontal filtering of a discrete wavelet (DWT) is applied three times each. 第1の実施形態にサブブロックとブロックラインとの関係を示す図。FIG. 4 is a diagram showing the relationship between sub-blocks and block lines in the first embodiment; 第1の実施形態に係る光学的な水平および垂直方向の圧縮比αの関係を示す図。FIG. 4 is a diagram showing the relationship between optical horizontal and vertical compression ratios α according to the first embodiment; 第2の実施形態に係るプレーンデータの信号成分の方向を示す図。FIG. 10 is a diagram showing directions of signal components of plane data according to the second embodiment; 第2の実施形態に係るU,V,GHプレーンデータにおける斜め方向の信号成分を水平、垂直方向に分解した図。FIG. 10 is a view of horizontal and vertical resolution of oblique signal components in U, V, and GH plane data according to the second embodiment; 第1の実施形態における画像復号装置のブロック構成図。1 is a block configuration diagram of an image decoding device according to a first embodiment; FIG. 第1の実施形態の変形例における情報処理装置のプログラム構成図。FIG. 10 is a program configuration diagram of an information processing apparatus according to a modification of the first embodiment; 画像符号化の処理手順を示すフローチャート。4 is a flowchart showing a processing procedure of image encoding; 画像復号の処理手順を示すフローチャート。4 is a flowchart showing a processing procedure of image decoding;

以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものでない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the invention according to the scope of claims. Although multiple features are described in the embodiments, not all of these multiple features are essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.

[第1の実施形態]
図1は、第1の実施形態における撮像装置100の符号化に係る主要部のブロック構成図である。
[First Embodiment]
FIG. 1 is a block configuration diagram of main parts related to encoding of an imaging device 100 according to the first embodiment.

撮像装置100は、図1に示す各処理部を制御する制御部150を有する。この制御部150は、CPU、CPUが実行するプログラムを保持するROM、並びに、ワークエリアとして使用するRAMで構成される。 The imaging device 100 has a control unit 150 that controls each processing unit shown in FIG. The control unit 150 is composed of a CPU, a ROM that holds programs executed by the CPU, and a RAM that is used as a work area.

撮像装置100は、例えばデジタルカメラ、デジタルビデオカメラとして実現することができる。また、それ以外に、例えばパーソナルコンピュータ、携帯電話、スマートフォン、PDA、タブレット端末、携帯型メディアプレーヤなどの任意の情報処理端末或いは画像処理装置として実現することもできる。なお、図1は、撮像装置であるデジタルカメラ等として機能する場合を考慮して撮像部101を含む構成を示した。しかし、符号化対象の画像の供給源は撮像部に限らず、符号化対象の画像を記憶した記憶媒体でも構わない。実施形態で撮像装置に適用するのは、あくまで具現化し、理解を容易にするためと理解されたい。 The imaging device 100 can be implemented as, for example, a digital camera or a digital video camera. In addition, it can also be realized as an arbitrary information processing terminal or image processing device such as a personal computer, a mobile phone, a smart phone, a PDA, a tablet terminal, or a portable media player. Note that FIG. 1 shows a configuration including an imaging unit 101 in consideration of a case where the imaging device functions as a digital camera or the like. However, the supply source of the image to be encoded is not limited to the imaging unit, and may be a storage medium storing the image to be encoded. It should be understood that the application to the imaging device in the embodiment is for the sake of realization and easy understanding.

[撮像部]
撮像部101は、光学レンズ、絞り、フォーカス制御及びレンズ駆動部を含む光学ズームが可能なレンズ光学系と、レンズ光学系からの光情報を電気信号に変換するCCDイメージセンサ又は、CMOSイメージセンサなどの撮像素子を含む。撮像部101は、撮像素子により得られた電気信号をデジタル信号へ変換したRAW画像データを、プレーン変換部102へ出力する。また、撮像部101は、光学的な水平と垂直方向の圧縮比率情報をメタ情報として保持する不揮発性メモリ(不図示)を有し、そのメタ情報を量子化パラメータ重み設定部112に供給する。なお、撮像部101は、例えば1秒当たり30フレームのレートで撮像を行う能力を有するものとする。光学レンズについては、撮像装置に対してレンズユニットが着脱可能であり、異なる種類のレンズを装着可能な構成としてもよい。光学レンズが着脱可能な場合は、光学的に水平方向と垂直方向の圧縮比率が1となる通常のレンズユニットだけでなく、光学的に水平方向と垂直方向の圧縮比率が異なるアナモフィックレンズ等を装着可能な構成とする。
[Imaging unit]
The imaging unit 101 includes a lens optical system capable of optical zoom including an optical lens, an aperture, a focus control and a lens driving unit, and a CCD image sensor or CMOS image sensor that converts optical information from the lens optical system into an electric signal. image sensor. The imaging unit 101 outputs RAW image data obtained by converting the electrical signal obtained by the imaging device into a digital signal to the plane conversion unit 102 . The imaging unit 101 also has a nonvolatile memory (not shown) that holds optical horizontal and vertical compression ratio information as meta information, and supplies the meta information to the quantization parameter weight setting unit 112 . It is assumed that the imaging unit 101 has the ability to perform imaging at a rate of 30 frames per second, for example. As for the optical lens, the lens unit may be detachable from the imaging device, and different types of lenses may be attached. If the optical lens is detachable, you can install not only a normal lens unit with an optical horizontal and vertical compression ratio of 1, but also an anamorphic lens with different optical horizontal and vertical compression ratios. possible configuration.

[プレーン変換部]
プレーン変換部102は、撮像部101が撮像したベイヤ配列の着目フレームのRAW画像データを入力する。そして、プレーン変換部102は、1枚のRAW画像データを、それぞれが単一成分で構成される複数のプレーンに分離する。図2は、入力画像データであるベイヤ配列のRAW画像データから、4つのプレーンへ分離したときのプレーン形成図である。ベイヤ配列における隣接する2×2画素は、1個の赤成分(R)、1個の青成分(B)、2個の緑成分(G1,G2)で構成される。プレーン変換部102は、RAW画像データから、R成分のみで構成されるRプレーン、G1成分のみで構成されるG1プレーン、G2成分のみで構成されるG2プレーン、B成分のみで構成されるBプレーンに分離する。なお、RAW画像データの水平方向画素数をW、垂直方向画素数をHと表すと、これら4つのプレーンは水平W/2画素、垂直H/2画素のサイズとなる。上記の結果、1つの色成分のプレーンに着目すると、隣接する画素間の相関が高く、圧縮効率の向上が容易になる。
[Plane conversion part]
The plane conversion unit 102 receives RAW image data of a frame of interest in the Bayer array imaged by the imaging unit 101 . Then, the plane conversion unit 102 separates one sheet of RAW image data into a plurality of planes each composed of a single component. FIG. 2 is a plane formation diagram when RAW image data in Bayer array, which is input image data, is separated into four planes. Adjacent 2×2 pixels in the Bayer array consist of one red component (R), one blue component (B) and two green components (G1, G2). The plane conversion unit 102 converts the RAW image data into an R plane consisting of only R components, a G1 plane consisting of only G1 components, a G2 plane consisting of only G2 components, and a B plane consisting of only B components. separate into If the number of pixels in the horizontal direction of the RAW image data is represented by W, and the number of pixels in the vertical direction is represented by H, these four planes have a size of W/2 pixels horizontally and H/2 pixels vertically. As a result of the above, focusing on one color component plane, the correlation between adjacent pixels is high, and compression efficiency can be easily improved.

[離散ウェーブレット変換(Discrete Wavelet Transform; DWT)部]
離散ウェーブレット変換部103は、プレーン変換部102から順次出力されるプレーンに対して周波数変換を行い、変換係数を生成する。DWT変換は、一般に画像全体に対してフィルタリングを行う変換である。利用するフィルタのタップ数分の画素データがバッファメモリに溜まったタイミングで、垂直方向及び水平方向のフィルタリングを行うことが可能である。そのため、DWT変換をプレーンデータの1ライン単位に行い、更に生成された低域サブバンドLLに対して再帰的にDWTを適用することで、各サブバンドを並列に処理することが可能である。
[Discrete Wavelet Transform (DWT)]
The discrete wavelet transform unit 103 performs frequency transform on the planes sequentially output from the plane transform unit 102 to generate transform coefficients. A DWT transform is generally a transform that filters the entire image. Vertical and horizontal filtering can be performed at the timing when pixel data corresponding to the number of taps of the filter to be used is accumulated in the buffer memory. Therefore, each subband can be processed in parallel by performing DWT conversion for each line of plane data and recursively applying the DWT to the generated low frequency subband LL.

図3は、垂直、水平フィルタリング処理を1セットとするDWTを3回実行した場合に得られるサブバンド形成図である。図示において“L”,“H”はそれぞれ低域、高域を示し、その順序は、前側が水平フィルタリングを行った結果の帯域、後側が垂直フィルタリングを行った結果の帯域を示す。“Lv”の後の数字はDWTの分解レベルを示す。DWTを2回以上行う場合、1つ前の変換で得られた低域周波数帯域であるサブバンドLLが変換対象となる。それ故、DWTの実行回数を重ねるにしたがって、直前の変換のサブバンドの水平、垂直とも1/2のサイズとなっていく。また、この理由で、サブバンドLLは最終回のDWTで残るので、図示のように分解レベルを表す表記は行わない。なお、実施形態における離散ウェーブレット変換部103は、符号化対象の着目フレーム(RAW画像)から生成された4つのプレーンを順にDWTを実行するが、処理時間短縮のために複数設けるようにしても良い。例えば、離散ウェーブレット変換部103を2つ並列に設ける場合には、1つの場合と比較し、DWTに係る負担は1/2にとなり、変換に係る時間も1/2とすることができる。また、離散ウェーブレット変換部103を並列に4つ設ける場合には、1つの場合と比較してDWTに係る時間を1/4とすることが可能である。 FIG. 3 is a subband formation diagram obtained when DWT is executed three times with vertical and horizontal filtering processing set as one set. In the figure, "L" and "H" indicate the low frequency band and the high frequency band, respectively. The number after “Lv” indicates the decomposition level of DWT. When the DWT is performed twice or more, the subband LL, which is the low frequency band obtained in the previous transform, is the transform target. Therefore, as the number of DWT executions increases, the size of the subbands of the previous transform becomes 1/2 both horizontally and vertically. Also for this reason, the sub-band LL remains in the final DWT, so no notation representing the decomposition level is given as shown. Note that the discrete wavelet transform unit 103 in the embodiment sequentially performs DWT on four planes generated from a frame of interest (RAW image) to be encoded, but a plurality of planes may be provided to shorten the processing time. . For example, when two discrete wavelet transform units 103 are provided in parallel, the load related to DWT can be halved and the time required for transformation can be halved compared to the case of one unit. Also, when four discrete wavelet transform units 103 are provided in parallel, it is possible to reduce the time required for DWT to 1/4 compared to the case of one unit.

本実施形態では、離散ウェーブレット変換部103は各サブバンドで1ライン分の変換係数が生成される度に、各サブバンドの1ライン分の変換係数を順次量子化部104へ出力するものとして説明する。 In the present embodiment, discrete wavelet transform section 103 sequentially outputs transform coefficients for one line of each subband to quantization section 104 each time transform coefficients for one line are generated for each subband. do.

[量子化部]
量子化部104は、離散ウェーブレット変換部103から入力した変換係数を、1係数単位に、量子化制御部106で生成した量子化パラメータQpを利用して量子化する。なお、量子化パラメータQpは、その値が大きいほど、量子化後の値が小さくなって符号量の削減が可能になるものの、画質劣化が顕著になるパラメータである。また、4プレーンの変換係数の量子化はプレーン毎に行っても、全プレーンについて並列して行っても良い。ただし、実施形態における量子化部104は、各プレーンにおける同じサブバンド、同じ位置の変換係数を、共通な量子化パラメータQpで量子化し、その量子化結果を符号化部105に供給するものとする。
[Quantization section]
Quantization section 104 quantizes the transform coefficients input from discrete wavelet transform section 103 in units of one coefficient using quantization parameter Qp generated by quantization control section 106 . Note that the larger the value of the quantization parameter Qp, the smaller the value after quantization, which makes it possible to reduce the amount of code, but the degradation of image quality becomes more pronounced. Also, the quantization of transform coefficients of four planes may be performed for each plane or may be performed in parallel for all planes. However, the quantization unit 104 in the embodiment quantizes transform coefficients in the same subband and at the same position in each plane with a common quantization parameter Qp, and supplies the quantization result to the encoding unit 105. .

[符号化部]
符号化部105は、量子化部104による量子化後の各プレーンの変換係数をエントロピー符号化して符号化データを生成し、出力する。
[Encoder]
The encoding unit 105 entropy-encodes the transform coefficients of each plane after quantization by the quantization unit 104 to generate and output encoded data.

[記録処理部]
記録処理部107は、符号化部105から出力されてきた符号化データを、所定の記録フォーマット化を行って、復号に必要な情報をヘッダに有するファイルとして、記録媒体108へ記録する。なお、記録処理部107は、撮像部101より得たメタ情報(圧縮比率)をこのヘッダに格納する。画像復号装置が、復号して得た画像を、水平または垂直方向に補間して、正常な画像を生成するためである。また、記録処理部107は、初期目標符号量設定部114及び初期量子化値設定部115が設定した初期値に係る情報を、このヘッダに格納する。ただし、初期目標符号量設定部114及び初期量子化値設定部115が設定する初期値が、符号化装置と復号装置との間で予め統一されているのであれば、これらの情報をファイルヘッダに含める必要はない。
[Record processing unit]
The recording processing unit 107 converts the encoded data output from the encoding unit 105 into a predetermined recording format, and records it on the recording medium 108 as a file having a header containing information required for decoding. Note that the recording processing unit 107 stores meta information (compression ratio) obtained from the imaging unit 101 in this header. This is because the image decoding device horizontally or vertically interpolates the image obtained by decoding to generate a normal image. Also, the recording processing unit 107 stores information about the initial values set by the initial target code amount setting unit 114 and the initial quantization value setting unit 115 in this header. However, if the initial values set by the initial target code amount setting unit 114 and the initial quantization value setting unit 115 are unified in advance between the encoding device and the decoding device, this information is included in the file header. No need to include.

[記録媒体]
記録媒体108は、例えば不揮発性メモリで構成される記録メディアであり、撮像装置100に対して着脱可能に構成されている。
[recoding media]
The recording medium 108 is a recording medium composed of, for example, a non-volatile memory, and is configured to be detachable from the imaging device 100 .

[初期設定]
初期目標符号量設定部114は、着目フレーム(着目RAW画像)の符号化開始時の目標符号量を設定する。初期量子化値設定部115は、着目フレーム符号化開始時の量子化パラメータQpを設定する。なお、符号化開始時の各種設定値は、前のプレーンの符号化情報を元にフィードバック制御で算出することが一般的である。
[Initial setting]
The initial target code amount setting unit 114 sets the target code amount at the start of encoding of the frame of interest (RAW image of interest). Initial quantization value setting section 115 sets a quantization parameter Qp at the start of encoding of the frame of interest. Various setting values at the start of encoding are generally calculated by feedback control based on the encoding information of the previous plane.

[量子化制御部]
次に、量子化制御部106について説明する。量子化制御部106は、着目フレームの発生符号量が着目フレームの目標符号量に収束するように、量子化パラメータQpを制御する。実施形態では、着目フレームのRAW画像から4つのプレーンに分離し、それぞれに対して離散ウェーブレット変換を行い、量子化、符号化が行われる。4つのプレーンについて量子化する際に用いる量子化パラメータQpは、サブバンドの種類が同じであれば共通であり、量子化パラメータQpの更新する位置も同じである。これは、着目フレーム(4プレーン分)の符号量に基づき、共通に用いる量子化パラメータQpを更新するからである。
[Quantization control part]
Next, quantization control section 106 will be described. The quantization control section 106 controls the quantization parameter Qp so that the generated code amount of the frame of interest converges to the target code amount of the frame of interest. In the embodiment, the RAW image of the frame of interest is separated into four planes, discrete wavelet transform is performed on each plane, and quantization and encoding are performed. The quantization parameter Qp used when quantizing the four planes is common if the types of subbands are the same, and the positions where the quantization parameter Qp is updated are also the same. This is because the commonly used quantization parameter Qp is updated based on the code amount of the frame of interest (for 4 planes).

図4は、量子化制御の量子化制御の単位を示す図である。図4を用いて量子化パラメータQpの制御単位を説明する。前述のように、符号化対象の入力画像はベイヤ配列のRAW画像であり、プレーン変換部102で4プレーンに分離される。更に、各プレーンに対してDWTを施す。前述のように符号化単位をサブバンド毎のラインとしているが、量子化制御単位は、同一画素位置の各サブバンドの符号化結果の集合体とする。即ち、図4に示すように、分解レベル3のサブバンド{Lv3HL,Lv3LH,Lv3HH}及びサブバンド{LL}の1ライン、分解レベル2のサブバンド{Lv2HL,Lv2LH,Lv2HH}の2ライン、分解レベル1のサブバンド{Lv1HL,Lv1LH,Lv1HH}の4ラインを、一つのQpによる制御単位とする。つまり、この量子化制御単位は、現実空間を撮像して得たRAW画像の1ライン中の1色成分のデータに対応する。以降、この制御単位である各サブバンド内の対応する変換係数の集合を、「ブロックライン」と呼ぶ。 FIG. 4 is a diagram showing units of quantization control for quantization control. A control unit for the quantization parameter Qp will be described with reference to FIG. As described above, the input image to be encoded is a Bayer array RAW image, which is separated into four planes by the plane conversion unit 102 . Furthermore, DWT is applied to each plane. As described above, the coding unit is a line for each subband, but the quantization control unit is a set of coding results of each subband at the same pixel position. That is, as shown in FIG. 4, one line of decomposition level 3 subbands {Lv3HL, Lv3LH, Lv3HH} and subband {LL}, two lines of decomposition level 2 subbands {Lv2HL, Lv2LH, Lv2HH}, decomposition Four lines of level 1 subbands {Lv1HL, Lv1LH, Lv1HH} are set as a control unit by one Qp. In other words, this quantization control unit corresponds to data of one color component in one line of the RAW image obtained by imaging the physical space. A set of corresponding transform coefficients in each subband, which is this control unit, is hereinafter referred to as a "block line".

発生符号量保持部109は、符号化部105から通知される各ブロックラインを符号化した際の符号化データの符号量を入力し、保持する。目標符号量算出部113は、着目フレームにおける目標符号量と、全ブロックラインの個数に基づいて、1個のブロックライン目標符号量を算出する。 A generated code amount holding unit 109 receives and holds the code amount of encoded data when each block line is encoded, which is notified from the encoding unit 105 . The target code amount calculation unit 113 calculates the target code amount for one block line based on the target code amount in the frame of interest and the number of all block lines.

差分算出部110は、ブロックライン毎に発生符号量と目標符号量の差分を算出し、差分の積算値である積算差分量を更に算出する。 The difference calculation unit 110 calculates the difference between the generated code amount and the target code amount for each block line, and further calculates the integrated difference amount, which is the integrated value of the difference.

量子化値算出部111は、差分算出部110から通知される積算差分量D(i-1)に基づき、着目している第i番目のブロックラインの量子化パラメータQpを算出(更新)する。詳細は後述する。 The quantization value calculation unit 111 calculates (updates) the quantization parameter Qp of the i-th block line of interest based on the integrated difference amount D(i−1) notified from the difference calculation unit 110 . Details will be described later.

[量子化値算出]
量子化パラメータ算出方法の一つに、MPEG2 Test Model 5に示された公知技術がある。Test Model 5によれば、初期量子化パラメータQiniと、着目画素ブロックが第i番目としたとき、先頭画素ブロックから直前の第i-1番目までの各画素ブロックにおける符号量と1画素ブロック当たりの目標符号量の差の積算を表すΣE(i-1)から、次式(1)を用いて、着目画素ブロックの量子化パラメータQp[i]を算出する。
Qp[i] = Qini + r ×ΣE[i-1] …(1)
ここで、rは量子化パラメータの制御感度を示す。制御感度rが大きいほど、Qp[i]は、ΣE[i-1]に依存して大きく変動し、符号量の制御性が向上するものの、画質の変化も大きくなる。一方、制御感度rが小さいほど、Qp[i]は、ΣE[i-1]に依存せず、その変動も小さくなり、画質変化を小さくできるが、符号量の制御性は低下する。
[Quantization value calculation]
One of the quantization parameter calculation methods is a well-known technique shown in MPEG2 Test Model 5. According to Test Model 5, when the initial quantization parameter Qini and the pixel block of interest is the i-th pixel block, the code amount in each pixel block from the first pixel block to the immediately preceding i-1-th pixel block and the code amount per pixel block are The quantization parameter Qp[i] of the pixel block of interest is calculated from ΣE(i−1) representing the sum of the target code amount differences using the following equation (1).
Qp[i] = Qini + r × ΣE[i-1] … (1)
Here, r indicates the control sensitivity of the quantization parameter. As the control sensitivity r increases, Qp[i] varies greatly depending on ΣE[i−1], and the code amount controllability improves, but the change in image quality also increases. On the other hand, the smaller the control sensitivity r, the less the Qp[i] depends on ΣE[i−1] and the smaller its fluctuations.

実施形態では、ベイヤ配列の1フレームのRAW画像をR,G1,G2,Bプレーンに分離している。各プレーンを識別するための値0、1、2、3を各プレーンに割り当て、この値を変数plとして表す。また、各プレーンplの第i番目のブロックラインをBL(pl,i)と表す。そして、ブロックラインBL(pl,i)を符号化した場合に発生した符号化データの符号量をC(BL(pl,i))とし、1個のブロックラインの目標符号量をTCと表す。 In the embodiment, one frame of RAW image in Bayer array is separated into R, G1, G2, and B planes. Values 0, 1, 2, and 3 for identifying each plane are assigned to each plane, and these values are represented as variable pl. Also, the i-th block line of each plane pl is expressed as BL(pl,i). Let C(BL(pl,i)) be the code amount of encoded data generated when the block line BL(pl,i) is encoded, and let TC be the target code amount for one block line.

このとき、差分算出部110は、第1のブロックラインから、着目している第iのブロックラインの直前の第i-1のブロックラインまでの、発生符号量と目標符号量の差分の積算値ΣE[i-1]を次式(2)に従って算出する。
ΣE[i-1]=ΣΣ{TC-C(BL(pl,k))} …(2)
ここで、ΣΣは、pl=0,1,2,3、及び、k=0,1,2,…,i-1の合算を表す。
At this time, the difference calculation unit 110 calculates the integrated value of the difference between the generated code amount and the target code amount from the first block line to the (i−1)-th block line immediately before the i-th block line of interest. ΣE[i-1] is calculated according to the following equation (2).
ΣE[i-1]=ΣΣ{TC-C(BL(pl,k))} …(2)
where ΣΣ represents the sum of pl=0,1,2,3 and k=0,1,2,...,i-1.

量子化値算出部111は、上式(2)で求めた積算値ΣE[i-1]を、先に示した式(1)に当てはめて、着目している第i番目のブロックラインの量子化パラメータQpを算出する。そして、量子化値算出部111は、その量子化パラメータQpを、実際の各サブバンドの量子化パラメータQp[pl][sb]に変換した上で量子化部104に通知する。なお、pl,sbはそれぞれ、該当プレーン、該当のサブバンドの種類と分解レベルを示すものである。 The quantization value calculation unit 111 applies the integrated value ΣE[i−1] obtained by the above formula (2) to the above-described formula (1) to obtain the quantization value of the i-th block line of interest. Calculate the optimization parameter Qp. Then, quantization value calculation section 111 converts the quantization parameter Qp into the actual quantization parameter Qp[pl][sb] of each subband and notifies quantization section 104 of the result. Note that pl and sb indicate the corresponding plane, the type of the corresponding subband, and the decomposition level, respectively.

量子化値算出部111による、各プレーン、サブバンドの量子化パラメータの算出法を以下に説明する。量子化値算出部111は、式(3)に示すように、プレーンやサブバンド毎に有するマトリクスmtx及び量子化パラメータ重み設定部112で設定する光学的な水平と垂直方向の圧縮比率αに、式(1)で算出した量子化パラメータQpを乗算することで、Qp[pl][sb]を算出する。なお、量子化パラメータ重み設定部112で設定する光学的な水平と垂直方向の圧縮比率αは撮像部101で記録しているメタ情報を用いて設定する。
Qp[pl][sb] = Qp[i] × mtx[pl][sb] × α …(3)
なお、Qp[pl][sb]は式(3)を用いて算出せずに予めプリセット値として用意しておき、光学的な水平と垂直方向の圧縮比率に応じてプリセット値を切り替えられるようにしても良い。mtxの設定は一般的に、高周波域のサブバンドほどQpを大きく、低域のサブバンドほどQpを小さく設定し符号量制御を行うことで、人間の視覚特性上視認しづらい、画像データの高域成分ほど発生符号量を圧縮し、符号化効率を向上させる。そのため、マトリクスmtxは、高域サブバンドほど量子化パラメータQpが大きく、低域サブバンドほど量子化パラメータQpが小さくなるように設定する。また、マトリクスmtxは、同一分解レベルのHLサブバンドとLHサブバンドとでは量子化パラメータが同じとなるように設定されている。本実施形態では、マトリクスmtxは、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2:4:4:4:8:8:8:16、となるように設定されているものとする。
A method of calculating the quantization parameter of each plane and subband by quantization value calculation section 111 will be described below. As shown in equation (3), the quantization value calculation unit 111 uses the matrix mtx for each plane and subband and the optical horizontal and vertical compression ratio α set by the quantization parameter weight setting unit 112 as follows: Qp[pl][sb] is calculated by multiplying the quantization parameter Qp calculated by Equation (1). Note that the optical horizontal/vertical compression ratio α set by the quantization parameter weight setting unit 112 is set using meta information recorded by the imaging unit 101 .
Qp[pl][sb] = Qp[i] × mtx[pl][sb] × α … (3)
Instead of calculating Qp[pl][sb] using formula (3), prepare preset values in advance so that the preset values can be switched according to the optical horizontal and vertical compression ratios. can be In mtx settings, Qp is generally set larger for high-frequency sub-bands, and Qp is set smaller for low-frequency sub-bands. The generated code amount is compressed more for the area component, and the coding efficiency is improved. Therefore, the matrix mtx is set so that the quantization parameter Qp is larger for the higher frequency subbands and smaller for the lower frequency subbands. Also, the matrix mtx is set so that the quantization parameter is the same for the HL sub-band and the LH sub-band at the same decomposition level. In this embodiment, the matrix mtx is 3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2:4:4:4:8:8:8:16. It shall be set so that

ここで、光学的な水平と垂直方向の圧縮比率αに関して、図5(a)乃至(c)を参照して説明をする。 Here, the optical horizontal/vertical compression ratio α will be described with reference to FIGS. 5(a) to 5(c).

図5(a)は、撮像部101において水平、垂直方向とで圧縮比率が等しい1:1のレンズを用いて被写体を撮像した時の撮像画像を示している。被写体が円である場合、被写体における水平方向の長さと垂直方向の長さは1対1の関係であり、撮像画像においても被写体と同様に水平方向の長さと垂直方向の長さは1対1の関係となる。したがって、図5(a)の例では水平および垂直方向の光学的な圧縮比率αは1となる。 FIG. 5(a) shows an image captured by the imaging unit 101 using a lens with a horizontal and vertical compression ratio of 1:1. If the subject is a circle, the horizontal and vertical lengths of the subject have a one-to-one relationship. becomes a relationship. Therefore, in the example of FIG. 5A, the optical compression ratio α in the horizontal and vertical directions is 1.

次に、図5(b)に関して説明する。図5(b)は、撮像部101において2:1のレンズを用いて被写体を撮像した場合の撮像画像を示している。 Next, FIG. 5(b) will be described. FIG. 5(b) shows an image captured by the imaging unit 101 using a 2:1 lens.

被写体における水平方向の長さと垂直方向の長さの関係は図5(a)と同様に1対1であるが、撮像画像における水平方向の長さと垂直方向の長さの関係は水平方向に光学的に1/2倍に圧縮するレンズを用いて撮像するため1/2対1の関係となる。したがって、垂直方向を1(基準)とするときの水平方向の長さは1/2となるため、水平方向の光学的な圧縮比率αは1/2となり、垂直方向の光学的な圧縮比率αは1となる。 The relationship between the horizontal and vertical lengths of the subject is one-to-one, as in Fig. 5(a). Since the image is captured using a lens that compresses the image by a factor of 1/2, the relationship is 1/2:1. Therefore, since the horizontal length is 1/2 when the vertical direction is 1 (reference), the optical compression ratio α in the horizontal direction is 1/2, and the optical compression ratio α in the vertical direction is 1/2. becomes 1.

最後に、図5(c)に関して説明する。図5(c)は、撮像部101において1:2のレンズを用いて被写体を撮像した場合の撮像画像を示している。被写体における水平方向の長さと垂直方向の長さの関係は図5(a)および(b)と同様に1対1であるが、撮像画像における水平方向の長さと垂直方向の長さの関係は垂直方向に光学的に圧縮するレンズを用いて撮像するため1対1/2の関係となる。したがって、水平方向の長さを1(基準)としたときの垂直方向の長さは1/2となるため、垂直方向の光学的な圧縮比率αは1/2となり、水平方向の光学的な圧縮比率αは1となる。 Finally, reference is made to FIG. 5(c). FIG. 5(c) shows an image captured by the imaging unit 101 using a 1:2 lens. The relationship between the horizontal and vertical lengths of the subject is one-to-one, as in FIGS. 5(a) and 5(b). The relationship is 1:1/2 because the image is taken using a lens that optically compresses in the vertical direction. Therefore, when the horizontal length is 1 (reference), the vertical length is 1/2, so the vertical optical compression ratio α is 1/2, and the horizontal optical compression ratio is 1/2. The compression ratio α is 1.

ここでαの取得方法として、実施例では、量子化パラメータ重み設定部112が、撮像部101に装着したレンズユニットと通信して取得したメタ情報から取得するとしたが、ユーザ設定により取得しても良い。例えば、水平方向と垂直方向のレンズの圧縮比率の情報を、不図示の操作部、表示部を介して、ユーザが選択し、制御部150は、ユーザにより選択されたレンズの圧縮比を取得するようにしてもよい。また、光学的な水平と垂直方向の圧縮比率が等しいレンズか或いは圧縮比率が異なるレンズが装着されているか等といった情報から取得しても良い。 Here, as a method of acquiring α, in the embodiment, the quantization parameter weight setting unit 112 acquired from meta information acquired by communicating with the lens unit attached to the imaging unit 101, but α may be acquired by user setting. good. For example, the user selects information on the horizontal and vertical lens compression ratios via an operation unit and display unit (not shown), and the control unit 150 acquires the lens compression ratio selected by the user. You may do so. It may also be obtained from information such as whether a lens having the same optical compression ratio in the horizontal and vertical directions or a lens having a different compression ratio is attached.

次に、式(3)においてサブバンド毎に量子化パラメータ重み設定部112で設定する光学的な水平と垂直方向の圧縮比率αに基づく、量子化値算出部111が算出する量子化パラメータの算出処理の具体例を、図5(a)乃至(c)を再度参照して説明する。 Next, calculation of the quantization parameter calculated by the quantization value calculation unit 111 based on the optical horizontal and vertical compression ratio α set by the quantization parameter weight setting unit 112 for each subband in Equation (3). A specific example of processing will be described with reference to FIGS.

まず、図5(a)で示す光学的に水平と垂直方向で圧縮比率が等しい場合について説明する。図5(a)で撮像された画像に対して符号化を施し、その符号化画像を表示する場合、水平及び垂直方向いずれの方向に対しても伸張しないため、表示に伴う一方向の量子化歪の増大は発生しない。したがって、量子化値算出部111は、式(3)を用いて各サブバンドの量子化パラメータQpを算出する際は、HL,LHサブバンドを含む全てのサブバンドにおいてα=1、すなわちサブバンド毎に重みを変更しない設定にして算出する。よって、HL,LHサブバンドにおける量子化パラメータQpを算出する際のαの値として、以下式(4)の関係を適用する。
HL:LH=1:1 …(4)
First, the case shown in FIG. 5A where the compression ratio is optically equal in the horizontal and vertical directions will be described. When the image captured in FIG. 5(a) is coded and the coded image is displayed, it is not expanded in either the horizontal or vertical direction. No increase in strain occurs. Therefore, when quantization value calculation section 111 calculates quantization parameter Qp of each subband using equation (3), α=1 in all subbands including HL and LH subbands, that is, subband Calculation is performed by setting the weights not to be changed every time. Therefore, as the value of α when calculating the quantization parameter Qp in the HL and LH subbands, the relationship of Equation (4) below is applied.
HL:LH=1:1 (4)

そのため、各サブバンドの量子化パラメータの比率は、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2:4:4:4:8:8:8:16となる。 Therefore, the ratio of quantization parameters for each subband is 3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2:4:4:4:8:8:8 : 16.

次に図5(b)に示す2:1のレンズを用いた場合について説明する。図5(b)の場合、
垂直方向に対して水平方向は1/2で圧縮されて結像される。そのため、図5(a)の時と同様にサンバンド同一の量子化パラメータ重み設定にして符号化すると、符号化時には水平と垂直方向とで同程度の量子化歪となる。しかし、表示する際に水平方向のみが2倍に伸張されることで水平方向の量子化歪が増大し、その歪が画質劣化として視認されてしまう。そのため、水平方向の画質に関係するHLサブバンドの量子化パラメータQpを他のサブバンドと比較して小さくすることで水平方向の量子化歪の増大を抑制することが望まれる。そこで、量子化値算出部111は、式(3)を用いて各サブバンドの量子化パラメータQpを算出する際にsbがHLサブバンドの時は水平方向の光学的な圧縮比率α=1/2として量子化パラメータを算出する。なお、sbがLHサブバンドの時は垂直方向の光学的な圧縮比率α=1として量子化パラメータQpを算出する。よって、HL,LHサブバンドにおける量子化パラメータQpを算出する際のαの値として、以下式(5)の関係を適用する。
HL:LH=1/2:1…(5)
Next, the case of using the 2:1 lens shown in FIG. 5(b) will be described. In the case of Fig. 5(b),
The horizontal direction is compressed by 1/2 with respect to the vertical direction, and the image is formed. Therefore, if encoding is performed with the same quantization parameter weight setting for the sun band as in FIG. 5(a), the same degree of quantization distortion occurs in the horizontal and vertical directions during encoding. However, since only the horizontal direction is doubled when displayed, quantization distortion in the horizontal direction increases, and the distortion is visually recognized as image quality deterioration. Therefore, it is desirable to suppress an increase in horizontal quantization distortion by making the quantization parameter Qp of the HL subband, which relates to image quality in the horizontal direction, smaller than that of other subbands. Therefore, when sb is the HL subband when calculating the quantization parameter Qp of each subband using equation (3), quantization value calculation section 111 uses the horizontal optical compression ratio α=1/ Calculate the quantization parameter as 2. When sb is the LH subband, the quantization parameter Qp is calculated with the vertical optical compression ratio α=1. Therefore, as the value of α when calculating the quantization parameter Qp in the HL and LH subbands, the relationship of Equation (5) below is applied.
HL: LH = 1/2: 1 (5)

このように、垂直方向よりも水平方向に画像が圧縮されるレンズの場合は、垂直方向に対する水平方向の圧縮比率をAとすると(A<1)、各サブバンドの量子化パラメータの比率は、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2×A:2:4:4×A:4:8:8×A:8:16、となる。図5(b)の2:1のレンズの場合は、垂直方向に対して水平方向に1/2に圧縮して結像されるため、垂直方向に対する水平方向の圧縮比率A=1/2となる。そのため、各サブバンドの量子化パラメータの比率は、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2×1/2:2:4:4×1/2:4:8:8×1/2:8:16、となる。2:1のレンズについて説明したが、1.33:1のレンズ(垂直方向に対して水平方向に1/1.33に圧縮して結像されるレンズ)の場合はA=1/1.33となり、Aの重み係数を用いて量子化パラメータが決定される。なお、レンズからレンズの圧縮比率の情報を取得するのではなく、ユーザが、レンズの(撮影画像の)水平方向と垂直方向の圧縮比率を選択し、ユーザに選択された圧縮比率から、垂直方向に対する水平方向の圧縮比率であるAを決定するようにしてもよい。 Thus, in the case of a lens that compresses an image more horizontally than vertically, if A is the horizontal to vertical compression ratio (A < 1), then the ratio of the quantization parameter for each subband is 3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2×A:2:4:4×A:4:8:8×A:8:16. In the case of the 2:1 lens in FIG. 5(b), since the image is formed by compressing the horizontal direction to 1/2 with respect to the vertical direction, the horizontal compression ratio A=1/2. Become. Therefore, the ratio of quantization parameters for each subband is 3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2×1/2:2:4:4×1/2 : 4:8:8*1/2:8:16. A 2:1 lens has been described, but in the case of a 1.33:1 lens (a lens that forms an image by compressing the horizontal direction to 1/1.33 with respect to the vertical direction), A=1/1. 33 and the weighting factor of A is used to determine the quantization parameter. Note that instead of acquiring information on the compression ratio of the lens from the lens, the user selects the horizontal and vertical compression ratios (of the captured image) of the lens, and from the compression ratio selected by the user, the vertical A, which is the horizontal compression ratio for , may be determined.

最後に、図5(c)に示す1:2のレンズを用いた場合について説明する。図5(c)の場合、図5(a)時と同様にサンバンド同一の量子化パラメータ重み設定をすると、符号化時には水平と垂直方向とで同程度の量子化歪となる。しかし、表示する際に垂直方向のみが2倍に伸張されることで垂直方向の量子化歪が増大し、その歪が画質劣化として視認されてしまう。そのため、垂直方向の画質に関係するLHサブバンドの量子化パラメータQpを他のサブバンドと比較して小さくすることで垂直方向の量子化歪の増大を抑制することが望まれる。そこで、量子化値算出部111は、式(3)を用いて各サブバンドの量子化パラメータQpを算出する際にsbがLHサブバンドを示す場合は垂直方向の光学的な圧縮比率α=1/2として量子化パラメータQpを算出する。なお、sbがHLサブバンドの場合は水平方向の光学的な圧縮比率α=1として量子化パラメータQpを算出する。よって、HL,LHサブバンドにおける量子化パラメータQpを算出する際のαの値として、以下式(6)の関係を適用する。
HL:LH=1:1/2…(6)
Finally, the case of using the 1:2 lens shown in FIG. 5(c) will be described. In the case of FIG. 5(c), if the same quantization parameter weights are set for the sun band as in the case of FIG. 5(a), the same level of quantization distortion occurs in the horizontal and vertical directions during encoding. However, when the image is displayed, only the vertical direction is expanded by a factor of 2, resulting in an increase in quantization distortion in the vertical direction, and the distortion is visually recognized as image quality deterioration. Therefore, it is desirable to suppress an increase in quantization distortion in the vertical direction by making the quantization parameter Qp of the LH subband, which relates to image quality in the vertical direction, smaller than that of other subbands. Therefore, when sb indicates the LH subband when calculating the quantization parameter Qp of each subband using equation (3), quantization value calculation section 111 sets the vertical optical compression ratio α=1. Calculate the quantization parameter Qp as /2. When sb is the HL subband, the quantization parameter Qp is calculated with the horizontal optical compression ratio α=1. Therefore, as the value of α when calculating the quantization parameter Qp in the HL and LH subbands, the relationship of Equation (6) below is applied.
HL:LH=1:1/2…(6)

水平方向よりも垂直方向に画像が圧縮されるレンズの場合は、水平方向に対する垂直方向の圧縮比率をBとすると(B<1)、各サブバンドの量子化パラメータの比率は、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2×B:4:4:4×B:8:8:8×B:16、となる。図5(c)の1:2のレンズの場合は、水平方向に対して垂直方向に画像が1/2に圧縮して結像されるため、水平方向に対する垂直方向の比率B=1/2となる。そのため、各サブバンドの量子化パラメータの比率は、3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2×1/2:4:4:4×1/2:8:8:8×1/2:16、となる。1:2のレンズについて説明したが、1:1.5のレンズ(水平方向に対して垂直方向に画像が1/1.5に圧縮して結像するレンズ)の場合は、水平方向に対する垂直方向の圧縮比率B=1/1.5として、量子化パラメータを決定する。なお、レンズから圧縮比率の情報を取得するのではなく、ユーザが、レンズの(撮影画像の)水平方向と垂直方向の圧縮比率を選択し、ユーザに選択された圧縮比率から、水平方向に対する垂直方向の圧縮比率であるBを決定するようにしてもよい。 For a lens that compresses the image more vertically than horizontally, let B be the vertical to horizontal compression ratio (B<1), then the ratio of the quantization parameters for each subband is 3LL:3HL: 3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2×B:4:4:4×B:8:8:8×B:16. In the case of the 1:2 lens in FIG. 5(c), since the image is compressed in the vertical direction to 1/2 with respect to the horizontal direction, the ratio of the vertical direction to the horizontal direction is B=1/2. becomes. Therefore, the ratio of quantization parameters for each subband is 3LL:3HL:3LH:3HH:2HL:2LH:2HH:1HL:1LH:1HH=1:2:2×1/2:4:4:4×1 /2:8:8:8*1/2:16. A 1:2 lens has been described, but in the case of a 1:1.5 lens (a lens that forms an image by compressing the image vertically to the horizontal direction to 1/1.5), the vertical A quantization parameter is determined with a directional compression ratio B=1/1.5. Instead of obtaining compression ratio information from the lens, the user selects the horizontal and vertical compression ratios (of the captured image) of the lens, and from the compression ratio selected by the user, the vertical B, which is the directional compression ratio, may be determined.

このように、水平方向に圧縮されているか(図5b)、垂直方向に圧縮されているか(図c)に応じて、各サブバンドの量子化パラメータにおいて重み付けされるサブバンドが切り替わる。そして、水平方向に圧縮されている(図5b)場合は、HLサブバンドの量子化パラメータが小さくなるように、垂直方向に対する水平方向の圧縮率AでHLサブバンドに対して重み付けする。そして、垂直方向に圧縮されている(図5c)場合は、LHサブバンドの量子化パラメータが小さくなるように、水平方向に対する垂直方向の圧縮率Bでサブバンドに対して重み付けする。 Thus, depending on whether it is compressed horizontally (Fig. 5b) or vertically (Fig. c), the subbands that are weighted in the quantization parameter of each subband switch. Then, when horizontally compressed (Fig. 5b), the HL subbands are weighted by a horizontal to vertical compression ratio A such that the quantization parameter of the HL subbands is small. Then, when vertically compressed (FIG. 5c), the subbands are weighted by a vertical compression ratio B relative to the horizontal, such that the quantization parameter of the LH subband is small.

以上のように、光学的な水平と垂直方向の圧縮比率に応じて、サブバンド毎に量子化パラメータ重み設定部112で設定するαの値を変更することで表示時に伴う、一方向への量子化歪の増大を抑制することができる。なお、sbがHHサブバンドの場合は、HL,LHサブバンドとは異なり、光学的な水平と垂直方向の圧縮比率に応じて、量子化パラメータの重みは変更せず(α=1)に量子化パラメータQpを算出する。これまで、2:1や1:2のレンズを用いた例を使って、サブバンド毎の量子化パラメータ重み設定方法を説明したが水平と垂直方向の光学的な圧縮比率としてこれに限るものではない。また、光学的な圧縮比率αは水平と垂直方向の比率ではなく、光学的な水平と垂直方向の比率に近い数値を適用するとしても良い。 As described above, by changing the value of α set by the quantization parameter weight setting unit 112 for each subband according to the optical horizontal and vertical compression ratios, quantization in one direction accompanying display is performed. An increase in distortion can be suppressed. When sb is the HH subband, unlike the HL and LH subbands, the weight of the quantization parameter remains unchanged (α=1) according to the optical horizontal and vertical compression ratios. Calculate the optimization parameter Qp. So far, we have explained how to set the quantization parameter weights for each subband using examples using 2:1 and 1:2 lenses, but the optical compression ratio in the horizontal and vertical directions is not limited to this. do not have. Also, the optical compression ratio α may be a numerical value close to the optical ratio between the horizontal and vertical directions, instead of the ratio between the horizontal and vertical directions.

[画像復号装置]
次に、実施形態における画像復号装置について説明する。
[Image decoding device]
Next, the image decoding device according to the embodiment will be described.

図8は、上記の画像符号化装置(図1)で生成された符号化画像データを復号する画像復号装置800の復号に係る主要部のブロック構成図である。符号化と復号は表裏の関係にあるので、以下、同図を参照し、画像復号装置の復号に係る構成とその処理内容を簡単に説明する。 FIG. 8 is a block configuration diagram of the main part related to decoding of an image decoding device 800 that decodes the encoded image data generated by the image encoding device (FIG. 1). Since encoding and decoding are two sides of the same coin, the configuration and processing contents of the image decoding apparatus for decoding will be briefly described below with reference to FIG.

画像復号装置800は、装置全体の制御を司る制御部850を有する。この制御部850は、CPU、CPUが実行するプログラムを保持するROM、並びに、ワークエリアとして使用するRAMで構成される。 The image decoding device 800 has a control unit 850 that controls the entire device. The control unit 850 is composed of a CPU, a ROM that holds programs executed by the CPU, and a RAM that is used as a work area.

ヘッダ解析部801は、復号対象の符号化画像データのファイルヘッダを解析し、復号に必要な情報を取得する。この情報には、初期の量子化値(図1の初期量子化値設定部115に相当)、初期目標符号量(図1の初期目標符号量設定部114に相当)、光学的な水平・垂直方向の圧縮比率を表す情報をはじめ、復号に必要な情報が含まれる。なお、初期の量子化値、初期目標符号量が、符号化装置と復号装置との間で予め統一されているのであれば、これらの情報をファイルヘッダに含める必要はない。 A header analysis unit 801 analyzes the file header of encoded image data to be decoded, and acquires information necessary for decoding. This information includes an initial quantization value (corresponding to the initial quantization value setting section 115 in FIG. 1), an initial target code amount (corresponding to the initial target code amount setting section 114 in FIG. 1), optical horizontal/vertical It contains information necessary for decoding, including information representing the compression ratio of the direction. Note that if the initial quantization value and the initial target code amount are unified in advance between the encoding device and the decoding device, there is no need to include these pieces of information in the file header.

量子化制御部810を構成する、量子化パラメータ重み設定部811、目標符号量算出部812、量子化値算出部813、符号量保持部814、差分算出部815は、図1の同名の構成と実質的に同じ機能を有するものと理解されたい。 A quantization parameter weight setting unit 811, a target code amount calculation unit 812, a quantization value calculation unit 813, a code amount holding unit 814, and a difference calculation unit 815, which constitute the quantization control unit 810, have the same configuration as in FIG. It should be understood that they have substantially the same functionality.

ヘッダ解析部801は、解析で得た初期の量子化値を量子化制御部量子化値算出部812に、初期の目標符号量を目標符号量算出部113に、そして、光学的な水平・垂直方向の圧縮比率を表す情報を量子化パラメータ重み設定部811及び出力部807に供給する。 The header analysis unit 801 supplies the initial quantization value obtained by the analysis to the quantization control unit quantization value calculation unit 812, the initial target code amount to the target code amount calculation unit 113, and optical horizontal/vertical Information representing the directional compression ratio is supplied to the quantization parameter weight setting unit 811 and the output unit 807 .

復号部802はヘッダに後続する符号化データの復号処理を行うことで、各プレーンのサブバンドにおける、ブロックラインの量子化係数を得る。復号部802は、復号処理で得た全プレーンの量子化係数を逆量子化部803に供給する。なお、復号部802は、復号処理にて、各プレーンの各ブロックラインの符号化データ量がわかるので、そのブロックラインの符号量が判明するたびに、その符号量を表す情報を符号量保持部814に供給する。 The decoding unit 802 obtains the quantization coefficients of the block lines in the subbands of each plane by decoding the encoded data following the header. The decoding unit 802 supplies the quantization coefficients of all planes obtained by the decoding process to the inverse quantization unit 803 . Since the decoding unit 802 knows the encoded data amount of each block line of each plane in the decoding process, every time the code amount of the block line is found, the information representing the code amount is stored in the code amount holding unit. Supply to 814.

この結果、ブロックラインの復号が進む過程にて、量子化値算出部813が、先に示した符号化側が用いた式(1)乃至(3)に従って、次のブロックラインの量子化パラメータを決定していくことができる。 As a result, in the process of decoding the block line, the quantization value calculation unit 813 determines the quantization parameter of the next block line according to the above-described equations (1) to (3) used by the encoding side. can continue.

逆量子化部803は、各プレーンについて、ブロックライン単位に、量子化制御部810から設定された量子化パラメータに従って逆量子化し、DWTの変換係数を得る。当然、逆量子化部803に設定する量子化パラメータは、画像符号化装置で用いた量子化パラメータと同じである。逆量子化部803は、逆量子化後の変換係数を逆DWT部804に供給する。 The inverse quantization unit 803 performs inverse quantization on each block line according to the quantization parameter set by the quantization control unit 810 for each plane, and obtains DWT transform coefficients. Naturally, the quantization parameter set in the inverse quantization unit 803 is the same as the quantization parameter used in the image coding device. The inverse quantization section 803 supplies the inverse quantized transform coefficients to the inverse DWT section 804 .

逆DWT部804は、逆量子化部803より入力した変換係数について、逆DWT(逆ウェーブレット変換)を行い、その結果をメモリ806に出力する。この結果、復号処理の進行に応じて、4つのプレーンがメモリ806に構築されていくことになる。 Inverse DWT section 804 performs inverse DWT (inverse wavelet transform) on the transform coefficients input from inverse quantization section 803 and outputs the result to memory 806 . As a result, four planes are constructed in the memory 806 as the decoding process progresses.

プレーン統合部806は、4つプレーンの統合処理を行い、ベイヤ配列のRAW画像を生成し、出力部807に供給する。 A plane integration unit 806 performs integration processing of four planes, generates a Bayer array RAW image, and supplies it to an output unit 807 .

出力部807は、例えば、入力したRAW画像の現状処理を行い、1画素がRGBの3成分で構成される通常のカラー画像を生成する。そして、出力部807は、生成したカラー画像に対し、ヘッダ解析部801から供給された水平・垂直方向の圧縮比率を示す情報に従い、生成されたカラー画像の水平、垂直方向への補間処理を行い、外部の表示装置に出力する。ただし、水平・垂直方向の圧縮比率が1:1の場合、出力部807は、補間処理は行わない。なお、出力部807の出力先が、印刷装置である場合は、YMCK等の色成分を持つ画像を生成したのち、水平、垂直方向への補間処理を行うことになる。 The output unit 807, for example, performs current processing on the input RAW image to generate a normal color image in which one pixel is composed of three components of RGB. Then, the output unit 807 performs interpolation processing on the generated color image in the horizontal and vertical directions according to the information indicating the horizontal and vertical compression ratios supplied from the header analysis unit 801. , output to an external display device. However, when the horizontal/vertical compression ratio is 1:1, the output unit 807 does not perform interpolation processing. Note that when the output destination of the output unit 807 is a printing device, after generating an image having color components such as YMCK, interpolation processing in the horizontal and vertical directions is performed.

上記復号処理において、ブロックライン単位に復号処理が行われている最中、量子化制御部810の量子化値算出部813は、各プレーンのブロックラインについての逆量子化を行うための量子化パラメータを更新することになる。その量子化パラメータの更新処理は、図1の撮像装置100における量子化値算出部111と同じであるので、ここでの詳述は省略する。 In the decoding process described above, while the decoding process is being performed for each block line, the quantization value calculation unit 813 of the quantization control unit 810 calculates a quantization parameter for performing inverse quantization on the block line of each plane. will be updated. The update processing of the quantization parameter is the same as that of the quantization value calculation unit 111 in the imaging apparatus 100 in FIG. 1, so detailed description is omitted here.

[第1の実施形態の変形例]
上記の第1の実施形態に相当する処理を、例えばパーソナルコンピュータに代表される情報処理装置が実行するアプリケーションによって実現する例を、第1の実施形態に変形例として説明する。
[Modification of First Embodiment]
An example in which processing corresponding to the first embodiment described above is realized by an application executed by an information processing apparatus represented by a personal computer, for example, will be described as a modification of the first embodiment.

図9は、情報処理装置のブロック構成図である。本装置の電源がONになると、CPU901はROM902に格納されたブートプログラムを実行し、ハードウェア初期化処理を行い、HDD(ハードディスク)904に格納されているOS(Operating System)をRAM903にロードし、OSに制御を移す(実行)することで、本装置が情報処理装置として機能する。つまり、表示部906、キーボード907,マウス908がユーザとのインタフェースとして機能する。I/F905は、外部機器と通信するためのインタフェースであり、典型的には、ネットワークインタフェース、USB(Universal Serial Bus)等である。本実施形態における符号化対象のRAW画像データも、このI/F905を介して外部から入力することになる。上記構成において、ユーザが、キーボード907、或いはマウス908を操作して、所定の指示入力を行うと、CPU901は、HDD904から符号化アプリケーション、或いは、復号アプリケーションをRAM903にロードし、実行することで、本装置が画像符号化装置、或いは、画像復号装置として機能することになる。 FIG. 9 is a block configuration diagram of an information processing device. When the apparatus is powered on, the CPU 901 executes the boot program stored in the ROM 902, performs hardware initialization processing, and loads the OS (Operating System) stored in the HDD (hard disk) 904 into the RAM 903. , the apparatus functions as an information processing apparatus by transferring (executing) control to the OS. In other words, the display unit 906, keyboard 907, and mouse 908 function as an interface with the user. The I/F 905 is an interface for communicating with external devices, typically a network interface, USB (Universal Serial Bus), or the like. RAW image data to be encoded in this embodiment is also input from the outside via this I/F 905 . In the above configuration, when the user operates the keyboard 907 or the mouse 908 to input a predetermined instruction, the CPU 901 loads the encoding application or the decoding application from the HDD 904 into the RAM 903 and executes it. This device functions as an image encoding device or an image decoding device.

以下、本装置が、画像符号化装置として機能した場合の処理を図10のフローチャートを参照して説明する。基本的に、CPU901がプログラムを実行することで画像符号化装置として機能した場合、CPU901は図1における各処理部に相当する処理を行うことになるので、その詳細については第1の実施形態を参照されたい。 Processing when this apparatus functions as an image encoding apparatus will be described below with reference to the flowchart of FIG. Basically, when the CPU 901 functions as an image encoding device by executing a program, the CPU 901 performs processing corresponding to each processing unit in FIG. 1. For details, refer to the first embodiment. Please refer to

また、以下の説明は、HDD904には、既に符号化対象のベイヤ配列のRAW画像データがファイルとして格納されているものとする。また、そのファイルのヘッダには、撮影時の光学的な水平・垂直方向の圧縮比率を示す情報が格納されているものとする。 In the following description, it is assumed that the HDD 904 already stores Bayer array RAW image data to be encoded as a file. It is also assumed that the header of the file stores information indicating the optical horizontal/vertical compression ratio at the time of shooting.

S101にて、CPU901は、符号化対象のRAW画像ファイルから、光学的な水平・垂直方向の圧縮比率を示す情報を取得する。なお、この情報は、ユーザが操作部より入力しても構わない。 In S101, the CPU 901 acquires information indicating the optical horizontal/vertical compression ratio from the RAW image file to be encoded. Note that this information may be input by the user through the operation unit.

そして、S102にて、CPU901は、該当ファイルからRAW画像データを入力し、RAM903に展開する。 Then, in S102, the CPU 901 inputs RAW image data from the file and develops it in the RAM 903. FIG.

S103にて、CPU901は、RAM903に展開されたRAW画像データから、R,G1,G2,Bの4つのプレーンを生成し、RAM903に格納する。 In S103, the CPU 901 generates four planes R, G1, G2, and B from the RAW image data developed in the RAM 903 and stores them in the RAM 903. FIG.

S104にて、CPU901は、符号化に先立って、各種パラメータの初期化を行う。この初期化処理では、初期量子化値、初期目標符号量等の設定が含まれる。この初期化処理では、ブロックラインの符号量と目標ブロックラインの符号量との累積和を格納する領域をゼロクリアにする処理も含まれる。 At S104, the CPU 901 initializes various parameters prior to encoding. This initialization process includes settings such as an initial quantization value and an initial target code amount. This initialization process also includes a process of zero-clearing the area storing the cumulative sum of the code amount of the block line and the code amount of the target block line.

S105にて、CPU901は、4つのプレーンそれぞれに対してDWTを行う。CPU901は、この処理で得たサブバンドをRAM903に格納する。図10のフローチャートにおいてS105が示すボックスが4つ存在するのは、4つのプレーンについて行うことを示している。 In S105, the CPU 901 performs DWT on each of the four planes. The CPU 901 stores the subbands obtained by this processing in the RAM 903 . The presence of four boxes indicated by S105 in the flowchart of FIG. 10 indicates that four planes are to be processed.

S106にて、CPU901は、ブロックラインの順番を規定する変数iに、初期値“1”を設定する。そして、S107にて、CPU901は、RAM903に記憶されているDWTで得たサブバンドから、各プレーンの符号化対象となる第iのブロックラインのDWT係数を読み出し、量子化する。 In S106, the CPU 901 sets the initial value "1" to the variable i that defines the order of the block lines. Then, in S107, the CPU 901 reads the DWT coefficients of the i-th block line to be encoded in each plane from the subbands obtained by the DWT stored in the RAM 903, and quantizes them.

S108にて、CPU901は、各プレーンの第iのブロックラインの量子化係数の符号化を行い、生成した符号化データをRAM903に一時的に格納する。この際、CPU901は、各プレーンの第iのブロックラインの符号化データ量と目標ブロックラインとの差分を求め、その差分を累積加算していく(数式(2)に相当する処理である)。 In S108, the CPU 901 encodes the quantization coefficient of the i-th block line of each plane, and temporarily stores the generated encoded data in the RAM 903. FIG. At this time, the CPU 901 obtains the difference between the coded data amount of the i-th block line of each plane and the target block line, and accumulatively adds the difference (this is processing corresponding to expression (2)).

S109にて、CPU901は、次に符号化することになるブロックラインのための量子化パラメータを更新する(数式(3)に相当する処理である)。 In S109, the CPU 901 updates the quantization parameter for the block line to be encoded next (this is processing corresponding to Equation (3)).

そして、S110にて、CPU901は、全ブロックラインを符号化したか否かを、変数iの値に基づいて判定する。そして、未符号化のブロックラインが存在する場合、CPU901は処理をS111に進め、変数iを1つ増加させる。そして、CPU109は、次のブロックラインの符号化を行うべく、処理をS107に戻す。 Then, in S110, the CPU 901 determines whether or not all block lines have been encoded based on the value of the variable i. Then, if there is an unencoded block line, the CPU 901 advances the process to S111 and increments the variable i by one. Then, the CPU 109 returns the process to S107 to encode the next block line.

一方、全ブロックラインの符号化を終えた場合、CPU901は処理をS110からS112に進める。このS112にて、CPU901は、HDD904に、復号に必要な各種情報(水平・垂直の圧縮比率を示す情報を含む)を含むファイルヘッダを作成する。そして、CPU901は、そのファイルヘッダに後続して、RAM903に格納記憶されている符号化データを、予め設定されたフォーマット構造にした上で出力することで、符号化画像データファイルを作成する。 On the other hand, if all block lines have been encoded, the CPU 901 advances the process from S110 to S112. At S112, the CPU 901 creates a file header containing various information (including information indicating horizontal/vertical compression ratios) necessary for decoding in the HDD 904 . After the file header, the CPU 901 outputs the encoded data stored in the RAM 903 in a preset format structure, thereby creating an encoded image data file.

次に、本装置が、画像復号装置として機能した場合の処理を図11のフローチャートを参照して説明する。基本的に、CPU901が復号プログラムを実行することで画像符号化装置として機能した場合、CPU901は図8における各処理部に相当する処理を行うことになるので、その詳細については第1の実施形態を参照されたい。 Next, processing when this device functions as an image decoding device will be described with reference to the flowchart of FIG. Basically, when the CPU 901 functions as an image encoding device by executing a decoding program, the CPU 901 performs processing corresponding to each processing unit in FIG. See

また、以下の説明は、HDD904には、既に符号化画像ファイルが格納されており、復号処理を行って表示部906に画像を表示するまでを説明する。 In the following description, an encoded image file is already stored in the HDD 904, and decoding processing is performed to display the image on the display unit 906. FIG.

S201にて、CPU901は、復号対象の符号化画像ファイルのファイルヘッダを解析し、光学的な水平・垂直方向の圧縮比率を示す情報を取得する。なお、この情報は、ユーザが操作部より入力しても構わない。 In S201, the CPU 901 analyzes the file header of the encoded image file to be decoded and acquires information indicating the optical horizontal/vertical compression ratio. Note that this information may be input by the user through the operation unit.

そして、S202にて、CPU901は、復号に先立って、各種パラメータの初期化を行う。この初期化処理では、初期量子化値、初期目標符号量等の設定が含まれる。また、この初期化処理では、ブロックラインの符号量と目標ブロックラインの符号量との累積和を格納するRAM903における領域をゼロクリアにする処理も含まれる。次のS203にて、CPUは、ブロックラインの順番を規定する変数iに、初期値“1”を設定する。 In S202, the CPU 901 initializes various parameters prior to decoding. This initialization process includes settings such as an initial quantization value and an initial target code amount. This initialization process also includes a process of zero-clearing the area in the RAM 903 that stores the cumulative sum of the code amount of the block line and the code amount of the target block line. In the next S203, the CPU sets the initial value "1" to the variable i that defines the order of the block lines.

S204にて、CPU901は、各プレーンの第iのブロックラインの復号を行い、量子化変換係数を得る。この際、第iのブロックラインの符号量が判明するので、CPU901は、その符号量と目標ブロックラインの符号量と差を求め、先に示した領域の値に足し込むことで更新する(式(2)に相当する処理である)。 At S204, the CPU 901 decodes the i-th block line of each plane to obtain quantized transform coefficients. At this time, since the code amount of the i-th block line is known, the CPU 901 obtains the difference between that code amount and the code amount of the target block line, and updates the value by adding it to the value of the previously shown area (formula This process corresponds to (2)).

S205にて、CPU901は、各プレーンの第iのブロックラインの量子化係数に対して逆量子化を行う。変数iは“1”の場合には、初期化処理で得た量子化パラメータに従って量子化が行われる。また、変数iが“1”以外の場合には、直前のブロックラインを復号処理による更新後の量子化パラメータを用いて逆量子化を行うことになる。 In S205, the CPU 901 performs inverse quantization on the quantized coefficients of the i-th block line of each plane. When the variable i is "1", quantization is performed according to the quantization parameter obtained in the initialization process. Also, when the variable i is other than "1", the immediately preceding block line is subjected to inverse quantization using the quantization parameter updated by the decoding process.

S206にて、CPU901は、逆量子化で得た変換係数に対して、逆DWTを行い、ブロックラインの画像を得る。CPU901は、得られたブロックラインの画像データをRAM903に格納する。なお、逆DWTを行う場合には、利用するフィルタのタップ数の変換係数が揃っている必要があるので、それに満たない場合には逆DWTは行わない。 In S206, the CPU 901 performs inverse DWT on the transform coefficients obtained by inverse quantization to obtain a block line image. The CPU 901 stores the obtained block line image data in the RAM 903 . When the inverse DWT is performed, it is necessary that the transform coefficients of the number of taps of the filter to be used are equal.

S207にて、CPU901は、次のブロックラインの復号に備え、ブロックラインの符号量と目標ブロックラインの符号量と差の累積和に基づき、量子化パラメータを更新する(式(3)に相当する処理である)。つまり、光学的な水平・垂直方向の圧縮比率に従って、各サブバンドに応じた量子化パラメータが決定される。 In S207, the CPU 901 updates the quantization parameter based on the cumulative sum of the difference between the code amount of the block line and the code amount of the target block line (corresponding to equation (3)) in preparation for decoding the next block line. processing). That is, the quantization parameter corresponding to each subband is determined according to the optical horizontal/vertical compression ratio.

S208にて、CPU901は、全ブロックラインの復号を終えたか否かを判定する。未復号のブロックラインが存在する場合、CPU901は処理をS209に進め、変数iを“1”だけ増加させる。そして、CPU901は、次のブロックラインを復号するために、処理をS204に戻す。 In S208, the CPU 901 determines whether decoding of all block lines has been completed. If there is an undecoded block line, the CPU 901 advances the process to S209 and increments the variable i by "1". The CPU 901 then returns the process to S204 to decode the next block line.

一方、全ブロックラインの復号を終えた場合、CPU901は、処理をS208からS211に進める。このS210にて、CPU901は、RAM903に再生された4つのプレーンの統合処理を行い、ベイヤ配列のRAW画像を生成する。そして、CPU901は、S211に処理を進める。 On the other hand, if all block lines have been decoded, the CPU 901 advances the process from S208 to S211. In S210, the CPU 901 integrates the four planes reproduced in the RAM 903 to generate a Bayer array RAW image. Then, the CPU 901 advances the process to S211.

S211にて、CPU901は、生成されたRAW画像に対して現像処理を行って、1画素がR,G,Bの成分で構成されるカラー画像を生成する。そして、CPU901は、生成されたカラー画像に対し、S201で取得した水平・垂直方向の圧縮比率に従って、水平、もしくは垂直方向への拡大処理を行い、水平・垂直方向の尺度が1:1の画像を生成し、表示部906に出力する。 In S211, the CPU 901 performs development processing on the generated RAW image to generate a color image in which one pixel is composed of R, G, and B components. Then, the CPU 901 horizontally or vertically enlarges the generated color image in accordance with the horizontal/vertical compression ratio acquired in S201, resulting in an image with a horizontal/vertical scale of 1:1. is generated and output to the display unit 906.

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

[第2の実施形態]
次に第2の実施形態を説明する。本第2の実施形態における装置構成は、第1の実施形態の図1と同じである。
[Second embodiment]
Next, a second embodiment will be described. The device configuration in the second embodiment is the same as that in FIG. 1 of the first embodiment.

ただし、本第2の実施形態におけるプレーン変換部102は、RAW画像データから、1枚の輝度プレーン(Yプレーン)と3枚の輝度以外のプレーンに変換する。また、第1の実施形態では、光学的な水平と垂直方向の圧縮比率のみを用いて、各プレーンにおけるサブバンド毎の量子化パラメータ重みを決定していたのに対し、本第2の実施形態では光学的な圧縮比率及び各プレーンの信号成分方向の特徴も加味して、量子化パラメータを決定する例を説明する。 However, the plane conversion unit 102 in the second embodiment converts RAW image data into one luminance plane (Y plane) and three non-luminance planes. Also, in the first embodiment, only the optical horizontal and vertical compression ratios are used to determine the quantization parameter weights for each subband in each plane. Now, an example of determining the quantization parameter in consideration of the optical compression ratio and the characteristics of the signal component direction of each plane will be described.

本第2の実施形態におけるプレーン変換部102は、RAW画像データを、次式(7)乃至(9)に従って輝度以外の3つプレーン(U,V,GHプレーン)と、式(10)に示した輝度プレーン(Yプレーン)に変換する。
U = B-(G1+G2)/2 …(7)
V = R-(G1+G2)/2 …(8)
GH = G1-G2 …(9)
Y = (R+B+G1+G2)/4 …(10)
The plane conversion unit 102 in the second embodiment converts the RAW image data into three planes (U, V, GH planes) other than the luminance according to the following equations (7) to (9), and converted to the luminance plane (Y plane).
U = B-(G1+G2)/2 (7)
V = R-(G1+G2)/2 … (8)
GH = G1-G2 (9)
Y = (R+B+G1+G2)/4 … (10)

本第2の実施形態では、プレーン変換の一例として上記のように各プレーンを変換したが、変換方法はこれに限るものではない。 In the second embodiment, each plane is converted as described above as an example of plane conversion, but the conversion method is not limited to this.

各プレーンにおける信号成分の方向を表したものを図6(a)乃至(d)に示す。図6(a)乃至(d)では、図2で示したベイヤ配列における隣接する2×2画素(R,G1,G2,B)に着目した図である。 FIGS. 6(a) to 6(d) show the directions of the signal components in each plane. 6A to 6D are diagrams focusing on adjacent 2×2 pixels (R, G1, G2, B) in the Bayer array shown in FIG.

まず、Uプレーンは、式(7)より、G1成分とG2成分との加算平均値と、B成分との差分となる。そのため、信号成分Uが表す方向は、図6(a)に示すようにB成分の重心位置である点P’とG1成分とG2成分を加算平均した信号の重心位置である点Q’を実線で結んだ斜め方向となる。 First, the U-plane is the difference between the addition average value of the G1 component and the G2 component and the B component according to Equation (7). Therefore, as shown in FIG. 6(a), the direction represented by the signal component U is the point P', which is the center of gravity of the B component, and the point Q', which is the center of gravity of the signal obtained by adding and averaging the G1 and G2 components. It becomes a diagonal direction connected by

Vプレーンは、式(8)より、G1成分とG2成分との加算平均と、R成分との差分となる。信号成分Vが表す方向は、図6(b)に示すようにR成分の重心位置である点S’と、G1成分とG2成分を加算平均した信号の重心位置である点T’を実線で結んだ斜め方向となる。 The V plane is the difference between the arithmetic mean of the G1 component and the G2 component and the R component, according to Equation (8). As shown in FIG. 6(b), the direction represented by the signal component V is the point S', which is the center of gravity of the R component, and the point T', which is the center of gravity of the signal obtained by adding and averaging the G1 and G2 components. It becomes the diagonal direction that connects.

GHプレーンは、式(9)より、G1成分とG2成分の差分である。そのため信号成分GHが表す方向は、図6(c)に示すように、G1成分の重心位置V’とG2成分の重心位置W’を実線で結んだ斜め方向となる。 The GH plane is the difference between the G1 component and the G2 component according to Equation (9). Therefore, as shown in FIG. 6(c), the direction represented by the signal component GH is an oblique direction connecting the center-of-gravity position V' of the G1 component and the center-of-gravity position W' of the G2 component with a solid line.

最後に、Yプレーンは、式(10)よりR,G1,G2,B成分の加算平均である。そのため、信号成分Yの重心位置としては、図6(d)に示すように各成分の中心位置となる点Z’であり、信号成分Yの方向は存在せず、点として表わされる。 Finally, the Y plane is the arithmetic mean of the R, G1, G2, and B components from equation (10). Therefore, as shown in FIG. 6(d), the center of gravity of the signal component Y is the point Z' which is the center position of each component, and the direction of the signal component Y does not exist and is represented as a point.

本第2の実施形態における量子化パラメータ重み設定部112で設定する重み設定方法として、第1の実施形態で説明したように光学的な水平と垂直方向の圧縮比率αに応じて算出しても良い。しかしながら、一部、プレーン変換後の信号成分が斜め方向であることを鑑みて、それを水平、垂直方向に分解した上で重み設定をする方が表示時の伸張に伴う水平、垂直方向への量子化歪の影響度合いをより考慮した符号化を行える。 As a weight setting method set by the quantization parameter weight setting unit 112 in the second embodiment, calculation may be performed according to the optical horizontal and vertical compression ratio α as described in the first embodiment. good. However, considering that some of the signal components after plane conversion are in the diagonal direction, it is better to set weights after decomposing them into horizontal and vertical directions. Encoding can be performed with more consideration given to the degree of influence of quantization distortion.

U,V,GHプレーンにおける斜め方向の信号成分を水平、垂直方向に分解したものを図7(a)乃至(c)に示す。図7(a)は図6(a)に対して点P’から水平軸方向に垂直に線を引いた際の水平軸との交点を点R’とする。2点p1,p2を結ぶ線分を“L(p1,p2)”と表記する。また、角度∠S'T'U'をθとし、L(P'Q')の長さを基準の1とする。この場合、線分L(Q'R')、L(R'P')、L(P'Q')の長さの比は次式(11)の通りになる。
L(Q'R') : L(R'P') : L(P'Q') = cosθ : sinθ : 1 …(11)
FIGS. 7(a) to 7(c) show the horizontal and vertical resolution of oblique signal components in the U, V, and GH planes. In FIG. 7(a), a line perpendicular to the horizontal axis direction is drawn from point P' in FIG. 6(a), and the point of intersection with the horizontal axis is defined as point R'. A line segment connecting two points p1 and p2 is denoted as "L(p1, p2)". Also, the angle ∠S'T'U' is set to θ, and the length of L(P'Q') is set to 1 as a reference. In this case, the length ratio of line segments L(Q'R'), L(R'P'), and L(P'Q') is given by the following equation (11).
L(Q'R') : L(R'P') : L(P'Q') = cosθ : sinθ : 1 (11)

次に、図7(b)は、図6(b)に対応する。点S’から水平軸方向に垂直に線を引いた際の水平軸との交点を点U’とする。角度∠S'T'U'をθとし、線分L(S'T')の長さを基準の1とすると、線分L(T'U')、L(U'S')、L(S'T')の長さの比は、次式(12)の通りになる。
L(T'U') : L(U'S') : L(S'T') = cosθ : sinθ : 1 …(12)
Next, FIG. 7(b) corresponds to FIG. 6(b). A point U' is the point of intersection with the horizontal axis when a line is drawn perpendicular to the horizontal axis direction from the point S'. If the angle ∠S'T'U' is θ and the length of the line segment L(S'T') is 1, the line segments L(T'U'), L(U'S'), L(S 'T') length ratio is given by the following equation (12).
L(T'U') : L(U'S') : L(S'T') = cosθ : sinθ : 1 (12)

最後に、図7(c)は図6(c)に対する。点V’から水平軸方向に垂直に線を引き、点W’から垂直軸方向に垂直線を引いた場合の交点を点X’とする。角度各∠V'W'X'をθとし、線分L(V'W')の長さを基準の1とすると、線分L(W'X')、L(X' V')、L(V'W')の長さの比は次式(13)の通りになる。
L(W'X') : L(X'V') : L(V'W') = cosθ : sinθ : 1 …(13)
Finally, FIG. 7(c) is relative to FIG. 6(c). A point X' is the point of intersection when a line is drawn vertically from the point V' in the horizontal direction and a vertical line is drawn from the point W' in the direction of the vertical axis. If each angle ∠V'W'X' is θ and the length of the line segment L(V'W') is 1, then the line segments L(W'X'), L(X'V'), The length ratio of L(V'W') is given by the following equation (13).
L(W'X') : L(X'V') : L(V'W') = cosθ : sinθ : 1 (13)

ここで、図5(a)乃至(c)を参照して、プレーン及びサブバンド毎の量子化パラメータ重み設定部112で設定するαの設定方法を説明する。まず、図5(a)では、符号化対象の画像は水平と垂直方向の長さの関係は1対1の関係になることから、cosθとsinθはそれぞれ、1/√2、1/√2となり、式(11)乃至(13)は次式(14)の関係で示される。
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 1/√2:1/√2:1 … (14)
Here, with reference to FIGS. 5(a) to 5(c), a method of setting α in the quantization parameter weight setting section 112 for each plane and subband will be described. First, in FIG. 5(a), since the image to be encoded has a one-to-one relationship between the lengths in the horizontal and vertical directions, cos θ and sin θ are 1/√2 and 1/√2, respectively. Equations (11) to (13) are represented by the following equation (14).
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 1/√2:1/√2:1 … (14)

式(14)の線分の長さの比は各サブバンドで設定するαと同義となるため、U,V,GHプレーンにおけるHL,LH,HHサブバンドのαの値として、以下式(15)を適用する。
HL:LH:HH=1/√2:1/√2:1 … (15)
なお、Yプレーンにおいては信号成分に特定の方向をもっていないためHL,LH,HHサブバンドのαの値として、以下式(16)の関係を適用する。
HL:LH:HH=1:1:1 … (16)
Since the length ratio of the line segments in Equation (14) is synonymous with α set for each subband, the value of α for the HL, LH, and HH subbands in the U, V, and GH planes is given by Equation (15) ) apply.
HL: LH: HH = 1/√2: 1/√2: 1 … (15)
In the Y plane, since the signal component does not have a specific direction, the following equation (16) is applied as the value of α for the HL, LH, and HH subbands.
HL:LH:HH=1:1:1 … (16)

次に、図5(b)の場合について説明する、この場合、水平と垂直方向の長さの関係は1/2対1の関係になることから、cosθとsinθはそれぞれ、1/√5、2/√5となる。よって、式(12)は、次式(17)の関係になる。
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 1/√5:2/√5:1 … (17)
Next, the case in FIG. 5(b) will be described. 2/√5. Therefore, the formula (12) becomes the relationship of the following formula (17).
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 1/√5:2/√5:1 … (17)

よって、U,V,GHプレーンにおけるHL,LH,HHサブバンドのαの値として、次式(18)の関係を適用する。
HL:LH:HH=1/√5:2/√5:1 …(18)
なお、YプレーンにおけるHL,LH,HHサブバンドのαの値として、以下式(19)の関係を適用する。
HL:LH:HH=1/2:1:1…(19)
Therefore, the relationship of the following equation (18) is applied as the value of α for the HL, LH, and HH subbands in the U, V, and GH planes.
HL: LH: HH = 1/√5:2/√5:1 (18)
As the value of α for the HL, LH, and HH subbands in the Y plane, the relationship of Equation (19) below is applied.
HL:LH:HH=1/2:1:1...(19)

最後に、図5(c)の場合について説明する。この場合、水平方向の長さと垂直方向の長さの関係は1対1/2の関係になることから、cosθとsinθはそれぞれ、2/√5、1/√5となる。よって、式(13)は次式(20)の関係になる。
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 2/√5:1/√5:1 … (20)
Finally, the case of FIG. 5(c) will be explained. In this case, since the relationship between the horizontal length and the vertical length is 1:1/2, cos θ and sin θ are 2/√5 and 1/√5, respectively. Therefore, formula (13) becomes the relationship of the following formula (20).
L(Q'R') : L(R'P') : L(P'Q') = L(T'U') : L(U'S') : L(S'T') = L(W'X') : L(X'V') : L(V'W') = 2/√5:1/√5:1 … (20)

よって、U,V,GHプレーンにおけるHL,LH,HHサブバンドのαの値として、次式(21)の関係を適用する。
HL:LH:HH=2/√5:1/√5:1…(21)
なお、YプレーンにおけるYプレーンにおけるHL,LH,HHサブバンドのαの値としては次式(22)の関係を適用する。
HL:LH:HH=1:1/2:1…(22)
Therefore, the relationship of the following equation (21) is applied as the value of α for the HL, LH, and HH subbands in the U, V, and GH planes.
HL: LH: HH = 2/√5:1/√5:1…(21)
Note that the value of α of the HL, LH, and HH subbands in the Y plane in the Y plane applies the relationship of the following equation (22).
HL:LH:HH=1:1/2:1...(22)

以上説明したように、本第2の実施形態によれば、光学的な水平と垂直の圧縮比率だけでなく、各プレーンの信号成分の方向も加味して各プレーンおよびサブバンドの重み設定をすることで、表示時の伸張に伴う水平或いは垂直方向への量子化歪の影響度合いをより考慮した符号化を行うことが可能となる。 As described above, according to the second embodiment, not only the optical horizontal and vertical compression ratios, but also the direction of the signal component of each plane is taken into consideration when setting weights for each plane and subband. This makes it possible to carry out encoding in consideration of the degree of influence of quantization distortion in the horizontal or vertical direction due to expansion at the time of display.

なお、第1の実施形態では、量子化パラメータの値は、同じ種類のサブバンド、同じ位置のブロックラインであれば、プレーン間での量子化パラメータは同じであるものとした。これは、第1の実施形態における4つのプレーンが色成分の違いだけであり、同じ重みを持つためである。これに対し、第2の実施形態では、輝度Yプレーンと、3つの色差プレーンを符号化するものであり、輝度プレーンについては、他の色差プレーンよりも十分に小さい量子化パラメータとなるように設定する。 In the first embodiment, the quantization parameter values are assumed to be the same between planes as long as the quantization parameter values are the same type of subband and block lines at the same position. This is because the four planes in the first embodiment differ only in color components and have the same weight. On the other hand, in the second embodiment, the luminance Y plane and three chrominance planes are encoded, and the quantization parameter for the luminance plane is set to be sufficiently smaller than those of the other chrominance planes. do.

また、上記第2の実施形態に相当する処理を、第1の実施形態の変形例と同様、コンピュータがプログラムを実行することで実現しても良い。 Further, the processing corresponding to the above-described second embodiment may be implemented by a computer executing a program, as in the modified example of the first embodiment.

また、上記実施形態では、水平方向と垂直方向の圧縮比率が2:1もしくは1:2の例を説明したが、他の比率であっても構わない。その場合、同一分解レベルのHL,LHサブバンドに設定する量子化パラメータをその比率に応じて設定すれば良い。 Further, in the above embodiment, an example in which the compression ratio in the horizontal direction and the vertical direction is 2:1 or 1:2 has been described, but other ratios may be used. In that case, the quantization parameters to be set for the HL and LH subbands of the same resolution level should be set according to the ratio.

上記第1の実施形態、変形例、及び第2の実施形態では、符号化対象をベイヤ配列のRAW画像としたが、他の形式の画像であっても構わない。例えば、モノクロ画像を符号化する場合、その画像は元々単一の輝度成分だけで構成される画像であるので、プレーン変換部102は不要となる。また、YCbCr等の輝度、色差成分で表されるカラー画像に適用しても良い。この場合、Yプレーン、Cbプレーン、Crプレーンに対して、上記と同様の処理を行えば良い。 In the above-described first embodiment, modified example, and second embodiment, the encoding target is a RAW image of Bayer array, but it may be an image of another format. For example, when encoding a monochrome image, the image originally consists of only a single luminance component, so the plane conversion unit 102 is not required. It may also be applied to color images such as YCbCr that are represented by luminance and color difference components. In this case, the Y plane, Cb plane, and Cr plane may be processed in the same manner as described above.

また、上記実施形態では、2×2画素がラスタースキャン順にR,G1,G2,Bの画素が並ぶ、ベイヤ配列を例にしたが、このならび以外のベイヤ配列の場合には、その並びに応じた量子化パラメータを決定すれば良い。 Further, in the above embodiment, the Bayer array in which the pixels of R, G1, G2, and B are arranged in the raster scan order of 2×2 pixels was used as an example. A quantization parameter should be determined.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.

本明細書の開示は、以下の撮像装置、方法及びプログラムを含む。
(項目1)
撮像手段により得た画像データを符号化する画像符号化装置であって、
撮影する際の光学的な水平方向と垂直方向の圧縮比率を表す情報を取得する取得手段と、
前記画像データをウェーブレット変換し、複数のサブバンドデータを生成する変換手段と、
該変換手段で得た複数のサブバンドにおける変換係数に対する量子化パラメータを決定する決定手段と、
前記変換手段で得たサブバンドデータにおける変換係数を、前記決定手段で決定された量子化パラメータに従って量子化し、符号化する符号化手段とを備え、
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に基づいて、サブバンド毎に重み付けして、前記量子化パラメータを決定する
ことを特徴とする画像符号化装置。
(項目2)
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に応じた重み付け係数で重み付けして、前記量子化パラメータを決定する
ことを特徴とする項目1に記載の画像符号化装置。
(項目3)
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に基づいて、前記複数のサブバンドのうち重み付けするサブバンドを決定する
ことを特徴とする項目2に記載の画像符号化装置。
(項目4)
前記決定手段は、前記取得手段により取得した圧縮比率に応じて、LHサブバンドに重み付けするか、HLサブバンドに重み付けするかを切り替える
ことを特徴とする項目1に記載の画像符号化装置。
(項目5)
前記光学的な水平方向と垂直方向の圧縮比率が、垂直方向に対する水平方向の圧縮比率が第1の比率(第1の比率<1)の場合、
前記決定手段は、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータに対するHLサブバンドに適用する量子化パラメータの比率が、前記第1の比率となるように、量子化パラメータを決定する
ことを特徴とする項目1に記載の画像符号化装置。
(項目6)
前記決定手段は、前記光学的な水平方向と垂直方向の圧縮比率が1の場合には、同一分解レベルにおけるHLサブバンドとLHサブバンドは、同じ量子化パラメータとなるように量子化パラメータを決定し、
前記光学的な水平方向と垂直方向の圧縮比率が、垂直方向に対する水平方向の圧縮比率が第1の比率(第1の比率<1)の場合、HLサブバンドに対して前記第1の比率で重み付けして量子化パラメータを決定することにより、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータよりもHLサブバンドに適用する量子化パラメータを小さくする
ことを特徴とする項目1に記載の画像符号化装置。
(項目7)
前記光学的な水平方向と垂直方向の圧縮比率が、水平方向に対する垂直方向の圧縮比率が第2の比率(第2の比率<1)の場合、
前記決定手段は、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータに対するLHサブバンドに適用する量子化パラメータの比率が、前記第2の比率になるように、量子化パラメータを決定する
ことを特徴とする項目1に記載の画像符号化装置。
(項目8)
前記決定手段は、前記光学的な水平方向と垂直方向の圧縮比率が1の場合には、同一分解レベルにおけるHLサブバンドとLHサブバンドは、同じ量子化パラメータとなるように量子化パラメータを決定し、
前記光学的な水平方向と垂直方向の圧縮比率が、水平方向に対する垂直方向の圧縮比率が第2の比率(第2の比率<1)の場合、LHサブバンドに対して前記第2の比率で重み付けして量子化パラメータを決定することにより、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータよりもLHサブバンドに適用する量子化パラメータを小さくする
ことを特徴とする項目1に記載の画像符号化装置。
(項目9)
前記画像符号化装置は、光学レンズユニットを着脱可能であり、
前記取得手段は、光学的な水平方向と垂直方向の圧縮比率を表す情報を前記レンズユニットと通信することにより取得し、
前記決定手段は、前記レンズユニットから取得した光学的な水平方向と垂直方向の圧縮比率を表す情報に基づいて、前記量子化パラメータを決定する
ことを特徴とする項目1乃至8のいずれか1つに記載の画像符号化装置。
(項目10)
前記取得手段は、前記画像符号化装置の操作部を介してユーザに選択された圧縮比率を表す情報を取得し、
前記決定手段は、前記取得手段により取得した、前記ユーザに選択された圧縮比率を表す情報に基づいて、前記量子化パラメータを決定する
ことを特徴とする項目1乃至9のいずれか1つに記載の画像符号化装置。
(項目11)
前記決定手段は、前記ユーザに選択された圧縮比率を表す情報が、垂直方向よりも水平方向に圧縮された圧縮比率を示す場合は、同一分解レベルのHLサブバンドに適用する量子化パラメータを、LHサブバンドに適用する量子化パラメータよりも小さくなるように決定する
ことを特徴とする項目10に記載の画像符号化装置。
(項目12)
前記撮像手段で得た画像を、それぞれが単一成分で構成される複数のプレーンに変換するプレーン変換手段を更に有し、
前記変換手段は、前記プレーン変換手段より得た各プレーンを、ウェーブレット変換する
ことを特徴とする項目1乃至11のいずれか1つに記載の画像符号化装置。
(項目13)
前記撮像手段は、ベイヤ配列のRAW画像を出力し、
前記プレーン変換手段は、前記RAW画像を、Rプレーン、G1プレーン、G2プレーン及びBプレーンに変換する
ことを特徴とする項目12に記載の画像符号化装置。
(項目14)
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における垂直方向に対する水平方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータを、LHサブバンドに適用する量子化パラメータの1/2と決定する
ことを特徴とする項目13に記載の画像符号化装置。
(項目15)
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における水平方向に対する垂直方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータを、HLサブバンドに適用する量子化パラメータの1/2と決定する
ことを特徴とする項目13に記載の画像符号化装置。
(項目16)
前記撮像手段は、2×2画素がラスタースキャン順にR,G1,G2,Bの画素が並ぶ、ベイヤ配列のRAW画像を出力し、
前記プレーン変換手段は、前記RAW画像を、以下の色差のU,V,GHプレーンと、輝度のYプレーンに変換する
U = B-(G1+G2)/2
V = R-(G1+G2)/2
GH = G1-G2
Y = (R+B+G1+G2)/4
ことを特徴とする項目12に記載の画像符号化装置。
(項目17)
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における垂直方向に対する水平方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、
前記Yプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1/2:1:1とし、
前記U,V,GHプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1/√5:2/√5:1とする
ことを特徴とする項目16に記載の画像符号化装置。
(項目18)
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における水平方向に対する垂直方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、
前記Yプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1:1/2:1とし、
前記U,V,GHプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を2/√5:1/√5:1とする
ことを特徴とする項目16に記載の画像符号化装置。
(項目19)
撮像手段により得た画像データを符号化する画像符号化装置の制御方法であって、
撮影する際の光学的な水平方向と垂直方向の圧縮比率を表す情報を取得する取得工程と、
前記画像データをウェーブレット変換し、複数のサブバンドデータを生成する変換工程と、
該変換工程で得た複数のサブバンドにおける変換係数に対する量子化パラメータを決定する決定工程と、
前記変換工程で得たサブバンドデータにおける変換係数を、前記決定工程で決定された量子化パラメータに従って量子化し、符号化する符号化工程とを備え、
前記決定工程は、前記取得工程により取得した圧縮比率を表す情報に基づいて、サブバンド毎に重み付けして、前記量子化パラメータを決定する
ことを特徴とする画像符号化装置の制御方法。
(項目20)
コンピュータが読み込み実行することで、前記コンピュータに、項目1乃至18のいずれか1つに記載の装置が有する各手段として機能させるためのプログラム。
The disclosure of this specification includes the following imaging device, method, and program.
(Item 1)
An image encoding device for encoding image data obtained by imaging means,
Acquisition means for acquiring information representing the optical horizontal and vertical compression ratios at the time of photographing;
transforming means for wavelet transforming the image data to generate a plurality of subband data;
determining means for determining quantization parameters for transform coefficients in a plurality of subbands obtained by the transform means;
encoding means for quantizing and encoding the transform coefficients in the subband data obtained by the transforming means according to the quantization parameter determined by the determining means;
The image encoding apparatus, wherein the determining means determines the quantization parameter by weighting each subband based on the information representing the compression ratio acquired by the acquiring means.
(Item 2)
The image coding apparatus according to item 1, wherein the determination means determines the quantization parameter by weighting with a weighting coefficient according to the information representing the compression ratio acquired by the acquisition means.
(Item 3)
3. The image coding apparatus according to item 2, wherein the determining means determines the sub-bands to be weighted among the plurality of sub-bands based on the information representing the compression ratio acquired by the acquiring means.
(Item 4)
The image encoding device according to item 1, wherein the determining means switches between weighting the LH subband and weighting the HL subband according to the compression ratio obtained by the obtaining means.
(Item 5)
When the optical horizontal/vertical compression ratio is a first ratio (first ratio<1) in the horizontal direction to the vertical direction,
The determining means determines the quantization parameter such that the ratio of the quantization parameter applied to the HL subband to the quantization parameter applied to the LH subband at the same decomposition level is the first ratio. The image encoding device according to item 1, characterized by:
(Item 6)
The determining means determines a quantization parameter such that, when the optical horizontal and vertical compression ratios are 1, the HL subband and the LH subband at the same decomposition level have the same quantization parameter. death,
wherein the optical horizontal to vertical compression ratio is a first ratio for the HL subbands, if the horizontal to vertical compression ratio is a first ratio (first ratio<1); The image according to item 1, wherein the quantization parameter is determined by weighting so that the quantization parameter applied to the HL sub-band is smaller than the quantization parameter applied to the LH sub-band at the same decomposition level. Encoding device.
(Item 7)
When the optical horizontal/vertical compression ratio is a second ratio (second ratio<1) in the vertical direction to the horizontal direction,
The determining means determines the quantization parameter such that the ratio of the quantization parameter applied to the LH subband to the quantization parameter applied to the HL subband at the same decomposition level is the second ratio. The image encoding device according to item 1, characterized by:
(Item 8)
The determination means determines a quantization parameter such that, when the optical horizontal and vertical compression ratios are 1, the HL sub-band and the LH sub-band at the same resolution level have the same quantization parameter. death,
wherein the optical horizontal and vertical compression ratio is the second ratio for the LH subband when the vertical to horizontal compression ratio is a second ratio (second ratio<1); The image of item 1, wherein the quantization parameter is determined by weighting so that the quantization parameter applied to the LH sub-band is smaller than the quantization parameter applied to the HL sub-band at the same decomposition level. Encoding device.
(Item 9)
The image encoding device is detachable with an optical lens unit,
The acquisition means acquires information representing optical horizontal and vertical compression ratios by communicating with the lens unit,
9. Any one of items 1 to 8, wherein the determining means determines the quantization parameter based on information representing optical horizontal and vertical compression ratios obtained from the lens unit. The image encoding device according to .
(Item 10)
The acquisition means acquires information representing a compression ratio selected by a user via an operation unit of the image encoding device,
10. The quantization parameter according to any one of items 1 to 9, wherein the determining means determines the quantization parameter based on the information representing the compression ratio selected by the user, which is acquired by the acquiring means. image encoding device.
(Item 11)
If the information representing the compression ratio selected by the user indicates a compression ratio in which the horizontal direction is compressed rather than the vertical direction, the determination means determines a quantization parameter to be applied to the HL subbands of the same decomposition level by: The image coding apparatus according to item 10, wherein the quantization parameter is determined to be smaller than the quantization parameter applied to the LH subband.
(Item 12)
further comprising plane conversion means for converting the image obtained by the imaging means into a plurality of planes, each of which is composed of a single component;
12. The image coding apparatus according to any one of items 1 to 11, wherein the transforming means wavelet transforms each plane obtained from the plane transforming means.
(Item 13)
The imaging means outputs a Bayer array RAW image,
13. The image encoding device according to item 12, wherein the plane conversion means converts the RAW image into an R-plane, a G1-plane, a G2-plane and a B-plane.
(Item 14)
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the horizontal image in the image obtained by the imaging means is 1/2 times the vertical direction,
14. The image coding apparatus according to item 13, wherein the determining means determines the quantization parameter to be applied to the HL subbands at the same decomposition level to be 1/2 of the quantization parameter to be applied to the LH subbands. .
(Item 15)
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the vertical image in the image obtained by the imaging means is 1/2 times as large as the horizontal image,
14. The image coding apparatus according to item 13, wherein the determining means determines the quantization parameter to be applied to the LH subband in the same decomposition level to be 1/2 of the quantization parameter to be applied to the HL subband. .
(Item 16)
The imaging means outputs a Bayer array RAW image in which 2×2 pixels are arranged in raster scan order of R, G1, G2, and B pixels,
The plane conversion means converts the RAW image into the following color difference U, V, GH planes and luminance Y planes:
U = B-(G1+G2)/2
V = R-(G1+G2)/2
GH = G1-G2
Y = (R+B+G1+G2)/4
13. The image encoding device according to item 12, characterized by:
(Item 17)
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the horizontal image in the image obtained by the imaging means is 1/2 times the vertical direction,
The determining means is
setting the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level of the Y plane to 1/2:1:1;
Item 16, wherein the ratio of quantization parameter values set for the HL, LH, and HH subbands of the same resolution level in the U, V, and GH planes is 1/√5:2/√5:1. The image encoding device according to .
(Item 18)
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the image obtained by the imaging means in the vertical direction is 1/2 times as large as the horizontal direction,
The determining means is
setting the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level of the Y plane to 1:1/2:1;
Item 16, wherein the ratio of quantization parameter values set for the HL, LH, and HH subbands of the same resolution level in the U, V, and GH planes is 2/√5:1/√5:1. The image encoding device according to .
(Item 19)
A control method for an image encoding device that encodes image data obtained by imaging means, comprising:
an obtaining step of obtaining information representing the optical horizontal and vertical compression ratios when photographing;
wavelet transforming the image data to generate a plurality of subband data;
a determining step of determining quantization parameters for the transform coefficients in the plurality of subbands obtained in the transforming step;
an encoding step of quantizing and encoding the transform coefficients in the subband data obtained in the transforming step according to the quantization parameter determined in the determining step;
The method of controlling an image coding apparatus, wherein the determining step determines the quantization parameter by weighting each subband based on the information representing the compression ratio obtained in the obtaining step.
(Item 20)
19. A program that is read and executed by a computer to cause the computer to function as each unit of the device according to any one of items 1 to 18.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.

100…撮像装置、101…撮像部、102…プレーン変換部、103…離散ウェーブレット変換部、104…量子化部、105…符号化部、106…量子化制御部、107…記録処理部、108…記録媒体、109…発生符号量保持部、110…差分算出部、111…量子化値算出部、112…量子化パラメータ重み設定部、113…目標符号量算出部、114…初期目標符号量設定部、115…初期量子化値設定部 DESCRIPTION OF SYMBOLS 100... Imaging apparatus, 101... Imaging unit, 102... Plane transforming unit, 103... Discrete wavelet transforming unit, 104... Quantizing unit, 105... Encoding unit, 106... Quantization control unit, 107... Recording processing unit, 108... Recording medium 109 Generated code amount storage unit 110 Difference calculation unit 111 Quantization value calculation unit 112 Quantization parameter weight setting unit 113 Target code amount calculation unit 114 Initial target code amount setting unit , 115 ... initial quantization value setting unit

Claims (20)

撮像手段により得た画像データを符号化する画像符号化装置であって、
撮影する際の光学的な水平方向と垂直方向の圧縮比率を表す情報を取得する取得手段と、
前記画像データをウェーブレット変換し、複数のサブバンドデータを生成する変換手段と、
該変換手段で得た複数のサブバンドにおける変換係数に対する量子化パラメータを決定する決定手段と、
前記変換手段で得たサブバンドデータにおける変換係数を、前記決定手段で決定された量子化パラメータに従って量子化し、符号化する符号化手段とを備え、
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に基づいて、サブバンド毎に重み付けして、前記量子化パラメータを決定する
ことを特徴とする画像符号化装置。
An image encoding device for encoding image data obtained by imaging means,
Acquisition means for acquiring information representing the optical horizontal and vertical compression ratios at the time of photographing;
transforming means for wavelet transforming the image data to generate a plurality of subband data;
determining means for determining quantization parameters for transform coefficients in a plurality of subbands obtained by the transform means;
encoding means for quantizing and encoding the transform coefficients in the subband data obtained by the transforming means according to the quantization parameter determined by the determining means;
The image encoding apparatus, wherein the determining means determines the quantization parameter by weighting each subband based on the information representing the compression ratio acquired by the acquiring means.
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に応じた重み付け係数で重み付けして、前記量子化パラメータを決定する
ことを特徴とする請求項1に記載の画像符号化装置。
The image coding apparatus according to claim 1, wherein the determining means determines the quantization parameter by weighting with a weighting coefficient according to the information representing the compression ratio acquired by the acquiring means.
前記決定手段は、前記取得手段により取得した圧縮比率を表す情報に基づいて、前記複数のサブバンドのうち重み付けするサブバンドを決定する
ことを特徴とする請求項2に記載の画像符号化装置。
3. The image encoding apparatus according to claim 2, wherein said determining means determines the sub-bands to be weighted among said plurality of sub-bands based on the information representing the compression ratio acquired by said acquiring means.
前記決定手段は、前記取得手段により取得した圧縮比率に応じて、LHサブバンドに重み付けするか、HLサブバンドに重み付けするかを切り替える
ことを特徴とする請求項1に記載の画像符号化装置。
The image encoding apparatus according to claim 1, wherein the determining means switches between weighting the LH subband and weighting the HL subband according to the compression ratio obtained by the obtaining means.
前記光学的な水平方向と垂直方向の圧縮比率が、垂直方向に対する水平方向の圧縮比率が第1の比率(第1の比率<1)の場合、
前記決定手段は、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータに対するHLサブバンドに適用する量子化パラメータの比率が、前記第1の比率となるように、量子化パラメータを決定する
ことを特徴とする請求項1に記載の画像符号化装置。
When the optical horizontal/vertical compression ratio is a first ratio (first ratio<1) in the horizontal direction to the vertical direction,
The determining means determines the quantization parameter such that the ratio of the quantization parameter applied to the HL subband to the quantization parameter applied to the LH subband at the same decomposition level is the first ratio. 2. The image encoding device according to claim 1.
前記決定手段は、前記光学的な水平方向と垂直方向の圧縮比率が1の場合には、同一分解レベルにおけるHLサブバンドとLHサブバンドは、同じ量子化パラメータとなるように量子化パラメータを決定し、
前記光学的な水平方向と垂直方向の圧縮比率が、垂直方向に対する水平方向の圧縮比率が第1の比率(第1の比率<1)の場合、HLサブバンドに対して前記第1の比率で重み付けして量子化パラメータを決定することにより、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータよりもHLサブバンドに適用する量子化パラメータを小さくする
ことを特徴とする請求項1に記載の画像符号化装置。
The determining means determines a quantization parameter such that, when the optical horizontal and vertical compression ratios are 1, the HL subband and the LH subband at the same decomposition level have the same quantization parameter. death,
wherein the optical horizontal to vertical compression ratio is the first ratio for the HL subbands, if the horizontal to vertical compression ratio is a first ratio (first ratio<1); 2. The quantization parameter according to claim 1, wherein the quantization parameter is determined by weighting so that the quantization parameter applied to the HL subband is smaller than the quantization parameter applied to the LH subband at the same decomposition level. Image coding device.
前記光学的な水平方向と垂直方向の圧縮比率が、水平方向に対する垂直方向の圧縮比率が第2の比率(第2の比率<1)の場合、
前記決定手段は、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータに対するLHサブバンドに適用する量子化パラメータの比率が、前記第2の比率になるように、量子化パラメータを決定する
ことを特徴とする請求項1に記載の画像符号化装置。
When the optical horizontal/vertical compression ratio is a second ratio (second ratio<1) in the vertical direction to the horizontal direction,
The determining means determines the quantization parameter such that the ratio of the quantization parameter applied to the LH subband to the quantization parameter applied to the HL subband at the same decomposition level is the second ratio. 2. The image encoding device according to claim 1.
前記決定手段は、前記光学的な水平方向と垂直方向の圧縮比率が1の場合には、同一分解レベルにおけるHLサブバンドとLHサブバンドは、同じ量子化パラメータとなるように量子化パラメータを決定し、
前記光学的な水平方向と垂直方向の圧縮比率が、水平方向に対する垂直方向の圧縮比率が第2の比率(第2の比率<1)の場合、LHサブバンドに対して前記第2の比率で重み付けして量子化パラメータを決定することにより、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータよりもLHサブバンドに適用する量子化パラメータを小さくする
ことを特徴とする請求項1に記載の画像符号化装置。
The determination means determines a quantization parameter such that, when the optical horizontal and vertical compression ratios are 1, the HL sub-band and the LH sub-band at the same resolution level have the same quantization parameter. death,
wherein the optical horizontal and vertical compression ratio is the second ratio for the LH subband when the vertical to horizontal compression ratio is a second ratio (second ratio<1); 2. The quantization parameter according to claim 1, wherein the quantization parameter is determined by weighting such that the quantization parameter applied to the LH sub-band is smaller than the quantization parameter applied to the HL sub-band at the same decomposition level. Image coding device.
前記画像符号化装置は、光学レンズユニットを着脱可能であり、
前記取得手段は、光学的な水平方向と垂直方向の圧縮比率を表す情報を前記光学レンズユニットと通信することにより取得し、
前記決定手段は、前記光学レンズユニットから取得した光学的な水平方向と垂直方向の圧縮比率を表す情報に基づいて、前記量子化パラメータを決定する
ことを特徴とする請求項1に記載の画像符号化装置。
The image encoding device is detachable with an optical lens unit,
The acquisition means acquires information representing optical horizontal and vertical compression ratios by communicating with the optical lens unit,
2. The image code according to claim 1, wherein said determining means determines said quantization parameter based on information representing optical horizontal and vertical compression ratios obtained from said optical lens unit. conversion device.
前記取得手段は、前記画像符号化装置の操作部を介してユーザに選択された圧縮比率を表す情報を取得し、
前記決定手段は、前記取得手段により取得した、前記ユーザに選択された圧縮比率を表す情報に基づいて、前記量子化パラメータを決定する
ことを特徴とする請求項1に記載の画像符号化装置。
The acquisition means acquires information representing a compression ratio selected by a user via an operation unit of the image encoding device,
2. The image encoding apparatus according to claim 1, wherein the determining means determines the quantization parameter based on the information representing the compression ratio selected by the user, which is acquired by the acquiring means.
前記決定手段は、前記ユーザに選択された圧縮比率を表す情報が、垂直方向よりも水平方向に圧縮された圧縮比率を示す場合は、同一分解レベルのHLサブバンドに適用する量子化パラメータを、LHサブバンドに適用する量子化パラメータよりも小さくなるように決定する
ことを特徴とする請求項10に記載の画像符号化装置。
If the information representing the compression ratio selected by the user indicates a compression ratio in which the horizontal direction is compressed rather than the vertical direction, the determination means determines a quantization parameter to be applied to the HL subbands of the same decomposition level by: The image coding apparatus according to claim 10, wherein the quantization parameter is determined to be smaller than the quantization parameter applied to the LH subband.
前記撮像手段で得た画像を、それぞれが単一成分で構成される複数のプレーンに変換するプレーン変換手段を更に有し、
前記変換手段は、前記プレーン変換手段より得た各プレーンを、ウェーブレット変換する
ことを特徴とする請求項1に記載の画像符号化装置。
further comprising plane conversion means for converting the image obtained by the imaging means into a plurality of planes, each of which is composed of a single component;
2. The image coding apparatus according to claim 1, wherein said transforming means wavelet transforms each plane obtained from said plane transforming means.
前記撮像手段は、ベイヤ配列のRAW画像を出力し、
前記プレーン変換手段は、前記RAW画像を、Rプレーン、G1プレーン、G2プレーン及びBプレーンに変換する
ことを特徴とする請求項12に記載の画像符号化装置。
The imaging means outputs a Bayer array RAW image,
13. The image encoding device according to claim 12, wherein said plane conversion means converts said RAW image into an R-plane, a G1-plane, a G2-plane and a B-plane.
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における垂直方向に対する水平方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、同一分解レベルにおけるHLサブバンドに適用する量子化パラメータを、LHサブバンドに適用する量子化パラメータの1/2と決定する
ことを特徴とする請求項13に記載の画像符号化装置。
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the horizontal image in the image obtained by the imaging means is 1/2 times the vertical direction,
14. The image coding according to claim 13, wherein said determining means determines a quantization parameter to be applied to HL sub-bands at the same decomposition level to be 1/2 of a quantization parameter to be applied to LH sub-bands. Device.
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における水平方向に対する垂直方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、同一分解レベルにおけるLHサブバンドに適用する量子化パラメータを、HLサブバンドに適用する量子化パラメータの1/2と決定する
ことを特徴とする請求項13に記載の画像符号化装置。
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the vertical image in the image obtained by the imaging means is 1/2 times as large as the horizontal image,
14. The image coding according to claim 13, wherein said determining means determines a quantization parameter to be applied to LH subbands at the same decomposition level to be 1/2 of a quantization parameter to be applied to HL subbands. Device.
前記撮像手段は、2×2画素がラスタースキャン順にR,G1,G2,Bの画素が並ぶ、ベイヤ配列のRAW画像を出力し、
前記プレーン変換手段は、前記RAW画像を、以下の色差のU,V,GHプレーンと、輝度のYプレーンに変換する
U = B-(G1+G2)/2
V = R-(G1+G2)/2
GH = G1-G2
Y = (R+B+G1+G2)/4
ことを特徴とする請求項12に記載の画像符号化装置。
The imaging means outputs a Bayer array RAW image in which 2×2 pixels are arranged in raster scan order of R, G1, G2, and B pixels,
The plane conversion means converts the RAW image into the following color difference U, V, GH planes and luminance Y planes:
U = B-(G1+G2)/2
V = R-(G1+G2)/2
GH = G1-G2
Y = (R+B+G1+G2)/4
13. The image encoding device according to claim 12, characterized by:
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における垂直方向に対する水平方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、
前記Yプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1/2:1:1とし、
前記U,V,GHプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1/√5:2/√5:1とする
ことを特徴とする請求項16に記載の画像符号化装置。
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the horizontal image in the image obtained by the imaging means is 1/2 times the vertical direction,
The determining means is
setting the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level of the Y plane to 1/2:1:1;
1/√5:2/√5:1, wherein the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level in the U, V, and GH planes is 1/√5:2/√5:1. 17. The image encoding device according to 16.
前記光学的な水平方向と垂直方向の圧縮比率が、前記撮像手段で得る画像における水平方向に対する垂直方向の像が1/2倍となる圧縮比率を示している場合、
前記決定手段は、
前記Yプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を1:1/2:1とし、
前記U,V,GHプレーンの同一分解レベルのHL、LH、HHサブバンドに設定する量子化パラメータの値の比を2/√5:1/√5:1とする
ことを特徴とする請求項16に記載の画像符号化装置。
When the optical horizontal and vertical compression ratios indicate a compression ratio at which the image obtained by the imaging means in the vertical direction is 1/2 times as large as the horizontal direction,
The determining means is
setting the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level of the Y plane to 1:1/2:1;
2/√5:1/√5:1, wherein the ratio of the quantization parameter values set for the HL, LH, and HH subbands of the same resolution level in the U, V, and GH planes is 2/√5:1/√5:1. 17. The image encoding device according to 16.
撮像手段により得た画像データを符号化する画像符号化装置の制御方法であって、
撮影する際の光学的な水平方向と垂直方向の圧縮比率を表す情報を取得する取得工程と、
前記画像データをウェーブレット変換し、複数のサブバンドデータを生成する変換工程と、
該変換工程で得た複数のサブバンドにおける変換係数に対する量子化パラメータを決定する決定工程と、
前記変換工程で得たサブバンドデータにおける変換係数を、前記決定工程で決定された量子化パラメータに従って量子化し、符号化する符号化工程とを備え、
前記決定工程は、前記取得工程により取得した圧縮比率を表す情報に基づいて、サブバンド毎に重み付けして、前記量子化パラメータを決定する
ことを特徴とする画像符号化装置の制御方法。
A control method for an image encoding device that encodes image data obtained by imaging means, comprising:
an obtaining step of obtaining information representing the optical horizontal and vertical compression ratios when photographing;
wavelet transforming the image data to generate a plurality of subband data;
a determining step of determining quantization parameters for the transform coefficients in the plurality of subbands obtained in the transforming step;
an encoding step of quantizing and encoding the transform coefficients in the subband data obtained in the transforming step according to the quantization parameter determined in the determining step;
The method of controlling an image coding apparatus, wherein the determining step determines the quantization parameter by weighting each subband based on the information representing the compression ratio obtained in the obtaining step.
コンピュータが読み込み実行することで、前記コンピュータに、請求項19に記載の制御方法が有する各工程を実行させるためのプログラム。 A program that is read and executed by a computer to cause the computer to execute each step of the control method according to claim 19.
JP2022134421A 2021-11-04 2022-08-25 Image encoding device, control method thereof, and program Pending JP2023070055A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
GB2215702.8A GB2614381A (en) 2021-11-04 2022-10-24 Image encoding apparatus and method for controlling the same and program
US17/974,611 US20230133895A1 (en) 2021-11-04 2022-10-27 Image encoding apparatus and method for controlling the same and non-transitory computer-readable storage medium
CN202211375088.6A CN116074538A (en) 2021-11-04 2022-11-04 Image encoding apparatus, control method thereof, and computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021180509 2021-11-04
JP2021180509 2021-11-04

Publications (1)

Publication Number Publication Date
JP2023070055A true JP2023070055A (en) 2023-05-18

Family

ID=86327850

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022134421A Pending JP2023070055A (en) 2021-11-04 2022-08-25 Image encoding device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP2023070055A (en)

Similar Documents

Publication Publication Date Title
US8254707B2 (en) Encoding device, encoding method, encoding program, decoding device, decoding method, and decoding program in interlace scanning
US8665943B2 (en) Encoding device, encoding method, encoding program, decoding device, decoding method, and decoding program
KR100971833B1 (en) Image coding method and apparatus
JP4594688B2 (en) Image encoding processing method, image decoding processing method, moving image compression processing method, moving image expansion processing method, image encoding processing program, image encoding device, image decoding device, image encoding / decoding system, extended image compression / decompression Processing system
JP2004128583A (en) Imaging apparatus, image processing method, program, and recording medium
JP2006014121A (en) Image encoding method, image encoding apparatus, and imaging apparatus
JP6857973B2 (en) Image coding device and its control method
JP6986868B2 (en) Image coding device, image decoding device, image coding method, image decoding method, program
JP5092558B2 (en) Image encoding method, image encoding device, image decoding method, and image decoding device
US20230133895A1 (en) Image encoding apparatus and method for controlling the same and non-transitory computer-readable storage medium
WO2006046550A1 (en) Image encoding method and device, image decoding method, and device
TWI390959B (en) Video signal processing device, video signal processing method and video signal processing program
JP2006074114A (en) Image processing apparatus and imaging apparatus
JP2023070055A (en) Image encoding device, control method thereof, and program
JP4375662B2 (en) Image processing apparatus, image processing method, program, information recording medium, and imaging apparatus
JP6775339B2 (en) Image coding device and its control method
JP4749508B2 (en) Image decoding method
JP6875817B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP2008124530A (en) Raw data compressing method
JP7465073B2 (en) Image encoding device, control method and program thereof
JP4667424B2 (en) Image decoding device
JP4458408B2 (en) Image processing apparatus, image processing method, program, and information recording medium
JP2019068385A (en) Encoder, control method thereof, and control program, and imaging apparatus
JP6812214B2 (en) Image coding device, image coding method, and program
JP4667423B2 (en) Image decoding device