JP5520099B2 - Image processing apparatus and control method thereof - Google Patents
Image processing apparatus and control method thereof Download PDFInfo
- Publication number
- JP5520099B2 JP5520099B2 JP2010068913A JP2010068913A JP5520099B2 JP 5520099 B2 JP5520099 B2 JP 5520099B2 JP 2010068913 A JP2010068913 A JP 2010068913A JP 2010068913 A JP2010068913 A JP 2010068913A JP 5520099 B2 JP5520099 B2 JP 5520099B2
- Authority
- JP
- Japan
- Prior art keywords
- image data
- data
- encoding
- tile image
- encoded data
- 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
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
本発明は、画像処理技術、特に画像の圧縮符号化技術に関するものである。 The present invention relates to an image processing technique, and more particularly to an image compression coding technique.
画像の圧縮符号化技術においてより効率的な圧縮を実現するために、1つの画像を複数のタイル画像に分割し、各タイル画像の内容に応じて圧縮方式を切り替える技術が提案されている。ただし、例えば、可逆符号化と非可逆符号化の2種の圧縮方式で圧縮されたタイル画像が1つの画像内に混在している場合、当該画像を復号(復元)した場合に、タイル画像間の境界において画質の極端な変化が視覚的な劣化としてユーザに知覚される場合がある。そこで、特許文献1では、特定画像の領域を符号化する場合には、可逆符号化と非可逆符号化との何れか一方に固定するように制御する技術が開示されている。 In order to realize more efficient compression in the image compression coding technique, a technique has been proposed in which one image is divided into a plurality of tile images and the compression method is switched in accordance with the contents of each tile image. However, for example, when tile images compressed by two types of compression methods, lossless encoding and lossy encoding, are mixed in one image, when the images are decoded (restored), In some cases, an extreme change in image quality is perceived by the user as a visual deterioration at the boundary of. Therefore, Japanese Patent Application Laid-Open No. 2004-228561 discloses a technique for controlling to fix to either one of lossless encoding and lossy encoding when a specific image region is encoded.
しかしながら、可逆符号化と非可逆符号化の2種の圧縮方式で圧縮されたタイル画像が隣接する場合や、互いに異なる圧縮率で圧縮されたタイル画像が隣接する場合には、視覚的な劣化としてユーザに知覚されやすい。特に、タイル画像間の境界において画質の極端な変化が知覚され得る。 However, when tile images compressed by two types of compression methods, lossless encoding and lossy encoding, are adjacent, or tile images compressed at different compression rates are adjacent, visual degradation It is easy for the user to perceive. In particular, extreme changes in image quality can be perceived at the boundaries between tile images.
本発明は上述の問題点に鑑みてなされたものであり、効率的な画像圧縮を実現しつつ、視覚的な劣化を低減可能とする画像圧縮技術を提供することを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image compression technique capable of reducing visual deterioration while realizing efficient image compression.
上述の1以上の問題点を解決するため、本発明の画像処理装置は以下の構成を備える。すなわち、画像データを圧縮符号化する画像処理装置において、画像データを所定サイズの画素ブロックであるタイル画像データを単位に入力する入力手段と、入力されたタイル画像データを可逆符号化し可逆符号化データを生成する第1の符号化手段と、量子化ステップに従った量子化処理を介在させることで、入力されたタイル画像データを非可逆符号化し非可逆符号化データを生成する第2の符号化手段と、着目タイル画像データに対する前記第1の符号化手段で生成された可逆符号化データと、前記着目タイル画像データに対する前記第2の符号化手段で生成された非可逆符号化データとを比較し、何れのデータ量が少ないかを判定する第1判定手段と、前記可逆符号化データと前記非可逆符号化データとの何れか一方を前記着目タイル画像データの符号化データとして選択し出力する選択手段と、前記着目タイル画像データの符号化データを選択し出力するたびに、後続するタイル画像データの符号化に備えて、前記量子化ステップを更新する更新手段と、前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記所定の最大圧縮率より小さい圧縮率に対応する第2閾値以下の場合には、前記着目タイル画像データに後続するタイル画像データについては、前記第1判定手段の判定結果に応じて前記第1判定手段がデータ量が少ないと判定した符号化データを選択し出力するように制御し、前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記第2閾値より大きい場合には、前記着目タイル画像データに後続するタイル画像データについては、強制的に前記第2の符号化手段により生成された非可逆符号化データを選択し出力するように前記選択手段を制御する制御手段と、を備える。 In order to solve one or more problems described above, the image processing apparatus of the present invention has the following configuration. That is, in an image processing apparatus that compresses and encodes image data, input means for inputting image data in units of tile image data that is a pixel block of a predetermined size, and the input tile image data are losslessly encoded and lossless encoded data First encoding means for generating a second encoding for generating lossy encoded data by irreversibly encoding input tile image data by interposing a quantization process according to a quantization step And the lossless encoded data generated by the first encoding unit for the target tile image data and the irreversible encoded data generated by the second encoding unit for the target tile image data The first determination means for determining which data amount is small, and one of the lossless encoded data and the lossy encoded data is determined as the target tag. And selection means you select output as encoded data of Le image data, each time the output select encoded data of the tile of interest image data, in preparation for the encoding of the subsequent tile image data, the quantization When the update means for updating the step and the quantization step set when the target tile image data is irreversibly encoded are equal to or smaller than a second threshold corresponding to a compression rate smaller than the predetermined maximum compression rate For the tile image data subsequent to the tile image data of interest, the encoded data determined by the first determination unit as having a small amount of data are selected and output according to the determination result of the first determination unit. controlling said focused quantization step tile image data has been set upon lossy encoding, it is larger than the second threshold value, the interest tile image data For tile image data subsequent to includes a control means for controlling the pre-hexene-option means to select the lossy encoded data generated by forcibly said second encoding means output, a.
本発明によれば、効率的な画像圧縮を実現しつつ、視覚的な劣化を低減可能とする画像圧縮技術を提供することができる。 According to the present invention, it is possible to provide an image compression technique that can reduce visual deterioration while realizing efficient image compression.
以下に、図面を参照して、この発明の好適な実施の形態を詳しく説明する。なお、以下の実施の形態はあくまで例示であり、本発明の範囲を限定する趣旨のものではない。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments are merely examples, and are not intended to limit the scope of the present invention.
(第1実施形態)
本発明に係る画像処理装置の第1実施形態として、入力されたデータを可逆符号化する第1の符号化手段と、入力されたデータを非可逆符号化する第2の符号化手段とを含む符号化処理部を備える画像処理装置を例に挙げて以下に説明する。
(First embodiment)
The first embodiment of the image processing apparatus according to the present invention includes a first encoding unit that performs lossless encoding of input data and a second encoding unit that performs lossy encoding of input data. An image processing apparatus including an encoding processing unit will be described below as an example.
<装置構成>
図1は、第1実施形態に係る画像処理装置100のブロック図である。
<Device configuration>
FIG. 1 is a block diagram of an image processing apparatus 100 according to the first embodiment.
101は入力された画像データを処理するデータ制御部である。そして、データ制御部101は、符号化処理部109および復号化処理部110を備える。符号化処理部109は、画像データを圧縮し圧縮画像データを出力する処理部である。また、復号化処理部110、圧縮画像データを展開し画像データを出力する処理部である。そして、データ制御部101は、出力された処理された画像データまたは圧縮画像データをデータ記憶部105へ格納する。なお、データ制御部101は、CPU103やRAM104により制御される。なお、CPU103が所定の画像処理プログラムを実行することによりデータ制御部101を実現するよう構成しても良い。 A data control unit 101 processes input image data. The data control unit 101 includes an encoding processing unit 109 and a decoding processing unit 110. The encoding processing unit 109 is a processing unit that compresses image data and outputs compressed image data. The decoding processing unit 110 is a processing unit that decompresses the compressed image data and outputs the image data. Then, the data control unit 101 stores the output processed image data or compressed image data in the data storage unit 105. The data control unit 101 is controlled by the CPU 103 and the RAM 104. The CPU 103 may be configured to implement the data control unit 101 by executing a predetermined image processing program.
データ入力部102は、画像データまたは圧縮画像データを外部機器から入力する機能部である。データ入力部102は、例えば、原稿を読み取り画像データを生成するイメージスキャナや、外部機器からネットワークを介して画像データを受信するネットワーク・インタフェースなどがある。なお、画像データには、プリンタ記述言語(PDL)形式の印刷データなども含まれる。また、データ出力部111は、データ制御部101により処理された画像データまたは圧縮画像データを外部機器に出力する機能部である。データ出力部111は、例えば、画像を印刷媒体上に形成するプリンタや画像を表示するモニタなどがある。 The data input unit 102 is a functional unit that inputs image data or compressed image data from an external device. The data input unit 102 includes, for example, an image scanner that reads a document and generates image data, and a network interface that receives image data from an external device via a network. The image data includes print data in a printer description language (PDL) format. The data output unit 111 is a functional unit that outputs image data or compressed image data processed by the data control unit 101 to an external device. The data output unit 111 includes, for example, a printer that forms an image on a print medium and a monitor that displays the image.
データ記憶部105は、画像処理装置100の動作に利用されるパラメータ106、画像処理装置100で使用される各種のアプリケーション107、オペレーティングシステム(OS)108などを格納している。 The data storage unit 105 stores parameters 106 used for the operation of the image processing apparatus 100, various applications 107 used in the image processing apparatus 100, an operating system (OS) 108, and the like.
図2は、第1実施形態に係る符号化処理部109の詳細ブロック図である。符号化処理部109は、第1の符号化部201、第2の符号化部202、符号化データ選択部203、パラメータ制御部204を含む。 FIG. 2 is a detailed block diagram of the encoding processing unit 109 according to the first embodiment. The encoding processing unit 109 includes a first encoding unit 201, a second encoding unit 202, an encoded data selection unit 203, and a parameter control unit 204.
なお、以下の説明では、データ入力部102は、PCなどの外部機器で生成された画像データを、符号化処理部109における画像データの処理単位であるM×N画素(M,Nは自然数)の画像データとして順次入力することを想定する。より具体的には、画像データを、8画素幅のライン画像データに分割し、更にライン画像データを8画素毎に分割することにより得られる所定サイズ(8×8画素)の画素ブロックであるタイル画像データとして入力する。 In the following description, the data input unit 102 converts image data generated by an external device such as a PC into M × N pixels (M and N are natural numbers) that are processing units of image data in the encoding processing unit 109. It is assumed that the image data is sequentially input. More specifically, the tile is a pixel block of a predetermined size (8 × 8 pixels) obtained by dividing the image data into line image data having a width of 8 pixels and further dividing the line image data every 8 pixels. Input as image data.
第1の符号化部201は可逆符号化し可逆符号化データを生成する可逆符号化部である。可逆符号化であるため、その展開(復号)結果は符号化する前のオリジナル画像と同一であり、原理的に画質の劣化は発生しない。但し、圧縮率を制御するためのパラメータの設定も無い。以下では、第1の符号化部201が、JPEG−LS符号化(以下では単にLS圧縮と呼ぶ)を用いる場合について説明する。 The first encoding unit 201 is a lossless encoding unit that performs lossless encoding and generates lossless encoded data. Since it is lossless encoding, the expansion (decoding) result is the same as that of the original image before encoding, and in principle there is no deterioration in image quality. However, there is no parameter setting for controlling the compression rate. Hereinafter, a case where the first encoding unit 201 uses JPEG-LS encoding (hereinafter simply referred to as LS compression) will be described.
第2の符号化部202は非可逆符号化し非可逆符号化データを生成する不可逆符号化部である。不可逆符号化では、圧縮率に影響を与える所定のパラメータに従って対象となる画像データに対し圧縮(符号化)処理を行う。以下では、第2の符号化部202が、JPEG符号化(JPEG圧縮)を用いる場合について説明する。そして、圧縮率に影響を与える所定のパラメータである、所定の最大圧縮率に対応する第1閾値以下(後述のTh1以下)の量子化ステップに従った量子化処理が介在するものとする。 The second encoding unit 202 is an irreversible encoding unit that performs lossy encoding and generates lossy encoded data. In lossy encoding, compression (encoding) processing is performed on target image data according to a predetermined parameter that affects the compression rate. Hereinafter, a case where the second encoding unit 202 uses JPEG encoding (JPEG compression) will be described. Then, it is assumed that a quantization process according to a quantization step equal to or lower than a first threshold (thus described below Th1) corresponding to a predetermined maximum compression ratio, which is a predetermined parameter affecting the compression ratio, is interposed.
なお、可逆符号化であるLS圧縮は、非可逆符号化であるJPEG圧縮とはアルゴリズムは全く異なる。LS圧縮は、文字線画、コンピュータグラフィックスに適した技術であり、これらの画像の場合には、画像劣化の生じない可逆符号化であるにもかかわらず、非可逆符号化であるJPEG圧縮よりも遥かに少ない符号化データを生成することができる。また、JPEG圧縮においては、8×8画素のタイル画像データを周波数領域のデータに変換し、量子化テーブル(Q−table)で指定された量子化ステップを用いて量子化し、ハフマン符号化処理を行う。JPEG圧縮は、写真や自然画に適した技術であり、これらの画像の場合には、可逆符号化であるLS圧縮よりも遥かに少ない符号化データを生成することができる。なお、第1の符号化部201および第2の符号化部202により出力された符号化データには、何れの符号化方式で符号化されたかを識別可能な情報(識別ビットなど)が付加されているものとする。 Note that LS compression, which is lossless encoding, has a completely different algorithm from JPEG compression, which is lossy encoding. LS compression is a technology suitable for character line drawing and computer graphics. In the case of these images, although it is lossless encoding that does not cause image degradation, it is more irreversible than JPEG compression that is lossy encoding. Much less encoded data can be generated. In JPEG compression, 8 × 8 pixel tile image data is converted into frequency domain data, quantized using a quantization step specified by a quantization table (Q-table), and Huffman coding processing is performed. Do. JPEG compression is a technique suitable for photographs and natural images. In the case of these images, much less encoded data can be generated than LS compression, which is lossless encoding. It should be noted that information (such as an identification bit) that can be identified by which encoding method is added to the encoded data output by the first encoding unit 201 and the second encoding unit 202. It shall be.
符号化データ選択部203は、現在処理しているタイル画像データ(着目タイル画像データ)に対して第1の符号化部201から出力される符号化データと第2の符号化部202から出力される符号化データとのデータ量を比較する。そして、パラメータ制御部204より設定された閾値(ルックアップテーブル(LUT))に基づいてどちらのタイル画像データを選択するかを決定する。選択された符号化データはデータ記憶部105に書き込まれるか、あるいはデータ出力部111に出力される。なお、符号化データ選択部203が現在処理しているタイル画像データに対して選択した符号化データの情報(符号化種別、圧縮率など)はパラメータ制御部204へ通知される。 The encoded data selection unit 203 outputs the encoded data output from the first encoding unit 201 and the second encoding unit 202 with respect to the tile image data currently processed (the tile image data of interest). Compare the data amount with the encoded data. Then, based on a threshold value (lookup table (LUT)) set by the parameter control unit 204, which tile image data is selected is determined. The selected encoded data is written into the data storage unit 105 or output to the data output unit 111. It should be noted that the encoded data information (encoding type, compression rate, etc.) selected for the tile image data currently processed by the encoded data selection unit 203 is notified to the parameter control unit 204.
パラメータ制御部204は、第2の符号化部202においてJPEG圧縮に用いる量子化ステップ、および、符号化データ選択部203においてデータ量を比較する際に用いるLUTを制御する。 The parameter control unit 204 controls the quantization step used for JPEG compression in the second encoding unit 202 and the LUT used when comparing the data amount in the encoded data selection unit 203.
より具体的には、パラメータ制御部204は、以下の4つの処理を実行する。
・圧縮結果のフィードバック処理:現在処理しているタイル画像データの圧縮結果に基づいて後続のタイル画像データのパラメータを制御するための第2の符号化部202への制御処理である。
・量子化ステップの制御処理:第2の符号化部202におけるJPEG圧縮に用いられる量子化ステップの制御処理である。これは、隣接するタイル画像間で異なる圧縮率を用いた場合に生じる画質の変化を低減するための処理であり、詳細は後述する。
・JPEG圧縮符号化データの強制選択処理:量子化ステップが所定の第2閾値(後述のTh2)より大きい場合に、符号化データ選択部203が強制的に第2の符号化(JPEG圧縮)で圧縮された符号化データを選択するようにLUTを設定する処理である。これは、高圧縮率でJPEG圧縮されたタイル画像に、LS圧縮されたタイル画像(つまり非劣化)が出現を防ぐための処理である。
・パラメータの初期化処理:ライン画像データを1ライン処理するごと、つまり各ライン画像データの最後のタイル画像データに対する符号化処理が終了した後に実行するパラメータ(ここでは、量子化ステップおよびLUT)の初期化処理である。これは、ライン画像データの先頭にあるタイル画像データにおいて、1つ前に処理したタイル画像データ(隣接するライン画像データの最後尾のタイル画像データ)の処理結果が影響するのを防ぐための処理である。
More specifically, the parameter control unit 204 executes the following four processes.
Compression result feedback processing: Control processing to the second encoding unit 202 for controlling the parameters of the subsequent tile image data based on the compression result of the tile image data currently being processed.
Quantization step control processing: Quantization step control processing used for JPEG compression in the second encoding unit 202. This is a process for reducing a change in image quality that occurs when different compression rates are used between adjacent tile images, and will be described in detail later.
JPEG compression encoded data forced selection process: When the quantization step is larger than a predetermined second threshold (Th2 described later), the encoded data selection unit 203 is forced to perform the second encoding (JPEG compression). This is a process of setting the LUT so as to select compressed encoded data. This is a process for preventing an LS-compressed tile image (that is, non-degraded) from appearing in a JPEG-compressed tile image at a high compression rate.
Parameter initialization processing: Parameters (here, quantization step and LUT) to be executed every time line image data is processed, that is, after the encoding processing for the last tile image data of each line image data is completed. It is an initialization process. This is a process for preventing the processing result of the tile image data processed immediately before (the tile image data at the end of the adjacent line image data) from affecting the tile image data at the head of the line image data. It is.
さらに、パラメータ制御部204、第2の符号化部202に指定する量子化ステップに対応する圧縮率に関して、以下の3つの閾値(Th0,Th1,Th2)を保持している。
・Th0:第2の符号化部202に指定可能な最低の圧縮率(下限圧縮率)。
・Th1:JPEG圧縮による画像劣化が目立たない圧縮率(上限圧縮率)。
・Th2:LS圧縮画像と隣接した場合においてもタイル画像境界が目立たない圧縮率。
なお、Th0<Th2≦Th1である(Th1=Th2の場合は実質的に2個の閾値になる。)。これらの3つの閾値について、予めユーザが設定するよう画像処理装置100を構成しても良い。
Furthermore, the following three threshold values (Th0, Th1, Th2) are held regarding the compression rate corresponding to the quantization step designated to the parameter control unit 204 and the second encoding unit 202.
Th0: The lowest compression rate (lower limit compression rate) that can be specified in the second encoding unit 202.
Th1: A compression rate (upper limit compression rate) in which image deterioration due to JPEG compression is not noticeable.
Th2: A compression rate at which the tile image boundary is not noticeable even when adjacent to the LS compressed image.
Note that Th0 <Th2 ≦ Th1 (if Th1 = Th2, there are substantially two threshold values). The image processing apparatus 100 may be configured so that the user sets these three threshold values in advance.
<装置の動作>
図3は、第1実施形態に係る符号化処理部の動作フローチャートである。
<Operation of the device>
FIG. 3 is an operation flowchart of the encoding processing unit according to the first embodiment.
ステップS201では、データ入力部102は、外部機器から受信した画像データを分割し複数のタイル画像データを生成する。 In step S201, the data input unit 102 divides image data received from an external device and generates a plurality of tile image data.
ステップS202では、1つのタイル画像データを処理対象のタイル画像データ(着目タイル画像データ)として設定し、第1の符号化部201および第2の符号化部202により符号化処理を実行させ、2種類の符号化データを生成する。なお、第2の符号化部202は、その時点で指定されている量子化ステップに基づいて符号化処理を行う。より具体的には、ライン画像データの先頭のタイル画像データに対しては予め設定された初期値である量子化ステップを使用し、他のタイル画像データに対しては後述の制御処理(S204)で制御された量子化ステップを使用する。 In step S202, one tile image data is set as processing target tile image data (target tile image data), and the first encoding unit 201 and the second encoding unit 202 execute the encoding process. Generate encoded data of a kind. The second encoding unit 202 performs an encoding process based on the quantization step specified at that time. More specifically, a quantization step that is a preset initial value is used for the first tile image data of the line image data, and a control process (to be described later) is performed for other tile image data (S204). Use the quantization step controlled by.
ステップS203では、符号化データ選択部203は、パラメータ制御部204より設定されたLUTに基づいて2種類の符号化データどちらのタイル画像データを選択するかを決定する。より具体的には、データ量が少ない符号化データを選択するが(第1判定手段)、LUTが後述する”強制JPEGモード”を指定するものであった場合は、第2の符号化部202から出力された符号化データを選択する(符号化データ選択手段)。つまり、量子化ステップが第2閾値以下の場合に、データ量が少ない符号化データを選択する。 In step S <b> 203, the encoded data selection unit 203 determines which tile image data of the two types of encoded data is selected based on the LUT set by the parameter control unit 204. More specifically, encoded data with a small amount of data is selected (first determination means), but if the LUT specifies “forced JPEG mode” to be described later, the second encoding unit 202 is selected. The encoded data output from is selected (encoded data selecting means). That is, when the quantization step is equal to or smaller than the second threshold value, encoded data with a small data amount is selected.
ステップS204では、パラメータ制御部204は、第2の符号化部202における量子化ステップ、および、符号化データ選択部203におけるLUTを制御する。動作の詳細は後述する。 In step S <b> 204, the parameter control unit 204 controls the quantization step in the second encoding unit 202 and the LUT in the encoded data selection unit 203. Details of the operation will be described later.
ステップS205では、CPU103は、S201で生成された複数のタイル画像データのうち、未処理のタイル画像データが残っているかを判定する。残っている場合は、次のタイル画像データを選択しステップS202に進む。未処理のタイル画像データが残っていない場合、つまり、すべてのタイル画像データについて処理が完了した場合は処理を終了する。 In step S205, the CPU 103 determines whether unprocessed tile image data remains among the plurality of tile image data generated in step S201. If it remains, the next tile image data is selected and the process proceeds to step S202. If unprocessed tile image data does not remain, that is, if processing has been completed for all tile image data, the processing ends.
図4は、第1実施形態に係るパラメータ制御処理のフローチャートである。図4(a)は制御処理の全体を示し、図4(b)は判定処理(S303)の詳細処理を示している。なお、以下の処理は、CPU103が、データ記憶部105に格納されたアプリケーション107をRAM104にロードし実行することにより実現される。 FIG. 4 is a flowchart of parameter control processing according to the first embodiment. FIG. 4A shows the entire control process, and FIG. 4B shows the detailed process of the determination process (S303). The following processing is realized by the CPU 103 loading the application 107 stored in the data storage unit 105 into the RAM 104 and executing it.
ステップS301では、ステップS203において第2の符号化部202から出力された符号化データ(つまりJPEG圧縮)が選択されたか否かを選択する。JPEG圧縮が選択された場合はステップS302に進み、LS圧縮が選択された場合はパラメータを変更せずに(S304)、パラメータ制御処理を終了する。 In step S301, it is selected whether or not the encoded data (that is, JPEG compression) output from the second encoding unit 202 in step S203 has been selected. If JPEG compression is selected, the process proceeds to step S302. If LS compression is selected, the parameter is not changed (S304), and the parameter control process is terminated.
ステップS302では、ステップS203におけるJPEG圧縮が後述する”強制JPEGモード”によるものであったか否かを判定する。具体的には、現在設定されているLUTを確認することにより判定しても良いし、別途生成されたフラグを参照し判定しても良い。”強制JPEGモード”である場合はステップS303に進み、”強制JPEGモード”でない場合は量子化ステップを高圧縮側に所定量だけシフトし更新し(S305)、パラメータ制御処理を終了する。 In step S302, it is determined whether or not the JPEG compression in step S203 is based on a “forced JPEG mode” described later. Specifically, the determination may be made by confirming the currently set LUT, or may be made by referring to a separately generated flag. If it is “forced JPEG mode”, the process proceeds to step S303. If it is not “forced JPEG mode”, the quantization step is shifted to the high compression side by a predetermined amount and updated (S305), and the parameter control process is terminated.
ステップS305において、量子化ステップを高圧縮側に所定量だけシフトした結果、圧縮率が閾値(Th2)を超える場合は、”強制JPEGモード”を設定する。”強制JPEGモード”は、現在の処理対象のタイル画像データ(着目タイル画像データ)の直後のタイル画像データに対してLS圧縮が選択されないように制御するモードである。 In step S305, if the quantization step is shifted by a predetermined amount to the high compression side and the compression rate exceeds the threshold value (Th2), “forced JPEG mode” is set. The “forced JPEG mode” is a mode for controlling the LS compression not to be selected for the tile image data immediately after the tile image data to be processed (the tile image data of interest).
ステップS303では、パラメータ制御部204は、処理対象のタイル画像データ(着目タイル画像データ)の最適な圧縮方式を判定する。言い換えると、予め設定された初期値である量子化ステップ(初期量子化ステップ)を使用した場合、2種類の符号化データどちらのタイル画像データを選択されたかを判定する(第2判定手段)。つまり、ステップS303は、着目タイル画像データ単体に対して一定の条件化下での最適な圧縮方式を判定する処理である。これは、第2の符号化部202における量子化ステップと符号化データ選択部203におけるLUTはパラメータ制御処理により変化するために必要となる処理である。 In step S303, the parameter control unit 204 determines an optimal compression method for the tile image data to be processed (target tile image data). In other words, when a quantization step (initial quantization step) that is a preset initial value is used, it is determined which tile image data of two types of encoded data has been selected (second determination means). That is, step S303 is processing for determining an optimal compression method under a certain condition for the tile image data of interest. This is a process necessary for the quantization step in the second encoding unit 202 and the LUT in the encoded data selection unit 203 to be changed by the parameter control process.
ステップS3031では、パラメータ制御部204は、予め設定された初期値である量子化ステップを使用した場合の、JPEG符号化データのデータ量を算出する。具体的には、ステップS202で生成されたJPEG符号化データのデータ量に基づいて予測を行うとよい。例えば、現在第2の符号化部202に指定されている量子化ステップの値と上述の初期値との差に応じたゲインを乗ずることで算出することができる。なお、パラメータ制御部204内に第2の符号化部202と同じ論理構成のJPEG圧縮器を持させて実際に符号化処理させることにより算出してもよい。 In step S3031, the parameter control unit 204 calculates the data amount of JPEG encoded data when a quantization step that is a preset initial value is used. Specifically, the prediction may be performed based on the data amount of the JPEG encoded data generated in step S202. For example, it can be calculated by multiplying the gain corresponding to the difference between the quantization step value currently specified in the second encoding unit 202 and the above-described initial value. The parameter control unit 204 may have a JPEG compressor having the same logical configuration as that of the second encoding unit 202, and may be calculated by actually performing the encoding process.
ステップS3032では、ステップS3031で算出したJPEG符号化データのデータ量と、ステップS202において第1の符号化部201により生成された符号化データのデータ量とを比較する。 In step S3032, the data amount of the JPEG encoded data calculated in step S3031 is compared with the data amount of the encoded data generated by the first encoding unit 201 in step S202.
ステップS3033では、ステップS3032での比較の結果に基づいて、LS圧縮またはJPEG圧縮のどちらが最適な圧縮方式であるかを判定する。一般的には、データ量が少ないものを最適な圧縮方式であるとして判定する。 In step S3033, based on the comparison result in step S3032, it is determined which of LS compression and JPEG compression is the optimal compression method. In general, it is determined that the data with a small amount of data is the optimum compression method.
ステップS303により、LS圧縮と判定された場合は、量子化ステップを低圧縮側に所定量だけシフトし(つまり減少させる)更新し(S306)、パラメータ制御処理を終了する。一方、JPEG圧縮と判定された場合は、量子化ステップを変更しない(S304)(Th1=Th2の場合)。 If it is determined in step S303 that LS compression has been performed, the quantization step is updated by shifting (ie, decreasing) the quantization step by a predetermined amount (S306), and the parameter control process is terminated. On the other hand, if it is determined that the compression is JPEG, the quantization step is not changed (S304) (when Th1 = Th2).
なお、JPEG圧縮と判定された場合であってTh1≠Th2の場合は以下のように制御するとよい。量子化ステップを高圧縮側に所定量だけシフトしたとき圧縮率が閾値(Th1)を超えない場合は、量子化ステップを高圧縮側に所定量だけシフトし(つまり増加させる)、パラメータ制御処理を終了する。一方、量子化ステップを高圧縮側に所定量だけシフトしたとき圧縮率が閾値(Th1)を超える場合は、量子化ステップを変更しない。 If it is determined that the compression is JPEG and Th1 ≠ Th2, the following control may be performed. If the compression rate does not exceed the threshold (Th1) when the quantization step is shifted to the high compression side by a predetermined amount, the quantization step is shifted to the high compression side by a predetermined amount (that is, increased), and parameter control processing is performed. finish. On the other hand, if the compression rate exceeds the threshold (Th1) when the quantization step is shifted to the high compression side by a predetermined amount, the quantization step is not changed.
以上説明した動作により、複数のタイル画像データに対して順次処理を行うことにより、ステップS201で入力された画像データの全体を処理することができる。 Through the operations described above, the entire image data input in step S201 can be processed by sequentially processing a plurality of tile image data.
<動作の具体例>
図5は、第1実施形態に係る符号化処理部のパラメータ(量子化ステップ)の遷移状態を示す図である。横軸方向は順次処理される連続した16個のタイル画像データ、縦軸方向は第2の符号化部202に設定されている量子化ステップの値を表している。なお、上方ほど低圧縮率を示すパラメータ、下方ほど高圧縮率を示すパラメータとなっている。以下では、左側のタイル画像データから順に、1番目のタイル画像データ〜16番目のタイル画像データと呼ぶ。また3つの閾値はTh0<Th2<Th1のように指定されている。
<Specific example of operation>
FIG. 5 is a diagram illustrating transition states of parameters (quantization steps) of the encoding processing unit according to the first embodiment. The horizontal axis direction represents 16 pieces of continuous tile image data that are sequentially processed, and the vertical axis direction represents the value of the quantization step set in the second encoding unit 202. Note that the upper parameter is a parameter indicating a low compression rate, and the lower parameter is a parameter indicating a high compression rate. Hereinafter, the tile image data on the left side are referred to as the first tile image data to the 16th tile image data in order from the left tile image data. The three threshold values are specified as Th0 <Th2 <Th1.
また、図5の上部には、ステップS301における選択結果を示している。具体的には、LS圧縮の場合は”L”、JPEG圧縮の場合は”J”を記している。さらに、図5の下部には、ステップ303での判定結果を示している。具体的には、LS圧縮の場合は”L”,JPEG圧縮の場合は”I”を記している。 Moreover, the selection result in step S301 is shown in the upper part of FIG. Specifically, “L” is written for LS compression, and “J” is written for JPEG compression. Furthermore, the determination result in step 303 is shown in the lower part of FIG. Specifically, “L” is written for LS compression, and “I” is written for JPEG compression.
また、5番目〜10番目および15番目のタイル画像に対しては強制的にJPEG圧縮が使用される”強制JPEGモード”が指定されている。 In addition, the “forced JPEG mode” in which JPEG compression is forcibly used is designated for the fifth to tenth and fifteenth tile images.
例えば、2番目のタイル画像データでの量子化ステップである点501においては、ステップS301ではLS圧縮が選択されている。そのため、第2の符号化部202に設定されている量子化ステップは変化させずに終了する。これにより、現在指定されている低圧縮を示す量子化ステップが維持され、後続(3番目)のタイル画像データに対しJPEG圧縮が選択された場合でも、画質の差が目立ちにくくなる。 For example, at point 501 which is a quantization step with the second tile image data, LS compression is selected in step S301. Therefore, the quantization step set in the second encoding unit 202 ends without being changed. As a result, the currently designated quantization step indicating low compression is maintained, and even when JPEG compression is selected for the subsequent (third) tile image data, the difference in image quality is less noticeable.
4番目のタイル画像データでの量子化ステップである点502においては、ステップS301ではJPEG圧縮が選択されているが”強制JPEGモード”ではなく、ステップS303ではJPEG圧縮が選択されている。そのため、第2の符号化部202に設定されている量子化ステップを所定量だけ高圧縮側へシフトし更新する。ただし、高圧縮側へシフトし更新することにより閾値Th2を超えることになるため、併せて”強制JPEGモード”を指定する。これにより、後続(5番目)のタイル画像データに対しLS圧縮が選択されることがなく、高圧縮JPEG圧縮画像とLS圧縮画像が隣接することを防ぐことができる。また、データ量を低減することができる。 At point 502, which is the quantization step for the fourth tile image data, JPEG compression is selected in step S301, but not the “forced JPEG mode”, and JPEG compression is selected in step S303. Therefore, the quantization step set in the second encoding unit 202 is shifted to the high compression side by a predetermined amount and updated. However, since the threshold Th2 is exceeded by shifting to the high compression side and updating, the “forced JPEG mode” is also specified. As a result, the LS compression is not selected for the subsequent (fifth) tile image data, and it is possible to prevent the high-compressed JPEG compressed image and the LS compressed image from being adjacent to each other. In addition, the amount of data can be reduced.
7番目のタイル画像データでの量子化ステップである点503においては、”強制JPEGモード”によりJPEG圧縮が選択されており、ステップS303でもJPEG圧縮が選択されている。ただし、量子化ステップを高圧縮側に所定量だけシフトしたとき圧縮率が閾値Th1を超えるため、量子化ステップを変更しない。これにより、過度のJPEG圧縮による画像劣化を防ぐことができる。 At point 503, which is the quantization step for the seventh tile image data, JPEG compression is selected in the “forced JPEG mode”, and JPEG compression is also selected in step S303. However, since the compression ratio exceeds the threshold Th1 when the quantization step is shifted to the high compression side by a predetermined amount, the quantization step is not changed. As a result, image deterioration due to excessive JPEG compression can be prevented.
8番目のタイル画像データでの量子化ステップである点504においては、”強制JPEGモード”によりJPEG圧縮が選択されており、ステップS303ではLS圧縮が選択されている。そのため、第2の符号化部202に設定されている量子化ステップを所定量だけ低圧縮側へシフトし更新する。一方、14番目のタイル画像データでの量子化ステップである点505においては、ステップS301ではJPEG圧縮が選択されているが”強制JPEGモード”ではなく、ステップS303ではLS圧縮が選択されている。そのため、第2の符号化部202に設定されている量子化ステップを所定量だけ低圧縮側へシフトし更新する。 At point 504, which is the quantization step for the eighth tile image data, JPEG compression is selected in the “forced JPEG mode”, and LS compression is selected in step S303. Therefore, the quantization step set in the second encoding unit 202 is shifted and updated by a predetermined amount toward the low compression side. On the other hand, at point 505, which is the quantization step for the 14th tile image data, JPEG compression is selected in step S301, but “forced JPEG mode” is not selected, and LS compression is selected in step S303. Therefore, the quantization step set in the second encoding unit 202 is shifted and updated by a predetermined amount toward the low compression side.
なお、上述の説明においては、主に同一のライン画像データに含まれる連続した画像タイル画像データの処理について説明し、異なるライン画像データの処理についてはパラメータの初期化のみ説明した。しかしながら、着目画像タイル画像データの隣接タイル画像データとして、先行して処理したライン画像データに含まれかつ着目タイルに隣接するライン画像のタイル画像データをあわせて考慮するよう構成しても良い。その際には、例えばRAM104に少なくとも1ライン分のタイル画像データに対応する符号化結果の履歴を格納し参照できるように構成すると良い。 In the above description, processing of continuous image tile image data included mainly in the same line image data has been described, and only initialization of parameters has been described for processing of different line image data. However, the tile image data of the line image included in the previously processed line image data and adjacent to the target tile may be considered as the adjacent tile image data of the target image tile image data. In this case, for example, the RAM 104 may be configured to store and refer to a history of encoding results corresponding to tile image data for at least one line.
以上説明したとおり第1実施形態によれば、タイル画像データごとにLS圧縮とJPEG圧縮とを切り替えて圧縮した場合に、大きく画質が異なるタイル画像が隣接することを回避することが可能となる。その結果、視覚的な画質劣化が目立たないより好適な圧縮画像データを得ることが可能となる。 As described above, according to the first embodiment, when compression is performed by switching between LS compression and JPEG compression for each tile image data, it is possible to avoid adjacent tile images having greatly different image quality. As a result, it is possible to obtain more suitable compressed image data in which visual image quality deterioration is not noticeable.
(第2実施形態)
第2実施形態では、符号化対象の画像データに周期的なパターン画像が含まれる場合の処理について説明する。特に、パターン画像を含むタイル画像データに対しては低圧縮率を維持するよう制御する手法について説明する。なお、装置構成については、アプリケーション107の内部プログラムの一部が変わるだけであり、他は第1実施形態と同様であるため説明は省略する。
(Second Embodiment)
In the second embodiment, a process when a periodic pattern image is included in the image data to be encoded will be described. In particular, a method for controlling to maintain a low compression rate for tile image data including a pattern image will be described. The apparatus configuration is the same as that of the first embodiment except that only a part of the internal program of the application 107 is changed.
自然画に半透明オブジェクトが重ねられた画像データは、プレゼンテーション資料作成アプリケーションの背景等において多用されている。そして、しばしば、半透明オブジェクトは、微視的に市松状のマスクを利用し背景画像を透かすことで半透明を表現している。 Image data in which a semi-transparent object is superimposed on a natural image is often used in the background of a presentation material creation application. Often, a translucent object expresses translucency by microscopically using a checkered mask to show through a background image.
図8は、半透明オブジェクトを説明する図である。図8(a)は透過率50%の市松状マスクを例示的に示す図である。なお、異なる透過率の場合には異なる間引き方で半透明オブジェクトが実現される。そして、図8(b)は半透明オブジェクトを含む画像を例示的に示す図である。つまり、市松状マスクのようなパターン画像をJPEGなどの非可逆圧縮で圧縮した場合、復号された画像においては”ぼやけ”や”にじみ”が発生した画像となる。その結果、LS圧縮されたタイル画像とJPEG圧縮されたタイル画像の境界線が非常に目立つことになる。 FIG. 8 is a diagram illustrating a translucent object. FIG. 8A is a view exemplarily showing a checkered mask having a transmittance of 50%. In the case of different transmittances, a semi-transparent object is realized with different thinning methods. FIG. 8B is a diagram exemplarily showing an image including a translucent object. That is, when a pattern image such as a checkered mask is compressed by irreversible compression such as JPEG, the decoded image is an image in which “blurring” or “bleeding” occurs. As a result, the boundary line between the tile image compressed with LS and the tile image compressed with JPEG becomes very conspicuous.
特に、パターン画像に対してはLS圧縮が選択されやすく、自然画に対してはJPEG圧縮が選択されやすい。その結果、半透明オブジェクトに対しては、LS圧縮とJPEG圧縮のどちらも選択され得、頻繁に切り替わり得る。 In particular, LS compression is easy to select for pattern images, and JPEG compression is easy to select for natural images. As a result, for translucent objects, either LS compression or JPEG compression can be selected and can be switched frequently.
<装置の動作>
図6は、第2実施形態に係るパラメータ制御処理のフローチャートである。以下では、第1実施形態と異なる部分のみ説明する。
<Operation of the device>
FIG. 6 is a flowchart of parameter control processing according to the second embodiment. Below, only a different part from 1st Embodiment is demonstrated.
ステップS302において”強制JPEGモード”でないと判定された場合、ステップS401では、画像の種別を判定する。ここで画像の種別とは、半透明パターンを含む画像(Pattern)と半透明パターンを含まない自然画(Image)の2種類を想定する。具体的には、第1の符号化部201により出力された符号化データのデータ量と予め設定された閾値データ量(ThD)とを比較することにより判定する(画像種別判定手段)。そして、第1の符号化部201により出力された符号化データのデータ量が閾値データ量より大きい場合は自然画(Image)、閾値データ量以下の場合は半透明パターン(Pattern)と判定する。つまり、ここでは、半透明パターンを含むタイル画像データは、自然画のタイル画像データと比較してLS圧縮による符号化データのデータ量が小さくなる(圧縮率が高い)という性質に着目している。 If it is determined in step S302 that the mode is not “forced JPEG mode”, the type of image is determined in step S401. Here, two types of images are assumed: an image including a translucent pattern (Pattern) and a natural image not including a translucent pattern (Image). Specifically, the determination is performed by comparing the data amount of the encoded data output from the first encoding unit 201 with a preset threshold data amount (ThD) (image type determination unit). Then, when the data amount of the encoded data output by the first encoding unit 201 is larger than the threshold data amount, it is determined as a natural image (Image), and when it is equal to or smaller than the threshold data amount, it is determined as a semi-transparent pattern (Pattern). That is, here, the tile image data including the translucent pattern focuses on the property that the data amount of the encoded data by the LS compression is smaller (the compression ratio is higher) than the tile image data of the natural image. .
そして、ステップS401において半透明パターン(Pattern)と判定した場合は、量子化ステップのシフト量(所定量)を現在より小さく設定し(S402)、量子化ステップを高圧縮側に所定量だけシフトし(S305)、パラメータ制御処理を終了する。一方、自然画(Image)と判定した場合は、量子化ステップを高圧縮側に所定量だけシフトし(S305)、パラメータ制御処理を終了する。つまり、半透明パターンの画像領域において許容されるJPEG圧縮の量子化ステップは、極めて低圧縮なパラメータに限られるためである。よって、この圧縮率を超えないレベルで量子化ステップを高圧縮へシフトするよう制御する。または、それ以上高圧縮側へシフトしないように制御する必要がある。 If it is determined in step S401 that the pattern is a translucent pattern (Pattern), the shift amount (predetermined amount) of the quantization step is set smaller than the present (S402), and the quantization step is shifted to the high compression side by a predetermined amount. (S305), the parameter control process is terminated. On the other hand, if it is determined that the image is a natural image (Image), the quantization step is shifted by a predetermined amount to the high compression side (S305), and the parameter control process is terminated. That is, the JPEG compression quantization step allowed in the image area of the translucent pattern is limited to extremely low compression parameters. Therefore, control is performed so that the quantization step is shifted to high compression at a level not exceeding this compression rate. Or it is necessary to control so that it does not shift to the high compression side any more.
ステップS303においてJPEG圧縮と判定された場合、ステップS402では、画像の種別を判定する。そして、ステップS402において半透明パターン(Pattern)と判定した場合は、低圧縮側に所定量だけシフトし(S306)、パラメータ制御処理を終了する。一方、自然画(Image)と判定した場合は、量子化ステップを変更しない(S304)。 If it is determined in step S303 that the compression is JPEG, the type of image is determined in step S402. If it is determined in step S402 that the pattern is a translucent pattern (Pattern), it is shifted by a predetermined amount toward the low compression side (S306), and the parameter control process is terminated. On the other hand, if it is determined that the image is a natural image (Image), the quantization step is not changed (S304).
<動作の具体例>
図7(a)は、第2実施形態に係る符号化処理部のパラメータ(量子化ステップ)の遷移状態を示す図である。図7(a)の下部には、LS圧縮の場合は”L”,JPEG圧縮(自然画)の場合は”I”,JPEG圧縮(半透明パターン)の場合は”P”を記している。また、閾値Th2’は、以下の通りである。
・Th2’:LS圧縮画像と隣接した場合においてもタイル画像境界が目立たないJPEG圧縮(半透明パターン)での圧縮率。
<Specific example of operation>
FIG. 7A is a diagram illustrating a transition state of parameters (quantization steps) of the encoding processing unit according to the second embodiment. In the lower part of FIG. 7A, “L” is written for LS compression, “I” is written for JPEG compression (natural image), and “P” is written for JPEG compression (translucent pattern). The threshold Th2 ′ is as follows.
Th2 ′: The compression rate in JPEG compression (semi-transparent pattern) where the tile image boundary is not noticeable even when adjacent to the LS compressed image.
例えば、5番目のタイル画像データでの量子化ステップである点701においては、”強制JPEGモード”によりJPEG圧縮が選択されており、ステップS402ではJPEG圧縮(自然画)と判定されている。そして、量子化ステップを高圧縮側に所定量だけシフトしたとき圧縮率が閾値(Th1)を超えないため、量子化ステップを高圧縮側に所定量だけシフトする。 For example, at point 701 which is the quantization step with the fifth tile image data, JPEG compression is selected in the “forced JPEG mode”, and it is determined that JPEG compression (natural image) is performed in step S402. Since the compression rate does not exceed the threshold (Th1) when the quantization step is shifted to the high compression side by a predetermined amount, the quantization step is shifted to the high compression side by a predetermined amount.
8番目のタイル画像データでの量子化ステップである点702においては、”強制JPEGモード”によりJPEG圧縮が選択されており、ステップS402ではJPEG圧縮(半透明パターン)と判定されている。そのため、量子化ステップを低圧縮側に所定量だけシフトする。 At point 702, which is the quantization step for the eighth tile image data, JPEG compression is selected in the “forced JPEG mode”, and it is determined that JPEG compression (semi-transparent pattern) is performed in step S402. Therefore, the quantization step is shifted by a predetermined amount toward the low compression side.
13番目のタイル画像データでの量子化ステップである点703においては、ステップS301ではJPEG圧縮が選択されているが”強制JPEGモード”ではなく、ステップS402ではJPEG圧縮(半透明パターン)と判定されている。そのため、量子化ステップのシフト量(所定量)をより小さいシフト量(修正所定量)に修正し、量子化ステップを高圧縮側に修正されたシフト量だけシフトする。 At point 703, which is the quantization step for the 13th tile image data, JPEG compression is selected in step S301, but it is not “forced JPEG mode”, and JPEG compression (translucent pattern) is determined in step S402. ing. Therefore, the shift amount (predetermined amount) of the quantization step is corrected to a smaller shift amount (corrected predetermined amount), and the quantization step is shifted to the high compression side by the corrected shift amount.
以上説明したとおり第2実施形態によれば、半透明パターンの画像領域において、より好適な圧縮画像データを得ることが可能となる。 As described above, according to the second embodiment, it is possible to obtain more suitable compressed image data in the image region of the translucent pattern.
(変形例)
なお、第2実施形態において、閾値Th1を制御するよう構成しても良い。以下では、画像属性の予測を利用し、JPEG圧縮時の最高圧縮率(Th1)を制御する例について説明する。なお、予測以外の処理については第2実施形態と同じであるため説明を省略する。
(Modification)
In the second embodiment, the threshold Th1 may be controlled. In the following, an example of controlling the maximum compression rate (Th1) during JPEG compression using image attribute prediction will be described. Since processing other than prediction is the same as in the second embodiment, description thereof is omitted.
<動作の具体例>
図7(b)は、変形例に係る符号化処理部のパラメータ(量子化ステップ)の遷移状態を示す図である。図7(b)の下部には、画像属性の予測結果を記している。
<Specific example of operation>
FIG.7 (b) is a figure which shows the transition state of the parameter (quantization step) of the encoding process part which concerns on a modification. The prediction result of the image attribute is described at the bottom of FIG.
データ入力部102から送られてくる画像データには、画像データそのものに加え、画像内の属性を表すデータも含まれる。属性情報とは例えば、文字部、グラフィック部、イメージ部といった領域を区別できるように作成されたマップである。 The image data sent from the data input unit 102 includes data representing attributes in the image in addition to the image data itself. The attribute information is, for example, a map created so that areas such as a character part, a graphic part, and an image part can be distinguished.
そこで、パラメータ制御部204は、属性情報を参照し、現在処理しているタイル画像データの先にあるのがイメージ部であるかグラフィック部であるかを確認する。グラフィック部である場合には、LS圧縮が選択されやすいことが分かっているので、閾値Th1を低圧縮へシフトする。これにより量子化ステップが低圧縮にとどまるため、LS圧縮に戻るまでの時間が短縮され、より高画質な画像を得ることができる。 Therefore, the parameter control unit 204 refers to the attribute information and confirms whether the tile image data currently being processed is an image portion or a graphic portion. In the case of the graphic portion, since it is known that LS compression is easily selected, the threshold value Th1 is shifted to low compression. As a result, the quantization step remains at low compression, so the time required to return to LS compression is shortened, and a higher quality image can be obtained.
一方、イメージ部が連続すると予測出来た場合には閾値Th1を高圧縮へシフトする。これによりJPEG圧縮時の圧縮率を稼ぐことができ、画像データ全体に対する符号化データのデータ量を小さくすることが出来る。 On the other hand, if it can be predicted that the image portion will continue, the threshold Th1 is shifted to high compression. Thereby, the compression rate at the time of JPEG compression can be earned, and the data amount of the encoded data with respect to the entire image data can be reduced.
(その他の実施例)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other examples)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Claims (6)
画像データを所定サイズの画素ブロックであるタイル画像データを単位に入力する入力手段と、
入力されたタイル画像データを可逆符号化し可逆符号化データを生成する第1の符号化手段と、
所定の最大圧縮率に対応する第1閾値以下の量子化ステップに従った量子化処理を介在させることで、入力されたタイル画像データを非可逆符号化し非可逆符号化データを生成する第2の符号化手段と、
着目タイル画像データに対する前記第1の符号化手段で生成された可逆符号化データと、前記着目タイル画像データに対する前記第2の符号化手段で生成された非可逆符号化データとを比較し、何れのデータ量が少ないかを判定する第1判定手段と、
前記可逆符号化データと前記非可逆符号化データとの何れか一方を前記着目タイル画像データの符号化データとして選択し出力する選択手段と、
前記着目タイル画像データの符号化データを選択し出力するたびに、後続するタイル画像データの符号化に備えて、前記量子化ステップを更新する更新手段と、
前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記所定の最大圧縮率より小さい圧縮率に対応する第2閾値以下の場合には、前記着目タイル画像データに後続するタイル画像データについては、前記第1判定手段の判定結果に応じて前記第1判定手段がデータ量が少ないと判定した符号化データを選択し出力するように制御し、前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記第2閾値より大きい場合には、前記着目タイル画像データに後続するタイル画像データについては、強制的に前記第2の符号化手段により生成された非可逆符号化データを選択し出力するように前記選択手段を制御する制御手段と、
を備えることを特徴とする画像処理装置。 An image processing apparatus for compressing and encoding image data,
Input means for inputting image data in units of tile image data which is a pixel block of a predetermined size;
First encoding means for losslessly encoding input tile image data and generating lossless encoded data;
A second process of generating lossy encoded data by irreversibly encoding input tile image data by interposing a quantization process according to a quantization step equal to or lower than a first threshold corresponding to a predetermined maximum compression rate. Encoding means;
The lossless encoded data generated by the first encoding unit for the target tile image data is compared with the lossy encoded data generated by the second encoding unit for the target tile image data. First determination means for determining whether the amount of data is small;
Said lossless encoded data and the non-reversible encoding any selected selection means you outputs one as encoded data of the tile of interest image data with the data,
Updating means for updating the quantization step in preparation for encoding of the subsequent tile image data each time the encoded data of the tile image data of interest is selected and output;
If the quantization step set when irreversibly encoding the target tile image data is equal to or smaller than a second threshold corresponding to a compression rate smaller than the predetermined maximum compression rate, the target tile image data is included in the target tile image data. For subsequent tile image data, control is performed so as to select and output the encoded data that the first determination unit determines that the data amount is small according to the determination result of the first determination unit, and the tile image data of interest If the quantization step set when irreversibly encoding is larger than the second threshold value, the tile image data following the tile image data of interest is forcibly applied to the second encoding. and control means for controlling the pre-hexene-option means to select the lossy encoded data generated output by means,
An image processing apparatus comprising:
前記更新手段は、
前記選択手段が前記第1判定手段の判定結果に応じて前記非可逆符号化データを選択し出力した場合、前記量子化ステップを所定量だけ増加させ、
前記選択手段が前記制御手段の制御により強制的に前記非可逆符号化データを選択し、かつ、前記第2判定手段が前記非可逆符号化データのデータ量が少ないと判定したした場合、前記量子化ステップを変化させず、
前記選択手段が前記制御手段の制御により強制的に前記非可逆符号化データを選択し、かつ、前記第2判定手段が前記可逆符号化データのデータ量が少ないと判定したした場合、前記量子化ステップを前記所定量だけ減少させる、
ように前記量子化ステップを更新することを特徴とする請求項1に記載の画像処理装置。 The lossy encoded data generated when the tile image data is irreversibly encoded by the second encoding unit based on a predetermined initial quantization step, and the tile image data generated by the first encoding unit A second determination means for comparing the lossless encoded data and determining which data amount is small;
The updating means includes
When the selection unit selects and outputs the lossy encoded data according to the determination result of the first determination unit, the quantization step is increased by a predetermined amount,
When the selection means forcibly selects the lossy encoded data under the control of the control means, and the second determination means determines that the data amount of the lossy encoded data is small, the quantum Without changing the conversion step,
When the selection means forcibly selects the lossy encoded data under the control of the control means, and the second determination means determines that the data amount of the lossless encoded data is small, the quantization Reducing the step by the predetermined amount;
The image processing apparatus according to claim 1, wherein the quantization step is updated as described above.
前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記所定量だけ増加させたとき前記第1閾値以下となる場合には、前記量子化ステップを所定量だけ増加させ、
前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記所定量だけ増加させたとき前記第1閾値より大きくなる場合には、前記量子化ステップを変化させない
ように更新することを特徴とする請求項2に記載の画像処理装置。 The update means forcibly selects the lossy encoded data by the selection means under the control of the control means, and the second determination means determines that the amount of the lossy encoded data is small In some cases, further
If the quantization step set when the target tile image data is lossy encoded is less than the first threshold when increased by the predetermined amount, the quantization step is increased by a predetermined amount. Let
When the quantization step set when the target tile image data is irreversibly encoded becomes larger than the first threshold when increased by the predetermined amount, the quantization step is not changed. The image processing apparatus according to claim 2, wherein the image processing apparatus is updated.
前記更新手段は、
前記選択手段が前記第1判定手段の判定結果に応じて前記非可逆符号化データを選択し出力し、かつ、前記画像種別判定手段が前記着目タイル画像データはパターン画像を含む画像であると判定した場合に、前記所定量を該所定量より小さい修正所定量に変更した後、前記量子化ステップを該修正所定量だけ増加させ、
前記選択手段が前記制御手段の制御により強制的に前記非可逆符号化データを選択し、かつ、前記第2判定手段が前記非可逆符号化データのデータ量が少ないと判定し、かつ、前記画像種別判定手段が前記着目タイル画像データはパターン画像を含む画像であると判定した場合に、前記量子化ステップを前記所定量だけ減少させる、
ことを特徴とする請求項2に記載の画像処理装置。 When the data amount of the lossless encoded data generated by the first encoding unit for the target tile image data is equal to or less than a predetermined threshold data amount, the target tile image data is determined to be an image including a pattern image. Further comprising image type determination means for
The updating means includes
The selection unit selects and outputs the lossy encoded data according to the determination result of the first determination unit, and the image type determination unit determines that the tile image data of interest is an image including a pattern image. when, after the predetermined amount was changed to the predetermined amount is smaller than modifying the predetermined amount, the quantization step is increased by the corrected predetermined amount,
The selection means forcibly selects the lossy encoded data under the control of the control means, the second determination means determines that the amount of the lossy encoded data is small, and the image When the type determining unit determines that the tile image data of interest is an image including a pattern image, the quantization step is decreased by the predetermined amount.
The image processing apparatus according to claim 2.
前記第2の符号化手段は、JPEG符号化により前記非可逆符号化データを生成する
ことを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。 The first encoding means generates the lossless encoded data by JPEG-LS encoding,
The image processing apparatus according to claim 1, wherein the second encoding unit generates the lossy encoded data by JPEG encoding.
画像データを所定サイズの画素ブロックであるタイル画像データを単位に入力する入力工程と、
入力されたタイル画像データを可逆符号化し可逆符号化データを生成する第1の符号化工程と、
所定の最大圧縮率に対応する第1閾値以下の量子化ステップに従った量子化処理を介在させることで、入力されたタイル画像データを非可逆符号化し非可逆符号化データを生成する第2の符号化工程と、
着目タイル画像データに対する前記第1の符号化工程で生成された可逆符号化データと、前記着目タイル画像データに対する前記第2の符号化工程で生成された非可逆符号化データとを比較し、何れのデータ量が少ないかを判定する第1判定工程と、
前記可逆符号化データと前記非可逆符号化データとの何れか一方を前記着目タイル画像データの符号化データとして選択し出力する選択工程と、
前記着目タイル画像データの符号化データを選択し出力するたびに、後続するタイル画像データの符号化に備えて、前記量子化ステップを更新する更新工程と、
前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記所定の最大圧縮率より小さい圧縮率に対応する第2閾値以下の場合には、前記着目タイル画像データに後続するタイル画像データについては、前記第1判定工程の判定結果に応じて前記第1判定工程においてデータ量が少ないと判定された符号化データを選択し出力するように制御し、前記着目タイル画像データを非可逆符号化した際に設定されていた量子化ステップが、前記第2閾値より大きい場合には、前記着目タイル画像データに後続するタイル画像データについては、強制的に前記第2の符号化工程により生成された非可逆符号化データを選択し出力するように前記選択工程を制御する制御工程と、
を含むことを特徴とする画像処理装置の制御方法。 A control method of an image processing apparatus for compressing and encoding image data,
An input step of inputting image data in units of tile image data which is a pixel block of a predetermined size;
A first encoding step of reversibly encoding input tile image data to generate lossless encoded data;
A second process of generating lossy encoded data by irreversibly encoding input tile image data by interposing a quantization process according to a quantization step equal to or lower than a first threshold corresponding to a predetermined maximum compression rate. Encoding process;
The lossless encoded data generated in the first encoding step for the target tile image data is compared with the lossy encoded data generated in the second encoding step for the target tile image data. A first determination step for determining whether or not the amount of data is small;
Said lossless encoded data and the lossy encoded data and either the focused tile image data in the selected you output selection step as encoded data,
An update step of updating the quantization step in preparation for encoding of the subsequent tile image data each time the encoded data of the tile image data of interest is selected and output;
If the quantization step set when irreversibly encoding the target tile image data is equal to or smaller than a second threshold corresponding to a compression rate smaller than the predetermined maximum compression rate, the target tile image data is included in the target tile image data. The subsequent tile image data is controlled so as to select and output encoded data determined to have a small amount of data in the first determination step according to the determination result of the first determination step, and the tile image of interest If the quantization step set when the data is lossy encoded is larger than the second threshold, the tile code data following the tile image data of interest is forcibly set to the second code. and a control step of controlling the pre-hexene-option process to output select lossy encoded data generated by the step,
Method of controlling an image processing apparatus which comprises a.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010068913A JP5520099B2 (en) | 2010-03-24 | 2010-03-24 | Image processing apparatus and control method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010068913A JP5520099B2 (en) | 2010-03-24 | 2010-03-24 | Image processing apparatus and control method thereof |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2011205261A JP2011205261A (en) | 2011-10-13 |
| JP2011205261A5 JP2011205261A5 (en) | 2013-04-25 |
| JP5520099B2 true JP5520099B2 (en) | 2014-06-11 |
Family
ID=44881465
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010068913A Expired - Fee Related JP5520099B2 (en) | 2010-03-24 | 2010-03-24 | Image processing apparatus and control method thereof |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5520099B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103369313B (en) * | 2012-03-31 | 2017-10-10 | 百度在线网络技术(北京)有限公司 | A kind of method, device and equipment for carrying out compression of images |
| JP6123186B2 (en) * | 2012-08-10 | 2017-05-10 | 大日本印刷株式会社 | Information compression apparatus, information compression method, information compression program, and information recording medium |
| JP2014197740A (en) * | 2013-03-29 | 2014-10-16 | セイコーエプソン株式会社 | Print control device and print control program |
-
2010
- 2010-03-24 JP JP2010068913A patent/JP5520099B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011205261A (en) | 2011-10-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7912300B2 (en) | Image processing apparatus and control method therefor | |
| JP4732203B2 (en) | Image encoding apparatus, decoding apparatus, control method therefor, computer program, and computer-readable storage medium | |
| JP6226578B2 (en) | Image coding apparatus, image coding method, and program | |
| JP4393319B2 (en) | Image encoding apparatus and method, computer program, and computer-readable storage medium | |
| JP4697967B2 (en) | Image coding apparatus and control method thereof | |
| JP5375372B2 (en) | Compression encoding apparatus and decoding apparatus | |
| JP5520099B2 (en) | Image processing apparatus and control method thereof | |
| JP2008042688A (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
| JP2017156852A (en) | Image processing device and computer program | |
| JP2009027663A (en) | Image processing unit and program | |
| JP2008072624A (en) | Image coding apparatus and control method thereof | |
| JP2014075631A (en) | Compressor, driving device, and display device | |
| JP5020998B2 (en) | Image processing apparatus and image processing method | |
| JP5432690B2 (en) | Image coding apparatus and control method thereof | |
| JP4432469B2 (en) | Encoding apparatus, encoding method and program thereof | |
| JP4697966B2 (en) | Image encoding apparatus and method, computer program, and computer-readable storage medium | |
| JP2009076992A (en) | Image coding apparatus and control method thereof | |
| JP4182480B2 (en) | Encoding apparatus, encoding method and program thereof | |
| JP2008042683A (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
| JP5873272B2 (en) | Image coding apparatus and control method thereof | |
| JP4795160B2 (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
| US20110235927A1 (en) | Image processing apparatus and method | |
| JP4419136B2 (en) | Image encoding apparatus, image encoding method and program thereof | |
| JP2013038656A (en) | Image encoder and control method of the same | |
| JP2007281591A (en) | Image processing apparatus and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130307 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130307 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140228 |
|
| 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: 20140307 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140404 |
|
| LAPS | Cancellation because of no payment of annual fees |