JP6191173B2 - Image processing apparatus, method, and program - Google Patents

Image processing apparatus, method, and program Download PDF

Info

Publication number
JP6191173B2
JP6191173B2 JP2013051069A JP2013051069A JP6191173B2 JP 6191173 B2 JP6191173 B2 JP 6191173B2 JP 2013051069 A JP2013051069 A JP 2013051069A JP 2013051069 A JP2013051069 A JP 2013051069A JP 6191173 B2 JP6191173 B2 JP 6191173B2
Authority
JP
Japan
Prior art keywords
compression
code amount
quantization
input image
encoding
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
JP2013051069A
Other languages
Japanese (ja)
Other versions
JP2014179709A (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 JP2013051069A priority Critical patent/JP6191173B2/en
Publication of JP2014179709A publication Critical patent/JP2014179709A/en
Application granted granted Critical
Publication of JP6191173B2 publication Critical patent/JP6191173B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置における画像圧縮技術に関するものである。   The present invention relates to an image compression technique in an image processing apparatus.

各種の画像処理装置において、JPEG(Joint Photographic Experts Group)方式等の圧縮技術が利用されている。   Various image processing apparatuses use a compression technique such as JPEG (Joint Photographic Experts Group).

特許文献1は、画像データを2次元直交変換して圧縮符号化する画像データ処理装置において、簡略な構成で符号量制御の高精度化及び高速化を図ることを目的として、画像データの圧縮符号化に先立って適切なビット配分を求めるための予備的な圧縮符号化を行う構成を開示している。   Patent Document 1 discloses a compression code for image data for the purpose of increasing the accuracy and speed of code amount control with a simple configuration in an image data processing apparatus that compresses and encodes image data by two-dimensional orthogonal transformation. A configuration is disclosed in which preliminary compression encoding is performed to obtain appropriate bit allocation prior to conversion.

特許文献2は、画像データの圧縮処理機能を備えた画像処理装置において、圧縮効率及び圧縮データの編集性を向上させることを目的として、入力画像を複数の画素からなるブロック単位に周波数変換を行い複数の周波数変換係数を出力する手段と、複数の周波数変換係数に量子化を行い複数の量子化係数を出力する手段と、複数の量子化係数の値又は周波数変換係数の値の範囲を制限する手段とを備える構成を開示している。   Patent Document 2 discloses an image processing apparatus having a compression processing function for image data, and performs frequency conversion of an input image in units of blocks composed of a plurality of pixels for the purpose of improving compression efficiency and editability of compressed data. Means for outputting a plurality of frequency transform coefficients, means for quantizing a plurality of frequency transform coefficients and outputting a plurality of quantization coefficients, and limiting a range of values of the plurality of quantization coefficients or frequency transform coefficients The structure provided with a means is disclosed.

JPEG圧縮方式は、入力画像の特徴に応じて符号量(符号化率)が一定にならないという特徴を有する。例えば、異なる2つの画像を同一のパラメータで圧縮しても符号量は同一とならない。そのため、符号量を所望の値に制御するために、本圧縮に先立って本圧縮時に使用されるパラメータを決定するための予備圧縮を行うことがある。   The JPEG compression method has a feature that the code amount (coding rate) does not become constant according to the feature of the input image. For example, even if two different images are compressed with the same parameter, the code amount is not the same. For this reason, in order to control the code amount to a desired value, pre-compression may be performed prior to the main compression to determine parameters used during the main compression.

上記特許文献1は、当該予備圧縮を行う場合の一例である。しかしながら、当該従来技術における予備圧縮は、アクティビティ算出等を行うためのカメラ処理系の回路の存在が前提となっている。そのため、JPEG等の圧縮処理に必要な基本的な構成部のみでは十分な予備圧縮による予測制御を行うことができないという問題がある。   The above-mentioned patent document 1 is an example when the preliminary compression is performed. However, the preliminary compression in the related art is premised on the existence of a camera processing system circuit for performing activity calculation and the like. For this reason, there is a problem that prediction control by sufficient preliminary compression cannot be performed only with basic components necessary for compression processing such as JPEG.

そこで、本発明は、圧縮処理に必要な基本的な構成部を利用して高精度な符号量制御を実現することを目的とする。   Therefore, an object of the present invention is to realize highly accurate code amount control using basic components necessary for compression processing.

上記課題を解決し目的を達成するために、本発明にかかる画像処理装置は、入力画像を複数の領域に分割する画像分割手段と、分割された前記入力画像を量子化テーブルに基づいて量子化する量子化手段と、量子化された前記入力画像を符号化する符号化手段と、予め異なるクオリティ値毎に作成された複数の予備圧縮用量子化テーブルを保持するテーブル保持手段と、予備圧縮時において前記領域毎に異なる前記予備圧縮用量子化テーブルを適用して前記量子化手段に前記入力画像の量子化を行わせるテーブル制御手段と、前記符号化手段が出力する符号量を検出する符号量検出手段と、前記予備圧縮時において検出された前記予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とに基づいて、前記本圧縮時に前記符号化手段が出力する符号量が前記目標符号量となるように、前記本圧縮時において使用する前記量子化テーブルを決定するテーブル決定手段とを備えるものである。 In order to solve the above problems and achieve the object, an image processing apparatus according to the present invention includes an image dividing unit that divides an input image into a plurality of regions, and quantizes the divided input image based on a quantization table. Quantization means for encoding, encoding means for encoding the quantized input image, table holding means for holding a plurality of preliminary compression quantization tables created in advance for different quality values, and at the time of preliminary compression And a table control means for causing the quantization means to perform quantization of the input image by applying the pre-compression quantization table different for each region, and a code amount for detecting a code amount output by the encoding means Based on the detection means and the code amount for each preliminary compression quantization table detected during the preliminary compression and the target code amount during the main compression, the encoding during the main compression is performed. As the amount of codes stage output becomes the target code amount, but and a table determining means for determining the quantization table used during the main compression.

本発明によれば、圧縮処理に必要な基本的な構成部を利用して高精度な符号量制御を実現することができる。   According to the present invention, high-accuracy code amount control can be realized using basic components necessary for compression processing.

図1は、本実施の形態にかかる画像処理装置の要部の構成を示す図である。FIG. 1 is a diagram illustrating a configuration of a main part of the image processing apparatus according to the present embodiment. 図2は、本実施の形態にかかる画像処理装置の具体的な構成を例示する図である。FIG. 2 is a diagram illustrating a specific configuration of the image processing apparatus according to the present embodiment. 図3は、図2に示す前処理回路により分割された入力画像を例示する図である。FIG. 3 is a diagram illustrating an input image divided by the preprocessing circuit shown in FIG. 図4は、予備圧縮用量子化テーブルAを例示するものであって、クオリティ値が90の場合における輝度/色差量子化テーブルを示す図である。FIG. 4 exemplifies the preliminary compression quantization table A, and is a diagram showing a luminance / color difference quantization table when the quality value is 90. 図5は、予備圧縮用量子化テーブルBを例示するものであって、クオリティ値が100の場合における輝度/色差量子化テーブルを示す図である。FIG. 5 exemplifies the preliminary compression quantization table B, and is a diagram showing a luminance / color difference quantization table when the quality value is 100. 図6は、予備圧縮用量子化テーブルCを例示するものであって、クオリティ値が60の場合における輝度/色差量子化テーブルを示す図である。FIG. 6 exemplifies the preliminary compression quantization table C, and is a diagram showing a luminance / color difference quantization table when the quality value is 60. 図7は、予備圧縮用量子化テーブルDを例示するものであって、クオリティ値が80の場合における輝度/色差量子化テーブルを示す図である。FIG. 7 exemplifies the preliminary compression quantization table D, and is a diagram showing a luminance / color difference quantization table when the quality value is 80. 図8は、JPEGにおけるQ値と符号量との関係を示す特性線を例示する図である。FIG. 8 is a diagram illustrating characteristic lines indicating the relationship between the Q value and the code amount in JPEG. 図9は、本実施の形態にかかる画像処理装置において本圧縮用量子化テーブルを決定する際の処理を示すフローチャートである。FIG. 9 is a flowchart showing processing when determining the compression quantization table in the image processing apparatus according to the present embodiment. 図10は、図9に示す処理において目標符号量が予備圧縮用量子化テーブルAに対応する符号量以上テーブルBに対応する符号量以下である場合に実行される処理を示すフローチャートである。FIG. 10 is a flowchart showing processing executed when the target code amount is equal to or larger than the code amount corresponding to the preliminary compression quantization table A and equal to or smaller than the code amount corresponding to the table B in the processing shown in FIG. 図11は、図9に示す処理において目標符号量が予備圧縮用量子化テーブルCに対応する符号量以上テーブルDに対応する符号量以下である場合に実行される処理を示すフローチャートである。FIG. 11 is a flowchart showing processing executed when the target code amount is equal to or larger than the code amount corresponding to the preliminary compression quantization table C and equal to or smaller than the code amount corresponding to the table D in the processing shown in FIG. 図12は、図9に示す処理において目標符号量が予備圧縮用量子化テーブルDに対応する符号量より大きくテーブルAに対応する符号量より小さい場合に実行される処理を示すフローチャートである。FIG. 12 is a flowchart showing processing executed when the target code amount is larger than the code amount corresponding to the preliminary compression quantization table D and smaller than the code amount corresponding to the table A in the processing shown in FIG.

以下に添付図面を参照して、本発明の実施の形態について説明する。図1は、本実施の形態にかかる画像処理装置1の要部の構成を示している。画像処理装置1は、入力画像データをJPEG等の方式により圧縮すると共に、本圧縮に先立って予備圧縮を行う機能を有する。本実施の形態にかかる予備圧縮とは、本圧縮において出力される符号量が所定の目標符号量と一致するように量子化処理を最適化するために行われる処理である。   Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 shows a configuration of a main part of an image processing apparatus 1 according to the present embodiment. The image processing apparatus 1 has a function of compressing input image data by a method such as JPEG and performing a preliminary compression prior to the main compression. The preliminary compression according to the present embodiment is a process performed to optimize the quantization process so that the code amount output in the main compression matches a predetermined target code amount.

画像処理装置1は、画像分割部2、量子化部3、符号化部4、テーブル保持部5、テーブル制御部6、符号量検出部7及びテーブル決定部8を有する。   The image processing apparatus 1 includes an image division unit 2, a quantization unit 3, an encoding unit 4, a table holding unit 5, a table control unit 6, a code amount detection unit 7, and a table determination unit 8.

画像分割部2は、入力画像を複数の領域に分割する。量子化部3は、画像分割部2により分割された入力画像を量子化テーブルに基づいて量子化する。符号化部4は、量子化部3により量子化された入力画像を符号化(圧縮)する。   The image dividing unit 2 divides the input image into a plurality of areas. The quantization unit 3 quantizes the input image divided by the image dividing unit 2 based on the quantization table. The encoding unit 4 encodes (compresses) the input image quantized by the quantization unit 3.

テーブル保持部5は、予備圧縮時に用いられるものであって異なるクオリティ値毎に作成された複数の予備圧縮用量子化テーブル(後に詳述する)を保持する。テーブル制御部6は、予備圧縮時において、入力画像の領域毎に異なる予備圧縮用量子化テーブルを適用して量子化部3に当該入力画像の量子化を行わせる。   The table holding unit 5 holds a plurality of preliminary compression quantization tables (to be described in detail later) that are used for preliminary compression and created for different quality values. At the time of preliminary compression, the table control unit 6 applies different preliminary compression quantization tables for each region of the input image, and causes the quantization unit 3 to perform quantization of the input image.

符号量検出部7は、符号化部4により入力画像の符号化が行われたときに出力されるデータの符号量を検出する。テーブル決定部8は、符号量検出部7により検出された予備圧縮時における予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とに基づいて、本圧縮時において符号化部4が出力する符号量が目標符号量となるように、本圧縮時において使用する量子化テーブルを決定する。   The code amount detection unit 7 detects the code amount of data output when the encoding unit 4 encodes the input image. Based on the code amount of each pre-compression quantization table detected during the pre-compression and the target code amount during the main compression detected by the code amount detection unit 7, the table determining unit 8 performs the encoding unit 4 during the main compression. The quantization table to be used at the time of the main compression is determined so that the code amount output by the is the target code amount.

上記各構成部2〜8は、例えばCPU(Central Processing Unit)等の処理装置にプログラムを実行させること、即ちソフトウェアにより実現してもよいし、IC(Integrated Circuit)等のハードウェアにより実現してもよいし、ソフトウェア及びハードウェアを併用して実現してもよい。   Each of the components 2 to 8 may be realized by software, for example, by causing a processing device such as a CPU (Central Processing Unit) to execute a program, that is, realized by software or hardware such as an IC (Integrated Circuit). Alternatively, software and hardware may be used in combination.

上記画像処理装置1によれば、外部から供給された入力画像データは、画像分割部2により入力画像が複数の領域に分割するように処理された後、量子化部3により所定の量子化テーブルに基づいて量子化される。このとき、量子化部3は、予備圧縮においては、入力画像の領域毎にテーブル保持部5が保持する異なる複数の予備圧縮用量子化テーブルを適用して量子化を行う。このようにして得られた予備圧縮における量子化された入力画像データは、符号化部4により符号化される。この予備圧縮において符号化部4から出力するデータの符号量は、符号量検出部7により検出され、テーブル決定部8に供給される。テーブル決定部8は、供給された予備圧縮時における符号量を予備圧縮用量子化テーブルの種類毎に分析し、予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とを比較し、その比較結果に基づいて本圧縮における符号量を目標符号量に一致させる本圧縮用量子化テーブルを決定する。そして、テーブル制御部6は、テーブル決定部8において決定された本圧縮用量子化テーブルを本圧縮における量子化に適用する。   According to the image processing apparatus 1, input image data supplied from the outside is processed by the image dividing unit 2 so that the input image is divided into a plurality of regions, and then the quantization unit 3 performs a predetermined quantization table. Quantized based on At this time, in the preliminary compression, the quantization unit 3 performs quantization by applying a plurality of different preliminary compression quantization tables held by the table holding unit 5 for each area of the input image. The input image data quantized in the preliminary compression thus obtained is encoded by the encoding unit 4. In this preliminary compression, the code amount of data output from the encoding unit 4 is detected by the code amount detection unit 7 and supplied to the table determination unit 8. The table determination unit 8 analyzes the supplied code amount at the time of preliminary compression for each type of the pre-compression quantization table, and compares the code amount for each pre-compression quantization table with the target code amount at the time of main compression. Then, based on the comparison result, the main compression quantization table for matching the code amount in the main compression with the target code amount is determined. Then, the table control unit 6 applies the main compression quantization table determined by the table determination unit 8 to the quantization in the main compression.

上記画像処理装置1によれば、通常の圧縮処理に必要な基本的な構成部のみによって本圧縮時に使用すべき最適な量子化テーブルを決定するための予備圧縮を行うことができる。これにより、圧縮処理に必要な基本的な構成部を利用して高精度な符号量制御を実現することができる。   According to the image processing apparatus 1, it is possible to perform preliminary compression for determining an optimum quantization table to be used at the time of main compression by only basic components necessary for normal compression processing. As a result, it is possible to realize highly accurate code amount control using basic components necessary for compression processing.

図2は、本実施の形態にかかる画像処理装置1の具体的な構成を例示している。本例にかかる画像処理装置1は、JPEG方式を採用するものであり、前処理部11、前処理用メモリ12、DCT(Discrete Cosine Transform)部13、量子化部14、ハフマン符号化部15、符号出力制御部16、符号量カウンタ17、本圧縮用テーブル決定部18、本圧縮用テーブルデータベース(DB)19、目標符号量保持メモリ20、テーブル切替制御部21、予備圧縮用テーブルデータベース22及び本圧縮用テーブル保持メモリ23を有する。   FIG. 2 illustrates a specific configuration of the image processing apparatus 1 according to the present embodiment. The image processing apparatus 1 according to this example employs the JPEG method, and includes a preprocessing unit 11, a preprocessing memory 12, a DCT (Discrete Cosine Transform) unit 13, a quantization unit 14, a Huffman encoding unit 15, Code output control unit 16, code amount counter 17, main compression table determination unit 18, main compression table database (DB) 19, target code amount holding memory 20, table switching control unit 21, preliminary compression table database 22, and book A compression table holding memory 23 is provided.

前処理部11は、図1における画像分割部2の一形態であり、圧縮処理の対象となる入力画像データに対し、量子化及び符号化を行う前の処理を行う回路等である。当該前処理には、ラスタ/ブロック変換、上述した入力画像の分割処理等が含まれる。入力画像データは、前処理用メモリ12に一時的に保持される。前処理用メモリ12は、前処理部11のワークエリア等として機能する。DCT部13は、周知の離散コサイン変換を行う回路等である。   The pre-processing unit 11 is a form of the image dividing unit 2 in FIG. 1 and is a circuit or the like that performs processing before performing quantization and encoding on input image data to be compressed. The preprocessing includes raster / block conversion, the above-described input image division processing, and the like. The input image data is temporarily stored in the preprocessing memory 12. The preprocessing memory 12 functions as a work area for the preprocessing unit 11. The DCT unit 13 is a circuit that performs a known discrete cosine transform.

図3は、前処理部11により分割された入力画像25を例示している。入力画像25は、水平ピクセル及び垂直ラインの単位で分割されている。分割サイズは自由であるが、その最小値はJPEGの処理単位であるマクロブロック単位となる。例えば、4:4:4のサブサンプリングでは、8×8ピクセル単位が最小値となる。分割サイズを細かくするほど本圧縮における符号量制御の精度(予備圧縮における予測精度)が高くなるが、演算負荷が高くなる。分割サイズは、原則としてマクロブロック単位の倍数となる。本例にかかる入力画像25は、8×8=64の領域に分割されている。   FIG. 3 illustrates the input image 25 divided by the preprocessing unit 11. The input image 25 is divided in units of horizontal pixels and vertical lines. The division size is arbitrary, but the minimum value is a macroblock unit which is a JPEG processing unit. For example, in 4: 4: 4 sub-sampling, the 8 × 8 pixel unit is the minimum value. The finer the division size, the higher the accuracy of code amount control in main compression (prediction accuracy in preliminary compression), but the calculation load increases. As a general rule, the division size is a multiple of a macroblock unit. The input image 25 according to this example is divided into 8 × 8 = 64 areas.

量子化部14は、前処理部11により複数の領域に分割され、DCT部13により離散コサイン変換された入力画像データに対し、テーブル切替制御部21が出力する予備圧縮用量子化テーブルA,B,C,D又は本圧縮用量子化テーブルを用いて量子化を行う回路等である。   The quantization unit 14 is divided into a plurality of regions by the pre-processing unit 11 and pre-compression quantization tables A and B output from the table switching control unit 21 for the input image data subjected to discrete cosine transform by the DCT unit 13. , C, D, or a circuit that performs quantization using the main compression quantization table.

テーブル切替制御部21は、図1におけるテーブル制御部6の一形態であり、量子化部14に出力する量子化テーブルを切り替える回路等である。テーブル切替制御部21は、予備圧縮時には予備圧縮用テーブルデータベース22に保持された予備圧縮用量子化テーブルA,B,C,Dを出力し、図3に示す入力画像25の領域単位で予備圧縮用量子化テーブルA,B,C,Dを切り替える。また、テーブル切替制御部21は、本圧縮時には本圧縮用テーブル保持メモリ23が保持している本圧縮用量子化テーブルを出力する。   The table switching control unit 21 is a form of the table control unit 6 in FIG. 1 and is a circuit or the like that switches the quantization table output to the quantization unit 14. The table switching control unit 21 outputs the preliminary compression quantization tables A, B, C, and D held in the preliminary compression table database 22 during preliminary compression, and performs preliminary compression in units of areas of the input image 25 shown in FIG. The quantization tables A, B, C, and D are switched. The table switching control unit 21 outputs the main compression quantization table held in the main compression table holding memory 23 during the main compression.

図4は、予備圧縮用量子化テーブルAを例示するものであって、クオリティ値(Q値)が90の場合における輝度/色差量子化テーブルを示している。図5は、予備圧縮用量子化テーブルBを例示するものであって、Q値が100の場合における輝度/色差量子化テーブルを示している。図6は、予備圧縮用量子化テーブルCを例示するものであって、Q値が60の場合における輝度/色差量子化テーブルを示している。図7は、予備圧縮用量子化テーブルDを例示するものであって、Q値が80の場合における輝度/色差量子化テーブルを示している。図4〜図7の各図において、左側の表は輝度、右側の表は色差に関するテーブルを表している。Q値が大きいほど圧縮率が小さく、画像の劣化が小さい。Q値が小さいほど圧縮率が大きく、画像の劣化が大きい。   FIG. 4 exemplifies the preliminary compression quantization table A, and shows the luminance / color difference quantization table when the quality value (Q value) is 90. FIG. 5 exemplifies the preliminary compression quantization table B, and shows the luminance / color difference quantization table when the Q value is 100. FIG. 6 exemplifies the preliminary compression quantization table C, and shows the luminance / color difference quantization table when the Q value is 60. FIG. 7 exemplifies the preliminary compression quantization table D, and shows the luminance / color difference quantization table when the Q value is 80. In each of FIGS. 4 to 7, the left table represents the luminance, and the right table represents the color difference table. The larger the Q value, the smaller the compression rate and the smaller the image degradation. The smaller the Q value, the greater the compression ratio and the greater the degradation of the image.

図3において、入力画像25の各領域に「A領域」、「B領域」、「C領域」及び「D領域」とあるのは、各領域にそれぞれ予備圧縮用量子化テーブルA、予備圧縮用量子化テーブルB、予備圧縮用量子化テーブルC及び予備圧縮用量子化テーブルDが適用されて量子化が行われることを示している。   In FIG. 3, “A area”, “B area”, “C area”, and “D area” are included in each area of the input image 25, respectively. It shows that the quantization table B, the preliminary compression quantization table C, and the preliminary compression quantization table D are applied to perform quantization.

図8は、JPEGにおけるQ値と符号量との相関関係を示す特性線を例示している。このような特性の場合であって、例えばQ値を50以上で符号量を制御したい場合には、予備圧縮用量子化テーブルA−B(90≦Q値≦100)、予備圧縮用量子化テーブルC−D(60≦Q値≦80)又は予備圧縮用量子化テーブルD−A(80<Q値<90)の3領域に特性を分割することによって、予備圧縮による予測を良好に行うことができる。   FIG. 8 exemplifies characteristic lines indicating the correlation between the Q value and the code amount in JPEG. In the case of such characteristics, for example, when it is desired to control the code amount with a Q value of 50 or more, the preliminary compression quantization table AB (90 ≦ Q value ≦ 100), the preliminary compression quantization table By dividing the characteristics into three regions of CD (60 ≦ Q value ≦ 80) or preliminary compression quantization table DA (80 <Q value <90), prediction by preliminary compression can be performed well. it can.

尚、このような特性線は入力画像の種類等に応じて変化するため、例えば自然画用、人物用、書類(文字)用等の複数種の特性線及びこれに対応する予備圧縮用量子化テーブルを用意しておくことも可能である。また、このような入力画像の種類に応じた選択をユーザの操作、適宜の画像自動認識処理等に応じて行うことも可能である。   Since such characteristic lines change depending on the type of input image and the like, for example, a plurality of characteristic lines for natural images, for humans, for documents (characters), and corresponding precompression quantizations. It is also possible to prepare a table. It is also possible to perform selection according to the type of input image according to user operation, appropriate automatic image recognition processing, or the like.

ハフマン符号化部15(図2参照)は、周知のハフマン符号化のアルゴリズムに基づいて、量子化部14により量子化された入力画像データを符号化する回路等である。符号出力制御部16は、ハフマン符号化された入力画像データの出力先を選択する回路等である。符号出力制御部16は、予備圧縮時には符号化されたデータを符号量カウンタ17に出力し、本圧縮時には符号化されたデータを最終的な圧縮データとして外部機器等所定のデバイスに出力する。   The Huffman encoder 15 (see FIG. 2) is a circuit that encodes the input image data quantized by the quantizer 14 based on a known Huffman encoding algorithm. The code output control unit 16 is a circuit or the like that selects an output destination of Huffman-encoded input image data. The code output control unit 16 outputs the encoded data to the code amount counter 17 at the time of preliminary compression, and outputs the encoded data to the predetermined device such as an external device as final compressed data at the time of the main compression.

符号量カウンタ17は、符号出力制御部16が出力したデータの符号量を計上する回路等である。符号量カウンタ17は、予備圧縮用量子化テーブルA,B,C,D毎に符号量を計上する。本例においては、予備圧縮用量子化テーブルA,B,C,D毎に1つの入力画像25の符号量の1/4が計上される。即ち、計上された符号量の4倍の符号量が各予備圧縮用量子化テーブルA,B,C,Dの符号量となる。   The code amount counter 17 is a circuit that counts the code amount of the data output from the code output control unit 16. The code amount counter 17 counts the code amount for each of the preliminary compression quantization tables A, B, C, and D. In this example, 1/4 of the code amount of one input image 25 is counted for each of the preliminary compression quantization tables A, B, C, and D. That is, the code amount four times the recorded code amount becomes the code amount of each of the preliminary compression quantization tables A, B, C, and D.

本圧縮用テーブル決定部18は、符号量カウンタ17が出力する予備圧縮用量子化テーブルA,B,C,D毎の符号量と目標符号量保持メモリ20が保持する本圧縮における目標符号量とに基づいて、本圧縮において使用すべき本圧縮用量子化テーブルを決定する処理を行う回路等である。本圧縮用テーブル決定部18は、例えば各予備圧縮用量子化テーブルA,B,C,Dの符号量と目標符号量との比較結果に基づいて、本圧縮用量子化テーブルのQ値を算出し、当該Q値に対応する本圧縮用量子化テーブルを本圧縮用テーブルデータベース19から抽出する。当該抽出された本圧縮用量子化テーブルは、本圧縮用テーブル保持メモリ23に保持される。   The main compression table determination unit 18 includes a code amount for each of the preliminary compression quantization tables A, B, C, and D output from the code amount counter 17 and a target code amount in main compression held in the target code amount holding memory 20. And a circuit for performing a process of determining a main compression quantization table to be used in the main compression. The main compression table determination unit 18 calculates the Q value of the main compression quantization table, for example, based on the comparison result between the code amount of each of the preliminary compression quantization tables A, B, C, and D and the target code amount. Then, the main compression quantization table corresponding to the Q value is extracted from the main compression table database 19. The extracted main compression quantization table is held in the main compression table holding memory 23.

そして、テーブル切替制御部21は、本圧縮時において本圧縮用テーブル保持メモリ23に保持されている本圧縮用量子化テーブルを量子化部14に出力する。これにより、目標符号量に応じた最適な本圧縮用量子化テーブルを用いて量子化を行うことができる。   Then, the table switching control unit 21 outputs the main compression quantization table held in the main compression table holding memory 23 to the quantization unit 14 at the time of main compression. Thereby, it is possible to perform quantization using the optimum main compression quantization table corresponding to the target code amount.

尚、上記図2に示す各構成部11〜23は、例えばCPU(Central Processing Unit)等の処理装置にプログラムを実行させること、即ちソフトウェアにより実現してもよいし、IC(Integrated Circuit)等のハードウェアにより実現してもよいし、ソフトウェア及びハードウェアを併用して実現してもよい。   2 may be realized by software by causing a processing device such as a CPU (Central Processing Unit) to execute a program, that is, an IC (Integrated Circuit) or the like. It may be realized by hardware, or may be realized by using software and hardware together.

上記ソフトウェアを用いる場合には、その制御プログラム等は、ROM(Read Only Memory)に予め組み込まれて提供されることが好ましい。また、当該制御プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録して提供するように構成してもよい。更に、当該制御プログラムをインターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。更にまた、当該制御プログラムをインターネット等のネットワーク経由で提供又は配布するように構成してもよい。   When the software is used, the control program and the like are preferably provided by being incorporated in advance in a ROM (Read Only Memory). The control program is a file in an installable or executable format and is recorded on a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD (Digital Versatile Disk). And may be configured to be provided. Further, the control program may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. Furthermore, the control program may be provided or distributed via a network such as the Internet.

図9は、図2に示す画像処理装置1において本圧縮用量子化テーブルを決定する際の処理を例示している。予備圧縮処理が開始すると、テーブル切替制御部21が複数の領域に分割された入力画像25(図3参照)に適用する予備圧縮用量子化テーブル(以下、当該処理の説明においてテーブルと略記する)A,B,C,Dを切り替えながら、量子化部14及びハフマン符号化部15が量子化及び符号化処理を行う(S1)。符号量カウンタ17は、当該符号化処理により生じたテーブルA,B,C,D毎の符号量を計上する(S2)。本圧縮用テーブル決定部18は、各テーブルA,B,C,Dの符号量と目標符号量との関係を判定する(S3)。   FIG. 9 exemplifies processing when determining the compression quantization table in the image processing apparatus 1 shown in FIG. When the pre-compression process is started, the pre-compression quantization table applied to the input image 25 (see FIG. 3) divided by the table switching control unit 21 into a plurality of regions (hereinafter abbreviated as a table in the description of the process). While switching between A, B, C, and D, the quantization unit 14 and the Huffman coding unit 15 perform quantization and coding processing (S1). The code amount counter 17 counts the code amount for each of the tables A, B, C, and D generated by the encoding process (S2). The main compression table determination unit 18 determines the relationship between the code amount of each table A, B, C, and D and the target code amount (S3).

ステップS3において、目標符号量がテーブルAに対応する符号量以上テーブルBに対応する符号量以下である場合には図10に示す処理を実行し、目標符号量がテーブルCに対応する符号量以上テーブルDに対応する符号量以下である場合には図11に示す処理を実行し、目標符号量がテーブルDに対応する符号量より大きくテーブルAに対応する符号量より小さい場合には図12に示す処理を実行する。   In step S3, when the target code amount is equal to or larger than the code amount corresponding to the table A and equal to or smaller than the code amount corresponding to the table B, the process shown in FIG. 10 is executed, and the target code amount is equal to or larger than the code amount corresponding to the table C. When the code amount is equal to or smaller than the code amount corresponding to the table D, the processing shown in FIG. 11 is executed. When the target code amount is larger than the code amount corresponding to the table D and smaller than the code amount corresponding to the table A, The process shown is executed.

図10に示すステップS11において、下記値が求められる。
テーブルAの符号量とテーブルBの符号量との差:L
テーブルAのQ値(Qa)とテーブルBのQ値との差:M
1Q値あたりの符号量の増加量:N(=L/M)
テーブルAの符号量と目標符号量との差:R
差Rに対応するQ値の増加量:S(=R/N)
本圧縮用のQ値:Qr(=Qa+S)
In step S11 shown in FIG. 10, the following values are obtained.
Difference between code amount of table A and code amount of table B: L
Difference between Q value (Qa) of table A and Q value of table B: M
Increase amount of code amount per 1Q value: N (= L / M)
Difference between code amount of table A and target code amount: R
Increase amount of Q value corresponding to difference R: S (= R / N)
Q value for main compression: Qr (= Qa + S)

その後、Qrに対応する本圧縮用量化テーブルが本圧縮用テーブルデータベース19から抽出され(S12)、本圧縮の量子化に用いられる。   Thereafter, the main compression dose table corresponding to Qr is extracted from the main compression table database 19 (S12) and used for quantization of the main compression.

上記図10のステップS11,S12の処理は、図11のステップS21,S22及び図12のステップS31,S32においても同様に行われる。   The processes in steps S11 and S12 in FIG. 10 are similarly performed in steps S21 and S22 in FIG. 11 and steps S31 and S32 in FIG.

以下に、図9のステップS3以降の処理の具体例を示す。例えば、目標符号量が150KB、テーブルAに対応する符号量が250KB、テーブルBに対応する符号量が350KB、テーブルCに対応する符号量が100KB、テーブルDに対応する符号量が180KBである場合、目標符号量150KBは、テーブルC(100KB)とテーブルD(180KB)の間にあるため、ステップS3において「C≦目標符号量≦D」の関係に該当することとなる。   Below, the specific example of the process after step S3 of FIG. 9 is shown. For example, when the target code amount is 150 KB, the code amount corresponding to Table A is 250 KB, the code amount corresponding to Table B is 350 KB, the code amount corresponding to Table C is 100 KB, and the code amount corresponding to Table D is 180 KB Since the target code amount 150 KB is between the table C (100 KB) and the table D (180 KB), the relationship of “C ≦ target code amount ≦ D” is satisfied in step S 3.

この場合、図11のステップS21において、下記の値が求められる。
テーブルCの符号量とテーブルDの符号量との差:L=180−100=80
テーブルCのQ値(60)とテーブルDのQ値(80)との差:M=80−60=20
1Q値あたりの符号量の増加量:N=80/20=4
テーブルCの符号量と目標符号量との差:R=150−100=50
差Rに対応するQ値の増加量:S=50/4=12.5
本圧縮用のQ値:Qr=60+12.5=72.5
In this case, the following values are obtained in step S21 of FIG.
Difference between code amount of table C and code amount of table D: L = 180−100 = 80
Difference between Q value (60) of table C and Q value (80) of table D: M = 80−60 = 20
Increase amount of code amount per 1Q value: N = 80/20 = 4
Difference between code amount of table C and target code amount: R = 150−100 = 50
Increase amount of Q value corresponding to difference R: S = 50/4 = 12.5
Q value for main compression: Qr = 60 + 12.5 = 72.5

このように求められた本圧縮用のQ値(Qr=72.5)に対応する本圧縮用量化テーブルが本圧縮用テーブルデータベース19から抽出され(S22)、本圧縮の量子化に用いられる。   A main compression dose table corresponding to the Q value (Qr = 72.5) for main compression thus obtained is extracted from the main compression table database 19 (S22) and used for quantization of main compression.

尚、図2においては、本圧縮用量子化テーブルを本圧縮用テーブルデータベース19に予め用意しておく構成を示したが、上述のように求められた本圧縮用のQ値(Qr)に基づいて新たに本圧縮用量子化テーブルを作成する構成であってもよい。   Although FIG. 2 shows a configuration in which the main compression quantization table is prepared in advance in the main compression table database 19, it is based on the main compression Q value (Qr) obtained as described above. In this case, a new compression quantization table may be created.

上記画像処理装置1によれば、通常の圧縮処理に必要な基本的な構成部のみによって本圧縮時に使用すべき最適な量子化テーブルを決定するための予備圧縮を行うことができる。これにより、圧縮処理に必要な基本的な構成部を利用して高精度な符号量制御を実現することができる。   According to the image processing apparatus 1, it is possible to perform preliminary compression for determining an optimum quantization table to be used at the time of main compression by only basic components necessary for normal compression processing. As a result, it is possible to realize highly accurate code amount control using basic components necessary for compression processing.

本発明は、上記実施の形態に限られるものではなく、発明の要旨を逸脱しない範囲で適宜変更可能なものである。例えば、図2においては、JPEG方式を利用した形態を示したが、本発明はこれに限定されるべきものではなく、JPEGと同様に入力画像の特徴に応じて符号量が一定とならない他の圧縮方式等にも適用可能なものである。   The present invention is not limited to the above embodiment, and can be appropriately changed without departing from the gist of the invention. For example, FIG. 2 shows a form using the JPEG method, but the present invention should not be limited to this. Other than the JPEG, the code amount is not constant according to the characteristics of the input image. The present invention can also be applied to a compression method.

1 画像処理装置
2 画像分割部
3 量子化部
4 符号化部
5 テーブル保持部
6 テーブル制御部
7 符号量検出部
8 テーブル決定部
11 前処理部
12 前処理用メモリ
13 DCT部
14 量子化部
15 ハフマン符号化部
16 符号出力制御部
17 符号量カウンタ
18 本圧縮用テーブル決定部
19 本圧縮用テーブルデータベース
20 目標符号量保持メモリ
21 テーブル切替制御部
22 予備圧縮用テーブルデータベース
23 本圧縮用テーブル保持メモリ
25 入力画像
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Image division part 3 Quantization part 4 Encoding part 5 Table holding part 6 Table control part 7 Code amount detection part 8 Table determination part 11 Preprocessing part 12 Preprocessing memory 13 DCT part 14 Quantization part 15 Huffman coding unit 16 Code output control unit 17 Code amount counter 18 Main compression table determination unit 19 Main compression table database 20 Target code amount holding memory 21 Table switching control unit 22 Pre-compression table database 23 Main compression table holding memory 25 Input images

特開平5−63994号公報JP-A-5-63994 特開2004−112345号公報JP 2004-112345 A

Claims (8)

入力画像を複数の領域に分割する画像分割手段と、
分割された前記入力画像を量子化テーブルに基づいて量子化する量子化手段と、
量子化された前記入力画像を符号化する符号化手段と、
予め異なるクオリティ値毎に作成された複数の予備圧縮用量子化テーブルを保持するテーブル保持手段と、
予備圧縮時において前記領域毎に異なる前記予備圧縮用量子化テーブルを適用して前記量子化手段に前記入力画像の量子化を行わせるテーブル制御手段と、
前記符号化手段が出力する符号量を検出する符号量検出手段と、
前記予備圧縮時において検出された前記予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とに基づいて、前記本圧縮時に前記符号化手段が出力する符号量が前記目標符号量となるように、前記本圧縮時において使用する前記量子化テーブルを決定するテーブル決定手段と、
を備える画像処理装置。
Image dividing means for dividing the input image into a plurality of regions;
Quantization means for quantizing the divided input image based on a quantization table;
Encoding means for encoding the quantized input image;
Table holding means for holding a plurality of preliminary compression quantization tables created in advance for different quality values;
Table control means for applying the preliminary compression quantization table different for each region at the time of preliminary compression and causing the quantization means to perform quantization of the input image;
Code amount detection means for detecting a code amount output by the encoding means;
Based on the code amount for each pre-compression quantization table detected during the pre-compression and the target code amount during the main compression, the code amount output by the encoding means during the main compression is the target code amount. Table determining means for determining the quantization table to be used at the time of the main compression,
An image processing apparatus comprising:
前記テーブル保持手段は、異なるクオリティ値毎に作成された複数の本圧縮用量子化テーブルを更に保持し、
前記テーブル決定手段は、前記算出されたクオリティ値に対応する前記本圧縮用量子化テーブルを前記テーブル保持手段から抽出する、
請求項1に記載の画像処理装置。
The table holding means further holds a plurality of main compression quantization tables created for different quality values,
The table determining means extracts the main compression quantization table corresponding to the calculated quality value from the table holding means;
The image processing apparatus according to claim 1.
前記テーブル決定手段は、前記算出されたクオリティ値に基づいて前記本圧縮時において使用する前記量子化テーブルを作成する、
請求項1に記載の画像処理装置。
The table determination means creates the quantization table used in the main compression based on the calculated quality value.
The image processing apparatus according to claim 1.
前記予備圧縮用量子化テーブルは、前記符号化手段における符号化方式に対応するクオリティ値と符号量との相関関係に基づいて作成されている、
請求項1〜3のいずれか1項に記載の画像処理装置。
The preliminary compression quantization table is created based on the correlation between the quality value and the code amount corresponding to the encoding method in the encoding means,
The image processing apparatus according to claim 1.
前記符号化方式は、JPEGである、
請求項4に記載の画像処理装置。
The encoding method is JPEG.
The image processing apparatus according to claim 4.
前記テーブル保持手段は、予め前記入力画像の種類毎に作成された複数の前記予備圧縮用量子化テーブルを更に保持し、  The table holding means further holds a plurality of the preliminary compression quantization tables created in advance for each type of the input image,
前記テーブル制御手段は、前記入力画像の種類に対応する前記予備圧縮用量子化テーブルを適用して前記量子化手段に前記入力画像の量子化を行わせる、  The table control means applies the preliminary compression quantization table corresponding to the type of the input image, and causes the quantization means to quantize the input image;
請求項1〜5のいずれか1項に記載の画像処理装置。  The image processing apparatus according to claim 1.
入力画像を複数の領域に分割する工程と、
分割された前記入力画像を量子化テーブルに基づいて量子化する工程と、
量子化された前記入力画像を符号化する工程と、
予備圧縮時において前記領域毎に、予め異なるクオリティ値毎に作成された複数の予備圧縮用量子化テーブルを適用して前記入力画像の量子化を行う工程と、
前記符号化により出力される符号量を検出する工程と、
前記予備圧縮時において検出された前記予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とに基づいて、前記本圧縮時に前記符号化手段が出力する符号量が前記目標符号量となるように、前記本圧縮時において使用する前記量子化テーブルを決定する工程と、
を含む画像処理方法。
Dividing the input image into a plurality of regions;
Quantizing the divided input image based on a quantization table;
Encoding the quantized input image;
Applying a plurality of preliminary compression quantization tables created in advance for each different quality value for each region at the time of preliminary compression, and quantizing the input image;
Detecting a code amount output by the encoding;
Based on the code amount for each pre-compression quantization table detected during the pre-compression and the target code amount during the main compression, the code amount output by the encoding means during the main compression is the target code amount. Determining the quantization table to be used during the main compression so that
An image processing method including:
画像処理装置を制御するコンピュータに、
入力画像を複数の領域に分割する処理と、
分割された前記入力画像を量子化テーブルに基づいて量子化する処理と、
量子化された前記入力画像を符号化する処理と、
予備圧縮時において前記領域毎に、予め異なるクオリティ値毎に作成された複数の予備圧縮用量子化テーブルを適用して前記入力画像の量子化を行う処理と、
前記符号化により出力される符号量を検出する処理と、
前記予備圧縮時において検出された前記予備圧縮用量子化テーブル毎の符号量と本圧縮時における目標符号量とに基づいて、前記本圧縮時に前記符号化手段が出力する符号量が前記目標符号量となるように、前記本圧縮時において使用する前記量子化テーブルを決定する処理と、
を実行させる画像処理プログラム。
In the computer that controls the image processing apparatus,
A process of dividing the input image into a plurality of areas;
A process of quantizing the divided input image based on a quantization table;
A process of encoding the quantized input image;
A process of quantizing the input image by applying a plurality of preliminary compression quantization tables created for each different quality value in advance for each region during preliminary compression,
A process of detecting a code amount output by the encoding;
Based on the code amount for each pre-compression quantization table detected during the pre-compression and the target code amount during the main compression, the code amount output by the encoding means during the main compression is the target code amount. Processing for determining the quantization table to be used at the time of the main compression,
An image processing program for executing
JP2013051069A 2013-03-13 2013-03-13 Image processing apparatus, method, and program Expired - Fee Related JP6191173B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013051069A JP6191173B2 (en) 2013-03-13 2013-03-13 Image processing apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013051069A JP6191173B2 (en) 2013-03-13 2013-03-13 Image processing apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2014179709A JP2014179709A (en) 2014-09-25
JP6191173B2 true JP6191173B2 (en) 2017-09-06

Family

ID=51699255

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013051069A Expired - Fee Related JP6191173B2 (en) 2013-03-13 2013-03-13 Image processing apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP6191173B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791827B (en) * 2016-02-26 2018-07-24 北京计算机技术及应用研究所 A kind of method for video coding of wireless channel
US9673836B1 (en) * 2016-09-23 2017-06-06 International Business Machines Corporation System level testing of entropy encoding

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0556273A (en) * 1991-08-21 1993-03-05 Toshiba Corp Image coder
JP2797159B2 (en) * 1992-03-02 1998-09-17 カシオ計算機株式会社 Image data compression apparatus and image data compression method
JP2897563B2 (en) * 1992-11-25 1999-05-31 松下電器産業株式会社 Image compression coding device
JP2005002206A (en) * 2003-06-11 2005-01-06 Yokohama Rubber Co Ltd:The Rubber composition and pneumatic tire
JP2005101849A (en) * 2003-09-24 2005-04-14 Toyo Commun Equip Co Ltd Manufacturing method of piezoelectric substrate

Also Published As

Publication number Publication date
JP2014179709A (en) 2014-09-25

Similar Documents

Publication Publication Date Title
RU2567988C2 (en) Encoder, method of encoding data, decoder, method of decoding data, system for transmitting data, method of transmitting data and programme product
JP2004215257A (en) Advanced dct-based video encoding method and apparatus
US9749626B2 (en) Modulo embedding of video parameters
US9076189B2 (en) Coding apparatus and method for encoding image data
JP6191173B2 (en) Image processing apparatus, method, and program
US11310496B2 (en) Determining quality values for blocks of encoded video
US11265544B2 (en) Apparatus and method for image compression based on optimal sequential encoding scheme
US10306226B2 (en) Image encoding apparatus, image decoding apparatus, and control methods therefor
WO2012118569A1 (en) Visually optimized quantization
US9723312B2 (en) Method and system for random accessible image compression with adaptive quantization
JP6564315B2 (en) Encoding device, decoding device, and program
JP4241517B2 (en) Image encoding apparatus and image decoding apparatus
JP5642105B2 (en) Image processing apparatus and image forming apparatus
JP2006304198A (en) Image compressing device
US11563945B2 (en) Adaptive offset for variance based quantization
JPH0670175A (en) Method and device for encoding picture data
US20170064337A1 (en) Image processing device, recording medium, and image processing method
US11849114B2 (en) Image encoding apparatus, image decoding apparatus, control methods thereof, and non-transitory computer-readable storage medium
JPH08163561A (en) Picture data compression device
JP3676651B2 (en) Stepwise reversible image signal encoding method, decoding method, encoding device, decoding device, and encoding and decoding program recording medium
WO2014147679A1 (en) Image encoding device and image encoding method
JP6757599B2 (en) Encoding device and program
Hsu et al. Improved AC Coefficients Compression Using Alternate Adaptive Scanning and Multi-Feature Determined Context Arithmetic Coding
JP4447903B2 (en) Signal processing apparatus, signal processing method, recording medium, and program
WO2018154982A1 (en) Image decoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170424

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170724

R151 Written notification of patent or utility model registration

Ref document number: 6191173

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees