JP4594425B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4594425B2
JP4594425B2 JP2009009068A JP2009009068A JP4594425B2 JP 4594425 B2 JP4594425 B2 JP 4594425B2 JP 2009009068 A JP2009009068 A JP 2009009068A JP 2009009068 A JP2009009068 A JP 2009009068A JP 4594425 B2 JP4594425 B2 JP 4594425B2
Authority
JP
Japan
Prior art keywords
data
code data
code
memory
amount
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.)
Expired - Fee Related
Application number
JP2009009068A
Other languages
Japanese (ja)
Other versions
JP2009135948A (en
Inventor
幸男 門脇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009009068A priority Critical patent/JP4594425B2/en
Publication of JP2009135948A publication Critical patent/JP2009135948A/en
Application granted granted Critical
Publication of JP4594425B2 publication Critical patent/JP4594425B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、画像データを周波数変換して符号化する画像処理装置、例えば、JPEG2000に準拠した画像処理装置に関する。   The present invention relates to an image processing apparatus that performs frequency conversion and encoding of image data, for example, an image processing apparatus that complies with JPEG2000.

高精細画像を取り扱うのに適した圧縮符号化方法としてJEPG2000が知られている(例えば、非特許文献1参照)   JEPG2000 is known as a compression encoding method suitable for handling high-definition images (see, for example, Non-Patent Document 1).

上記JPEG2000形式の画像処理においては、2次元離散ウェーブレット変換を行うことにより得られるウェーブレット係数をビットプレーンに分割し、サブバンド単位で下位ビットのデータを破棄することにより、当該ウェーブレット係数をエントロピー符号化して得られる符号データの量を調節することができる。   In the image processing of the JPEG2000 format, the wavelet coefficients obtained by performing the two-dimensional discrete wavelet transform are divided into bit planes, and the lower bit data is discarded in subband units, thereby entropy encoding the wavelet coefficients. The amount of code data obtained in this way can be adjusted.

しかし、ウェーブレット係数をエントロピー符号化した場合に得られる符号量は一定でないため、最終的に希望する符号データ量が決まっている場合には、ビットプレーン単位でウェーブレット係数の下位ビットプレーンのデータの破棄し、破棄後のデータに対するエントロピー符号化処理により得られる符号データ量の確認するといった作業を、複数回、繰り返す必要がある。エントロピー符号化処理は、演算処理するデータ量が多いため、時間を要するため、上記手法による符号量の調整には長時間を要することになる。   However, since the amount of code obtained when entropy encoding the wavelet coefficients is not constant, if the final desired code data amount is determined, the data of the lower bit planes of the wavelet coefficients is discarded in bit plane units. Then, it is necessary to repeat the work of confirming the amount of code data obtained by the entropy encoding process for the discarded data a plurality of times. The entropy encoding process requires a long time because the amount of data to be processed is large, and thus it takes a long time to adjust the code amount by the above method.

本発明は、より迅速に所望の量の符号データを生成できる画像処理装置を提供することを目的とする。   An object of the present invention is to provide an image processing apparatus that can generate a desired amount of code data more quickly.

本発明の第1の画像処理装置は、
画像データを2次元離散ウェーブレット変換して得られるウェーブレット係数をビットプレーンに分割し、ビットプレーン単位でエントロピー符号化処理を実行して上記画像データの符号データを生成する符号化手段を備える画像処理装置において、
エントロピー符号化処理により、コードブロックの符号データのスタートアドレス、バイト数、及び、有効ビット長、並びに、各コードブロックのビットプレーン毎にコーディングパス単位の符号データ量を格納するパケットデータポインタ領域を有する第1メモリと、
前記画像データの符号データを記憶する第2メモリと、
目標とする符号データの量を設定する設定手段と、及び、
データ量調節手段と
を備え、
前記第1メモリのパケットデータポインタ領域は、レイヤポインタデータ領域とコーディングパス領域とを含んで区切られ、エントロピー符号化処理時に第2メモリに符号データが格納されるのと同時に、前記第2メモリに格納される符号データのスタートアドレス、バイト数、及び、有効ビット長がそれぞれ、前記レイヤポインタデータ領域に格納され、かつ前記コーディングパス領域に前記コーディングパス単位の符号データ量が格納され、
前記データ量調節手段は、前記第1メモリの前記レイヤポインタデータ領域内に記憶してあるスタートアドレス、バイト数、及び、有効ビット長から求められるコードブロック毎のエンドアドレスに基づいて、下位のビットプレーンの符号データより順に上記第2メモリに記憶してある符号データから削除し、同時に前記第1メモリの前記コーディングパス領域に記憶してある前記コーディングパス単位の符号データ量を用いて、
符号データの量を上記設定手段により設定された目標とする符号データの量とみなせる許容範囲内の値にする
ことを特徴とする。
The first image processing apparatus of the present invention includes:
An image processing apparatus comprising an encoding unit that divides a wavelet coefficient obtained by performing two-dimensional discrete wavelet transformation on image data into bit planes, executes entropy encoding processing in units of bit planes, and generates code data of the image data In
The entropy encoding process has a packet data pointer area for storing the start address , the number of bytes, and the effective bit length of the code data of the code block , and the amount of code data for each coding block for each bit plane of the code block. A first memory;
A second memory for storing code data of the image data;
Setting means for setting a target amount of code data; and
Data amount adjusting means,
The packet data pointer area of the first memory is delimited including a layer pointer data area and a coding pass area, and at the same time the code data is stored in the second memory during the entropy encoding process, The start address , the number of bytes, and the effective bit length of the stored code data are each stored in the layer pointer data area, and the amount of code data in the coding pass unit is stored in the coding pass area,
The data amount adjusting means includes a lower bit based on a start address , a number of bytes, and an end address for each code block obtained from the effective bit length stored in the layer pointer data area of the first memory. From the code data stored in the second memory in order from the code data of the plane, at the same time using the code data amount of the coding pass unit stored in the coding pass area of the first memory,
The amount of code data is set to a value within an allowable range that can be regarded as a target amount of code data set by the setting means.

本発明の画像処理装置及び画像処理方法によれば、データ量調節前の符号データが第1メモリに記憶されているため、これから、符号データのデータ量が目標値になる様に、第1メモリに記憶しているビットプレーン毎の符号データ量に基づいて、符号データを削除するだけで、ウェーブレット係数のビットプレーンの下位ビットデータを破棄し、再び符号化処理を実行する場合に比べ、符号化処理が1回で済み、目標量の符号データを迅速に得ることができる。   According to the image processing apparatus and the image processing method of the present invention, since the code data before the data amount adjustment is stored in the first memory, the first memory is set so that the data amount of the code data becomes the target value. Compared to the case where the lower bit data of the wavelet coefficient bit plane is discarded and the encoding process is executed again simply by deleting the code data based on the amount of code data stored for each bit plane. Only one process is required, and a target amount of code data can be obtained quickly.

本発明の画像処理装置の構成を示す図である。It is a figure which shows the structure of the image processing apparatus of this invention. ビデオカメラによるインターレース画像の取り込みについて説明するための図である。It is a figure for demonstrating taking in of the interlaced image by a video camera. (a)〜(c)は、2枚のインターレース画像から生成される1枚のノンインターレース画像を説明するための図である。(A)-(c) is a figure for demonstrating one non-interlaced image produced | generated from two interlaced images. (a)は第1メモリのマップを示し、(b)は第2メモリのマップを示す。(A) shows a map of the first memory, and (b) shows a map of the second memory. 符号化処理のフローチャートである。It is a flowchart of an encoding process. ウェーブレット係数をコードブロックに分割した状態を示す図である。It is a figure which shows the state which divided | segmented the wavelet coefficient into the code block. 第1メモリ内にコードブロック単位で生成されるパケットデータポインタのデータ構造を示す図である。It is a figure which shows the data structure of the packet data pointer produced | generated by the code block unit in the 1st memory. コードブロックのデータをビットプレーンに展開して行う係数モデリング処理の説明を行うための図である。It is a figure for demonstrating the coefficient modeling process performed by expand | deploying the data of a code block on a bit plane. 符号データ量調節処理のフローチャートである。It is a flowchart of a code data amount adjustment process. 圧縮率設定画面を示す図である。It is a figure which shows a compression rate setting screen. JPEG2000に準拠するパケットデータ構造の一例を示す図である。It is a figure which shows an example of the packet data structure based on JPEG2000.

(1)実施の形態
本発明の画像処理装置は、例えば、JPEG2000の規格に準拠した符号化処理装置であって、2枚のインターレース画像を合成して生成したノンインターレース画像を処理対象とし、当該ノンインターレース画像の画像データを周波数変換するために2次元離散ウェーブレット変換して得られるウェーブレット係数に対して行うエントロピー符号化処理(係数モデリング処理及び算術符号化処理で成る。)において、生成される符号データの他に、コードブロック単位でコーディングパス毎の符号データ量を記憶しておくものである。その後、画像データの出力時、設定された圧縮率より特定される全符号データ量を超えないように、各コードブロックの下位のビットプレーンのコーディングパスの符号データから順に削除する。当該処理により所望のデータ量(許容範囲内にあるものを含む)に調整された符号データをJPEG2000の標準のパケットデータに並び替えて外部の装置に出力する。このように、本発明の画像処理装置では、エントロピー符号化処理は1回で済み、処理の迅速化を図ることができる。
(1) Embodiments The image processing apparatus of the present invention is, for example, an encoding processing apparatus compliant with the JPEG2000 standard, and a non-interlaced image generated by synthesizing two interlaced images is a processing target. Codes generated in entropy coding processing (consisting of coefficient modeling processing and arithmetic coding processing) performed on wavelet coefficients obtained by two-dimensional discrete wavelet transform for frequency conversion of image data of non-interlaced images In addition to data, the amount of code data for each coding pass is stored in units of code blocks. Thereafter, when outputting the image data, the code data in the coding pass of the lower bit plane of each code block is deleted in order so as not to exceed the total code data amount specified by the set compression rate. The code data adjusted to a desired data amount (including data within an allowable range) by the processing is rearranged into JPEG2000 standard packet data and output to an external device. As described above, in the image processing apparatus of the present invention, the entropy encoding process is only required once, and the process can be speeded up.

図1は、実施の形態に係る画像処理装置10の全体構成図である。画像処理装置10は、中央演算処理装置(CPU)1を中心に、画像処理プログラムが格納されているROM2、上記画像処理プログラムの実行時に使用される第1メモリ3及び第2メモリ4、マン・マシン・インターフェースであるキーボード5及びマウス6、ディスプレイ7、主記録装置であり、ビデオカメラ8で撮影した映像の処理後の符号データを記録するハードディスク(HD)9、並びに、ビデオカメラ8で構成される。   FIG. 1 is an overall configuration diagram of an image processing apparatus 10 according to an embodiment. The image processing apparatus 10 includes a central processing unit (CPU) 1 as a center, a ROM 2 that stores an image processing program, a first memory 3 and a second memory 4 that are used when the image processing program is executed, A keyboard 5 and mouse 6, which are machine interfaces, a display 7, a main recording device, which is composed of a hard disk (HD) 9 for recording code data after processing of images taken by the video camera 8, and a video camera 8. The

図2は、ビデオカメラ8により撮影される一連のフィールド0〜nのインターレース画像を示す図である。ビデオカメラ8は、撮影の開始時間tと共にフィールド0の画像のインターレース形式によるスキャンを行い、1/60秒後にフィールド1の画像のインターレース形式によるスキャンを行う。そして終了時間tまでの間に1/60秒単位で合計n枚のフィールドの画像をインターレース形式でスキャンする。 FIG. 2 is a diagram showing a series of interlaced images of fields 0 to n photographed by the video camera 8. The video camera 8 scans the field 0 image in the interlace format together with the shooting start time t 0 , and scans the field 1 image in the interlace format 1/60 seconds later. Then, a total of n field images are scanned in interlace format in units of 1/60 seconds until the end time t n .

図3の(a)〜(c)は、ビデオカメラ8により連続して読み取られる2枚のフィールド0,1のインターレース画像A,Bから生成される1枚のフレームのノンインターレース画像を示す図である。図3の(a)に示すように、インターレース形式では、1画素のライン(実線で示す走査ライン)をスキャンした後、直ぐ下の画素のライン(点線で示す走査ライン)を飛ばして2画素下のライン(実線で示す走査ライン)をスキャンする。フィールド0のインターレース画像Aのスキャン終了後、ビデオカメラ8は、直ちに、図3の(b)に示すように、前回スキャンしなかった画素ライン(図3の(b)において実線で示す走査ライン)のスキャンを行う。これによりフィールド1のインターレース画像Bが撮影される。この撮影時、あるラインをスキャンしてから直ぐ下の画素のラインをスキャンするのに1/60秒経過している。図3の(a)と(b)を比較すれば解るように、上記1/60秒の間に被写体15は右方向(当然左方向の場合もある)に移動している。このため、図3の(c)に示すように、インターレース画像Aにインターレース画像Bを重ね合わせて成る1枚のフレームのノンインターレース画像の両端部分には、数画素分のくし型のずれが生じる。   FIGS. 3A to 3C are diagrams showing non-interlaced images of one frame generated from the interlaced images A and B of the two fields 0 and 1 that are continuously read by the video camera 8. is there. As shown in FIG. 3A, in the interlaced format, after scanning a line of one pixel (scan line indicated by a solid line), the line of the pixel immediately below (scan line indicated by a dotted line) is skipped and two pixels below. Are scanned (scan lines indicated by solid lines). Immediately after the scanning of the interlaced image A in the field 0, the video camera 8, as shown in FIG. 3B, immediately before the pixel line that was not scanned (scan line indicated by a solid line in FIG. 3B). Scan. Thereby, the interlaced image B of the field 1 is taken. At the time of this photographing, 1/60 seconds have elapsed since the scanning of the line of the pixel immediately below after scanning a certain line. As can be seen by comparing (a) and (b) in FIG. 3, the subject 15 has moved in the right direction (of course, in some cases leftward) during the 1/60 second. For this reason, as shown in FIG. 3 (c), comb-shaped shifts of several pixels occur at both ends of the non-interlaced image of one frame formed by superimposing the interlaced image B on the interlaced image A. .

なお、上記ノンインターレース画像のデータは、メモリ内にインターレース画像A及びインターレース画像Bの画像データをスキャンしたライン毎(上記の例では1画素単位の走査ライン毎)に、交互に並べる(スキャンしていないラインのデータを補充する)ことで形成する。   Note that the non-interlaced image data is alternately arranged (scanned) in the memory for each line scanned with the image data of the interlaced image A and the interlaced image B (in the above example, for each scanning line of one pixel unit). To fill in the data of no line).

図4の(a)は、第1メモリ3のメモリマップを示し、図4の(b)は、第2メモリ4のメモリマップを示す。第1画像フレームバッファ3aには、連続して読み込まれる2枚のインターレース画像から生成されるノンインターレース画像の画像データが格納される。第2画像フレームバッファ3bには、上記第1画像フレームバッファ3aに格納したノンインターレース画像の符号化処理の実行中にビデオカメラ8により引き続き取り込まれる2枚のインターレース画像の画像データの書き込みが行われる。ビデオカメラ8による撮影中、第1画像フレームバッファ3aおよび第2画像フレームバッファ3bには、インターレース画像の画像データが2枚単位(図3に示したインターレース画像A,B)で交互に書き込まれる。   4A shows a memory map of the first memory 3, and FIG. 4B shows a memory map of the second memory 4. The first image frame buffer 3a stores image data of non-interlaced images generated from two interlaced images that are read continuously. In the second image frame buffer 3b, image data of two interlaced images that are continuously captured by the video camera 8 during execution of the encoding process of the non-interlaced image stored in the first image frame buffer 3a is written. . During shooting by the video camera 8, interlaced image data is alternately written in units of two images (interlaced images A and B shown in FIG. 3) in the first image frame buffer 3a and the second image frame buffer 3b.

CPU1は、第1画像フレームバッファ3aに書き込まれた画像データに対してJPEG2000に準拠した符号化処理を施し、この符号化処理の際、以下に説明するように、第2メモリ4内のウェーブレット係数フレームバッファ4aにウェーブレット係数のデータを格納すると共に、符号データバッファ4cに符号データを書き込み、更に、第1メモリ3の第1パケットデータポインタ3cにウェーブレット係数を所定のコードブロックに分割して各コードブロック毎に得られるコーディングパス毎の符号データ量についての情報を書き込む。   The CPU 1 performs an encoding process based on JPEG2000 on the image data written in the first image frame buffer 3a, and in this encoding process, the wavelet coefficients in the second memory 4 are described as described below. The wavelet coefficient data is stored in the frame buffer 4a, the code data is written in the code data buffer 4c, and the wavelet coefficients are further divided into predetermined code blocks in the first packet data pointer 3c of the first memory 3, and each code is written. Information about the amount of code data for each coding pass obtained for each block is written.

第1パケットデータポインタ3は、64×64画素マトリクスのコードブロックを単位として形成されるデータであり、図4の(a)に示すように、レベル3のウェーブレット変換を行った場合、1HH,1LH,1HLについてそれぞれ256個、2HH,2LH,2HLについてそれぞれ64個、3HH,3LH,3HL,3LLについてそれぞれ16個用意される。   The first packet data pointer 3 is data formed in units of 64 × 64 pixel matrix code blocks. As shown in FIG. 4A, when the level 3 wavelet transform is performed, 1HH, 1LH , 1HL, 256, 2HH, 2LH, and 2HL, 64, 3HH, 3LH, 3HL, and 3LL, respectively.

図4の(b)に示すように、第2メモリ4内には、第1画像フレームバッファ3aに格納されたノンインターレース画像の画像データに対してレベル3の2次元離散ウェーブレット変換を行って得られるウェーブレット係数用のフレームバッファ4a、第2画像フレームバッファ3bに格納されたノンインターレース画像の画像データに対してレベル3の2次元離散ウェーブレット変換を行って得られるウェーブレット係数用のフレームバッファ4b、上記フレームバッファ4aに格納するデータに基づいて行った符号化処理から得られる符号データを格納するバッファ4c、及び、上記フレームバッファ4bに格納するデータに基づいて行った符号化処理から得られる符号データを格納するバッファ4dで構成される。   As shown in FIG. 4B, the second memory 4 is obtained by performing level 3 two-dimensional discrete wavelet transform on the image data of the non-interlaced image stored in the first image frame buffer 3a. Wavelet coefficient frame buffer 4a, wavelet coefficient frame buffer 4b obtained by performing level 3 two-dimensional discrete wavelet transform on non-interlaced image data stored in the second image frame buffer 3b, A buffer 4c for storing code data obtained from the coding process performed based on the data stored in the frame buffer 4a, and a code data obtained from the coding process performed based on the data stored in the frame buffer 4b It consists of a buffer 4d for storing.

図5は、CPU1の実行するJPEG2000に準拠した符号化処理のフローチャートである。まず、上述した第1メモリ3の第1画像フレームバッファ3aからノンインターレース画像の画像データを読み出す(ステップS1)。読み出したノンインターレース画像の画像データを、Y,Cr,Cbの色成分データに変換する(ステップS2)。以降の処理部で各成分の色データは同じ手順で並列に処理されるが、説明の簡単化のため、以下、Y成分の色データについてのみ説明する。   FIG. 5 is a flowchart of an encoding process compliant with JPEG2000 executed by the CPU 1. First, image data of a non-interlaced image is read from the first image frame buffer 3a of the first memory 3 described above (step S1). The read non-interlaced image data is converted into Y, Cr, Cb color component data (step S2). In the subsequent processing units, the color data of each component is processed in parallel according to the same procedure, but for the sake of simplicity, only the color data of the Y component will be described below.

Y成分の色データにレベル3の2次元離散ウェーブレット変換を施し、得られるウェーブレット係数を第2メモリ4のウェーブレット係数フレームバッファ4aに書き込む(ステップS3)。当該処理により得られたウェーブレット係数に、JPEG2000に規定のスカラ量子化処理を施し、バッファ4a内のデータを処理後のデータに更新する(ステップS4)。   The Y component color data is subjected to level 3 two-dimensional discrete wavelet transform, and the obtained wavelet coefficients are written in the wavelet coefficient frame buffer 4a of the second memory 4 (step S3). The wavelet coefficient obtained by this processing is subjected to scalar quantization processing prescribed in JPEG2000, and the data in the buffer 4a is updated to the processed data (step S4).

スカラ量子化後のウェーブレット係数を図6に示すように、n個のコードブロックに分割する(ステップS5)。コードブロックの順番は、3LL,3HL,3LH,3HH,2HL,2LH,2HH,3HL,3LH及び3HHの各サブバンド内でラスタ走査順序に従う。コードブロックを表す変数CBの値を1に初期化する(ステップS6)。第1メモリ3の第1パケットデータポインタ3cの所定領域に、図7に示すコードブロックCB用のデータ記憶領域を確保し、当該データ記憶領域内にポイントヘッダデータ領域400、レイヤポインタデータ領域410、CPバイト数のデータ領域450に区切り、ポイントヘッダ情報及びレイヤ毎の初期データを書き込む(ステップS7)。画像処理装置10では、ビットプレーン1枚を1レイヤとする。従って、コードブロック1個当たり16枚のレイヤが存在する。上記ポイントヘッダ情報とは、係数モデリング処理実行前に段階で特定できるトータルコーディングパス数やゼロビットプレーン数の情報のことをいう。   The wavelet coefficients after scalar quantization are divided into n code blocks as shown in FIG. 6 (step S5). The order of the code blocks follows the raster scanning order within each of the 3LL, 3HL, 3LH, 3HH, 2HL, 2LH, 2HH, 3HL, 3LH and 3HH subbands. The value of the variable CB representing the code block is initialized to 1 (step S6). A data storage area for the code block CB shown in FIG. 7 is secured in a predetermined area of the first packet data pointer 3c in the first memory 3, and a point header data area 400, a layer pointer data area 410, Point header information and initial data for each layer are written in the data area 450 of the number of CP bytes (step S7). In the image processing apparatus 10, one bit plane is set as one layer. Therefore, there are 16 layers per code block. The point header information refers to information on the total number of coding passes and the number of zero bit planes that can be specified in stages before the coefficient modeling process is executed.

コードブロックCBのウェーブレット係数にJPEG2000に規定されているエントロピー符号化処理として係数モデリング処理及び算術符号化処理を実行する(ステップS8)。まず、係数モデリング処理として、図8に示すように、64×64画素マトリクスの各16ビットデータで構成されるコードブロックのウェーブレット係数を16枚のビットプレーンに分解し、各ビットプレーン毎にJPEG2000に規定されている(1)クリーンアップ・パス(2)シグニフィカント・プロパゲーション・パス(3)マグニチュード・リファインメント・パスの3通りの3×3画素近傍処理を実行する。次に、算術符号化処理を実行し、第1メモリ3内のデータ領域内のデータを以下に説明するように更新すると共に、符号データを第2メモリ4内のバッファ4cに書き込む。   Coefficient modeling processing and arithmetic coding processing are executed as entropy coding processing defined in JPEG2000 on the wavelet coefficients of the code block CB (step S8). First, as coefficient modeling processing, as shown in FIG. 8, the wavelet coefficients of a code block composed of 16-bit data of a 64 × 64 pixel matrix are decomposed into 16 bit planes, and each bit plane is converted into JPEG2000. Three types of 3 × 3 pixel neighborhood processing are executed: (1) cleanup pass, (2) significant propagation pass, and (3) magnitude refinement pass. Next, arithmetic coding processing is executed, data in the data area in the first memory 3 is updated as described below, and code data is written in the buffer 4 c in the second memory 4.

上記データの更新は、図7に示すように、コードブロックCBについて実行した係数モデリング処理及び算術符号化処理により得られる符号データより、符号データのバイト数を領域412に、符号データの有効ビット長を表すLブロックデータ(8ビット)の領域413に、第2メモリ4のバッファ4cに書き込んだ符号データのアドレスデータ(スタートアドレス)を領域414にそれぞれ書き込んで行う。また、処理したコードブロックCBについて行う3つのパス毎に得られる符号データ量を表すデータをCP0バイト数データ書き込み領域451、CP1バイト数データ書き込み領域452、CP2バイト数データ書き込み領域453にそれぞれ書き込む。なお、領域414に書き込んだ符号データのアドレスデータ(スタートアドレス)と領域412及び413に書き込んだデータより判別される符号データ量からエンドアドレスが解る。このため、以下に説明するように、符号データ量調節処理において、最下位ビットプレーン(レイヤ)の最終のコーディングパスにより得られる符号データ量を順に削除することは、簡単に行うことができる。   As shown in FIG. 7, the update of the data is performed by setting the number of bytes of the code data in the area 412 and the effective bit length of the code data from the code data obtained by the coefficient modeling process and the arithmetic coding process executed for the code block CB. The address data (start address) of the code data written in the buffer 4c of the second memory 4 is written in the area 414 in the area 413 of L block data (8 bits) representing Further, data representing the amount of code data obtained for each of the three passes performed for the processed code block CB is written in the CP0 byte count data write area 451, the CP1 byte count data write area 452, and the CP2 byte count data write area 453, respectively. Note that the end address is determined from the address data (start address) of the code data written in the area 414 and the code data amount determined from the data written in the areas 412 and 413. For this reason, as will be described below, in the code data amount adjustment processing, it is possible to easily delete the code data amount obtained by the last coding pass of the least significant bit plane (layer) in order.

変数CBの値がn以外の場合には(ステップS9でNO)、変数CBに1を加算して(ステップS10)、上記ステップS8に戻る。他方、変数CBの値がnの場合には(ステップS9でYES)、第1メモリ3の第1パケットデータポインタ3c及び第2メモリ4の符号データバッファ4cのデータをハードディスク7に保存する(ステップS11)。   If the value of the variable CB is other than n (NO in step S9), 1 is added to the variable CB (step S10), and the process returns to step S8. On the other hand, when the value of the variable CB is n (YES in step S9), the data of the first packet data pointer 3c of the first memory 3 and the code data buffer 4c of the second memory 4 are stored in the hard disk 7 (step S9). S11).

処理すべき次のフレームのノンインターレース画像のデータがあるかを調べ、ある場合には(ステップS12でNO)、ステップS1に戻り上記処理を繰り返し実行する。なお、ステップS1では、上記ステップS1〜S11の処理実行中に、第1メモリ3の第2画像フレームバッファ3bに格納されたノンインターレース画像のデータを読み出して処理し、ステップS5では、第2メモリ4のウェーブレット係数フレームバッファ4bに書き込まれたウェーブレット係数を処理対象とする。同様に、ステップS7及びS8では、第1メモリ3の第2パケットデータポインタ3d及び第2メモリ4の符号データバッファ4dにデータの書き込みを行う。以後、第1メモリ3の第1画像フレームバッファ3a及び第2画像フレームバッファ3b、第1パケットデータポインタ3c及び第2パケットデータポインタ3d、第2メモリ4のウェーブレット係数フレームバッファ4a及び4b、符号データバッファ4c及び4dをそれぞれ交互に処理対象とする。   It is checked whether there is non-interlaced image data of the next frame to be processed. If there is (NO in step S12), the process returns to step S1 and the above process is repeatedly executed. In step S1, non-interlaced image data stored in the second image frame buffer 3b of the first memory 3 is read and processed during the execution of steps S1 to S11. In step S5, the second memory The wavelet coefficient written in the wavelet coefficient frame buffer 4b is set as a processing target. Similarly, in steps S7 and S8, data is written into the second packet data pointer 3d of the first memory 3 and the code data buffer 4d of the second memory 4. Thereafter, the first image frame buffer 3a and the second image frame buffer 3b of the first memory 3, the first packet data pointer 3c and the second packet data pointer 3d, the wavelet coefficient frame buffers 4a and 4b of the second memory 4, and the code data. The buffers 4c and 4d are alternately processed.

一方、ビデオカメラ8により撮影された全てのフレームのノンインターレース画像の処理が終了した場合には(ステップS12でYES)、符号化処理を終了する。   On the other hand, when the processing of the non-interlaced images of all the frames photographed by the video camera 8 is finished (YES in step S12), the encoding process is finished.

図9は、符号データ量調節処理のフローチャートである。当該処理は、上記手順で符号化処理の終了後、直ちに実行するようにしても良いし、ユーザの任意のタイミングで起動できるようにしても良い。処理実行に伴い、まず、初期設定として変数mの値を3(3枚分のパス)×16(16枚のビットプレーン)=48、即ち1つのコードブロック内の全コーディングパス数に設定する(ステップS20)。ディスプレイ9に図10に示す設定画面を表示する(ステップS21)。ユーザによりキーボード5及びマウス6の操作により目標符号データ量入力欄92に目標とする符号データの量(単位Kbit)が入力され、又は、目標圧縮率入力欄93に目標とする符号データの圧縮率(単位%)が入力された後、設定ボタン94が選択されるのを待つ(ステップS22でNO)。   FIG. 9 is a flowchart of the code data amount adjustment process. This process may be executed immediately after the encoding process is completed in the above procedure, or may be activated at any timing of the user. Along with the process execution, first, as an initial setting, the value of the variable m is set to 3 (3 passes) × 16 (16 bit planes) = 48, that is, the total number of coding passes in one code block ( Step S20). The setting screen shown in FIG. 10 is displayed on the display 9 (step S21). The target code data amount (unit Kbit) is input to the target code data amount input field 92 by the user operating the keyboard 5 and mouse 6, or the target code data compression ratio is input to the target compression ratio input field 93. After (unit%) is input, it waits for the setting button 94 to be selected (NO in step S22).

上記何れかの数値入力及び設定ボタン94の選択が行われた場合(ステップS22でYES)、入力された位置より目標とする符号データ量αを特定する(ステップS23)。ハードディスク7より最初のフレームの符号データ(以下、標準符号データという)βを読み出す(ステップS24)。変数γの値をβに設定する(ステップS25)。ハードディスク7より合計n個のコードブロックの最下位ビットのレイヤのコーディングパスCPm(=48)のバイト数(符号データ量)を読み出し、合計Bmを算出する(ステップS26)。上記変数γよりBmを減算する(ステップS27)。   When any one of the numerical values and the setting button 94 are selected (YES in step S22), the target code data amount α is specified from the input position (step S23). Code data (hereinafter referred to as standard code data) β of the first frame is read from the hard disk 7 (step S24). The value of variable γ is set to β (step S25). The number of bytes (code data amount) of the coding path CPm (= 48) in the layer of the least significant bit of the total n code blocks is read from the hard disk 7 and the total Bm is calculated (step S26). Bm is subtracted from the variable γ (step S27).

ここで、減算後の変数γの値が上記目標符号データ量α以上の場合(ステップS28でNO)、読み出した符号データからコーディングパスCPmの符号データを削除し(ステップS29)、変数mの値を1減算した後に(ステップS30)、ステップS26に戻る。他方、減算後の変数γの値が上記目標符号データ量αに満たない値になる場合には(ステップS28でYES)、図11に例示するJPEG2000に準拠するパケットデータ形式によるデータの出力を行う(ステップS31)。当該JPEG2000に準拠するパケットデータ形式では、各1ビットのP−inc,CB−inc、図7に示すポイントヘッダ領域400に書き込まれているゼロビットプレーンの数(6ビットデータ)、例えば、領域411に書き込まれているコーディングパスの数(6ビットデータ)、符号データのビット長を表すLブロック(8ビットデータ)、符号データのバイト数(24ビットデータ)、符号データ(目標符号データ量分のビットデータ)で構成される。   If the value of the variable γ after subtraction is equal to or greater than the target code data amount α (NO in step S28), the code data of the coding path CPm is deleted from the read code data (step S29), and the value of the variable m After 1 is subtracted (step S30), the process returns to step S26. On the other hand, if the value of the variable γ after subtraction is less than the target code data amount α (YES in step S28), data is output in a packet data format conforming to JPEG2000 illustrated in FIG. (Step S31). In the packet data format conforming to the JPEG2000, each 1-bit P-inc, CB-inc, the number of zero bit planes (6 bit data) written in the point header area 400 shown in FIG. The number of coding passes written in (6 bit data), the L block (8 bit data) indicating the bit length of the code data, the number of bytes of the code data (24 bit data), the code data (for the target code data amount) Bit data).

なお、上記ステップS28における判断は、例えば1Kbit程度の許容範囲を定めておき、減算後の変数γの値が上記目標符号データ量α+1Kbit以下になった場合に、目標値に達したと判断してもよい。   The determination in step S28 is, for example, that an allowable range of about 1 Kbit is set, and it is determined that the target value has been reached when the value of the variable γ after subtraction is equal to or less than the target code data amount α + 1 Kbit. Also good.

撮影した全てのフレームの符号データについての処理が未だの場合には(ステップS32でNO)、上記ステップS24に戻り、次のフレーム符号データの読み出しを行う。他方、全てのフレームの符号データについての処理が終了した場合には(ステップS32でYES)、処理を終了する。   If the processing for the code data of all captured frames has not been performed (NO in step S32), the process returns to step S24 to read the next frame code data. On the other hand, when the process for the code data of all the frames is completed (YES in step S32), the process is terminated.

上述するように、画像処理装置10では、図5に示した符号化処理により、ビデオカメラ8により撮影した画像のデータを、一旦ハードディスク7に格納し、この後、引き続いて、又はユーザにより起動される図9に示す符号データ量調節処理を実行することにより、ウェーブレット係数の下位ビットプレーンのデータの破棄、係数モデリング及び算術符号化処理、符号データ量の参照を繰り返し行い所望のデータ量の符号データを得る場合に比べ、唯1回の係数モデリング及び算術符号化処理で所望のデータ量の符号データを非常に短い時間で得ることができる。   As described above, in the image processing apparatus 10, the image data captured by the video camera 8 is temporarily stored in the hard disk 7 by the encoding process shown in FIG. 5, and thereafter, subsequently, or activated by the user. By executing the code data amount adjustment process shown in FIG. 9, the data of the lower bit plane of the wavelet coefficient is repeatedly discarded, the coefficient modeling and arithmetic coding process, and the code data amount reference is repeatedly performed, so that the code data of the desired data amount is obtained. Compared to the case of obtaining the code data, it is possible to obtain code data of a desired data amount in a very short time by only one coefficient modeling and arithmetic coding processing.

なお、上記画像処理装置10においてCPU1の実行する上記符号化処理及び符号データ量調節処理の一部又は全部をハード回路により実現しても良い。   Note that part or all of the encoding process and the code data amount adjustment process executed by the CPU 1 in the image processing apparatus 10 may be realized by a hardware circuit.

(2)他の実施の形態
上述した画像処理装置10では、ビデオカメラ8で撮影した各フレームのノンインターレース画像の画像データの符号化と、符号データ量の調節処理を別々に行うため、一旦撮影した映像の符号データを様々なサイズの符号データに変換して出力することができるという利点を有するが、図5に示す符号化処理の前の段階(ステップS1の実行前)で、目標とする符号データ量を設定する処理(図9のステップS20〜S23に相当する処理)を実行しておき、符号化処理において符号データ及びパケットデータポインタのデータをハードディスク7に保存する処理(図5のステップS11の処理)のかわりに、第1メモリ3及び第2メモリ4に書き込まれているデータを直接使用して符号データ量の調節処理(図9のステップS24〜S31に相当する処理)を実行するようにしても良い(図は省略する)。
(2) Other Embodiments In the image processing apparatus 10 described above, since the encoding of the image data of the non-interlaced image of each frame captured by the video camera 8 and the adjustment process of the code data amount are separately performed, the image processing apparatus 10 is temporarily captured. The code data of the recorded video can be converted into code data of various sizes and output, but the target is the stage before the encoding process shown in FIG. 5 (before execution of step S1). Processing for setting the amount of code data (processing corresponding to steps S20 to S23 in FIG. 9) is executed, and processing for storing code data and packet data pointer data in the hard disk 7 in the encoding processing (step in FIG. 5) Instead of the process of S11, the data written in the first memory 3 and the second memory 4 is directly used to adjust the code data amount (see FIG. 9). Processing corresponding to steps S24 to S31) may be executed (not shown).

CPU1により上記構成の処理を実行することで、ビデオカメラ8による撮影と同時に予め決めた量の符号データで成るパケットデータの出力を行うことができる。   By executing the processing of the above configuration by the CPU 1, packet data composed of a predetermined amount of code data can be output simultaneously with shooting by the video camera 8.

なお、当該他の実施の形態においてCPUの実行する処理の一部又は全部ハード回路により実現しても良い。   In another embodiment, part or all of the processing executed by the CPU may be realized by a hardware circuit.

1 CPU、2 ROM、3 第1メモリ、4 第2メモリ、5 キーボード、6 マウス、7 ハードディスク、8 ビデオカメラ、9 ディスプレイ、10 画像処理装置、91 圧縮率設定画面、92 目標符号データ量の数値入力欄、93 目標圧縮率の数値入力欄。   1 CPU, 2 ROM, 3 1st memory, 4 2nd memory, 5 keyboard, 6 mouse, 7 hard disk, 8 video camera, 9 display, 10 image processing device, 91 compression rate setting screen, 92 numerical value of target code data amount Input field, 93 Numerical input field for target compression rate.

野水泰之著「次世代画像符号化方法JPEG2000」、株式会社トリケッツプス出版、2001年2月13日発行Yasuyuki Nomizu, “Next Generation Image Coding Method JPEG2000”, published by Triquetspus Co., Ltd., February 13, 2001

Claims (1)

画像データを2次元離散ウェーブレット変換して得られるウェーブレット係数をビットプレーンに分割し、ビットプレーン単位でエントロピー符号化処理を実行して上記画像データの符号データを生成する符号化手段を備える画像処理装置において、
エントロピー符号化処理により、コードブロックの符号データのスタートアドレス、バイト数、及び、有効ビット長、並びに、各コードブロックのビットプレーン毎にコーディングパス単位の符号データ量を格納するパケットデータポインタ領域を有する第1メモリと、
前記画像データの符号データを記憶する第2メモリと、
目標とする符号データの量を設定する設定手段と、及び、
データ量調節手段と
を備え、
前記第1メモリのパケットデータポインタ領域は、レイヤポインタデータ領域とコーディングパス領域とを含んで区切られ、エントロピー符号化処理時に第2メモリに符号データが格納されるのと同時に、前記第2メモリに格納される符号データのスタートアドレス、バイト数、及び、有効ビット長がそれぞれ、前記レイヤポインタデータ領域に格納され、かつ前記コーディングパス領域に前記コーディングパス単位の符号データ量が格納され、
前記データ量調節手段は、前記第1メモリの前記レイヤポインタデータ領域内に記憶してあるスタートアドレス、バイト数、及び、有効ビット長から求められるコードブロック毎のエンドアドレスに基づいて、下位のビットプレーンの符号データより順に上記第2メモリに記憶してある符号データから削除し、同時に前記第1メモリの前記コーディングパス領域に記憶してある前記コーディングパス単位の符号データ量を用いて、
符号データの量を上記設定手段により設定された目標とする符号データの量とみなせる許容範囲内の値にする
ことを特徴とする画像処理装置。
An image processing apparatus comprising an encoding unit that divides a wavelet coefficient obtained by performing two-dimensional discrete wavelet transformation on image data into bit planes, executes entropy encoding processing in units of bit planes, and generates code data of the image data In
The entropy encoding process has a packet data pointer area for storing the start address , the number of bytes, and the effective bit length of the code data of the code block , and the amount of code data for each coding block for each bit plane of the code block. A first memory;
A second memory for storing code data of the image data;
Setting means for setting a target amount of code data; and
Data amount adjusting means,
The packet data pointer area of the first memory is delimited including a layer pointer data area and a coding pass area, and at the same time the code data is stored in the second memory during the entropy encoding process, The start address , the number of bytes, and the effective bit length of the stored code data are each stored in the layer pointer data area, and the amount of code data in the coding pass unit is stored in the coding pass area,
The data amount adjusting means includes a lower bit based on a start address , a number of bytes, and an end address for each code block obtained from the effective bit length stored in the layer pointer data area of the first memory. From the code data stored in the second memory in order from the code data of the plane, at the same time using the code data amount of the coding pass unit stored in the coding pass area of the first memory,
An image processing apparatus, wherein the amount of code data is set to a value within an allowable range that can be regarded as a target amount of code data set by the setting means.
JP2009009068A 2009-01-19 2009-01-19 Image processing device Expired - Fee Related JP4594425B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009009068A JP4594425B2 (en) 2009-01-19 2009-01-19 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009009068A JP4594425B2 (en) 2009-01-19 2009-01-19 Image processing device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007018086A Division JP4551413B2 (en) 2007-01-29 2007-01-29 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2009135948A JP2009135948A (en) 2009-06-18
JP4594425B2 true JP4594425B2 (en) 2010-12-08

Family

ID=40867348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009009068A Expired - Fee Related JP4594425B2 (en) 2009-01-19 2009-01-19 Image processing device

Country Status (1)

Country Link
JP (1) JP4594425B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002034043A (en) * 2000-05-11 2002-01-31 Canon Inc Method and device for coding and recording medium
JP2002064710A (en) * 2000-05-26 2002-02-28 Eastman Kodak Co Method for generating hierarchically edited compressed digital image corresponding to increasing visual quality level, and method for controlling rate of the compressed digital image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002034043A (en) * 2000-05-11 2002-01-31 Canon Inc Method and device for coding and recording medium
JP2002064710A (en) * 2000-05-26 2002-02-28 Eastman Kodak Co Method for generating hierarchically edited compressed digital image corresponding to increasing visual quality level, and method for controlling rate of the compressed digital image

Also Published As

Publication number Publication date
JP2009135948A (en) 2009-06-18

Similar Documents

Publication Publication Date Title
JP4148462B2 (en) Image processing apparatus, electronic camera apparatus, and image processing method
US7577308B2 (en) Image data generation with reduced amount of processing
JP2004153751A (en) Image processing apparatus and image processing method
US8098947B2 (en) Method and apparatus for processing image data by rearranging wavelet transform data
JP2004104347A (en) Image processing apparatus, image processing method, program, and recording medium
US7492951B2 (en) Image processing method and apparatus, and computer-readable storage medium
JP2010226672A (en) Image dividing device, divided image encoder and program
JP2004186871A (en) Image processing apparatus, imaging apparatus, program, and storage medium
JP4594425B2 (en) Image processing device
JP4551413B2 (en) Image processing apparatus and image processing method
JP2007014002A (en) Image processing apparatus, image processing program and recording medium
US7787700B2 (en) Signal processing method, signal processing apparatus, computer-readable medium and a data recording medium
KR20150047332A (en) Method and Apparatus for decoding video stream
JP2001197499A (en) Method and device for encoding animation, method and device for decoding the same, and method and device for transmitting animation
JP2004096695A (en) Image processing apparatus, image display device, program, storage medium, and image processing method
JP4077706B2 (en) Interlaced image processing apparatus and processing method
WO2024078403A1 (en) Image processing method and apparatus, and device
TW201218773A (en) Image compression method
JP4247089B2 (en) Non-interlaced image processing apparatus and processing method
JP4090978B2 (en) Image processing device
JP4247088B2 (en) Non-interlaced image processing apparatus and processing method
JP4194311B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, and methods thereof
JP2004289737A (en) Image coding device, image coding program, and image decoding program
JP4471310B2 (en) Image processing apparatus and image processing method
JP2005102125A (en) Image decoding method and image decoding apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100608

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100809

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: 20100914

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100916

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4594425

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees