JP2017085556A - Image processing apparatus, imaging apparatus, image processing method, and program - Google Patents
Image processing apparatus, imaging apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2017085556A JP2017085556A JP2016196000A JP2016196000A JP2017085556A JP 2017085556 A JP2017085556 A JP 2017085556A JP 2016196000 A JP2016196000 A JP 2016196000A JP 2016196000 A JP2016196000 A JP 2016196000A JP 2017085556 A JP2017085556 A JP 2017085556A
- Authority
- JP
- Japan
- Prior art keywords
- plane
- image data
- code amount
- target code
- sum
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、画像処理装置、撮像装置、画像処理方法及びプログラムに関する。 The present invention relates to an image processing device, an imaging device, an image processing method, and a program.
昨今のデジタルカメラやデジタルカムコーダー等の撮像装置は、撮像素子にCCDセンサまたはCMOSセンサを採用している。それらのセンサは主に単板式で構成されており、センサ表面のカラーフィルターアレイ(以下、CFAと呼称する)によって1つの画素で1つの色成分(例えばRGBの内の1つ)の画素値を取得する。CFAを用いることで、例えば図2(a)に示すようなR(赤)、G0(緑)、B(青)、G1(緑)の周期的なパターンで配置されたベイヤー配列の画像データ(以下、RAWデータと呼称する)が得られる。人間の視覚が輝度成分に対し、高い感度を持っていることから、図2(a)のRAWデータは輝度成分を多く含む緑成分が赤成分や青成分に比べ2倍の画素数を割り当てられている。RAWデータは前述した通り、1画素に1つの色成分の情報しか持たないため、デモザイク処理を用いて、1画素に対して赤、青、緑の画素値を生成する必要がある。「デモザイク」(de-mosaic)処理とは、各画素に対してその周辺画素から足りない色情報を集め与えることで色情報を補完し、フルカラー画像を作り出す処理である。 Recent imaging apparatuses such as digital cameras and digital camcorders employ CCD sensors or CMOS sensors as imaging elements. These sensors are mainly composed of a single plate type, and a pixel value of one color component (for example, one of RGB) is obtained by one pixel by a color filter array (hereinafter referred to as CFA) on the sensor surface. get. By using CFA, for example, image data of a Bayer array (R) (red), G0 (green), B (blue), and G1 (green) arranged in a periodic pattern as shown in FIG. (Hereinafter referred to as RAW data). Since human vision has high sensitivity to the luminance component, the RAW data in FIG. 2 (a) is assigned twice as many pixels as the green component containing the luminance component compared to the red and blue components. ing. Since RAW data has only one color component information per pixel as described above, it is necessary to generate red, blue, and green pixel values for one pixel using demosaic processing. The “de-mosaic” process is a process of creating a full-color image by complementing color information by collecting and giving missing color information from surrounding pixels to each pixel.
一般に、撮像装置においては、デモザイクによって得られたRGB信号、あるいはRGB信号から変換して得られたYUV信号の画像データを符号化して記録する。一方、近年では、デモザイク前のRAWデータを符号化して記録する方法も提案されている。 In general, an imaging apparatus encodes and records image data of an RGB signal obtained by demosaicing or a YUV signal obtained by conversion from an RGB signal. On the other hand, in recent years, a method of encoding and recording RAW data before demosaicing has been proposed.
例えば、特許文献1には、RAWデータを信号成分毎(R、G0、B、G1)に分類して4つのコンポーネント(プレーン)に整理した後に符号化をする方法が示されている。
For example,
しかしながら、RAWデータを各色の信号成分毎に分離することで、元々画素位置が近く、同色で相関が高いG0成分とG1成分を別プレーンに分離してしまうことになる。そのため、G0、G1それぞれにおいて隣接画素の画素値が離れてしまう場合があり、結果として符号化効率が悪くなることが考えられる。 However, by separating the RAW data for each color signal component, the G0 component and G1 component that are originally close to each other and have the same color and high correlation are separated into different planes. For this reason, the pixel values of adjacent pixels may be separated in G0 and G1, respectively, and as a result, the encoding efficiency may be deteriorated.
そこで、本発明は、RAWデータの効率的な符号化を可能とする技術を提供することを目的とする。 Therefore, an object of the present invention is to provide a technique that enables efficient encoding of RAW data.
上記課題を解決するための本発明は、ベイヤー配列の画像データを符号化する画像処理装置であって、
前記画像データを構成する複数の色成分を前記ベイヤー配列に基づき複数のプレーン画像データに分離する色分離手段と、
前記複数のプレーン画像データのうち、同色の成分同士を加算して和プレーンのプレーン画像データを生成する和プレーン生成手段と、
前記同色の成分同士を減算して差プレーンのプレーン画像データを生成する差プレーン生成手段と、
前記プレーン画像データを圧縮符号化する符号化手段であって、前記同色の成分のプレーン画像データについては、前記和プレーン及び前記差プレーンのプレーン画像データを圧縮符号化する符号化手段と
を備えることを特徴とする。
The present invention for solving the above problems is an image processing apparatus that encodes Bayer array image data,
Color separation means for separating a plurality of color components constituting the image data into a plurality of plane image data based on the Bayer array;
A sum plane generating means for generating a sum plane plane image data by adding components of the same color among the plurality of plane image data;
Difference plane generating means for subtracting the same color components to generate plane image data of a difference plane;
Coding means for compressing and coding the plain image data, the plain image data of the same color component comprising coding means for compressing and coding the plain image data of the sum plane and the difference plane It is characterized by.
本発明によれば、RAWデータの効率的な符号化が可能となる。 According to the present invention, it is possible to efficiently encode RAW data.
以下、本発明の好ましい実施の形態を添付の図面を参照して詳細に説明する。なお、本発明は以下の実施の形態に限定されるものではない。すなわち、以下の実施の形態は特許請求の範囲に係る発明を限定するものでなく、また実施の形態で説明されている特徴の組み合わせの全てが発明の解決手段に必須のものとは限らない。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to the following embodiments. That is, the following embodiments do not limit the invention according to the claims, and all combinations of features described in the embodiments are not necessarily essential to the solution means of the invention.
また、本実施形態において説明される各機能ブロックは必ずしも個別のハードウェアである必要はない。すなわち、例えばいくつかの機能ブロックの機能は、1つのハードウェアにより実行されても良い。また、いくつかのハードウェアの連係動作により1つの機能ブロックの機能または、複数の機能ブロックの機能が実行されても良い。また、各機能ブロックの機能は、CPUがメモリ上に展開したコンピュータプログラムにより実行されても良い。 In addition, each functional block described in the present embodiment does not necessarily need to be individual hardware. That is, for example, the functions of some functional blocks may be executed by one piece of hardware. In addition, the function of one functional block or the functions of a plurality of functional blocks may be executed by some hardware linked operations. Further, the function of each functional block may be executed by a computer program developed on the memory by the CPU.
[実施形態1]
以下、発明の第1の実施形態について説明する。本実施形態では、デジタルカメラ等の撮像装置を例にとって説明するが、ベイヤー配列のRAW画像データを圧縮することができる装置であればどのような装置でも良い。たとえば、携帯電話、スマートフォン、タブレット型情報端末、ノート型情報端末、コンピュータ等の通信装置や情報処理装置等であってもよい。以下、発明の実施形態に対応する撮像装置について説明する。
[Embodiment 1]
Hereinafter, a first embodiment of the invention will be described. In the present embodiment, an imaging apparatus such as a digital camera will be described as an example. However, any apparatus may be used as long as it can compress Bayer array RAW image data. For example, it may be a communication device such as a mobile phone, a smartphone, a tablet information terminal, a notebook information terminal, a computer, an information processing device, or the like. Hereinafter, an imaging device corresponding to an embodiment of the invention will be described.
まず、図1Aを参照して、本実施形態の撮像装置100の主要な構成を説明する。図1において、制御部101は、例えば、CPU(MPU)、メモリ(DRAM、SRAM)、不揮発性メモリ(EEPROM)などからなり、各種処理(プログラム)を実行して撮像装置100の各ブロックを制御したり、各ブロック間でのデータ転送を制御したりする。また、制御部101は、ユーザからの操作を受け付ける操作部102からの操作信号に応じて、撮像装置100の各ブロックを制御する。
First, with reference to FIG. 1A, a main configuration of the
操作部102は、例えば、電源ボタン、静止画記録ボタン、動画記録開始ボタン、ズーム調整ボタン、オートフォーカスボタンなどの撮影に関連する各種操作を入力するスイッチ類からなる。また、メニュー表示ボタン、決定ボタン、その他カーソルキー、ポインティングデバイス、タッチパネル等からなり、ユーザによりこれらのキーやボタンが操作されると制御部101に操作信号を送信する。なお、撮像装置100は、不図示の電気的に消去・記録可能な不揮発性メモリを有し、制御部101の動作用の定数、プログラム等が記憶される。
The operation unit 102 includes switches for inputting various operations related to shooting such as a power button, a still image recording button, a moving image recording start button, a zoom adjustment button, and an autofocus button. Further, it includes a menu display button, a determination button, other cursor keys, a pointing device, a touch panel, and the like. When these keys and buttons are operated by the user, an operation signal is transmitted to the control unit 101. Note that the
撮像部103は、レンズにより取り込まれた被写体の光学像(被写体像)を、絞りにより光量を制御して、CCDセンサやCMOSセンサ等の撮像素子により画像信号に変換し、アナログデジタル変換をして、画像処理部104に送信する。画像処理部104は、入力されたデジタル画像信号を処理し、処理された画像データは制御部101により不図示の不揮発性メモリに格納される。具体的な処理については後述する。なお、ここで撮像素子により得られた画像信号は、いわゆるRAW画像データであり、ベイヤー配列のRGBデータである。
The imaging unit 103 controls the light amount of an optical image (subject image) of a subject captured by a lens by an aperture, converts it into an image signal by an imaging element such as a CCD sensor or a CMOS sensor, and performs analog-digital conversion. And transmitted to the
音声入力部105は、例えば、内蔵された無指向性のマイクまたは音声入力端子を介して接続された外部マイク等により、撮像装置100の周囲の音声を集音(収音)し、アナログデジタル変換をして音声処理部106に送信する。音声処理部106は、入力されたデジタル音声信号のレベルの適正化処理等の音声に関する処理を行う。そして、音声処理部106で処理された音声データは、制御部101により不図示の不揮発性メモリに格納される。
The
画像処理部104及び音声処理部106により処理され、不図示の不揮発性メモリに格納された画像データ、音声データは、制御部101により、記録再生部110に送信され、記録媒体111に記録される。ここで、記録媒体111は、撮像装置に内蔵された記録媒体でも、取外し可能な記録媒体でもよく、撮像装置100で生成した圧縮画像信号、圧縮音声信号、音声信号、各種データなどを記録することができればよい。例えば、記録媒体111は、ハードディスク、光ディスク、光磁気ディスク、CD−R、DVD−R、磁気テープ、不揮発性の半導体メモリ、フラッシュメモリ、などのあらゆる方式の記録媒体を含む。
Image data and audio data processed by the
また、記録媒体111に記録された圧縮画像信号、圧縮音声信号は、画像処理部104及び音声処理部106により復号され、画像は表示制御部109を介して表示部108に表示され、音声はスピーカユニット107より音声出力される。
Also, the compressed image signal and the compressed audio signal recorded on the
通信部112は、撮像装置100と外部装置との間で通信を行うもので、例えば、音声信号、画像信号、圧縮音声信号、圧縮画像信号などのデータを送信したり受信したりする。また、撮影開始や終了コマンド等の、撮影にかかる制御信号や、その他の情報を送信したり受信したりする。通信部112は、例えば、赤外線通信モジュール、Bluetooth(登録商標)通信モジュール、無線LAN通信モジュール、WirelessUSB、GPS受信機等の無線通信モジュールである。
The
次に、本実施形態に対応する画像処理部104の構成及び処理の流れについて、図1bのブロック図を参照しながら説明を行う。
Next, the configuration and processing flow of the
本実施形態の画像処理部104は符号化部として機能し、色分離部121、メモリI/F部122、メモリ123、和プレーン生成部124、差プレーン生成部125、符号化順序設定部126、符号量制御部127、ウェーブレット変換部128、量子化部129、エントロピー符号化部130、及び符号量判定部131で構成される。
The
色分離部121はベイヤー配列のRAWデータを図4に示すようにR、G0、G1、Bの画素毎に独立したプレーン画像データ(以下、単に「プレーン」という)に分離する。色分離部121によって生成された各色成分のプレーンの内、R、Bプレーンは、メモリI/F部122を介してメモリ123に書き込まれ、G0、G1プレーンは和プレーン生成部124、差プレーン生成部125に入力される。メモリI/F部122は、各処理部からのメモリアクセス要求を調停し、メモリ123に対する読み出し・書き込み制御を行う。メモリ123は各処理部から出力される各種データを保持するための記憶領域である。
The
和プレーン生成部124は、図5に示すように、入力された2つのプレーンの同位置の画素値同士を加算し、出力される和プレーンの画素値とする。和プレーン生成部124によって生成された和プレーンは、メモリI/F部122を介してメモリ123に書き込まれる。差プレーン生成部125は、図6に示すように、入力された2つのプレーンの同位置の画素値同士を減算し、出力される差プレーンの画素値とする。差プレーン生成部125によって生成された差プレーンは、メモリI/F部122を介してメモリ123に書き込まれる。
As shown in FIG. 5, the sum
符号化順序設定部126は、R、B、和、差プレーンの符号化の順番を設定して、メモリ123から設定した順番通りにプレーンを読みだすように、メモリI/F部122を制御する。符号量制御部127は、各プレーンの符号化データの目標符号量を、量子化部129、及び符号量判定部131に設定する。
The encoding
ウェーブレット変換部128は、メモリI/F部122を介してメモリ123から読み出したR、B、及び和、差プレーンに対して、ウェーブレット変換を実行した後、サブバンド画像の形式で生成した変換係数を量子化部129に送る。ここで、ウェーブレット変換とは、処理対象の画像を周波数帯域毎に階層的な画像(サブバンド)に変換する変換処理である。具体的に、画像全体に対してローパスフィルタ処理とハイパスフィルタ処理を掛けることで、低域成分と高域成分を切り分ける処理のことを指す。ウェーブレット変換後の変換係数は図7に示すようなサブバンド画像の形式をとる。ウェーブレット変換は、分割回数を増やす度に低域のサブバンドのみを繰り返し分割するが、これは画像のエネルギーの多くが低域バンドに集中している特性を利用して符号化効率を高くするために使用される。
The
続いて、サブバンド画像について図7を用いて説明する。図7はウェーブレット変換を2回実行して生成されたサブバンド画像の例であり、計7個のサブバンドで形成されていることを表す。ここで、Lが低域、Hが高域を表し、L、Hの前の数字が階層レベルを表す。例えば、1HLは、水平方向が高域成分で、垂直方向が低域成分である階層レベル=1のサブバンド画像を表す。また、左上のサブバンドほど低域成分を多く持ち、画像のエネルギーが集中している。 Next, the subband image will be described with reference to FIG. FIG. 7 is an example of a subband image generated by executing the wavelet transform twice, and shows that it is formed by a total of seven subbands. Here, L represents a low frequency, H represents a high frequency, and numbers before L and H represent hierarchical levels. For example, 1HL represents a subband image with a layer level = 1 where the horizontal direction is a high-frequency component and the vertical direction is a low-frequency component. Also, the upper left subband has more low-frequency components and the image energy is concentrated.
量子化部129は、ウェーブレット変換部128から送られたサブバンド画像に対し、量子化を実行して、エントロピー符号化部130に送る。尚、量子化を行う際に用いるパラメータは、符号量制御部127によって設定された目標符号量を基に設定される。エントロピー符号化部130は、量子化部129で量子化されたサブバンド画像を、エントロピー符号化して符号化データを生成する。生成された符号化データは符号量判定部131に送られる。エントロピー符号化部130で実行されるエントロピー符号化としては、例えばJPEG2000方式で採用されているEBCOT(Embedded Block Coding with Optimized Truncation)を用いる。符号量判定部131は、エントロピー符号化部130から送られた符号化データが、符号量制御部127によって設定された目標符号量よりも大きくなるか判定する。
The
また、本実施形態では符号化データが目標符号量よりも大きかった場合、符号量判定部131は符号化データの大きさが目標符号量を満たすように、符号化データを更に圧縮する。符号化データを更に圧縮する方法としては、例えばJPEG2000の機能の1つであるポスト量子化を用いる。ポスト量子化は、JPEG2000で用いられているエントロピー符号化のEBCOTが、変換係数を各ビットプレーンで符号化していることを利用して、完成した符号化データを下位ビットから切り捨てることで、目標符号量を達成する方法である。
In the present embodiment, when the encoded data is larger than the target code amount, the code
続いて、本実施形態のRAWデータ1フレームに対する符号化処理について図3に示すフローチャートを基に説明を行う。図3のフローチャートは、例えば、画像処理部104として機能するプロセッサがメモリ(ROM)に格納されているプログラムをワークメモリ(RAM)に展開し実行することにより実現することができる(他の実施形態における図3に対応するフローチャートについても同様)。
Next, the encoding process for one frame of RAW data according to the present embodiment will be described based on the flowchart shown in FIG. The flowchart in FIG. 3 can be realized by, for example, a processor functioning as the
まず、S301では、色分離部121がRAWデータからR、B、G0、G1を分離してそれぞれでプレーンを形成する。色成分毎にプレーンを形成した後に、S302において和プレーンと差プレーンとを生成する。具体的に、和プレーン生成部124がG0プレーンとG1プレーンの加算を実行して、和プレーンを生成する。また、差プレーン生成部125がG0プレーンとG1プレーンの減算を実行して、差プレーンを生成する。尚、R、Bプレーン及び和、差プレーンはそれぞれを生成した後に、メモリI/F部122を介してメモリ123に書き込まれる。
First, in S301, the
R、B、和、差プレーンを生成した後、S303にて符号化順序設定部126がどのプレーンから符号化処理を実行するかを設定する。ここでは一例としてR、B、和、差の順番に設定するが、この順番に限定されるものではない。符号化対象のプレーンを設定した後、S304にて符号量制御部127が選択されたプレーンに対し目標符号量を設定する。本実施形態では、符号量制御部127はRAWデータ全体の目標符号量をプレーン数で等分した値をプレーン毎の目標符号量として設定する。すなわち、R、B、和、差プレーンそれぞれの目標符号量はほぼ同じ符号量に設定される。
After generating the R, B, sum, and difference planes, the encoding
目標符号量を設定した後、S305にてウェーブレット変換部128が、選択プレーンをメモリI/F部122を介してメモリ123から読み出し、ウェーブレット変換を実行する。次に、S306にて、ウェーブレット変換された画像を量子化部129が量子化する。尚、量子化に用いる量子化パラメータは、符号量制御部127で設定した目標符号量に基づいて決定する。
After setting the target code amount, in S305, the
量子化後、S307にて、エントロピー符号化部130がサブバンド画像を圧縮符号化して、符号化データを出力する。圧縮符号化の終了後、符号量判定部131はS308にて、出力符号化データの符号量が、符号量制御部127が設定した目標符号量よりも大きいか判定する。もし目標符号量よりも大きい場合は、S307に戻ってエントロピー符号化部130が、目標符号量を満たすために符号化データを更に圧縮する。符号量が目標符号量以下の場合はS309にて、R、B、和、差プレーンの全てに対して符号化が実行されたかどうかを判定し、未処理のプレーンがあればS303に戻って処理を継続する。一方、全てについて処理が完了した場合は符号化処理を終了する。
After quantization, in S307, the
尚、本実施形態では、1フレーム単位での処理の例を示したが、任意の大きさに分割して、それぞれで独立して上記の処理を実行しても良い。また、本実施形態ではウェーブレット変換を用いた例を示したが、JPEGやJPEG XR、MPEG−4 AVC等の符号化技術で用いられている離散コサイン変換を代わりに用いても良い。更に、エントロピー符号化をハフマン符号化にしても良い。 In the present embodiment, an example of processing in units of one frame has been described. However, the processing may be performed independently by dividing the frame into arbitrary sizes. In the present embodiment, an example using wavelet transform is shown, but discrete cosine transform used in encoding techniques such as JPEG, JPEG XR, and MPEG-4 AVC may be used instead. Furthermore, the entropy coding may be Huffman coding.
尚、本実施形態では、図2(a)に示すようなベイヤー配列の画素データを扱ったが、図2(b)に示すような倍密度ベイヤー配列を用いても良い。倍密度ベイヤー配列は、ベイヤー配列の画素密度を2倍にするとともに斜め45゜に配列した画素配列であり、R0、R1、B0、B1、及びGで構成されている。倍密度ベイヤー配列は、ベイヤー配列と同様、Gの画素数がR(R0とR1の合計数)やB(B0とB1の合計数)の2倍になっている。倍密度ベイヤー配列を符号化する際には、図8(a)から(c)に示すようにR0、R1、B0、B1、及びGでプレーンを生成し、R0とR1、B0とB1でそれぞれ和プレーンと差プレーンを生成することで、ベイヤー配列と同様にプレーン毎の符号化処理を行うことができる。 In this embodiment, pixel data having a Bayer array as shown in FIG. 2A is used. However, a double-density Bayer array as shown in FIG. 2B may be used. The double-density Bayer array is a pixel array in which the pixel density of the Bayer array is doubled and arranged at an angle of 45 °, and is composed of R0, R1, B0, B1, and G. In the double-density Bayer array, the number of G pixels is twice that of R (the total number of R0 and R1) and B (the total number of B0 and B1), as in the Bayer array. When encoding a double-density Bayer array, planes are generated with R0, R1, B0, B1, and G as shown in FIGS. 8A to 8C, and R0 and R1, and B0 and B1, respectively. By generating the sum plane and the difference plane, the encoding process for each plane can be performed in the same manner as the Bayer array.
この場合、図3の処理では、S301でR0、R1、B0、B1、及びGでプレーンを生成し、S302でR0とR1、B0とB1でそれぞれ和プレーンと差プレーンを生成する。その後、GプレーンとRの和プレーン、差プレーン、Bの和プレーン、差プレーンとにつき、S303からS309までの処理を実行する。 In this case, in the process of FIG. 3, a plane is generated with R0, R1, B0, B1, and G in S301, and a sum plane and a difference plane are generated with R0 and R1, and B0 and B1, respectively. Thereafter, the processing from S303 to S309 is executed for the G plane and the R sum plane, the difference plane, the B sum plane, and the difference plane.
以上のように本実施形態によれば、ベイヤー配列の各色成分をそれぞれ独立した画像であるプレーンに分離し、そのうち同色成分同士のプレーンから、加算により和プレーンを、減算により差プレーンをそれぞれ生成する。即ち、通常のベイヤー配列では、G0とG1の緑の同色成分同士から和プレーン、差プレーンを生成し、倍密度ベイヤー配列ではR0とR1の赤成分、B0とB1の青成分の同色成分同士からそれぞれ和プレーン、差プレーンを生成する。ここで、加算はローパスフィルタ演算であるため、和プレーンの生成はRAWデータの緑成分に対して、ローパスフィルタで低域成分を抽出する処理に相当する。また、減算はハイパスフィルタ演算であるため、差プレーンの生成はRAWデータの緑成分に対して、ハイパスフィルタで高域成分を抽出する処理に相当する。そのため、符号化処理の前にRAWデータの緑成分の低域成分と高域成分が切り分けられる。その結果、ウェーブレット変換時の周波数成分分割効率の悪化を軽減し、符号化処理の圧縮効率を高めることが出来る。なお、これは離散コサイン変換においても同様に、符号化処理の圧縮効率を高めることができる。 As described above, according to the present embodiment, each color component of the Bayer array is separated into planes that are independent images, and a sum plane is generated from the planes of the same color components by addition, and a difference plane is generated by subtraction. . That is, in the normal Bayer arrangement, the sum plane and the difference plane are generated from the same green color components of G0 and G1, and in the double density Bayer arrangement, the red color components of R0 and R1, and the blue color components of B0 and B1 are generated from each other. A sum plane and a difference plane are generated respectively. Here, since the addition is a low-pass filter operation, the generation of the sum plane corresponds to a process of extracting a low-frequency component with a low-pass filter for the green component of the RAW data. Since subtraction is a high-pass filter operation, the generation of the difference plane corresponds to a process of extracting a high-frequency component with a high-pass filter for the green component of the RAW data. Therefore, the low frequency component and the high frequency component of the green component of the RAW data are separated before encoding processing. As a result, it is possible to reduce the deterioration of the frequency component division efficiency at the time of wavelet transform and increase the compression efficiency of the encoding process. Note that this can also improve the compression efficiency of the encoding process in the discrete cosine transform.
尚、本実施形態では基本となる目標符号量をR、B、G0、G1に均等に割り振っているが、R、Bの符号量を少なくし、G0、G1に多く割り振るなど、色成分毎に割り振る符号量の比率を変えても良い。 In this embodiment, the basic target code amount is evenly allocated to R, B, G0, and G1, but the R and B code amounts are reduced and allocated to G0 and G1 for each color component. You may change the ratio of the code amount to allocate.
[実施形態2]
続いて、発明の第2の実施形態に対応する符号化方法について説明する。本実施形態において、撮像装置100及び符号化部として機能する画像処理部104の構成は実施形態1の図1A及び図1Bに示したものと同様である。本実施形態では、実施形態1で述べた、和プレーンがRAWデータの緑成分の低域成分、差プレーンが高域成分に相当することを考慮し、和プレーンの符号量を差プレーンの符号量よりも大きく設定することを特徴とする。
[Embodiment 2]
Subsequently, an encoding method corresponding to the second embodiment of the invention will be described. In the present embodiment, the configuration of the
以下、図9のフローチャートを参照して本実施形態の符号化動作を説明する。尚、実施形態1と同様の処理には同じ符号を付して示し、ここでの説明を簡略にする。まず実施形態1と同様に、S301からS303においてR、B、G0、G1毎にプレーンを形成し、G0、G1プレーンを用いて和プレーンと差プレーンを生成した後、R、B、和、差プレーンのどのプレーンに対して符号化処理を実行するかを設定する。本実施形態でも、一例としてR、B、和、差の順番に設定されるものとする。続いて、S901にて符号化順序設定部126が、和プレーンを符号化対象として設定しているか否かを判定する。和プレーンが符号化対象である場合、S902において差プレーンよりも符号量が多くなるように符号量制御部127が目標符号量の重み付けを設定する。
Hereinafter, the encoding operation of this embodiment will be described with reference to the flowchart of FIG. In addition, the same code | symbol is attached | subjected and shown to the process similar to
本実施形態では目標符号量に重みを付ける方法として、符号量制御部127が別途設定した基本の目標符号量(一例として、RAWデータ全体の目標符号量をプレーン数で等分した値とする)を、任意に設定したパラメータX(%)だけ増大させる手法を用いる。重み付けに基づいた和プレーンの目標符号量の設定方法は例えば式1に基づく方法がある。ここで、基本の目標符号量をT、重み付け後の目標符号量をT'とする。
In this embodiment, as a method of weighting the target code amount, a basic target code amount separately set by the code amount control unit 127 (as an example, a value obtained by equally dividing the target code amount of the entire RAW data by the number of planes) Is increased by an arbitrarily set parameter X (%). As a method for setting the target code amount of the sum plane based on weighting, for example, there is a method based on
T' = (100+X)T/100 (式1)
例えば、Xを15と設定した場合、和プレーンの目標符号量は、基本の目標符号量に対して15%だけ大きくなる。しかしながら、和プレーンの目標符号量を大きくすることで、RAWデータ全体の目標符号量が増大してしまう。そこで本実施形態では、和プレーンについて増加した分、差プレーンの目標符号量を減少させる。具体的に、S903にて符号化順序設定部126が、差プレーンを符号化対象として設定しているか否かを判定する。差プレーンが符号化対象である場合、S904にて符号量制御部127は差プレーンの目標符号量が基本の目標符号量と比べ、X%だけ少なくなるように重み付けを設定する。重み付けに基づいた差プレーンの目標符号量の設定方法は例えば式2に基づく方法がある。ここで、基本の目標符号量をT、重み付け後の目標符号量をT'とする。
T ′ = (100 + X) T / 100 (Formula 1)
For example, when X is set to 15, the target code amount of the sum plane is increased by 15% with respect to the basic target code amount. However, increasing the target code amount of the sum plane increases the target code amount of the entire RAW data. Therefore, in the present embodiment, the target code amount of the difference plane is decreased by the amount increased for the sum plane. Specifically, in step S903, the encoding
T' = (100−X)T/100 (式2)
このようにして、和プレーンの符号量が増加した分だけ差プレーンの符号量が少なくなるように差プレーンの目標符号量に重み付けをすることで、RAWデータ全体の符号量の増大を抑えることができる。符号化順序設定部126が設定する符号化対象のプレーンが、和プレーン、差プレーンの何れでもない(つまりR、Bプレーン)場合(S901、S903で共に「NO」)、符号量制御部127は基本となる目標符号量をそのまま設定する。よって、重み付けを設定しない。符号量制御部127がS304でプレーン毎の重み付けを反映した目標符号量を設定した後、実施形態1と同様にS305からS309の処理を行う。
T ′ = (100−X) T / 100 (Formula 2)
In this way, the increase in the code amount of the entire RAW data can be suppressed by weighting the target code amount of the difference plane so that the code amount of the difference plane decreases as much as the code amount of the sum plane increases. it can. When the encoding target plane set by the encoding
尚、本実施形態では1フレーム単位での処理の例を示したが、任意の大きさに分割して、それぞれで独立して上記の処理を実行しても良い。また、本実施形態ではウェーブレット変換を用いた実施例を示したが、JPEGやJPEG XR、MPEG−4 AVC等の符号化技術で用いられている離散コサイン変換を代わりに用いても良い。更に、エントロピー符号化をハフマン符号化にしても良い。 In the present embodiment, an example of processing in units of one frame has been described. However, the processing may be performed independently by dividing the frame into arbitrary sizes. In the present embodiment, an example using wavelet transform is shown, but discrete cosine transform used in encoding techniques such as JPEG, JPEG XR, and MPEG-4 AVC may be used instead. Furthermore, the entropy coding may be Huffman coding.
尚、本実施形態では、図2(a)に示すようなベイヤー配列の画素データを扱ったが、図2(b)、図8に示すような倍密度ベイヤー配列を用いても良い。この場合、R0とR1、B0とB1でそれぞれ和プレーンと差プレーンを生成した場合に、和プレーンの目標符号量を差プレーンに対して大きく設定することができる。 In this embodiment, pixel data having a Bayer array as shown in FIG. 2A is used. However, a double-density Bayer array as shown in FIGS. 2B and 8 may be used. In this case, when a sum plane and a difference plane are generated by R0 and R1, and B0 and B1, respectively, the target code amount of the sum plane can be set larger than the difference plane.
以上の様に本実施形態によれば、和プレーンを他のプレーンよりも重視し、符号量を多く割り当てることで、RAWデータの緑成分が有する低域成分の劣化を抑えることができる。画像の低域成分は画質への影響が大きく、また画像の輝度成分は緑成分を赤、青成分よりも多分に含む。そのため本実施例を適用することで、RAWデータの緑成分、延いては画像の輝度の低域成分を維持し、画質劣化を抑えることができる。尚、本実施形態でも基本となる目標符号量をR、B、G0、G1に均等に割り振っているが、R、Bの符号量を少なくし、G0、G1に多く割り振るなど、色成分毎に割り振る符号量の比率を変えても良い。 As described above, according to the present embodiment, the sum plane is more important than the other planes, and by assigning a larger amount of code, it is possible to suppress the deterioration of the low frequency component of the green component of the RAW data. The low frequency component of the image has a large influence on the image quality, and the luminance component of the image contains a green component more than red and blue components. Therefore, by applying the present embodiment, it is possible to maintain the green component of the RAW data, and thus the low-frequency component of the luminance of the image, and suppress image quality deterioration. In this embodiment, the basic target code amount is evenly allocated to R, B, G0, and G1, but the R and B code amounts are reduced and the code amount is allocated to G0 and G1, for each color component. You may change the ratio of the code amount to allocate.
[実施形態3]
続いて、発明の第3の実施形態に対応する符号化方法について説明する。本実施形態において、撮像装置100及び符号化部として機能する画像処理部104の構成は実施形態1の図1A及び図1Bに示したものと同様である。本実施形態では、実施形態2で述べた和プレーンと差プレーンの目標符号量の重み付けにつき、ウェーブレット変換の特徴を活かした手法を述べる。
[Embodiment 3]
Subsequently, an encoding method corresponding to the third embodiment of the invention will be described. In the present embodiment, the configuration of the
以下、図10のフローチャートを参照して本実施形態の符号化動作を説明する。尚、実施形態1と同様の処理には同じ符号を付して示し、ここでの説明を簡略にする。
Hereinafter, the encoding operation of this embodiment will be described with reference to the flowchart of FIG. In addition, the same code | symbol is attached | subjected and shown to the process similar to
まず実施形態1と同様に、S301からS303においてR、B、G0、G1毎にプレーンを形成し、G0、G1プレーンを用いて和プレーンと差プレーンを生成した後、R、B、和、差プレーンのどのプレーンに対して符号化処理を実行するかを設定する。本実施形態でも、一例としてR、B、和、差の順番に設定されるものとする。続いて、S1001にて符号化順序設定部126が和プレーンを符号化対象のプレーンとして設定しているか否かを判定する。和プレーンが符号化対象である場合、S1002にて符号量制御部127が和プレーンに対して設定された重み付けを目標符号量に施す。また、符号化順序設定部126が差プレーンを符号化対象のプレーンとして設定しているか否かを判定する。差プレーンが符号化対象である場合、S1004にて符号量制御部127が差プレーンに対して設定された重み付けを目標符号量に施す。
First, in the same manner as in the first embodiment, in S301 to S303, a plane is formed for each of R, B, G0, and G1, a sum plane and a difference plane are generated using the G0 and G1 planes, and then R, B, sum, and difference are generated. It is set to which plane of the plane the encoding process is executed. Also in this embodiment, it shall be set to the order of R, B, the sum, and a difference as an example. Subsequently, in S1001, the encoding
本実施形態では、ウェーブレット変換により周波数成分がサブバンド毎に切り分けられていることを利用して、符号量制御部127による和プレーンと、差プレーンの目標符号量の設定をサブバンド毎に行う。目標符号量の設定方法の詳細については図11を参照して後述する。符号化順序設定部126が設定する符号化対象のプレーンが、和、差プレーンの何れでもない(R、Bプレーン)場合、基本となる目標符号量(例えば、RAWデータ全体の目標符号量をプレーン数で等分した値とする)をそのまま設定する。符号量制御部127がS304でサブバンド毎の重み付けを反映した目標符号量を設定した後、実施形態1と同様にS305からS309の処理を行う。
In the present embodiment, the code
次に、本実施形態におけるサブバンド毎の和プレーンと差プレーンの目標符号量の重み付けについて説明する。和プレーンと差プレーンの目標符号量の重み付けの例を図11に示す。図11のサブバンド画像は説明を簡単にするため、ウェーブレット変換による分割回数を1回としている。また、図11の4隅のオブジェクトは、各サブバンドの和プレーンと差プレーンの符号量の比率を表したものである。和プレーンはRAWデータの緑成分の低域に相当するため、ウェーブレット変換の結果として、低域のサブバンドに画像のエネルギーがより多く集中する。そこで、低域のサブバンドで和プレーンの符号量の比率を、差プレーンよりも大きくすることで、画像のエネルギーをより多く残し、画質劣化を抑制することができる。 Next, the weighting of the target code amount of the sum plane and the difference plane for each subband in this embodiment will be described. An example of the weighting of the target code amount of the sum plane and the difference plane is shown in FIG. In order to simplify the description of the subband image in FIG. 11, the number of divisions by wavelet transform is set to one. Also, the objects at the four corners in FIG. 11 represent the ratio of the code amount of the sum plane and the difference plane of each subband. Since the sum plane corresponds to the low band of the green component of the RAW data, as a result of the wavelet transform, more image energy is concentrated in the low band subbands. Therefore, by making the ratio of the code amount of the sum plane in the low-frequency subband larger than that of the difference plane, more image energy can be left and image quality deterioration can be suppressed.
一方で、低域の情報を優先することで、画像の輪郭がぼやけてしまうことも想定される。そこで、差プレーンがRAWデータの緑成分の高域に相当することから、高域のサブバンドでは差プレーンの符号量の比率を和プレーンと同等、あるいは和プレーンよりも大きくすることで、高域の情報を残し画像の輪郭を保つことができる。和プレーン及び差プレーンの符号量を割り振る際に、各サブバンドで和プレーンと差プレーンの目標符号量の合計を設定する。本実施形態では、RAWデータ全体の目標符号量から算出した、プレーン二つ分の目標符号量を更にサブバンド数で等分した値を、和プレーンと差プレーンの目標符号量の合計として設定する。例えば、RAWデータ全体の目標符号量が800KB、サブバンド数が4つとすると、プレーン2つ分の目標符号量は400KBである。また、各サブバンドの和プレーンと差プレーンの符号量の合計はそれぞれ100KBに設定される。 On the other hand, it is also assumed that the outline of the image is blurred by giving priority to low-frequency information. Therefore, since the difference plane corresponds to the high frequency of the green component of the RAW data, the high frequency subband is set to a high frequency by making the ratio of the code amount of the difference plane equal to or larger than the sum plane. It is possible to keep the contour of the image while leaving the information. When allocating the code amounts of the sum plane and the difference plane, the sum of the target code amounts of the sum plane and the difference plane is set for each subband. In the present embodiment, a value obtained by further dividing the target code amount for two planes by the number of subbands calculated from the target code amount for the entire RAW data is set as the sum of the target code amounts for the sum plane and the difference plane. . For example, if the target code amount of the entire RAW data is 800 KB and the number of subbands is four, the target code amount for two planes is 400 KB. Further, the sum of the code amount of the sum plane and the difference plane of each subband is set to 100 KB.
和プレーンと差プレーンのサブバンド毎の符号量の割り振りを、サブバンド毎の和プレーンと差プレーンの符号量の合計を100KB、サブバンド数が4つ、図11で示した比率を用いた場合で具体的に示す。0LLバンドは和プレーンと差プレーンの比率が8:2であることから、和プレーンに80KB、差プレーンに20KB割り振られる。同様に1HLバンド、1LHバンドで和プレーンと差プレーンの比率が6:4であることから、和プレーンに60KB、差プレーンに40KB割り振られる。1HHバンドでは和プレーンと差プレーンの比率が4:6であることから、和プレーンに40KB、差プレーンに60KB割り振られる。 When the amount of code for each subband of the sum plane and difference plane is allocated, the sum of the amount of codes for the sum plane and difference plane for each subband is 100 KB, the number of subbands is four, and the ratio shown in FIG. 11 is used. This will be shown in detail. Since the ratio of the sum plane and the difference plane is 8: 2, the 0LL band is allocated 80 KB for the sum plane and 20 KB for the difference plane. Similarly, since the ratio of the sum plane and the difference plane in the 1HL band and 1LH band is 6: 4, 60 KB is allocated to the sum plane and 40 KB is allocated to the difference plane. In the 1HH band, since the ratio of the sum plane and the difference plane is 4: 6, 40 KB is allocated to the sum plane and 60 KB is allocated to the difference plane.
このようにサブバンド毎に和プレーンと差プレーンの符号量が割り振られる。尚、和プレーンと差プレーンのサブバンド毎の符号量設定については、符号量制御部127で実行する。なお、本実施形態では1フレーム単位での処理の例を示したが、任意の大きさに分割して、それぞれで独立して上記の処理を実行しても良い。
In this way, the code amounts of the sum plane and the difference plane are allocated for each subband. It should be noted that the code
以上の本実施形態によれば、和プレーンと差プレーンの符号量をサブバンド毎に細かく設定することができる。具体的には、低域のサブバンドでRAWデータの緑成分の低域に相当する和プレーンの符号量を多く、高域のサブバンドでRAWデータの緑成分の高域に相当する差プレーンの符号量を多くするように、それぞれの目標符号量に重み付けをする。その効果として、低域成分だけでなく、高域成分も残すことが出来、画質劣化を抑えることが出来る。 According to the present embodiment described above, the code amounts of the sum plane and the difference plane can be set finely for each subband. Specifically, the code amount of the sum plane corresponding to the low frequency of the green component of the RAW data is large in the low frequency subband, and the difference plane corresponding to the high frequency of the green component of the RAW data in the high frequency subband. Each target code amount is weighted so as to increase the code amount. As an effect, not only a low frequency component but also a high frequency component can be left, and image quality deterioration can be suppressed.
尚、本実施形態では、各サブバンドの和プレーンと差プレーンの符号量の合計を均等にしているが、各サブバンドで違う値を設定しても良い。例えば、0LL、1HL、1LH、1HHで100KBとしていたのを、0LLで130KB、1HL、1LHで100KB、1HHで70KBとしても良い。 In this embodiment, the sum of the code amounts of the sum plane and the difference plane of each subband is made equal, but a different value may be set for each subband. For example, instead of 100 KB for 0LL, 1HL, 1LH, and 1HH, it may be 130 KB for 0LL, 100 KB for 1HL, 100 KB for 1LH, and 70 KB for 1HH.
[実施形態4]
続いて、発明の第4の実施形態に対応する符号化方法について説明する。本実施形態では、和プレーンと差プレーンの目標符号量の重み付けの際に、差プレーンを構成するG0プレーンとG1プレーンの差分値のばらつきから差プレーンの発生符号量を予測し、動的に重み付けを変更する。本実施形態において、撮像装置100の構成は実施形態1の図1Aに示したものと同様である。但し、本実施形態に係わる符号化部としての画像処理部104の構成は図12に示す通りである。本実施形態の画像処理部104の構成は、画像特徴解析部1201と重み付け設定部1202とを有し、画像特徴解析処理と重み付け設定処理を行う点で、図1Bの構成とは異なる。尚、図1Bと同様の構成部分は同じ参照符号を付して示し、ここでの説明を省略する。
[Embodiment 4]
Subsequently, an encoding method corresponding to the fourth embodiment of the invention will be described. In this embodiment, when weighting the target code amount of the sum plane and the difference plane, the generated code amount of the difference plane is predicted from the variation in the difference value between the G0 plane and the G1 plane constituting the difference plane, and dynamically weighted. To change. In the present embodiment, the configuration of the
以下、図13のフローチャートを参照して本実施形態の符号化動作を説明する。尚、実施形態1と同様の処理には同じ符号を付して示し、ここでの説明を簡略にする。
Hereinafter, the encoding operation of this embodiment will be described with reference to the flowchart of FIG. In addition, the same code | symbol is attached | subjected and shown to the process similar to
まず実施形態1と同様に、S301とS302にてR、B、G0、G1毎にプレーンを形成し、G0、G1プレーンを用いて和プレーンと差プレーンを生成する。その後、S1301にて画像特徴解析部1201が差プレーンの画素値のばらつきを解析し、解析情報に基づき重み付け設定部1202が和プレーンと差プレーンの符号量の重み付け設定に用いるパラメータYを設定する。本実施形態では、ばらつきの解析の際には、式3の式に基づく分散を用いる。分散をδ、mを差プレーンを構成する成分の総数、x^を差プレーンの全成分の平均値、xiを差プレーンを構成する1からm番の成分の内のi番目の成分の値をそれぞれ表す。
First, similarly to the first embodiment, a plane is formed for each of R, B, G0, and G1 in S301 and S302, and a sum plane and a difference plane are generated using the G0 and G1 planes. Thereafter, in S1301, the image
重み付け設定部1202は、複数の閾値を有しており、画像特徴解析部1201が出力した分散と閾値を照らし合わせてパラメータYを設定する。Yの設定方法の具体例については後述する。パラメータYを設定した後、S303にて符号化順序設定部126がR、B、和、差プレーンのどのプレーンに対して符号化処理を実行するかを設定する。本実施形態では、一例として和、差、R、Bの順番に設定されるものとする。S1302で符号化順序設定部126が和プレーンを符号化対象として設定しているか否かを判定する。和プレーンを符号化対象に設定している場合、S1303にて符号量制御部127がパラメータYに基づいて和プレーンの符号量の重み付けを設定する。和プレーンを符号化対象に設定していない場合、S1304で符号化順序設定部126が差プレーンを符号化対象として設定しているか否かを判定する。差プレーンを符号化対象に設定している場合、S1305にて符号量制御部127がパラメータYに基づいて差プレーンの符号量の重み付けを設定する。符号化順序設定部126が設定する符号化対象のプレーンが、和、差プレーンの何れでもない(R、Bプレーン)場合、基本となる目標符号量をそのまま設定する。ここでは、RAWデータ全体の目標符号量を、プレーン数で等分した値を用いることができる。その後、符号量制御部127がプレーン毎の重み付けを反映した目標符号量を設定した後、実施形態1と同様にS305からS309までの処理を行う。
The
続いて、差プレーンの分散の解析と符号量の重み付けについて説明する。前述した通り、重み付け設定部1202は、複数の閾値を有しており、画像特徴解析部1201が出力した分散と閾値を照らし合わせて重み付けパラメータYを設定する。ここで、例として閾値をT1、T2(T1<T2)、重み付け設定用パラメータYを0、1、2とする。差プレーンの分散δがT1以下(T1≧δ)の場合にY=0とする。分散がT1とT2の間の値である場合(T1<δ<T2)にY=1とする。分散がT2以上の場合(T2≦δ)にY=2とする。差プレーンの分散δが大きい場合、差プレーンの発生符号量が大きくなる。そこで分散が大きいときに設定されるY=2の場合は、差プレーンの符号量をできるだけ少なくしない(増やす)ように重み付けを設定する。逆に、分散が小さいほど差プレーンの発生符号量は少なくなる。そこで分散が小さいときに設定されるY=0の場合は、和プレーンの符号量をできるだけ多くするように重み付けが設定される。
Subsequently, analysis of variance of the difference plane and weighting of the code amount will be described. As described above, the
また、重み付け前の目標符号量として、基本の目標符号量が、符号量制御部127によって別途設定される。ここでは、RAWデータ全体の目標符号量を、プレーン数で等分した値を用いる。符号量の重み付けは、和プレーンの符号量が、差プレーン符号量よりも多くなるように設定される。符号量の重み付けについて例を示すと、Y=0の場合は、和プレーンの目標符号量を10%増大、差プレーンの目標符号量を10%減少させる。また、Y=1の場合に和プレーンの目標符号量を5%減少、差プレーンの目標符号量を5%増大させ、Y=2の場合に和プレーンの目標符号量を20%減少、差プレーンの目標符号量を20%増加させる。なお、ここに示す目標符号量の比率についてはあくまで一例であって、差プレーンの分散が大きいほど差プレーンに目標符号量を多めに割り振り、分散が小さくなるほど和プレーンに目標符号量を多めに割り振れればよい。
In addition, a basic target code amount is separately set by the code
尚、本実施形態では1フレーム単位での処理の例を示したが、任意の大きさの領域に分割して、それぞれで独立して上記の処理を実行しても良い。本実施形態ではウェーブレット変換を用いた実施例を示したが、JPEGやJPEG XR、MPEG−4 AVC等の符号化技術で用いられている離散コサイン変換を代わりに用いても良い。更に、エントロピー符号化をハフマン符号化にしても良い。 In the present embodiment, an example of processing in units of one frame has been shown, but the above processing may be executed independently by dividing into regions of an arbitrary size. In the present embodiment, an example using wavelet transform is shown, but discrete cosine transform used in coding techniques such as JPEG, JPEG XR, MPEG-4 AVC, etc. may be used instead. Furthermore, the entropy coding may be Huffman coding.
本実施形態によれば、低域成分への目標符号量を高域成分への目標符号量よりは多めに割り振りながらも、画像の特徴に基づいて、高域成分への目標符号量を適切に増減させることで画質を向上させることが出来る。輪郭がはっきりと出ている画像の場合は、輪郭がぼけた絵に比べて、隣接画素間の画素値の差が大きいため、差プレーンの分散が大きくなる。そこで、差プレーンの分散が大きいとき、差プレーンつまり高域成分への目標符号量を多めに割り振ることで、画像の輪郭を保つことができる。また、空模様などの隣接画素間の差が小さい平坦な画像の場合は、差プレーンの分散が小さくなる。そこで、差プレーンの分散が小さいときに、差プレーンの目標符号量を少なくし、和プレーンつまり低域成分の符号量を多くすることで、画質を良くすることが出来る。 According to the present embodiment, the target code amount for the high frequency component is appropriately set based on the characteristics of the image while the target code amount for the low frequency component is allocated more than the target code amount for the high frequency component. The image quality can be improved by increasing or decreasing. In the case of an image having a clear outline, since the difference in pixel values between adjacent pixels is larger than that in a picture with a blurred outline, the variance of the difference plane is increased. Therefore, when the variance of the difference plane is large, the outline of the image can be maintained by assigning a larger target code amount to the difference plane, that is, the high frequency component. Further, in the case of a flat image with a small difference between adjacent pixels such as a sky pattern, the variance of the difference plane is reduced. Therefore, when the variance of the difference plane is small, the image quality can be improved by reducing the target code amount of the difference plane and increasing the sum plane, that is, the code amount of the low frequency component.
尚、本実施形態では、差プレーンに対して画像特徴解析処理を行ったが、和プレーン、あるいはR、Bプレーンに対して画像特徴解析処理を行っても良い。その場合においても、解析処理の結果に基づき高域成分と低域成分とでどちらの成分が多いか、言い換えれば、どちらの成分に対してより符号量を割り当てるべきかを判別して、差プレーンと和プレーンのいずれに対して符号量を多く割り当てるかを決定することができる。例えば、和プレーンにおける分散を計算した場合、空模様など平坦度のより高い画像については和プレーンにおいても分散が小さくなり、平坦度が高い、即ち和プレーンに対する符号量を多くすべきことが判別できる。また、和プレーンの分散が大きい場合には、逆に差プレーンに対する符号量を多くすべきことを決定できる。 In this embodiment, the image feature analysis process is performed on the difference plane. However, the image feature analysis process may be performed on the sum plane or the R and B planes. Even in that case, the difference plane is determined by determining which component is higher in the high frequency component and the low frequency component based on the result of the analysis process, in other words, which component should be assigned the more code amount. It is possible to determine which of the sum plane and the code amount is to be allocated more. For example, when the variance in the sum plane is calculated, it can be determined that the image having a higher flatness such as a sky pattern has a smaller variance in the sum plane, and the flatness is high, that is, the code amount for the sum plane should be increased. On the contrary, when the variance of the sum plane is large, it can be determined that the code amount for the difference plane should be increased.
[実施形態5]
続いて、第5の実施形態に対応する符号化方法について説明する。本実施形態は、実施形態1〜4とは、目標符号量の設定方法が異なっているが、撮像装置100及び符号化部として機能する画像処理部104の構成は実施形態1の図1A及び図1Bに示したものと同様である。本実施形態では、実施形態2のようにプレーン毎の重みづけを行い、さらに、実施形態3のようにサブバンド毎の重みづけも行う。基本的な処理は同じであるため、説明は省略し、実施形態1〜4と異なる部分のみ、図14を参照して説明する。
[Embodiment 5]
Subsequently, an encoding method corresponding to the fifth embodiment will be described. Although the present embodiment differs from the first to fourth embodiments in the target code amount setting method, the configuration of the
図14(a)は、ベイヤ配列のRAW画像をG1、G2、B、Rプレーンに分離して、ウェーブレット変換して得られたサブバンド毎に符号化する場に、各プレーン、サブバンドに目標符号量を割り当てた場合を示している。この場合は、各プレーン、各サブバンドに対して、均等に目標符号量を割り当てている。
RAWデータ1フレームに対する目標符号量を100%としたときに、G1、G2、B、Rの各プレーンには、それぞれ25%割り当てられる。そして、プレーン内では、プレーンに割り当てたれた目標符号量を100%としたときに、それぞれのサブバンド(LL、HL、LH、HH)には、25%ずつ目標符号量が割り当てられる。各サブバンドのカッコ内の数値は、1フレームに対する目標符号量を100%としたときに、各サブバンドに割り当てられる目標符号量を示している。
FIG. 14 (a) shows a case where a Bayer array RAW image is separated into G1, G2, B, and R planes and encoded for each subband obtained by wavelet transform. The case where the code amount is allocated is shown. In this case, the target code amount is equally allocated to each plane and each subband.
When the target code amount for one frame of RAW data is 100%, 25% is allocated to each of the G1, G2, B, and R planes. In the plane, when the target code amount assigned to the plane is 100%, each subband (LL, HL, LH, HH) is assigned a target code amount of 25%. The numerical value in parentheses of each subband indicates the target code amount assigned to each subband when the target code amount for one frame is 100%.
これに対し、図14(b)は、G1/G2プレーンから、和プレーン、差プレーンを生成し、和、差、B,Rプレーンを符号化する場合に、プレーンおよびサブバンドに応じて重みづけを行って目標符号量を割り当てた場合の目標符号量の割り当てを示している。1フレームの目標符号量を100%としたとき、和プレーンに30%、差プレーンに20%、B/Rプレーンには、図14(a)と同様に25%割り当てている。 On the other hand, in FIG. 14B, when generating a sum plane and a difference plane from the G1 / G2 plane and encoding the sum, difference, and B and R planes, weighting is performed according to the plane and subband. Shows the assignment of the target code amount when the target code amount is assigned by performing the above. Assuming that the target code amount of one frame is 100%, 30% is allocated to the sum plane, 20% is allocated to the difference plane, and 25% is allocated to the B / R plane, as in FIG.
和プレーンはRAWデータの緑の低域成分に相当し、差プレーンは、緑の高域成分に相当する。画像データにおいて、低域成分は重要な成分であり、低域成分の損失が大きいと画質が劣化するため、和プレーンには目標符号量を多く割り当てている。そして、高域成分は低域成分よりも重要度は低いため、差プレーンは、和プレーン、Bプレーン、Rプレーンよりも、少ない目標符号量を割りあてている。 The sum plane corresponds to the green low-frequency component of the RAW data, and the difference plane corresponds to the green high-frequency component. In the image data, the low frequency component is an important component, and if the loss of the low frequency component is large, the image quality deteriorates. Therefore, a large target code amount is allocated to the sum plane. Since the high frequency component is less important than the low frequency component, the difference plane is assigned a smaller target code amount than the sum plane, B plane, and R plane.
また、各プレーンの目標符号量を、さらに、サブバンド毎に割り当てている。和プレーンについては、LL:HL:LH:HH=44:20:20:16となるようにサブバンド目標符号量を割り当てている。このとき、やはり低域成分が重要な成分であるため低域のサブバンドに目標符号量をより多く割り当てている。1フレームに対する目標符号量を100%としたときに、和プレーンには30%のプレーン目標符号量が割り当てられている。そのため、1フレームの目標符号量に対する各サブバンドの目標符号量の比率は、LLは13.2%、HLは6%、LHは6%、HHは4.8%となる。 Further, the target code amount of each plane is further assigned for each subband. For the sum plane, the subband target code amount is assigned such that LL: HL: LH: HH = 44: 20: 20: 16. At this time, since the low frequency component is also an important component, a larger amount of target code is allocated to the low frequency sub-band. When the target code amount for one frame is 100%, a plane target code amount of 30% is assigned to the sum plane. Therefore, the ratio of the target code amount of each subband to the target code amount of one frame is 13.2% for LL, 6% for HL, 6% for LH, and 4.8% for HH.
差プレーンについては、LL:HL:LH:HH=13:29:29:29となるようにサブバンド目標符号量を割り当てている。このとき、差プレーンは緑の高域成分に相当するため、差プレーンでは、高域のサブバンドに目標符号量をより多く割り当てて、他のプレーンでの高域のサブバンドへの目標符号量の割り当ての割合よりも多い割合となるようにしている。なお、図14(b)の例では、HL、LH、HHの割当て比率は同一であるが、HHをより高い比率としても良い。1フレームに対する目標符号量を100%としたときに、差プレーンには20%のプレーン目標符号量が割り当てられている。そのため、1フレームの目標符号量に対する各サブバンドの目標符号量の比率は、LLは2.6%、HLは5.8%、LHは5.8%、HHは5.8%となる。ここで、差プレーンのHHサブバンドの目標符号量は、和プレーンのHHサブバンドの目標符号量よりも大きくなっている。 For the difference plane, the subband target code amount is assigned such that LL: HL: LH: HH = 13: 29: 29: 29. At this time, since the difference plane corresponds to a green high-frequency component, in the difference plane, a higher target code amount is allocated to the high-frequency subband, and the target code amount to the high-frequency subband in the other planes The ratio is larger than the allocation ratio. In the example of FIG. 14B, the allocation ratio of HL, LH, and HH is the same, but HH may be a higher ratio. When the target code amount for one frame is 100%, a 20% plane target code amount is assigned to the difference plane. Therefore, the ratio of the target code amount of each subband to the target code amount of one frame is 2.6% for LL, 5.8% for HL, 5.8% for LH, and 5.8% for HH. Here, the target code amount of the HH subband of the difference plane is larger than the target code amount of the HH subband of the sum plane.
BプレーンおよびRプレーンについては、LL:HL:LH:HH=25:25:25:25となるようにサブバンド目標符号量を割り当てている。1フレームに対する目標符号量を100%としたときに、B/Rプレーンには25%のプレーン目標符号量が割り当てられている。そのため、1フレームの目標符号量に対する各サブバンドの目標符号量の比率は、全て6.25%となる。 For the B plane and the R plane, the subband target code amount is assigned so that LL: HL: LH: HH = 25: 25: 25: 25. When the target code amount for one frame is 100%, a plane target code amount of 25% is allocated to the B / R plane. Therefore, the ratio of the target code amount of each subband to the target code amount of one frame is all 6.25%.
このような比率で1フレームに与えられた目標符号量を、各サブバンドに割り当て、割り当てられた目標符号量に基づいて、上述の実施例で説明したように、量子化および符号化を行う。また、本実施形態では、図14の目標符号量の比率で各プレーン、各サブバンドに目標符号量を割り当てた。しかし、さらに、実施形態4のように画像の解析を行って、解析結果に応じて、図14の目標符号量の比率にさらに重みづけを行って、目標符号量を決定するようにしてもよい。この場合、画像解析の結果、プレーン目標符号量に重みづけをおこなってもよいし、サブバンド目標符号量に重みづけをおこなってもいし、プレーン目標符号量とサブバンド目標符号量の両方に重みづけをおこなってもよい。 A target code amount given to one frame at such a ratio is assigned to each subband, and quantization and encoding are performed based on the assigned target code amount as described in the above-described embodiment. In this embodiment, the target code amount is assigned to each plane and each subband at the ratio of the target code amount shown in FIG. However, the image may be analyzed as in the fourth embodiment, and the target code amount may be determined by further weighting the ratio of the target code amount in FIG. 14 according to the analysis result. . In this case, as a result of the image analysis, the plane target code amount may be weighted or the subband target code amount may be weighted, and both the plane target code amount and the subband target code amount are weighted. It may be done.
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100:撮像装置、101:制御部、102:操作部 100: imaging device, 101: control unit, 102: operation unit
Claims (18)
前記画像データを構成する複数の色成分を前記ベイヤー配列に基づき複数のプレーン画像データに分離する色分離手段と、
前記複数のプレーン画像データのうち、同色の成分同士を加算して和プレーンのプレーン画像データを生成する和プレーン生成手段と、
前記同色の成分同士を減算して差プレーンのプレーン画像データを生成する差プレーン生成手段と、
前記プレーン画像データを圧縮符号化する符号化手段であって、前記同色の成分のプレーン画像データについては、前記和プレーン及び前記差プレーンのプレーン画像データを圧縮符号化する符号化手段と
を備えることを特徴とする画像処理装置。 An image processing apparatus for encoding Bayer array image data,
Color separation means for separating a plurality of color components constituting the image data into a plurality of plane image data based on the Bayer array;
A sum plane generating means for generating a sum plane plane image data by adding components of the same color among the plurality of plane image data;
Difference plane generating means for subtracting the same color components to generate plane image data of a difference plane;
Coding means for compressing and coding the plain image data, the plain image data of the same color component comprising coding means for compressing and coding the plain image data of the sum plane and the difference plane An image processing apparatus.
前記設定手段は、前記和プレーンのプレーン画像データに対する目標符号量と前記差プレーンのプレーン画像データに対する目標符号量とを同じに設定することを特徴とする請求項1に記載の画像処理装置。 A setting means for setting a target code amount in the compression encoding for each of the plain image data to be compression-encoded by the encoding means;
The image processing apparatus according to claim 1, wherein the setting unit sets the target code amount for the plane image data of the sum plane and the target code amount for the plane image data of the difference plane to be the same.
前記設定手段は、前記和プレーンのプレーン画像データに対する目標符号量を、前記差プレーンのプレーン画像データに対する目標符号量よりも多く設定することを特徴とする請求項1に記載の画像処理装置。 A setting means for setting a target code amount in the compression encoding for each of the plain image data to be compression-encoded by the encoding means;
The image processing apparatus according to claim 1, wherein the setting unit sets a target code amount for the plane image data of the sum plane larger than a target code amount for the plane image data of the difference plane.
前記符号化手段は、前記変換手段が変換したプレーン画像データを圧縮符号化し、
前記設定手段は、前記変換手段が生成するサブバンドごとに目標符号量を設定することを特徴とする請求項2乃至4のいずれか1項に記載の画像処理装置。 Further comprising conversion means for hierarchically converting the plain image data for each frequency band;
The encoding means compresses and encodes the plain image data converted by the conversion means,
The image processing apparatus according to claim 2, wherein the setting unit sets a target code amount for each subband generated by the conversion unit.
前記設定手段は、前記解析情報を用いて前記和プレーンのプレーン画像データに対する目標符号量と、前記差プレーンのプレーン画像データに対する目標符号量とを設定することを特徴とする請求項2乃至8のいずれか1項に記載の画像処理装置。 Further comprising analysis means for generating analysis information by analyzing image characteristics of the image data;
9. The setting unit according to claim 2, wherein the setting unit sets a target code amount for plane image data of the sum plane and a target code amount for plane image data of the difference plane using the analysis information. The image processing apparatus according to any one of the above.
前記ベイヤー配列の画像データを符号化する請求項1乃至15のいずれか1項に記載の画像処理装置と
を備えることを特徴とする撮像装置。 Imaging means for capturing a subject image and generating Bayer array image data;
An image processing apparatus comprising: the image processing apparatus according to claim 1, wherein the image processing apparatus encodes the Bayer array image data.
前記画像データを構成する複数の色成分を前記ベイヤー配列に基づき複数のプレーン画像データに分離する色分離工程と、
前記複数のプレーン画像データのうち、同色の成分同士を加算して和プレーンのプレーン画像データを生成する和プレーン生成工程と、
前記同色の成分同士を減算して差プレーンのプレーン画像データを生成する差プレーン生成工程と、
前記プレーン画像データを圧縮符号化する符号化工程であって、前記同色の成分のプレーン画像データについては、前記和プレーン及び前記差プレーンのプレーン画像データを圧縮符号化する符号化工程と
を含むことを特徴とする画像処理方法。 An image processing method for encoding Bayer array image data,
A color separation step of separating a plurality of color components constituting the image data into a plurality of plane image data based on the Bayer array;
Of the plurality of plane image data, a sum plane generation step of adding the same color components to generate the plane image data of the sum plane;
A difference plane generating step for generating plane image data of a difference plane by subtracting the same color components;
An encoding step of compressing and encoding the plain image data, the encoding step of compressing and encoding the plain image data of the sum plane and the difference plane for the plain image data of the same color component An image processing method characterized by the above.
前記画像処理方法は、
前記画像データを構成する複数の色成分を前記ベイヤー配列に基づき複数のプレーン画像データに分離する色分離工程と、
前記複数のプレーン画像データのうち、同色の成分同士を加算して和プレーンのプレーン画像データを生成する和プレーン生成工程と、
前記同色の成分同士を減算して差プレーンのプレーン画像データを生成する差プレーン生成工程と、
前記プレーン画像データを圧縮符号化する符号化工程であって、前記同色の成分のプレーン画像データについては、前記和プレーン及び前記差プレーンのプレーン画像データを圧縮符号化する符号化工程と
を含むことを特徴とするプログラム。 A program for causing a computer to execute an image processing method for encoding Bayer array image data,
The image processing method includes:
A color separation step of separating a plurality of color components constituting the image data into a plurality of plane image data based on the Bayer array;
Of the plurality of plane image data, a sum plane generation step of adding the same color components to generate the plane image data of the sum plane;
A difference plane generating step for generating plane image data of a difference plane by subtracting the same color components;
An encoding step of compressing and encoding the plane image data, the encoding step of compressing and encoding the plane image data of the sum plane and the difference plane for the plane image data of the same color component A program characterized by
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/333,403 US10032252B2 (en) | 2015-10-30 | 2016-10-25 | Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer readable storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015214802 | 2015-10-30 | ||
JP2015214802 | 2015-10-30 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017085556A true JP2017085556A (en) | 2017-05-18 |
JP6875817B2 JP6875817B2 (en) | 2021-05-26 |
Family
ID=58713375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016196000A Active JP6875817B2 (en) | 2015-10-30 | 2016-10-03 | Image processing equipment, imaging equipment, image processing methods and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6875817B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019142821A1 (en) * | 2018-01-16 | 2019-07-25 | 株式会社ニコン | Encoder, decoder, encoding method, decoding method, encoding program, and decoding program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1141613A (en) * | 1997-07-17 | 1999-02-12 | Nec Corp | Digital camera |
JP2005286415A (en) * | 2004-03-26 | 2005-10-13 | Olympus Corp | Image compression method and image compression device |
JP2006067390A (en) * | 2004-08-27 | 2006-03-09 | Olympus Corp | Imaging apparatus and reproducing apparatus |
WO2012101708A1 (en) * | 2011-01-28 | 2012-08-02 | 日本電気株式会社 | 2d signal encoding device |
WO2013187132A1 (en) * | 2012-06-11 | 2013-12-19 | 富士フイルム株式会社 | Image-processing device, imaging-capturing device, computer, image-processing method, and program |
-
2016
- 2016-10-03 JP JP2016196000A patent/JP6875817B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1141613A (en) * | 1997-07-17 | 1999-02-12 | Nec Corp | Digital camera |
JP2005286415A (en) * | 2004-03-26 | 2005-10-13 | Olympus Corp | Image compression method and image compression device |
JP2006067390A (en) * | 2004-08-27 | 2006-03-09 | Olympus Corp | Imaging apparatus and reproducing apparatus |
WO2012101708A1 (en) * | 2011-01-28 | 2012-08-02 | 日本電気株式会社 | 2d signal encoding device |
WO2013187132A1 (en) * | 2012-06-11 | 2013-12-19 | 富士フイルム株式会社 | Image-processing device, imaging-capturing device, computer, image-processing method, and program |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019142821A1 (en) * | 2018-01-16 | 2019-07-25 | 株式会社ニコン | Encoder, decoder, encoding method, decoding method, encoding program, and decoding program |
Also Published As
Publication number | Publication date |
---|---|
JP6875817B2 (en) | 2021-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10032252B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer readable storage medium | |
CN106612432B (en) | Coding method and decoding processing method | |
CN117793373A (en) | Machine learning video processing system and method | |
TWI436287B (en) | Method and apparatus for coding image | |
JP2004128583A (en) | Imaging apparatus, image processing method, program, and recording medium | |
JPWO2007066710A1 (en) | Encoding apparatus, encoding method and encoding program, and decoding apparatus, decoding method and decoding program | |
JPWO2007066709A1 (en) | Encoding apparatus, encoding method and encoding program, and decoding apparatus, decoding method and decoding program | |
JP6986868B2 (en) | Image coding device, image decoding device, image coding method, image decoding method, program | |
JP2021077942A (en) | Encoding apparatus, encoding method, decoding apparatus and decoding method | |
JP6512916B2 (en) | Image pickup apparatus, control method thereof and program | |
JP7001383B2 (en) | Coding device, coding method, and program | |
JP6871727B2 (en) | Imaging equipment, image processing methods, and programs | |
JP6875817B2 (en) | Image processing equipment, imaging equipment, image processing methods and programs | |
JP7033013B2 (en) | Image coding device, image decoding device, their control method, and program | |
JP6792370B2 (en) | Image processing equipment, its control method, and computer programs | |
JP7129326B2 (en) | IMAGING DEVICE, CONTROL METHOD AND PROGRAM THEREOF | |
US20230133895A1 (en) | Image encoding apparatus and method for controlling the same and non-transitory computer-readable storage medium | |
JP6849359B2 (en) | Coding device, coding device control method, and program | |
JP2006074130A (en) | Image decoding method, image decoding apparatus, and imaging apparatus | |
JP4375662B2 (en) | Image processing apparatus, image processing method, program, information recording medium, and imaging apparatus | |
JP6775339B2 (en) | Image coding device and its control method | |
JP6465570B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP6907004B2 (en) | Image processing equipment, image processing methods, and programs | |
JP7321237B2 (en) | Image encoding device, image encoding method, program | |
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: 20190920 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200721 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200803 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201002 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
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: 20210326 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210423 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6875817 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |