JP2009290556A - Image information processing apparatus and image information processing method - Google Patents
Image information processing apparatus and image information processing method Download PDFInfo
- Publication number
- JP2009290556A JP2009290556A JP2008140993A JP2008140993A JP2009290556A JP 2009290556 A JP2009290556 A JP 2009290556A JP 2008140993 A JP2008140993 A JP 2008140993A JP 2008140993 A JP2008140993 A JP 2008140993A JP 2009290556 A JP2009290556 A JP 2009290556A
- Authority
- JP
- Japan
- Prior art keywords
- block
- data
- unit
- pixel data
- sub
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、画像情報処理装置及び画像情報処理方法に関する。 The present invention relates to an image information processing apparatus and an image information processing method.
デジタルカメラ、ビデオカメラ等の撮像装置は、CCD、CMOS等の撮像素子などを用いて被写体をデジタルデータに変換する。近年、撮像素子は多画素化が進み、撮像装置は高性能化が要求されている。撮像素子の多画素化が進むと、撮像装置内における撮像信号の処理負荷が増大する。従って、撮像装置は、ユーザーにとって操作性がスムーズとなるように、データを高速処理することが求められている。 An imaging device such as a digital camera or a video camera converts a subject into digital data using an imaging device such as a CCD or CMOS. In recent years, the number of pixels of an image sensor has been increased, and an image pickup apparatus is required to have high performance. As the number of pixels of the image sensor increases, the processing load of the image signal in the image capturing apparatus increases. Therefore, the imaging apparatus is required to process data at high speed so that operability is smooth for the user.
また、CCD、CMOS等の撮像素子から出力された信号は、不可逆圧縮処理や信号処理されて記録媒体に記録される場合もあるが、信号処理を施さずにRAWデータとして記録媒体に記録される場合もある。この場合、撮像装置の内部バスに伝送されるデータ量は多大であり、記録媒体への書き込み処理、記録媒体からの読み出し処理にかかる時間が長時間化する。例えば、特許文献1及び2では、撮像装置においてRAWデータを処理する技術について開示されている。
In addition, a signal output from an image sensor such as a CCD or CMOS may be recorded on a recording medium after being subjected to irreversible compression processing or signal processing, but is recorded as RAW data on the recording medium without performing signal processing. In some cases. In this case, the amount of data transmitted to the internal bus of the imaging apparatus is large, and the time required for the writing process to the recording medium and the reading process from the recording medium becomes longer. For example,
例えば、特許文献1では、撮像装置の内部バスにおけるデータ伝送の際、RAWデータを可逆圧縮して伝送する技術が開示されている。しかし、可逆圧縮したとしても、例えば、ハフマン符号化などは可変長符号化処理となるため、内部バスにおける帯域を一定に維持することは困難である。また、可変長符号化処理では、帯域削減の効果を常時得ることができないという問題があった。
For example,
特許文献2では、記録媒体で読み書きされる画像データが圧縮される。この圧縮処理では、所定数の画素データからなるブロック内の画素データの最大値及び最小値と、ブロック内での位置情報と、ブロック内の画素データから最小値を減算した減算値が量子化される。特許文献2の圧縮処理は、固定長符号化処理であり、圧縮効率が8bit/pixの場合では、1画素あたり7ビットの量子化で達成可能であった。
In
しかし、圧縮処理において、圧縮効率を更に向上させるため単純に量子化語長を4bitなどに下げるだけでは、波形の変動の激しい部分が上記ブロック内に存在した場合、量子化ノイズが顕在化するという問題があった。例えば、被写体が黒い幕を背景にして立った人物であって、暗い背景と明るい人物の肌色とのグラデーション変化のある境界部分が上記圧縮処理対象となる1つのブロック内に存在する場合、肌色部分が段差となる等の量子化ノイズが目立ってしまう。 However, in the compression process, simply reducing the quantization word length to 4 bits or the like to further improve the compression efficiency means that if there is a part where the waveform fluctuates significantly in the block, quantization noise becomes obvious. There was a problem. For example, if the subject is a person standing against a black curtain and a boundary portion having a gradation change between a dark background and a bright person's skin color is present in one block to be compressed, the skin color portion Quantization noise such as a step becomes conspicuous.
そこで、本発明は、上記問題に鑑みてなされたものであり、本発明の目的とするところは、画質劣化を低減させた量子化処理ができ、更にデータ処理の高速化を図ることが可能な、新規かつ改良された画像情報処理装置及び画像情報処理方法を提供することにある。 Therefore, the present invention has been made in view of the above problems, and an object of the present invention is to enable quantization processing with reduced image quality degradation and to further speed up data processing. Another object of the present invention is to provide a new and improved image information processing apparatus and image information processing method.
上記課題を解決するために、本発明のある観点によれば、撮像素子から出力された画素データを所定数毎に分割しブロックを生成するブロック化部と、ブロック内の画素データのレベル変化に応じてブロックを分割しサブブロックを生成する分割処理部と、生成されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成する量子化部と、ブロック内の画素データのレベル変化に関する情報と量子化データを集約し圧縮データを生成する圧縮データ生成部とを有する画像情報処理装置が提供される。 In order to solve the above-described problem, according to an aspect of the present invention, a block forming unit that generates a block by dividing pixel data output from an image sensor every predetermined number, and changes in the level of pixel data in the block Pixel data with a quantization word length determined according to the amount of change in the pixel data level and the length of the sub-block section for each generated sub-block An image information processing apparatus is provided that includes a quantization unit that quantizes data and generates quantized data, and a compressed data generation unit that aggregates quantized data and information related to level changes of pixel data in a block to generate compressed data The
上記分割処理部は、ブロック内の画素データレベルの振幅値と変化量に応じて、ブロックを分割しサブブロックを生成してもよい。 The division processing unit may divide the block and generate sub-blocks according to the amplitude value and change amount of the pixel data level in the block.
上記分割処理部は、ブロック内の画素データレベルの振幅値と変化量に基づいてブロックを分割する数及び分割位置を決定する分割決定部と、決定された分割数及び分割位置に応じて、ブロックを分割しサブブロックを生成するサブブロック生成部とを有してもよい。 The division processing unit includes a division determination unit that determines the number and division position for dividing a block based on the amplitude value and change amount of the pixel data level in the block, and a block according to the determined division number and division position. And a sub-block generating unit that generates sub-blocks.
また、上記課題を解決するために、本発明の別の観点によれば、圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、ブロックが分割されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データが量子化された量子化データを抽出する抽出部と、レベル変化に関する情報に基づいて、量子化データを逆量子化し逆量子化画素データを生成する逆量子化部とを有する画像情報処理装置が提供される。 In order to solve the above-described problem, according to another aspect of the present invention, from compressed data, information on a level change of pixel data in a block made up of a predetermined number of pixel data, and a sub-block into which the block is divided Based on information on level change, an extraction unit that extracts quantized data in which pixel data is quantized with a quantization word length determined according to the amount of change in pixel data level and the length of the sub-block interval Thus, there is provided an image information processing apparatus having an inverse quantization unit that inversely quantizes quantized data and generates inversely quantized pixel data.
上記レベル変化に関する情報は、画素データのレベルの振幅値と変化量に関する情報であってもよい。 The information related to the level change may be information related to the amplitude value and the change amount of the level of the pixel data.
また、上記課題を解決するために、本発明の別の観点によれば、撮像素子から出力された画素データを所定数毎に分割しブロックを生成するステップと、ブロック内の画素データのレベル変化に応じてブロックを分割しサブブロックを生成するステップと、生成されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成するステップと、ブロック内の画素データのレベル変化に関する情報と量子化データを集約し圧縮データを生成するステップとを有する画像情報処理方法が提供される。 In order to solve the above-described problem, according to another aspect of the present invention, a step of generating a block by dividing pixel data output from an image sensor into a predetermined number, and a level change of pixel data in the block The block is divided according to the step of generating the sub-block, and the pixel data is converted with the quantization word length determined according to the change amount of the pixel data level and the length of the sub-block section for each generated sub-block. There is provided an image information processing method including a step of quantizing and generating quantized data, and a step of aggregating information on level change of pixel data in a block and quantized data to generate compressed data.
また、上記課題を解決するために、本発明の別の観点によれば、圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、ブロックが分割されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データが量子化された量子化データを抽出するステップと、レベル変化に関する情報に基づいて、量子化データを逆量子化し逆量子化画素データを生成するステップとを有する画像情報処理方法が提供される。 In order to solve the above-described problem, according to another aspect of the present invention, from compressed data, information on a level change of pixel data in a block made up of a predetermined number of pixel data, and a sub-block into which the block is divided Extracting quantized data in which pixel data is quantized with a quantized word length determined according to the amount of change in pixel data level and the length of a sub-block interval for each, and based on information on level change An image information processing method comprising: dequantizing the quantized data to generate dequantized pixel data.
本発明によれば、画質劣化を低減させた量子化処理ができ、更にデータ処理の高速化を図ることができる。 According to the present invention, quantization processing with reduced image quality degradation can be performed, and further, data processing speed can be increased.
以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。 Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.
まず、本発明の第1の実施形態に係る撮像装置100について説明する。図1は、本実施形態に係る撮像装置100を示すブロック図である。本実施形態に係る撮像装置100は、例えばデジタルスチルカメラ、デジタルビデオカメラなどであり、被写体像をデジタルデータとして記録することができる。
First, the
撮像装置100は、図1に示すように、例えば、撮像素子101、AFE回路102、デジタル画像処理部103、SDRAM104、ROM105及びストレージデバイス106等を備えている。
また、デジタル画像処理部103は、カメラ信号前処理部111、カメラ信号処理部112、解像度変換部113、JPEGエンジン114、CPU115、ビデオ出力エンコーダ116及びSDRAMコントローラ117などを有する。これらの各構成要素は、内部バス118によって相互に接続されている。さらに、本実施形態のデジタル画像処理部103は、RAW圧縮部121及びRAW伸張部122を有する。
As shown in FIG. 1, the
The digital
撮像素子101は、例えばCCD(Charge Coupled Devices)、CMOS(Complementary Metal Oxide Semiconductor)撮像素子などの固体撮像素子であり、図示しないレンズブロック(光学系)を通じて被写体から入射された光を電気信号に変換する。
The
AFE回路102は、撮像素子101から出力された画像信号に対して、CDS処理によりS/N(Signal/Noise)比を良好に保つようにサンプルホールドを行う。AFE回路102は、AGC処理により利得を制御し、A/D(Analog/Digital)変換を行ってデジタル画像信号を出力する。
The
デジタル画像処理部103は、例えば、SoC(System on a Chip)回路などとして形成される。デジタル画像処理部103において、カメラ信号前処理部111は、AFE回路102から供給された画像信号に対して、撮像素子101における欠陥画素の信号補正処理、レンズの周辺光量落ちを補正するシェーディング処理などを施す。また、カメラ信号前処理部111は、処理後の信号をRAWデータとして出力する。
The digital
RAW圧縮部121は、カメラ信号前処理部111からのRAWデータを、後述する圧縮方法により圧縮し、SDRAMコントローラ117を介して、SDRAM104に供給する。
RAW伸張部122は、SDRAM104からSDRAMコントローラ117を介して読み出した、圧縮されたRAWデータを、後述する方法により伸張して、カメラ信号処理部112に出力する。
The RAW
The RAW
カメラ信号処理部112は、RAW伸張部122からRAWデータにデモザイク処理を施す。その後、カメラ信号処理部112は、AF(Auto Focus)、AE(Auto Exposure)、ホワイトバランス制御などのための信号検波処理や、ホワイトバランス調整に代表される信号補正処理など、いわゆるカメラ信号処理、またはその処理の一部を実行する。さらに、カメラ信号処理部112は、信号補正後の画像データを、例えば4:2:2などの所定フォーマットの輝度信号(Y)と色差信号(R−Y,B−Y)に変換する。
The camera
解像度変換部113は、カメラ信号処理部112で処理された画像データ、又はJPEGエンジン114で伸張復号化された画像データの入力を受けて、所定の解像度に変換する。
The
JPEGエンジン114は、解像度変換部113で処理された画像データを圧縮符号化し、JPEG方式の符号化データを生成する。また、JPEGエンジン114は、ストレージデバイス106から読み出されたJPEG画像データを伸張復号化する。なお、デジタル画像処理部103には、このJPEGエンジン114以外の他の静止画圧縮方式、又は動画圧縮方式のエンコード/デコードエンジンが設けられてもよい。
The
CPU115は、ROM105に格納されたプログラムを実行することにより、デジタル画像処理部103及び撮像装置100全体を統括的に制御し、また、その制御のための各種演算を実行する。
The
ビデオ出力エンコーダ116は、例えばNTSC(National Television Standards Committee)エンコーダなどである。ビデオ出力エンコーダ116は、解像度変換部113などから出力された画像データを基に、モニタ表示用の画像信号を生成し、モニタ(図示せず。)又はビデオ出力端子26aに出力する。
The
SDRAMコントローラ117は、SDRAM104に対するインタフェースブロックであり、アドレスデコーダなどを有する。SDRAMコントローラ117は、CPU115からの制御信号に従って、SDRAM104の書き込み及び読み出し動作を制御する。
The
SDRAM104は、DDR(Double Data Rate)SDRAMなどの揮発性のメモリである。SDRAM104は、デジタル画像処理部103におけるデータ処理のためのワークエリアである。SDRAM104は、キャプチャデータエリア104aと、JPEG符号エリア104bと、CPUワークエリア104cなどを含む。キャプチャデータエリア104aは、撮像素子101からキャプチャされたデータ、即ち、RAW圧縮部121で圧縮されたRAWデータを一時的に格納する。JPEG符号エリア104bは、JPEGエンジン114により符号化された画像データや、その符号化・復号化処理で利用されるデータなどを一時的に格納する。CPUワークエリア104cは、CPU115の処理で利用されるデータを一時的に格納する。
The SDRAM 104 is a volatile memory such as a DDR (Double Data Rate) SDRAM. The SDRAM 104 is a work area for data processing in the digital
ROM105は、CPU115が実行するプログラムや各種データを保持する。ROM105は、例えば、EEPROM(Electronically Erasable and Programmable ROM)、フラッシュメモリなどの不揮発性メモリである。
The
ストレージデバイス106は、符号化された画像データのファイルを記録するためのデバイスである。ストレージデバイス106は、例えば、フラッシュメモリ、光ディスク、磁気テープなどの記録媒体と、記録媒体の記録/再生ドライブなどからなる。
The
上記のような撮像装置100において、撮像素子101による撮像信号は、順次AFE回路102に供給され、CDS処理やAGC処理が施された後、デジタル信号に変換されて、デジタル画像処理部103のカメラ信号前処理部111に供給される。カメラ信号前処理部111では、入力された画像信号に対して、欠陥画素補正やシェーディング補正などを施したRAWデータが生成され、このRAWデータは、RAW圧縮部121により圧縮された後、SDRAM104に一旦書き込まれる。
In the
上記RAWデータは、SDRAM104から読み出されると、RAW伸張部122により伸張された後、カメラ信号処理部112により各種画質補正処理が施される。処理後の画像データは、例えばSDRAM104に一旦格納された後、解像度変換部113により、表示に適した解像度のデータに変換され、さらに例えばSDRAM104に格納された後、ビデオ出力エンコーダ116に供給される。これにより、カメラスルー画像がモニタに表示される。
When the RAW data is read from the
また、図示しない入力部などを通じて画像の記録が要求されると、解像度変換部113は、カメラ信号処理部112で処理された画像データを、必要に応じて記録用に設定された解像度のデータに変換して、例えばSDRAM104に一旦格納する。JPEGエンジン114は、画像データを圧縮符号化して、符号化データを生成する。符号化データは、例えばSDRAM104に一旦記録された後、ストレージデバイス106に記録される。
In addition, when image recording is requested through an input unit (not shown), the
また、ストレージデバイス106に記録された画像データ(符号化データ)は、JPEGエンジン114で伸張復号化され、解像度変換部113で解像度変換される。その後、画像データは、ビデオ出力エンコーダ116に出力されることで、モニタに画像を表示させることができる。
The image data (encoded data) recorded in the
本実施形態のデジタル画像処理部103には、カメラ信号前処理部111から内部バス118に対する画像データの入力位置に、RAWデータを圧縮するRAW圧縮部121が設けられる。これにより、内部バス118を通じてSDRAM104に伝送されるRAWデータのデータ量を低減することができる。また、内部バス118からカメラ信号処理部112に対する画像データの入力位置に、RAWデータを伸張するRAW伸張部122が設けられる。これにより、SDRAM104からカメラ信号処理部112に伝送されるRAWデータのデータ量を低減することができる。
The digital
本実施形態によれば、撮像動作中の内部バス118の伝送負荷を軽減し、SDRAM104に対する書き込み/読み出し処理に要する時間を短縮することが可能となる。特に、圧縮/伸張の処理をできるだけ簡単にすることで、処理時間の短縮効果を上げることができる。また、バス上の伝送周波数を低減して、消費電力を抑制することもできる。
According to the present embodiment, the transmission load on the internal bus 118 during the imaging operation can be reduced, and the time required for the write / read processing for the
また、本実施形態によれば、SDRAM104の容量を小さくすることができる。更に、SDRAM104の領域を他の処理に利用したり、複数フレーム分のRAWデータを格納して、連写できる枚数を増やしたり、あるいは連写速度を向上させたりなど、高画質化・高機能化に寄与する。従って、撮像処理やデータ記録処理に必要な時間を短くすることができる、高性能かつ小型、低コストの撮像装置100を実現できる。
Further, according to the present embodiment, the capacity of the
また、RAW圧縮部121によるRAWデータの圧縮処理では、可逆圧縮手法を用いることで、RAWデータの品質を完全に保持できるが、非可逆圧縮であっても、圧縮歪みの発生量が、輝度/色差信号に変換された時点で、肉眼では感知できない程度となるならば、画質としては許容できる。一般に、輝度/色差信号に変換された時点のPSNR(Peak Signal to Noise Ratio)が50dB〜40dB程度であれば、圧縮歪みは許容されるレベルになる。
In the RAW data compression processing by the
更に、本実施形態の撮像装置100は、RAWデータを圧縮する場合に、固定長で符号化できる。その結果、SDRAM104に対して読み書きするRAWデータの帯域を一定に保つことができ、内部バス118における伝送負荷を安定的に低減できる。また、カメラ信号処理部112におけるRAWデータの取り扱い(例えばSDRAM104からの読み出し制御処理)や、内部バス118を通じたRAWデータの伝送制御処理を、単純化することもできる。
Furthermore, when the RAW data is compressed, the
例えば、可変長で符号化した場合、圧縮されたRAWデータをSDRAM104から読み出す際に、バースト状にアクセスしなければならない場合が多い。一方、固定長で符号化することにより、任意の位置のRAWデータのSDRAM104上のアドレスを簡単に計算し、読み出すことができる。従って、カメラ信号処理部112は、1Hの数分の一程度のディレイラインしか持たずに、全画面を部分的に(例えば、縦方向の短冊状に)処理するとしてもよい。また、デジタル画像処理部103内のDMA(Direct Memory Access)コントローラによりアクセスすることも可能となる。
For example, in the case of encoding with variable length, when reading the compressed RAW data from the
以下では、本実施形態の撮像装置100のRAW圧縮部121の構成について詳細に説明する。本実施形態の撮像装置100は、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、比較的簡単な処理で実現できる非可逆圧縮/伸張方法が用いられる。
Below, the structure of the
なお、以下の例では、RAWデータ信号を1画素(ピクセル)当たり14ビットとする。また、例えば図6に示すように、同一色成分を持つ水平方向の20画素分を、1ブロックの符号化データに変換する。図6は、ベイヤ配列と抽出された同色1ラインを示す模式図である。量子化語長は、例えば2〜4ビットの可変とする。本実施形態のRAW圧縮部121は、20画素を1ブロックとして、この1ブロックを128ビットの固定長に圧縮する。その結果、1画素当たり6.4ビットとなる。通常、14ビットのデータは、20画素を1ブロックとすると、RAWデータを圧縮しない場合、1ブロックに対応するデータ量は280ビットとなる。一方、本実施形態によれば、280ビットのデータ量を128ビット分に圧縮でき、データ量を約46%に低減する圧縮率を達成できる。
In the following example, the raw data signal is 14 bits per pixel. For example, as shown in FIG. 6, 20 pixels in the horizontal direction having the same color component are converted into encoded data of one block. FIG. 6 is a schematic diagram showing a Bayer array and one extracted same color line. The quantization word length is variable, for example, 2 to 4 bits. The
図2は、本実施形態に係るRAW圧縮部121を示すブロック図である。
図2に示すように、RAW圧縮部121は、折れ線圧縮部131、ブロック化部132、バッファ133、ブロック分割数決定部134、減算部135、量子化部136、量子化データバッファ137及びパッキング部138などを有する。
FIG. 2 is a block diagram showing the
As shown in FIG. 2, the
折れ線圧縮部131は、入力された14ビットのRAWデータを、折れ線を用いた近似により10ビットのデータに非線形で圧縮する。折れ線圧縮部131は、この後の圧縮手順の前に、できるだけ階調を下げておくことで、全体的な圧縮効率を向上させることを目的として設けられる。目的とする圧縮率によっては、省略されてもよい。なお、この場合には、後の図11で説明するRAW伸張部122の出力段に設けられる逆折れ線伸張部192についても、省略できる。
The polygonal
ここで、図9は、折れ線圧縮部131で用いられる折れ線の例を示すグラフである。
図9に示すグラフによって入力データの階調を変換する。この例では、人間の視覚特性に合わせて、入力データが小さいほど、すなわち暗いほど(または色がうすいほど)、高い階調を割り当てるようにしている。このような折れ線は、例えば色成分ごとに用意し、入力画素の色成分ごとに切り換えて利用してもよい。
Here, FIG. 9 is a graph showing an example of a broken line used in the broken
The gradation of the input data is converted by the graph shown in FIG. In this example, in accordance with human visual characteristics, a higher gradation is assigned as input data is smaller, that is, darker (or lighter in color). Such a polygonal line may be prepared for each color component, for example, and used by switching for each color component of the input pixel.
折れ線圧縮部131では、例えば、このような折れ線を用いて、入力データの階調を変換した後、変換後のデータを16で除算(すなわち4ビット分下位にシフト)して、10ビットデータに圧縮する。このとき、捨てられる下位ビットは、例えば四捨五入する。なお、以上のような演算に基づく、入力データと圧縮後の出力データとを対応付けて記憶したROMテーブルを用意し、折れ線圧縮部131では、このROMテーブルに従って入出力データの変換が行われてもよい。
In the polygonal
ブロック化部132は、折れ線圧縮部131から出力されたデータを、水平方向に隣接する20画素分の同色成分画素からなるブロックに分割し、分割したブロック毎に出力する。これにより、ブロック内のデータの相関が強くなり、この後の量子化処理による画質劣化を抑制することができる。
The blocking
例えば、図6に示すようなベイヤ配列の撮像素子が用いられた場合、出力データには、R成分とGr成分の繰り返しと、B成分とGb成分の繰り返しとが、1ラインごとに出現する。例えば、ブロック化部132への入力データに、R0,Gr0,R1,Gr1,・・・,R19,Gr19のように、R成分とGr成分が繰り返し現れる場合には、R0,R1,R2,・・・,R19,Gr0,Gr1,・・・,Gr19のように、同色成分の画素が20個連続して現れるように、出力順序を変換して、ブロック化する。
For example, when a Bayer array image sensor as shown in FIG. 6 is used, in the output data, the repetition of the R component and the Gr component and the repetition of the B component and the Gb component appear for each line. For example, when the R component and the Gr component repeatedly appear in the input data to the
バッファ133は、ブロック化部132からのデータを保持する。バッファ133は、ブロック分割数決定部134において最小値が算出されるまでの間、入力データに対応するブロックを保持し遅延時間合わせをする。
The
ブロック分割数決定部134は、ブロックを更にサブブロックに分割するための分割数や、圧縮用の要素を決定する。ブロック分割数決定部134の詳細は後述する。ブロック分割数決定部134は、分割処理部の一例である。
The block division
減算部135は、ブロック化部132から出力された画素データから、ブロック分割数決定部134が出力した、対応するブロック内の最小値を減算する。この減算は、1ブロック内の画素に共通するDCオフセット分を、各画素のデータから差し引くことと等価である。
The subtracting
量子化部136は、減算部135の出力データを、ブロック分割数決定部134から出力されるシフト量に従って量子化する。本実施形態では、一例として、2〜5ビットの可変長で量子化する。
The
この量子化部136としては、例えば、整数型の除算器を利用して、減算部135の出力データをシフト量で除算する。また、量子化ステップを2のべき乗に限定した場合には、右シフタを適用でき、これにより回路規模を削減することができる。なお、圧縮処理側で右シフタを利用すると、伸張処理側の逆量子化においても同様に回路規模を削減できる。
量子化データバッファ137は、量子化部136から出力される20画素分の量子化データを一時的に保持する。
For example, the
The quantized
パッキング部138は、量子化データバッファ137及びブロック分割数決定部134からの出力データを利用して、1ブロック当たり128ビットの圧縮データにパッキングする。ブロック分割数決定部134からの出力データには、ブロック内の画素データの最小値、シフト量、サブブロックの座標(位置情報)、量子化データ20画素分及びどの形式で圧縮したかという圧縮タイプを示すフラグを図10に示すようにパッキングする。これにより、280ビットのデータ量を128ビット分に圧縮できる。パッキング部138は、圧縮データ生成部の一例である。
The
次に、図3〜5を参照して、本実施形態のブロック分割数決定部134について説明する。図3は、本実施形態に係るブロック分割数決定部134を示すブロック図である。ブロック分割数決定部134は、例えば、バッファ141、ブロック分割判断部142及びブロック分割用データ生成部143からなる。
Next, the block division
バッファ141は、ブロック化部132からのデータを保持する。バッファ141は、ブロック分割判断部142においてサブブロックの座標やブロック分割判断終了信号などが出力されるまでの間、入力データに対応するブロックを保持し遅延時間合わせをする。
The
ブロック分割判断部142は、図4に示すように、例えば、最大値最小値検出部151、差分算出部152、語長検出部153、領域検出部154、アドレスカウンタ155、変化点ラッチ部156、変化点カウンタ157、タイプ判断部158及び領域2値化部159からなる。ブロック分割数決定部134は、サブブロックを生成する、又はサブブロックを生成しないという判断や、サブブロック分割座標を生成する。図4は、本実施形態に係るブロック分割判断部142を示すブロック図である。ブロック分割判断部142は、分割決定部の一例である。
As illustrated in FIG. 4, the block
最大値最小値検出部151は、ブロック毎に、ブロック化された水平20画素のデータのうちから最大値(MAX)及び最小値(MIN)を検出する。最大値最小値検出部151は、検出した最大値(MAX)及び最小値(MIN)を差分算出部152及び領域検出部154に出力する。
The maximum value / minimum
差分算出部152は、1つのブロック内の最大値(MAX)及び最小値(MIN)の差分を計算して、1つのブロックでのダイナミックレンジ(DR0)を算出する。差分算出部152は、ダイナミックレンジ(DR0)を語長検出部153に出力する。
The
語長検出部153は、ダイナミックレンジ(DR0)から、1つのブロック内に存在する画素データのダイナミックレンジの桁数を検出する。語長検出部153は、検出したダイナミックレンジの桁数(DEPTH)を出力する。 The word length detection unit 153 detects the number of digits of the dynamic range of the pixel data existing in one block from the dynamic range (DR0). The word length detector 153 outputs the number of detected dynamic range digits (DEPTH).
領域検出部154は、最大値(MAX)及び最小値(MIN)と、以下の閾値とによって、画素データの入力波形が最大と最小の両端に振れるまでの遷移区間(遷移領域)を判断する。そして、遷移領域にある画素は、AREA_DET=1とし、最小値近傍にある画素は、AREA_DET=0とし、最大値近傍にある画素は、AREA_DET=2として、AREA_DETを出力する。図7に画素データの入力値(Pi)と領域との関係を示す。図7は、画素データの入力波形を示す説明図である。
The
閾値は、例えば下記の通りである。
MIN≦Pi<(MAX−MIN)/4+MIN ・・・ AREA_DET=0
(MAX−MIN)/4+MIN≦Pi<3×(MAX−MIN)/4+MIN ・・・ AREA_DET=1
3×(MAX−MIN)/4+MIN≦Pi≦MAX ・・・ AREA_DET=2
The threshold value is as follows, for example.
MIN ≦ Pi <(MAX−MIN) / 4 + MIN... AREA_DET = 0
(MAX−MIN) / 4 + MIN ≦ Pi <3 × (MAX−MIN) / 4 + MIN... AREA_DET = 1
3 × (MAX−MIN) / 4 + MIN ≦ Pi ≦ MAX... AREA_DET = 2
なお、この閾値は一例であり、例えば、入力波形のヒストグラムや統計情報に基づいて、波形の傾向を閾値に反映させてもよい。閾値は、2つとしたが、これに限定されない。領域検出部154は、AREA_DETを変化点ラッチ部156及び領域2値化部159に出力する。
Note that this threshold value is an example. For example, a waveform trend may be reflected on the threshold value based on a histogram or statistical information of the input waveform. Although the threshold value is two, it is not limited to this. The
アドレスカウンタ155は、入力される20画素の画素信号を数え上げる(カウントアップする)。アドレスカウンタ155は、20画素が入力される毎にブロック分割判断終了信号を後段のブロック分割用データ生成部143に出力し、自分自身を0(ゼロ)にリセットする。
The
変化点ラッチ部156は、領域検出部154から出力されたAREA_DETの2ビット出力から領域の変化点を検出する。そして、変化点ラッチ部156は、領域の変化点(POSn(n=0,1,2))をサブブロックの切り替え座標候補(ブロックをサブブロックに分割するときの分割座標候補)として最大3つまで保持する。変化点ラッチ部156は、検出された変化点のアドレスカウンタ155から出力されたカウンタ値(本実施形態では0〜19)を保持して、そのカウンタ値を座標候補とする。変化点ラッチ部156は、変化点のカウンタ値(POSn(n=0,1,2)=0〜19)を出力する。
The change
変化点カウンタ157は、変化点ラッチ部156で、変化点のカウンタの値が座標候補として保持される毎に、画素信号をカウントアップする。そして、変化点カウンタ157は、サブブロックの切り替え座標候補の数を数え、保持する。変化点カウンタ157は、切り替え座標候補の数(CNT1)を出力する。
The change point counter 157 counts up the pixel signal every time the change
タイプ判断部158は、サブブロックを生成する、又はサブブロックを生成しないという判断をする。サブブロックを生成する、即ち1つのブロックをサブブロックに分割するという判断は、1つのブロック内の画素データのレベルの振幅と、切り換え座標候補の数に基づく。例えば、語長検出部153で検出されたダイナミックレンジの桁数(DEPTH)が、入力信号の桁数(本実施形態では10桁)に対して、同じ桁数〜1/2以下の桁数の範囲にある場合(例えば、DEPTH=10又は9など)は、1つのブロック内の画素データの変化が大きい(振幅が大きい)。
The
タイプ判断部158は、1つのブロック内の振幅が大きく、かつ、1つのブロックを4つ以内のサブブロックに分割できる場合、サブブロックを生成すると判断する。タイプ判断部158は、それ以外の場合は、サブブロックを生成しないと判断し、1つのブロックをひとまとまりとして画素データを圧縮する。タイプは、下記のように決定される。タイプは、伸張時の手順を決めるために必要であるため、圧縮データに含まれる。1つのブロックを4つ以内のサブブロックに分割できる場合とは、変化点カウンタ157から出力された値が、CNT1≦3のときである。
type00:1つのブロックのみとする場合
type01:2つのサブブロックを生成する場合
type10:3つのサブブロックを生成する場合
type11:4つのサブブロックを生成する場合
タイプ判断部158は、決定されたタイプを出力する。
type 00: when only one block is used type 01: when two sub-blocks are generated type 10: when three sub-blocks are generated type 11: when four sub-blocks are generated The
領域2値化部159は、最大4つのサブブロックのそれぞれのAREA_DETの値を保持する。そして、領域2値化部159は、サブブロック毎のAREA_DETの値を、遷移領域、最大値又は最小値近傍領域に応じて、2値化する。
具体的には、AREA_DET=0のとき、AREAn(n=0,1,2,3)=1とし、AREA_DET=1のとき、AREAn(n=0,1,2,3)=0とし、AREA_DET=2のとき、AREAn(n=0,1,2,3)=1とする。領域2値化部159は、AREAn(n=0,1,2,3)=0又は1を出力する。AREAn(n=0,1,2,3)は、4つ以内のサブブロックの各サブブロックを意味する。
The
Specifically, when AREA_DET = 0, ARAn (n = 0, 1, 2, 3) = 1, and when AREA_DET = 1, ARAn (n = 0, 1, 2, 3) = 0 and AREA_DET. When = 2, AREAn (n = 0, 1, 2, 3) = 1. The
次に、図5を参照して、ブロック分割用データ生成部143について説明する。図5は、本実施形態に係るブロック分割用データ生成部143を示すブロック図である。
ブロック分割用データ生成部143は、図5に示すように、例えば、アドレスカウンタ161、変化点保持部162、ラッチパルス出力部163、区間幅計算部164、最大値最小値検出部165、差分算出部166、最小値ラッチ部167、セレクタ168、領域2値化値保持部169、量子化語長決定部170、シフト量計算部171、シフト量ラッチ部172、セレクタ173、変化点保持部174及びアドレスカウンタ175からなる。
ブロック分割用データ生成部143は、サブブロック単位での量子化に必要な要素を生成する。ブロック分割用データ生成部143は、サブブロック生成部の一例である。
Next, the block division
As illustrated in FIG. 5, the block division
The block division
アドレスカウンタ161及びアドレスカウンタ175は、いずれも1つのブロック分の画素数を数え上げる。
アドレスカウンタ161は、ブロック分割判断終了信号を受けて、アドレスカウントスタート信号とする。アドレスカウンタ161の出力(CNT2)は、ラッチパルス出力部163の出力(latch2)を介して、最大値最小値検出部165、サブブロック毎の最小値を決定する最小値ラッチ部167、シフト量を決定するシフト量ラッチ部172を制御する。
Both the
The
アドレスカウンタ175は、アドレスカウンタ161が20画素分のカウントを終了すると起動される。アドレスカウンタ175は、CONT信号を出力する。CONT信号は、タイプ(type00,01,10,11)に応じた分割数と、座標レジスタ(POS0’,1’,2’)に基づいてセレクタ173を切り替える制御をする。この制御によって、サブブロック毎に画素データの量子化が行われる。
The
変化点保持部162及び変化点保持部174は、サブブロックの数に応じて、最大3つの座標を保持する。変化点保持部162は、変化点のカウンタ値(座標レジスタPOSn(n=0,1,2)=0〜19)を保持する。変化点保持部174は、変化点のカウンタ値(座標レジスタPOSn(n=0’,1’,2’)=0〜19)を保持する。座標レジスタPOS0’〜POS2’は、座標レジスタPOS0〜POS2のコピーであり、量子化終了後にパッキング部138で圧縮データとしてパックされるときに使用されるときまで保持される。
The change point holding unit 162 and the change point holding unit 174 hold a maximum of three coordinates according to the number of sub-blocks. The change point holding unit 162 holds a change point counter value (coordinate register POSn (n = 0, 1, 2) = 0 to 19). The change point holding unit 174 holds a change point counter value (coordinate registers POSn (n = 0 ′, 1 ′, 2 ′) = 0 to 19). The coordinate registers POS0 'to POS2' are copies of the coordinate registers POS0 to POS2, and are held until they are used when packed as compressed data by the
ラッチパルス出力部163は、アドレスカウンタ161からのカウンタ値と変化点保持部162からの座標レジスタに基づいて、サブブロック単位でラッチパルス(latch2)を出力する。
The latch
区間幅計算部164は、タイプ(type00,01,10,00)によって、サブブロック分割数を検知する。区間幅計算部164は、座標の差分から区間幅を計算する。区間幅計算部164は、例えば、以下のとおり計算して、区間幅W0,W1,W2,W3を出力する。
type00の場合、区間幅W0=19である。区間幅W1,W2,W3は使用しない。
type01の場合、区間幅W0=POS0−0、W1=19−POS0である。区間幅W2,W3は使用しない。
type10の場合、区間幅W0=POS0−0、W1=POS1−POS0、W2=19−POS1である。区間幅W3は使用しない。
type11の場合、区間幅W0=POS0−0、W1=POS1−POS0、W2=POS2−POS1、W3=19−POS2である。
The section
In the case of
In the case of type01, the section widths W0 = POS0-0 and W1 = 19-POS0. The section widths W2 and W3 are not used.
In the case of
In the case of type 11, the section width W0 = POS0-0, W1 = POS1-POS0, W2 = POS2-POS1, and W3 = 19-POS2.
最大値最小値検出部165は、サブブロック単位で、サブブロック内での画素データの最大値及び最小値を検出する。最大値最小値検出部165は、検出した最大値及び最小値を差分算出部166及び最小値ラッチ部167に出力する。
The maximum value / minimum
差分算出部166は、最大値最小値検出部165で検出されたサブブロック内の最大値及び最小値の差分を計算して、サブブロック単位でのダイナミックレンジ(DR1)を算出する。
The
最小値ラッチ部167は、サブブロック単位にレジスタMINn(n=0,1,2,3)に最小値を順次保持する。
セレクタ168は、最小値ラッチ部167のレジスタMINn(n=0,1,2,3)から、サブブロック毎の最小値を順次読み出して、出力する。
領域2値化値保持部169は、領域2値化部159から出力されたAREAn(n=0,1,2,3)=0又は1を保持する。
The minimum value latch unit 167 sequentially holds the minimum value in the register MINn (n = 0, 1, 2, 3) in units of sub blocks.
The
The area binarized
量子化語長決定部170は、サブブロック単位の量子化語長を決定する。量子化語長決定部170は、サブブロック毎に量子化語長(Qn(n=0,1,2,3)=2〜5)を出力する。ここで、決定される量子化語長は、2〜5である。
The quantization word
本実施形態のアルゴリズムとしては、サブブロックが、1つのブロックの入力波形のうち最大値及び最小値というレベル両端への遷移領域に該当し、サブブロックの区間幅が狭いとき、画素データの変化が激しい区間と判断する。そして、画素データの変化が激しい区間と判断されたサブブロックについては、優先的により多くの量子化語長を割り当てるとする。 According to the algorithm of the present embodiment, when a sub-block corresponds to a transition region to both ends of the maximum value and minimum value of the input waveform of one block and the section width of the sub-block is narrow, pixel data changes. Judged as a severe section. Then, it is assumed that a larger quantization word length is preferentially assigned to a sub-block that is determined to be a section in which the pixel data changes drastically.
量子化語長決定部170は、区間幅Wn(n=0,1,2,3)の値、AREAn(n=0,1,2,3)=0又は1、type(=00,01,10,11)を用いて、量子化語長を割り当てる順位を検出する。
The quantized word
1ブロックに割り当てられた語長(本実施形態では128ビット)のうち量子化データに使用できるビット数は、図10に示すデータ構造を有する圧縮データでは、タイプ毎にそれぞれ異なり、以下のとおりである。
type00:100ビット
type01:93ビット
type10:74ビット
type11:55ビット
Of the word length assigned to one block (128 bits in this embodiment), the number of bits that can be used for quantized data differs for each type of compressed data having the data structure shown in FIG. is there.
type00: 100 bits type01: 93 bits type10: 74 bits type11: 55 bits
これらの量子化データに使用できるビット数に基づいて、1つのブロック内の各画素に割り当てられる量子化語長の組み合わせは、例えば、以下のとおりに決定しておくことができる。
type00:20画素全て5ビット(計100ビット)
type01:最大13画素まで5ビット、残りの画素は4ビット(計93ビット)
type10:最大14画素まで4ビット、残りの画素は3ビット(計74ビット)
type11:最大15画素まで3ビット、残りの画素は2ビット(計55ビット)
Based on the number of bits that can be used for these quantized data, a combination of quantized word lengths assigned to each pixel in one block can be determined as follows, for example.
type00: All 20 pixels are 5 bits (total of 100 bits)
type01: 5 bits up to 13 pixels, 4 bits for the remaining pixels (total 93 bits)
type10: 4 bits up to 14 pixels, 3 bits for the remaining pixels (74 bits in total)
type11: 3 bits up to 15 pixels, 2 bits for the remaining pixels (total 55 bits)
更に、type01,10,11のように割りあてられる量子化語長が画素によって異なる場合、量子化語長の大きいものを割り当てるルールとしては、以下のとおりに決定しておくことができる。
1)AREAn=0(波形の遷移領域)に該当するサブブロックであって、区間幅Wが短いサブブロックの順に、上記の制限数以内で、各画素に量子化語長の大きいほうを割り当てる。
2)次に、依然として量子化語長の大きいほうを割り当てられる余裕がある場合は、AREAn=1に該当するサブブロックであって、区間幅Wが短いサブブロックの順に、上記の制限数以内で、各画素に量子化語長の大きいほうを割り当てる。
3)大きいほうの量子化語長が割り当てられなくなった時点で、残りのサブブロックは全て小さいほうの量子化語長が割り当てられる。
Furthermore, when the quantized word length assigned as in
1) Sub-blocks corresponding to AREAn = 0 (waveform transition region) and having a shorter section width W are assigned to the pixels having the larger quantization word length within the above-mentioned limit number.
2) Next, if there is still room to allocate the larger quantized word length, sub-blocks corresponding to ARAn = 1 and sub-blocks having a shorter section width W are within the above limit number. , The larger quantization word length is assigned to each pixel.
3) When the larger quantization word length is no longer assigned, the remaining sub-blocks are all assigned the smaller quantization word length.
次に、図8を参照して、量子化語長の割り当てについて一例を説明する。図8は、画素データの入力波形を示す説明図である。ここでは、圧縮対象のブロックが、type10であって、サブブロック数を3にするように分割する場合について説明する。
Next, an example of quantization word length assignment will be described with reference to FIG. FIG. 8 is an explanatory diagram showing an input waveform of pixel data. Here, a case will be described in which the block to be compressed is
type10であるため、上述したルールとしては、大きいほうの量子化語長は4ビットであり、最大14画素まで割り当てることができる。残りの画素は全て3ビットが割り当てられる。 Since it is type10, according to the rule described above, the larger quantization word length is 4 bits, and a maximum of 14 pixels can be allocated. All the remaining pixels are assigned 3 bits.
図8に示す入力波形によれば、対象とするブロック内の各サブブロックの区間幅Wと領域AREAは、次のとおりである。
W0=7 AREA0=1
W1=3 AREA1=0
W2=10 AREA2=1
According to the input waveform shown in FIG. 8, the section width W and the area AREA of each sub-block in the target block are as follows.
W0 = 7 AREA0 = 1
W1 = 3 AREA1 = 0
W2 = 10 AREA2 = 1
このとき、区間幅の大小関係は、W1<W0<W2となる。従って、上述したルールでは、W1,W0,W2の順に大きいほうの量子化語長を割り当てるようにしていく。まず、W1の区間へQ0=4ビットを割り当てる。次に、W0の区間へ量子化語長を割り当てる。最大14画素まで4ビットを割り当てられ、W0+W1<14であるため、W0の区間へQ1=4ビットを割り当てる。次に、W2の区間へ量子化語長を割り当てる。W2=10であるが、既に量子語長4ビットを10画素分割り当てているため、W2の区間へ4ビットを割り当てることはできない。そのため、W2の区間へQ2=3ビットを割り当てる。区間幅W3は、type10によれば、サブブロック分割数は3つなので該当なしとなり、Q3は計算しない。
At this time, the size relationship of the section width is W1 <W0 <W2. Therefore, in the above-described rule, the larger quantization word length is assigned in the order of W1, W0, and W2. First, Q0 = 4 bits are assigned to the section of W1. Next, a quantization word length is assigned to the interval of W0. Since 4 bits are allocated to a maximum of 14 pixels and W0 + W1 <14, Q1 = 4 bits are allocated to the section of W0. Next, a quantization word length is assigned to the section of W2. Although W2 = 10, since the quantum word length of 4 bits is already allocated for 10 pixels, 4 bits cannot be allocated to the section of W2. Therefore, Q2 = 3 bits are allocated to the section of W2. According to
なお、この量子化語長の割当手順は、伸張処理側でも同様のルールで行われて、逆量子化処理がされる。また、本発明は割り当てる量子化語長の大きさや種類は上述した例に限定されない。このとき、タイプに応じて量子化データに使用できるビット数は限定されるが、圧縮処理側と伸張処理側で同じルールであればよい。 Note that this quantization word length assignment procedure is also performed on the decompression processing side according to the same rule, and the inverse quantization processing is performed. In the present invention, the size and type of the quantization word length to be assigned are not limited to the above-described examples. At this time, the number of bits that can be used for the quantized data is limited depending on the type, but the same rule may be used on the compression processing side and the expansion processing side.
シフト量計算部171は、サブブロック単位のダイナミックレンジ(DR1)と量子化語長(Qn(n=0,1,2,3)=2〜5)に基づいて、減算部135の出力を右に何ビットシフトするかを計算する。シフト量計算部171は、計算結果をシフト量ラッチ部172のレジスタSFTn(n=0,1,2,3)に出力する。
The shift
シフト量ラッチ部172は、シフト量計算部171から出力されたシフト量をレジスタSFTn(n=0,1,2,3)に順次記録する。セレクタ173は、シフト量ラッチ部172のレジスタSFTn(n=0,1,2,3)から、サブブロック毎のシフト量を順次読み出して、出力する。
The shift amount latch unit 172 sequentially records the shift amount output from the shift
ここで、シフト量計算は、圧縮する領域(サブブロック)のダイナミックレンジ(DR1)と、出力したい量子化語長に基づいて、量子化部136で行われる右シフトの量を計算する。
例えば、10ビットを5ビットに量子化する場合、
0≦DR1≦31のとき、入力データ(減算部135からの出力データ)をそのまま出力する。
32≦DR1≦63のとき、入力データを1ビット分右へシフトする。
64≦DR1≦127のとき、入力データを2ビット分右へシフトする。
128≦DR1≦255のとき、入力データを3ビット分右へシフトする。
256≦DR1≦511のとき、入力データを4ビット分右へシフトする。
512≦DR1≦1023のとき、入力データを5ビット分右へシフトする。
Here, the shift amount calculation calculates the amount of right shift performed by the
For example, when 10 bits are quantized to 5 bits,
When 0 ≦ DR1 ≦ 31, the input data (output data from the subtraction unit 135) is output as it is.
When 32 ≦ DR1 ≦ 63, the input data is shifted to the right by one bit.
When 64 ≦ DR1 ≦ 127, the input data is shifted to the right by 2 bits.
When 128 ≦ DR1 ≦ 255, the input data is shifted right by 3 bits.
When 256 ≦ DR1 ≦ 511, the input data is shifted right by 4 bits.
When 512 ≦ DR1 ≦ 1023, the input data is shifted right by 5 bits.
また、10ビットを4ビットに量子化する場合も、5ビットの例と同様に、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「6ビット右へシフトする」という処理をする。
10ビットを3ビットに量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「7ビット右へシフトする」という処理をする。10ビットを2ビットに量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「8ビット右へシフトする」という処理をする。
Also, when 10 bits are quantized to 4 bits, the process of “output as it is” to “shift to the right of 6 bits” is performed according to the dynamic range (DR1) as in the case of the 5 bits.
When quantizing 10 bits into 3 bits, processing of “output as it is” to “shift to the right of 7 bits” is performed according to the dynamic range (DR1). When quantizing 10 bits into 2 bits, processing of “output as it is” to “shift right by 8 bits” is performed according to the dynamic range (DR1).
次に、図11を参照して本実施形態に係るRAW伸張部122について説明する。図11は、本実施形態に係るRAW伸張部122を示すブロック図である。
図11に示すように、RAW伸張部122は、例えば、圧縮符号ラッチ部181、区間幅計算部182、量子化語長決定部183、アドレスカウンタ184、セレクタ185、符号シフタ186、セレクタ187、セレクタ188、逆量子化部189、加算部191及び逆折れ線伸張部192からなる。
Next, the
As illustrated in FIG. 11, the
圧縮符号ラッチ部181は、SDRAM104から読み出された128ビットの圧縮データを保持する。圧縮符号ラッチ部181は、図10に示す圧縮データのうち、MSB(Most Significant Bit)2ビットからタイプを判別して、各サブブロックのシフト量、最小値を保持する。圧縮符号ラッチ部181は、抽出部の一例である。
The compression
区間幅計算部182は、サブブロック切り替え座標の座標データ(POS0,1,2)を受け、座標データ(POS0,1,2)の差分を計算して、区間幅W0,1,2を算出する。区間幅計算部182は、RAW圧縮部121の区間幅計算部164と同様である。
The section
量子化語長決定部183は、区間幅計算部182で算出された区間幅W0,1,2,3及びタイプに基づいて、サブブロックの量子化語長を割り当て計算し、サブブロック毎の量子化語長(Q0,1,2,3)を決定する。量子化語長決定部183は、RAW圧縮部121の量子化語長決定部170と同様のアルゴリズムでサブブロック毎の量子化語長(Q0,1,2,3)を決定する。
The quantization word
セレクタ185は、量子化語長決定部183で決定された量子化語長を受取、順次符号シフタ186に出力する。
アドレスカウンタ184は、タイプと座標データによって、伸張処理する画素が属するサブブロックの切り替え座標を検出し、セレクタ185、187、188を順次切り替える。
The
The
符号シフタ186は、圧縮符号ラッチ部181で保持されたデータのうち、タイプに応じた量子化データ(100ビット、93ビット、74ビット、55ビット)を受け取る。そして、符号シフタ186は、サブブロック単位の量子化語長(Q0,1,2,3)に基づいて、2〜5ビットの符号をシフト動作によって抽出し、逆量子化部189に出力する。
The
セレクタ187は、圧縮符号ラッチ部181で保持された図10のデータ構造を有する圧縮データのうち、各サブブロックのシフト量を受け取り、順次逆量子化部189に出力する。セレクタ188は、圧縮符号ラッチ部181で保持された圧縮データのうち、図10のデータ構造を有する圧縮データのうち、各サブブロックの最小値を受け取り、順次加算部191に出力する。
The
逆量子化部189は、符号シフタ186からの画素毎の量子化データを、セレクタ187からのシフト量に応じて、逆量子化する。本実施形態では、逆量子化部189は、2〜5ビットの符号を逆量子化して10ビットのデータを出力する。RAW圧縮部121の量子化部136で右シフタとして量子化した場合、逆量子化部189は、以下のような左シフタとしての計算をする。
The
例えば、5ビットを10ビットに逆量子化する場合、
0≦DR1≦31のとき、入力データ(符号シフタ186からの出力データ)をそのまま出力する。
32≦DR1≦63のとき、入力データを1ビット分左へシフトする。
64≦DR1≦127のとき、入力データを2ビット分左へシフトする。
128≦DR1≦255のとき、入力データを3ビット分左へシフトする。
256≦DR1≦511のとき、入力データを4ビット分左へシフトする。
512≦DR1≦1023のとき、入力データを5ビット分左へシフトする。
For example, when dequantizing 5 bits to 10 bits,
When 0 ≦ DR1 ≦ 31, the input data (output data from the code shifter 186) is output as it is.
When 32 ≦ DR1 ≦ 63, the input data is shifted to the left by one bit.
When 64 ≦ DR1 ≦ 127, the input data is shifted to the left by 2 bits.
When 128 ≦ DR1 ≦ 255, the input data is shifted left by 3 bits.
When 256 ≦ DR1 ≦ 511, the input data is shifted to the left by 4 bits.
When 512 ≦ DR1 ≦ 1023, the input data is shifted left by 5 bits.
また、4ビットを10ビットに逆量子化する場合も、5ビットの例と同様に、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「6ビット左へシフトする」という処理をする。
3ビットを10ビットに逆量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「7ビット左へシフトする」という処理をする。2ビットを10ビットに逆量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「8ビット左へシフトする」という処理をする。
Also, in the case of
When dequantizing 3 bits to 10 bits, processing of “output as it is” to “shift left by 7 bits” is performed according to the dynamic range (DR1). When 2 bits are inversely quantized to 10 bits, processing of “output as it is” to “shift left by 8 bits” is performed according to the dynamic range (DR1).
加算部191は、逆量子化部189が出力した符号に、サブブロック毎の共通DCオフセット値となる最小値を加算する。加算部191は、最小値を加算したデータを逆折れ線伸張部192に出力する。
The adder 191 adds the minimum value that is a common DC offset value for each sub-block to the code output from the
逆折れ線伸張部192は、加算部191からのデータを、RAW圧縮部121の折れ線圧縮部131と逆の特性により、10ビットから14ビットのデータに伸張する。
The reverse broken
ここで、図12は、逆折れ線伸張部192で用いられる折れ線の例を示す図である。
この図12の折れ線は、図9で示した折れ線圧縮部131における折れ線と、逆の特性により階調を変換するようになっている。なお、入力データと伸張後の出力データとを対応付けて記憶したROMテーブルを用意し、このROMテーブルに従って入出力データの変換が行われてもよい。なお、圧縮時に、折れ線圧縮部131による圧縮が適用されなかった場合には、伸張時には、この逆折れ線変換部192でのデータ変換もバイパスされる。
Here, FIG. 12 is a diagram illustrating an example of a polygonal line used in the reverse polygonal
The polygonal line in FIG. 12 is adapted to convert the gradation by characteristics opposite to those of the polygonal
次に、図10を参照して、本実施形態で生成される圧縮データのデータ構造について説明する。図10は、パッキング部138により生成される1ブロック分の圧縮データのデータ構造を示す説明図である。
圧縮データは、本実施形態のRAW圧縮部で生成されたものであり、RAWデータの14ビットを折れ線圧縮部10ビットに変換し、更に水平方向の20画素単位でブロック化し、各画素を量子化語長2〜5ビットで符号化したものである。圧縮データは、ブロック毎に128ビットで構成される。
Next, the data structure of the compressed data generated in this embodiment will be described with reference to FIG. FIG. 10 is an explanatory diagram illustrating a data structure of compressed data for one block generated by the
The compressed data is generated by the RAW compression unit of the present embodiment. 14 bits of the RAW data are converted into a 10-bit polygonal line compression unit, further divided into blocks of 20 pixels in the horizontal direction, and each pixel is quantized. It is encoded with a word length of 2 to 5 bits. The compressed data is composed of 128 bits for each block.
図10に示すように、圧縮時にサブブロック毎に分割しないtype00の圧縮データは、識別フラグ(2ビット)、ブロック内の最小値(10ビット)、ブロック内の例えば2のべき乗に変換したダイナミックレンジ(3ビット)、ブロックの量子化データ(100ビット)からなる。
一方、サブブロックに分割するtype01,10,11の圧縮データの場合、識別フラグ(2ビット)、サブブロック毎のサブブロック内の最小値(10ビット)、サブブロック毎のサブブロック内の例えば2のべき乗に変換したダイナミックレンジ(3ビット)、領域を示すAREAn(1ビット)、切り替え座標POSn(5ビット)、ブロックの量子化データ(93ビット,74ビット,55ビット)からなる。
As shown in FIG. 10, compressed data of
On the other hand, in the case of compressed data of
以上の構成のRAW圧縮部121およびRAW伸張部122によれば、量子化による画質劣化が最小限に抑制されるような、より適切なサブブロック分割が選択され、量子化処理が実行される。その結果、高画質な撮像画像を高速処理によって得ることができる。また、圧縮率を向上させることができるため、内部バス118の帯域を有効に使用することができ、連写機能による撮影時の応答速度の高速化を図ることができる。
According to the
以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。 The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention pertains can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that these also belong to the technical scope of the present invention.
100 撮像装置
101 撮像素子
102 AFE回路
103 デジタル画像処理部
104 SDRAM
105 ROM
106 ストレージデバイス
111 カメラ信号前処理部
112 カメラ信号処理部
113 解像度変換部
114 JPEGエンジン
115 CPU
116 ビデオ出力エンコーダ
117 SDRAMコントローラ
121 RAW圧縮部
122 RAW伸張部
DESCRIPTION OF
105 ROM
106
116
Claims (7)
前記ブロック内の画素データのレベル変化に応じて前記ブロックを分割しサブブロックを生成する分割処理部と、
前記生成されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成する量子化部と、
前記ブロック内の画素データのレベル変化に関する情報と前記量子化データを集約し圧縮データを生成する圧縮データ生成部と
を有する、画像情報処理装置。 A blocking unit that divides pixel data output from the image sensor into predetermined numbers and generates blocks;
A division processing unit that divides the block according to a level change of pixel data in the block and generates a sub-block;
A quantization unit that quantizes pixel data with a quantization word length determined according to a change amount of the pixel data level and a length of a section of the sub-block for each generated sub-block, and generates quantized data; ,
An image information processing apparatus, comprising: a compressed data generation unit that aggregates the quantized data and generates compressed data by combining information on a level change of pixel data in the block.
前記ブロック内の画素データレベルの振幅値と変化量に基づいて前記ブロックを分割する数及び分割位置を決定する分割決定部と、
前記決定された分割数及び分割位置に応じて、前記ブロックを分割しサブブロックを生成するサブブロック生成部と
を有する、請求項1に記載の画像情報処理装置。 The division processing unit
A division determination unit that determines the number and division position of the block based on the amplitude value and change amount of the pixel data level in the block;
The image information processing apparatus according to claim 1, further comprising: a sub-block generation unit configured to divide the block and generate a sub-block according to the determined division number and division position.
前記レベル変化に関する情報に基づいて、前記量子化データを逆量子化し逆量子化画素データを生成する逆量子化部と
を有する、画像情報処理装置。 From the compressed data, information on the level change of the pixel data in the block consisting of a predetermined number of pixel data, the amount of change in the pixel data level and the length of the section of the sub block for each sub block into which the block is divided An extraction unit for extracting quantized data obtained by quantizing the pixel data with a quantized word length determined according to the method;
An image information processing apparatus comprising: an inverse quantization unit that inversely quantizes the quantized data and generates inversely quantized pixel data based on information on the level change.
前記ブロック内の画素データのレベル変化に応じて前記ブロックを分割しサブブロックを生成するステップと、
前記生成されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成するステップと、
前記ブロック内の画素データのレベル変化に関する情報と前記量子化データを集約し圧縮データを生成するステップと
を有する、画像情報処理方法。 Dividing the pixel data output from the image sensor every predetermined number to generate a block;
Dividing the block according to a level change of pixel data in the block to generate a sub-block;
Quantizing pixel data with a quantization word length determined according to a change amount of the pixel data level and a length of a section of the sub-block for each generated sub-block, and generating quantized data;
An image information processing method comprising: information on a level change of pixel data in the block; and a step of collecting the quantized data and generating compressed data.
前記レベル変化に関する情報に基づいて、前記量子化データを逆量子化し逆量子化画素データを生成するステップと
を有する、画像情報処理方法。
From the compressed data, information on the level change of the pixel data in the block consisting of a predetermined number of pixel data, the amount of change in the pixel data level and the length of the section of the sub block for each sub block into which the block is divided Extracting the quantized data obtained by quantizing the pixel data with the quantized word length determined accordingly;
An image information processing method comprising: dequantizing the quantized data and generating dequantized pixel data based on the information on the level change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008140993A JP2009290556A (en) | 2008-05-29 | 2008-05-29 | Image information processing apparatus and image information processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008140993A JP2009290556A (en) | 2008-05-29 | 2008-05-29 | Image information processing apparatus and image information processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009290556A true JP2009290556A (en) | 2009-12-10 |
Family
ID=41459324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008140993A Withdrawn JP2009290556A (en) | 2008-05-29 | 2008-05-29 | Image information processing apparatus and image information processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009290556A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014103543A (en) * | 2012-11-20 | 2014-06-05 | Sony Corp | Image sensor, and imaging device and method |
JP2017135760A (en) * | 2017-05-12 | 2017-08-03 | ソニー株式会社 | Imaging device and method |
-
2008
- 2008-05-29 JP JP2008140993A patent/JP2009290556A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014103543A (en) * | 2012-11-20 | 2014-06-05 | Sony Corp | Image sensor, and imaging device and method |
US9426376B2 (en) | 2012-11-20 | 2016-08-23 | Sony Corporation | Image pickup element, imaging device, and imaging method |
US9794488B2 (en) | 2012-11-20 | 2017-10-17 | Sony Corporation | Image pickup element, imaging device, and imaging method |
US10033935B2 (en) | 2012-11-20 | 2018-07-24 | Sony Corporation | Image pickup element, imaging device, and imaging method |
JP2017135760A (en) * | 2017-05-12 | 2017-08-03 | ソニー株式会社 | Imaging device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4337911B2 (en) | Imaging device, imaging circuit, and imaging method | |
JP4508132B2 (en) | Imaging device, imaging circuit, and imaging method | |
KR101241662B1 (en) | Image data processing device, image data processing method, and recording medium | |
US8538174B2 (en) | Image processing device | |
JP5529685B2 (en) | Image encoding method, image decoding method, image encoding device, and image decoding device | |
US9106250B2 (en) | Image coding method and decoding method, image coding apparatus and decoding apparatus, camera, and imaging device | |
KR20070027605A (en) | Image compression device, image compression method, and image compression program | |
US11336896B2 (en) | Image encoding apparatus and image decoding apparatus, methods of controlling the same, and non-transitory computer-readable storage medium | |
JP6512916B2 (en) | Image pickup apparatus, control method thereof and program | |
JP2008113070A (en) | Imaging device and imaging method | |
JP4196039B2 (en) | Image data compression method | |
US10497093B2 (en) | Image processing apparatus for minimizing deterioration of image quality of a raw image | |
KR20180041441A (en) | Apparatus for writing information on defect pixels, apparatus for correcting defect pixels, and method thereof | |
JP2008501261A (en) | Image compression method for high speed and high quality image processing | |
US8462377B2 (en) | Method, apparatus, and system for reduction of line processing memory size used in image processing | |
JP2009290556A (en) | Image information processing apparatus and image information processing method | |
KR102199470B1 (en) | Image-data compressing circuit, image-data compressing method, and photographing apparatus | |
JP2010074597A (en) | Image processing device, image processing method, program and imaging device | |
US10516896B2 (en) | Encoding device, encoding method, and storage medium | |
JP2021078008A (en) | Image processing apparatus, image processing method and imaging apparatus | |
JP2006197181A (en) | Signal processing apparatus and signal processing method for solid-state imaging device and image processing apparatus | |
JPH11298762A (en) | Dark current noise removing device | |
JP2007228514A (en) | Imaging apparatus and method | |
JP2010183401A (en) | Image encoding device and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110802 |