JP5200792B2 - Image compression apparatus and method, and program - Google Patents

Image compression apparatus and method, and program Download PDF

Info

Publication number
JP5200792B2
JP5200792B2 JP2008232949A JP2008232949A JP5200792B2 JP 5200792 B2 JP5200792 B2 JP 5200792B2 JP 2008232949 A JP2008232949 A JP 2008232949A JP 2008232949 A JP2008232949 A JP 2008232949A JP 5200792 B2 JP5200792 B2 JP 5200792B2
Authority
JP
Japan
Prior art keywords
code
code amount
region
interest
subband
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
JP2008232949A
Other languages
Japanese (ja)
Other versions
JP2010068269A (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 JP2008232949A priority Critical patent/JP5200792B2/en
Publication of JP2010068269A publication Critical patent/JP2010068269A/en
Application granted granted Critical
Publication of JP5200792B2 publication Critical patent/JP5200792B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、JPEG2000などに準拠して画像データの圧縮符号化を行う画像圧縮装置及び画像圧縮方法並びにそのためのプログラムに関する。本発明は、静止画、又は動画の圧縮、伸張技術に係り、特にデジタルスチルカメラ、デジタルコピアの記録部分、監視カメラ、デジタルビデオストレージ、デジタルカメラ(動画)、衛星通信機器、医療機器、インターネットのブラウザなどにおける画像処理に応用可能である。   The present invention relates to an image compression apparatus and image compression method for compressing and encoding image data in conformity with JPEG2000 and the like, and a program therefor. The present invention relates to a still image or video compression / decompression technique, and in particular, a digital still camera, a recording part of a digital copier, a surveillance camera, a digital video storage, a digital camera (moving image), a satellite communication device, a medical device, and the Internet. It can be applied to image processing in a browser or the like.

近年、高精細画像を取り扱うのに適した圧縮符号化方法としてJEPG2000が知られている。JPEG2000の符号化処理では、画像データをY,Cb,Crの各色成分のデータに変換した後、それぞれのデータに対して周波数解析として2次元離散ウェーブレット変換を行う。   In recent years, JEPPG2000 is known as a compression encoding method suitable for handling high-definition images. In the JPEG2000 encoding process, after image data is converted into Y, Cb, and Cr color component data, two-dimensional discrete wavelet transform is performed on each data as frequency analysis.

JPEG2000は、画像データの圧縮伸長に関する形式である。図9は、JPEG2000アルゴリズムの基本を説明するための機能ブロック図である。この機能ブロック図は、JPEG2000形式の画像圧縮伸長用の画像処理用コンピュータプログラムに従いコンピュータが実行することになる各種の機能に対応するアルゴリズムをブロック化して示している。   JPEG2000 is a format related to compression / decompression of image data. FIG. 9 is a functional block diagram for explaining the basics of the JPEG2000 algorithm. This functional block diagram shows algorithms corresponding to various functions to be executed by a computer in accordance with an image processing computer program for image compression / decompression in JPEG2000 format.

図9に示すように、JPEG2000アルゴリズムは、色空間変換・逆変換部111、2次元ウェーブレット変換・逆変換部112、量子化・逆量子化部113、エントロピー符号化・復号化部114、タグ処理部115によって構成されている(例えば、非特許文献1参照。)。 As shown in FIG. 9, the JPEG2000 algorithm includes a color space transformation / inverse transformation unit 111, a two-dimensional wavelet transformation / inverse transformation unit 112, a quantization / inverse quantization unit 113, an entropy encoding / decoding unit 114, and tag processing. It is comprised by the part 115 (for example, refer nonpatent literature 1).

ウェーブレット変換により得られたウェーブレット係数のデータ(例えば16ビットデータ)を、サブバンド(例えば、レベル3のウェーブレット変換の場合、3LL,3HL,3LH,3HH,2HL,2LH,2HH,lHL,1LH,1HH)を処理単位としてビットプレーンに分割し、サブバンド毎に各ビットプレーンのデータを上位から順に3通りの方法によりスキャンして算術符号化を行う。上記3通りの方法は、「シグニフィカント・プロパゲーション・パス(significant propagation pass)」、「マグニチュード・リファインメント・パス(magnitude refinement pass)」、「クリーンアップ・パス(cleanup pass)」と呼ばれている。   Wavelet coefficient data (for example, 16-bit data) obtained by wavelet transform is converted into subbands (for example, in the case of level 3 wavelet transform, 3LL, 3HL, 3LH, 3HH, 2HL, 2LH, 2HH, 1HL, 1LH, 1HH). ) Is divided into bit planes as processing units, and the arithmetic coding is performed by scanning the data of each bit plane for each subband in order from the top by three methods. The above three methods are called “significant propagation pass”, “magnitude refinement pass”, and “cleanup pass”. .

符号データの圧縮は、上記3通りの方法によるスキャンで得られる各サブバンドの全コードブロックのコーディングパスの符号データを最下位のビットプレーン側から順に均一に削除(トランケーション)することにより行う。ここで、符号データの削除とは、削除するビットデータの値を0(無効データ)に置きかえることをいう。JPEG2000の符号化処理の詳細については非特許文献1を参照されたい。   The compression of the code data is performed by uniformly deleting (truncating) the code data of the coding pass of all the code blocks of each subband obtained by the scan by the above three methods in order from the least significant bit plane side. Here, the deletion of the code data means that the value of the bit data to be deleted is replaced with 0 (invalid data). Refer to Non-Patent Document 1 for details of JPEG2000 encoding processing.

また、画像圧縮技術に関する従来文献としては、例えば上述した特許文献1の他に、特許文献2、特許文献3などがある。以下、これら従来文献の概要を簡単に説明する。   Further, as conventional documents related to image compression technology, there are, for example, Patent Document 2 and Patent Document 3 in addition to Patent Document 1 described above. The outline of these conventional documents will be briefly described below.

特許文献1に開示されたものは、JPEG2000形式での画像の圧縮処理を実行する圧縮手段と、JPEG2000以外の形式で圧縮された画像の伸長処理を実行する伸長手段とを備え、記憶領域に記憶された画像ファイルについての関心領域の指定を許容し、画像ファイルが非圧縮ファイル又はJPEG2000以外の形式で圧縮された圧縮ファイルであることを判定し、画像ファイルが非圧縮ファイルであると判定され場合には圧縮手段で圧縮し、JPEG2000以外の形式で圧縮された圧縮ファイルであると判定された場合には伸長手段で伸長してから圧縮手段で圧縮し、圧縮画像から、指定された関心領域に対応するブロックを抽出し出力するものである。   The one disclosed in Patent Document 1 includes a compression unit that executes compression processing of an image in JPEG 2000 format, and a decompression unit that executes decompression processing of an image compressed in a format other than JPEG 2000, and is stored in a storage area. When it is determined that the image file is an uncompressed file, it is determined that the image file is an uncompressed file or a compressed file compressed in a format other than JPEG2000, and the image file is determined to be an uncompressed file. If the compressed file is determined to be a compressed file compressed in a format other than JPEG2000, it is decompressed by the decompressing means and then compressed by the compressing means, and from the compressed image to the designated region of interest. The corresponding block is extracted and output.

特許文献2に開示されたものは、画像データを周波数解析して得られる係数データを処理単位毎に符号化して符号データを生成する符号化部と、上記符号化部において処理単位毎に生成される符号データを削除することにより符号データの量を削減するデータ削減部と、各処理単位の係数データを更に第2処理単位の係数データに分割し、第2処理単位の係数データの値の大きさに応じて、上記データ削減部における符号データの削減量を上記第2処理単位で増やすデータ処理部を備えることを特徴とするものである。   The one disclosed in Patent Document 2 is generated for each processing unit by an encoding unit that generates coefficient data by encoding coefficient data obtained by frequency analysis of image data for each processing unit, and the encoding unit. A data reduction unit for reducing the amount of code data by deleting the code data, and dividing the coefficient data of each processing unit into coefficient data of the second processing unit, and increasing the value of the coefficient data of the second processing unit Accordingly, a data processing unit for increasing the amount of code data reduction in the data reduction unit by the second processing unit is provided.

また、特許文献3に開示されたものは、画像データを周波数解析して得られる係数データを処理単位で符号化して符号データを生成する符号化部と、符号データのうち、各処理単位の係数データの下位ビット側のデータに対応する符号データから削除する内容を決めるデータを、データNo.の増加に伴い符号データの削減量が次第に増加又は減少し、かつ、再生画像の質が次第に劣化又は向上するように並べたテーブルと、テーブルより読み出したデータに従い符号データを削除した場合の符号データの変量を算出し、算出した符号データの変量が目標値であるとみなせる1つのデータのデータNo.を特定するレートコントロール部とを備えることを特徴とするものである。   In addition, what is disclosed in Patent Document 3 is an encoding unit that generates code data by encoding coefficient data obtained by frequency analysis of image data in units of processing, and coefficients of each processing unit among the code data. Data that determines the contents to be deleted from the code data corresponding to the data on the lower bit side of the data is data No. Code data when the reduction amount of code data gradually increases or decreases and the quality of the reproduced image gradually deteriorates or improves, and code data when code data is deleted according to the data read from the table The data No. of one data that can be regarded as the target value is calculated. And a rate control unit for specifying the above.

図10は、特許文献2,3に開示された画像圧縮装置の構成を示す図である。図10に示すように、画像圧縮装置100は、ウェーブレット変換部10、算術符号化部20、パケットヘッダ生成処理部30、メモリコントローラ40及びDRAM(Dynamic Random Access)50で構成される。メモリコントローラ40は、いわゆるアービタ回路であり、上記ウェーブレット変換部10、算術符号処理部20及びパケットヘッダ生成処理部30が備える各DMA(Direct Memory Access)13、21、25、31、33、35及び37のDRAM50に対するデータアクセス権の調停を行う。   FIG. 10 is a diagram illustrating the configuration of the image compression apparatus disclosed in Patent Documents 2 and 3. As shown in FIG. 10, the image compression apparatus 100 includes a wavelet transform unit 10, an arithmetic coding unit 20, a packet header generation processing unit 30, a memory controller 40, and a DRAM (Dynamic Random Access) 50. The memory controller 40 is a so-called arbiter circuit, and each DMA (Direct Memory Access) 13, 21, 25, 31, 33, 35 provided in the wavelet transform unit 10, the arithmetic code processing unit 20 and the packet header generation processing unit 30 The arbitration of the data access right to the 37 DRAM 50 is performed.

ウェーブレット変換部10は、画像データを16ビットのウェーブレット係数に変換する。色変換回路11は、入力される画像データをY、Cb及びCrの各色成分に変換して出力する。ウェーブレット変換回路12は、色変換後の各成分のデータに対して2次元離散ウェーブレット変換を実行する。DMA13は、生成されたウェーブレット係数をDRAM50の所定のアドレスに格納する。   The wavelet transform unit 10 transforms image data into 16-bit wavelet coefficients. The color conversion circuit 11 converts input image data into Y, Cb, and Cr color components and outputs them. The wavelet transform circuit 12 performs a two-dimensional discrete wavelet transform on the data of each component after color conversion. The DMA 13 stores the generated wavelet coefficient at a predetermined address of the DRAM 50.

算術符号化部20は、上記ウェーブレット変換部10においてDRAM50に格納されたウェーブレット係数に対して算術符号化処理を施し、各サブバンドのコーディングパス毎の符号データをDRAM50に書き込むと共に、各サブバンドのコードブロック毎のマスク量(コーディングパス枚数)を特定し、特定したマスク量をメモリA又はメモリBに書き込む。   The arithmetic encoding unit 20 performs arithmetic encoding processing on the wavelet coefficients stored in the DRAM 50 in the wavelet transform unit 10 and writes the code data for each subband coding pass to the DRAM 50, and at the same time, The mask amount (number of coding passes) for each code block is specified, and the specified mask amount is written in the memory A or the memory B.

更に、上記特定したマスク量及び各コードブロックのコーディングパス毎の符号量から、トランケーションデータに基づいて各サブバンドのコーディングパスを1枚ずつ削除する場合に減少する符号量を特定し、メモリC又はメモリDに書き込む。   Further, from the above-described mask amount and code amount for each coding pass of each code block, a code amount to be reduced when deleting each subband coding pass one by one based on the truncation data is specified, and the memory C or Write to memory D.

DMA21は、DRAM50の所定のアドレスに格納されているウェーブレット係数をサブバンド単位で読み出す。読み出された16ビットのウェーブレット係数は、量子化回路22においてエントロピー量子化された後、ビットプレーン分割回路23に入力され16枚のビットプレーンに分割される。   The DMA 21 reads out the wavelet coefficient stored at a predetermined address of the DRAM 50 in units of subbands. The read 16-bit wavelet coefficients are entropy quantized by the quantizing circuit 22 and then input to the bit plane dividing circuit 23 to be divided into 16 bit planes.

算術符号化回路24は、サブバンド毎に各ビットプレーンのデータを上位ビットから順に3通りの方法(コーディングパスという)によりスキャンして算術符号化を行う。上記3通りの方法は、「シグニフィカント・プロパゲーション・パス(significant propagation pass)」、「マグニチュード・リファインメント・パス(magnitude refinement pass)」、「クリーンアップ・パス(cleanup pass)」と呼ばれる。算術符号化部24から出力される符号データは、15×3+1=46枚のコーディングパスの符号データで成り、DMA25を介してDRAM50に書き込まれる。   The arithmetic encoding circuit 24 performs arithmetic encoding by scanning the data of each bit plane for each subband in order from the upper bits by three methods (referred to as coding passes). The above three methods are called “significant propagation pass”, “magnitude refinement pass”, and “cleanup pass”. Code data output from the arithmetic coding unit 24 is composed of code data of 15 × 3 + 1 = 46 coding passes, and is written into the DRAM 50 via the DMA 25.

DMA21によってDRAM50から読み出されたウェーブレット係数は、量子化回路22だけでなく平均値算出回路26にも入力される。平均値算出回路26では、各コードブロックの有効画素のウェーブレット係数の平均値を算出して出力する。マスキング係数計算回路27は、平均値算出回路26から順に出力される各コードブロック毎のウェーブレット係数の平均値の値に応じて0枚、1枚、2枚の追加のマスキング係数、即ち、マスク量(符号データを削除するコーディングパスの枚数)を特定して出力する。メモリA及びメモリBは、処理するフレーム画像単位で交互にイネーブルに切り換えられるメモリであり、マスキング係数計算回路27から出力される各サブバンドのコードブロック毎のマスク量を記録する。   The wavelet coefficients read from the DRAM 50 by the DMA 21 are input not only to the quantization circuit 22 but also to the average value calculation circuit 26. The average value calculation circuit 26 calculates and outputs the average value of the wavelet coefficients of the effective pixels of each code block. The masking coefficient calculation circuit 27 adds 0, 1 or 2 additional masking coefficients according to the average value of the wavelet coefficients for each code block sequentially output from the average value calculation circuit 26, that is, the mask amount. (Number of coding passes from which code data is deleted) is specified and output. The memory A and the memory B are memories that are alternately enabled in units of frame images to be processed, and record the mask amount for each code block of each subband output from the masking coefficient calculation circuit 27.

算術符号化回路24の出力する符号データは、符号量算出回路28にも出力される。符号量算出回路28では、各コードブロックのビットプレーンに対応するコーディングパス毎の符号量を計数し、係数値をデータ処理回路29に出力する。データ処理回路29には、更に、上記メモリA又はメモリBに書き込まれた各コードブロックのマスク量(コーディングパス枚数)が入力される。データ処理回路29は、各サブバンドのコーディングパスの符号データを最下位のビットプレーン側から1枚ずつ削除する場合において、更に、マスク量を考慮した符号データの削減量を求め、求めた符号データの削減量を表すデータをメモリC又はメモリDに書き込む。   The code data output from the arithmetic encoding circuit 24 is also output to the code amount calculation circuit 28. The code amount calculation circuit 28 counts the code amount for each coding pass corresponding to the bit plane of each code block, and outputs the coefficient value to the data processing circuit 29. Further, the mask amount (the number of coding passes) of each code block written in the memory A or memory B is input to the data processing circuit 29. When deleting the code data of the coding pass of each subband one by one from the least significant bit plane side, the data processing circuit 29 further obtains a reduction amount of the code data considering the mask amount, and obtains the obtained code data Is written in the memory C or the memory D.

パケットヘッダ生成処理部30は、上記算術符号化部20において求めた、各サブバンドのコーディングパスの符号データを最下位ビットプレーン側から1枚ずつ削除する場合であって、更に、コードブロック毎のマスク量を考慮に入れた場合の符号データの削減量に基づいて、符号データを所望量だけ削除するために適当なトランケーションデータのデータNo.を特定し、特定したデータNo.のトランケーションデータに基づいて得られる符号データのパケットヘッダを生成し、ビットストリームを形成して出力する。レートコントロール回路32は、まず、データNo.128のトランケーションデータをDMA31を介してDRAM50より読み出し、読み出したトランケーションデータのうち容に従い、全てのサブバンドについてコードブロック毎に特定される符号データの削減量の合計を算出し、目標削減量との比較を行う。   The packet header generation processing unit 30 is a case where the code data of the coding pass of each subband obtained by the arithmetic encoding unit 20 is deleted one by one from the least significant bit plane side, and further, for each code block Based on the reduction amount of the code data when the mask amount is taken into consideration, the data No. of truncation data suitable for deleting the code data by the desired amount is deleted. And the identified data No. A packet header of code data obtained based on the truncation data is generated, and a bit stream is formed and output. First, the rate control circuit 32 first sets the data number. 128 truncation data is read from the DRAM 50 via the DMA 31, and the total reduction amount of code data specified for each code block is calculated for all subbands according to the content of the read truncation data. Make a comparison.

ここで、目標削減量に満たない場合には、より大きな値のデータNo.のトランケーションデータを読み出し、当該データのうち容に従い全てのサブバンドにおけるデータ削減量の合計を求める。逆の場合、即ち、符号データの削減量の合計値が目標削減量よりも多い場合、より小さな値のデータNo.のトランケーションデータを読み出し、符号データの削減量を再度算出する。上記符号データの削減量が目標削減量であるとみなせる値になる1のデータNo.を特定し、このデータNo.を表すデータを後段のパケット情報生成回路34に出力する。   Here, if the target reduction amount is not reached, a larger data No. The truncation data is read out, and the total data reduction amount in all subbands is obtained according to the content of the data. In the opposite case, that is, when the total value of the reduction amount of the code data is larger than the target reduction amount, the data No. The truncation data is read out, and the reduction amount of the code data is calculated again. The data No. 1 with the code data reduction amount becomes a value that can be regarded as the target reduction amount. This data No. is identified. Is output to the packet information generation circuit 34 in the subsequent stage.

レートコントロール回路32は、大きく分けてアドレス生成回路、符号量演算回路及びデータNo.切換回路とで構成される。アドレス生成回路及び符号量演算回路は、指定されたデータNo.のトランケーションデータを上記トランケーションテーブルから読出し、読み出したトランケーションデータのうち容に従い各処理単位の符号データの下位ビット側のデータを削除する場合の符号データの変量を算出する演算部として機能する。アドレス生成回路は、DMA31を介して入力されるトランケーションデータのうち容に基づいて加算又は減算させるビットプレーンの符号量のデータを読み出すアドレスを生成し、メモリC及びメモリDに出力する。   The rate control circuit 32 is roughly divided into an address generation circuit, a code amount calculation circuit, and a data number. And a switching circuit. The address generation circuit and the code amount calculation circuit have the designated data No. The truncation data is read from the truncation table, and functions as an arithmetic unit that calculates a variable of the code data when deleting the lower bit data of the code data of each processing unit according to the content of the read truncation data. The address generation circuit generates an address for reading out the code amount data of the bit plane to be added or subtracted based on the content of the truncation data input via the DMA 31, and outputs the address to the memory C and the memory D.

メモリC及びメモリDのうち、処理しているフレーム画像のデータが格納されており、イネーブル状態にあるメモリは、指定されたアドレスに格納している符号データの削減量を表すデータを符号量演算回路に出力する。符号量演算回路は、メモリC又はメモリDより送られてくるデータ削減量の全サブバンドについての合計を求め、求めた合計値と目標削減量との比較を行い、比較結果を表す信号を次段のデータNo.切換回路に出力する。データNo.切換回路は、上記符号量演算回路から出力される比較結果信号に基づいて異なるデータNo.のトランケーションデータをDMA33を介してDRAM50に要求する。また、符号データ削減量が目標削減量であるとみなせる最終の1のデータNo.を表す信号をパケット情報生成回路34に出力する。   Of the memory C and the memory D, the data of the frame image being processed is stored, and the memory in the enabled state calculates the code amount by calculating the data representing the reduction amount of the code data stored at the specified address. Output to the circuit. The code amount calculation circuit obtains the sum of all the subbands of the data reduction amount sent from the memory C or the memory D, compares the obtained total value with the target reduction amount, and outputs a signal representing the comparison result. No. data No. Output to the switching circuit. Data No. The switching circuit has different data No. based on the comparison result signal output from the code amount calculation circuit. Is requested to the DRAM 50 via the DMA 33. Further, the last data No. 1 in which the code data reduction amount can be regarded as the target reduction amount. Is output to the packet information generation circuit 34.

パケットヘッダ生成回路36は、パケット情報生成回路34より出力される上記算出した各サブバンドのコードブロックのコーディングパス数及び符号量のデータ、ゼロビットプレーン数、並びに、DMA37よりDRAM5から読み込んだ符号データ等のデータよりパケットヘッダを生成し、符号形成回路38に出力する。符号形成回路38は、パケットヘッダ生成回路36より出力されるデータよりビットストリームを形成し、目標削減量だけ符号データの削減を行った符号データとして外部に出力する。以上が特許文献1,2における画像圧縮装置の概要である。   The packet header generation circuit 36 outputs the code pass number and code amount data of the code block of each subband output from the packet information generation circuit 34, the number of zero bit planes, and the code data read from the DRAM 5 from the DMA 37. A packet header is generated from the data such as and the like and output to the code forming circuit 38. The code formation circuit 38 forms a bit stream from the data output from the packet header generation circuit 36 and outputs the bit stream to the outside as code data in which the code data has been reduced by the target reduction amount. The above is the outline of the image compression apparatus in Patent Documents 1 and 2.

JPEG2000では、ROI(Region of Interest)と呼ばれる「画像の選択された部分」のみ画質を向上させることができる機能を持っている。ROI機能を実現するためには、符号化時に、それに対応した処理を行っておく必要がある。JPEG2000の基本方式では、注目領域の係数に対して重み付けを行う方式(具体的にはビットシフトにより2のべき乗の重みを付ける)を採用している。   JPEG2000 has a function that can improve the image quality of only a “selected portion of an image” called ROI (Region of Interest). In order to realize the ROI function, it is necessary to perform processing corresponding to the encoding. In the basic method of JPEG 2000, a method of weighting the coefficient of the region of interest (specifically, a power of 2 is weighted by bit shift) is adopted.

図11は、従来技術に係るJPEG2000の符号化処理の流れを示す図である。図11に示すように、画像をウェーブレット変換し(ステップS501)、量子化し(ステップS502)、MQ(算術)符号化し(ステップS503)、符号形成して(ステップS504)、圧縮画像データを得ていた(ステップS505)。通常、ROI機能を実現するためには、符号化時に、それに対応した処理を行っておく必要がある。   FIG. 11 is a diagram showing the flow of JPEG2000 encoding processing according to the prior art. As shown in FIG. 11, the image is wavelet transformed (step S501), quantized (step S502), MQ (arithmetic) coded (step S503), code-formed (step S504), and compressed image data is obtained. (Step S505). Usually, in order to realize the ROI function, it is necessary to perform processing corresponding to the encoding.

図12は、符号化時に行うROI処理を含んだ流れを示す図である。図12に示すように、画像をウェーブレット変換し(ステップS601)、ビットシフトし(ステップS602)、量子化し(ステップS603)、MQ(算術)符号化し(ステップS604)、符号形成して(ステップS605)、圧縮画像データを得ていた(ステップS606)。通常、ROI機能を実現するためには、符号化時に、それに対応した処理を行っておく必要がある。処理として考えられるのは、注目領域を他の部分に比べて細かい量子化ステップで量子化を行って符号化する方法と、注目領域の係数に対して重み付けを行う方法(具体的にはビットシフトにより2のべき乗の重みを付ける)がある(図12のステップS602参照)。   FIG. 12 is a diagram showing a flow including ROI processing performed at the time of encoding. As shown in FIG. 12, the image is wavelet transformed (step S601), bit-shifted (step S602), quantized (step S603), MQ (arithmetic) coded (step S604), and code-formed (step S605). ), Compressed image data was obtained (step S606). Usually, in order to realize the ROI function, it is necessary to perform processing corresponding to the encoding. The processing can be thought of as a method of encoding the region of interest with quantization steps that are finer than other parts and a method of weighting the coefficients of the region of interest (specifically, bit shifting) (Refer to step S602 in FIG. 12).

図12に示したJPEG2000の基本方式では後者の方式を採用している。ビットシフトのシフト量はROI部分ではない係数の最大ビット数分であり、その点からMaxshift方式と呼ばれている。ROI領域の係数はこのビットシフト処理によってシフトアップされた状態で、復号時、その他の領域(バックグランド領域)の係数と同じレンジに戻す必要がある。   The JPEG2000 basic method shown in FIG. 12 employs the latter method. The shift amount of the bit shift is the maximum number of bits of the coefficient that is not the ROI part, and from this point, it is called the Maxshift method. The coefficients in the ROI area need to be returned to the same range as the coefficients in other areas (background areas) at the time of decoding while being shifted up by this bit shift processing.

図13は、復号化時のROI処理の流れを示す図であり、基本的には図12の逆順序で処理される。すなわち、圧縮データを符号解析し(ステップS701)、MQ復号化し(ステップS702)、逆量子化し(ステップS703)、ビットシフトを行った後(ステップS704)、逆ウェーブレット変換し(ステップS705)、画像を復元する(ステップS706)ものである。ビットシフト方式は、このように、符号化及び復号化時にROIマスク情報の作成、ウェーブレット係数のビットシフト処理を行う回路や、シフト量を計算する回路をそれぞれ設ける必要がある。また、カラー画像のような複数成分画像の場合、サブサンプル処理が使用される場合が多い。サブサンプルが使用された場合には、それに伴ってROIマスクもサブサンプルする必要がある。   FIG. 13 is a diagram showing the flow of ROI processing at the time of decoding, and basically the processing is performed in the reverse order of FIG. That is, code analysis is performed on the compressed data (step S701), MQ decoding (step S702), inverse quantization (step S703), bit shift (step S704), inverse wavelet transform (step S705), and image Is restored (step S706). As described above, in the bit shift method, it is necessary to provide a circuit for generating ROI mask information at the time of encoding and decoding, a bit shift process for wavelet coefficients, and a circuit for calculating a shift amount. In the case of a multi-component image such as a color image, sub-sample processing is often used. If subsamples are used, the ROI mask must be subsampled accordingly.

このように、上記従来技術では、目標の符号量になるように符号量を調整しながら、注目領域の画質向上を提供し、ROI機能に類似する効果を実現するために、係数重み付け方式によるビットシフトやシフト量の計算などを行う必要があり、回路構成が複雑となるという問題点があった。   As described above, in the above-described prior art, in order to provide an improvement in the image quality of the region of interest while adjusting the code amount so as to become the target code amount, and to realize an effect similar to the ROI function, the bit by the coefficient weighting method is used. There is a problem that the circuit configuration becomes complicated because it is necessary to perform shift and shift amount calculation.

以上の問題点を解決するために、例えば特許文献5では、簡単な仕組みでROIと類似の画像効果を実現することが可能な画像圧縮装置及び画像圧縮方法並びにそのためのプログラムが提案されている。当該画像圧縮装置等においては、トランケーションテーブルを1つ選択し、1個のコードブロック情報をメモリ上より読み出し、指定領域内のコードブロックであればトランケーション量を0とし、全体符号量に当該コードブロックの符号量を加算し、指定領域外であればトランケーションを行った時のコードブロックの符号量を計算し全体符号量に加算する。全コードブロックに対して行う。次に1個のコードブロック情報を読み出し、指定領域内であればトランケーション量を0としコードブロック情報をそのままとし、指定領域外であればトランケーションを行い、それを反映したコードブロックの情報を求めメモリに書き込む。   In order to solve the above problems, for example, Patent Document 5 proposes an image compression apparatus, an image compression method, and a program therefor capable of realizing an image effect similar to ROI with a simple mechanism. In the image compression apparatus or the like, one truncation table is selected, one piece of code block information is read from the memory, the truncation amount is set to 0 if the code block is in the designated area, and the code block is included in the total code amount. If it is outside the designated area, the code amount of the code block when truncation is calculated is added to the total code amount. Do this for all code blocks. Next, one piece of code block information is read. If it is within the specified area, the truncation amount is set to 0 and the code block information is left as it is. If it is outside the specified area, truncation is performed, and the code block information reflecting it is obtained. Write to.

また、特許文献6では、絞り機能を用いずにフォーカス効果を実現でき、しかもデータ処理量及び処理時間を大幅に軽減できるデジタル絞りシステムを提供するために、画像G1に関心領域ROI1〜ROI5を設定し、画像G1の関心領域ROI1〜ROI5に対しては符号量を相対的に多く割り当ててピントを相対的に合わせ、画像G1の非関心領域(非ROI)21に対しては符号量を相対的に少なく割り当ててピントを相対的にぼかし、且つ関心領域ROI1〜ROI5のうち優先度の低い関心領域ほど符号量を相対的に少なく割り当ててピントを相対的に強くぼかす様にして画像圧縮することにより、画像G1にデジタル絞り処理を施す。   Further, in Patent Document 6, regions of interest ROI1 to ROI5 are set in an image G1 in order to provide a digital aperture system that can realize a focus effect without using the aperture function and can significantly reduce the data processing amount and processing time. A relatively large amount of code is assigned to the regions of interest ROI1 to ROI5 of the image G1, and the focus is relatively adjusted, and the amount of code is relative to the non-region of interest (non-ROI) 21 of the image G1. The image is compressed by assigning a small amount to the image and relatively blurring the focus, and assigning a relatively small amount of code to the region of interest having a lower priority among the regions of interest ROI1 to ROI5 and making the focus relatively weakly blurred. Then, digital aperture processing is performed on the image G1.

さらに、特許文献7では、画像を比較する上で、システム規模の縮小及び処理時間の短縮を実現することができる画像処理装置を得るために、画像データを処理する画像処理装置である複合機において、各々複数の領域に分割され圧縮された第1の画像と第2の画像とから各々複数の領域毎に特徴量を抽出し、それらの画像から各々複数の領域毎に抽出した特徴量に基づいて第1の画像と第2の画像とを比較するようにした。これにより、画像を複数の領域に分割する処理等が必要とされず、簡単な処理で精度良く画像比較を実行することが可能となり、その結果として、システム規模の縮小及び処理時間の短縮を実現することができる。   Further, in Patent Document 7, in order to obtain an image processing apparatus capable of realizing a reduction in system scale and a reduction in processing time in comparing images, in a multi-function machine that is an image processing apparatus that processes image data. The feature amount is extracted for each of the plurality of regions from the first image and the second image that are each divided into a plurality of regions and compressed, and based on the feature amount extracted for each of the plurality of regions from the images. Thus, the first image is compared with the second image. This eliminates the need for processing to divide the image into multiple regions, etc., and makes it possible to perform image comparison with high accuracy with simple processing. As a result, the system scale and processing time are reduced. can do.

特開2004−304238号公報。JP 2004-304238 A. 特開2004−297712号公報。Japanese Patent Application Laid-Open No. 2004-297712. 特開2004−214828号公報。Japanese Patent Application Laid-Open No. 2004-214828. 特開2007−251476号公報。JP 2007-251476 A. 特開2007−251476号公報。JP 2007-251476 A. 特開2006−295299号公報。JP 2006-295299 A. 特開2004−227406号公報。Japanese Patent Application Laid-Open No. 2004-227406. 上野幾朗ほか,「静止画像符号化の新国際標準方式(JPEG200)の概要」,映像情報メディア学会誌,Vol.54,No.2,pp.164−171,2000年2月。Ichiro Ueno et al., “Outline of New International Standard System for Still Image Coding (JPEG200)”, Journal of the Institute of Image Information and Television Engineers, Vol. 54, no. 2, pp. 164-171, February 2000.

しかしながら、これらの従来技術の方法では以下の問題点があった。   However, these conventional methods have the following problems.

JPEG2000では、ROI(Region of Interest)と呼ばれる、画像の選択された部分のみ画質を向上させることができる機能を持っている(図1参照。)。通常、ROI機能を実現するためには符号化時に、それに対応した処理を行っておく必要がある(図2参照。)。処理としてJPEG2000の基本方式では注目領域の係数に対して重み付けを行う方法(具体的にはビットシフトにより2のべき乗の重みを付ける)を採用することになった。ビットシフトのシフト量はROI部分ではない係数の最大ビット数分であり、その点からマックスシフト(Maxshift)方式と呼ばれている。   JPEG2000 has a function called ROI (Region of Interest) that can improve the image quality of only a selected portion of an image (see FIG. 1). Usually, in order to realize the ROI function, it is necessary to perform processing corresponding to the encoding (see FIG. 2). As a process, the JPEG 2000 basic method employs a method of weighting the coefficient of the region of interest (specifically, a power of 2 is applied by bit shift). The shift amount of the bit shift is the maximum number of bits of the coefficient that is not the ROI portion, and from this point, it is called a Maxshift system.

一方、符号形成の過程でレートコントロール処理部分においてコードブロック単位で注目領域内外の符号量を調整しROIと類似する画像効果を実現する方法も存在する。この方法は複雑な計算回路を用いることなく、より簡単な仕組みでROIと類似する画像効果を実現することができる一方で、レートコントロールテーブルの選択時においてサブバンド単位の符号量計算の替わりにコードブロック単位の符号量計算を実施するので画像や注目領域の数やサイズなどによっては、符号量計算や外部記憶装置へのアクセス回数など処理時間の増大というデメリットの発生が考えられる。   On the other hand, there is also a method for adjusting the amount of code inside and outside the attention area for each code block in the rate control processing part in the process of code formation and realizing an image effect similar to ROI. While this method can achieve an image effect similar to ROI with a simpler mechanism without using a complicated calculation circuit, a code is used instead of code amount calculation for each subband when a rate control table is selected. Since code amount calculation is performed in units of blocks, depending on the number and size of images and regions of interest, there may be disadvantages such as increase in processing time such as code amount calculation and the number of accesses to the external storage device.

本発明の目的は以上のデメリットを解消するために、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる画像圧縮装置及び方法並びにそのためのプログラムを提供することにある。   In order to eliminate the above disadvantages, an object of the present invention is to provide an image compression apparatus and method capable of improving the calculation efficiency of the code amount when selecting a rate control table having a ROI attention area, and a program therefor. It is in.

なお、区別のために、以下では「ROI」の替わりに「指定領域」又は「注目領域」という用語を使用する。   For distinction, the term “designated region” or “region of interest” is used in place of “ROI” below.

第1の発明に係る画像圧縮装置は、JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御する制御手段を備えた画像圧縮装置において、
上記制御手段は、サブバンド毎の使用基準に基づいて、上記2つの符号量情報のうちのどの符号量情報を用いるか、もしくは両方の符号量情報を用いるかを決定してトランケーションしたときの符号量を計算することを特徴とする。
The image compression apparatus according to the first aspect of the present invention relates to the number of coding passes for each subband generated by the MQ encoder, the code amount information for the subbands, the number of coding passes for each code block, and the number thereof. In an image compression apparatus provided with control means for controlling the code amount of a subband with a region of interest, with the code amount information for
The control means determines, based on the usage standard for each subband, which code amount information of the two pieces of code amount information is used, or which code amount information is used, and the code when truncation is performed. It is characterized by calculating the quantity.

上記画像圧縮装置において、上記制御手段は、上記サブバンド毎の使用基準として特定コードブロックの数やサイズを用いることを特徴とする。   In the image compression apparatus, the control means uses the number and size of specific code blocks as a use standard for each subband.

とって代わって、上記制御手段は、上記サブバンド毎の使用基準として外部記憶手段へのアクセス回数を用いることを特徴とする。   Instead, the control means uses the number of accesses to the external storage means as a usage standard for each subband.

また、上記画像圧縮装置において、上記制御手段は、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させることを特徴とする。   In the image compression apparatus, when the control unit controls the code amount of the subband, when using the two pieces of code amount information, the control unit sets the number of coding passes for each subband and the code amount information corresponding thereto. Based on this, in order to make the image quality in the entire region of interest higher than the image quality outside the region of interest, the number of coding passes for each code block in the region of interest and the code amount information corresponding thereto are added to obtain the code amount of the code block in the region of interest. The code amount of the code block outside the attention area is increased.

さらに、上記画像圧縮装置において、上記制御手段は、上記サブバンドの符号量を制御するときに、2つの情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする。   Further, in the image compression apparatus, when the control unit uses two pieces of information when controlling the code amount of the subband, based on the number of coding passes for each subband and the code amount information corresponding thereto, In order to make the image quality in the entire attention area lower than the image quality outside the attention area, the code amount of the code block in the attention area is out of the attention area by subtracting the number of coding passes for each code block in the attention area and the corresponding code amount information. It is characterized by being made smaller than the code amount of the code block.

またさらに、上記画像圧縮装置において、上記制御手段は、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎コーディングパス数とそれに対する符号量情報に基づいて、一部の注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させ、その他の注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする。   Still further, in the image compression apparatus, when the control unit uses the two pieces of code amount information when controlling the code amount of the subband, the control unit sets the number of coding passes per subband and the code amount information corresponding thereto. Based on the above, in order to make the image quality in a part of the attention area higher than the image quality outside the attention area, the code number of the code block in the attention area is added by adding the number of coding passes for each code block in the attention area and the code amount information corresponding thereto. The number of coding passes for each individual code block in the region of interest and the code amount information for it are increased in order to increase the amount more than the code amount of the code block outside the region of interest and lower the image quality in other regions of interest than the image quality outside the region of interest. By subtracting, the code amount of the code block in the attention area is reduced from the code amount of the code block outside the attention area.

第2の発明に係る画像圧縮方法は、JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御する制御ステップを含む画像圧縮方法において、
上記制御ステップは、サブバンド毎の使用基準に基づいて、上記2つの符号量情報のうちのどの符号量情報を用いるか、もしくは両方の符号量情報を用いるかを決定してトランケーションしたときの符号量を計算することを特徴とする。
In the image compression method according to the second aspect of the invention, the number of coding passes for each subband generated by the MQ encoder, the code amount information for the subbands, the number of coding passes for each code block, and the number thereof are as follows. In an image compression method including a control step for controlling the code amount of a subband having a region of interest, with the code amount information for
The control step determines the code amount when truncating by determining which code amount information of the two pieces of code amount information or both of the code amount information is used based on the use standard for each subband. It is characterized by calculating the quantity.

上記画像圧縮方法において、上記制御ステップは、上記サブバンド毎の使用基準として特定コードブロックの数やサイズを用いることを特徴とする。   In the image compression method, the control step uses the number or size of the specific code block as a use standard for each subband.

とって代わって、上記制御ステップは、上記サブバンド毎の使用基準として外部記憶手段へのアクセス回数を用いることを特徴とする。   Instead, the control step uses the number of accesses to the external storage means as a usage criterion for each subband.

また、上記画像圧縮方法において、上記制御ステップは、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させることを特徴とする。   In the image compression method, when the code amount of the subband is controlled, the control step uses the number of coding passes for each subband and the code amount information for the subband when using the two pieces of code amount information. Based on this, in order to make the image quality in the entire region of interest higher than the image quality outside the region of interest, the number of coding passes for each code block in the region of interest and the code amount information corresponding thereto are added to obtain the code amount of the code block in the region of interest. The code amount of the code block outside the attention area is increased.

さらに、上記画像圧縮方法において、上記制御ステップは、上記サブバンドの符号量を制御するときに、2つの情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする。   Furthermore, in the image compression method, when the control step uses two pieces of information when controlling the code amount of the subband, based on the number of coding passes for each subband and the code amount information corresponding thereto, In order to make the image quality in the entire attention area lower than the image quality outside the attention area, the code amount of the code block in the attention area is out of the attention area by subtracting the number of coding passes for each code block in the attention area and the corresponding code amount information. It is characterized by being made smaller than the code amount of the code block.

またさらに、上記画像圧縮方法において、上記制御ステップは、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎コーディングパス数とそれに対する符号量情報に基づいて、一部の注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させ、その他の注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする。   Still further, in the image compression method, when the code amount of the subband is controlled, the control step uses the number of coding passes per subband and the code amount information corresponding thereto when using the two pieces of code amount information. Based on the above, in order to make the image quality in a part of the attention area higher than the image quality outside the attention area, the code number of the code block in the attention area is added by adding the number of coding passes for each code block in the attention area and the code amount information corresponding thereto The number of coding passes for each individual code block in the region of interest and the code amount information for it are increased in order to increase the amount more than the code amount of the code block outside the region of interest and lower the image quality in other regions of interest than the image quality outside the region of interest. By subtracting, the code amount of the code block in the attention area is reduced from the code amount of the code block outside the attention area.

第3の発明に係る画像圧縮方法のためのプログラムは、上記画像圧縮方法の制御ステップを含むことを特徴とするコンピュータにより実行可能なプログラムである。   A program for an image compression method according to a third aspect of the invention is a computer-executable program characterized by including a control step of the image compression method.

本発明に係る画像圧縮装置及び方法によれば、注目領域があるレートコントロールでは符号量制御手段をサブバンド毎に選択適用することができ、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   According to the image compression apparatus and method of the present invention, the code amount control means can be selected and applied for each subband in the rate control with the attention area, and the code amount when the rate control table with the ROI attention area is selected. The calculation efficiency can be improved.

また、注目領域内外の符号量調整において符号量計算サイクル数を減らすことができ、これにより、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   In addition, the number of code amount calculation cycles can be reduced in adjusting the code amount inside and outside the attention area, thereby improving the calculation efficiency of the code amount when the rate control table having the ROI attention area is selected.

さらに、注目領域内外の符号量調整において外部記憶装置へのアクセス回数を減らすことができ、これにより、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   Furthermore, it is possible to reduce the number of accesses to the external storage device in adjusting the code amount inside and outside the attention area, thereby improving the calculation efficiency of the code amount when selecting the rate control table with the ROI attention area.

また、サブバンド内注目領域の符号量が注目領域外の符号量より多くするときに効率的に符号量を計算することができる。   Also, the code amount can be calculated efficiently when the code amount in the subband attention area is larger than the code amount outside the attention area.

さらに、サブバンド内注目領域の符号量が注目領域外の符号量より少なくするときに効率的に符号量を計算することができる。   Furthermore, it is possible to efficiently calculate the code amount when the code amount of the subband attention area is smaller than the code amount outside the attention area.

またさらに、サブバンド内注目領域によって注目領域内の符号量を多くする或は少なくするときに効率的に符号量を計算することができる。   Furthermore, the code amount can be calculated efficiently when the code amount in the attention area is increased or decreased by the attention area in the subband.

以下、本発明に係る実施形態について図面を参照して説明する。なお、以下の各実施形態において、同様の構成要素については同一の符号を付している。   Hereinafter, embodiments according to the present invention will be described with reference to the drawings. In addition, in each following embodiment, the same code | symbol is attached | subjected about the same component.

実施形態の概要.
JPEG2000符号化処理の時に、上述した特許文献1,2に開示されているように、予め設定された目標の符号量に対し、算術符号化処理された符号データを下位から破棄し目標の符号量になるように調整する「レートコントロール」と呼ばれる方法がある(図13のレートコントロール回路32参照)。本発明の実施形態は、ビットシフト方式の替わりに、レートコントロールを行うときに、指定領域内と指定領域外において破棄するデータの量を調整することで、ROIと類似の効果を実現するものであり、特に、ROI注目領域があるレートコントロールテーブルの選択時(図3のステップS103)、コードブロック単位の符号量情報だけでなくサブバンド単位の符号量情報をも用いて符号量計算効率を向上させるための手段を提供することを特徴としている。具体的には、JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御する画像圧縮装置において、サブバンド毎の使用基準に基づいて、上記2つの符号量情報のうちのどの符号量情報を用いるか、もしくは両方の符号量情報を用いるかを決定してトランケーションしたときの符号量を計算することを特徴としている。
Outline of the embodiment.
At the time of JPEG2000 encoding processing, as disclosed in Patent Documents 1 and 2 described above, code data that has been subjected to arithmetic encoding processing is discarded from the lower order with respect to a preset target code amount, and the target code amount There is a method called “rate control” that adjusts so as to be (see the rate control circuit 32 in FIG. 13). The embodiment of the present invention realizes an effect similar to ROI by adjusting the amount of data to be discarded inside and outside the designated area when performing rate control instead of the bit shift method. In particular, when selecting a rate control table with ROI attention area (step S103 in FIG. 3), code amount calculation efficiency is improved using not only code block unit code amount information but also subband unit code amount information. It is characterized by providing means for making it happen. Specifically, at the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the corresponding code amount information, the number of coding passes for each code block, and the corresponding code amount information are input. In the image compression apparatus that controls the code amount of a subband with a region of interest, which code amount information of the two pieces of code amount information is used based on the usage standard for each subband, or both codes It is characterized in that the code amount when truncation is performed after determining whether to use the amount information is calculated.

実施形態.
図1は、ROI処理に類似したレートコントロール処理を含む本発明の実施形態に係る処理の流れを示す図である。本発明の実施形態では、図1に示すように、画像をウェーブレット変換し(ステップS1)、量子化し(ステップS2)、MQ(算術)符号化し(ステップS3)、ROI類似機能を有するレートコントロールを行い(ステップS4)、符号形成して(ステップS5)、圧縮画像データを得る(ステップS6)。
Embodiment.
FIG. 1 is a diagram showing a flow of processing according to an embodiment of the present invention including rate control processing similar to ROI processing. In the embodiment of the present invention, as shown in FIG. 1, the image is wavelet transformed (step S1), quantized (step S2), MQ (arithmetic) coded (step S3), and rate control having ROI-like functions is performed. Perform (step S4), code formation (step S5), and obtain compressed image data (step S6).

次に、本発明の実施形態に係るレートコントロールの手順について簡単に説明する。   Next, a rate control procedure according to an embodiment of the present invention will be briefly described.

図2は、コードブロック情報を読出しの実施例を示すブロック図である。JPEG2000符号化時、算術符号化処理後のデータは、各コードブロックの情報(ゼロビットプレーン数、コーディングパス数、コードブロック符号量、コーディングパス毎の符号量等)はパケットポインターと呼ばれる内部メモリ64領域に記録される。1個のコードブロックの情報は1個のパケットポインターを成す。各コードブロックのパケットポインターのメモリアドレスは、図2の61に示すコードブロックが所在するコンポーネント、解像度レベル、サブバンド情報、及び、62で示すサブバンド内コードブロックの位置情報によって一意に決定される(63)。また、サブバンド単位でコーディングパス毎に符号量がまとめられ内部メモリ64に記録される。これらの情報はレートコントロール時に読み出される。   FIG. 2 is a block diagram showing an embodiment of reading the code block information. At the time of JPEG2000 encoding, the data after arithmetic encoding processing is the information of each code block (the number of zero bit planes, the number of coding passes, the code block code amount, the code amount for each coding pass, etc.) is an internal memory 64 called a packet pointer. Recorded in the area. The information of one code block forms one packet pointer. The memory address of the packet pointer of each code block is uniquely determined by the component in which the code block indicated by 61 in FIG. 2 is located, the resolution level, the subband information, and the position information of the intra-subband code block indicated by 62. (63). In addition, the code amount is grouped for each coding pass in units of subbands and recorded in the internal memory 64. These pieces of information are read out during rate control.

あるコンポーネント、解像度レベルに属するサブバンドのメモリスタートアドレスをSA(SUB)、サブバンド内コードブロックの垂直・水平方向の位置を(Y、X)とすると、コードブロック情報が格納されているメモリ上の先頭アドレスSA(CB)は以下のようになる。   If the memory start address of a subband belonging to a certain component and resolution level is SA (SUB), and the vertical and horizontal position of the code block in the subband is (Y, X), the code block information is stored on the memory. The start address SA (CB) of the is as follows.

[数1]
[SA(CB)=SA(SUB)+Y×Xh+X]
[Equation 1]
[SA (CB) = SA (SUB) + Y × Xh + X]

ここで、Xhはサブバンドの水平方向のコードブロック数とする。図2の加算器の記号は上記式に相当する。以下に説明するレートコントロールの処理では、コードブロックの位置からパケットポインターのアドレスを算出し(63)、内部メモリ64からそのパケットポインターを読み出し、コードブロック情報(コーディングパス数、バイト数等)を抽出する(65)。   Here, Xh is the number of code blocks in the horizontal direction of the subband. The symbol of the adder in FIG. 2 corresponds to the above formula. In the rate control process described below, the address of the packet pointer is calculated from the position of the code block (63), the packet pointer is read from the internal memory 64, and the code block information (the number of coding passes, the number of bytes, etc.) is extracted. (65).

図3は、一般的なレートコントロール処理の流れを示す図である。レートコントロールは大きく分けて2つの過程からなる。   FIG. 3 is a diagram showing a flow of general rate control processing. Rate control is roughly divided into two processes.

1つ目はレートコントロールテーブルを選択する過程(A)である。これは、複数用意されたレートコントロールテーブルから使用すべきテーブルを1つ決定する過程(A)である。   The first is a process (A) for selecting a rate control table. This is a process (A) of determining one table to be used from a plurality of prepared rate control tables.

2つ目はトランケーション過程(B)である。これは、選択したトランケーションテーブルを使用して各コードブロックのコーディングパスをトランケーションし、符号量情報を変更してゆく過程である。   The second is the truncation process (B). This is a process of truncating the coding pass of each code block using the selected truncation table and changing the code amount information.

トランケーションテーブルにはサブバンド毎にそのサブバンド内のコードブロックのコーディングパスのトランケーション量が記述されている。解像度レベル5のトランケーションテーブルの例を次に示す。   In the truncation table, the truncation amount of the coding pass of the code block in the subband is described for each subband. An example of a truncation table with resolution level 5 is shown below.

[表1]
―――――――――――――――――――――――――――
i194 c0: 1, 1 1 1, 1 1 1, 1 1 1, 2 2 2, 6 6 11
i194 c1: 1, 2 2 2, 2 2 3, 4 4 5, 6 7 9, 11 11 16
i194 c2: 1, 1 1 2, 2 2 3, 3 3 4, 5 5 7, 9 9 12
―――――――――――――――――――――――――――
[Table 1]
―――――――――――――――――――――――――――
i194 c0: 1, 1 1 1, 1 1 1, 1 1 1, 2 2 2, 6 6 11
i194 c1: 1, 2 2 2, 2 2 3, 4 4 5, 6 7 9, 11 11 16
i194 c2: 1, 1 1 2, 2 2 3, 3 3 4, 5 5 7, 9 9 12
―――――――――――――――――――――――――――

ここで、それぞれの数字は以下のことを示す。
C0:コンポーネント0。具体的にはY成分を示す。
C1:コンポーネント1。具体的にはCb成分を示す。
C2:コンポーネント2。具体的にはCr成分を示す。
Here, the numbers indicate the following.
C0: Component 0. Specifically, the Y component is indicated.
C1: Component 1. Specifically, the Cb component is shown.
C2: Component 2. Specifically, the Cr component is shown.

各列の数字は(C0:5LL,5HL−LH−HH,4HL−LH−HH,3HL−LH−HH,2HL−LH−HH,1HL−LH−HH)のように、
(a)5LL:レベル5LL成分のサブバンドのコーディングパス単位のトランケーション量
(b)5HL−LH−HH:レベル5のHL成分とLH成分とHH成分のサブバンドのコーディングパス単位のトランケーション量
(c)4HL−LH−HH:レベル4のHL成分とLH成分とHH成分のサブバンドのコーディングパス単位のトランケーション量
(d)3HL−LH−HH:レベル3のHL成分とLH成分とHH成分のサブバンドのコーディングパス単位のトランケーション量
(e)2HL−LH−HH:レベル2のHL成分とLH成分とHH成分のサブバンドのコーディングパス単位のトランケーション量
(f)1HL−LH−HH:レベル1のHL成分とLH成分とHH成分のサブバンドのコーディングパス単位のトランケーション量
をそれぞれ表す。
このようなテーブルデータはメモリ上、スタートアドレスから小さい順で配置される。
The numbers in each column are (C0: 5LL, 5HL-LH-HH, 4HL-LH-HH, 3HL-LH-HH, 2HL-LH-HH, 1HL-LH-HH),
(A) 5LL: truncation amount of subband of level 5LL component in coding pass unit (b) 5HL-LH-HH: truncation amount of subband of level 5 HL component, LH component, and HH component (c) ) 4HL-LH-HH: truncation amount in coding pass unit of level 4 HL component, LH component, and HH component (d) 3HL-LH-HH: level 3 HL component, LH component, HH component sub Truncation amount in band coding pass unit (e) 2HL-LH-HH: Truncation amount in coding pass unit in subband of level 2 HL component, LH component and HH component (f) 1HL-LH-HH: level 1 Truncations of sub-band coding pass of HL component, LH component and HH component Representing ® down the amount, respectively.
Such table data is arranged on the memory in ascending order from the start address.

まず、レートコントロールテーブルを選択する過程(A)を説明する。レートコントロールがスタートしたら、トランケーションテーブルを1つ選択し(ステップS101)、サブバンドのコーディングパス毎の符号量情報をメモリ上より読み出し(ステップS102)、選択したトランケーションテーブルに従ってトランケーションを行った場合のサブバンドの符号量を計算し(ステップS103)、ステップS103の処理を全てのサブバンドに対して行い、算出した符号量が目標符号量に達した場合は、それを最終的なトランケーションテーブルとしステップS105に進み、算出した符号量が目標符号量に達しない場合は目標値との差に従って次のテーブルを選択するためステップS101に戻る。これにより目標の符号量になるためのトランケーション量が決定される。   First, the process (A) for selecting the rate control table will be described. When rate control is started, one truncation table is selected (step S101), the code amount information for each subband coding pass is read from the memory (step S102), and the truncation is performed according to the selected truncation table. The code amount of the band is calculated (step S103), and the process of step S103 is performed for all the subbands. If the calculated code amount reaches the target code amount, this is used as a final truncation table. If the calculated code amount does not reach the target code amount, the process returns to step S101 to select the next table according to the difference from the target value. Thereby, the truncation amount for achieving the target code amount is determined.

次に、トランケーション(B)の流れについて説明する。トランケーションをスタートし(ステップS105)、1個のコードブロックの情報をメモリ上より読出し(ステップS106)、選択したトランケーションテーブルに従ってコードブロックのコーディングパスのトランケーションを行い(ステップS107)、それを反映したコードブロックの情報を求め、新しいコードブロック情報としてメモリ上に書き込む(ステップS108)。全てのコードブロックに対しての処理が終わったら(ステップS109:Y)、レートコントロールを終了する。このように、上記レートコントロールの処理では、サブバンド単位でトランケーションされるコーディングパス数が同じになる。   Next, the flow of truncation (B) will be described. Truncation is started (step S105), the information of one code block is read from the memory (step S106), truncation of the coding block coding path is performed according to the selected truncation table (step S107), and the code reflecting it Block information is obtained and written into the memory as new code block information (step S108). When processing for all code blocks is completed (step S109: Y), the rate control is terminated. Thus, in the rate control process, the number of coding passes to be truncated in subband units is the same.

次に、本発明の実施形態を、符号化時レートコントロールの際に空間的座標位置で判定される指定領域内でトランケーションを実施せず全体の符号量を調整する実施例を用いて説明する。   Next, an embodiment of the present invention will be described using an example in which the entire code amount is adjusted without performing truncation within a designated area determined by a spatial coordinate position at the time of encoding rate control.

なお、本発明の実施形態では、コードブロック単位でのトランケーション量を調整することでROI類似効果を実現しているので、復号化時に特別な処理を必要としない。   In the embodiment of the present invention, since the ROI similarity effect is realized by adjusting the truncation amount in units of code blocks, no special processing is required at the time of decoding.

図4は、指定領域があるときのレートコントロール処理の流れを示す図である。以下、トランケーションテーブル選択の流れについて説明する。まず、ステップS201で、トランケーションテーブルを1つ選択し、ステップS202で、1個のコードブロック情報をメモリ上より読み出す。次に、当該コードブロックが指定領域内のコードブロックであれば(ステップS203:Y)、トランケーション量を0とし、全体符号量に当該コードブロックの符号量を加算する(ステップS205)。当該コードブロックが指定領域外のコードブロックであれば(ステップS203:N)、選択したトランケーションテーブルに従ってコーディングパスのトランケーションを行った時の、コードブロックの符号量を計算し(ステップS204)、全体符号量に加算する(ステップS205)。   FIG. 4 is a diagram showing the flow of rate control processing when there is a designated area. Hereinafter, the flow of truncation table selection will be described. First, one truncation table is selected in step S201, and one code block information is read from the memory in step S202. Next, if the code block is a code block in the designated area (step S203: Y), the truncation amount is set to 0, and the code amount of the code block is added to the entire code amount (step S205). If the code block is a code block outside the designated area (step S203: N), the code amount of the code block when truncating the coding pass is performed according to the selected truncation table (step S204), and the entire code Add to the quantity (step S205).

以上の処理(ステップS201〜205)を全てのコードブロックに対して行い、全体符号量が目標符号量に達した場合あるいは最後のトランケーションテーブルに達した場合は(ステップS206:Y)、それを最終的なトランケーションテーブルとする。その他の場合は(ステップS207:N)、目標値との差に従って次のテーブルを選択するためステップS201に戻る。   The above processing (steps S201 to S205) is performed for all code blocks. When the total code amount reaches the target code amount or when the last truncation table is reached (step S206: Y), the final code amount is finalized. A typical truncation table. In other cases (step S207: N), the process returns to step S201 to select the next table according to the difference from the target value.

次に、トランケーションの流れについて説明する。ステップS208でトランケーションを開始し、1個のコードブロック情報をメモリ上より読み出す(ステップS209)。読み出した当該コードブロックが指定領域内のコードブロックであれば(ステップS210:Y)、トランケーション量を0とし、コードブロック情報をそのままとする(ステップS211)。当該コードブロックが指定領域外のコードブロックであれば(ステップS210:N)、選択したトランケーションテーブルに従ってコーディングパスのトランケーションを行い(ステップS212)、それを反映したコードブロックの情報を求める。次のステップS213で、求めた情報を新しいコードブロック情報としてメモリ上に書き込む。上記ステップS210〜S213を全てのコードブロックに関して行ったら(ステップS214:Y)、レートコントロールを終了する。指定領域のないレートコントロール処理と比べ、主な異同はコードブロックが指定領域内にあるか否かによって異なる処理を行う点である。   Next, the truncation flow will be described. Truncation is started in step S208, and one piece of code block information is read from the memory (step S209). If the read code block is a code block in the designated area (step S210: Y), the truncation amount is set to 0 and the code block information is left as it is (step S211). If the code block is a code block outside the designated area (step S210: N), truncation of the coding pass is performed in accordance with the selected truncation table (step S212), and information on the code block reflecting this is obtained. In the next step S213, the obtained information is written on the memory as new code block information. When the above steps S210 to S213 are performed for all code blocks (step S214: Y), the rate control is terminated. Compared with rate control processing without a designated area, the main difference is that different processing is performed depending on whether or not the code block is in the designated area.

次に、指定空間領域に属するコードブロックの計算について説明する。図5は、指定領域に属するコードブロックの例を示す図である。ROI領域を長方形とし、その空間的情報は左上の頂点Aと右下の頂点Bで決定される。もとの画像が解像度レベル0とすると、解像度レベルが1つ上がると、対するサブバンドのサイズが二分の一になる。したがって元画像の指定領域は、解像度レベルが1つ上がると、図5に示すように、対するサブバンドの中でのサイズが二分の一になる。つまり、大きさが2のべき乗のコードブロックについて、ROI領域の頂点AとBの上位ビットを見ればそのコードブロックが指定領域に属するかどうかの判定ができる。   Next, calculation of code blocks belonging to the designated space area will be described. FIG. 5 is a diagram illustrating an example of code blocks belonging to the designated area. The ROI area is a rectangle, and the spatial information is determined by the upper left vertex A and the lower right vertex B. Assuming that the original image has a resolution level of 0, when the resolution level is increased by 1, the size of the corresponding subband is halved. Therefore, when the resolution level of the designated area of the original image is increased by one, the size in the corresponding subband is halved as shown in FIG. That is, with respect to a code block having a power of two, whether the code block belongs to the designated area can be determined by looking at the upper bits of the vertices A and B of the ROI area.

図6は、指定領域内のコードブロックの計算の例を示す図である。画像サイズが「8192×8192」以下の場合、X方向座標は14ビットのレジスターでまかなえる。解像度レベル1の時、対するサブバンドのサイズが1/2になるから、レジスターの最上位ビット(13ビット目)から最下位ビット(0ビット目)より1つ上のビット(1ビット目)まではサブバンド内のX方向座標を表す。一方、コードブロックサイズが32(2の5乗)のとき、下位5ビット(1〜5)はコードブロック内のX座標を表し、上位8ビット(6〜13)はコードブロックのX方向座標を表す。Y方向はX方向と同じで、レベル1以上は類推する。このようにしてコードブロックの位置やコードブロック内の位置を算出できる。   FIG. 6 is a diagram illustrating an example of calculation of a code block in a designated area. When the image size is “8192 × 8192” or less, the X-direction coordinates can be covered by a 14-bit register. When the resolution level is 1, the size of the corresponding subband is halved, so from the most significant bit (13th bit) to the bit (1st bit) one bit higher than the least significant bit (0th bit) Represents the X-direction coordinate in the subband. On the other hand, when the code block size is 32 (2 to the 5th power), the lower 5 bits (1 to 5) represent the X coordinate in the code block, and the upper 8 bits (6 to 13) represent the X direction coordinate of the code block. Represent. The Y direction is the same as the X direction, and level 1 and higher are analogized. In this way, the position of the code block and the position in the code block can be calculated.

図7は、指定領域があるときのトランケーションテーブル選択の実施例を示す図である。トランケーションテーブルを選択するとき、メモリからのテーブルスタートアドレスTA(ST)にテーブルアドレスオフセット(TAO)を加えた値をテーブルアドレス(TA)とする[すなわち、TA=TA(ST)+TAO](ステップS301)。テーブルアドレスオフセット(TAO)は、個々のテーブルがテーブルスタートアドレスTA(ST)からのオフセット値を表す。テーブルスタートアドレスTAに基づいてメモリからテーブル(TBL)を一枚読み出し、レジスターに記録する(ステップS302)。   FIG. 7 is a diagram showing an example of truncation table selection when there is a designated area. When selecting a truncation table, a value obtained by adding a table address offset (TAO) to a table start address TA (ST) from the memory is used as a table address [TA] [ie, TA = TA (ST) + TAO] (step S301). ). The table address offset (TAO) represents an offset value from the table start address TA (ST) for each table. One table (TBL) is read from the memory based on the table start address TA and recorded in the register (step S302).

次に、コードブロック(CB)のパケットポインターアドレスに基づいてメモリから当該コードブロックのパケットポインターを読み出し、パケットポインターのコードブロック情報(コーディングパス数CP、符号量BYTE、コーディングパス毎の符号量CP_BYTE(N))を抽出する(ステップS303)。当該コードブロックが指定領域外であれば(ステップS304:N)、コーディングパス数(CP)にトランケーションテーブルの値(TBL)で減算し、得た結果をレートコントロール後のコーディングパスとする[CP=CP−TBL](ステップS305)。また、コーディングパス毎の符号量情報(CP_BYTE(N))に基づいて、上位のコーディングパスから減算後のコーディングパスまでの符号量を計算し、得た結果をレートコントロール後の符号量とする[TB=TB+CP_BYTE(N)](ステップS305)。   Next, based on the packet pointer address of the code block (CB), the packet pointer of the code block is read from the memory, and the code block information (coding path number CP, code amount BYTE, code amount CP_BYTE (for each coding pass) of the packet pointer is read. N)) is extracted (step S303). If the code block is outside the designated area (step S304: N), the coding pass number (CP) is subtracted by the truncation table value (TBL), and the obtained result is used as a rate-controlled coding pass [CP = CP-TBL] (step S305). Also, based on the code amount information (CP_BYTE (N)) for each coding pass, the code amount from the upper coding pass to the subtracted coding pass is calculated, and the obtained result is used as the code amount after rate control [ TB = TB + CP_BYTE (N)] (step S305).

一方、当該コードブロックが指定領域内であれば(ステップS304:Y)、減算処理せずに、符号量(BYTE)をそのままレートコントロール後の符号量とする[TB=TB+BYTE](ステップS306)。このようにして全てのコンポーネント及び解像度レベル、サブバンドのコードブロックに対し計算し、結果符号量(TB)を目標符号量と比較し、上まっていればより大きいトランケーションテーブルを、下回っていればより小さいトランケーションテーブルを選択する。   On the other hand, if the code block is within the designated area (step S304: Y), the code amount (BYTE) is directly used as the code amount after rate control without performing the subtraction process [TB = TB + BYTE] (step S306). In this way, the calculation is performed for all the components, resolution levels, and subband code blocks, and the resulting code amount (TB) is compared with the target code amount. Select a smaller truncation table.

トランケーションテーブルは小さい順で配置されるので、アドレスオフセット(TAO)が大きければテーブルの値も大きくなる。最初はアドレスオフセット増加の方向(幅は一定)でテーブルを選択してゆき、符号量が設定量より小さくなった時点で幅を半分にし、アドレスオフセット減少の方向でテーブルを選択する。このようにしてアドレスオフセットを更新してゆき(TAO更新)、徐々に捜査範囲を狭めてゆき、目標のテーブルに辿り付く。一番大きいトランケーションテーブルを選択しても目標の符号量に達しない場合、そこで処理を終了し、そのときのトランケーションテーブルを目標のテーブルとし、そのときの符号量を目標の符号量とする(ステップS307〜S308)。   Since truncation tables are arranged in ascending order, the table value increases as the address offset (TAO) increases. Initially, the table is selected in the direction of increasing address offset (the width is constant). When the code amount becomes smaller than the set amount, the width is halved, and the table is selected in the direction of decreasing address offset. In this manner, the address offset is updated (TAO update), the search range is gradually narrowed, and the target table is reached. If the target code amount is not reached even when the largest truncation table is selected, the processing ends there, the truncation table at that time is set as the target table, and the code amount at that time is set as the target code amount (step S307 to S308).

図8は、指定領域があるときのトランケーションの実施例を示す図である。まず、各コードブロックのパケットポインターを読み出し、コーディングパス数や符号量(バイト数)など必要な情報を取り出す(ステップS401)。指定領域内のコードブロックは(ステップS402:Y)、トランケーション量が0でコードブロック情報に変更がないため、書込みを行う必要がなく次のコードブロックの処理に進む(ステップS408)。指定領域外のコードブロックは(ステップS402:N)、トランケーションテーブル値でコーディングパスをトランケーションした後、結果のコーディングパス数の符号量を計算し(ステップS403〜S406)、コードブロックの情報を更新するためパケットポインターのメモリへの書込みを行う(ステップS407)。全てのコードブロックに対し作業を終えたら、トランケーションを終了する。   FIG. 8 is a diagram illustrating an example of truncation when there is a designated area. First, the packet pointer of each code block is read, and necessary information such as the number of coding passes and the amount of code (number of bytes) is extracted (step S401). Since the code block in the designated area (step S402: Y) has a truncation amount of 0 and there is no change in the code block information, it is not necessary to perform writing, and the processing proceeds to the next code block (step S408). For the code block outside the designated area (step S402: N), after truncating the coding pass with the truncation table value, the code amount of the resulting number of coding passes is calculated (steps S403 to S406), and the code block information is updated. Therefore, the packet pointer is written into the memory (step S407). When you have finished working on all code blocks, end truncation.

このようにして、指定領域内のコードブロックは、データのトランケーションを避けることで、指定領域外のコードブロックに比べより多くのデータ(情報)を保持することとなり、結果的に指定領域外より指定領域内の画質が良く、視覚上ビットシフト方式によるROI機能に近い効果を得ることができ、つまりROIと類似する機能の実現である。   In this way, the code block in the specified area retains more data (information) than the code block outside the specified area by avoiding data truncation. As a result, it is specified from outside the specified area. The image quality in the region is good, and an effect similar to the ROI function by the bit shift method can be obtained visually, that is, the function similar to the ROI is realized.

また、複数のフレームを連続して処理するような場合、特定のフレームに対しては、レートコントロール(第2の符号制御量基準を用いるコードブロックを予め指定された空間的座標位置によって決定)を実施し、それ以外のフレームに対しては従来技術に係るレートコントロールを実施する。これにより、特定フレームの特定位置の高画質化を計ることができる。   Further, when processing a plurality of frames continuously, rate control (determining a code block using the second code control amount criterion based on a spatial coordinate position designated in advance) is performed for a specific frame. The rate control according to the prior art is performed for other frames. Thereby, it is possible to improve the image quality at a specific position of a specific frame.

なお、JPEG2000は画像データの圧縮伸長に関する形式であり、この形式に従い画像データを圧縮あるいは伸長するには、ハードウェア資源を必要とする。ハードウェア資源としてのコンピュータによって画像処理用のコンピュータプログラムを実行することにより実現される。つまり、コンピュータの記憶装置、例えばハードディスクドライブ(HDD)にJPEG2000形式の画像データ圧縮伸長用の画像処理用コンピュータプログラムをインストールしておき、コンピュータがCPU及びメモリから構築される基本アーキテクチャによってそのような画像処理用のコンピュータプログラムを解釈し、入力画像に対するJPEG2000形式の画像圧縮処理を実行したり、あるいは、JPEG2000形式で圧縮された画像データを伸長したりする。   JPEG2000 is a format related to compression / decompression of image data, and hardware resources are required to compress or decompress image data according to this format. This is realized by executing a computer program for image processing by a computer as a hardware resource. In other words, an image processing computer program for image data compression / decompression in JPEG2000 format is installed in a computer storage device, for example, a hard disk drive (HDD), and such an image is created by a basic architecture in which the computer is constructed from a CPU and a memory. It interprets a computer program for processing and executes JPEG 2000 format image compression processing on the input image, or decompresses image data compressed in JPEG 2000 format.

画像処理用のコンピュータプログラムは、ハードディスクドライブ(HDD)、光学的又は磁気的に情報を記録する各種の光ディスクやフレキシブルディスク等の可搬性を有する各種の記録メディア、あるいはインターネットなどのネットワークを介して市場に流通させることができる。   Computer programs for image processing are marketed via hard disk drives (HDDs), various recording media having optical or magnetic recording information, various portable recording media such as flexible disks, or networks such as the Internet. Can be distributed.

次いで、本発明の実施形態に係るレートコントロールしたときの符号量計算方法について以下に検討する。   Next, the code amount calculation method when rate control according to the embodiment of the present invention is examined below.

JPEG2000符号化処理の時に、予め設定された目標の符号量に対し、算術符号化処理された符号データを下位から破棄し目標の符号量になるように調整する、レートコントロールと呼ばれる方法がある。またレートコントロールを行うときに、指定領域内と指定領域外において破棄するデータの量を調整することで、ROIの相似効果を実現することができる。   There is a method called rate control in which, during the JPEG2000 encoding process, the code data subjected to the arithmetic encoding process is discarded from the lower order with respect to a preset target code amount so as to be adjusted to the target code amount. Further, when performing rate control, the ROI similarity effect can be realized by adjusting the amount of data to be discarded inside and outside the designated area.

ROI領域がないときのレートコントロールは、MQ符号化器からのサブバンド毎符号量情報を使用して符号量計算するために対して、ROI領域があるときのレートコントロールはコードブロック毎に符号量の調整が必要なので、MQ符号化器からのコードブロック毎符号量情報を使用して符号量計算する。この際、個々のコードブロックの符号量情報を外部メモリからリードし下位から破棄する符号データ量を計算してゆくので、サブバンド毎符号量情報を使用した場合と比べて計算時間及び外部メモリへのアクセス回数の増大が考えられる。   The rate control when there is no ROI region is to calculate the code amount using the code amount information per subband from the MQ encoder, whereas the rate control when there is the ROI region is the code amount for each code block. Therefore, the code amount is calculated using the code amount information for each code block from the MQ encoder. At this time, the code data amount of each code block is read from the external memory and the code data amount to be discarded from the lower order is calculated, so that the calculation time and the external memory are compared with the case where the code amount information for each subband is used. The number of accesses can be increased.

本発明の実施形態は、レートコントロール時ROI類似効果を実現する際、コードブロック毎の符号量情報だけでなくサブバンド毎の符号量情報も使用してサブバンドで破棄する符号データ量を効率よく計算する手段を提供するものである。   The embodiment of the present invention efficiently uses the code amount information for each code block as well as the code amount information for each subband to efficiently reduce the amount of code data discarded in the subband when realizing the ROI similarity effect during rate control. It provides a means for calculation.

以上の説明からトランケーションテーブル選択の過程(図3のステップS103及び図4のステップS204,S210−S212)においてROI指定領域がないとき、サブバンドのコーディングパス毎の符号量情報が使用されるのに対して、ROI指定領域があるときはコードブロックのコーディングパス毎の符号量情報が使用されることがわかる。以下、ROI指定領域が有ると無しの場合についてそれぞれの符号量計算及びメモリアクセス回数について説明する。   From the above description, when there is no ROI designation area in the truncation table selection process (step S103 in FIG. 3 and steps S204, S210 to S212 in FIG. 4), the code amount information for each subband coding pass is used. On the other hand, when there is an ROI designation area, it can be seen that the code amount information for each coding pass of the code block is used. Hereinafter, the code amount calculation and the number of memory accesses will be described in the case where there is no ROI designation area.

図14は本発明の実施形態に係るサブバンドのコーディングパス毎の符号量情報の一例(Y成分、1HL)を示すブロック図である。また、図15は本発明の実施形態に係るコードブロックのコーディングパス毎の符号量情報の一例を示すブロック図である。   FIG. 14 is a block diagram showing an example (Y component, 1HL) of code amount information for each subband coding pass according to the embodiment of the present invention. FIG. 15 is a block diagram showing an example of code amount information for each coding pass of the code block according to the embodiment of the present invention.

図4及び図5において、画像サイズが1024×1024で解像度レベルが3、コードブロックサイズが32、トランケーションテーブルの値は5であるとし、Y成分レベル1HLサブバンドの処理例について説明する。また簡単なためサブバンド内コードブロックのコーディングパス数を一律30とする。   In FIG. 4 and FIG. 5, a processing example of the Y component level 1 HL subband will be described assuming that the image size is 1024 × 1024, the resolution level is 3, the code block size is 32, and the truncation table value is 5. For simplicity, the number of coding passes of the intra-subband code block is uniformly 30.

まず、ケース1で注目領域がない場合、レートコントロールはサブバンドのコーディングパス毎の符号量情報をメモリから1回読み出す。   First, when there is no attention area in case 1, the rate control reads out the code amount information for each subband coding pass from the memory once.

図16は本発明の実施形態に係る注目領域が無いときの符号量の計算例(ケース1)を示すブロック図である。図16において、トランケーションテーブルの値が5なので、MQ後の総符号量から、サブバンドコーディングパス毎符号量情報の下位5個のコーディングパスの対応する符号量を差し引いた値がトランケーション後の当該サブバンドの符号量となる。サブバンド最下位のコーディングパが30で、下位からの5個のコーディングパスがそれぞれ30、29,28,27,26である。この際、1個のコーディングパスの符号量を計算するために1サイクルであるとすると、合計で5サイクルの計算が必要になる。   FIG. 16 is a block diagram showing a calculation example (case 1) of the code amount when there is no region of interest according to the embodiment of the present invention. In FIG. 16, since the value of the truncation table is 5, the value obtained by subtracting the code amount corresponding to the lower five coding passes of the code amount information for each subband coding pass from the total code amount after MQ is the sub code after truncation. This is the code amount of the band. The coding band of the lowest subband is 30 and the five coding paths from the lower order are 30, 29, 28, 27, and 26, respectively. At this time, if one cycle is required to calculate the code amount of one coding pass, a total of five cycles are required.

次に、注目領域がある場合、レートコントロールはサブバンド内各コードブロックのコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、総アクセス回数はサブバンド内のコードブロック数×1コードブロックのメモリアクセス数=32×32×1=1024回となる。   Next, when there is a region of interest, the rate control reads out the code amount information for each coding pass of each code block in the subband once from the memory, so the total access count is the number of code blocks in the subband × 1 code block Memory access number = 32 × 32 × 1 = 1024 times.

ここで、以下3つのケースについて計算を行う。   Here, the following three cases are calculated.

まず、ケース2.1で注目領域の数は1、注目領域内のコードブロック数は1、注目領域内のコーディングパス数の調整量はトランケーションテーブルの値−3であるとする。   First, in case 2.1, it is assumed that the number of attention areas is 1, the number of code blocks in the attention area is 1, and the adjustment amount of the number of coding passes in the attention area is a value −3 of the truncation table.

図17は、本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.1)を示すブロック図である。なお、図17乃至図22において、各1つのブロックが1個のROIに対応したコードブロックであり、水平面が2次元画像に対応するコードブロックであり、最上部のコードブロックがMSB(最上位)に対応し、最下部のコードブロックがMLB(最下位)に対応する。   FIG. 17 is a block diagram illustrating a code amount calculation example (case 2.1) based only on code block information when there is a region of interest according to the embodiment of the present invention. In FIGS. 17 to 22, each block is a code block corresponding to one ROI, the horizontal plane is a code block corresponding to a two-dimensional image, and the uppermost code block is an MSB (most significant). , And the lowest code block corresponds to MLB (lowest).

図17において、トランケーションテーブルの値が5なので、当該サブバンドのトランケーション後の符号量は注目領域内において各コードブロックのコーディングパス数を下位から5−3=2パスを破棄したとき残りのコーディングパスに対する符号量の合計である。それ以外のコードブロックで各コードブロックのコーディングパス数を下位から5パスを破棄したとき残りのコーディングパスに対する符号量の合計となる。   In FIG. 17, since the truncation table value is 5, the code amount after truncation of the subband is the remaining coding pass when the number of coding passes of each code block is discarded from the lower 5-3 = 2 passes within the region of interest. Is the total amount of codes for. When the number of coding passes of each code block in the other code blocks is discarded from the lower 5 passes, the total code amount for the remaining coding passes is obtained.

例えば、注目領域内のコードブロックにおいて下位の2個のコーディングパス30,29を破棄し、28から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。注目領域外のコードブロックにおいて下位の30、29、28、27,26のコーディングパスを破棄し、25から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。この際、1コードブロックの1個のコーディングパスの符号量を計算するために1サイクルであるとすると、注目領域内の各コードブロックでトランケーション後の符号量を計算するために30−2=28サイクル、それ以外のコードブロックのトランケーション後の符号量を計算するために30−5=25サイクルの計算が必要になる。サブバンド内全コードブロックのトランケーション後の符号量を計算するために合計で1×28+(32×32−1)×25=25603サイクルが必要である。   For example, the lower two coding passes 30 and 29 in the code block in the region of interest are discarded, and the total code amount for each coding pass from 28 to 1 becomes the code amount after truncation of the code block. The lower 30, 30, 28, 27, and 26 coding passes are discarded in the code block outside the region of interest, and the total amount of code for each coding pass from 25 to 1 is the code amount after truncation of the code block. . At this time, assuming that one cycle is required to calculate the code amount of one coding pass of one code block, 30−2 = 28 to calculate the code amount after truncation in each code block in the region of interest. In order to calculate the code amount after truncation of other code blocks, it is necessary to calculate 30−5 = 25 cycles. A total of 1 × 28 + (32 × 32−1) × 25 = 25603 cycles is required to calculate the code amount after truncation of all code blocks in the subband.

次に、ケース2.2で注目領域の数は2、注目領域Aのコードブロック数は200、注目領域A内のコーディングパス数の調整量はトランケーションテーブルの値−4とする。注目領域Bのコードブロック数は300、注目領域B内のコーディングパス数の調整量はトランケーションテーブルの値+2であるとする。   Next, in case 2.2, the number of attention areas is 2, the number of code blocks in attention area A is 200, and the adjustment amount of the number of coding passes in attention area A is a truncation table value −4. It is assumed that the number of code blocks in the attention area B is 300, and the adjustment amount of the number of coding passes in the attention area B is the truncation table value +2.

図18は本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.2)を示すブロック図である。図18において、注目領域Aにおいてはトランケーションテーブルの値が5で、当該サブバンドのトランケーション後の符号量は注目領域内のコードブロックでコーディングパス数を下位から5―4=1パスを破棄したとき残りのコーディングパスに対する符号量の合計である。   FIG. 18 is a block diagram illustrating a code amount calculation example (case 2.2) based only on code block information when there is a region of interest according to the embodiment of the present invention. In FIG. 18, the truncation table value is 5 in the attention area A, and the code amount after truncation of the subband is the code block in the attention area when the number of coding passes is 5-4 = 1 from the lower order is discarded. This is the total code amount for the remaining coding passes.

注目領域Bにおいてはトランケーションテーブルの値が5で、当該サブバンドのトランケーション後の符号量は注目領域内のコードブロックでコーディングパス数を下位から5+2=7個のパスを破棄したとき残りのコーディングパスに対する符号量の合計である。それ以外のコードブロックで各コードブロックのコーディングパス数を下位から5個のコーディングパスを破棄したとき残りのコーディングパスに対する符号量の合計となる。例えば、注目領域A内のコードブロックにおいて下位の1個のコーディングパス30を破棄し、29から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。注目領域B内のコードブロックにおいて下位の7個のコーディングパス30から24を破棄し、23から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。   In the attention area B, the truncation table value is 5, and the code amount after truncation of the subband is the remaining coding path when the number of coding passes in the code block in the attention area is discarded from the lower 5 + 2 = 7 paths. Is the total amount of codes for. When the number of coding passes in the other code blocks is discarded, the code amount for the remaining coding passes becomes the sum of the coding passes from the lower five. For example, the lower one coding pass 30 in the code block in the attention area A is discarded, and the total code amount for each coding pass from 29 to 1 becomes the code amount after truncation of the code block. The lower seven coding passes 30 to 24 in the code block in the attention area B are discarded, and the total code amount for each coding pass from 23 to 1 is the code amount after truncation of the code block.

注目領域外のコードブロックにおいて下位の5個のコーディングパス30から26のコーディングパスを破棄し、25から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。この際、1コードブロックの1個のコーディングパスの符号量を計算するために1サイクルであるとすると、注目領域A内1個のコードブロックでトランケーション後の符号量を計算するために合計で30−1=29サイクル、注目領域B内1個のコードブロックでトランケーション後の符号量を計算するために合計で30−7=23サイクル、注目領域外1個のコードブロックのトランケーション後の符号量を計算するために合計25サイクルの計算が必要になる。サブバンド内全コードブロックのトランケーション後の符号量を計算するために合計200×29+300×23+(32×32−500)×25=25800サイクルが必要である。   In the code block outside the region of interest, the lower five coding passes 30 to 26 are discarded, and the total code amount for each coding pass from 25 to 1 is the code amount after truncation of the code block. At this time, assuming that one cycle is required to calculate the code amount of one coding pass of one code block, a total of 30 code amounts are calculated to calculate the code amount after truncation for one code block in the region of interest A. -1 = 29 cycles, in order to calculate the code amount after truncation for one code block in the attention area B, a total of 30-7 = 23 cycles, the code amount after truncation of one code block outside the attention area A total of 25 cycles are required to calculate. A total of 200 × 29 + 300 × 23 + (32 × 32−500) × 25 = 25800 cycles is required to calculate the code amount after truncation of all code blocks in the subband.

次にケース2.3でトランケーションテーブ値は26、注目領域の数は2、注目領域Aのコードブロック数は200、注目領域A内のコーディングパス数の調整量はトランケーションテーブルの値−4とする。注目領域Bのコードブロック数は800、注目領域B内のコーディングパス数の調整量はトランケーションテーブルの値+2であるとする。   Next, in case 2.3, the truncation table value is 26, the number of attention areas is 2, the number of code blocks in attention area A is 200, and the adjustment amount of the number of coding passes in attention area A is the truncation table value −4. . It is assumed that the number of code blocks in the attention area B is 800, and the adjustment amount of the number of coding passes in the attention area B is the truncation table value +2.

図19は本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.3)を示すブロック図である。図19において、注目領域Aにおいてはトランケーションテーブルの値が26で、当該サブバンドのトランケーション後の符号量は注目領域内のコードブロックでコーディングパス数を下位から26―4=22パスを破棄したとき残りのコーディングパスに対する符号量の合計である。   FIG. 19 is a block diagram illustrating a code amount calculation example (case 2.3) based only on code block information when there is a region of interest according to the embodiment of the present invention. In FIG. 19, the value of the truncation table is 26 in the attention area A, and the code amount after truncation of the subband is when the number of coding passes in the code block in the attention area is discarded from the lower 26-4 = 22 paths. This is the total code amount for the remaining coding passes.

注目領域Bにおいては、トランケーションテーブルの値が26で、当該サブバンドのトランケーション後の符号量は注目領域内のコードブロックでコーディングパス数を下位から26+2=28パスを破棄したとき残りのコーディングパスに対する符号量の合計である。それ以外のコードブロックで各コードブロックのコーディングパス数を下位から26個のコーディングパスを破棄したとき残りのコーディングパスに対する符号量の合計となる。例えば、注目領域A内のコードブロックにおいて下位の22個のコーディングパス30〜9を破棄し、8から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。   In the attention area B, the truncation table value is 26, and the code amount after truncation of the subband corresponds to the remaining coding paths when the number of coding passes in the code block in the attention area is discarded from the lower 26 + 2 = 28 paths. This is the total code amount. When the number of coding passes in the other code blocks is discarded from the lower 26 coding passes, the total amount of codes for the remaining coding passes is obtained. For example, the lower 22 coding passes 30 to 9 in the code block in the attention area A are discarded, and the total code amount for each coding pass from 8 to 1 becomes the code amount after truncation of the code block.

注目領域B内のコードブロックにおいて下位の28個のコーディングパス30から3を破棄し、2から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。注目領域外のコードブロックにおいて下位の26個のコーディングパス30から5個のコーディングパスを破棄し、4から1までの各コーディングパスに対する符号量の合計が当該コードブロックのトランケーション後の符号量となる。この際、1コードブロックの1個のコーディングパスの符号量を計算するために1サイクルであるとすると、注目領域A内1個のコードブロックでトランケーション後の符号量を計算するために合計で30−22=8サイクル、注目領域B内1個のコードブロックでトランケーション後の符号量を計算するために合計で30−28=2サイクル、注目領域外1個のコードブロックのトランケーション後の符号量を計算するために合計30−26=4サイクルの計算が必要になる。サブバンド内全コードブロックのトランケーション後の符号量を計算するために合計200×8+800×2+(32×32−1000)×4=3296サイクルが必要である。   The lower 28 coding passes 30 to 3 in the code block in the attention area B are discarded, and the total code amount for each coding pass from 2 to 1 becomes the code amount after truncation of the code block. The lower 26 coding passes 30 to 5 in the code block outside the region of interest are discarded, and the total code amount for each coding pass from 4 to 1 is the code amount after truncation of the code block. . At this time, assuming that one cycle is required to calculate the code amount of one coding pass of one code block, a total of 30 code amounts are calculated to calculate the code amount after truncation for one code block in the region of interest A. -22 = 8 cycles, in order to calculate the code amount after truncation for one code block in the attention area B, a total of 30-28 = 2 cycles, and the code amount after truncation of one code block outside the attention area A total of 30-26 = 4 cycles are required to calculate. A total of 200 × 8 + 800 × 2 + (32 × 32−1000) × 4 = 3296 cycles is required to calculate the code amount after truncation of all code blocks in the subband.

図23は本発明の実施形態に係る注目領域無しの場合と有りの場合との符号量計算方法、メモリアクセス回数及び符号量計算サイクル数の比較結果を示す図である。図23の比較結果から明らかなように、注目領域がある場合で注目領域内外の画質を調整するために、コードブロック単位のコーディングパス数と符号量を調整する必要があるので、注目領域がない場合のサブバンド単位の処理と比べると、メモリアクセス回数及び符号量計算サイクル数はどちらも増大方向にあることが見受けられ、システム処理のスループットの低下が顕著である。   FIG. 23 is a diagram showing a comparison result of the code amount calculation method, the number of memory accesses, and the code amount calculation cycle number when there is no attention area and when there is no attention area according to the embodiment of the present invention. As is clear from the comparison result of FIG. 23, in order to adjust the image quality inside and outside the attention area when there is the attention area, it is necessary to adjust the number of coding passes and the code amount in units of code blocks, so there is no attention area. Compared to the processing in units of subbands, it can be seen that both the number of memory accesses and the number of code calculation cycles are in an increasing direction, and the throughput of system processing is significantly reduced.

本発明の実施形態では、注目領域がある場合でサブバンド内各コードブロックのコーディングパス毎の符号量情報に加え、サブバンドコーディングパス毎の符号量情報をも用いて、上記メモリアクセス回数及び符号量計算サイクル数を少なくするようにサブバンド毎に2つの手段の使用を選択切り替えられるようにするものである。以下その仕組みについて説明する。   In the embodiment of the present invention, when there is a region of interest, the code number information for each subband coding pass and the code amount information for each subband coding pass are used in addition to the code amount information for each coding pass of each code block in the subband. The use of two means can be selectively switched for each subband so as to reduce the number of quantity calculation cycles. The mechanism will be described below.

まず、ケース2.1の場合(注目領域の数は1、注目領域内のコードブロック数は1、注目領域内のコーディングパス数の調整量はトランケーションテーブルの値−3)について考えてみる。   First, consider the case 2.1 (the number of regions of interest is 1, the number of code blocks in the region of interest is 1, the amount of adjustment of the number of coding passes in the region of interest is the truncation table value-3).

図20は本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.1)を示すブロック図である。   FIG. 20 is a block diagram illustrating a code amount calculation example (case 2.1) based on subbands and code block information when there is a region of interest according to the embodiment of the present invention.

トランケーションテーブルの選択時、サブバンドのコーディングパス毎の符号量情報をメモリから1回読み出す必要がある。サブバンド注目領域内のコードブロックコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、計1×1=1回のメモリアクセスが必要である。したがって、当該サブバンドのトランケーションテーブルの選択時において計1+1=2回のメモリアクセスが必要である。一方、必要な計算サイクル数はまず当該サブバンドの符号量からトランケーションテーブルの値でトランケーションしたときの符号量を計算するので、トランケーションテーブルの値が5なので必要な計算サイクル数は1×5=5回である。次に注目領域内個々のコードブロックコーディングパスに対する調整量(−3)を加味したトランケーション値でトランケーションしたときのコーディングパス数に対する符号量を加算するので、必要な計算サイクル数は1×(5−3)=2回となる。合計必要な計算サイクル数は5+2=7回となる。   When selecting the truncation table, it is necessary to read out the code amount information for each subband coding pass from the memory once. Since the code amount information for each code block coding pass in the subband attention area is read once from the memory, a total of 1 × 1 = 1 memory access is required. Accordingly, a total of 1 + 1 = 2 memory accesses are required when the subband truncation table is selected. On the other hand, since the number of calculation cycles is calculated based on the truncation table value from the subband code amount, the truncation table value is 5, so the number of necessary calculation cycles is 1 × 5 = 5. Times. Next, since the code amount for the number of coding passes when truncation is performed with the truncation value taking into account the adjustment amount (−3) for each code block coding pass in the region of interest, the number of necessary calculation cycles is 1 × (5- 3) = 2 times. The total number of calculation cycles required is 5 + 2 = 7.

次に、ケース2.2の場合(注目領域の数は2、注目領域Aのコードブロック数は200、注目領域A内のコーディングパス数の調整量はトランケーションテーブルの値−4。注目領域Bのコードブロック数は300、注目領域B内のコーディングパス数の調整量はトランケーションテーブルの値+2)について考えてみる。   Next, in case 2.2 (the number of attention areas is 2, the number of code blocks in attention area A is 200, and the amount of adjustment of the number of coding passes in attention area A is a truncation table value −4. Consider the case where the number of code blocks is 300 and the adjustment amount of the number of coding passes in the attention area B is the value of the truncation table + 2).

図21は本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.2)を示すブロック図である。   FIG. 21 is a block diagram illustrating a code amount calculation example (case 2.2) based on subbands and code block information when there is a region of interest according to the embodiment of the present invention.

トランケーションテーブルの選択時、サブバンドのコーディングパス毎の符号量情報をメモリから1回読み出す必要がある。サブバンド注目領域A内のコードブロックコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、合計1×200=200回のメモリアクセスが必要である。サブバンド注目領域B内のコードブロックコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、合計1×300=300回のメモリアクセスが必要である。したがって、当該サブバンドのトランケーションテーブルの選択時において計200+300+1=501回のメモリアクセスが必要である。一方、必要な計算サイクル数はまず当該サブバンドの符号量からトランケーションテーブルの値でトランケーションしたときの符号量を計算するので、必要な計算サイクル数は1×5=5回である。   When selecting the truncation table, it is necessary to read out the code amount information for each subband coding pass from the memory once. Since the code amount information for each code block coding pass in the subband attention area A is read once from the memory, a total of 1 × 200 = 200 memory accesses are required. Since the code amount information for each code block coding pass in the subband attention area B is read once from the memory, a total of 1 × 300 = 300 memory accesses are required. Therefore, a total of 200 + 300 + 1 = 501 memory accesses are required when selecting the truncation table for the subband. On the other hand, since the number of calculation cycles required first calculates the code amount when truncation is performed using the truncation table value from the code amount of the subband, the number of calculation cycles required is 1 × 5 = 5.

次に、注目領域Aはコードブロックコーディングパスに対する調整量(−4)を加味したトランケーション値でトランケーションしたときのコーディングパス数に対する符号量を加算するので、1個のコードブロック計算サイクル数は(5−4)=1回である。注目領域A内全コードブロック合計必要な計算サイクル数は200×1=200回となる。注目領域Bは個々のコードブロックコーディングパスに対する調整量(+2)を加味したトランケーション値でトランケーションしたときのコーディングパス数に対する符号量を減算するので、1個のコードブロック計算サイクル数は(5+2)=7回である。注目領域B内全コードブロック合計必要な計算サイクル数は300×(5+2)=2100回となる。したがって、当該サブバンドのトランケーションテーブルの選択時において計5+200+2100=2305回の計算サイクルが必要である。   Next, since the attention area A adds the code amount with respect to the number of coding passes when truncation is performed with the truncation value in consideration of the adjustment amount (−4) for the code block coding pass, the number of code block calculation cycles is (5 -4) = 1. The total number of calculation cycles required for all code blocks in the attention area A is 200 × 1 = 200 times. Since the attention area B subtracts the code amount with respect to the number of coding passes when truncation is performed with a truncation value in consideration of the adjustment amount (+2) for each code block coding pass, the number of code block calculation cycles is (5 + 2) = 7 times. The total number of calculation cycles required for all code blocks in the attention area B is 300 × (5 + 2) = 2100. Therefore, a total of 5 + 200 + 2100 = 2305 calculation cycles are required when selecting the truncation table for the subband.

次に、ケース2.3の場合(トランケーションテーブルの値は26、注目領域の数は2、注目領域Aのコードブロック数は200、注目領域A内のコーディングパス数の調整量はトランケーションテーブルの値−4。注目領域Bのコードブロック数は800、注目領域B内のコーディングパス数の調整量はトランケーションテーブルの値+2)について考えてみる。   Next, in case 2.3 (the truncation table value is 26, the number of attention areas is 2, the number of code blocks in attention area A is 200, and the amount of adjustment of the number of coding passes in attention area A is the truncation table value. -4 Consider the case where the number of code blocks in the attention area B is 800 and the adjustment amount of the number of coding passes in the attention area B is the value of the truncation table +2).

図22は本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.3)を示すブロック図である。   FIG. 22 is a block diagram illustrating a code amount calculation example (case 2.3) based on subbands and code block information when there is a region of interest according to the embodiment of the present invention.

トランケーションテーブルの選択時、サブバンドのコーディングパス毎の符号量情報をメモリから1回読み出す必要がある。サブバンド注目領域A内のコードブロックコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、合計1×200=200回のメモリアクセスが必要である。サブバンド注目領域B内のコードブロックコーディングパス毎の符号量情報をそれぞれメモリから1回読み出すので、合計1×800=800回のメモリアクセスが必要である。したがって、当該サブバンドのトランケーションテーブルの選択時において合計200+800+1=1001回のメモリアクセスが必要である。一方、必要な計算サイクル数はまず、当該サブバンドの符号量からトランケーションテーブルの値でトランケーションしたときの符号量を計算するので、必要な計算サイクル数は1×26=26回である。   When selecting the truncation table, it is necessary to read out the code amount information for each subband coding pass from the memory once. Since the code amount information for each code block coding pass in the subband attention area A is read once from the memory, a total of 1 × 200 = 200 memory accesses are required. Since the code amount information for each code block coding pass in the subband attention area B is read once from the memory, a total of 1 × 800 = 800 memory accesses are required. Therefore, a total of 200 + 800 + 1 = 1001 memory accesses are required when selecting the truncation table for the subband. On the other hand, since the number of calculation cycles required first calculates the code amount when truncation is performed using the truncation table value from the code amount of the subband, the number of necessary calculation cycles is 1 × 26 = 26.

次に、注目領域Aはコードブロックコーディングパスに対する調整量(−4)を加味したトランケーション値でトランケーションしたときのコーディングパス数に対する符号量を加算するので、1個のコードブロック計算サイクル数は(26−4)=22回である。注目領域A内全コードブロック合計必要な計算サイクル数は200×22=4400回となる。注目領域Bは個々のコードブロックコーディングパスに対する調整量(+2)を加味したトランケーション値でトランケーションしたときのコーディングパス数に対する符号量を減算するので、1個のコードブロック計算サイクル数は(26+2)=28回である。注目領域B内全コードブロック合計必要な計算サイクル数は800×28=22400回となる。したがって、当該サブバンドのトランケーションテーブルの選択時において計26+4400+22400=26826回の計算サイクルが必要である。   Next, since the attention area A adds the code amount with respect to the number of coding passes when truncation is performed with the truncation value in consideration of the adjustment amount (−4) with respect to the code block coding pass, the number of code block calculation cycles is (26 -4) = 22 times. The total number of calculation cycles required for all code blocks in the attention area A is 200 × 22 = 4400. The attention area B subtracts the code amount relative to the number of coding passes when truncation is performed with a truncation value that takes into account the adjustment amount (+2) for each code block coding pass, so the number of code block calculation cycles is (26 + 2) = 28 times. The total number of calculation cycles required for all code blocks in the attention area B is 800 × 28 = 22400. Therefore, a total of 26 + 4400 + 22400 = 26826 calculation cycles are required when selecting the truncation table for the subband.

図24は図23の比較結果において(サブバンド+コードブロック)の符号量計算方法を加えたときの符号量計算方法、メモリアクセス回数及び符号量計算サイクル数の比較結果を示す図である。   FIG. 24 is a diagram showing a comparison result of the code amount calculation method, the memory access count, and the code amount calculation cycle number when the code amount calculation method of (subband + code block) is added to the comparison result of FIG.

図24から明らかなように、本発明の実施形態では、注目領域ありでレートコントロールトランケーションテーブルを選択するとき、メモリアクセス回数はサブバンド注目領域内のコードブロック総数に依存しているので、サブバンド注目領域内のコードブロックの数が少ないときは、サブバンドのコーディングパス毎の符号量情報に基づいてコードブロックコーディングパス毎の符号量情報を調整量として用いることで符号量算出を行う場合メモリアクセス回数の減少が顕著である。サブバンド内注目領域数が多いとき、又はサブバンド注目領域内のコードブロックの数が多いとき、この方法による符号量算出とコードブロックコーディングパス毎の符号量情報だけを使用する符号量算出と比べて、メモリアクセス回数の減少効果が薄れる。   As apparent from FIG. 24, in the embodiment of the present invention, when the rate control truncation table is selected with the attention area, the number of memory accesses depends on the total number of code blocks in the subband attention area. When the code amount is calculated by using the code amount information for each code block coding pass as the adjustment amount based on the code amount information for each sub-band coding pass when the number of code blocks in the attention area is small The decrease in the number of times is remarkable. Compared with the code amount calculation using this method and the code amount calculation using only the code amount information for each code block coding pass when the number of subband attention regions is large or the number of code blocks in the subband attention region is large. Thus, the effect of reducing the number of memory accesses is reduced.

一方、必要計算サイクル数はトランケーションテーブルの値、注目領域数、注目領域内のコードブロック数、注目領域内コードブロックコーディングパスの調整量に依存しているので、トランケーションテーブルの値及び注目領域数、注目領域内のコードブロック数とコードブロックコーディングパス調整量(両者の積)が小さいとき、サブバンドコーディングパス毎の符号量情報に基づいて、コードブロックコーディングパス毎の符号量情報を調整量として用いることで符号量算出を行う場合メモリアクセス回数の減少が顕著である。トランケーションテーブルの値が大きいとき、又は注目領域数及び注目領域内のコードブロック数と調整量(両者の積)が大きいとき、この方法による符号量算出とコードブロックコーディングパス毎の符号量情報だけを使用する符号量算出と比べて、メモリアクセス回数の減少効果が薄れる。   On the other hand, since the number of necessary calculation cycles depends on the value of the truncation table, the number of attention areas, the number of code blocks in the attention area, and the adjustment amount of the code block coding pass in the attention area, the value of the truncation table and the number of attention areas, When the number of code blocks in the region of interest and the code block coding pass adjustment amount (product of both) are small, the code amount information for each code block coding pass is used as the adjustment amount based on the code amount information for each subband coding pass. Thus, when the code amount is calculated, the memory access frequency is remarkably reduced. When the value of the truncation table is large, or when the number of regions of interest and the number of code blocks in the region of interest and the adjustment amount (product of both) are large, only the code amount calculation by this method and the code amount information for each code block coding pass are obtained. Compared with the calculation of the code amount to be used, the effect of reducing the number of memory accesses is reduced.

このように注目領域ありでかつレートコントロールトランケーションテーブル選択の時は、サブバンド毎にメモリアクセス回数及び必要計算サイクル数を予め算出し、それがある基準(例えばコードブロックコーディングパス毎符号量情報による符号量計算結果)と比べて一定値以上を満たす場合にはサブバンドコーディングパス毎の符号量情報に基づいてコードブロックコーディングパス毎の符号量情報を調整量(増加量又は減少量)として符号量を計算できる。   Thus, when there is a region of interest and the rate control truncation table is selected, the number of memory accesses and the number of necessary calculation cycles are calculated in advance for each subband, and the code based on the code amount information for each code block coding pass is calculated. If the code amount information for each code block coding pass is adjusted based on the code amount information for each subband coding pass, the code amount is set as an adjustment amount (increase or decrease). Can be calculated.

本実施形態では、PEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するときに、図24から明らかなように、サブバンド毎の使用基準に基づいて、上記2つの符号量情報のうちのどの符号量情報を用いるか、もしくは両方の符号量情報を用いるかを決定してトランケーションしたときの符号量を計算する。ここで、上記サブバンド毎の使用基準として、好ましくは、特定コードブロックの数やサイズを用い、もしくは外部記憶手段へのアクセス回数を用いることができる。これにより、注目領域があるレートコントロールでは符号量制御手段をサブバンド毎に選択適用することができ、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   In this embodiment, at the time of PEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the corresponding code amount information, the number of coding passes for each code block, and the corresponding code amount information are input. As shown in FIG. 24, when controlling the code amount of a subband with a region of interest, which code amount information of the two pieces of code amount information is used based on the usage standard for each subband. Whether or not both pieces of code amount information are used is determined, and the code amount when truncation is calculated. Here, it is preferable to use the number or size of the specific code block or the number of accesses to the external storage means as the use standard for each subband. Thereby, in the rate control with the attention area, the code amount control means can be selectively applied for each subband, and the calculation efficiency of the code amount can be improved when the rate control table with the ROI attention area is selected.

また、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させることで、従来技術に比較して効率的に符号量を計算することができる。   In addition, when controlling the code amount of the subband, when using the two pieces of code amount information, attention is paid to the image quality within the entire region of interest based on the number of coding passes for each subband and the code amount information corresponding thereto. Add the number of coding passes for each individual code block in the region of interest and the code amount information to increase the code amount of the code block in the region of interest more than the code amount of the code block outside the region of interest in order to make it higher than the image quality outside the region. Thus, the amount of codes can be calculated more efficiently than in the prior art.

さらに、上記サブバンドの符号量を制御するときに、2つの情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることで、効率的に符号量を計算することができる。   Furthermore, when controlling the code amount of the subband, when using two pieces of information, the image quality within the entire region of interest is set to be out of the region of interest based on the number of coding passes for each subband and the code amount information corresponding thereto. By subtracting the number of coding passes for each individual code block in the region of interest and the code amount information for it in order to lower the image quality, the code amount of the code block in the region of interest is reduced from the code amount of the code block outside the region of interest, The code amount can be calculated efficiently.

またさらに、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎コーディングパス数とそれに対する符号量情報に基づいて、一部の注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させ、その他の注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることで効率的に符号量を計算することができる。   Furthermore, when controlling the code amount of the subband, when using the two pieces of code amount information, the image quality in a part of the attention area is determined based on the number of coding passes for each subband and the code amount information corresponding thereto. In order to make the image quality outside the region of interest higher than the code amount of the code block outside the region of interest by adding the number of coding passes for each individual code block within the region of interest and the code amount information for the code pass. In order to increase the image quality in other regions of interest to be lower than the image quality outside the region of interest, the code amount of code blocks in the region of interest is subtracted from the number of coding passes for each individual code block in the region of interest and the corresponding code amount information. Is reduced from the code amount of the code block outside the region of interest, so that the code amount can be calculated efficiently.

以上説明したように、本発明の実施形態に係る画像圧縮装置及び方法によれば、注目領域があるレートコントロールでは符号量制御手段をサブバンド毎に選択適用することができ、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   As described above, according to the image compression apparatus and method according to the embodiment of the present invention, the code amount control means can be selectively applied for each subband in the rate control with the attention area, and there is the ROI attention area. The code amount calculation efficiency can be improved when the rate control table is selected.

また、注目領域内外の符号量調整において符号量計算サイクル数を減らすことができ、これにより、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   In addition, the number of code amount calculation cycles can be reduced in adjusting the code amount inside and outside the attention area, thereby improving the calculation efficiency of the code amount when the rate control table having the ROI attention area is selected.

さらに、注目領域内外の符号量調整において外部記憶装置へのアクセス回数を減らすことができ、これにより、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   Furthermore, it is possible to reduce the number of accesses to the external storage device in adjusting the code amount inside and outside the attention area, thereby improving the calculation efficiency of the code amount when selecting the rate control table with the ROI attention area.

また、サブバンド内注目領域の符号量が注目領域外の符号量より多くするときに効率的に符号量を計算することができる。   Also, the code amount can be calculated efficiently when the code amount in the subband attention area is larger than the code amount outside the attention area.

さらに、サブバンド内注目領域の符号量が注目領域外の符号量より少なくするときに効率的に符号量を計算することができる。   Furthermore, it is possible to efficiently calculate the code amount when the code amount of the subband attention area is smaller than the code amount outside the attention area.

またさらに、サブバンド内注目領域によって注目領域内の符号量を多くするあるいは少なくするときに効率的に符号量を計算することができる。   Furthermore, the code amount can be calculated efficiently when the code amount in the attention area is increased or decreased by the attention area in the subband.

以上の実施形態においては、画像圧縮方法のための符号量制御方法について説明しているが、これらの方法のステップをコンピュータにより実行可能なプログラムを構成し、当該プログラムをCD−ROM、DVDなどのコンピュータにより読み出し可能な記録媒体に記録してもよい。   In the above embodiment, the code amount control method for the image compression method has been described. However, a program that can execute the steps of these methods by a computer is configured, and the program is stored in a CD-ROM, a DVD, or the like. The information may be recorded on a computer-readable recording medium.

以上詳述したように、本発明に係る画像圧縮装置及び方法によれば、注目領域があるレートコントロールでは符号量制御手段をサブバンド毎に選択適用することができ、ROI注目領域があるレートコントロールテーブルの選択時において符号量の計算効率を向上させることができる。   As described above in detail, according to the image compression apparatus and method of the present invention, in the rate control with the attention area, the code amount control means can be selectively applied for each subband, and the rate control with the ROI attention area. The code amount calculation efficiency can be improved when selecting a table.

ROI処理に類似したレートコントロール処理を含む本発明の実施形態に係る処理の流れを示す図である。It is a figure which shows the flow of the process which concerns on embodiment of this invention including the rate control process similar to ROI process. コードブロック情報を読出しの実施例を示すブロック図である。It is a block diagram which shows the Example of reading code block information. 一般的なレートコントロール処理の流れを示す図である。It is a figure which shows the flow of a general rate control process. 指定領域があるときのレートコントロール処理の流れを示す図である。It is a figure which shows the flow of the rate control process when there exists a designated area | region. 指定領域に属するコードブロックの例を示す図である。It is a figure which shows the example of the code block which belongs to the designation | designated area | region. 指定領域内のコードブロックの計算の例を示す図である。It is a figure which shows the example of calculation of the code block in a designated area. 指定領域があるときのトランケーションテーブル選択の実施例を示す図である。It is a figure which shows the Example of truncation table selection when there exists a designated area | region. 指定領域があるときのトランケーションの実施例を示す図である。It is a figure which shows the Example of truncation when there exists a designated area | region. JPEG2000アルゴリズムの基本を説明するための機能ブロック図である。It is a functional block diagram for demonstrating the basics of a JPEG2000 algorithm. 特許文献2,3に開示された画像圧縮装置の構成を示す図である。It is a figure which shows the structure of the image compression apparatus disclosed by patent document 2, 3. FIG. 従来技術に係るJPEG2000の符号化処理の流れを示す図である。It is a figure which shows the flow of the encoding process of JPEG2000 based on a prior art. 符号化時に行うROI処理を含んだ流れを示す図である。It is a figure which shows the flow including the ROI process performed at the time of encoding. 復号化時のROI処理の流れを示す図である。It is a figure which shows the flow of the ROI process at the time of decoding. 本発明の実施形態に係るサブバンドのコーディングパス毎の符号量情報の一例(Y成分、1HL)を示すブロック図である。It is a block diagram which shows an example (Y component, 1HL) of the code amount information for every coding pass of the subband which concerns on embodiment of this invention. 本発明の実施形態に係るコードブロックのコーディングパス毎の符号量情報の一例を示すブロック図である。It is a block diagram which shows an example of the code amount information for every coding pass of the code block which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が無いときの符号量の計算例(ケース1)を示すブロック図である。It is a block diagram which shows the calculation example (case 1) when there is no attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.1)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.1) of the code amount only by code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.2)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.2) of the code amount only by code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのコードブロック情報のみによる符号量の計算例(ケース2.3)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.3) of the code amount only by code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.1)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.1) of the code amount by a subband and code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.2)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.2) of the code amount by a subband and code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域が有るときのサブバンドとコードブロック情報による符号量の計算例(ケース2.3)を示すブロック図である。It is a block diagram which shows the calculation example (case 2.3) of the code amount by a subband and code block information when there exists an attention area which concerns on embodiment of this invention. 本発明の実施形態に係る注目領域無しの場合と有りの場合との符号量計算方法、メモリアクセス回数及び符号量計算サイクル数の比較結果を示す図である。It is a figure which shows the comparison result of the code amount calculation method, the memory access frequency, and the code amount calculation cycle number with and without the attention area according to the embodiment of the present invention. 図23の比較結果において(サブバンド+コードブロック)の符号量計算方法を加えたときの符号量計算方法、メモリアクセス回数及び符号量計算サイクル数の比較結果を示す図である。FIG. 24 is a diagram illustrating a comparison result of a code amount calculation method, a memory access count, and a code amount calculation cycle number when a code amount calculation method of (subband + code block) is added to the comparison result of FIG.

符号の説明Explanation of symbols

10…ウェーブレット変換部、
20…算術符号化部、
30…パケットヘッダ生成処理部、
40…メモリコントローラ、
50…DRAM、
13,21,25,31,33,35,37…DMA、
11…色変換回路、
12…ウェーブレット変換回路、
23…ビットプレーン分割回路、
24…算術符号化回路、
22…量子化回路、
26…平均値算出回路、
27…マスキング係数計算回路、
28…符号量算出回路、
29…データ処理回路、
32…レートコントロール回路、
34…パケット情報生成回路、
36…パケットヘッダ生成回路、
38…符号形成回路、
100…画像圧縮装置、
111…色空間変換・逆変換部、
112…2次元ウェーブレット変換・逆変換部、
113…量子化・逆量子化部、
114…エントロピー符号化・復号化部、
115…タブ処理部。
10: Wavelet transform unit,
20: arithmetic coding unit,
30 ... Packet header generation processing unit,
40 ... Memory controller,
50 ... DRAM,
13, 21, 25, 31, 33, 35, 37 ... DMA,
11 ... color conversion circuit,
12 ... Wavelet transform circuit,
23: Bit plane dividing circuit,
24. Arithmetic coding circuit,
22: Quantization circuit,
26: Average value calculation circuit,
27. Masking coefficient calculation circuit,
28: Code amount calculation circuit,
29: Data processing circuit,
32. Rate control circuit,
34 ... Packet information generation circuit,
36 ... Packet header generation circuit,
38 ... code forming circuit,
100: Image compression device,
111 ... color space conversion / inverse conversion unit,
112 ... 2D wavelet transform / inverse transform unit,
113 ... Quantization / inverse quantization unit,
114 ... entropy encoding / decoding unit,
115: Tab processing unit.

Claims (7)

JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロール手段を備えた画像圧縮装置において、
上記レートコントロール手段は、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させることを特徴とする画像圧縮装置。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression apparatus provided with rate control means for controlling the code amount of a certain subband,
The rate control means, when controlling the code amount of the subband, when using the two code amount information, based on the number of coding passes for each subband and the code amount information corresponding thereto, In order to make the image quality of the code block outside the region of interest code by adding the number of coding passes for each code block within the region of interest and the code amount information for that code An image compression apparatus characterized in that the image compression apparatus increases the amount .
JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロール手段を備えた画像圧縮装置において、
上記レートコントロール手段は、上記サブバンドの符号量を制御するときに、上記2つの情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする画像圧縮装置。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression apparatus provided with rate control means for controlling the code amount of a certain subband,
The rate control means, when controlling the code amount of the subband, when using the two pieces of information, based on the number of coding passes for each subband and the code amount information corresponding thereto, the image quality within the entire region of interest In order to lower the image quality outside the region of interest, the number of coding passes for each individual code block in the region of interest and the code amount information for the code pass are subtracted to obtain the code amount of the code block in the region of interest from the code amount of the code block outside the region of interest An image compression apparatus characterized in that the image compression apparatus is reduced .
JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロール手段を備えた画像圧縮装置において、
上記レートコントロール手段は、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎コーディングパス数とそれに対する符号量情報に基づいて、一部の注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させ、その他の注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする画像圧縮装置。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression apparatus provided with rate control means for controlling the code amount of a certain subband,
The rate control means, when controlling the code amount of the subband, when using the two code amount information, based on the number of coding passes per subband and the corresponding code amount information, In order to make the image quality within the region of interest higher than the image quality outside the region of interest, the number of coding passes for each code block within the region of interest and the code amount information corresponding thereto are added, and the code amount of the code block within the region of interest is In order to increase the code amount and make the image quality in other regions of interest lower than the image quality outside the region of interest, the number of coding passes for each code block in the region of interest and the code amount information corresponding thereto are subtracted and the code block within the region of interest The image compression apparatus is characterized in that the code amount is reduced from the code amount of the code block outside the region of interest .
JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロールステップを含む画像圧縮方法において、
上記レートコントロールステップは、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させることを特徴とする画像圧縮方法。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression method including a rate control step for controlling a code amount of a certain subband,
In the rate control step, when controlling the code amount of the subband, when using the two pieces of code amount information, based on the number of coding passes for each subband and the corresponding code amount information, In order to make the image quality of the code block outside the region of interest code by adding the number of coding passes for each code block within the region of interest and the code amount information for that code A method of compressing an image, wherein the image compression method increases the amount .
JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロールステップを含む画像圧縮方法において、
上記レートコントロールステップは、上記サブバンドの符号量を制御するときに、上記2つの情報を使用する際、サブバンド毎のコーディングパス数とそれに対する符号量情報に基づいて、全注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする画像圧縮方法。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression method including a rate control step for controlling a code amount of a certain subband,
In the rate control step, when controlling the code amount of the subband, when using the two pieces of information, the image quality within the entire region of interest is determined based on the number of coding passes for each subband and the code amount information corresponding thereto. In order to lower the image quality outside the region of interest, the number of coding passes for each individual code block in the region of interest and the code amount information for the code pass are subtracted to obtain the code amount of the code block in the region of interest from the code amount of the code block outside the region of interest. An image compression method characterized by reducing.
JPEG2000方式の符号化に際して、MQ符号化器にて生成されたサブバンド毎のコーディングパス数とそれに対する符号量情報やコードブロック毎のコーディングパス数とそれに対する符号量情報を入力とし、注目領域があるサブバンドの符号量を制御するレートコントロールステップを含む画像圧縮方法において、
上記レートコントロールステップは、上記サブバンドの符号量を制御するときに、上記2つの符号量情報を使用する際、サブバンド毎コーディングパス数とそれに対する符号量情報に基づいて、一部の注目領域内の画質を注目領域外の画質より高くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を加算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より増加させ、その他の注目領域内の画質を注目領域外の画質より低くするために注目領域内個々コードブロック毎のコーディングパス数とそれに対する符号量情報を減算して注目領域内コードブロックの符号量を注目領域外コードブロックの符号量より減少させることを特徴とする画像圧縮方法。
At the time of JPEG2000 encoding, the number of coding passes for each subband generated by the MQ encoder and the code amount information for the subbands, the number of coding passes for each code block and the code amount information for the code region information are input. In an image compression method including a rate control step for controlling a code amount of a certain subband,
In the rate control step, when controlling the code amount of the subband, when using the two pieces of code amount information, based on the number of coding passes for each subband and the corresponding code amount information, a part of the attention area In order to make the image quality within the region of interest higher than the image quality outside the region of interest, the number of coding passes for each code block within the region of interest and the code amount information corresponding thereto are added, and the code amount of the code block within the region of interest is In order to increase the code amount and make the image quality in other regions of interest lower than the image quality outside the region of interest, the number of coding passes for each code block in the region of interest and the code amount information corresponding thereto are subtracted and the code block within the region of interest The image compression method is characterized in that the code amount is reduced from the code amount of the code block outside the region of interest .
請求項4乃至6のうちのいずれか1つに記載の画像圧縮方法のレートコントロールステップを含むことを特徴とするコンピュータにより実行可能なプログラム。 A computer-executable program comprising the rate control step of the image compression method according to any one of claims 4 to 6 .
JP2008232949A 2008-09-11 2008-09-11 Image compression apparatus and method, and program Expired - Fee Related JP5200792B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008232949A JP5200792B2 (en) 2008-09-11 2008-09-11 Image compression apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008232949A JP5200792B2 (en) 2008-09-11 2008-09-11 Image compression apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2010068269A JP2010068269A (en) 2010-03-25
JP5200792B2 true JP5200792B2 (en) 2013-06-05

Family

ID=42193451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008232949A Expired - Fee Related JP5200792B2 (en) 2008-09-11 2008-09-11 Image compression apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP5200792B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6732031B2 (en) 2016-09-21 2020-07-29 三菱電機株式会社 Image coding apparatus and image coding program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4090975B2 (en) * 2003-09-30 2008-05-28 株式会社リコー Image processing device
JP4671354B2 (en) * 2006-03-15 2011-04-13 株式会社リコー Image compression apparatus and image compression method

Also Published As

Publication number Publication date
JP2010068269A (en) 2010-03-25

Similar Documents

Publication Publication Date Title
US7925102B2 (en) Picture encoding apparatus and method, program and recording medium
US8395634B2 (en) Method and apparatus for processing information
TWI436287B (en) Method and apparatus for coding image
JP3693988B2 (en) Communication management system and communication management method
JP3792789B2 (en) Encoder
US6879726B2 (en) Image processing method, apparatus and storage medium
US8433147B2 (en) Encoding apparatus and method, and decoding apparatus and method
JP4671354B2 (en) Image compression apparatus and image compression method
US8400460B2 (en) Image data processing method, program for image data processing method, recording medium with recorded program for image data processing method and image date processing device
US8281314B2 (en) Information processing device and method
JP4973886B2 (en) Moving picture decoding apparatus, decoded picture recording apparatus, method and program thereof
JP4229323B2 (en) Encoding apparatus, encoding method, and program
JP2018511237A (en) Content adaptive B picture pattern video encoding
KR20170040892A (en) Method for operating of encoder, and method for operating system on chip including encoder
JP5200792B2 (en) Image compression apparatus and method, and program
WO2014167609A1 (en) Information processing device, control method, program, and recording medium
JP4105578B2 (en) Image compression device
JP4064279B2 (en) Image compression device
JP5906993B2 (en) Encoding apparatus, encoding method, and program
JP2010136154A (en) Apparatus and method for processing information
JP2005065230A (en) Encoding apparatus, encoding control method, program and recording medium
JP5649540B2 (en) Moving picture coding apparatus and program thereof
JP3893281B2 (en) Image encoding apparatus, image encoding method, program, and storage medium
JP2012191603A (en) Image processing apparatus and method
JP6377222B2 (en) Information processing apparatus, control method, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120924

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130128

R151 Written notification of patent or utility model registration

Ref document number: 5200792

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20160222

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees