JP2011223463A - Image encoding device and control method thereof - Google Patents

Image encoding device and control method thereof Download PDF

Info

Publication number
JP2011223463A
JP2011223463A JP2010092507A JP2010092507A JP2011223463A JP 2011223463 A JP2011223463 A JP 2011223463A JP 2010092507 A JP2010092507 A JP 2010092507A JP 2010092507 A JP2010092507 A JP 2010092507A JP 2011223463 A JP2011223463 A JP 2011223463A
Authority
JP
Japan
Prior art keywords
pixel
block
image
pixels
additional information
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.)
Granted
Application number
JP2010092507A
Other languages
Japanese (ja)
Other versions
JP5523177B2 (en
Inventor
Naoki Ito
直樹 伊藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010092507A priority Critical patent/JP5523177B2/en
Publication of JP2011223463A publication Critical patent/JP2011223463A/en
Application granted granted Critical
Publication of JP5523177B2 publication Critical patent/JP5523177B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image encoding device generating interpolating data capable of precisely decoding a reduced image into an original image in addition to effectively using the reduced image.SOLUTION: An image encoding device encoding a plurality of blocks one of which is 2×2 pixels defined by pixel X, Xa, Xb, and Xc, comprises: means for generating a reduced image by outputting average value of pixel value of the 2×2 pixels as pixel value of one pixel that is a reduced image of a block of interest; means for generating differential value between pixel value of one pixel that is a reduced image of the block of interest and pixel x of the block of interest; and means for generating interpolating data to decode pixel Xa, Xb, and Xc. The interpolating data includes one of: a first information showing that Xa, Xb, and Xc of the block of interest are matched with a pixel X; a second information showing that the Xa, Xb, and Xc are matched with a pixel X of an adjacent block thereof; or a third information showing pixel value of the Xa, Xb, and Xc.

Description

本発明は、画像データを符号化する技術に関するものである。   The present invention relates to a technique for encoding image data.

高解像度で色域が広い画像を表すデータは、そのデータ容量が膨大になり、メモリコストも膨大になる。また、画像処理やデータ転送などで時間がかかってしまう。これに対応するための画像符号化方法として、例えば特許文献1が知られている。この文献では、 また、オリジナル画像から縮小画像を生成し、その情報を保持しておく。そして、オリジナル解像度の画像を復元したい場合には、着目している縮小画像の画素とその周辺画素から、復元対象となる画像(画素)を予測して復元する。   Data representing an image with a high resolution and a wide color gamut has an enormous amount of data and a large memory cost. Also, it takes time for image processing and data transfer. As an image encoding method for dealing with this, for example, Patent Document 1 is known. In this document, a reduced image is generated from an original image and the information is retained. When it is desired to restore the original resolution image, the restoration target image (pixel) is predicted and restored from the pixel of the reduced image of interest and its surrounding pixels.

特開平10−173913号公報Japanese Patent Laid-Open No. 10-173913

縮小画像からオリジナル解像度の画像を高精度に復元するには、その復元に必要な補間データも合わせて保持しておくことが重要である。また、オリジナル画像が高解像度であるならば、その縮小画像も、オリジナル画像と同様に十分に利用できるデータ表現になっていることが望ましい。   In order to restore an original resolution image from a reduced image with high accuracy, it is important to also store interpolation data necessary for the restoration. Further, if the original image has a high resolution, it is desirable that the reduced image has a data representation that can be used sufficiently similarly to the original image.

本発明は、上記課題に鑑みてなされたものであり、縮小画像のみの有効利用もできるようにしつつ、縮小画像からオリジナル画像を高精度に復元できる補間データを生成する効果的な一手法を提供するものである。   The present invention has been made in view of the above problems, and provides an effective method for generating interpolation data that can restore an original image with high accuracy from a reduced image while enabling effective use of only the reduced image. To do.

かかる課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、それぞれが画素X、Xa、Xb、Xcで定義される2×2画素のブロックを、複数のブロックについて符号化する画像符号化装置であって、前記2×2画素の画素値の平均値を、着目ブロックの縮小画像である1画素の画素値として出力することにより、縮小画像を生成する解像度変換手段と、前記着目ブロックの縮小画像である1画素の画素値と、前記着目ブロックにおける画素Xとの差分値を生成する差分値生成手段と、前記画素Xa、Xb、Xcを復元するための補間データを生成する補間データ生成手段とを備え、前記補間データは、着目ブロックにおけるXa、Xb、Xcが、画素Xと一致していることを示す第1の情報、或いは、当該Xa、Xb、Xcが、それら画素に隣接するブロックにおける画素Xと一致していることを示す第2の情報、或いは、当該Xa、Xb、Xcの画素値を示す第3の情報の何れかを含むことを特徴とする。   In order to solve this problem, for example, an image encoding device of the present invention has the following configuration. That is, an image encoding device that encodes a block of 2 × 2 pixels, each defined by pixels X, Xa, Xb, and Xc, for a plurality of blocks, the average value of the pixel values of the 2 × 2 pixels Is output as a pixel value of one pixel that is a reduced image of the block of interest, a resolution conversion unit that generates a reduced image, a pixel value of one pixel that is a reduced image of the block of interest, and a pixel in the block of interest Difference value generating means for generating a difference value with respect to X, and interpolation data generating means for generating interpolation data for restoring the pixels Xa, Xb, and Xc, wherein the interpolation data are Xa, Xb in the target block. , Xc is the first information indicating that the pixel X matches, or the Xa, Xb, Xc match the pixel X in the block adjacent to the pixel X The second information indicating the above or the third information indicating the pixel values of the Xa, Xb, and Xc.

本発明によれば、複数の画素の平均値によって縮小画像を作成するため、縮小画像のみの有効利用ができ、また、縮小画像からオリジナル画像を高精度に復元できる。   According to the present invention, since the reduced image is created by the average value of a plurality of pixels, only the reduced image can be effectively used, and the original image can be restored from the reduced image with high accuracy.

補間データの生成処理を示すフローチャートFlow chart showing interpolation data generation processing 画像符号化装置のブロック構成図Block diagram of image encoding device 画像データと2×2画素のブロックデータとの関係を示す図The figure which shows the relationship between image data and 2x2 pixel block data 着目ブロック内の2×2画素の配列を示す図The figure which shows the arrangement | sequence of 2x2 pixel in a focused block 付加情報のビット列を示す図Diagram showing bit string of additional information 処理対象画像の例を示す図The figure which shows the example of the processing target image 補間データのデータ構造を示す図Diagram showing data structure of interpolation data 画像処理装置のブロック構成図Block diagram of the image processing device 付加情報統合部の処理手順を示すフローチャートFlow chart showing processing procedure of additional information integration unit 付加情報統合部の処理例を示す図The figure which shows the example of a process of an additional information integration part コンピュータのブロック構成図Block diagram of computer 画像処理装置のブロック構成図Block diagram of the image processing device 画像処理装置のブロック構成図Block diagram of the image processing device

以下、図面に従って本発明の実施形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[第1の実施形態]
図2は、本実施形態に適用可能な画像処理装置のブロック図である。この画像処理装置は、大きく分けて2つの処理部からなる。1つは、画像を入力してから圧縮符号化を行うまでの符号化部であり、もう1つは、符号化データの一部または全部を利用して画像出力までの処理を行う復号部である。これら処理部は、一体型の装置に含まれていても良いし、それぞれが別体であっても構わない。その場合には、後述する格納部204は、それぞれの処理部に分かれて存在し、同一の符号化データを保持することになるであろう。
[First Embodiment]
FIG. 2 is a block diagram of an image processing apparatus applicable to this embodiment. This image processing apparatus is roughly composed of two processing units. One is an encoding unit from input of an image until compression encoding is performed, and the other is a decoding unit that performs processing up to image output using part or all of encoded data. is there. These processing units may be included in an integrated apparatus, or may be separate from each other. In that case, the storage unit 204 described later exists separately in each processing unit, and will hold the same encoded data.

図2において、画像処理装置は、符号化対象となる画像データを外部から入力し、解像度変換を行うことにより縮小画像を得る。そして、この縮小画像からオリジナル解像度の画像を復元するための付加情報も生成する。なお、画像データの入力源は、画像データをファイルとして格納している記憶媒体とするが、イメージスキャナ等であっても良く、その種類は問わない。また、実施形態における符号化対象の画像データは輝度成分のみのモノクロ多値画像データとし、輝度成分は8ビット(0乃至255の256階調)として説明する。ただし、これは実施形態の説明を簡単なものとするためであって、上記画像データは複数成分(例えば、RGBやCMYK)でも構わない。また、1成分のビット数も8ビットに限らず、8ビットを超えるビット数でも構わない。更に、符号化対象の画像は水平方向に2×W画素、垂直方向2×H画素(共に偶数)により構成されるとして説明する。なお、実際の画像の水平、垂直方向のサイズは2の整数倍となるとは限らないが、もし整数倍でない場合には、仮想的な固定値を有する画素が水平、垂直の末尾に存在するものとして処理すれば良い。   In FIG. 2, the image processing apparatus obtains a reduced image by inputting image data to be encoded from the outside and performing resolution conversion. Then, additional information for restoring the original resolution image from the reduced image is also generated. The input source of the image data is a storage medium that stores the image data as a file, but may be an image scanner or the like, and the type thereof is not limited. In the following description, it is assumed that the image data to be encoded is monochrome multivalued image data having only a luminance component, and the luminance component is 8 bits (256 gradations from 0 to 255). However, this is to simplify the description of the embodiment, and the image data may be a plurality of components (for example, RGB and CMYK). The number of bits of one component is not limited to 8 bits, and the number of bits exceeding 8 bits may be used. Further, it is assumed that the image to be encoded is composed of 2 × W pixels in the horizontal direction and 2 × H pixels in the vertical direction (both are even numbers). Note that the horizontal and vertical size of the actual image is not necessarily an integer multiple of 2, but if it is not an integer multiple, a pixel having a virtual fixed value exists at the end of the horizontal and vertical. Can be processed as

以下、図2における画像処理装置(符号化部)における符号化処理を説明する。まず、画像入力部201から符号化対象となる画像データが順に入力される。本実施形態で処理対象とする画像データは、PDLレンダリング画像を対象とする。また、画素データの入力順序はラスタースキャン順とする。本実施形態の場合、1画素=1コンポーネントであり、そのコンポーネントは8ビットであるものしているので、画素値の取り得る範囲は0乃至255の範囲の非負の整数値である。   Hereinafter, the encoding process in the image processing apparatus (encoding unit) in FIG. 2 will be described. First, image data to be encoded is sequentially input from the image input unit 201. The image data to be processed in this embodiment is a PDL rendering image. The input order of pixel data is a raster scan order. In the present embodiment, 1 pixel = 1 component, and that component is 8 bits. Therefore, the possible range of the pixel value is a non-negative integer value in the range of 0 to 255.

解像度変換部202は、入力画像の2×2個の画素データで構成されるブロックデータ内から1画素を生成する処理を行う。ここでは、2×2画素の画素値の平均を、縮小画像の1画素の画素値として算出する。即ち、この縮小処理では、4画素から1画素の値を生成する。以上においては、解像度変換部202は、解像度変換手段として機能する。   The resolution conversion unit 202 performs processing for generating one pixel from block data composed of 2 × 2 pixel data of the input image. Here, the average of the pixel values of 2 × 2 pixels is calculated as the pixel value of one pixel of the reduced image. That is, in this reduction process, a value from 4 pixels to 1 pixel is generated. In the above, the resolution conversion unit 202 functions as a resolution conversion unit.

図3はオリジナル画像とその中の或るブロックBに含まれる2×2画素を示している。ここでは、着目ブロックBの中の画素を、左上からラスター順に、B(0,0)、B(0,1)、B(1,0)、B(1,1)と表す。また、着目ブロックBの1つ前のブロックをBn−1、着目ブロックBの次のブロックをBn+1と表現することとする。本実施形態では、着目ブロックBのうち、B(0,0)、B(0,1)、B(1,0)、B(1,1)の画素値の平均値を、ブロックBに対応する縮小画像(1画素)とする。同様に、画像中の全てのブロックB0〜BW*H−1について、縮小画像の生成を行い、水平方向2W、垂直方向2H画素で構成されるオリジナル画像から、水平方向W、垂直方向Hの縮小画像を生成する。ここで生成された縮小画像は、格納部204へ出力され、格納される。補間データ生成部203は、縮小画像からオリジナル画像を復元するために必要な情報を生成する。 FIG. 3 shows an original image and 2 × 2 pixels included in a certain block B n therein. Here, the pixels in the block of interest B n are arranged in the order of raster from the upper left, B n (0, 0), B n (0, 1), B n (1, 0), B n (1, 1), and so on. To express. Further, the block of interest B B n-1 immediately preceding block of n, and to represent the next block and B n + 1 of the target block B n. In the present embodiment, the average value of the pixel values of B n (0,0), B n (0,1), B n (1,0), B n (1,1) in the target block B n is calculated. , A reduced image (one pixel) corresponding to the block Bn . Similarly, reduced images are generated for all blocks B0 to BW * H-1 in the image, and the original image composed of 2H pixels in the horizontal direction and 2H pixels in the horizontal direction is used to generate the horizontal direction W and the vertical direction H. Generate a reduced image. The reduced image generated here is output to the storage unit 204 and stored. The interpolation data generation unit 203 generates information necessary for restoring the original image from the reduced image.

まず、補間データ生成部203は、上記縮小処理によって算出したブロックBの平均値と、縮小前の画像の左上画素B(0,0)との画素値の差分値を生成し、格納部204に出力する。この差分値は、縮小画像から、左上画素B(0,0)を復元するために必要な情報であり、縮小画像と上記差分値さえあれば、B(0,0)の値を正確に復元できる。以上においては、補間データ生成部203は、差分値生成手段として機能する。 First, the interpolation data generation unit 203 generates a difference value between the average value of the block B n calculated by the reduction process and the upper left pixel B n (0, 0) of the image before reduction, and the storage unit To 204. This difference value is information necessary for restoring the upper left pixel B n (0,0) from the reduced image. If there is only the difference value from the reduced image, the value of B n (0,0) is accurately determined. Can be restored. In the above, the interpolation data generation unit 203 functions as a difference value generation unit.

次に、補間データ生成部203は、「縮小画像から、残りの3画素B(0,1)、B(1,0)、B(1,1)を復元する方法」を示す補間データも出力する。以上においては、補間データ生成部203は、補間データ生成手段として機能する。上記補間データは、ブロック単位に生成され、そのブロック内の上記3画素がどのような値を持つのか、または、どのようにすれば復元できるのかを示す。この補間データの詳細は後述する。 Next, the interpolation data generation unit 203 performs interpolation indicating “a method for restoring the remaining three pixels B n (0,1), B n (1,0), B n (1,1) from the reduced image”. Data is also output. In the above, the interpolation data generation unit 203 functions as an interpolation data generation unit. The interpolation data is generated in units of blocks, and indicates what values the three pixels in the block have or how they can be restored. Details of this interpolation data will be described later.

図4は1つのブロックに含まれる4つの画素を示している。ここで、図示の画素Xは、上述したB(0,0)に相当し、着目画素とも呼ぶ。この着目画素Xは、上述したように「差分値を用いて復元可能な画素」である。また、画素Xa,Xb,Xcは、上述したB(0、1),B(1,0),B(1,1)に相当し、「補間データを用いて復元される対象の画素」である。また、画素X、Xa,Xb,Xcの2×2画素の縮小画象は1画素であり、その1画素の画素値は、上記4画素の画素値の平均となる。なお、着目ブロックBの平均値、即ちブロックBの縮小画像である1画素の画素値を、Xと表記するものとする。 FIG. 4 shows four pixels included in one block. Here, the illustrated pixel X corresponds to B n (0, 0) described above, and is also referred to as a target pixel. This pixel of interest X is a “pixel that can be restored using a difference value” as described above. The pixels Xa, Xb, and Xc correspond to the above-described B n (0, 1), B n (1, 0), B n (1, 1), and “the object to be restored using the interpolation data” Pixel ". Further, the 2 × 2 reduced image of the pixels X, Xa, Xb, and Xc is one pixel, and the pixel value of the one pixel is an average of the pixel values of the four pixels. The average value of a target block B n, i.e. the pixel value of one pixel is a reduced image of the block B n, it shall be referred to as X m.

図1は、本実施形態における補間データ生成部203において、上記補間データを生成する処理の流れを示したフローチャートである。ここでは、上記差分値は、別途生成しているものとする。ステップS101において、補間データ生成部203は、着目ブロックBに含まれる2×2個の画素と、着目ブロックBに隣接する3つのブロックからそれぞれ代表1画素を入力する。ここで、着目ブロックに隣接する3つのブロックとは、ブロックBの右隣に位置するブロックBn+1、直下に位置するブロックBn+W、斜め右下のブロックBn+W+1である。これらブロックの位置関係は図3に示される通りである。また、上記3つのブロックの代表1画素とは、それぞれ、ブロックBn+1におけるBn+1(0、0)と、ブロックBn+WにおけるBn+W(0、0)と、ブロックBn+W+1におけるBn+W+1(0,0)である。 FIG. 1 is a flowchart showing a flow of processing for generating the interpolation data in the interpolation data generating unit 203 in the present embodiment. Here, it is assumed that the difference value is generated separately. In step S101, the interpolation data generator 203 inputs 2 × and two pixels included in the block of interest B n, each one representative pixel of three blocks adjacent to the block of interest B n. Here, the three blocks adjacent to the target block, block B n + 1 located at the right side of the block B n, a block B n + W located immediately below, a block B n + W + 1 of the lower oblique right. The positional relationship between these blocks is as shown in FIG. Further, the one representative pixel of the three blocks, respectively, B n + 1 in the block B n + 1 (0, 0), the block B n + and B n + W (0,0) in the W, the block B n + W + B n in + 1 W + 1 (0, 0).

念のために説明しておくと、これら3つの画素は、隣接ブロックBn+1、ブロックBn+W、ブロックBn+W+1が縮小された後の1画素ではなく、これらブロックが縮小される前の元の画素値である。 As a precaution, these three pixels are not one pixel after the adjacent block B n + 1 , block B n + W , and block B n + W + 1 are reduced, but the original pixels before these blocks are reduced. Value.

また、これら3つの画素は各ブロックの代表1画素であるから、上述した代表1画素B(0,0)と同様に、それぞれのブロックBn+1、Bn+W、Bn+W+1の縮小画像と対応する差分値を用いて、正確に復元できる画素である。 Since these three pixels are representative one pixel of each block, they correspond to the reduced images of the respective blocks B n + 1 , B n + W , B n + W + 1 , similarly to the representative one pixel B n (0, 0) described above. It is a pixel that can be accurately restored using the difference value.

ステップS102では、パラメータnを“0”で初期化する。このパラメータnは、着目ブロックを特定するためのものである。次に、ステップS103では、着目ブロックB内の4つの画素が互いに等しいか否かを判定する。すなわち、次式(1)を満足するか否かを判定する。
(0,0)=B(0,1)=B(1,0)=B(1,1) …(1)
In step S102, the parameter n is initialized with “0”. This parameter n is for specifying the block of interest. Next, in step S103, it is determined whether or not the four pixels in the block of interest Bn are equal to each other. That is, it is determined whether or not the following expression (1) is satisfied.
B n (0,0) = B n (0,1) = B n (1,0) = B n (1,1) (1)

着目ブロックBが、式(1)の成立するブロックである場合(YES)には、縮小画像中の画素Xの値Xは、復元対象の画素Xa、Xb、Xcの値でもあるということになる。そこで、この場合には、処理をステップS105に進める。一方、着目ブロックBについて式(1)が成り立たないと判定した場合(ステップS103でNOの場合)、すなわち、着目ブロック中の画素Xから残りの3画素Xa,Xb,Xcを復元できないと判定した場合は、ステップS104に移動する。ステップS104では、3つの代表画素Bn+1(0,0)、Bn+W(0,0)、Bn+W+1(0,0)と、着目ブロックB内の画素B(0,1),画素B(1,0),画素B(1,1)とを比較する。即ち、次式(2)を満たすか否か判定する。
(0,1)=Bn+1(0,0)
且つ
(1,0)=Bn+W(0,0)
且つ
(1,1)=Bn+W+1(0,0) …(2)
When the target block B n is a block in which the expression (1) is established (YES), the value X m of the pixel X in the reduced image is also the value of the pixel Xa, Xb, Xc to be restored. become. Therefore, in this case, the process proceeds to step S105. On the other hand, when it is determined that Expression (1) does not hold for the block of interest Bn (NO in step S103), that is, it is determined that the remaining three pixels Xa, Xb, and Xc cannot be restored from the pixel X in the block of interest. If so, the process moves to step S104. In step S104, the three representative pixels B n + 1 (0, 0), B n + W (0, 0), B n + W + 1 (0, 0), the pixel B n (0, 1), and the pixel B in the block of interest B n are displayed. n (1, 0) and pixel B n (1, 1) are compared. That is, it is determined whether or not the following expression (2) is satisfied.
B n (0,1) = B n + 1 (0,0)
And B n (1, 0) = B n + W (0, 0)
And B n (1,1) = B n + W + 1 (0,0) (2)

上記式(2)に示すように、ペア{B(0,1)、Bn+1(0,0)}、{B(1,0)、Bn+W(0,0)}、及び、{B(1,1)とBn+W+1(0,0)}との一致/不一致を判定する理由は、例えば、以下の通りである。一般に、上記ペアとなっている画素は、互いに隣接関係にあるため、画素値としても相関度は高い。即ち、ブロックBの3つの画素(B(0,1)、B(1,0)、B(1,1))の画素値は、上記隣接ブロックの各画素と一致している可能性が高い。したがって、上記3つのペアが一致していることさえ判れば、「上記ペアが一致している」という情報を補間データとするだけで、ブロックBの3つの画素は復元できることになる。そして、もし、先に示した式(2)が満たされる場合(3つのペアが互いに等しい場合)、上記一致を示す短い符号語を割り当てることで情報量も削減できる。 As shown in equation (2) above, the pairs {B n (0,1), B n + 1 (0,0)}, {B n (1,0), B n + W (0,0)}, and { The reason for determining the match / mismatch between B n (1,1) and B n + W + 1 (0,0)} is, for example, as follows. In general, since the pixels in the above pair are adjacent to each other, the degree of correlation is high as a pixel value. That is, the pixel values of the three pixels (B n (0, 1), B n (1, 0), B n (1, 1)) of the block B n match the respective pixels of the adjacent block. Probability is high. Therefore, as long as it is found that the above three pairs match, it is possible to restore the three pixels of the block B n simply by using the information “the above pairs match” as interpolation data. If the above-described equation (2) is satisfied (when the three pairs are equal to each other), the amount of information can be reduced by assigning a short codeword indicating the match.

ステップS104にて、式(2)が成立すると判定した場合には、着目ブロックB内の画素Xa、Xb、Xcは、縮小画像の画素を復元した画素値からそのまま再現できることになる。例えば、画素Xaを復元するときには、隣接ブロックBn+1の縮小画像(1画素)とそのブロックBn+1におけるBn+1(0,0)を復元するための差分値を取り出す。そして、それら縮小画像と差分値からBn+1(0,0)の画素値を復元する。そして、その復元された画素値を画素Xaとしても利用すれば良い。同じく、画素Xbおよび画素Xcも同様にして復元できることになる。なお、着目ブロックBが画像の右端に位置するとき、画素B(0、1)、B(1、1)と比較する対象画素は存在しない。また、着目ブロックBが画像の下端に位置するとき、画素B(1、0)、B(1、1)と比較する対象画素は存在しない。また、着目ブロックBが画像の右下隅に位置する場合には、画素B(0、1)、B(1、0)、B(1、1)と比較する対象画素が存在しない。このように、存在しない画素の値は、適当な値、例えば“255”であるものと予め決めて比較すれば良い。 If it is determined in step S104 that Expression (2) is established, the pixels Xa, Xb, and Xc in the block of interest Bn can be reproduced as they are from the pixel values obtained by restoring the pixels of the reduced image. For example, when restoring the pixel Xa, a difference value for restoring the reduced image (1 pixel) of the adjacent block B n + 1 and B n + 1 (0, 0) in the block B n + 1 is extracted. Then, the pixel value of B n + 1 (0, 0) is restored from the reduced image and the difference value. Then, the restored pixel value may be used as the pixel Xa. Similarly, the pixel Xb and the pixel Xc can be restored in the same manner. Note that when the block of interest B n is located at the right end of the image, there is no target pixel to be compared with the pixels B n (0, 1) and B n (1, 1). Also, when the block B n of interest is located at the lower end of the image, the pixel B n (1, 0), the target pixel to be compared with B n (1, 1) is not present. When the target block B n is located at the lower right corner of the image, there is no target pixel to be compared with the pixels B n (0, 1), B n (1, 0), B n (1, 1). . In this way, the value of the nonexistent pixel may be determined in advance and compared with an appropriate value, for example, “255”.

以上のように、式(2)の判定を行った結果、条件が成立する場合(YES)には、ステップS106へ処理を進める。   As described above, when the condition is satisfied as a result of the determination of Expression (2) (YES), the process proceeds to step S106.

もし、着目ブロックBについて2つの式の何れも満たさない場合、着目ブロックBの3画素(Xa=B(0、1),Xb=B(1,0),Xc=B(1,1))は、各ブロックの代表画素から復元できない。即ち、上述した縮小画像と差分値からB(0、0)、Bn+1(0,0)、Bn+W(0,0)、Bn+W+1(0,0)を復元しても、それらの画素を参考にして、3つの画素を正確に復元することができない。よって、この場合には、処理をステップS107へ進める。 If not satisfied neither of the two equations for the block of interest B n, 3 pixels of the block of interest B n (Xa = B n ( 0,1), Xb = B n (1,0), Xc = B n ( 1, 1)) cannot be restored from the representative pixels of each block. That is, even if B n (0, 0), B n + 1 (0, 0), B n + W (0, 0), B n + W + 1 (0, 0) are restored from the reduced image and the difference value, those pixels are restored. As a reference, the three pixels cannot be accurately restored. Therefore, in this case, the process proceeds to step S107.

ステップS105では、着目ブロックBに対して、第1の付加情報を符号化データの1つとして出力する。ここで、第1の付加情報とは、着目ブロックBが式(1)の条件を満たしていることを示す情報である。言い換えれば、「画素B(0,1)、B(1,0)、B(1,1)は、画素B(0,0)から復元すること」を示す補間データである。この第1の付加情報は、図5に示すように、1ビットの“1”として出力される。なお、着目ブロックBの符号化データには、上記第1の付加情報以外にも、解像度変換部202で生成された縮小画像と、補間データ生成部203で別途生成される上述した差分値が含まれる。以上の説明で、上記画素B(0,0)の復元方法は容易に理解できると思うが、念のため、復元方法を簡単に説明する。例えば、着目ブロックBの縮小画像である1画素の画素値をP(x,y)と表し、その着目ブロックBの差分値をPd(x,y)と表すことと定義する。以上において、着目ブロックBの縮小画像から、元の解像度の画像(2×2倍)に復元するための式は、以下の通りである。
(0,0)=P(x,y)+Pd(x,y)
(0,1)=B(0,0)=P(x,y)+Pd(x,y)
(1,0)=B(0,0)=P(x,y)+Pd(x,y)
(1,1)=B(0,0)=P(x,y)+Pd(x,y) …(3)
In step S105, the first additional information is output as one of the encoded data to the block of interest Bn . Here, the first additional information is information indicating that the block of interest Bn satisfies the condition of Expression (1). In other words, the interpolation data indicates that “the pixels B n (0, 1), B n (1, 0), and B n (1, 1) are restored from the pixel B n (0, 0)”. The first additional information is output as 1-bit “1” as shown in FIG. In addition to the first additional information, the encoded data of the block of interest Bn includes the reduced image generated by the resolution conversion unit 202 and the above-described difference value generated separately by the interpolation data generation unit 203. included. In the above description, the restoration method of the pixel B n (0, 0) can be easily understood, but the restoration method will be briefly described for the sake of safety. For example, it is defined that the pixel value of one pixel, which is a reduced image of the block of interest Bn , is represented as P (x, y), and the difference value of the block of interest Bn is represented as Pd (x, y). In the above, the formula for restoring from the reduced image of the block of interest B n to the original resolution image (2 × 2 times) is as follows.
B n (0,0) = P (x, y) + Pd (x, y)
B n (0,1) = B n (0,0) = P (x, y) + Pd (x, y)
B n (1, 0) = B n (0, 0) = P (x, y) + Pd (x, y)
B n (1,1) = B n (0,0) = P (x, y) + Pd (x, y) (3)

ステップS106では、着目ブロックBに対して、第2の付加情報を符号化データの1つとして出力する。ここで、第2の付加情報とは、着目ブロックBが式(2)の条件を満たしていることを示す情報である。言い換えれば、「画素B(0,1)、B(1,0)、B(1,1)は、それぞれ、画素Bn+1(0,0)、Bn+W(0,0)、Bn+W+1(0,0)から復元すること」を示す補間データである。この第2の付加情報は、図5に示すように、2ビットの“01”として出力される。以上の説明で、上記3画素の復元方法は容易に理解できると思うが、念のため、復元方法を簡単に説明する。上述したように、P(x,y)とPd(x,y)を定義する。同じく、ブロックBn+1の縮小画像である1画素の画素値をP(x+1,y)と表し、ブロックBn+Wの縮小画像である1画素の画素値をP(x,y+1)と表し、ブロックBn+W+1の縮小画像である1画素の画素値をP(x+1,y+1)と表す。以上において、着目ブロックBの縮小画像から、元の解像度の画像(2×2倍)に復元するための式は、以下の通りである。
(0,0)=P(x,y)+Pd(x,y)
(0,1)=P(x+1,y)
(1,0)=P(x,y+1)
(1,1)=P(x+1,y+1) …(4)
In step S106, the second additional information is output as one of the encoded data to the block of interest Bn . Here, the second additional information is information indicating that the block of interest Bn satisfies the condition of Expression (2). In other words, “pixels B n (0, 1), B n (1, 0), B n (1, 1) are pixels B n + 1 (0, 0), B n + W (0, 0), B, respectively. The interpolation data indicates that “restore from n + W + 1 (0, 0)”. The second additional information is output as 2-bit “01” as shown in FIG. In the above description, the above three-pixel restoration method can be easily understood. However, for the sake of convenience, the restoration method will be briefly described. As described above, P (x, y) and Pd (x, y) are defined. Similarly, the pixel value of one pixel that is a reduced image of the block B n + 1 is represented as P (x + 1, y), the pixel value of one pixel that is a reduced image of the block B n + W is represented as P (x, y + 1), and the block B A pixel value of one pixel which is a reduced image of n + W + 1 is represented as P (x + 1, y + 1). In the above, the formula for restoring from the reduced image of the block of interest B n to the original resolution image (2 × 2 times) is as follows.
B n (0,0) = P (x, y) + Pd (x, y)
B n (0,1) = P (x + 1, y)
B n (1,0) = P ( x, y + 1)
B n (1,1) = P (x + 1, y + 1) (4)

ステップS107では、着目ブロックBに対して、第3の付加情報を符号化データの1つとして出力する。ここで、第3の付加情報とは、上記B(0,1)、B(1,0)、B(1,1)の画素値そのものを示す各画素8ビット(合計24ビット)の画素データである。これが上記第1の付加情報や第2の付加情報と同様に、補間データとして出力される。この第3の付加情報は、図5に示すように、上記第1、第2の付加情報と区別できるように、先頭の2ビットとして“00”を出力し、この2ビットに後続してB(0,1)、B(1,0)、B(1,1)の画素値を表す24ビットを出力する。この第3の付加情報によれば、B(0,1)、B(1,0)、B(1,1)の画素値は、B(0,0)やBn+1(0,0)、Bn+W(0,0)、Bn+W+1(0,0)の値に関らず、正確に復元できる。 In step S107, the third additional information is output as one of the encoded data to the block of interest Bn . Here, the third additional information, the B n (0,1), B n (1,0), each pixel 8 bits of a pixel value itself of B n (1,1) (total 24 bits) Pixel data. This is output as interpolation data in the same manner as the first additional information and the second additional information. As shown in FIG. 5, this third additional information outputs “00” as the first two bits so that it can be distinguished from the first and second additional information. 24 bits representing the pixel values of n (0, 1), B n (1, 0), B n (1, 1) are output. According to the third additional information, B n (0,1), B n (1,0), the pixel values of B n (1,1) is, B n (0,0) and B n + 1 (0 , 0), B n + W (0, 0), and B n + W + 1 (0, 0), it can be accurately restored.

なお、本実施形態では、第1〜第3の付加情報として、図5に示す表現方法を例示したが、それぞれの付加情報の違いが識別できるのであれば、他の表現でも良い。例えば、第1の付加情報と第2の付加情報のビット表現が逆であっても構わない。   In the present embodiment, the expression method shown in FIG. 5 is exemplified as the first to third additional information, but other expressions may be used as long as the difference between the additional information can be identified. For example, the bit representations of the first additional information and the second additional information may be reversed.

以上の処理により、着目ブロックBの補間データとして、第1〜第3の付加情報のいずれかが出力される。 Through the above processing, one of the first to third additional information is output as the interpolation data of the block of interest Bn .

ステップS108では、着目ブロックBが、符号化対象画像を構成するブロックの最終ブロック(画像の右下隅のブロック)であったか否かを判断する。もし、最終ブロックではない場合(NOの場合)にはステップS109にて変数nを“1”だけ更新し、ステップS103に処理を戻す。もし、最終ブロックを処理していた場合には、図1の一連の処理を終了する。 In step S108, it is determined whether or not the block of interest Bn is the last block (block at the lower right corner of the image) constituting the encoding target image. If it is not the last block (NO), the variable n is updated by “1” in step S109, and the process returns to step S103. If the last block has been processed, the series of processes in FIG. 1 is terminated.

以上の処理により、縮小画像を表すデータと、差分値のデータと、補間データを出力することができ、これらデータを用いて、元の解像度のオリジナル画像を復元することが可能となる。   Through the above processing, data representing a reduced image, difference value data, and interpolation data can be output, and the original image with the original resolution can be restored using these data.

図6(a)は、上記式(1)を満たすようなブロックで構成されている画像の一例である。この図においては、2×2画素の各ブロックごとに色が一定となっている。図6(b)は、上記式(2)を満たすようなブロックを一部に含む画像の一例である。この図においては、ブロックBが、上記式(2)を満たしている。符号化対象となる高解像度の画像においては、ここで示したような図6(a)や図6(b)のような画像が局所的に散在している。したがって、ブロック単位に上記第1〜第3の付加情報の何れを符号化データの一部として出力するべきか、判断する必要がある。 FIG. 6A is an example of an image composed of blocks that satisfy the above formula (1). In this figure, the color is constant for each block of 2 × 2 pixels. FIG. 6B is an example of an image that partially includes blocks that satisfy the above formula (2). In this figure, the block B 0 satisfies the above equation (2). In a high-resolution image to be encoded, images such as those shown in FIGS. 6A and 6B are locally scattered. Therefore, it is necessary to determine which of the first to third additional information should be output as a part of the encoded data for each block.

格納部204は、各ブロックについて、上述した縮小画像を表す画像データと、差分値のデータと、補間データを格納する。それらを格納する際のデータ配列としては、例えば、縮小画像を表す画像データを、符号化対象となる1画面分、配列する。続いて、差分値のデータを1画面分、配列する。続いて、補間データを1画面分、配列する。図7は、上記データ配列のうち、補間データの一部を示すものである。ビットの配列方法は上述した図5に従っているので、図7のデータ配列は、4ブロック分の補間データが配列されていることとなる。   The storage unit 204 stores image data representing the reduced image, difference value data, and interpolation data for each block. As a data arrangement for storing them, for example, image data representing a reduced image is arranged for one screen to be encoded. Subsequently, the difference value data is arranged for one screen. Subsequently, the interpolation data is arranged for one screen. FIG. 7 shows a part of the interpolation data in the data array. Since the bit arrangement method is in accordance with FIG. 5 described above, the data arrangement in FIG. 7 is the arrangement of interpolation data for four blocks.

画像展開部205は、格納部204に格納されている、縮小画像と差分値と補間データとを用いて、元の解像度のオリジナル画像の復元を行う。この復元については上述した通りであるので、説明を省略する。   The image development unit 205 restores the original image of the original resolution using the reduced image, the difference value, and the interpolation data stored in the storage unit 204. Since this restoration is as described above, a description thereof will be omitted.

画像出力部206は、画像展開部205で復元された元の解像度のオリジナル画像を、他の装置へデータとして出力するか、或いは可視画像として出力するものであり、例えばデータ送信器あるいは、プリンタやディスプレイに相当する。   The image output unit 206 outputs the original image of the original resolution restored by the image development unit 205 to other devices as data or as a visible image, for example, a data transmitter, a printer, Corresponds to the display.

画像処理部207は、オリジナル画像を復元するのではなく、縮小画像を用いて種々のデータ処理を行うものである。画像処理部207は、例えば、縮小画像をそのまま後段の画像出力部206に出力しても良い。また例えば、画像出力部206で可視化される状況に合わせて色変換処理などが行われても良い。また例えば、画像出力部206の更に後段においてオリジナル画像または縮小画像が検索されるために、その縮小画像から特徴量を検出する処理であっても良い。画像処理部208で処理された画像データは、画像出力部206へ出力される。   The image processing unit 207 does not restore the original image but performs various data processing using the reduced image. For example, the image processing unit 207 may output the reduced image as it is to the subsequent image output unit 206. Further, for example, color conversion processing may be performed in accordance with the situation visualized by the image output unit 206. Further, for example, since an original image or a reduced image is searched at a later stage of the image output unit 206, processing for detecting a feature amount from the reduced image may be performed. The image data processed by the image processing unit 208 is output to the image output unit 206.

以上のように、本実施形態によれば、高解像度のオリジナル画像から、上述した方法で縮小画像を表す画像データと、差分値のデータと、補間データとを生成する。これにより、高解像度の画像を効率良く符号化できると共に、必要に応じて縮小画像も利用できる。特に、上記符号化技術は可逆符号化に相当し、符号化データである縮小画像、差分値、補間データからオリジナル画像を、画質の劣化を伴わずに復元できる。   As described above, according to the present embodiment, image data representing a reduced image, difference value data, and interpolation data are generated from a high-resolution original image by the method described above. As a result, a high-resolution image can be efficiently encoded, and a reduced image can be used as necessary. In particular, the above encoding technique corresponds to lossless encoding, and an original image can be restored from the reduced image, the difference value, and the interpolation data, which are encoded data, without deterioration in image quality.

ところで、本実施形態ではオリジナル画像から、水平、垂直方向とも1/2の縮小画像を生成する場合について説明したが、変形例として、上記縮小画像から更に、水平、垂直方向とも1/2の縮小画像を生成するような場合にも適用できる。   By the way, in the present embodiment, a case has been described in which a reduced image of 1/2 in the horizontal and vertical directions is generated from the original image. However, as a modified example, a reduction of 1/2 in the horizontal and vertical directions is further performed from the reduced image. It can also be applied to the case where an image is generated.

この場合には、符号化データは「第2段階の縮小画像を表す画像データと、第2段階の差分値のデータと、第2段階の補間データと、第1段階の差分値のデータと、第1段階の補間データ」となる。これは、上記「第2段階の縮小画像を表す画像データと、第2段階の差分値のデータと、第2段階の補間データ」の3つのデータから「第1段階の縮小画像を表す画像データ」を復元できることからも容易に理解できるであろう。   In this case, the encoded data is “image data representing the second stage reduced image, second stage difference value data, second stage interpolation data, first stage difference value data, First stage interpolation data ". This is based on the three data “image data representing the second stage reduced image, second stage difference value data, and second stage interpolation data”, “image data representing the first stage reduced image. Can be easily understood from the fact that it can be restored.

なお、ここで、オリジナル画像の縮小画像を「第1段階の縮小画像」と呼ぶ。また「第1段階の縮小画像」の縮小画像を、「第2段階の縮小画像」と呼ぶ。また、オリジナル画像の縮小画像を「第1段階の縮小画像」から復元するために必要な差分値を「第1段階の差分値のデータ」と呼ぶ。また、「第1段階の縮小画像」を「第2段階の縮小画像」から復元するために必要な差分値を「第2段階の差分値のデータ」と呼ぶ。また、オリジナル画像の縮小画像を「第1段階の縮小画像」から復元するために必要な補間データを「第1段階の補間のデータ」と呼ぶ。また、「第1段階の縮小画像」を「第2段階の縮小画像」から復元するために必要な補間データを「第2段階の補間のデータ」と呼ぶ。   Here, the reduced image of the original image is referred to as a “first-stage reduced image”. A reduced image of the “first-stage reduced image” is referred to as a “second-stage reduced image”. Further, the difference value necessary for restoring the reduced image of the original image from the “first-stage reduced image” is referred to as “first-stage difference value data”. Also, the difference value necessary for restoring the “first-stage reduced image” from the “second-stage reduced image” is referred to as “second-stage difference value data”. Interpolation data necessary to restore the reduced image of the original image from the “first-stage reduced image” is referred to as “first-stage interpolation data”. Also, the interpolation data necessary to restore the “first stage reduced image” from the “second stage reduced image” is referred to as “second stage interpolation data”.

第2段階の差分値および第2段階の補間データについては、上記実施形態にて説明したオリジナル画像を「第1段階の縮小画像」とみなし、上記実施形態にて説明した縮小画像を「第2段階の縮小画像」とみなすことで、容易に理解できよう。   For the second-stage difference value and the second-stage interpolation data, the original image described in the above embodiment is regarded as a “first-stage reduced image”, and the reduced image described in the above-described embodiment is referred to as a “second image”. It can be easily understood by considering it as a “reduced image of the stage”.

[第1の実施形態の変形例]
上記第1の実施形態と同等の処理を、コンピュータプログラムによって実現する例を第1の実施形態の変形例として以下に説明する。図11は、本変形例における情報処理装置(例えばパーソナルコンピュータ)のブロック構成図である。図中、1401はCPUで、RAM1402やROM1403に記憶されているプログラムやデータを用いて本装置全体の制御を行うと共に、後述する画像符号化処理、復号処理を実行する。1402はRAMで、外部記憶装置1407や記憶媒体ドライブ1408、若しくはI/F1409を介して外部装置からダウンロードされたプログラムやデータを記憶する為のエリアを備える。また、RAM1402は、CPU1401が各種の処理を実行する際に使用するワークエリアも備える。1403はROMで、ブートプログラムや本装置の設定プログラムやデータを格納する。1404、1405は夫々キーボード、マウスで、CPU1401に対して各種の指示を入力することができる。1406は表示装置で、CRTや液晶画面などにより構成されており、画像や文字などの情報を表示することができる。1407はハードディスクドライブ装置等の大容量の外部記憶装置である。この外部記憶装置1407には、OS(オペレーティングシステム)や後述する画像符号化、復号処理の為のプログラム、符号化対象の画像データ、復号対象画像の符号化データなどがファイルとして保存されている。また、CPU1401は、これらのプログラムやデータをRAM1402上の所定のエリアにロードし、実行することになる。1408は記憶媒体ドライブで、CD−ROMやDVD−ROMなどの記憶媒体に記録されたプログラムやデータを読み出してRAM1402や外部記憶装置1407に出力するものである。なお、この記憶媒体に後述する画像符号化、復号処理の為のプログラム、符号化対象の画像データ、復号対象の画像の符号化データなどを記録しておいても良い。この場合、記憶媒体ドライブ1408は、CPU1401による制御によって、これらのプログラムやデータをRAM1402上の所定のエリアにロードする。1409はI/Fで、このI/F1409によって外部装置を本装置に接続し、本装置と外部装置との間でデータ通信を可能にするものである。例えは符号化対象の画像データや、復号対象の画像の符号化データなどを本装置のRAM1402や外部記憶装置1407、あるいは記憶媒体ドライブ1408に入力することもできる。1410は上述の各部を繋ぐバスである。上記構成において、本装置の電源がONになると、CPU1401はROM1403のブートプログラムに従って、外部記憶装置1407からOSをRAM1402にロードする。この結果、キーボード1404、マウス1405の入力が可能となり、表示装置1406にGUIを表示することが可能になる。ユーザが、キーボード1404やマウス1405を操作し、外部記憶装置1407に格納された画像符号化処理用アプリケーションプログラムの起動の指示を行なうと、CPU1401はそのプログラムをRAM1402にロードし、実行する。これにより、本装置が画像符号化装置として機能することになる。この場合の符号化アプリケーションは、指定された画像データから先に説明したブロック単位に1画素の縮小画像を生成する処理と、差分値を生成する処理と、補間データを生成する処理(図1のフローチャート)に示した処理を行なう。そして、その結果である符号化データを1つのファイルとして、格納部204と同等の記憶装置に格納したり、外部装置もしくはネットワーク上に転送される。
[Modification of First Embodiment]
An example in which processing equivalent to that in the first embodiment is realized by a computer program will be described below as a modification of the first embodiment. FIG. 11 is a block configuration diagram of an information processing apparatus (for example, a personal computer) in the present modification. In the figure, reference numeral 1401 denotes a CPU which controls the entire apparatus using programs and data stored in a RAM 1402 and a ROM 1403 and executes image encoding processing and decoding processing described later. A RAM 1402 includes an area for storing programs and data downloaded from the external device via the external storage device 1407, the storage medium drive 1408, or the I / F 1409. The RAM 1402 also includes a work area used when the CPU 1401 executes various processes. Reference numeral 1403 denotes a ROM which stores a boot program, a setting program for the apparatus, and data. Reference numerals 1404 and 1405 denote a keyboard and a mouse, respectively. Various instructions can be input to the CPU 1401. A display device 1406 includes a CRT, a liquid crystal screen, and the like, and can display information such as images and characters. Reference numeral 1407 denotes a large-capacity external storage device such as a hard disk drive device. The external storage device 1407 stores an OS (operating system), a program for image encoding and decoding processing described later, image data to be encoded, encoded data of an image to be decoded, and the like as files. The CPU 1401 loads these programs and data into a predetermined area on the RAM 1402 and executes them. A storage medium drive 1408 reads programs and data recorded on a storage medium such as a CD-ROM or DVD-ROM and outputs them to the RAM 1402 or the external storage device 1407. In addition, a program for image encoding and decoding processing described later, image data to be encoded, encoded data of an image to be decoded, and the like may be recorded on the storage medium. In this case, the storage medium drive 1408 loads these programs and data into a predetermined area on the RAM 1402 under the control of the CPU 1401. Reference numeral 1409 denotes an I / F, which connects an external device to the present apparatus through the I / F 1409 and enables data communication between the present apparatus and the external apparatus. For example, image data to be encoded, encoded data of an image to be decoded, and the like can be input to the RAM 1402, the external storage device 1407, or the storage medium drive 1408 of this apparatus. A bus 1410 connects the above-described units. In the above configuration, when the power of this apparatus is turned on, the CPU 1401 loads the OS from the external storage device 1407 to the RAM 1402 in accordance with the boot program stored in the ROM 1403. As a result, the keyboard 1404 and the mouse 1405 can be input, and the GUI can be displayed on the display device 1406. When the user operates the keyboard 1404 or the mouse 1405 to give an instruction to start an application program for image encoding processing stored in the external storage device 1407, the CPU 1401 loads the program into the RAM 1402 and executes it. As a result, the present apparatus functions as an image encoding apparatus. The encoding application in this case is a process for generating a reduced image of one pixel for each block described above from specified image data, a process for generating a difference value, and a process for generating interpolation data (FIG. 1). The processing shown in the flowchart) is performed. The encoded data as a result is stored as one file in a storage device equivalent to the storage unit 204 or transferred to an external device or a network.

[第2の実施形態]
上記第1の実施形態では、補間データの最小符号量は、3画素に対して1ビットであった。第2の実施形態では、この符号化効率を考慮した変形例を説明する。本第2の実施形態における「ブロック」とは、第1の実施形態と同様に2×2画素を表わす。そして、「タイル」とは、水平方向にM個、垂直方向にN個(ともに2以上の整数)のブロックからなる画像とする。ここでは、説明を簡単なものとするため、1タイルを8×8個のブロックで構成されるものとする。すなわち、1タイルは16×16画素からなる。また、説明を簡単にするため、符号化対象の画像データの水平方向の画素数を16W、垂直方向の画素数を16H、つまり、共に16の整数倍であるものとして説明する。
[Second Embodiment]
In the first embodiment, the minimum code amount of the interpolation data is 1 bit for 3 pixels. In the second embodiment, a modified example in consideration of this encoding efficiency will be described. The “block” in the second embodiment represents 2 × 2 pixels as in the first embodiment. The “tile” is an image composed of M blocks in the horizontal direction and N blocks (both are integers of 2 or more) in the vertical direction. Here, in order to simplify the description, it is assumed that one tile is composed of 8 × 8 blocks. That is, one tile consists of 16 × 16 pixels. For the sake of simplicity, the description will be made assuming that the number of pixels in the horizontal direction of the image data to be encoded is 16 W and the number of pixels in the vertical direction is 16H, that is, both are integer multiples of 16.

図8は、本実施形態における画像符号化装置のブロック図である。図2と異なる点は、補間データ生成部203の前にタイル分割部801を設けた点と、補間データ生成部203の後に、付加情報統合部802を設けた点である。これ以外は第1の実施形態と同じであるので、説明を省略する。   FIG. 8 is a block diagram of an image encoding device according to this embodiment. The difference from FIG. 2 is that a tile division unit 801 is provided before the interpolation data generation unit 203 and an additional information integration unit 802 is provided after the interpolation data generation unit 203. Since other than this is the same as the first embodiment, the description is omitted.

タイル分割部801は、画像入力部201から入力した画像データを16×16画素のタイルに分割し、そのタイルの画像データを補間データ生成部203に出力する。なお、補間データ生成部203は、タイル内の補間データを生成する際に、タイルの外側画素データを参照するので、タイル分割部801は、タイルの右側に1列分、タイルの下端に1ライン分だけ多い画素データを補間データ生成部203に出力する。そして、この1列、1ラインにおける画素データは、タイル分割部801がタイル単位の出力にてオーバーラップする部分でもある。補間データ生成部203は、2×2画素を単位に入力し、第1実施形態で説明した手順で、補間データの生成の生成処理を行なう。付加情報統合部802は、補間データ生成部203からの符号化データ入力部として機能するものである。そのため、付加情報統合部802は内部にバッファメモリを有する。そして、付加情報統合部802は、補間データ生成部203で生成された符号化データ(補間データ)を入力し、その内部バッファに一時的に格納し、1タイル分、すなわち、8×8個の補間データを解析し、補間データの統合処理を行なう。以下、この付加情報統合部802の処理内容を詳しく説明する。まず、付加情報統合部802は、入力された着目タイルに内包される8×8個の付加情報を解析する。そして、その解析結果に基づき、以下に示す第1統合処理、第2統合処理を実行する。   The tile division unit 801 divides the image data input from the image input unit 201 into tiles of 16 × 16 pixels, and outputs the tile image data to the interpolation data generation unit 203. The interpolation data generation unit 203 refers to the outer pixel data of the tile when generating the interpolation data in the tile. Therefore, the tile division unit 801 has one line on the right side of the tile and one line on the lower end of the tile. Pixel data larger by the amount is output to the interpolation data generation unit 203. The pixel data in one row and one line is also a portion where the tile dividing unit 801 overlaps with the output in tile units. The interpolation data generation unit 203 inputs 2 × 2 pixels as a unit, and performs generation processing for generating interpolation data according to the procedure described in the first embodiment. The additional information integration unit 802 functions as an encoded data input unit from the interpolation data generation unit 203. Therefore, the additional information integration unit 802 has a buffer memory inside. The additional information integration unit 802 receives the encoded data (interpolation data) generated by the interpolation data generation unit 203, temporarily stores it in its internal buffer, and stores one tile, that is, 8 × 8 pieces. Interpolation data is analyzed and interpolation data integration processing is performed. Hereinafter, the processing content of the additional information integration unit 802 will be described in detail. First, the additional information integration unit 802 analyzes 8 × 8 additional information included in the input tile of interest. Then, based on the analysis result, the following first integration process and second integration process are executed.

<第1の統合処理>
この処理は、着目タイル内の8×8個の付加情報が互いに等しい場合の処理である。付加情報の種類は、第1の実施形態で説明したように、第1,第2、第3の付加情報の3種類である。そこで、8×8個の付加情報が互いに等しい場合、それらを統合する。例えば、着目タイル内の8×8個の付加情報が同じである場合には、先頭に互いに等しいことを示す1ビットの識別ビット“1”を出力する。そして、それに後続して付加情報を出力し、着目タイルの統合処理を終える。従って、この識別ビットは統合できたか否かを示すフラグ情報ということもできる。従って、もし着目タイル内の8×8個のブロックの付加情報が第1の実施形態における第1の付加情報である“1”であった場合には、着目タイルの統合結果は2ビットの“11”となる。また、着目タイル内の8×8個のブロックの付加情報が第1の実施形態における第2の付加情報である“01”であった場合には、着目タイルの統合結果は3ビットの“101”となる。そして、着目タイル内の全ブロックが第3の付加情報である場合には、着目タイルの統合結果は3ビットの“100”となる。
<First integrated processing>
This process is a process when 8 × 8 pieces of additional information in the tile of interest are equal to each other. As described in the first embodiment, there are three types of additional information: first, second, and third additional information. Therefore, when 8 × 8 pieces of additional information are equal to each other, they are integrated. For example, when 8 × 8 pieces of additional information in the target tile are the same, 1-bit identification bit “1” indicating that they are equal to each other is output at the head. Subsequently, additional information is output, and the integration processing of the target tile is completed. Therefore, it can be said that this identification bit is flag information indicating whether or not integration is possible. Therefore, if the additional information of the 8 × 8 blocks in the target tile is “1”, which is the first additional information in the first embodiment, the integration result of the target tile is a 2-bit “ 11 ". When the additional information of the 8 × 8 blocks in the target tile is “01” that is the second additional information in the first embodiment, the integration result of the target tile is “101” of 3 bits. " If all the blocks in the target tile are the third additional information, the integration result of the target tile is “100” of 3 bits.

ここで、着目タイル内の全ブロックの付加情報が第3の付加情報であった場合、統合結果を示す3ビット“100”に後続して、各ブロック内の画素値を出力する(各ブロックの付加情報は不要である)。本実施形態では、1タイル=8×8個のブロックとしており、各ブロックの復元対象の画素は3つであるので(図4参照)、8×8×3画素(バイト)が後続する。上記の如く、着目タイル内の8×8個のブロックの付加情報が全て等しい場合には、上記の処理で、着目タイルの付加情報の統合処理を終える(以降に説明する第2統合処理は行なわない)。一方、着目タイル内の8×8個の付加情報中、1つでも異なるものがあった場合には、その旨を示す識別ビット“0”を出力し、次に説明する第2統合処理を行なう。   Here, when the additional information of all the blocks in the target tile is the third additional information, the pixel value in each block is output following the 3 bits “100” indicating the integration result (for each block). No additional information is required). In this embodiment, 1 tile = 8 × 8 blocks, and since there are three pixels to be restored in each block (see FIG. 4), 8 × 8 × 3 pixels (bytes) follow. As described above, when all of the additional information of the 8 × 8 blocks in the target tile are equal, the integration processing of the additional information of the target tile is finished in the above processing (the second integration processing described below is performed). Absent). On the other hand, if any one of the 8 × 8 additional information in the target tile is different, an identification bit “0” indicating that fact is output, and the second integration process described below is performed. .

<第2の統合処理>
この第2統合処理は、タイル内の全付加情報中に、少なくとも1つの付加情報が他と異なる場合の処理である。換言すれば、上記タイルのサイズより小さければ、その小さい領域にて付加情報を統合できる可能性があることになる。そこで、本第2の実施形態では、1つのタイルには8×8個の付加情報が含まれることに着目し、これを水平方向に並ぶ8つの付加情報を単位に統合処理を行なうようにした。以下、この水平方向に並ぶ8つの付加情報をライン付加情報という。本第2の統合処理では、着目ライン付加情報に含まれる8つの付加情報が互いに等しいか否かを判定する。そして、互いに等しい場合には、それを識別する1ビットの識別ビット“1”を出力し、その後に等しいと判定された付加情報を1つ出力する。一方、着目ライン付加情報に含まれる8つの付加情報中、1つでも異なるものが存在した場合、1ビットの識別ビット“0”を出力し、それに後続して8つの付加情報を出力する。着目タイルは、8つのライン付加情報で構成されるものであるので、上記処理を最上段から最下段に向かって8回行なえばよい。以上、本実施形態における付加情報統合部802の処理を説明した。
<Second integrated processing>
This second integration process is a process in the case where at least one additional information is different from the others among all the additional information in the tile. In other words, if the size is smaller than the size of the tile, additional information may be integrated in the small area. Therefore, in the second embodiment, focusing on the fact that 8 × 8 pieces of additional information are included in one tile, the integration processing is performed in units of eight pieces of additional information arranged in the horizontal direction. . Hereinafter, the eight additional information arranged in the horizontal direction is referred to as line additional information. In the second integration process, it is determined whether the eight additional information included in the target line additional information is equal to each other. If they are equal to each other, 1-bit identification bit “1” for identifying them is output, and thereafter, one additional information determined to be equal is output. On the other hand, if any one of the eight additional information included in the target line additional information is different, one identification bit “0” is output, followed by eight additional information. Since the target tile is composed of eight pieces of additional line information, the above process may be performed eight times from the top to the bottom. The processing of the additional information integration unit 802 in this embodiment has been described above.

図9は、本実施形態における付加情報統合部802の統合処手順を示すフローチャートである。以下、図9に従って、本実施形態の付加情報統合部801の処理を説明する。まず、補間データ生成部203で生成された着目タイルに包含される8×8個の付加情報を入力する(ステップS901)。次いで、入力された付加情報を解析し、8×8個の全付加情報(全符号化データ)が同じ種類(1種類)であるか否かを判定する(ステップS902)。判定の結果、全て同じ種類の付加情報である場合(YES)は、ステップS903へ処理を遷移させる。ステップS903は、着目タイルの付加情報を1つに統合したことを示す1ビットのフラグ”1”を出力する。そして、ステップS904にて、そのフラグに後続して、1つの付加情報を出力する。なお、全て同じと判断された付加情報が第3の付加情報である場合には、第3の付加情報に後続して、8×8×3個の画素データを出力する。一方、ステップS902にて、NOと判定された場合、すなわち、着目タイルに包含される8×8個の付加情報中に、少なくとも2種類の付加情報が存在する場合、処理はステップS905に進む。このステップS905では、着目タイルの付加情報の非統合を示す1ビットのフラグ“0”を出力する。そして、ステップS906乃至S911にて、着目タイルよりも更に小さいサイズを単位とする統合処理を行なう。実際では、このサイズを水平方向に並ぶ8個の付加情報で構成されるブロックラインについてのブロックライン統合処理である。先ず、ステップS906では、着目ライン付加情報(初期段階では着目タイルの最上位のラインの付加情報)に含まれる8つの付加情報が全て同じであるか否かを判断する。同じであった場合には、そのラインの付加情報を統合できるので、ステップS907にて統合されたことを示す1ビットのフラグ“1”を出力し、ステップS908にて、同じであると判定した付加情報を1つ出力する。なお、同じであると判定された付加情報が第3の付加情報である場合には、その付加情報に後続して8×3画素分の画素データを出力する。また、ステップS906にて、着目ライン(初期段階では着目タイルの最上位のライン)の全付加情報中に、1つでも他と異なる付加情報が存在したと判断した場合は、ステップS909に進む。このステップS909では、そのラインの付加情報を統合できなかったことを示す1ビットのフラグ“0”を出力する。そして、ステップS910にて、8つの付加情報を出力する(第3の付加情報が存在する場合には、その第3の付加情報に後続して3個の画素データが並ぶ)。ステップS911では、着目タイルの最終ラインまで統合処理を終えたか否かを判断し否の場合には、次のラインの統合処理を行なうため、ステップS906に処理を戻す。上記のようにして着目タイルについての統合処理を終えると、ステップS912にて、全タイルについての統合処理を終えたか否かを判断し、否の場合には、ステップS1に戻りつぎのタイルの付加情報についての統合処理を行なう。   FIG. 9 is a flowchart showing an integration processing procedure of the additional information integration unit 802 in the present embodiment. Hereinafter, the processing of the additional information integration unit 801 of this embodiment will be described with reference to FIG. First, 8 × 8 pieces of additional information included in the target tile generated by the interpolation data generation unit 203 are input (step S901). Next, the input additional information is analyzed, and it is determined whether or not all the 8 × 8 pieces of additional information (all encoded data) are of the same type (one type) (step S902). As a result of the determination, if all are the same type of additional information (YES), the process proceeds to step S903. In step S903, a 1-bit flag “1” indicating that the additional information of the target tile is integrated into one is output. In step S904, one additional information is output following the flag. If the additional information determined to be the same is the third additional information, 8 × 8 × 3 pixel data are output following the third additional information. On the other hand, if NO is determined in step S902, that is, if at least two types of additional information exist in the 8 × 8 additional information included in the target tile, the process proceeds to step S905. In step S905, a 1-bit flag “0” indicating non-integration of the additional information of the target tile is output. In steps S906 to S911, an integration process is performed in units of a size smaller than the target tile. Actually, this is a block line integration process for block lines composed of 8 additional information arranged in the horizontal direction. First, in step S906, it is determined whether or not the eight additional information included in the target line additional information (the additional information of the highest line of the target tile in the initial stage) is the same. If they are the same, the additional information of the line can be integrated, so a 1-bit flag “1” indicating that they are integrated is output in step S907, and it is determined in step S908 that they are the same. One piece of additional information is output. If the additional information determined to be the same is the third additional information, pixel data for 8 × 3 pixels is output following the additional information. If it is determined in step S906 that there is at least one additional information different from the others in the additional information of the target line (the topmost line of the target tile in the initial stage), the process proceeds to step S909. In step S909, a 1-bit flag “0” indicating that the additional information of the line could not be integrated is output. Then, in step S910, eight additional information is output (if there is third additional information, three pixel data are arranged following the third additional information). In step S911, if it is determined whether or not the integration process has been completed up to the final line of the target tile, the process returns to step S906 to perform the integration process for the next line. When the integration process for the target tile is completed as described above, it is determined in step S912 whether or not the integration process has been completed for all tiles. If not, the process returns to step S1 to add the next tile. Perform integration processing on information.

ここで1つのタイルの付加情報の統合処理の例を図10に従って説明する。図10(a)は、1つのタイルの画像データを示している。破線で囲まれた1つの格子が1画素を示している。この図では、第1ラインから第9ラインまでの領域が同じ値の白画素で構成されている。また、第10、第11ラインの領域が同じ値の黒画素で構成され、第12ラインから第16ラインまでの領域は同じ値の白画素で構成されている。図10の例は、文字や線画の画像の場合に多く見られるパターンである。この図10(a)のタイルの画像データを入力したときに、補間データ生成部203が生成する各ブロックの付加情報の値を示すのが図10(b)である。図10(b)の通り、このタイル内の全付加情報は同じではない。従って、図10(c)に示すように、タイル統合が不可であったことを示すフラグ“0”を出力する(図9のステップS905)。次に、最初のライン付加情報を見ると、8個の付加情報は“1”である。従ってライン統合が可能であるので、フラグ“1”を出力し、その後に付加情報“1”を出力する。以下、これを繰り返すことになる。図10(a)のタイル画像の場合、結局、このタイルに対する付加情報統合部801が出力する付加情報の統合結果は、図10(c)に示す通りとなり、次に示すビット配列となる。「0;11;11;11;11;101;101;11;11」。図10(a)のタイルには8×8個のブロックが含まれ、各ブロックには復元すべき3画素が存在することになるので、1タイル内に含まれる復元すべき画素数は8×8×3画素存在する。すなわち、1タイルにおける復元すべき画素の総ビット数は8×8×3×8ビット=1536ビットである。図10(b)の付加情報の場合、1ビットの付加情報が全部で48個、2ビットの付加情報が全部で16であるので、1タイルの付加情報の総ビット数は48+16×2ビット=80ビットである(第1の実施形態に相当する)。そして、図10(c)の場合、すなわち、第2の実施形態における1タイルの付加情報の統合後の総ビット数はフラグビットを含めて、19ビットとなり、大幅に補間データのデータ量を削減可能であることがわかる。   Here, an example of integration processing of additional information of one tile will be described with reference to FIG. FIG. 10A shows image data of one tile. One grid surrounded by a broken line indicates one pixel. In this figure, the area from the first line to the ninth line is composed of white pixels having the same value. The areas of the 10th and 11th lines are composed of black pixels having the same value, and the areas from the 12th line to the 16th line are composed of white pixels having the same value. The example of FIG. 10 is a pattern often seen in the case of a character or line drawing image. FIG. 10B shows the value of the additional information of each block generated by the interpolation data generation unit 203 when the tile image data of FIG. 10A is input. As shown in FIG. 10B, not all the additional information in this tile is the same. Accordingly, as shown in FIG. 10C, a flag “0” indicating that tile integration is impossible is output (step S905 in FIG. 9). Next, when viewing the first line additional information, the eight additional information is “1”. Accordingly, since line integration is possible, flag “1” is output, and then additional information “1” is output. This is repeated below. In the case of the tile image of FIG. 10A, the integration result of the additional information output from the additional information integration unit 801 for this tile is as shown in FIG. 10C, and has the following bit arrangement. “0; 11; 11; 11; 11; 101; 101; 11; 11”. The tile of FIG. 10A includes 8 × 8 blocks, and each block has 3 pixels to be restored. Therefore, the number of pixels to be restored included in one tile is 8 ×. There are 8 × 3 pixels. That is, the total number of bits of pixels to be restored in one tile is 8 × 8 × 3 × 8 bits = 1536 bits. In the case of the additional information shown in FIG. 10B, the total number of bits of additional information for one tile is 48 + 16 × 2 bits = 48 for a total of 48 1-bit additional information and a total of 16 2-bit additional information. 80 bits (corresponding to the first embodiment). In the case of FIG. 10C, that is, the total number of bits after integration of the additional information of one tile in the second embodiment is 19 bits including the flag bits, and the data amount of the interpolation data is greatly reduced. It turns out that it is possible.

以上説明したように本実施形態によれば、付加情報が連続していれば、連続している付加情報を統合することで、補間データのデータ量を大幅に削減することが可能である。また、付加情報が連続していなければ、更に小さい単位毎に連続性を判定し、同様に統合処理を行なう。また、付加情報の連続性を調査するだけなので、統合処理のために、画像を再度スキャンする必要はなく、補間データ生成の処理時間も低下しない。   As described above, according to the present embodiment, if additional information is continuous, it is possible to significantly reduce the amount of interpolation data by integrating continuous additional information. If the additional information is not continuous, the continuity is determined for each smaller unit, and the integration process is similarly performed. Further, since only the continuity of the additional information is investigated, it is not necessary to scan the image again for the integration process, and the processing time for generating the interpolation data is not reduced.

なお、本第2の実施形態と同等の処理をコンピュータプログラムによって実現できることは、先に説明した第1の実施形態の変形例から明らかであるので、その説明については省略する。また、コンピュータプログラムは、コンピュータの読取り装置(CD−ROMドライブなど)にセットし、システムにコピーもしくはインストールすることで実行可能になる。従って、このようなコンピュータ可読記憶媒体も本発明の範疇に入る。   In addition, since it is clear from the modified example of 1st Embodiment demonstrated previously that it can implement | achieve the process equivalent to this 2nd Embodiment with a computer program, it abbreviate | omits about the description. The computer program can be executed by being set in a computer reading device (CD-ROM drive or the like) and copied or installed in the system. Therefore, such a computer-readable storage medium also falls within the scope of the present invention.

[第3の実施形態]
上記第1、第2の実施形態では、1つのブロック(2×2画素)に対し、縮小画像の生成として2x2画素の平均値を用いる方法を説明した。本実施形態では、1つのブロック(2×2画素)に対し、縮小画像の生成方法を選択できるようにした場合を説明する。
[Third Embodiment]
In the first and second embodiments, the method of using the average value of 2 × 2 pixels for generating a reduced image for one block (2 × 2 pixels) has been described. In the present embodiment, a case will be described in which a reduced image generation method can be selected for one block (2 × 2 pixels).

図12に、本実施形態に係る画像符号化装置のブロック構成図を示す。第1の実施形態で説明した図2と共通するブロックについては同じ番号を付し、その説明については省略する。ジョブ制御信号入力部2201は、画像入力部201に入力する画像の用途を示すジョブ制御信号を入力する。例えば、この信号は、「印刷のみ(印刷モードと呼ぶ)」か、「符号化データを保存(保存モードと呼び、画像処理部207を介して縮小画像を出力する可能性が在る)」か等を示す。この入力は、主に不図示の操作部などからユーザによって指示入力されたものである。このジョブ制御信号は、ジョブ制御信号入力部2201から解像度変換部202にも入力される。解像度変換部202では、このジョブ制御信号を、2×2画素の画像データ(ブロック)から縮小画像を生成する生成方法の選択する信号として利用する。解像度変換部202は、入力されたジョブ制御信号に応じて、縮小画像の生成方法を決定する。例えば、ジョブ制御信号が印刷モードを示す信号であった場合には、縮小画像は2×2画素の画像データから所定の1画素をサブサンプリングする方法を選択する。即ち、上記各実施形態で説明したような2×2画素の平均値を縮小画素とはしない。理由は縮小画像だけがプレビューされることが無いからである。この場合には、サブサンプルされる1画素は、各ブロックのB(0,0)であるとする。即ち、縮小画像の1画素=B(0,0)ということになる。従って、本実施形態における印刷モードでは、第1の実施形態で説明した「B(0,0)を生成する差分値」が不要になり、符号化データの削減に繋がる。 FIG. 12 shows a block configuration diagram of an image encoding device according to the present embodiment. Blocks that are the same as those in FIG. 2 described in the first embodiment are assigned the same numbers, and descriptions thereof are omitted. The job control signal input unit 2201 inputs a job control signal indicating the purpose of the image input to the image input unit 201. For example, this signal is “print only (referred to as print mode)” or “save encoded data (referred to as save mode, and there is a possibility of outputting a reduced image via the image processing unit 207)”. Etc. This input is input by a user mainly from an operation unit (not shown). This job control signal is also input from the job control signal input unit 2201 to the resolution conversion unit 202. The resolution conversion unit 202 uses the job control signal as a signal for selecting a generation method for generating a reduced image from 2 × 2 pixel image data (block). The resolution conversion unit 202 determines a reduced image generation method according to the input job control signal. For example, when the job control signal is a signal indicating the print mode, a method for sub-sampling a predetermined pixel from image data of 2 × 2 pixels is selected for the reduced image. That is, the average value of 2 × 2 pixels as described in the above embodiments is not a reduced pixel. The reason is that only the reduced image is not previewed. In this case, it is assumed that one pixel to be subsampled is B n (0, 0) of each block. That is, one pixel of the reduced image = B n (0, 0). Therefore, in the printing mode according to the present embodiment, the “difference value for generating B n (0, 0)” described in the first embodiment is not necessary, which leads to reduction of encoded data.

一方、ジョブ制御信号が保存モードを示す信号であった場合には、第1の実施形態と同様に縮小画像を生成する。即ち、符号化データも第1実施形態と同様になる。保存モードにおいては、縮小画像を用いてプレビューする可能性が在るため、縮小画像がプレビューに耐えられるような画質でなければならない。従って、このモードの場合には、第1の実施形態と同じように処理をすることが好ましい。   On the other hand, if the job control signal is a signal indicating the storage mode, a reduced image is generated as in the first embodiment. That is, the encoded data is the same as in the first embodiment. In the storage mode, since there is a possibility of previewing using a reduced image, the image quality must be such that the reduced image can withstand the preview. Therefore, in this mode, it is preferable to perform the same processing as in the first embodiment.

なお、符号化対象の画像に対する縮小方法が変わることから、画像展開部205や画像処理部207で、上記モードを識別しなければ正確に復元できない。よって、解像度変換部は、符号化対象画像の符号化データの先頭に、ジョブ制御信号に相当する識別フラグを付加するものとする。これにより、符号化データのデータ構造(「B(0,0)を生成する差分値」を含むかどうか)などを復号化側で識別でき、復号方法を誤ることが無い。 Note that since the reduction method for the image to be encoded is changed, the image development unit 205 and the image processing unit 207 cannot be accurately restored unless the mode is identified. Therefore, the resolution conversion unit adds an identification flag corresponding to the job control signal to the head of the encoded data of the encoding target image. As a result, the data structure of the encoded data (whether it includes “difference value for generating B n (0,0)”) or the like can be identified on the decoding side, and there is no error in the decoding method.

なお、本第3の実施形態においても、上述した実施形態と同様に、コンピュータプログラムによっても実現できる。そして、そのコンピュータプログラムを記憶したコンピュータ可読記憶媒体も本発明の範疇に入る。   Note that the third embodiment can also be realized by a computer program, as in the above-described embodiment. A computer-readable storage medium storing the computer program also falls within the scope of the present invention.

[第4の実施形態]
上記各実施形態では、縮小画像の生成方法は、符号化対象となる1画面分の画像に対して、同じ方法であることとした。本実施形態では、1画面の画像において、縮小画像の生成方法を切り替える場合を説明する。
[Fourth Embodiment]
In each of the embodiments described above, the reduced image generation method is the same method for an image of one screen to be encoded. In the present embodiment, a case will be described in which a reduced image generation method is switched in an image of one screen.

図13は、本実施形態における画像符号化装置のブロック構成図である。前述の図面と共通するブロックについては同じ番号を付し、その説明については省略する。画像入力部201は、符号化対象となる画像を表す画像データとともに、画素の属性情報を入力する。ここで、画素の属性情報とは、その画素が文字属性の画素なのか、写真属性の画素なのか、グラフィックス属性の画素なのか等を示すものである。よって、ある縮小対象となる2×2画素のブロックについては、それに対応する属性情報は4つ(4画素分)存在することになる。解像度変換部202では、上記属性情報に基づいて、各ブロックの縮小画像の生成方法を切り替える。解像度変換部202は、上記属性情報に基づいて、2×2画素のブロックの一部に写真属性の画素が含まれているか否かを判断する。もし、ブロックの一部に写真属性の画素が含まれている場合には、解像度変換部202は、第1実施形態で説明したような2×2画素の平均値を算出する方法で、縮小画像を生成する。もし、ブロックの一部に写真属性の画素が含まれていない場合には、解像度変換部202は、第3の実施形態で説明したように2×2画素の1つ(B(0,0))をサンプリングする方法で縮小画像の生成処理を行う。これにより、写真属性の画像については、縮小画像が2×2画素の平均値で構成されるため、縮小画像をプレビューなどに利用した場合に、画質劣化が目立たないという効果がある。なお、解像度変換部202は、上述した各実施形態などで説明した符号化データに加えて、更に、「どちらの縮小方法でブロックを縮小したか」を示す識別情報を1ブロックにつき1つずつ付加することとする。 FIG. 13 is a block configuration diagram of an image encoding device according to this embodiment. Blocks that are the same as those in the previous drawings are given the same numbers, and descriptions thereof are omitted. The image input unit 201 inputs pixel attribute information together with image data representing an image to be encoded. Here, the pixel attribute information indicates whether the pixel is a character attribute pixel, a photo attribute pixel, a graphics attribute pixel, or the like. Therefore, for a 2 × 2 pixel block to be reduced, there are four corresponding attribute information (for four pixels). The resolution conversion unit 202 switches the reduced image generation method for each block based on the attribute information. Based on the attribute information, the resolution conversion unit 202 determines whether or not a photo attribute pixel is included in a part of a 2 × 2 pixel block. If a photo attribute pixel is included in a part of the block, the resolution conversion unit 202 uses the method of calculating the average value of 2 × 2 pixels as described in the first embodiment to reduce the reduced image. Is generated. If a photo attribute pixel is not included in a part of the block, the resolution conversion unit 202 uses one of 2 × 2 pixels (B n (0, 0) as described in the third embodiment. )) Is performed to generate a reduced image. As a result, for an image having a photographic attribute, since the reduced image is composed of an average value of 2 × 2 pixels, there is an effect that image quality deterioration is not noticeable when the reduced image is used for a preview or the like. In addition to the encoded data described in each of the above-described embodiments, the resolution conversion unit 202 further adds identification information indicating “with which reduction method the block is reduced”, one for each block. I decided to.

なお、本第4の実施形態においても、上述した実施形態と同様に、コンピュータプログラムによっても実現できる。そして、そのコンピュータプログラムを記憶したコンピュータ可読記憶媒体も本発明の範疇に入る。   Note that the fourth embodiment can also be realized by a computer program, as in the above-described embodiment. A computer-readable storage medium storing the computer program also falls within the scope of the present invention.

[変形例]
上記各実施形態では、左上の画素(B(0,0))をブロック内の代表1画素Xとし、他の右上、左下、右下の3画素(Xa=B(0,1)、Xb=B(1,0)、Xc=B(1,1))を復元するための補間データを生成する場合を説明した。しかしながら、本発明はこの場合に限定されない。もし、画素Xを代表1画素(差分値を用いて復元される画素)と定義するならば、代表1画素をXが、B(0,1)やB(1,0)やB(1,1)に変更されても良い。そして、もしそのような変更をする場合には、式(2)などの隣接ブロックの考え方(隣接する方向)を変更すれば良いであろう。
[Modification]
In each of the above embodiments, the upper left pixel (B n (0, 0)) is the representative one pixel X in the block, and the other upper right, lower left, and lower right three pixels (Xa = B n (0, 1), The case where interpolation data for restoring Xb = B n (1, 0), Xc = B n (1, 1)) has been described. However, the present invention is not limited to this case. If the pixel X is defined as a representative pixel (a pixel restored using a difference value), X is represented by B n (0,1), B n (1,0), or B n. It may be changed to (1, 1). If such a change is made, the concept of adjacent blocks (adjacent direction) such as equation (2) may be changed.

例えば、B(0,1)を代表1画素Xとするように変形した場合には、全ての左右の方向を逆転して考えれば良い。この場合、補間データで補間される3画素は、画素B(0,0)とB(1,0)とB(1,1)に変更される。そして、式(2)の代わりに下記の判定を行うことになる。
(0,0)=Bn−1(0,0)
且つ
(1,0)=Bn+W−1(0,0)
且つ
(1,1)=Bn+W(0,0) …(5)
For example, when the transformation is performed so that B n (0, 1) is the representative one pixel X, all the left and right directions may be reversed. In this case, the three pixels to be interpolated with the interpolation data are changed to pixels B n (0, 0), B n (1, 0), and B n (1, 1). Then, the following determination is performed instead of the equation (2).
B n (0,0) = B n−1 (0,0)
And B n (1, 0) = B n + W−1 (0, 0)
And B n (1,1) = B n + W (0,0) (5)

また、もし、B(1,0)を代表1画素Xとするように変形した場合には、全ての上下の方向を逆転して考えれば良いであろう。また、もし、B(1,1)を代表1画素とするように変形した場合には、全ての左右の方向、および上下の方向を逆転して考えれば良い。 In addition, if B n (1, 0) is modified so as to represent one representative pixel X, all the up and down directions may be reversed. In addition, if B n (1, 1) is modified to be one representative pixel, all the left and right directions and the up and down directions may be reversed.

Claims (4)

それぞれが画素X、Xa、Xb、Xcで定義される2×2画素のブロックを、複数のブロックについて符号化する画像符号化装置であって、
前記2×2画素の画素値の平均値を、着目ブロックの縮小画像である1画素の画素値として出力することにより、縮小画像を生成する解像度変換手段と、
前記着目ブロックの縮小画像である1画素の画素値と、前記着目ブロックにおける画素Xとの差分値を生成する差分値生成手段と、
前記画素Xa、Xb、Xcを復元するための補間データを生成する補間データ生成手段とを備え、
前記補間データは、着目ブロックにおけるXa、Xb、Xcが、画素Xと一致していることを示す第1の情報、或いは、当該Xa、Xb、Xcが、それら画素に隣接するブロックにおける画素Xと一致していることを示す第2の情報、或いは、当該Xa、Xb、Xcの画素値を示す第3の情報の何れかを含むことを特徴とする画像符号化装置。
An image encoding device that encodes a block of 2 × 2 pixels, each defined by pixels X, Xa, Xb, and Xc, for a plurality of blocks,
Resolution conversion means for generating a reduced image by outputting an average value of the pixel values of the 2 × 2 pixels as a pixel value of one pixel which is a reduced image of the block of interest;
Difference value generating means for generating a difference value between a pixel value of one pixel, which is a reduced image of the block of interest, and a pixel X of the block of interest;
Interpolation data generating means for generating interpolation data for restoring the pixels Xa, Xb, Xc,
The interpolation data includes the first information indicating that Xa, Xb, and Xc in the block of interest match the pixel X, or the Xa, Xb, and Xc correspond to the pixel X in the block adjacent to the pixel. An image encoding apparatus characterized by including either second information indicating coincidence or third information indicating pixel values of the Xa, Xb, and Xc.
それぞれが画素X、Xa、Xb、Xcで定義される2×2画素のブロックを、複数のブロックについて符号化する画像符号化装置の制御方法であって、
解像度変換手段によって、前記2×2画素の画素値の平均値を、着目ブロックの縮小画像である1画素の画素値として出力することにより、縮小画像を生成する解像度変換工程と、
差分値生成手段によって、前記着目ブロックの縮小画像である1画素の画素値と、前記着目ブロックにおける画素Xとの差分値を生成する差分値生成工程と、
補間データ生成手段によって、前記画素Xa、Xb、Xcを復元するための補間データを生成する補間データ生成工程とを備え、
前記補間データは、着目ブロックにおけるXa、Xb、Xcが、画素Xと一致していることを示す第1の情報、或いは、当該Xa、Xb、Xcが、それら画素に隣接するブロックにおける画素Xと一致していることを示す第2の情報、或いは、当該Xa、Xb、Xcの画素値を示す第3の情報の何れかを含むことを特徴とする制御方法。
A control method of an image encoding device that encodes a block of 2 × 2 pixels, each defined by pixels X, Xa, Xb, and Xc, for a plurality of blocks,
A resolution conversion step of generating a reduced image by outputting an average value of the pixel values of the 2 × 2 pixels as a pixel value of one pixel which is a reduced image of the block of interest by resolution conversion means;
A difference value generation step of generating a difference value between a pixel value of one pixel, which is a reduced image of the block of interest, and a pixel X of the block of interest by a difference value generation unit;
An interpolation data generation step of generating interpolation data for restoring the pixels Xa, Xb, and Xc by an interpolation data generation means;
The interpolation data includes the first information indicating that Xa, Xb, and Xc in the block of interest match the pixel X, or the Xa, Xb, and Xc correspond to the pixel X in the block adjacent to the pixel. A control method comprising: either second information indicating coincidence or third information indicating pixel values of the Xa, Xb, and Xc.
コンピュータに読み込み込ませ実行させることで、前記コンピュータを請求項2に記載の画像符号化装置として機能させるコンピュータプログラム。   A computer program that causes a computer to function as the image encoding device according to claim 2 by being read and executed by a computer. 請求項3に記載のコンピュータプログラムを格納したことを特徴とするコンピュータ可読記憶媒体。   A computer-readable storage medium storing the computer program according to claim 3.
JP2010092507A 2010-04-13 2010-04-13 Image coding apparatus and control method thereof Active JP5523177B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010092507A JP5523177B2 (en) 2010-04-13 2010-04-13 Image coding apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010092507A JP5523177B2 (en) 2010-04-13 2010-04-13 Image coding apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2011223463A true JP2011223463A (en) 2011-11-04
JP5523177B2 JP5523177B2 (en) 2014-06-18

Family

ID=45039804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010092507A Active JP5523177B2 (en) 2010-04-13 2010-04-13 Image coding apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP5523177B2 (en)

Also Published As

Publication number Publication date
JP5523177B2 (en) 2014-06-18

Similar Documents

Publication Publication Date Title
JP5173873B2 (en) Image coding apparatus and control method thereof
JP5558767B2 (en) Image processing apparatus and processing method thereof
JP4612782B2 (en) Image processing apparatus, method thereof, program, and storage medium
JP5132517B2 (en) Image processing apparatus and image processing method
JP2007182060A (en) Image processing device and its control method
JP6076206B2 (en) Method, program, computer and recording medium
JP2008278464A (en) Apparatuses for encoding and decoding multidimensional data and control method thereof
JP2013115657A (en) Image processing apparatus, image processing method, and program
JP5893379B2 (en) Image compression apparatus, image compression method, and computer program
JP2011254405A (en) Image processor and image processing method
JP4761566B2 (en) Image processing apparatus and method, program and medium
JP5523177B2 (en) Image coding apparatus and control method thereof
JP2008228168A (en) Image processing apparatus and program
US8531746B2 (en) Image processing apparatus
JP2008022376A (en) Image processing device, control method thereof, computer program, and computer readable storage medium
JP4802853B2 (en) Image processing apparatus and image processing program
JP2008078826A (en) Image processor and its control method
JP5141527B2 (en) Image processing method, image processing apparatus, and image processing program
US9049404B2 (en) Image processing apparatus and method that perform multiple image processes, and storage medium storing a program thereof, for decompressing a compressed image according to first and second information indicating image processing to be performed
JP4741317B2 (en) Data compression apparatus and data compression program
JP4423812B2 (en) Drawing processing apparatus and drawing processing method
JP2012095227A (en) Image processing system, image processing method, and program
JP6140973B2 (en) Image processing apparatus, image processing method, and program
JP2005151065A (en) Image processing apparatus and program for image processing
JP4753006B2 (en) Image encoding apparatus, image decoding apparatus, and programs thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140218

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140408

R151 Written notification of patent or utility model registration

Ref document number: 5523177

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151