JP2019022080A - Coding apparatus, coding method, and program - Google Patents
Coding apparatus, coding method, and program Download PDFInfo
- Publication number
- JP2019022080A JP2019022080A JP2017138939A JP2017138939A JP2019022080A JP 2019022080 A JP2019022080 A JP 2019022080A JP 2017138939 A JP2017138939 A JP 2017138939A JP 2017138939 A JP2017138939 A JP 2017138939A JP 2019022080 A JP2019022080 A JP 2019022080A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- amount
- noise
- image data
- threshold
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、符号化装置、符号化方法及びプログラムに関する。 The present invention relates to an encoding device, an encoding method, and a program.
デジタルスチルカメラやデジタルビデオカメラなどのデジタル撮像装置は、広く普及し、一般に利用されている。これらのデジタル撮像装置は、CCDやCMOSセンサなどの撮像素子で受光した光をデジタル信号に変換することにより、デジタル画像データを生成する。デジタル画像データを生成する過程では、撮像素子や回路の特性により、暗電流ノイズ、熱雑音、及びショットノイズなどが発生し、デジタル画像データにランダムなノイズ(ランダムノイズ)が混入する。 Digital imaging devices such as digital still cameras and digital video cameras are widely used and are generally used. These digital imaging devices generate digital image data by converting light received by an imaging device such as a CCD or CMOS sensor into a digital signal. In the process of generating digital image data, dark current noise, thermal noise, shot noise, and the like are generated due to the characteristics of the image sensor and the circuit, and random noise (random noise) is mixed into the digital image data.
近年の撮像素子の小型化、高画素化に伴い、画素ピッチが極小化しているため、ランダムノイズが目立ちやすくなっており、特に撮像感度を高くした場合などは、ランダムノイズが顕著に発生する。こうした観点から、撮像データを記録する場合、ランダムノイズ成分を考慮した符号化を行い、記録することが望ましい。そこで、撮像条件に応じて、量子化テーブルを選択的に切り替えて符号化する方法が開示されている(例えば、特許文献1参照)。 With recent miniaturization of imaging devices and higher pixel counts, the pixel pitch has been minimized, so that random noise is conspicuous. Especially when imaging sensitivity is increased, random noise is noticeably generated. From this point of view, when recording imaging data, it is desirable to perform encoding in consideration of a random noise component and record it. In view of this, a method is disclosed in which encoding is performed by selectively switching quantization tables in accordance with imaging conditions (see, for example, Patent Document 1).
しかし、RAWデータを符号化して記録する場合、素材性を重視するため、情報損失のない可逆符号化が重要となり、量子化が利用できない場合がある。そこで、撮像データに混入したノイズ量を考慮して効率的に可逆符号化する方法が望まれている。 However, when RAW data is encoded and recorded, lossless encoding without information loss is important because the materiality is important, and quantization may not be used. Thus, a method for efficiently performing lossless encoding in consideration of the amount of noise mixed in the image data is desired.
本発明の目的は、ノイズ量に応じた効率的な符号化を行うことができる符号化装置、符号化方法及びプログラムを提供することである。 An object of the present invention is to provide an encoding device, an encoding method, and a program that can perform efficient encoding according to the amount of noise.
本発明の符号化装置は、画像データに含まれるノイズ量を推定し、前記ノイズ量が閾値より多いか否かを判定する判定手段と、前記ノイズ量が閾値より多い場合には、前記画像データを周波数変換することにより変換係数を生成する周波数変換手段と、前記ノイズ量が閾値より多い場合には、前記変換係数に対して符号化を行い、前記ノイズ量が閾値より少ない場合には、前記画像データに対して符号化を行う符号化手段とを有する。 The encoding apparatus of the present invention estimates a noise amount included in image data, determines whether or not the noise amount is greater than a threshold value, and if the noise amount is greater than a threshold value, the image data Frequency conversion means for generating a transform coefficient by frequency transforming, and when the amount of noise is greater than a threshold, encoding is performed on the transform coefficient, and when the amount of noise is less than a threshold, Coding means for coding image data.
本発明によれば、ノイズ量に応じた効率的な符号化を行うことができる。 According to the present invention, efficient encoding according to the amount of noise can be performed.
(第1の実施形態)
図1(a)は、本発明の第1の実施形態による撮像装置100の構成例を示すブロック図である。撮像装置100は、デジタルカメラ、ビデオカメラの他、スマートフォン、タブレット、工業用カメラ、医療用カメラ等に適用可能である。撮像装置100は、RAWデータを可逆符号化可能な符号化装置であり、制御部101、撮像部102、メモリI/F(インターフェース)部103、メモリ104、RAWデータ符号化部105、記録処理部106、及び記録媒体107を有する。
(First embodiment)
FIG. 1A is a block diagram illustrating a configuration example of the
制御部101は、撮像装置100を構成する各処理部を制御する。撮像部102は、光学レンズ、絞り、フォーカス制御及びレンズ駆動部を含む光学ズームが可能なレンズ光学系と、レンズ光学系からの光情報を電気信号に変換するCCDイメージセンサ又はCMOSセンサなどの撮像素子を含む。撮像部102は、撮像素子により得られた電気信号をデジタル信号へ変換することにより、RAWデータ(画像データ)を生成する。制御部101は、撮像部102により生成されたRAWデータを、メモリI/F部103を介して、メモリ104へ書き込む。
The control unit 101 controls each processing unit that configures the
図2は、RAWデータの構成例を示す図である。RAWデータは、有効画素領域201と、オプティカルブラック領域202とを有する。オプティカルブラック領域202は、水平オプティカルブラック領域203と、垂直オプティカルブラック領域204とを有する。撮像部102の撮像素子は、遮光されている複数のオプティカルブラック画素と、遮光されていない複数の有効画素とを有する。有効画素領域201は、有効画素により生成されたRAWデータの領域である。オプティカルブラック領域202は、オプティカルブラック画素により生成されたRAWデータの領域である。RAWデータは、ベイヤ配列のR(赤)、G1(緑)、G2(緑)、B(青)の4つの色要素の画素のデータで構成される。なお、RAWデータの配列及び色要素は、この構成に限定されず、他の方式であってもよい。
FIG. 2 is a diagram illustrating a configuration example of RAW data. The RAW data has an
図1(a)において、メモリI/F部103は、各処理部からのメモリアクセス要求を調停し、メモリ104に対する読み出し又は書き込みの制御を行う。メモリ104は、例えば揮発性メモリであり、撮像装置100を構成する各処理部から出力される各種データを格納する。
In FIG. 1A, the memory I /
RAWデータ符号化部105は、周波数変換部105a、予測差分生成部105b、及びエントロピー符号化部105cを有する。制御部101は、メモリ104からベイヤ配列のRAWデータを読み出し、RAWデータ符号化部105に出力する。周波数変換部105aは、ベイヤ配列のRAWデータを各色要素プレーンに分離し、分離された色要素プレーン単位で、所望の分解レベルで可逆型の離散ウェーブレット変換による周波数変換処理を行い、予測差分生成部105bへ変換係数を出力する。
The RAW
図3(a)は、分解レベル1のサブバンド分割処理に関わる離散ウェーブレット変換を実現するためのフィルタバンク構成の例を示す図である。ステップS301において、周波数変換部105aは、式(1)のローパスフィルタの伝達関数lpf(z)により、入力のRAWデータに対して、水平方向のローパスフィルタ処理を行う。次に、ステップS302において、周波数変換部105aは、ステップS301の処理後のデータに対して、2:1の間引きを行う。
FIG. 3A is a diagram illustrating an example of a filter bank configuration for realizing discrete wavelet transform related to the decomposition level 1 subband division processing. In step S301, the
次に、ステップS303において、周波数変換部105aは、ステップS302の処理後のデータに対して、式(1)のローパスフィルタの伝達関数lpf(z)により、垂直方向のローパスフィルタ処理を行う。次に、ステップS304において、周波数変換部105aは、ステップS303の処理後のデータに対して、2:1の間引きを行うことにより、図3(b)のLLサブバンドの変換係数を生成する。
Next, in step S303, the
ステップS305において、周波数変換部105aは、ステップS302の処理後のデータに対して、式(2)のハイパスフィルタの伝達関数hpf(z)により、垂直方向のハイパスフィルタ処理を行う。次に、ステップS306において、周波数変換部105aは、ステップS305の処理後のデータに対して、2:1の間引きを行うことにより、図3(b)のHLサブバンドの変換係数を生成する。
In step S305, the
ステップS311において、周波数変換部105aは、式(2)のハイパスフィルタの伝達関数hpf(z)により、入力のRAWデータに対して、水平方向のハイパスフィルタ処理を行う。次に、ステップS312において、周波数変換部105aは、ステップS311の処理後のデータに対して、2:1の間引きを行う。
In step S311, the
次に、ステップS313において、周波数変換部105aは、ステップS312の処理後のデータに対して、式(1)のローパスフィルタの伝達関数lpf(z)により、垂直方向のローパスフィルタ処理を行う。次に、ステップS314において、周波数変換部105aは、ステップS313の処理後のデータに対して、2:1の間引きを行うことにより、図3(b)のLHサブバンドの変換係数を生成する。
Next, in step S313, the
ステップS315において、周波数変換部105aは、ステップS312の処理後のデータに対して、式(2)のハイパスフィルタの伝達関数hpf(z)により、垂直方向のハイパスフィルタ処理を行う。次に、ステップS316において、周波数変換部105aは、ステップS315の処理後のデータに対して、2:1の間引きを行うことにより、図3(b)のHHサブバンドの変換係数を生成する。
In step S315, the
以上のように、周波数変換部105aは、図2のRAWデータを離散ウェーブレット変換することにより、図3(b)のLLサブバンドLL、HLサブバンド、LHサブバンド及びHHサブバンドの変換係数を生成する。
As described above, the
周波数変換部105aは、分解レベルが1よりも大きい場合には、LLサブバンドに対して、階層的にサブバンド分割を実行する。例えば、分解レベルが3の場合、周波数変換部105aは、図3(c)に示すようなサブバンド分割を行う。分解レベルが0の場合には、周波数変換部105aは、離散ウェーブレット変換処理を行わず、入力されたRAWデータをそのまま予測差分生成部105bに出力する。ここで、離散ウェーブレット変換は、式(1)及び(2)に示すように、5タップのローパスフィルタと3タップのハイパスフィルタを用いたが、これとは異なるタップ数及び異なる係数のフィルタを用いてもよく、可逆型であれば他の周波数変換方式であってもよい。
When the decomposition level is higher than 1, the
図1(a)において、予測差分生成部105bは、周波数変換部105aから入力されたRAWデータの画素値又は変換係数に対して、MED(Median Edge Detector)予測により予測値pdを生成する。
In FIG. 1A, the prediction
図4は、MED予測方法を示す図である。予測差分生成部105bは、画素値又は変換係数の予測差分データを求める。以下、画素値の予測差分データを生成する方法を例に説明するが、変換係数の予測差分データの生成方法も同様である。予測差分生成部105bは、MED予測により、符号化対象画素xの周辺画素a〜dの値から、符号化対象画素の値に対する予測値pdを生成する。画素a及びbの値のうちの小さい方の値が画素cの値以上である場合には、画素a及びbの値のうちの大きい方の値を、符号化対象画素xの予測値pdとする。また、画素a及びbの値のうちの大きい方の値が画素cの値以下である場合には、画素a及びbの値のうちの小さい方の値を、符号化対象画素xの予測値pdとする。それ以外の場合には、画素a及びbの値の加算値から画素cの値を減算した値を、符号化対象画素xの予測値pdとする。
FIG. 4 is a diagram illustrating a MED prediction method. The prediction
次に、予測差分生成部105bは、符号化対象画素xの値と予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。なお、予測差分生成部105bによる予測差分が生成されるのは、周波数変換部105aにより生成された低周波数成分サブバンド(LLサブバンド)のみであり、高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)には適用されない。
Next, the prediction
エントロピー符号化部105cは、予測差分生成部105bから入力されたデータに対して、例えばハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。なお、予測方式及びエントロピー符号化方式は、他の方式であってもよい。制御部101は、エントロピー符号化部105cにより生成された符号化データを、メモリI/F部103を介して、メモリ104へ書き込む。
The
制御部101は、メモリ104から符号化データを読み出し、記録処理部106に出力する。記録処理部106は、符号化データに対して、所定の記録フォーマット化を行い、記録媒体107へ記録する。記録媒体107は、例えば、不揮発性メモリである。
The control unit 101 reads the encoded data from the
ここで、一般的なRAWデータは、隣接する画素値の類似性が高く、空間的な相関性が高いため、前述のような予測差分を利用した予測差分符号化が効率的なデータ圧縮に有効である。しかし、高ISO感度条件等で撮像されたRAWデータは、ノイズ成分を多く含むので、空間的な相関性が低下し、予測差分符号化における圧縮効率が低下してしまう。そのため、RAWデータ符号化部105は、周波数変換処理により周波数変換を行い、周波数帯域毎に相関性を高めたデータとして符号化を行うことにより、圧縮効率を向上させられると考えられる。
Here, since general RAW data has high similarity between adjacent pixel values and high spatial correlation, predictive differential encoding using predictive differences as described above is effective for efficient data compression. It is. However, since RAW data imaged under high ISO sensitivity conditions contain a lot of noise components, the spatial correlation is reduced and the compression efficiency in predictive differential encoding is reduced. Therefore, it is considered that the RAW
ここで、ISO感度等の撮像条件に依存してRAWデータに混入されるノイズ量は、有効画素領域201とオプティカルブラック領域202で同様であると考えられる。そこで、撮像装置100は、オプティカルブラック領域202を解析することにより、RAWデータに含まれるノイズ量を推定し、そのノイズ量に応じて周波数変換の有効性を判定し、選択的に符号化する。これにより、撮像装置100は、効率的に圧縮を行うことが可能となる。
Here, the amount of noise mixed into the RAW data depending on the imaging conditions such as ISO sensitivity is considered to be the same in the
図5は、第1の実施形態による撮像装置100の符号化方法を示すフローチャートである。ステップS501において、RAWデータ符号化部105は、RAWデータのオプティカルブラック領域202の解析を行う。具体的には、RAWデータ符号化部105は、オプティカルブラック領域202の一部又は全体の画素値を符号化し、その符号化により発生した符号量を取得し、発生符号量に基づき、RAWデータに含まれるノイズ量を推定する。
FIG. 5 is a flowchart illustrating the encoding method of the
次に、ステップS502において、RAWデータ符号化部105は、推定されたノイズ量を基に、周波数変換の有効性を判定する。RAWデータ符号化部105は、判定手段により、ノイズ量が閾値より少ない場合には、周波数変換が有効でないと判定し、ステップS505に処理を進める。ステップS505において、周波数変換部105aは、周波数変換を行わず、予測差分生成部105bは、入力のRAWデータの色要素プレーン単位で、符号化対象画素の周辺の画素から予測差分データを生成する。具体的には、予測差分生成部105bは、図4と同様に、符号化対象画素xの周辺画素a〜dからMED予測により予測値pdを生成し、符号化対象画素xの値と予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS506において、エントロピー符号化部105cは、予測差分生成部105bから入力された差分データに対して、例えばハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
Next, in step S502, the RAW
ステップS502において、RAWデータ符号化部105は、判定手段により、ノイズ量が閾値より多い場合には、周波数変換が有効であると判定し、ステップS503に処理を進める。ステップS503において、周波数変換部105aは、入力のRAWデータの色要素プレーン単位で、周波数変換処理を行う。具体的には、周波数変換部105aは、図3(a)〜(c)と同様に、ベイヤ配列のRAWデータを各色要素プレーンに分離し、分離された色要素プレーン単位で、所望の分解レベルで離散ウェーブレット変換による周波数変換処理を行い、変換係数を生成する。例えば、周波数変換部105aは、低周波数成分サブバンド(LLサブバンド)及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数を生成する。次に、ステップS504において、RAWデータ符号化部105は、低周波数成分サブバンド(LLサブバンド)の変換係数については、ステップS505に処理を進める。そして、RAWデータ符号化部105は、高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数については、ステップS506に処理を進める。ステップS505において、予測差分生成部105bは、低周波数成分サブバンド(LLサブバンド)の変換係数に対して、符号化対象変換係数の周辺の変換係数から予測差分データを生成する。具体的には、予測差分生成部105bは、図4と同様に、MED予測により、符号化対象変換係数xの周辺変換係数a〜dから、符号化対象変換係数に対する予測値pdを生成する。そして、予測差分生成部105bは、符号化対象変換係数xと予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS506において、エントロピー符号化部105cは、低周波数成分サブバンド(LLサブバンド)の差分データ及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数に対して、符号化データを生成する。例えば、エントロピー符号化部105cは、ハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
In step S502, the RAW
次に、実際のRAWデータの例を用いて、周波数変換の有効性の判定方法を具体的に説明する。図6は、ISO感度とオプティカルブラック領域202の発生符号量の関係を示すグラフである。図6は、同じシーンにおいて、ISO感度を100から204800まで1段ずつ変更して撮像したRAWデータに対するISO感度とオプティカルブラック領域202の発生符号量の関係を示す。「OB」は、RAWデータ符号化部105がオプティカルブラック領域202を符号化した場合に発生する符号量を示す。「HOB」は、RAWデータ符号化部105が水平オプティカルブラック領域203を符号化した場合に発生する符号量を示す。「VOB」は、RAWデータ符号化部105が垂直オプティカルブラック領域204を符号化した場合に発生する符号量を示す。横軸は、ISO感度の段数を示しており、「1」が「ISO感度=100」を示し、以降、1段進む毎にISO感度の値は2倍となり、「12」が「ISO感度=204800」である。縦軸は、ISO感度が100の発生符号量(基準値)を1とした場合の発生符号量の比率を示している。
Next, a method for determining the effectiveness of frequency conversion will be specifically described using an example of actual RAW data. FIG. 6 is a graph showing the relationship between the ISO sensitivity and the generated code amount of the optical
このRAWデータの例では、ISO感度=100からISO感度=400までは、ほぼ同等の発生符号量である。ISO感度800以降は、一次関数的に発生符号量が増加している。これは、混入したノイズ量に対応して、発生符号量が増加していることを示している。そこで、図5に示したフローチャートに当てはめた場合、例えばISO感度=100のオプティカルブラック領域202の発生符号量を基準として、比率が2倍以上の場合は、混入されたノイズ量が極めて多いことから、空間的な相関性も極めて低いと考えられる。そのため、RAWデータ符号化部105は、発生符号量の比率が2倍以上の場合には、周波数変換が有効であると判定することができる。例えば、RAWデータ符号化部105は、図6に示したVOBの発生符号量の比率を基に、ISO感度が25600以上の場合に、周波数変換が有効であると判定することが可能となる。
In this example of RAW data, the ISO sensitivity = 100 to ISO sensitivity = 400 are almost the same amount of generated codes. After ISO sensitivity 800, the amount of generated code increases in a linear function. This indicates that the amount of generated code increases corresponding to the amount of mixed noise. Therefore, when applied to the flowchart shown in FIG. 5, for example, when the ratio is 2 times or more on the basis of the generated code amount of the optical
以上のように、RAWデータ符号化部105は、オプティカルブラック領域202の全体又は一部の発生符号量が閾値より多い場合には、周波数変換が有効であると判定する。また、RAWデータ符号化部105は、オプティカルブラック領域202の全体又は一部の発生符号量が閾値より少ない場合には、周波数変換が有効でないと判定する。
As described above, the RAW
また、RAWデータ符号化部105は、オプティカルブラック領域202の全体又は一部の発生符号量の基準値に対する比率が閾値より多い場合には、周波数変換が有効であると判定する。また、RAWデータ符号化部105は、オプティカルブラック領域202の全体又は一部の発生符号量の基準値に対する比率が閾値より少ない場合には、周波数変換が有効でないと判定する。
The RAW
ここでは、説明の単純化のために、周波数変換の有効性を判定する方法を示したが、周波数変換が有効である場合においては、発生符号量に応じて分解レベルを変更するようにしてもよい。 Here, for simplification of explanation, a method for determining the effectiveness of frequency conversion is shown. However, when the frequency conversion is effective, the decomposition level may be changed according to the generated code amount. Good.
図1(b)は、撮像装置100の他の構成例を示すブロック図である。図1(b)の撮像装置100は、図1(a)の撮像装置100に対して、オプティカルブラック解析部108を追加したものである。オプティカルブラック解析部108は、RAWデータ符号化部105の外部に設けられる。図1(a)の撮像装置100では、オプティカルブラック領域202の解析として、RAWデータ符号化部105がオプティカルブラック領域202の発生符号量を算出する例を示した。これに対し、図1(b)の撮像装置100では、オプティカルブラック解析部108を専用に設け、オプティカルブラック解析部108がオプティカルブラック領域202の解析を行う。具体的には、オプティカルブラック解析部108は、オプティカルブラック領域202の画素値に対して、式(3)に示す分散σ2、又は式(4)に示す標準偏差σを算出することにより、オプティカルブラック領域202の画素値のバラツキを解析する。ここで、σ2は分散、σは標準偏差、nは測定対象画素数、xは画素値、μは測定対象画素の平均値である。オプティカルブラック解析部108は、分散σ2又は標準偏差σを基に、周波数変換の有効性を判定する。
FIG. 1B is a block diagram illustrating another configuration example of the
図7(a)は、ISO感度とオプティカルブラック領域202の標準偏差の関係を示すグラフである。図7(a)は、図6の例と同じRAWデータを用いて、同様に、ISO感度を100〜204800まで1段ずつ変更して撮像したRAWデータに対するISO感度とオプティカルブラック領域202の画素値の標準偏差の関係を示す。「OB」は、オプティカルブラック領域202の画素値の標準偏差を示す。「HOB」は、水平オプティカルブラック領域203の画素値の標準偏差を示す。「VOB」は、垂直オプティカルブラック領域204の画素値の標準偏差を示す。横軸は、ISO感度の段数を示しており、「1」が「ISO感度=100」を示し、以降、1段進む毎にISO感度の値は2倍となり「12」が「ISO感度=204800」である。縦軸は、ISO感度が100の標準偏差(基準値)を1とした場合の標準偏差の比率を示している。
FIG. 7A is a graph showing the relationship between the ISO sensitivity and the standard deviation of the optical
このRAWデータの例では、図7(a)に示すように、ISO感度=100からISO感度=400までは、ほぼ同等の標準偏差を示している。ISO感度800以降は、二次関数的に標準偏差が増加しており、混入したノイズ量に対応し、標準偏差が増大していることを示している。 In the example of the RAW data, as shown in FIG. 7A, from ISO sensitivity = 100 to ISO sensitivity = 400 shows almost the same standard deviation. After ISO sensitivity 800, the standard deviation increases as a quadratic function, indicating that the standard deviation increases corresponding to the amount of mixed noise.
図7(b)は、図7(a)の縦軸の標準偏差を対数目盛で置き換えたグラフであり、ISO感度とオプティカルブラック領域202の標準偏差の関係を示す。図7(b)の標準偏差の比率を示すグラフは、図6の発生符号量の比率を示すグラフと同様に、一次関数的に表現することが可能となる。オプティカルブラック解析部108は、図6の発生符号量を用いた場合と同様の方法で、標準偏差を用いて周波数変換の有効性を判定することができる。
FIG. 7B is a graph in which the standard deviation on the vertical axis in FIG. 7A is replaced with a logarithmic scale, and shows the relationship between the ISO sensitivity and the standard deviation of the optical
すなわち、オプティカルブラック解析部108は、オプティカルブラック領域202の全体又は一部の画素値の標準偏差又は分散が閾値より大きい場合には、周波数変換が有効であると判定する。また、オプティカルブラック解析部108は、オプティカルブラック領域202の全体又は一部の画素値の標準偏差又は分散が閾値より小さい場合には、周波数変換が有効でないと判定する。
In other words, the optical
また、オプティカルブラック解析部108は、オプティカルブラック領域202の全体又は一部の画素値の標準偏差又は分散の基準値に対する比率が閾値より大きい場合には、周波数変換が有効であると判定する。また、オプティカルブラック解析部108は、オプティカルブラック領域202の全体又は一部の画素値の標準偏差又は分散の基準値に対する比率が閾値より小さい場合には、周波数変換が有効でないと判定する。
Further, the optical
なお、基準となるISO感度が100の場合のオプティカルブラック領域202の解析結果は、事前に記憶させておいてもよいし、例えば電源投入時に毎回、解析して解析結果を取得するようにしてもよい。また、図6及び図7(b)のグラフからも分かるように、オプティカルブラック領域202の発生符号量又は標準偏差の比率は、同様の傾向を示している。そのため、解析対象とするオプティカルブラック領域は、オプティカルブラック領域202、水平オプティカルブラック領域203、垂直オプティカルブラック領域204、又は同等の結果が得られるより小さい一部の領域であってもよい。
Note that the analysis result of the optical
以上のように、撮像装置100は、RAWデータに含まれるオプティカルブラック領域202の発生符号量、標準偏差又は分散を算出することにより、RAWデータに混入されたノイズ量を正確に推定することができる。撮像装置100は、そのノイズ量に基づき、周波数変換の有効性を判定し、効率的に符号化して記録することができる。
As described above, the
(第2の実施形態)
図8は本発明の第2の実施形態による撮像装置100の符号化方法を示すフローチャートであり、図9はRAWデータの分割例を示す図である。本実施形態による撮像装置100は、第1の実施形態で示した図1の撮像装置100と同様の構成を有する。本実施形態の撮像装置100は、第1の実施形態の撮像装置100に対して、RAWデータの符号化方法が異なるため、共通となる説明は省略し、RAWデータの符号化方法について図8のフローチャートに基づき説明を行う。RAWデータは、図9に示すように、有効画素領域201と、水平オプティカルブラック領域203と、垂直オプティカルブラック領域204に分割されて符号化される。なお、分割の仕方や分割数については、これに限定されるものではなく、例えば垂直オプティカルブラック領域204と、有効画素領域201を含むそれ以外の領域との2つに分割してもよい。
(Second Embodiment)
FIG. 8 is a flowchart illustrating an encoding method of the
ステップS801において、RAWデータ符号化部105は、RAWデータの水平オプティカルブラック領域203及び垂直オプティカルブラック領域204の画素値を符号化し、符号を発生させる。次に、ステップS802において、RAWデータ符号化部105は、その符号化により発生した符号量を取得する。次に、ステップS803において、RAWデータ符号化部105は、その発生した符号量に基づきノイズ量を推定し、ノイズ量を基に、有効画素領域201の符号化に対する周波数変換の有効性を判定する。例えば、RAWデータ符号化部105は、その発生した符号量が閾値より多い場合には、ノイズ量が閾値より多いと判定し、有効画素領域201の符号化に対する周波数変換が有効であると判定する。また、RAWデータ符号化部105は、その発生した符号量が閾値より少ない場合には、ノイズ量が閾値より少ないと判定し、有効画素領域201の符号化に対する周波数変換が有効でないと判定する。
In step S801, the RAW
ステップS803において、RAWデータ符号化部105は、周波数変換が有効でないと判定した場合には、ステップS806に処理を進める。ステップS806において、周波数変換部105aは、周波数変換を行わず、予測差分生成部105bは、入力のRAWデータの有効画素領域201の色要素プレーン単位で、符号化対象画素の周辺の画素から予測差分データを生成する。具体的には、予測差分生成部105bは、図4と同様に、符号化対象画素xの周辺画素a〜dからMED予測により予測値pdを生成し、符号化対象画素xの値と予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS807において、エントロピー符号化部105cは、予測差分生成部105bから入力された差分データに対して、例えばハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
In step S803, if the RAW
また、ステップS803において、RAWデータ符号化部105は、周波数変換が有効であると判定した場合には、ステップS804に処理を進める。ステップS804において、周波数変換部105aは、入力のRAWデータの有効画素領域201の色要素プレーン単位で、周波数変換処理を行う。周波数変換部105aは、図3(a)〜(c)と同様に、RAWデータの有効画素領域201を各色要素プレーンに分離し、分離された色要素プレーン単位で、所望の分解レベルで離散ウェーブレット変換による周波数変換処理を行い、変換係数を生成する。例えば、周波数変換部105aは、低周波数成分サブバンド(LLサブバンド)及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数を生成する。次に、ステップS805において、RAWデータ符号化部105は、低周波数成分サブバンド(LLサブバンド)の変換係数については、ステップS806に処理を進める。そして、RAWデータ符号化部105は、高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数については、ステップS807に処理を進める。ステップS806において、予測差分生成部105bは、低周波数成分サブバンド(LLサブバンド)の変換係数に対して、符号化対象変換係数の周辺の変換係数から予測差分データを生成する。予測差分生成部105bは、図4と同様に、符号化対象変換係数xの周辺変換係数a〜dからMED予測により予測値pdを生成し、符号化対象変換係数xと予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS807において、エントロピー符号化部105cは、低周波数成分サブバンド(LLサブバンド)の差分データ及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数に対して、符号化データを生成する。例えば、エントロピー符号化部105cは、ハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
In step S803, if the RAW
以上のように、撮像装置100は、RAWデータをオプティカルブラック領域202と有効画素領域201に分割し、ステップS801でオプティカルブラック領域202の符号化を行うことで、その発生符号量を基にノイズ量を正確に推定することができる。撮像装置100は、そのノイズ量に基づき、有効画素領域201に対する周波数変換の有効性を判定し、効率的に符号化して記録することができる。
As described above, the
(第3の実施形態)
図10は、本発明の第3の実施形態による撮像装置100の符号化方法を示すフローチャートである。本実施形態による撮像装置100は、第1の実施形態で示した図1の撮像装置100と同様の構成を有する。本実施形態の撮像装置100は、第1の実施形態の撮像装置100に対して、RAWデータの符号化方法が異なるため、共通となる説明は省略し、RAWデータの符号化方法について図10のフローチャートに基づき説明を行う。
(Third embodiment)
FIG. 10 is a flowchart showing an encoding method of the
ステップS1001において、RAWデータ符号化部105は、撮像情報を取得する。具体的には、RAWデータ符号化部105は、主にISO感度(撮像感度)や露光時間に起因するノイズ量を推定するために、撮像情報として、撮像時のISO感度情報又は露光時間情報を取得する。次に、ステップS1002において、RAWデータ符号化部105は、撮像情報を基に、RAWデータに含まれるノイズ量を推定し、ノイズ量に基づき周波数変換の有効性を判定する。この判定条件は、撮像部102の特性によって決定される条件であり、予め実験により統計的に得られた値を基に判定する。例えば、RAWデータ符号化部105は、ISO感度又は露光時間が閾値より大きい場合には、ノイズ量が閾値より多いと判定し、周波数変換が有効であると判定する。また、RAWデータ符号化部105は、ISO感度又は露光時間が閾値より小さい場合には、ノイズ量が閾値より小さいと判定し、周波数変換が有効でないと判定する。
In step S1001, the RAW
ステップS1002において、RAWデータ符号化部105は、周波数変換が有効でないと判定した場合には、ステップS1005に処理を進める。ステップS1005において、周波数変換部105aは、周波数変換を行わず、予測差分生成部105bは、入力のRAWデータの色要素プレーン単位で、符号化対象画素の周辺の画素から予測差分データを生成する。具体的には、予測差分生成部105bは、図4と同様に、符号化対象画素xの周辺画素a〜dからMED予測により予測値pdを生成し、符号化対象画素xの値と予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS1006において、エントロピー符号化部105cは、予測差分生成部105bから入力された差分データに対して、例えばハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
If the RAW
また、ステップS1002において、RAWデータ符号化部105は、周波数変換が有効であると判定した場合には、ステップS1003に処理を進める。ステップS1003において、周波数変換部105aは、入力のRAWデータの色要素プレーン単位で、周波数変換処理を行う。具体的には、周波数変換部105aは、図3(a)〜(c)と同様に、ベイヤ配列のRAWデータを各色要素プレーンに分離し、分離された色要素プレーン単位で、所望の分解レベルで離散ウェーブレット変換による周波数変換処理を行い、変換係数を生成する。例えば、周波数変換部105aは、低周波数成分サブバンド(LLサブバンド)及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数を生成する。次に、ステップS1004において、RAWデータ符号化部105は、低周波数成分サブバンド(LLサブバンド)の変換係数については、ステップS1005に処理を進める。そして、RAWデータ符号化部105は、高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数については、ステップS1006に処理を進める。ステップS1005において、予測差分生成部105bは、低周波数成分サブバンド(LLサブバンド)の変換係数に対して、符号化対象変換係数の周辺の変換係数から予測差分データを生成する。予測差分生成部105bは、図4と同様に、符号化対象変換係数xの周辺変換係数a〜dからMED予測により予測値pdを生成し、符号化対象変換係数xと予測値pdとの差分データを生成し、その差分データをエントロピー符号化部105cへ出力する。次に、ステップS1006において、エントロピー符号化部105cは、低周波数成分サブバンド(LLサブバンド)の差分データ及び高周波数成分サブバンド(HLサブバンド、LHサブバンド、HHサブバンド)の変換係数に対して、符号化データを生成する。例えば、エントロピー符号化部105cは、ハフマン符号化又はゴロム符号化等により、エントロピー符号化を行い、符号化データを生成する。
In step S1002, when the RAW
以上のように、撮像装置100は、RAWデータに対するISO感度情報や露光時間情報等の撮像情報に基づき、RAWデータに混入されたノイズ量を推定する。撮像装置100は、そのノイズ量に基づき、周波数変換の有効性を判定し、効率的に符号化して記録することができる。
As described above, the
(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
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 the 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.
なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
105:RAWデータ符号化部、105a:周波数変換部、105b:予測差分生成部、105c:エントロピー符号化部 105: RAW data encoding unit, 105a: frequency converting unit, 105b: prediction difference generating unit, 105c: entropy encoding unit
Claims (17)
前記ノイズ量が閾値より多い場合には、前記画像データを周波数変換することにより変換係数を生成する周波数変換手段と、
前記ノイズ量が閾値より多い場合には、前記変換係数に対して符号化を行い、前記ノイズ量が閾値より少ない場合には、前記画像データに対して符号化を行う符号化手段と
を有することを特徴とする符号化装置。 A determination unit that estimates a noise amount included in the image data and determines whether the noise amount is greater than a threshold;
When the amount of noise is greater than a threshold value, a frequency conversion unit that generates a conversion coefficient by frequency converting the image data;
Encoding means for encoding the transform coefficient when the noise amount is greater than a threshold value, and encoding the image data when the noise amount is less than the threshold value. An encoding device characterized by the above.
前記符号化手段は、前記差分データに対して符号化を行うことを特徴とする請求項1に記載の符号化装置。 Further, when the amount of noise is larger than a threshold value, a prediction value for the encoding target transform coefficient among the generated transform coefficients is generated, and difference data between the encoding target transform coefficient and the prediction value is generated. If the amount of noise is greater than a threshold value, a predicted value for the encoding target pixel value in the image data is generated, and difference data between the encoding target pixel value and the predicted value is generated. A prediction difference generation means;
The encoding apparatus according to claim 1, wherein the encoding unit encodes the difference data.
前記予測差分生成手段は、前記ノイズ量が閾値より多い場合には、前記低周波数成分の変換係数に対して前記差分データを生成し、
前記符号化手段は、前記ノイズ量が閾値より多い場合には、前記低周波数成分の変換係数の前記差分データと前記高周波数成分の変換係数に対して符号化を行うことを特徴とする請求項2に記載の符号化装置。 The frequency conversion means generates a low-frequency component conversion coefficient and a high-frequency component conversion coefficient,
The prediction difference generation means generates the difference data for the conversion coefficient of the low frequency component when the amount of noise is greater than a threshold value,
The encoding unit performs encoding on the difference data of the low-frequency component conversion coefficient and the high-frequency component conversion coefficient when the amount of noise is greater than a threshold value. 2. The encoding device according to 2.
前記判定手段は、前記オプティカルブラック領域に対して符号化を行い、
前記符号化手段は、前記有効画素領域に対して符号化を行うことを特徴とする請求項6〜8のいずれか1項に記載の符号化装置。 The image data has an optical black area and an effective pixel area,
The determination means performs encoding on the optical black region,
The encoding apparatus according to claim 6, wherein the encoding unit performs encoding on the effective pixel area.
周波数変換手段により、前記ノイズ量が閾値より多い場合には、前記画像データを周波数変換することにより変換係数を生成する周波数変換ステップと、
符号化手段により、前記ノイズ量が閾値より多い場合には、前記変換係数に対して符号化を行い、前記ノイズ量が閾値より少ない場合には、前記画像データに対して符号化を行う符号化ステップと
を有することを特徴とする符号化方法。 A determination step of determining a noise amount included in the image data by a determination unit and determining whether the noise amount is greater than a threshold;
When the amount of noise is greater than a threshold by a frequency conversion means, a frequency conversion step of generating a conversion coefficient by frequency converting the image data;
Encoding means for encoding the transform coefficient when the amount of noise is greater than a threshold, and encoding the image data when the amount of noise is less than the threshold. And an encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017138939A JP2019022080A (en) | 2017-07-18 | 2017-07-18 | Coding apparatus, coding method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017138939A JP2019022080A (en) | 2017-07-18 | 2017-07-18 | Coding apparatus, coding method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019022080A true JP2019022080A (en) | 2019-02-07 |
Family
ID=65353592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017138939A Pending JP2019022080A (en) | 2017-07-18 | 2017-07-18 | Coding apparatus, coding method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019022080A (en) |
-
2017
- 2017-07-18 JP JP2017138939A patent/JP2019022080A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101253761B (en) | Image encoding apparatus and image encoding method | |
US8615140B2 (en) | Compression of image data in accordance with depth information of pixels | |
US8942509B2 (en) | Apparatus and method creating ghost-free high dynamic range image using filtering | |
US10776956B2 (en) | Image coding apparatus, image decoding apparatus, image coding method, image decoding method, and non-transitory computer-readable storage medium | |
JP2004201290A (en) | Image processing method, image processing device, image processing program, and record medium | |
US10313579B2 (en) | Dual phase detection auto focus camera sensor data processing | |
KR20070027605A (en) | Image compression device, image compression method, and image compression program | |
US10032252B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer readable storage medium | |
JP2008193530A (en) | Image recorder, image recording method and program | |
US9398273B2 (en) | Imaging system, imaging apparatus, and imaging method | |
US11082698B2 (en) | Image capturing apparatus having a function for encoding raw image control method therof, and non-transitory computer-readable storage medium | |
US20190387228A1 (en) | Image encoding apparatus, image decoding apparatus, control methods thereof, and non-transitory computer-readable storage medium | |
JP2017224939A (en) | Imaging apparatus | |
US10462401B2 (en) | Encoding apparatus and encoding method encoding raw data that is quantized based on an index value of noise amount in an optical black area | |
US11861814B2 (en) | Apparatus and method for sensing image based on event | |
JP2019029802A (en) | Encoding apparatus, encoding method, and program | |
JP2016021731A (en) | Image capturing apparatus, method for controlling the same, and program | |
US6677994B1 (en) | Image processing apparatus method of the same and camera apparatus | |
JP4310282B2 (en) | Image encoding apparatus and encoding method | |
WO2011074189A1 (en) | Image encoding method and image encoding device | |
JP2019022080A (en) | Coding apparatus, coding method, and program | |
US20070092148A1 (en) | Method and apparatus for digital image rudundancy removal by selective quantization | |
JP6946671B2 (en) | Image processing device and image processing method | |
JP6465571B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
US10516896B2 (en) | Encoding device, encoding method, and storage medium |