JP6775339B2 - Image coding device and its control method - Google Patents

Image coding device and its control method Download PDF

Info

Publication number
JP6775339B2
JP6775339B2 JP2016131034A JP2016131034A JP6775339B2 JP 6775339 B2 JP6775339 B2 JP 6775339B2 JP 2016131034 A JP2016131034 A JP 2016131034A JP 2016131034 A JP2016131034 A JP 2016131034A JP 6775339 B2 JP6775339 B2 JP 6775339B2
Authority
JP
Japan
Prior art keywords
plane
coding
luminance
line
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016131034A
Other languages
Japanese (ja)
Other versions
JP2018006999A (en
Inventor
東 克彦
克彦 東
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016131034A priority Critical patent/JP6775339B2/en
Publication of JP2018006999A publication Critical patent/JP2018006999A/en
Application granted granted Critical
Publication of JP6775339B2 publication Critical patent/JP6775339B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、撮像装置で撮像した画像の符号化技術に関するものである。 The present invention relates to a coding technique for an image captured by an imaging device.

デジタルカメラやデジタルカムコーダー等の撮像装置は、撮像素子にCCDセンサーまたはCMOSセンサーを採用している。それらのセンサーは主に単板式で構成されており、センサー表面のカラーフィルターアレイ(以下、CFAと呼称する)によって1つの画素で1つの色成分(例えばR、G、Bの内の1つ)の画素値を取得する。CFAを用いることで、例えば図2に示すようなR(赤)、G1(緑)、B(青)、G2(緑)の周期的なパターンで配置されたベイヤ配列の画像データ(以下、RAWデータと呼称する)が得られる。人間の視覚が輝度成分に対し高い感度を持っている。それ故、ベイヤ配列の2×2画素に着目しとき、赤(R)成分や青(B)成分がそれぞれ1画素であるのに対し、輝度成分を多く含む緑の画素は、図2のようにG1,G2の2画素(2倍)となっている。RAWデータは前述した通り、1画素に1つの色成分の情報しか持たない。一方、通常のカラー画像の1画素は、R,G,B等の複数成分を持つ。それ故、デモザイクと呼ばれる処理をRAWデータに施されることで、1画素につき赤、青、緑の3成分値を持つ画像データが生成される。一般に、デモザイクによって得られたRGB信号、あるいはRGB信号から変換して得られたYUV信号の画像データを符号化して記録する。しかし、デモザイク処理で得られる画像データは、1画素が3つの色成分で構成されるので、1画素1成分のRAWデータの3倍のデータ量となる。そこで、デモザイク前のRAWデータを符号化して記録する方法が提案されている(例えば特許文献1を参照)。 An image pickup device such as a digital camera or a digital camcorder employs a CCD sensor or a CMOS sensor as an image pickup element. These sensors are mainly composed of a single plate type, and one color component (for example, one of R, G, and B) is used for one pixel by a color filter array (hereinafter referred to as CFA) on the surface of the sensor. Get the pixel value of. By using CFA, for example, image data of a Bayer array arranged in a periodic pattern of R (red), G1 (green), B (blue), and G2 (green) as shown in FIG. 2 (hereinafter, RAW). (Called data) is obtained. Human vision has high sensitivity to luminance components. Therefore, when focusing on the 2 × 2 pixels of the Bayer array, the red (R) component and the blue (B) component are each one pixel, while the green pixel containing a large amount of the luminance component is as shown in FIG. It has 2 pixels (double) of G1 and G2. As described above, the RAW data has only one color component information per pixel. On the other hand, one pixel of a normal color image has a plurality of components such as R, G, and B. Therefore, by applying a process called demosaic to the RAW data, image data having three component values of red, blue, and green per pixel is generated. Generally, the image data of the RGB signal obtained by demosaic or the YUV signal obtained by converting from the RGB signal is encoded and recorded. However, since one pixel of the image data obtained by the demosaic process is composed of three color components, the amount of data is three times that of the RAW data of one pixel and one component. Therefore, a method of encoding and recording RAW data before demosaicing has been proposed (see, for example, Patent Document 1).

例えば、特許文献1には、RAWデータを信号成分毎(R、G1、B、G2)に分類して4つのコンポーネント(プレーン)に整理した後に符号化をする方法が示されている。 For example, Patent Document 1 discloses a method of classifying RAW data into signal components (R, G1, B, G2), organizing them into four components (planes), and then encoding the data.

特開2003−125209号公報Japanese Unexamined Patent Publication No. 2003-125209

しかしながら、特許文献1のようにRAWデータを信号成分毎に分離してプレーンを形成する時に1画素間引きのサブサンプリングを用いてRAWデータから画素値を取り出している。サブサンプリングにより各プレーンで周波数の折り返りが生じてしまうことで、符号化処理の工程の内の周波数変換で低域成分と高域成分の切り分けが上手くできなくなる。そのため、画質への影響が小さい高周波数帯の成分の量子化ステップを大きくした場合、画質に大きな影響を持つ低周波数帯の成分も強く量子化されてしまう。従って、RAWデータを高い圧縮率で符号化するときの画質劣化が大きくなってしまい、圧縮効率が悪いことが問題となる。 However, as in Patent Document 1, when the RAW data is separated for each signal component to form a plane, the pixel value is extracted from the RAW data by using subsampling of one pixel thinning. Since frequency wrapping occurs in each plane due to subsampling, it becomes difficult to properly separate the low frequency component and the high frequency component in the frequency conversion in the coding processing process. Therefore, when the quantization step of the high frequency band component having a small influence on the image quality is increased, the low frequency band component having a large influence on the image quality is also strongly quantized. Therefore, when the RAW data is encoded at a high compression rate, the image quality deteriorates significantly, and the problem is that the compression efficiency is poor.

本発明は、上記問題点に鑑みなされたものであり、ベイヤ配列の画像データを画質劣化を抑えながらも、これまでよりも高い圧縮率で符号化する技術を提供しようとするものである。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for encoding image data of a Bayer array with a higher compression rate than before while suppressing deterioration in image quality.

この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
ベイヤ配列の画像データを符号化する画像符号化装置であって、
ベイヤ配列の画像データから、R成分を示すRプレーン、B成分を示すBプレーン、G1成分を示すG1プレーン、G2成分を示すG2プレーンの4つの色プレーンに分離する分離手段と、
該分離手段で得られた4つの色プレーンから、輝度Yを示すYプレーン、及び、色差C1,C2,C3を示すC1プレーン、C2プレーン、C3プレーンで構成される輝度色差プレーンに変換する変換手段と、
前記輝度色差プレーンを符号化する符号化手段と
を有し、
前記変換手段は、次式に従って色プレーンを輝度色差プレーンに変換する

Figure 0006775339
ことを特徴とする。 In order to solve this problem, for example, the image coding apparatus of the present invention has the following configuration. That is,
An image coding device that encodes image data in a Bayer array.
A separation means for separating the image data of the Bayer array into four color planes: an R plane showing the R component, a B plane showing the B component, a G1 plane showing the G1 component, and a G2 plane showing the G2 component.
A conversion means for converting the four color planes obtained by the separation means into a Y plane indicating the luminance Y and a luminance color difference plane composed of the C1 plane, the C2 plane, and the C3 plane showing the luminance C1, C2, and C3. When,
Have a coding means for coding the luminance and chrominance planes,
The conversion means converts the color plane into a luminance color difference plane according to the following equation.
Figure 0006775339
It is characterized by that .

本発明によれば、ベイヤ配列の画像データを画質劣化を抑えながらも、これまでよりも高い圧縮率で符号化することが可能になる。 According to the present invention, it is possible to encode the image data of the Bayer array with a higher compression rate than before while suppressing deterioration of image quality.

第1の実施形態の画像処理装置のブロック構成図。The block block diagram of the image processing apparatus of 1st Embodiment. ベイヤ配列を示す図。The figure which shows the Bayer array. 符号化情報の設定に関わるテーブルを示す図。The figure which shows the table related to the setting of the coding information. 並列符号化部109を構成する符号化部の詳細を示した図である。It is a figure which showed the detail of the coding part which comprises the parallel coding part 109. サブバンド分割の例を示す図である。It is a figure which shows the example of the subband division. 第1の実施形態の画像符号処理手順を示すフローチャートを示す図。The figure which shows the flowchart which shows the image code processing procedure of 1st Embodiment. 並列符号化部109内の符号化部の処理を示すフローチャートを示す図。The figure which shows the flowchart which shows the processing of the coding part in the parallel coding part 109. ライン毎の量子化設定におけるフローチャートを示す図。The figure which shows the flowchart in the quantization setting for each line. 第2の実施形態に係る画像処理装置のブロック構成図。The block block diagram of the image processing apparatus which concerns on 2nd Embodiment. 第2の実施形態の画像符号化処理の手順を示すフローチャート。The flowchart which shows the procedure of the image coding processing of 2nd Embodiment. サブバンド毎の符号量割り当ての例を示す図。The figure which shows the example of the code amount allocation for each subband.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。なお、以下の説明では、画像符号化装置を撮像装置(デジタルビデオカメラ等)に搭載する例を説明する。しかし、符号化対象の画像データがベイヤ配列となっていれば良いので、符号化対象の画像データの発生源の種類は問わない。例えば、メモリカード等の記憶媒体、或いはネットワークから符号化対象画像データを取得して符号化する場合にも適用可能である。撮像装置を例にするのは、あくまで理解を容易にするためであると理解されたい。 Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In the following description, an example in which an image coding device is mounted on an image pickup device (digital video camera or the like) will be described. However, as long as the image data to be encoded has a Bayer array, the source of the image data to be encoded does not matter. For example, it can be applied to a case where image data to be encoded is acquired from a storage medium such as a memory card or a network and encoded. It should be understood that the image pickup device is used as an example for the sake of easy understanding.

[第1の実施形態]
図1は第1の実施形態が適用する撮像装置(デジタルビデオカメラ)のブロック構成図である。以下、同図を参照して、各構成要素を説明する。
[First Embodiment]
FIG. 1 is a block configuration diagram of an imaging device (digital video camera) to which the first embodiment is applied. Hereinafter, each component will be described with reference to the figure.

撮像装置100は、操作部101、主制御部102、撮像部104、信号処理部105、画像符号化装置114、符号化ストーム生成部110、一次記憶部111、メモリI/O部112、記憶媒体113、及び、上記構成を接続するためのバス150を有する。 The image pickup device 100 includes an operation unit 101, a main control unit 102, an image pickup unit 104, a signal processing unit 105, an image coding device 114, a coding storm generation unit 110, a primary storage unit 111, a memory I / O unit 112, and a storage medium. It has 113 and a bus 150 for connecting the above configurations.

画像符号化装置114は、符号化制御部103、色分離部106、プレーン変換部107、プレーン選択部108、並列符号化部109で構成されている。 The image coding device 114 includes a coding control unit 103, a color separation unit 106, a plane conversion unit 107, a plane selection unit 108, and a parallel coding unit 109.

尚、第1の実施形態における撮像装置は図2に示すベイヤ配列の画像データ(以下、RAW画像データという)に対して、現像処理をすることなく圧縮する。第1の実施形態における撮像装置100は、操作部101により圧縮モードが設定された後に、被写体の撮影の開始指示入力があって撮像、符号化、記録を行う。圧縮モードには、例えばポストプロダクション向けの低圧縮モード、常用想定の中圧縮モード、画質を多少犠牲にしても長い時間の記録を求める高圧縮モードなどの複数のモードが設けられている。これらのモードの選択は、ユーザが操作部101を介して設定することになる。尚、圧縮モードは、主制御部102が撮影時の圧縮率を設定する際に使用される。操作部101はシャッタースイッチ(記録スイッチ)や操作キーなどの押しボタン、タッチパネルのいずれでも良いし、それらの組み合わせでも構わない。 The image pickup apparatus in the first embodiment compresses the image data of the Bayer array shown in FIG. 2 (hereinafter referred to as RAW image data) without performing development processing. After the compression mode is set by the operation unit 101, the image pickup apparatus 100 according to the first embodiment receives an input of an instruction to start shooting a subject and performs imaging, coding, and recording. The compression mode is provided with a plurality of modes such as a low compression mode for post production, a medium compression mode that is assumed to be used regularly, and a high compression mode that requires recording for a long time at the expense of image quality. The selection of these modes will be set by the user via the operation unit 101. The compression mode is used when the main control unit 102 sets the compression rate at the time of shooting. The operation unit 101 may be a shutter switch (recording switch), a push button such as an operation key, or a touch panel, or a combination thereof.

主制御部102は、CPUと、当該CPUが実行する制御プログラムを格納するメモリで構成され、操作部101からの命令を受けてCPUがメモリから制御プログラムを読みだし撮像装置100を制御する。また、主制御部102は撮影情報を符号化制御部103に供給する。本実施形態における撮影情報は、例えば画像データの画素数や1画素あたりのビット深度、圧縮率で構成されるが、他にもシャッタースピードやISO感度などを用いても良い。尚、圧縮率は操作部101によって設定され、主制御部102に送られた圧縮モードに応じて所定の値が設定される。例えば、低圧縮モードでは1/2、中圧縮モードでは1/5、高圧縮モードでは1/8、と設定することができる。 The main control unit 102 includes a CPU and a memory for storing a control program executed by the CPU, and the CPU reads a control program from the memory and controls the image pickup apparatus 100 in response to a command from the operation unit 101. Further, the main control unit 102 supplies the photographing information to the coding control unit 103. The shooting information in this embodiment is composed of, for example, the number of pixels of image data, the bit depth per pixel, and the compression rate, but shutter speed, ISO sensitivity, and the like may also be used. The compression rate is set by the operation unit 101, and a predetermined value is set according to the compression mode sent to the main control unit 102. For example, it can be set to 1/2 in the low compression mode, 1/5 in the medium compression mode, and 1/8 in the high compression mode.

符号化制御部103は主制御部102によって送られた撮影情報を基に、符号化条件を設定する。本実施形態における符号化条件は、符号化対象となるプレーンの属性、及びプレーン毎の目標符号量である。ここでプレーンの属性とは後述する色プレーンや輝度色差プレーンのことを指す。 The coding control unit 103 sets the coding conditions based on the shooting information sent by the main control unit 102. The coding conditions in the present embodiment are the attributes of the plane to be coded and the target code amount for each plane. Here, the attributes of the plane refer to the color plane and the luminance color difference plane described later.

またプレーン毎の目標符号量は、全体の目標符号量から各プレーンの符号量の重み付けを加味して設定される。全体の目標符号量は、例えば『画像データの画素数×1画素あたりのビット深度×圧縮率』の計算などによって求められる。プレーン毎の目標符号量は、例えば全体の目標符号量を45MB、及びP1〜P4からなる各プレーンの重み付けをP1:P2:P3:P4=2:1:1:1とすると、P1プレーンが18MB、P2〜P4プレーンがそれぞれ9MB、として求まる。 Further, the target code amount for each plane is set by adding the weighting of the code amount of each plane from the total target code amount. The total target code amount can be obtained by, for example, calculating "the number of pixels of image data x the bit depth per pixel x the compression rate". The target code amount for each plane is, for example, if the total target code amount is 45 MB and the weighting of each plane consisting of P1 to P4 is P1: P2: P3: P4 = 2: 1: 1: 1, the P1 plane is 18 MB. , P2 to P4 planes are obtained as 9 MB each.

プレーンの属性、及びプレーン毎の符号量の重み付けは、図3に示すようなテーブルから圧縮率に従ってテーブル引きすることで設定される。図3の例は圧縮率1/3を区切りに、ポストプロダクションで編集・加工する用途を想定した低圧縮率の場合と、従来の民生デジタルビデオカメラと同様に記録した動画を視聴する用途を想定した高圧縮率の場合の2パターンを定義している。 The attributes of the planes and the weighting of the code amount for each plane are set by subtracting the table from the table as shown in FIG. 3 according to the compression ratio. The example in Fig. 3 assumes a low compression rate for post-production editing and processing with a compression rate of 1/3 as a delimiter, and an application for viewing recorded moving images in the same way as a conventional consumer digital video camera. Two patterns are defined in the case of a high compression ratio.

圧縮したRAW画像データをポストプロダクションで編集・加工する場合は、シャープネスやノイズ除去等の画像処理を強く掛けたり、カラーコレクションを行うことが想定される。そこで、輝度色差プレーン変換を行わず、色プレーン間の符号量の重みを同じにし、低圧縮で符号化することでRAW画像データが本来持つ各色のバランスを損なわないようにする。 When editing and processing compressed RAW image data in post-production, it is expected that image processing such as sharpness and noise removal will be strongly applied or color correction will be performed. Therefore, the luminance color difference plane conversion is not performed, the weights of the code amounts between the color planes are made the same, and the coding is performed with low compression so that the balance of each color originally possessed by the RAW image data is not impaired.

視聴を目的とする場合は、圧縮率を高くして動画の記録時間を延ばしつつも、画質を維持することが重要となる。そのため高圧縮率の場合は、輝度色差プレーンを符号化対象プレーンとして、視覚的に影響が大きい輝度成分に相当するYプレーンの符号量を、視覚的に影響が小さい色差成分に相当するC1〜C3プレーンの符号量よりも多くするように符号量に重み付けをする。色差成分を強く圧縮することによって圧縮率を高くするとともに、輝度成分の劣化を抑えることで画質の維持が可能となる。尚、図3で示すテーブルとは異なったパターンでテーブルを用意しても良い
符号化制御部103は、テーブルから取得したプレーンの属性をプレーン選択部108に供給し、同様にテーブルから取得したプレーン毎の符号量の重み付けに従って計算されたプレーン毎の目標符号量を並列符号化部109に供給する。
For viewing purposes, it is important to maintain image quality while increasing the compression rate to extend the recording time of moving images. Therefore, in the case of a high compression ratio, the luminance color difference plane is used as the coding target plane, and the code amount of the Y plane corresponding to the luminance component having a large visual influence is used as C1 to C3 corresponding to the luminance component having a small visual influence. The code amount is weighted so that it is larger than the code amount of the plane. The compression rate is increased by strongly compressing the color difference component, and the image quality can be maintained by suppressing the deterioration of the luminance component. A table may be prepared in a pattern different from that shown in FIG. 3. The coding control unit 103 supplies the attributes of the plane acquired from the table to the plane selection unit 108, and similarly acquires the plane from the table. The target code amount for each plane calculated according to the weighting of the code amount for each plane is supplied to the parallel coding unit 109.

符号化制御部103が符号化条件を設定した後、主制御部102が撮像部104を駆動させ、被写体の撮像画像データを取得する。撮像部104は撮像レンズと、図2で示すベイヤ配列のカラーフィルターを有する撮像センサ、並びにA/D変換器から構成されている。そして、被写体の光学像が撮像レンズによってセンサーに結像された後、結像された光学像がA/D変換器でデジタルのRAW画像データに変換されることになる。尚、撮像センサはCMOSやCCDで構成される。また、実施形態における撮像装置は、例えば30フレーム/秒の動画像を撮像するものとする。 After the coding control unit 103 sets the coding conditions, the main control unit 102 drives the imaging unit 104 to acquire the captured image data of the subject. The image pickup unit 104 includes an image pickup lens, an image pickup sensor having a Bayer array color filter shown in FIG. 2, and an A / D converter. Then, after the optical image of the subject is imaged on the sensor by the image pickup lens, the imaged optical image is converted into digital RAW image data by the A / D converter. The image sensor is composed of CMOS or CCD. Further, the imaging device according to the embodiment shall capture a moving image at, for example, 30 frames / second.

撮像部104から送られた1フレーム分のRAW画像データは信号処理部105に供給される。信号処理部105は、入力したRAW画像データ内の、撮像部104の撮像センサにおける欠落画素や信頼性の低い画素の値に対し、周辺画素値を用いて修復処理したり、所定のオフセット値を減算したりする処理を行い、処理結果を画像符号化装置114に供給する。 One frame of RAW image data sent from the imaging unit 104 is supplied to the signal processing unit 105. The signal processing unit 105 repairs the values of missing pixels and unreliable pixels in the image sensor of the imaging unit 104 in the input RAW image data by using the peripheral pixel values, or sets a predetermined offset value. A process such as subtraction is performed, and the process result is supplied to the image coding device 114.

画像符号化装置114内の色分離部106は、信号処理部105で修復処理されたRAW画像データを以下に示す4つのプレーンに分離し、プレーン変換部107、プレーン選択部108に供給する。
・Rプレーン:R成分のみの画素で構成されるプレーン
・Bプレーン:B成分のみの画素で構成されるプレーン
・G1プレーン:G1成分のみの画素で構成されるプレーン
・G2プレーン:G2成分のみの画素で構成されるプレーン
The color separation unit 106 in the image coding device 114 separates the RAW image data repaired by the signal processing unit 105 into the four planes shown below, and supplies the RAW image data to the plane conversion unit 107 and the plane selection unit 108.
-R plane: A plane composed of pixels containing only the R component-B plane: A plane composed of pixels containing only the B component-G1 plane: A plane composed of pixels containing only the G1 component-G2 plane: Only the G2 component Plane composed of pixels

プレーン変換部107は、上記の4つのプレーンを、次式(1)に基づき、輝度Yを示すYプレーン、色差C1,C2,C3を示すC1プレーン、C2プレーン、及びC3プレーンに変換する。以下の式における+,−は、各プレーンの同一位置の画素の値の演算を示し、演算結果が整数であるものとする(小数点以下は切り捨てとする)。 The plane conversion unit 107 converts the above four planes into a Y plane showing the luminance Y, a C1 plane showing the color differences C1, C2, and C3, a C2 plane, and a C3 plane based on the following equation (1). In the following formula, + and-indicate the calculation of the value of the pixel at the same position in each plane, and assume that the calculation result is an integer (rounded down to the nearest whole number).

Figure 0006775339
Figure 0006775339

なお、RAW画像データの水平方向画素数をW,垂直方向の画素数をHと表現したとき、上記のR,B,G1,G2、Y,C1,C2,C3の各プレーンのサイズは同じであって、W/2×H/2である。つまり、RAW画像データを4プレーンに分離したとき、分離後の4プレーンの画素数の合計は、RAW画像データの画素数と同じとなる。 When the number of pixels in the horizontal direction of the RAW image data is expressed as W and the number of pixels in the vertical direction is expressed as H, the sizes of the above R, B, G1, G2, Y, C1, C2, and C3 planes are the same. There is, W / 2 × H / 2. That is, when the RAW image data is separated into 4 planes, the total number of pixels of the 4 planes after the separation is the same as the number of pixels of the RAW image data.

プレーン選択部108は、{Rプレーン、Bプレーン、G1プレーン、G2プレーン}の色プレーン群、又は、{Yプレーン、C1プレーン、C2プレーン、C3プレーン}の輝度色差プレーン群のいずれか一方を選択し、並列符号化部109に供給する。この符号化対象のプレーン群の選択は、操作者が操作部101に対して選択したモードから主制御部101が決定し、符号化制御部103に設定されるものである。具体的には、図3に示すように、操作者が圧縮率として符号量が1/1〜1/3(オリジナルの情報量に対して100%から33%の範囲)の場合には色プレーンを符号化対象とし、1/3を超える圧縮率の場合には輝度色差プレーンを符号化対象となる。なお、ここで示したプレーンの切り替わりの圧縮率は一例である点に注意されたい。 The plane selection unit 108 selects either the color plane group of {R plane, B plane, G1 plane, G2 plane} or the luminance color difference plane group of {Y plane, C1 plane, C2 plane, C3 plane}. Then, it is supplied to the parallel coding unit 109. The selection of the plane group to be encoded is determined by the main control unit 101 from the mode selected by the operator for the operation unit 101, and is set in the coding control unit 103. Specifically, as shown in FIG. 3, when the operator has a compression ratio of 1/1 to 1/3 of the code amount (range of 100% to 33% of the original information amount), the color plane Is the coding target, and when the compression ratio exceeds 1/3, the luminance color difference plane is the coding target. It should be noted that the compression ratio of plane switching shown here is an example.

並列符号化部109は、図4に示すように4つの符号化部109a乃至109dで構成されており、それぞれが、供給されたプレーン群を構成する1つのプレーンについて圧縮符号化する。実施形態における符号化部109a乃至109dは、互いに独立して圧縮符号化を実行する。 As shown in FIG. 4, the parallel coding unit 109 is composed of four coding units 109a to 109d, each of which compression-encodes one plane constituting the supplied plane group. The coding units 109a to 109d in the embodiment perform compression coding independently of each other.

並列符号化部109内の符号化部109a乃至109dは同じ構成である。それ故、以下では、符号化部109aについて説明する。図4は、符号化部109aのブロック構成図である。他の符号化部109b乃至dも同じである点に注意されたい。 The coding units 109a to 109d in the parallel coding unit 109 have the same configuration. Therefore, the coding unit 109a will be described below. FIG. 4 is a block configuration diagram of the coding unit 109a. Note that the other coding units 109b to d are the same.

符号化部109aは、離散ウェーブレット変換部401、量子化制御部402.量子化部403、エントロピー符号化部404を有する。 The coding unit 109a includes a discrete wavelet transform unit 401 and a quantization control unit 402. It has a quantization unit 403 and an entropy coding unit 404.

離散ウェーブレット部401は入力した符号化対象プレーンに対し周波数分離処理が行い、複数のサブバンドを生成する。離散ウェーブレット部401による周波数分離処理で生成されるサブバンドの例を図5に示す。同図は、ウェーブレット変換を2回実行した場合のサブバンドを示している。 The discrete wavelet unit 401 performs frequency separation processing on the input coded plane to generate a plurality of subbands. FIG. 5 shows an example of the subband generated by the frequency separation process by the discrete wavelet unit 401. The figure shows the sub-band when the wavelet transform is executed twice.

ウェーブレット変換を1回行うと、LL、HL,LH,HHの4つのサブバンドが生成される。ここで、Lが低域、Hが高域を表す。L、Hの前の数字が分解レベルを表す。例えば、1HLは、水平方向が高域成分で、垂直方向が低域成分である分解レベル=1のサブバンド画像を表す。なお、ウェーブレット変換の回数に制限はない。また、2回目以降のウェーブレット変換は、直前のウェーブレット変換で得られたサブバンドLLに対して再帰的に行うことになる。それ故、予定した回数のウェーブレット変換を行った際のサブバンドLLは1つしか存在しない。図示は、ウェーブレット変換を2回行った例でるので、7つのサブバンドが生成されることになる。 When the wavelet transform is performed once, four subbands of LL, HL, LH, and HH are generated. Here, L represents a low frequency band and H represents a high frequency band. The numbers before L and H represent the decomposition level. For example, 1HL represents a subband image having a decomposition level = 1 in which the horizontal direction is a high frequency component and the vertical direction is a low frequency component. There is no limit to the number of wavelet transforms. Further, the second and subsequent wavelet transforms are recursively performed with respect to the subband LL obtained by the immediately preceding wavelet transform. Therefore, there is only one subband LL when the wavelet transform is performed a predetermined number of times. The illustration shows an example in which the wavelet transform is performed twice, so that seven subbands are generated.

量子化制御部402は、サブバンド毎の符号量、及び各サブバンドを構成するライン毎の量子化ステップサイズの設定を行う。量子化制御部402は、符号化制御部101より送られたプレーン毎の目標符号量に基づき、図11に示す例の様にサブバンド毎に符号量の割り当てを行う。図11はプレーンに設定された目標符号量18MBを、ウェーブレット変換を1回実行して生成されたサブバンドに対して割り当てる例を示す。図11の例ではサブバンド間の符号量比率が『LL:1HL:1LH:1HH=4:2:2:1』の関係である。これに基づいて、サブバンドLLに8MB、サブバンド1HL、1LHそれぞれに4MB、サブバンド1HHバンドに2MBを割り当てている。尚、図11においてサブバンドLLは画質への影響が大きい低域成分に該当することから、サブバンドLLを優遇して符号量を多く割り当てている。続いて、水平、あるいは垂直の1方向の低域成分を含む1HL、1LHバンドに対し、画質への影響が軽微な1HHバンドよりも多く符号量を割り当てるように設定する。また、図11は、ウェーブレット変換を1回行う場合の符号量を示しているが、ウェーブレット変換を2回以上行った場合にも各サブバンド毎の目標符号量が設定される。簡単には、ウェーブレット変換の回数と、各サブバンドの目標符号量をテーブル化しておけば良い。 The quantization control unit 402 sets the code amount for each subband and the quantization step size for each line constituting each subband. The quantization control unit 402 allocates the code amount for each subband as in the example shown in FIG. 11 based on the target code amount for each plane sent from the coded control unit 101. FIG. 11 shows an example in which a target code amount of 18 MB set on the plane is assigned to the subband generated by executing the wavelet transform once. In the example of FIG. 11, the code amount ratio between the subbands has a relationship of "LL: 1HL: 1LH: 1HH = 4: 2: 2: 1". Based on this, 8 MB is allocated to the sub band LL, 4 MB to each of the sub bands 1HL and 1 LH, and 2 MB to the sub band 1HH band. Since the sub-band LL corresponds to a low-frequency component having a large effect on the image quality in FIG. 11, the sub-band LL is given preferential treatment and a large amount of code is assigned. Subsequently, the 1HL and 1LH bands containing the low frequency components in one horizontal or vertical direction are set to allocate a larger amount of code than the 1HH band having a slight influence on the image quality. Further, FIG. 11 shows the code amount when the wavelet transform is performed once, but the target code amount for each subband is also set when the wavelet transform is performed twice or more. Simply, the number of wavelet transforms and the target code amount of each subband may be tabulated.

また、量子化制御部402は、後述するエントロピー符号化部404から送られた符号化結果を参照し、係数のライン単位で量子化ステップサイズを設定する。量子化ステップサイズの設定の詳細については並列符号化部109の処理フローの説明で後述する。 Further, the quantization control unit 402 refers to the coding result sent from the entropy coding unit 404, which will be described later, and sets the quantization step size in units of coefficient lines. The details of setting the quantization step size will be described later in the description of the processing flow of the parallel coding unit 109.

量子化部403は、離散ウェーブレット部401から送られた着目サブバンド内の係数データで構成される1ラインを量子化対象とし、量子化制御部402によって設定された量子化ステップサイズを用いて量子化を行う。 The quantization unit 403 targets one line composed of the coefficient data in the subband of interest sent from the discrete wavelet unit 401 as the quantization target, and quantizes using the quantization step size set by the quantization control unit 402. Quantization.

エントロピー符号化部404は、量子化部403によって量子化された係数のラインを圧縮符号化し、ライン単位の符号化データを出力すると共に、ライン単位の発生符号量の情報を量子化制御部402に送る。ここで、エントロピー符号化部404で用いる圧縮符号化としては、DPCMやハフマン符号等を用いることが出来る。 The entropy coding unit 404 compresses and encodes a line of coefficients quantized by the quantization unit 403, outputs coded data in line units, and outputs information on the amount of code generated in line units to the quantization control unit 402. send. Here, DPCM, Huffman code, or the like can be used as the compression coding used in the entropy coding unit 404.

符号化ストリーム生成部110は、並列符号化部109で生成された1フレーム分の付符号化データ(全プレーン、全サブバンドの符号化データ)をまとめ、符号化条件などを示すヘッダを付加し、復号可能なストリームを生成する。また、符号化ストリーム生成部110は全サブバンド、全プレーン分の符号が揃うまでは一時記憶部111に並列符号化部109から送られた符号を退避する。一時記憶部111は例えばDRAMといった記憶素子で構成することが出来る。符号化ストリーム生成部110は全サブバンド、全プレーン分の符号が揃った時点で一時記憶部111に退避した符号を読み出してストリームを生成する。 The coded stream generation unit 110 collects the coded data (coded data of all planes and all subbands) for one frame generated by the parallel code unit 109, and adds a header indicating the coding conditions and the like. , Generate a decodable stream. Further, the coded stream generation unit 110 saves the code sent from the parallel coding unit 109 to the temporary storage unit 111 until the codes for all subbands and all planes are aligned. The temporary storage unit 111 can be composed of a storage element such as a DRAM. The coded stream generation unit 110 reads out the code saved in the temporary storage unit 111 when the codes for all subbands and all planes are aligned, and generates a stream.

符号化ストリーム生成部110は、生成されたストリームをメモリI/O部112を介して記録媒体113に書き込む。記録媒体113は磁気ディスク及び半導体メモリなどで構成することが出来きるが、その種類は問わない。 The coded stream generation unit 110 writes the generated stream to the recording medium 113 via the memory I / O unit 112. The recording medium 113 can be composed of a magnetic disk, a semiconductor memory, or the like, but the type thereof does not matter.

以上、本第1の実施形態における撮像装置100の構成を処理該当を説明した。続いて、本第1の実施形態における画像符号化装置を搭載したデジタルビデオカメラにおける符号化処理の詳細を図6に示すフローチャートに基づき説明する。 The processing of the configuration of the image pickup apparatus 100 according to the first embodiment has been described above. Subsequently, the details of the coding process in the digital video camera equipped with the image coding device according to the first embodiment will be described with reference to the flowchart shown in FIG.

まず始めに操作部101から主制御部102に撮影記録開始命令が発行されたことを受け、主制御部102は符号化制御部103に撮影情報を送る(S601)。符号化制御部103は、この撮影情報に従って符号化条件を設定する(S602)。この符号化条件には、プレーン選択部108が色プレーン、輝度色差プレーンのいずれを選択するかの情報も含まれる。その後、撮像部104によりRAW画像データが取得され、信号処理部105がRAW画像データの修復処理を行う(S603)。色分離部106は、この修復処理後のRAW画像データを入力し、RAW画像データを4つの色プレーン{Rプレーン、Bプレーン,G1プレーン,G2プレーン}に分離する(S604)。プレーン変換部107は、4つの色プレーンを輝度色差プレーン{Yプレーン、C1プレーン、C2プレーン、C3プレーン}に変換する(S605)。プレーン選択部108は、符号化条件に従って色プレーンと輝度色差プレーンのいずれか一方を符号化対象プレーンとして選択し(S606)、並列符号化部109に供給する(S607)。並列符号化部109の内部の符号化部109a乃至109dそれぞれは、符号化対象プレーンそれぞれの符号化処理を並列的に行い、生成された符号化データを符号化ストリーム生成部110に出力する。符号化ストリーム生成部110は、並列符号化部109から出力されてきた符号化データを、一時記憶部111に保存し、全サブバンドの符号化データが終了したか否かを判定する(S608)。終了していない場合は処理の状態をS608のまま維持する。全プレーン、全サブバンドの符号化が終了している場合は、符号化ストリーム生成部110は、一時記憶部111から全ての符号化データを読み出し、所定のデータフォーマットの符号化ストリームを生成する(S609)。そして、符号化ストリーム生成部110は、生成した符号化ストリームをメモリI/O部112を介して記憶媒体113に書き出す(S610)。主制御部102は、操作部101を介して操作者より、撮影終了を指示されたか否かを判定する(S611)。否の場合には、主制御部102は、動画像の撮影記録が継続するものとし、処理をステップS603に戻す。また、終了指示の入力があったと判断された場合、主制御部102は本処理を終了する。 First, in response to the issuance of a shooting recording start command from the operation unit 101 to the main control unit 102, the main control unit 102 sends shooting information to the coding control unit 103 (S601). The coding control unit 103 sets the coding conditions according to this photographing information (S602). This coding condition also includes information on whether the plane selection unit 108 selects a color plane or a luminance color difference plane. After that, the RAW image data is acquired by the imaging unit 104, and the signal processing unit 105 repairs the RAW image data (S603). The color separation unit 106 inputs the RAW image data after the restoration process, and separates the RAW image data into four color planes {R plane, B plane, G1 plane, G2 plane} (S604). The plane conversion unit 107 converts the four color planes into luminance color difference planes {Y plane, C1 plane, C2 plane, C3 plane} (S605). The plane selection unit 108 selects one of the color plane and the luminance color difference plane as the coding target plane according to the coding conditions (S606), and supplies the parallel coding unit 109 (S607). Each of the coding units 109a to 109d inside the parallel coding unit 109 performs the coding process of each of the coding target planes in parallel, and outputs the generated coded data to the coded stream generation unit 110. The coded stream generation unit 110 stores the coded data output from the parallel coded unit 109 in the temporary storage unit 111, and determines whether or not the coded data of all the subbands has been completed (S608). .. If it is not finished, the processing state is maintained as S608. When the coding of all planes and all subbands is completed, the coded stream generation unit 110 reads all the coded data from the temporary storage unit 111 and generates a coded stream of a predetermined data format ( S609). Then, the coded stream generation unit 110 writes the generated coded stream to the storage medium 113 via the memory I / O unit 112 (S610). The main control unit 102 determines whether or not the operator has instructed the end of shooting via the operation unit 101 (S611). If no, the main control unit 102 assumes that the shooting and recording of the moving image is continued, and returns the process to step S603. Further, when it is determined that the end instruction has been input, the main control unit 102 ends this process.

次に、実施形態における並列符号化部109を構成する符号化部109a乃至109dの処理の詳細を図7に示すフローチャートに基づき説明する。先に説明したように符号化部109a乃至109dは、その構成が同じであり、ここでは代表して符号化部109a(図4参照)を説明する。 Next, the details of the processing of the coding units 109a to 109d constituting the parallel coding unit 109 in the embodiment will be described with reference to the flowchart shown in FIG. As described above, the coding units 109a to 109d have the same configuration, and here, the coding units 109a (see FIG. 4) will be described as a representative.

離散ウェーブレット部401は、入力した着目プレーンに対してウェーブレット変換を実行し、複数のサブバンドを生成し(S701)、符号化するサブバンドとそのサブバンドの目標符号量を設定する(S702)。各サブバンドは、複数の係数データで構成される。量子化制御部402は、量子化部403に入力される1ライン分の係数データが、着目サブバンドの1ライン目で有るか否かを判定する(S703)。1ライン目の場合、量子化制御部402は初期の所定の量子化ステップサイズを設定し(S704)、1ライン目ではない場合については量子化制御部402は1つ前のラインの符号化結果を参照して量子化ステップサイズを算出し設定する(S705)。1ライン目の符号化で設定される所定の量子化ステップサイズは、例えば統計値などで予め定義した値を使うことが出来る。ここで、S705の量子化ステップサイズの算出方法は、例えば後述する図8に示す方法がある。 The discrete wavelet unit 401 executes wavelet transform on the input plane of interest, generates a plurality of subbands (S701), sets the subband to be encoded and the target code amount of the subband (S702). Each subband is composed of a plurality of coefficient data. The quantization control unit 402 determines whether or not the coefficient data for one line input to the quantization unit 403 is the first line of the subband of interest (S703). In the case of the first line, the quantization control unit 402 sets an initial predetermined quantization step size (S704), and in the case of not the first line, the quantization control unit 402 sets the coding result of the previous line. The quantization step size is calculated and set with reference to (S705). As the predetermined quantization step size set in the coding of the first line, a value defined in advance by, for example, a statistical value can be used. Here, as a method of calculating the quantization step size of S705, for example, there is a method shown in FIG. 8 described later.

その後、量子化部403は、量子化制御部402によって設定された量子化ステップサイズに従い、1ライン分の係数データを量子化し(S706)、量子化後のライン分の係数データをエントロピー符号化部404に供給する。エントロピー符号化部404は、入力した1ライン分の量子化係数データをエントロピー符号化し、符号化データを生成しては出力する(S707)。このとき、エントロピー符号化部404は、着目ラインの符号化データ量を示す情報を量子化制御部402に供給する。 After that, the quantization unit 403 quantizes the coefficient data for one line according to the quantization step size set by the quantization control unit 402 (S706), and the coefficient data for the line after quantization is entropy coding unit. Supply to 404. The entropy coding unit 404 entropy-encodes the input quantization coefficient data for one line, generates the coded data, and outputs the coded data (S707). At this time, the entropy coding unit 404 supplies information indicating the amount of coded data of the line of interest to the quantization control unit 402.

その後、符号化部109は、着目サブバンドの最終ラインを処理したか否かを判定し(S708)、最終ラインで無い場合はS703に戻る。最終ラインを処理した場合は続いて全サブバンドの処理を終了したかを判定し(S709)、終了していない場合はS702に戻り、終了している場合は符号化を終了する。 After that, the coding unit 109 determines whether or not the final line of the subband of interest has been processed (S708), and returns to S703 if it is not the final line. When the final line is processed, it is subsequently determined whether the processing of all subbands is completed (S709), if it is not completed, the process returns to S702, and if it is completed, the coding is terminated.

続いて、S705の量子化制御部402による量子化ステップサイズの算出処理について、図8に示すフローチャートに基づき説明する。 Subsequently, the calculation process of the quantization step size by the quantization control unit 402 of S705 will be described with reference to the flowchart shown in FIG.

1つのサブバンド内における上下に隣り合ったラインは相関が高い。それ故、符号化対象のラインの量子化ステップサイズを求める際には、直前(1つ上)のラインの符号化結果を利用すると符号化効率が高くなると推定できる。そこで、本実施形態では、量子化制御部402は、着目サブバンドの符号化を行うに先立って、着目サブバンドの目標符号量をライン数分だけ等分して1ライン当たりの目標符号量Tを求める(S801)。そして、量子化制御部402は、符号化対象となる着目ラインを符号化する際に、直前のラインの実際の発生符号量(R)をTと比較して、R>T+αであるか否かを判定する(S802)。ここで、αは、RとTを比較する時に用いる所定の正の許容誤差値であり、例えばT×0.01等の計算で求めたり、50KBなどの数値で設定したりすることが出来る。R>T+αである場合は、直前のラインで設定した量子化ステップサイズを用いると符号化対象ラインの符号量も目標符号量より多く出てしまうと予測される。そこで、量子化制御部402は、符号化対象の着目ラインの量子化ステップサイズを、直前のラインの量子化ステップサイズに所定値(正の値)だけ加算した値とする(S803)。一方、R>T+αに当てはまらない場合は、量子化制御部402に、R<T―αを満たすか否か判定する(S804)。R<T―αである場合は、直前のラインで設定した量子化ステップサイズを用いると符号化対象ラインの符号量が目標符号量より少なくなると予測されることを意味する。そこで、量子化制御部402は、着目ラインの量子化ステップサイズを直前のラインの量子化ステップサイズから所定値だけ減じた値とする(S805)。いずれにも当てはまらない場合、つまり、T−α≦R≦T+αであった場合、直前のラインで設定した量子化ステップサイズを用いれば符号化対象ラインの符号量が目標通り発生すると予測されるため、直前のラインの量子化ステップサイズをそのまま設定する(S806)。 Lines adjacent to each other in one subband are highly correlated. Therefore, when determining the quantization step size of the line to be encoded, it can be estimated that the coding efficiency will be high if the coding result of the immediately preceding (upper) line is used. Therefore, in the present embodiment, the quantization control unit 402 divides the target code amount of the focus subband into equal parts by the number of lines and equalizes the target code amount T per line prior to coding the focus subband. (S801). Then, when the quantization control unit 402 encodes the line of interest to be encoded, it compares the actual generated code amount (R) of the immediately preceding line with T and determines whether R> T + α. Is determined (S802). Here, α is a predetermined positive tolerance value used when comparing R and T, and can be obtained by calculation such as T × 0.01 or set by a numerical value such as 50 KB. When R> T + α, it is predicted that the code amount of the coded target line will be larger than the target code amount if the quantization step size set in the immediately preceding line is used. Therefore, the quantization control unit 402 sets the quantization step size of the line of interest to be encoded as a value obtained by adding a predetermined value (positive value) to the quantization step size of the immediately preceding line (S803). On the other hand, if R> T + α does not apply, the quantization control unit 402 determines whether or not R <T—α is satisfied (S804). When R <T-α, it means that the code amount of the coded target line is predicted to be less than the target code amount when the quantization step size set in the immediately preceding line is used. Therefore, the quantization control unit 402 sets the quantization step size of the line of interest to a value obtained by subtracting a predetermined value from the quantization step size of the immediately preceding line (S805). If none of the above applies, that is, if T−α ≦ R ≦ T + α, it is predicted that the code amount of the coded line will be generated as the target if the quantization step size set in the immediately preceding line is used. , The quantization step size of the immediately preceding line is set as it is (S806).

以上の様に本実施例のデジタルビデオカメラに搭載される画像符号化装置は、ベイヤ配列の画像データに対して、色成分毎に分離して各色のプレーン画像を生成し、その後に各色プレーンから輝度プレーンと色差プレーンに分離、輝度色差プレーンを符号化する。輝度プレーンはR、G1、G2、Bの相関を抽出した平均成分であり、視覚的に大きな影響を持っている。逆に色差プレーンはR、G1、G2、Bの相関を除去した差分成分であり、輝度プレーンと比べて視覚的な影響が小さい。そのため、量子化を行うにあたり輝度プレーンの符号量を優遇し、色差プレーンの符号量を少なくすることで、画質を保ったままベイヤ配列の画像データを圧縮することが可能となる。 As described above, the image coding device mounted on the digital video camera of this embodiment generates a plane image of each color by separating each color component from the image data of the Bayer array, and then from each color plane. Separate into a luminance plane and a color difference plane, and encode the luminance color difference plane. The luminance plane is an average component obtained by extracting the correlation of R, G1, G2, and B, and has a great visual influence. On the contrary, the color difference plane is a difference component from which the correlation of R, G1, G2, and B is removed, and has a smaller visual influence than the luminance plane. Therefore, by giving preferential treatment to the code amount of the luminance plane and reducing the code amount of the color difference plane in performing the quantization, it is possible to compress the image data of the Bayer array while maintaining the image quality.

尚、本実施例ではベイヤ配列の画像データを圧縮するデジタルビデオカメラを例として取り上げたが、本発明はそれに限定されるものでは無く、例えばデジタルスチルカメラやスマートフォンに用いても良い。 In this embodiment, a digital video camera that compresses image data in a Bayer array is taken as an example, but the present invention is not limited thereto, and may be used for, for example, a digital still camera or a smartphone.

[第2の実施形態]
図9は、第2の実施形態における撮像装置のブロック構成図である。第1の実施形態との違いは、第1の実施形態のプレーン変換部107に代わって近似プレーン変換部901とした点である。以下、図9を参照して、本第2の実施形態における動作を説明する。
[Second Embodiment]
FIG. 9 is a block configuration diagram of the imaging device according to the second embodiment. The difference from the first embodiment is that the approximate plane conversion unit 901 is used instead of the plane conversion unit 107 of the first embodiment. Hereinafter, the operation in the second embodiment will be described with reference to FIG.

先に説明した第1の実施形態における画像符号化装置114で用いられる計算式1において、各プレーンの計算結果は整数値となることを前提にしたため、除算の計算結果が整数値とならない場合には丸め誤差が発生する。除算の丸め処理で情報損失が発生し、輝度色差プレーンから元の色プレーンに可逆の変換をすることが出来ない。そこで丸め処理による情報損失を除外するために、プレーン変換部107の計算式を近似した計算式を近似プレーン変換部901に適用する。 In the calculation formula 1 used in the image coding apparatus 114 in the first embodiment described above, it is assumed that the calculation result of each plane is an integer value. Therefore, when the calculation result of division is not an integer value. Will cause a rounding error. Information loss occurs in the rounding process of division, and it is not possible to perform reversible conversion from the luminance color difference plane to the original color plane. Therefore, in order to exclude the information loss due to the rounding process, a calculation formula that approximates the calculation formula of the plane conversion unit 107 is applied to the approximation plane conversion unit 901.

第2の実施形態における近似プレーン変換部901は、次式(2)に基づいて、色プレーンをYプレーン、C1プレーン、C2プレーン、及びC3プレーンからなる輝度色差プレーンに変換する。 The approximate plane conversion unit 901 in the second embodiment converts the color plane into a luminance color difference plane composed of a Y plane, a C1 plane, a C2 plane, and a C3 plane based on the following equation (2).

Figure 0006775339
近似プレーン変換部901に用いられる計算式は、第1の実施例のプレーン変換部107で用いられている計算式を近似したものである。近似プレーン変換部901に用いられる式(2)は、復号側で次式(3)に基づいて色プレーンに逆変換することで、完全に元に戻せることが特徴である。
Figure 0006775339
The calculation formula used in the approximate plane conversion unit 901 is an approximation of the calculation formula used in the plane conversion unit 107 of the first embodiment. The equation (2) used in the approximate plane conversion unit 901 is characterized in that it can be completely restored by reverse conversion to a color plane based on the following equation (3) on the decoding side.

Figure 0006775339
Figure 0006775339

尚、式(3)は式(2)の各式に対して、移項のみを用いて変形した逆変換式である。 It should be noted that the equation (3) is an inverse conversion equation obtained by modifying each equation of the equation (2) by using only the transposition.

続いて、本第2の実施形態の画像符号化装置902を搭載した撮像装置900の動作の詳細を図10に示すフローチャートに基づき説明する。尚、第1の実施形態と同様の処理には同じ符号を付して示し、ここでの説明を簡略にする。 Subsequently, the details of the operation of the image pickup apparatus 900 equipped with the image coding apparatus 902 of the second embodiment will be described with reference to the flowchart shown in FIG. The same processing as in the first embodiment is designated by the same reference numerals, and the description thereof will be simplified.

まず、第1の実施形態と同様に、撮影命令を受けてから符号化条件を設定する。色分離部106は、RAW画像データを取得し、色プレーンに分離する(S601−S604)。その後に、近似プレーン変換部901によって色プレーンに基づいて、式(2)に従って輝度色差プレーンを生成する(S1001)。次に符号化対象プレーンを選択して符号化を行い、符号化ストリームを生成する(S606−S611)。 First, as in the first embodiment, the coding conditions are set after receiving the photographing command. The color separation unit 106 acquires RAW image data and separates it into color planes (S601-S604). After that, the approximate plane conversion unit 901 generates a luminance color difference plane according to the equation (2) based on the color plane (S1001). Next, the plane to be encoded is selected and encoded to generate an encoded stream (S606-S611).

以上の様に本第2の実施形態の撮像装置に搭載される画像符号化装置は、各色プレーンから輝度色差プレーンに変換するにあたり、第1の実施形態で用いられる計算式を近似した計算式を用いる。この結果、符号化処理による量子化処理による量子化誤差は発生するものの、色変換による演算誤差は無くなり、第1の実施形態と比較してロスの少ない符号化データを生成することが可能となる。 As described above, the image coding apparatus mounted on the image pickup apparatus of the second embodiment uses a calculation formula that approximates the calculation formula used in the first embodiment when converting from each color plane to the luminance color difference plane. Use. As a result, although the quantization error due to the quantization process by the coding process occurs, the calculation error due to the color conversion is eliminated, and it is possible to generate the coded data with less loss as compared with the first embodiment. ..

以上説明したように本第1、第2の実施形態によれば、RAWデータを画質への影響が大きい輝度と、逆に画質への影響が小さい色差に分離することが出来る。特許文献1に記載のサブサンプリングのみを用いる手法と異なり、画質への影響が大きい成分と、影響が小さい成分に分離することが可能であるため、高圧縮率を達成するために色差の量子化をより大きくする、といったことが可能となる。そのため、RAWデータを高い圧縮率で符号化するときの画質劣化を抑えることで、圧縮効率を向上させることができる。 As described above, according to the first and second embodiments, the RAW data can be separated into a luminance having a large influence on the image quality and a color difference having a small influence on the image quality. Unlike the method using only subsampling described in Patent Document 1, it is possible to separate a component having a large effect on image quality and a component having a small effect on image quality, so that the color difference is quantized in order to achieve a high compressibility. Can be made larger. Therefore, the compression efficiency can be improved by suppressing the deterioration of the image quality when encoding the RAW data with a high compression rate.

なお、上記実施形態では、符号化部109a乃至109dは並列して実行するものとして説明したが、1つの符号化部で複数のプレーンを順に符号化するようにしても構わない。 In the above embodiment, the coding units 109a to 109d have been described as being executed in parallel, but one coding unit may encode a plurality of planes in order.

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

101…操作部、102…主制御部、103…符号化制御部、104…撮像部、105…信号処理部、106…色分離部、107…プレーン変換部、108…プレーン選択部、109…並列符号化部、110…符号化ストリーム生成部、111…一時記憶部、112…メモリI/O部、113…記憶媒体 101 ... operation unit, 102 ... main control unit, 103 ... coding control unit, 104 ... imaging unit, 105 ... signal processing unit, 106 ... color separation unit, 107 ... plane conversion unit, 108 ... plane selection unit, 109 ... parallel Coding unit, 110 ... Coded stream generation unit, 111 ... Temporary storage unit, 112 ... Memory I / O unit, 113 ... Storage medium

Claims (8)

ベイヤ配列の画像データを符号化する画像符号化装置であって、
ベイヤ配列の画像データから、R成分を示すRプレーン、B成分を示すBプレーン、G1成分を示すG1プレーン、G2成分を示すG2プレーンの4つの色プレーンに分離する分離手段と、
該分離手段で得られた4つの色プレーンから、輝度Yを示すYプレーン、及び、色差C1,C2,C3を示すC1プレーン、C2プレーン、C3プレーンで構成される輝度色差プレーンに変換する変換手段と、
前記輝度色差プレーンを符号化する符号化手段と
を有し、
前記変換手段は、次式に従って色プレーンを輝度色差プレーンに変換する
Figure 0006775339
ことを特徴とする画像符号化装置。
An image coding device that encodes image data in a Bayer array.
A separation means for separating the image data of the Bayer array into four color planes: an R plane showing the R component, a B plane showing the B component, a G1 plane showing the G1 component, and a G2 plane showing the G2 component.
A conversion means for converting the four color planes obtained by the separation means into a Y plane indicating the luminance Y and a luminance color difference plane composed of the C1 plane, the C2 plane, and the C3 plane showing the luminance C1, C2, and C3. When,
Have a coding means for coding the luminance and chrominance planes,
The conversion means converts the color plane into a luminance color difference plane according to the following equation.
Figure 0006775339
An image coding device characterized in that.
前記符号化手段は、
着目プレーンをウェーブレット変換して、複数のサブバンドを生成するウェーブレット変換手段と、
該ウェーブレット変換手段で得られたサブバンドそれぞれの係数データを、ライン単位に設定された量子化ステップを用いて量子化する量子化手段と、
該量子化手段で量子化された係数データをライン単位にエントロピー符号化するエントロピー符号化手段と、
該エントロピー符号化手段で生成された符号化データの符号量に基づき、次のラインのための量子化ステップを決定する符号化制御手段と
を有することを特徴とする請求項に記載の画像符号化装置。
The coding means is
A wavelet transform means that generates multiple subbands by wavelet transforming the plane of interest,
A quantization means that quantizes the coefficient data of each subband obtained by the wavelet transform means using a quantization step set for each line, and a quantization means.
An entropy coding means that entropy encodes the coefficient data quantized by the quantization means in line units, and
The image code according to claim 1 , further comprising a coding control means for determining a quantization step for the next line based on the code amount of the coded data generated by the entropy coding means. Device.
前記符号化制御手段は、
着目サブバンドの目標とする符号量を、当該着目サブバンドに含まれるライン数で除算することで1ライン当たりの目標符号量Tを求め、
着目サブバンド内の量子化対象の着目ラインの直前のラインの符号化した際に得られた符号量をRとし、正の許容誤差をαとしたき、
R>T+αである場合には、前記直前のラインで用いた量子化ステップサイズに所定値を加算した値を前記着目ラインの量子化ステップサイズとして決定し、
R<T−αである場合には、前記直前のラインで用いた量子化ステップサイズから所定値を減算した値を前記着目ラインの量子化ステップサイズとして決定し、
T−α≦R≦T+αである場合には、前記直前のラインで用いた量子化ステップサイズを前記着目ラインの量子化ステップサイズとして決定する
ことを特徴とする請求項に記載の画像符号化装置。
The coding control means is
The target code amount T per line is obtained by dividing the target code amount of the focus subband by the number of lines included in the focus subband.
Let R be the amount of code obtained when coding the line immediately before the line of interest in the quantization target in the subband of interest, and let α be the positive tolerance.
When R> T + α, a value obtained by adding a predetermined value to the quantization step size used in the immediately preceding line is determined as the quantization step size of the line of interest.
In the case of R <T-alpha determines the value obtained by subtracting a predetermined value from the quantization step size used in the immediately preceding line as the quantization step size of the intended line,
The image coding according to claim 2 , wherein when T−α ≦ R ≦ T + α, the quantization step size used in the immediately preceding line is determined as the quantization step size of the line of interest. apparatus.
前記ウェーブレット変換手段で生成されるサブバンドLL、HL、LH、HHにおける目標とする符号量の関係は、LL>HL=LH>HHであることを特徴とする請求項に記載の画像符号化装置。 The image coding according to claim 3 , wherein the relationship between the target code amounts in the subbands LL, HL, LH, and HH generated by the wavelet transform means is LL> HL = LH> HH. apparatus. 更に、前記分離手段で分離された色プレーンと、前記変換手段で得られた輝度色差プレーンのいずれか一方を選択し、前記符号化手段に供給する選択手段を有することを特徴とする請求項1乃至のいずれか1項に記載の画像符号化装置。 Further, claim 1 is characterized in that it has a selection means for selecting either one of the color plane separated by the separation means and the luminance color difference plane obtained by the conversion means and supplying the coding means. The image coding apparatus according to any one of 3 to 3 . 前記色プレーンを符号化対象とする場合の各プレーンの目標符号量は同じであり、
前記輝度色差プレーンを符号化する場合の輝度プレーンの目標符号量は、他の3つの色差プレーンのいずれよりも大きい
ことを特徴とする請求項に記載の画像符号化装置。
When the color plane is used as a coding target, the target code amount of each plane is the same.
The image coding apparatus according to claim 5 , wherein the target code amount of the luminance plane when encoding the luminance color difference plane is larger than that of any of the other three luminance planes.
ベイヤ配列の画像データを符号化する画像符号化装置の制御方法であって、
分離手段が、ベイヤ配列の画像データから、R成分を示すRプレーン、B成分を示すBプレーン、G1成分を示すG1プレーン、G2成分を示すG2プレーンの4つの色プレーンに分離する分離工程と、
変換手段が、前記分離工程で得られた4つの色プレーンから、輝度Yを示すYプレーン、及び、色差C1,C2,C3を示すC1プレーン、C2プレーン、C3プレーンで構成される輝度色差プレーンに変換する変換工程と、
符号化手段が、前記輝度色差プレーンを符号化する符号化工程と
を有し、
前記変換工程では、次式に従って色プレーンを輝度色差プレーンに変換する
Figure 0006775339
ことを特徴とする画像符号化装置の制御方法。
A control method for an image coding device that encodes image data in a Bayer array.
The separation step separates the image data of the Bayer array into four color planes: an R plane showing the R component, a B plane showing the B component, a G1 plane showing the G1 component, and a G2 plane showing the G2 component.
The conversion means changes from the four color planes obtained in the separation step to a luminance color difference plane composed of a Y plane showing the luminance Y and a C1 plane, a C2 plane, and a C3 plane showing the luminance C1, C2, and C3. The conversion process to convert and
Encoding means, it possesses an encoding step of encoding the luminance and chrominance planes,
In the conversion step, the color plane is converted into a luminance color difference plane according to the following equation.
Figure 0006775339
A control method for an image coding device.
コンピュータが読み込み実行することで、前記コンピュータに、請求項1乃至のいずれか1項に記載の画像符号化装置が有する各手段として機能させるためのプログラム。 A program for causing the computer to function as each means included in the image coding apparatus according to any one of claims 1 to 6 , when the computer reads and executes the image.
JP2016131034A 2016-06-30 2016-06-30 Image coding device and its control method Active JP6775339B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016131034A JP6775339B2 (en) 2016-06-30 2016-06-30 Image coding device and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016131034A JP6775339B2 (en) 2016-06-30 2016-06-30 Image coding device and its control method

Publications (2)

Publication Number Publication Date
JP2018006999A JP2018006999A (en) 2018-01-11
JP6775339B2 true JP6775339B2 (en) 2020-10-28

Family

ID=60948055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016131034A Active JP6775339B2 (en) 2016-06-30 2016-06-30 Image coding device and its control method

Country Status (1)

Country Link
JP (1) JP6775339B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971913B (en) * 2019-11-04 2021-09-24 电子科技大学 Bayer image compression method based on filling Y channel

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4436733B2 (en) * 2004-08-27 2010-03-24 オリンパス株式会社 Imaging apparatus and reproducing apparatus
US7480417B2 (en) * 2004-10-19 2009-01-20 Microsoft Corp. System and method for encoding mosaiced image data employing a reversible color transform
JP6077811B2 (en) * 2012-10-04 2017-02-08 キヤノン株式会社 Image coding apparatus, image coding method, and program
JP2016082395A (en) * 2014-10-16 2016-05-16 キヤノン株式会社 Encoder, coding method and program
JP2016092589A (en) * 2014-11-04 2016-05-23 キヤノン株式会社 Encoder and control method therefor

Also Published As

Publication number Publication date
JP2018006999A (en) 2018-01-11

Similar Documents

Publication Publication Date Title
JP3085465B2 (en) Image data encoding apparatus and encoding method
US7359549B2 (en) Imaging device, image processing method, and recording medium
US20170118491A1 (en) Coding method and decoding processing method
US20050213812A1 (en) Image compressing method and image compression apparatus
US10032252B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer readable storage medium
US20210203949A1 (en) Image encoding apparatus and image decoding apparatus, methods of controlling the same, and non-transitory computer-readable storage medium
US10776956B2 (en) Image coding apparatus, image decoding apparatus, image coding method, image decoding method, and non-transitory computer-readable storage medium
US20170118477A1 (en) Image encoding apparatus and method of controlling the same
JP2017216630A (en) Image encoding device and its control method
US20230133895A1 (en) Image encoding apparatus and method for controlling the same and non-transitory computer-readable storage medium
JP6775339B2 (en) Image coding device and its control method
US20190387228A1 (en) Image encoding apparatus, image decoding apparatus, control methods thereof, and non-transitory computer-readable storage medium
JP2001359117A (en) Image processing unit and image processing method or the unit
TW200915846A (en) Video signal processing device, video signal processing method and video signal processing program
JP4375662B2 (en) Image processing apparatus, image processing method, program, information recording medium, and imaging apparatus
JP2002252759A (en) Image quantization method and device, and image coder utilizing them
JP7016660B2 (en) Coding device, its control method, and control program, and image pickup device.
JP6875817B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP7465073B2 (en) Image encoding device, control method and program thereof
JP6907004B2 (en) Image processing equipment, image processing methods, and programs
US11785352B2 (en) Image encoding apparatus, method for controlling the same, and non-transitory computer-readable storage medium
JP2020123864A (en) Image encoder
JP2008124530A (en) Raw data compressing method
JP2001231009A (en) Image data storage device ad method
JP2023070055A (en) Image encoding device, control method thereof, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190611

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200825

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200907

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201006

R151 Written notification of patent or utility model registration

Ref document number: 6775339

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151