JP4590986B2 - Encoding device, decoding device, encoding method, decoding method, and program thereof - Google Patents

Encoding device, decoding device, encoding method, decoding method, and program thereof Download PDF

Info

Publication number
JP4590986B2
JP4590986B2 JP2004254083A JP2004254083A JP4590986B2 JP 4590986 B2 JP4590986 B2 JP 4590986B2 JP 2004254083 A JP2004254083 A JP 2004254083A JP 2004254083 A JP2004254083 A JP 2004254083A JP 4590986 B2 JP4590986 B2 JP 4590986B2
Authority
JP
Japan
Prior art keywords
image
pixel
layer
prediction
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004254083A
Other languages
Japanese (ja)
Other versions
JP2006074336A (en
Inventor
太郎 横瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2004254083A priority Critical patent/JP4590986B2/en
Publication of JP2006074336A publication Critical patent/JP2006074336A/en
Application granted granted Critical
Publication of JP4590986B2 publication Critical patent/JP4590986B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (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 encoding device and a decoding device to which a predictive encoding method is applied.

データの自己相関関係に着目して符号化する方法としては、例えば、ランレングス符号化、JPEG−LS及びLZ符号化(Ziv-Lempel符号化)などがある。特に、画像データの場合には、近傍の画素同士が高い相関関係を有するので、この点に着目して画像データを高い圧縮率で符号化することができる。
また、特許文献1は、動画像を構成するフレーム間の相関関係に着目して、フレーム間の差分画像データを算出し、算出された差分画像データと、入力された画像データ(フレーム画像)とを選択的に圧縮符号化する画像データ圧縮装置を開示する。
特開平11−313326号公報
As a method of encoding paying attention to data autocorrelation, there are, for example, run length encoding, JPEG-LS, LZ encoding (Ziv-Lempel encoding), and the like. In particular, in the case of image data, since neighboring pixels have a high correlation, it is possible to encode image data at a high compression rate by paying attention to this point.
Further, Patent Document 1 calculates the difference image data between the frames by paying attention to the correlation between the frames constituting the moving image, the calculated difference image data, and the input image data (frame image). An image data compression apparatus that selectively compresses and encodes the image is disclosed.
Japanese Patent Laid-Open No. 11-313326

本発明は、上述した背景からなされたものであり、画像間の相関を利用して入力画像を効率的に符号化する符号化装置、又は、この符号化装置により符号化された符号データを復号化する復号化装置を提供することを目的とする。   The present invention has been made from the above-described background, and decodes encoded data encoded by an encoding device that efficiently encodes an input image using correlation between images or encoded data by this encoding device. It is an object of the present invention to provide a decoding device that can be realized.

[符号化装置]
上記目的を達成するために、本発明にかかる符号化装置は、入力画像を構成するレイヤ画像である対象画像を符号化する符号化装置であって、1つのレイヤ画像に含まれる注目画素の画素値を符号化する場合に、この注目画素に対応する他のレイヤ画像に含まれる画素の画素値に基づいて、第1の予測値を算出する第1の予測手段と、この注目画素と同一のレイヤ画像に含まれる他の画素の画素値に基づいて、第2の予測値を算出する第2の予測手段と、前記第1の予測値及び前記第2の予測値に基づいて、他のレイヤ画像に含まれる画素の位置を示す参照情報又は同一のレイヤ画像に含まれる他の画素の位置を示す参照情報を選択する選択手段とを含む参照情報生成手段と、注目画素の符号データとして、前記選択手段により選択された参照情報の符号データを生成する符号生成手段とを有し、前記入力画像を構成するレイヤ画像は、注目画素の画素値及び前記選択手段によって選択された参照情報によって位置が示される画素のうち他のレイヤ画像に含まれる画素の画素値が一致する領域である透明領域と、透明領域以外の領域である非透明領域とを含み、前記符号生成手段は、前記透明領域及び前記非透明領域の境界において、注目画素及び同一のレイヤ画像に含まれる他の画素が前記透明領域及び前記非透明領域のいずれにあるかどうかに応じて、注目画素の画素値を注目画素の符号データとする
[Encoder]
In order to achieve the above object, an encoding apparatus according to the present invention is an encoding apparatus that encodes a target image, which is a layer image constituting an input image, and is a pixel of interest included in one layer image. When encoding a value, first prediction means for calculating a first predicted value based on the pixel value of a pixel included in another layer image corresponding to the target pixel, and the same as the target pixel A second prediction unit that calculates a second predicted value based on a pixel value of another pixel included in the layer image; and another layer based on the first predicted value and the second predicted value. Reference information generating means including selection information for selecting reference information indicating a position of a pixel included in an image or reference information indicating a position of another pixel included in the same layer image, and as code data of the target pixel, The reference selected by the selection means And a code generating means for generating information of the code data, the layer images forming the input image, the position by the reference information selected by the pixel value and the selection means of the pixel of interest is other among the pixels indicated A transparent region that is a region in which pixel values of pixels included in the layer image coincide with each other, and a non-transparent region that is a region other than the transparent region, and the code generation unit includes: The pixel value of the target pixel is used as code data of the target pixel depending on whether the target pixel and other pixels included in the same layer image are in the transparent region or the non-transparent region .

本発明の符号化装置によれば、入力画像と他の参照画像との相関関係を利用して、入力画像を効率よく符号化することができる。   According to the encoding apparatus of the present invention, an input image can be efficiently encoded using the correlation between the input image and another reference image.

[背景と概略]
まず、本発明の理解を助けるために、その背景及び概略を説明する。
例えば、LZ符号化方式などの予測符号化方式では、既定の参照位置の画素値を参照して予測データを生成し、生成された予測データと注目画素の画像データとが一致する場合に、一致した予測データの参照位置など(以下、参照情報)が注目画素の符号データとして符号化される。そのため、予測データの一致頻度(的中率)が高いほど、高い圧縮率が期待できる。したがって、予測符号化方式では、参照位置をどこに設定するかにより、圧縮効率が大きく変わってくる。一般的には、近傍にある画素群で相関が高いため、参照位置は、注目画素の近傍にある画素(同一画像上)に設定される。
また、JPEG−LS(非可逆モード)などでは、先行する画素で決定された画素値を用いて後続の画素の画素値を置換することにより、さらに予測データの的中率を高めて圧縮率の向上を図っている。
[Background and outline]
First, in order to help understanding of the present invention, its background and outline will be described.
For example, in the predictive encoding method such as the LZ encoding method, the prediction data is generated by referring to the pixel value at the predetermined reference position, and the generated prediction data matches the image data of the target pixel. The reference position of the predicted data (hereinafter referred to as reference information) is encoded as the code data of the target pixel. Therefore, a higher compression rate can be expected as the matching frequency (target ratio) of predicted data is higher. Therefore, in the predictive coding method, the compression efficiency varies greatly depending on where the reference position is set. Generally, since the correlation is high in the pixel group in the vicinity, the reference position is set to a pixel (on the same image) in the vicinity of the target pixel.
In JPEG-LS (irreversible mode) and the like, the pixel value of the succeeding pixel is replaced with the pixel value determined by the preceding pixel, so that the hit rate of the prediction data is further increased and the compression rate is increased. We are trying to improve.

符号化対象となる入力画像の中には、互いに相関のある複数の画像群を構成するものもある。例えば、動画像を構成する複数のフレーム画像は、動いていない画像領域においてほぼ一致し、動いた画像領域においても、動きの方向及び移動量を加味すればある程度相関があるといえる。
そこで、本実施形態における画像処理装置は、符号化対象となる入力画像(対象画像)を符号化する場合に、少なくとも他の参照画像(例えば、他のフレーム画像)を参照して予測データを生成し、生成された予測データを用いた予測符号化処理を行う。すなわち、本画像処理装置は、他の参照画像に対する参照情報を、対象画像の少なくとも一部の符号データとして符号化する。
また、本画像処理装置は、このように生成された符号データを復号化する場合に、符号データに応じて他の参照画像を参照し、参照画像に含まれる画像データを用いて復号画像を生成する。
Some input images to be encoded constitute a plurality of image groups that are correlated with each other. For example, a plurality of frame images constituting a moving image almost coincide with each other in a non-moving image region, and even in a moving image region, it can be said that there is a certain degree of correlation if the direction of movement and the amount of movement are taken into account.
Therefore, when encoding an input image (target image) to be encoded, the image processing apparatus according to the present embodiment generates prediction data with reference to at least another reference image (for example, another frame image). Then, predictive encoding processing using the generated prediction data is performed. That is, the image processing apparatus encodes reference information for another reference image as at least a part of code data of the target image.
In addition, when decoding the code data generated in this way, the present image processing apparatus refers to another reference image according to the code data, and generates a decoded image using the image data included in the reference image. To do.

なお、特許文献1に記載された手法では、符号化対象となっている現フレームを符号化する場合に、前フレーム(基準画像)との差分画像が生成される。
図1は、差分画像の生成を伴う符号化方式と、本実施形態における符号化方式との相違点を説明する図であり、図1(A)は、前フレームと現フレームとの差分画像を例示し、図1(B)は、本実施形態における予測データ生成の際に参照される参照位置を例示する。
図1(A)に例示するように、前フレーム(基準画像)と現フレームとの差分画像は、それぞれのフレームに属する画素を全画素について互いに対比し算出された差分値で構成される。そのため、動いていない部分では差分値が0となるが、動いた部分では差分値が存在し多様な値となりうる。つまり、差分画像は、少なくとも動いた部分と動いていない部分とで異なる画素値を有することになる。そのため、差分画像中に、画素値の不連続が生じ、圧縮率の向上を妨げる。
一方、図1(B)に例示するように、本実施形態における画像処理装置は、図1(B)に例示するように、注目画素Xと同一画像上にある参照画素A〜Dと、他の画像(参照画像)上にある参照画素Eとを参照する。そして、本画像処理装置は、注目画素Xと一定の関係にあるいずれかの参照画素(A〜E)を選択し、選択された参照画素の画素値に基づいて予測データ(参照情報)を生成する。すなわち、本画像処理装置は、他の画像(前フレーム)の画素値を一律に適用するのではなく、圧縮率の観点から有利な場合にのみ、他の画像の画素値を適用し、高い圧縮率を実現する。
In the method described in Patent Document 1, when the current frame to be encoded is encoded, a difference image from the previous frame (reference image) is generated.
FIG. 1 is a diagram for explaining a difference between an encoding method involving generation of a difference image and the encoding method in the present embodiment. FIG. 1A shows a difference image between a previous frame and a current frame. For example, FIG. 1B illustrates a reference position that is referred to when predictive data is generated in the present embodiment.
As illustrated in FIG. 1A, the difference image between the previous frame (reference image) and the current frame is configured with a difference value calculated by comparing pixels belonging to each frame with respect to all the pixels. Therefore, the difference value becomes 0 in the non-moving part, but the difference value exists in the moving part and can be various values. That is, the difference image has different pixel values at least between the moved part and the non-moved part. Therefore, discontinuity of pixel values occurs in the difference image, which hinders improvement of the compression rate.
On the other hand, as illustrated in FIG. 1B, the image processing apparatus according to this embodiment includes reference pixels A to D on the same image as the target pixel X, and the like, as illustrated in FIG. Reference pixel E on the image (reference image) is referred to. Then, the image processing apparatus selects any reference pixel (A to E) having a certain relationship with the target pixel X, and generates prediction data (reference information) based on the pixel value of the selected reference pixel. To do. In other words, the present image processing apparatus does not apply the pixel values of other images (previous frame) uniformly, but applies the pixel values of other images only when advantageous from the viewpoint of the compression rate, and performs high compression. Realize the rate.

次に、本発明の適用が好適な画像群を例示する。
図2は、レイヤ構造で管理される画像データを例示する図であり、レイヤ構造の画像データに対して本発明を適用する形態を例示する。
図2に示すように、画像データ700は、複数のマスクレイヤ710(710a及び710b)と、1つのイメージレイヤ720とで構成される。以下、このようなレイヤ構造で画像データを管理する方式を、マルチマスク方式という。
マスクレイヤ710は、文字画像又は簡単なCG(Computer Graphics)画像など階調変化の少ない画像要素(例えば16階調以下)が割り当てられるレイヤであり、本例では2値の画像要素(オブジェクト)が割り当てられている。したがって、それぞれのマスクレイヤ710に含まれる画像要素(オブジェクト)は、単一の色で構成され、2階調で表現される。
イメージレイヤ720は、写真画像などのマスクレイヤ710よりも階調数が多い画像要素(オブジェクト)が割り当てられるレイヤであり、本例では多値(16階調以上)の画像要素(オブジェクト)が割り当てられている。例えば、イメージレイヤ720には、複雑なCG画像又は連続階調画像などが含まれる。ここで、連続階調画像とは、人間の視覚特性に鑑み十分に連続的なグラデーションが表現される画像であり、例えば、1色あたり16階調以上で表現される画像である。
表示画像750は、イメージレイヤ720の上に、予め設定された順番でマスクレイヤ710を重ねあわせて表示または印刷等されたものである。
Next, an example of an image group suitable for application of the present invention will be described.
FIG. 2 is a diagram illustrating image data managed in a layer structure, and illustrates a mode in which the present invention is applied to image data having a layer structure.
As shown in FIG. 2, the image data 700 includes a plurality of mask layers 710 (710a and 710b) and one image layer 720. Hereinafter, a method for managing image data with such a layer structure is referred to as a multi-mask method.
The mask layer 710 is a layer to which an image element with little gradation change (for example, 16 gradations or less) such as a character image or a simple CG (Computer Graphics) image is assigned. In this example, a binary image element (object) is assigned. Assigned. Therefore, the image elements (objects) included in each mask layer 710 are composed of a single color and expressed in two gradations.
The image layer 720 is a layer to which an image element (object) having a larger number of gradations than the mask layer 710 such as a photographic image is assigned. In this example, an image element (object) having multiple values (16 gradations or more) is assigned. It has been. For example, the image layer 720 includes a complex CG image or a continuous tone image. Here, the continuous tone image is an image in which a sufficiently continuous gradation is expressed in view of human visual characteristics, for example, an image expressed in 16 gradations or more per color.
The display image 750 is displayed or printed by overlaying the mask layer 710 on the image layer 720 in a preset order.

このように、1つの出力画像を構成する複数のオブジェクトがその属性に応じて複数のレイヤ(マスクレイヤ及びイメージレイヤ)に割り当てられ独立して管理されると、レイヤ毎に編集したり、属性に応じた圧縮方式をレイヤ毎に適用できるなどのメリットが得られる。
このようなレイヤ構造の画像データに対して本発明が適用できる。例えば、本発明にかかる画像処理装置は、いずれか1つのレイヤを注目レイヤとして符号化する場合に、他のレイヤの画像データを参照して、注目レイヤの画像データを符号化する。また、本画像処理装置は、このように生成された符号データを復号化する場合に、符号データに応じて他のレイヤを参照し、表示画像750を生成する。詳細は後述する。
As described above, when a plurality of objects constituting one output image are assigned to a plurality of layers (mask layer and image layer) and managed independently according to the attribute, editing can be performed for each layer or Advantages such as being able to apply a corresponding compression method for each layer can be obtained.
The present invention can be applied to image data having such a layer structure. For example, when encoding any one layer as a target layer, the image processing apparatus according to the present invention refers to image data of another layer and encodes the image data of the target layer. Further, when decoding the code data generated in this way, the present image processing apparatus generates a display image 750 by referring to another layer according to the code data. Details will be described later.

図3(A)は、立体形状の断面画像を例示する図であり、図3(B)は、本発明を適用して秘匿化処理が施された画像を例示する図である。
図3(A)に例示するように、立体形状は複数の断面画像を有し、これらの断面画像は互いに高い相関を有する場合が多い。
そのため、これらの断面画像の符号化処理において本発明を適用できる。例えば、本発明にかかる画像処理装置は、1つの断面画像を注目断面画像として符号化する場合に、他の断面画像を参照画像として参照して、注目断面画像の画像データを符号化する。また、本画像処理装置は、このように生成された符号データを復号化する場合に、符号データに応じて他の断面画像を参照し、断面画像(注目断面画像)の画像データを生成する。
3A is a diagram illustrating a three-dimensional cross-sectional image, and FIG. 3B is a diagram illustrating an image subjected to concealment processing by applying the present invention.
As illustrated in FIG. 3A, the three-dimensional shape has a plurality of cross-sectional images, and these cross-sectional images often have a high correlation with each other.
Therefore, the present invention can be applied to the encoding process of these cross-sectional images. For example, when an image processing apparatus according to the present invention encodes one cross-sectional image as a cross-sectional image of interest, the image data of the cross-sectional image of interest is encoded with reference to another cross-sectional image as a reference image. In addition, when decoding the code data generated in this way, the image processing apparatus refers to another cross-sectional image according to the code data, and generates image data of a cross-sectional image (a target cross-sectional image).

また、図3(B)に例示するように、本発明にかかる画像処理装置は、ノイズ領域を含む参照画像を参照して、入力画像を符号化することにより、入力画像に対する閲覧制御を行うことができる。例えば、秘匿化したい領域(以下、秘匿領域)に対応する領域がノイズで構成された参照画像を用いて入力画像が符号化されると、入力画像の秘匿領域は、ノイズを参照して符号化されるため、ランダム(不均一)にこの参照画像の画素値で予測が的中しその予測データに基づいて符号データが生成される。そのため、この参照画像を用いずにこの符号データが復号化されると、ノイズ領域に対応する領域(秘匿領域)は、スクランブルがかけられた画像となって復号化される。一方、秘匿化しない領域(非秘匿領域)は、既定の画素値(例えば、最小値又は最大値)で一様に埋められた領域(参照画像)を参照して符号化されるため、参照画像を用いずに復号化されても、閲覧可能な状態で再生される。   In addition, as illustrated in FIG. 3B, the image processing apparatus according to the present invention performs browsing control on an input image by encoding the input image with reference to a reference image including a noise region. Can do. For example, when an input image is encoded using a reference image in which a region corresponding to a region to be concealed (hereinafter referred to as a concealment region) is configured with noise, the concealment region of the input image is encoded with reference to noise. Therefore, prediction is performed with the pixel value of the reference image randomly (non-uniformly), and code data is generated based on the prediction data. Therefore, when this code data is decoded without using this reference image, the region corresponding to the noise region (the secret region) is decoded as a scrambled image. On the other hand, an area that is not concealed (non-confidential area) is encoded with reference to an area (reference image) that is uniformly filled with a predetermined pixel value (for example, the minimum value or the maximum value). Even if it is decoded without using, it is played back in a viewable state.

以上説明したように、本発明は互いに相関のある画像群に対して広く適用可能である。以下、レイヤ構造の画像データに対して本発明を適用する場合を具体例としてより詳細に説明する。   As described above, the present invention can be widely applied to image groups having a correlation with each other. Hereinafter, a case where the present invention is applied to image data having a layer structure will be described in detail as a specific example.

[ハードウェア構成]
次に、第1の実施形態における画像処理装置2のハードウェア構成を説明する。
図4は、本発明にかかる符号化方法及び復号化方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。
図4に例示するように、画像処理装置2は、CPU212及びメモリ214などを含む制御装置21、通信装置22、HDD・CD装置などの記録装置24、並びに、LCD表示装置あるいはCRT表示装置およびキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)25から構成される。
画像処理装置2は、例えば、本発明にかかる符号化プログラム5(後述)及び復号化プログラム6(後述)がプリンタドライバの一部としてインストールされた汎用コンピュータであり、通信装置22又は記録装置24などを介して画像データを取得し、取得された画像データを符号化又は復号化してプリンタ装置3に送信する。
[Hardware configuration]
Next, a hardware configuration of the image processing apparatus 2 in the first embodiment will be described.
FIG. 4 is a diagram illustrating a hardware configuration of the image processing apparatus 2 to which the encoding method and the decoding method according to the present invention are applied, centering on the control apparatus 20.
As illustrated in FIG. 4, the image processing apparatus 2 includes a control device 21 including a CPU 212 and a memory 214, a communication device 22, a recording device 24 such as an HDD / CD device, an LCD display device or a CRT display device, and a keyboard. A user interface device (UI device) 25 including a touch panel and the like is included.
The image processing apparatus 2 is, for example, a general-purpose computer in which an encoding program 5 (described later) and a decoding program 6 (described later) according to the present invention are installed as a part of a printer driver, such as a communication device 22 or a recording device 24. The image data is acquired via, and the acquired image data is encoded or decoded and transmitted to the printer apparatus 3.

[符号化プログラム]
図5は、制御装置21(図4)により実行され、本発明にかかる符号化方法を実現する第1の符号化プログラム5の機能構成を例示する図である。
図5に例示するように、第1の符号化プログラム5は、複数の層内予測部510(層内第1予測部510a、層内第2予測部510b、層内第3予測部510c及び層内第4予測部510d)、層間予測部520、予測誤差算出部530、ラン計数部540、選択部550及び符号生成部560を有する。なお、層内予測部510、層間予測部520、予測誤差算出部530、ラン計数部540及び選択部550の組合せが本発明にかかる参照情報生成手段の一例である。
符号化プログラム5において、画像データは、通信装置22又は記録装置24などを介して入力される。入力された画像データは、符号化プログラム5の前段でラスタライズされている。
[Encoding program]
FIG. 5 is a diagram illustrating a functional configuration of the first encoding program 5 which is executed by the control device 21 (FIG. 4) and implements the encoding method according to the present invention.
As illustrated in FIG. 5, the first encoding program 5 includes a plurality of intra-layer prediction units 510 (first intra-layer prediction unit 510a, second intra-layer prediction unit 510b, third intra-layer prediction unit 510c, and layers. A fourth prediction unit 510d), an interlayer prediction unit 520, a prediction error calculation unit 530, a run counting unit 540, a selection unit 550, and a code generation unit 560. The combination of the intra-layer prediction unit 510, the interlayer prediction unit 520, the prediction error calculation unit 530, the run counting unit 540, and the selection unit 550 is an example of the reference information generation unit according to the present invention.
In the encoding program 5, image data is input via the communication device 22 or the recording device 24. The input image data is rasterized in the previous stage of the encoding program 5.

層内予測部510は、注目画素とは異なる画素(参照画素)の画素値を参照して、この画素値を予測値とし、この予測値と注目画素の画素値との比較結果をラン計数部540に対して出力する。本例の層内第1予測部510a〜層内第4予測部510dは、それぞれ参照画素A〜D(図1,図6)の画素値と、注目画素X(図1,図6)の画素値とを比較して、画素値が一致した場合(すなわち、予測が的中した場合)に、自己を識別する予測部ID(後述)をラン計数部540に対して出力し、これ以外の場合に、一致しなかった旨をラン計数部540に対して出力する。なお、層内予測部510は、1種類以上であればよく、例えば、参照位置Aを参照する層内第1予測部510aのみを設けてもよい。   The intra-layer prediction unit 510 refers to the pixel value of a pixel (reference pixel) that is different from the target pixel, sets this pixel value as a predicted value, and compares the predicted value with the pixel value of the target pixel as a run counting unit. Output to 540. The first intra-layer prediction unit 510a to the fourth intra-layer prediction unit 510d in this example are the pixel values of the reference pixels A to D (FIGS. 1 and 6) and the pixel of the target pixel X (FIGS. 1 and 6), respectively. When the pixel values match with each other (that is, when the prediction is correct), a prediction unit ID (described later) for identifying itself is output to the run counting unit 540, and in other cases In addition, the fact that they did not match is output to the run counter 540. The intra-layer prediction unit 510 may be one or more types, and for example, only the first intra-layer prediction unit 510a that refers to the reference position A may be provided.

層間予測部520は、符号化対象となる画像(対象画像)とは異なる他の画像(参照画像)の画素値を参照して、この参照画像の画素値を予測値とし、この予測値と注目画素(対象画像に含まれる画素)の画素値との比較結果をラン計数部540に対して出力する。本例の層間予測部520は、参照画像に含まれる参照画素E(図1,図6)の画素値と、注目画素X(図1,図6)の画素値とを比較して、画素値が一致した場合(すなわち、予測が的中した場合)に、自己を識別する予測部ID(後述)をラン計数部540に対して出力し、これ以外の場合に、一致しなかった旨をラン計数部540に対して出力する。参照画像における参照画素Eの相対位置は、対象画像における注目画素Xの相対位置と対応し、例えば、対象画像の解像度と参照画像の解像度とが一致する場合には、同じ相対位置となる。すなわち、参照画素Eは、対象画像と参照画像とを重ね合わせた場合に、注目画素Xと重なり合う画素である。   The inter-layer prediction unit 520 refers to the pixel value of another image (reference image) different from the image to be encoded (target image), sets the pixel value of the reference image as a predicted value, and uses the predicted value and the attention The comparison result with the pixel value of the pixel (pixel included in the target image) is output to the run counting unit 540. The interlayer prediction unit 520 of this example compares the pixel value of the reference pixel E (FIGS. 1 and 6) included in the reference image with the pixel value of the target pixel X (FIGS. 1 and 6), Are matched (that is, when the prediction is correct), a prediction unit ID (described later) for identifying the self is output to the run counting unit 540. Output to the counting unit 540. The relative position of the reference pixel E in the reference image corresponds to the relative position of the target pixel X in the target image. For example, when the resolution of the target image matches the resolution of the reference image, the relative position is the same. That is, the reference pixel E is a pixel that overlaps the target pixel X when the target image and the reference image are overlapped.

予測誤差算出部530は、予め定められた予測方法で注目画素の画素値を予測し、その予測値を注目画素の実際の画素値から減算し、予測誤差値としてラン計数部540及び選択部550に対して出力する。予測誤差算出部530の予測方法は、符号データを復号化する復号化プログラム(後述)の予測方法と対応していればよい。本例では、予測誤差算出部530は、層内第1予測部510aと同じ参照位置(参照画素A)の画素値を予測値とし、この予測値と実際の画素値(注目画素Xの画素値)との差分を算出する。   The prediction error calculation unit 530 predicts the pixel value of the target pixel by a predetermined prediction method, subtracts the prediction value from the actual pixel value of the target pixel, and performs the run counting unit 540 and the selection unit 550 as prediction error values. Output for. The prediction method of the prediction error calculation unit 530 only needs to correspond to the prediction method of a decoding program (described later) that decodes code data. In this example, the prediction error calculation unit 530 uses a pixel value at the same reference position (reference pixel A) as the first intra-layer prediction unit 510a as a prediction value, and this prediction value and an actual pixel value (pixel value of the target pixel X) ) Is calculated.

ラン計数部540は、同一の予測部IDが連続する数をカウントし、予測部ID及びその連続数を選択部550に対して出力する。この予測部ID及びその連続数は、対象画像及び参照画像に対する参照情報の一例である。例えば、ラン計数部540は、予測誤差値が入力される場合に、内部カウンタでカウントされている予測部ID及びその連続数を出力し、その後に、入力された予測誤差値をそのまま選択部550に対して出力する。   The run counting unit 540 counts the number of consecutive identical prediction unit IDs, and outputs the prediction unit ID and the continuous number thereof to the selection unit 550. The prediction unit ID and the number of consecutive parts are examples of reference information for the target image and the reference image. For example, when a prediction error value is input, the run counting unit 540 outputs the prediction unit ID counted by the internal counter and its continuous number, and then the input prediction error value is directly selected by the selection unit 550. Output for.

選択部550は、ラン計数部540から入力された予測部ID、連続数及び予測誤差値に基づいて、最も長く連続した予測部IDを選択し、この予測部ID及びその連続数並びに予測誤差値を予測データとして符号生成部560に対して出力する。   The selection unit 550 selects the longest continuous prediction unit ID based on the prediction unit ID, the continuous number, and the prediction error value input from the run counting unit 540, and the prediction unit ID, the continuous number, and the prediction error value. Is output to the code generation unit 560 as prediction data.

符号生成部560は、選択部550から入力された予測部ID、連続数及び予測誤差値を符号化し、通信装置22又は記録装置24などに出力する。   The code generation unit 560 encodes the prediction unit ID, the number of continuations, and the prediction error value input from the selection unit 550, and outputs them to the communication device 22 or the recording device 24.

図6は、符号化プログラム5によりなされる符号化処理を説明する図であり、図6(A)は、層内予測部510及び層間予測部520により参照される画素の位置を例示し、図6(B)は、それぞれの参照画素に対応付けられた符号を例示し、図6(C)は、符号生成部560により生成される符号データを例示する図である。
図6(A)に例示するように、層内予測部510及び層間予測部520の参照位置は、注目画素Xとの相対位置として設定されている。具体的には、層内第1予測部510aの参照画素Aは、注目画素Xの主走査方向上流に設定され、層内第2予測部510bから層内第4予測部510dの参照画素B〜Dは、注目画素Xの上方(副走査方向上流)の主走査ライン上に設定されている。また、層間予測部520の参照画素Eは、注目画素Xが含まれる対象画像とは異なる他の画像(参照画像)上に設定されている。
FIG. 6 is a diagram for explaining an encoding process performed by the encoding program 5. FIG. 6A illustrates the positions of pixels referred to by the intra-layer prediction unit 510 and the inter-layer prediction unit 520. 6B illustrates a code associated with each reference pixel, and FIG. 6C illustrates code data generated by the code generation unit 560.
As illustrated in FIG. 6A, the reference positions of the intra-layer prediction unit 510 and the inter-layer prediction unit 520 are set as relative positions with respect to the target pixel X. Specifically, the reference pixel A of the first intra-layer prediction unit 510a is set upstream of the target pixel X in the main scanning direction, and the reference pixels B to B of the second intra-layer prediction unit 510b to the fourth intra-layer prediction unit 510d. D is set on the main scanning line above the target pixel X (upstream in the sub-scanning direction). Further, the reference pixel E of the interlayer prediction unit 520 is set on another image (reference image) different from the target image including the target pixel X.

また、図6(B)に例示するように、それぞれの参照画素A〜Eには優先順位が設定されており、複数の参照画素で予測が的中した場合には、ラン計数部540(図5)は、設定された優先順位に応じて、予測部IDの連続数を増加させる。レイヤ構造で符号化する観点から、層間予測部520の優先順位は、層内予測部510の優先順位よりも高いことが望ましい。なお、複数の層内予測部510に設定された優先順位は、予測値の的中率(参照画素の画素値と注目画素Xの画素値とが一致する確率)に応じて設定されており、MRU(Most Recently Used)アルゴリズムにより動的に更新されてもよい。
また、符号生成部560は、図6(B)に例示するように、予測部(参照位置)と符号とを互いに対応付けており、注目画素Xと画素値が一致した参照位置に対応する符号を出力する。なお、それぞれの参照位置に対応付けられている符号は、例えば、各参照位置の的中率に応じて設定されたエントロピー符号であり、優先順位に対応する符号長となる。
Further, as illustrated in FIG. 6B, priorities are set for the respective reference pixels A to E, and when the prediction is correct with a plurality of reference pixels, the run counter 540 (FIG. 5) increases the number of consecutive prediction unit IDs according to the set priority. From the viewpoint of encoding with a layer structure, it is desirable that the priority order of the interlayer prediction unit 520 is higher than the priority order of the intra-layer prediction unit 510. The priorities set in the plurality of intra-layer prediction units 510 are set according to the predictive value hit rate (probability that the pixel value of the reference pixel matches the pixel value of the target pixel X), It may be dynamically updated by an MRU (Most Recently Used) algorithm.
In addition, as illustrated in FIG. 6B, the code generation unit 560 associates the prediction unit (reference position) and the code with each other, and the code corresponding to the reference position where the pixel of interest X matches the pixel value. Is output. Note that the code associated with each reference position is, for example, an entropy code set according to the hit rate of each reference position, and has a code length corresponding to the priority order.

また、符号生成部560は、同一の参照位置で連続して画素値が一致する場合には、ラン計数部540によりカウントされたその連続数を符号化する。これにより、符号量が少なくなる。このように、符号化プログラム5は、図6(C)に例示するように、いずれかの参照位置で画素値が一致した場合には、その参照位置に対応する符号と、この参照位置で画素値が一致する連続数とを符号化し、いずれの参照位置でも画素値が一致しなかった場合には、既定の参照位置の画素値と注目画素Xの画素値との差分(予測誤差値)を符号化する。   In addition, when the pixel values continuously match at the same reference position, the code generation unit 560 encodes the continuous number counted by the run counting unit 540. Thereby, the code amount is reduced. In this way, as illustrated in FIG. 6C, the encoding program 5, when the pixel values match at any reference position, the code corresponding to the reference position and the pixel at the reference position If the pixel values do not match at any reference position, the difference (prediction error value) between the pixel value at the predetermined reference position and the pixel value of the target pixel X is encoded. Encode.

図7は、符号化プログラム5(図5)により符号化されるレイヤ構造の画像データを例示する図であり、図7(A)は、CG画像が割り当てられたマスクレイヤ710aを符号化する場合を例示し、図7(B)は、文字画像が割り当てられたマスクレイヤ710bを符号化する場合を例示する。
図7(A)に例示するように、符号化プログラム5は、入力画像からCG画像を除いた画像を参照画像として、入力画像を処理すると、マスクレイヤ710aの符号データを生成できる。すなわち、符号化プログラム5は、入力画像からCG画像を除いた画像を参照することにより、CG画像が割り当てられたマスクレイヤ710aを符号化することができる。符号化されたマスクレイヤ710aのうち、ハッチングされた領域は、参照画像を参照する層間予測部520(図5)の予測が的中した領域であり、層間予測部520に対応する符号の連続として符号化される。
FIG. 7 is a diagram exemplifying layer-structured image data encoded by the encoding program 5 (FIG. 5). FIG. 7A illustrates a case where a mask layer 710a to which a CG image is allocated is encoded. FIG. 7B illustrates a case where the mask layer 710b to which the character image is assigned is encoded.
As illustrated in FIG. 7A, the encoding program 5 can generate code data of the mask layer 710a by processing the input image using an image obtained by removing the CG image from the input image as a reference image. That is, the encoding program 5 can encode the mask layer 710a to which the CG image is assigned by referring to an image obtained by removing the CG image from the input image. Of the encoded mask layer 710a, the hatched region is a region on which the prediction of the interlayer prediction unit 520 (FIG. 5) referring to the reference image has been hit, and is a sequence of codes corresponding to the interlayer prediction unit 520. Encoded.

同様に、図7(B)に例示するように、符号化プログラム5は、入力画像から文字画像を除いた画像を参照画像として、入力画像を処理すると、文字画像が割り当てられたマスクレイヤ710bの符号データを生成できる。すなわち、符号化プログラム5は、入力画像から文字画像(フォント画像)を除いた画像を参照することにより、文字画像が割り当てられたマスクレイヤ710aを符号化することができる。   Similarly, as illustrated in FIG. 7B, when the encoding program 5 processes an input image using an image obtained by removing the character image from the input image as a reference image, the encoding layer 5 of the mask layer 710 b to which the character image is assigned. Code data can be generated. That is, the encoding program 5 can encode the mask layer 710a to which the character image is assigned by referring to an image obtained by removing the character image (font image) from the input image.

なお、この参照画像は上記入力画像として符号化プログラム5により処理されてもよい。例えば、符号化プログラム5は、図7(A)に例示した参照画像を入力画像とし、この参照画像から文字画像を除いた画像(すなわち、イメージ画像のみ)を次の参照画像として処理する。これにより、符号化プログラム5は、図7(A)に例示した参照画像から、文字画像が割り当てられたマスクレイヤ710bの符号データを生成できる。すなわち、符号化プログラム5は、入力画像から段階的にオブジェクトを除いた画像をそれぞれ参照画像として、直列的に符号化処理を行うことにより、図2に例示するような複数のマスクレイヤ710の符号データを生成することができる。このように直列的な符号化処理により生成される各レイヤの符号データは、シーケンシャルな関係となり、復号化する場合には、既定の順序(すなわち、符号化処理により生成順序とは逆の順序)で復号化される必要がある。
また、イメージレイヤ720(図2)は、層内予測により符号化されてもよいし、JPEGなどの他の符号化方式により符号化されてもよい。
This reference image may be processed by the encoding program 5 as the input image. For example, the encoding program 5 uses the reference image illustrated in FIG. 7A as the input image, and processes an image obtained by removing the character image from the reference image (that is, only the image image) as the next reference image. Thereby, the encoding program 5 can generate the code data of the mask layer 710b to which the character image is assigned from the reference image illustrated in FIG. That is, the encoding program 5 performs encoding processing in series using images obtained by removing the objects in stages from the input image as reference images, thereby encoding a plurality of mask layers 710 as illustrated in FIG. Data can be generated. In this way, the code data of each layer generated by the serial encoding process has a sequential relationship, and when decoding, a predetermined order (that is, an order reverse to the generation order by the encoding process) Needs to be decrypted with
Further, the image layer 720 (FIG. 2) may be encoded by intra-layer prediction, or may be encoded by another encoding method such as JPEG.

また、画像処理装置2は、上記のように生成された符号データを復号化する場合には、順に入力される符号に応じて、対応する参照位置の画素値を参照し、又は、予測誤差値を復号化して、注目画素の画素値を再生する。   Further, when decoding the code data generated as described above, the image processing apparatus 2 refers to the pixel value at the corresponding reference position or predicts the error value in accordance with the code that is sequentially input. And the pixel value of the target pixel is reproduced.

図8は、透明画素と非透明画素との境界領域に対する処理を説明する図である。なお、透明画素とは、本図の「透明」と表された矩形領域であり、他のレイヤ(参照画像)を参照して予測が的中した領域である。この透明画素に対応する符号は、他のレイヤを参照するよう指示する情報となっている。また、非透明画素とは、本図の「有色」と表された矩形領域であり、同一画像内での予測(参照画素A〜D)が的中した領域、又は、層間予測及び層内予測がいずれも的中しなかった領域である。この非透明画素の符号は、層内予測を指示する情報、又は、予測誤差を示す情報となっている。
図8に例示するように、透明画素と非透明画素とが互いに隣接する領域では、予測誤差の処理が問題となる。例えば、本図における注目画素Xでは、層内予測(参照画素A〜D)及び層間予測(参照画素E)のいずれも的中しないため、予測誤差が算出される。
各レイヤを独立に編集可能にするためには、予測誤差の算出は層内(対象画像内)で閉じていることが望ましい。しかしながら、本実施形態における符号化プログラム5は、直左(参照画素A)と注目画素Xとの差分を予測誤差として算出するため、本図の注目画素Xについては、他のレイヤの画素値と注目画素Xとの差分を算出してしまう。
そこで、本実施形態における符号化プログラム5は、透明画素と非透明画素との境界領域においては、予測誤差の算出において例外処理を行う。例えば、符号化プログラム5は、透明画素と非透明画素との境界領域において、注目画素Xの画素値そのものを符号化する。より具体的には、符号化プログラム5は、直左画素(参照画素A)が透明画素であり、かつ、注目画素Xが非透明画素である場合には、注目画素Xの画素値をそのまま符号化し、直左画素(参照画素A)が非透明画素であり、かつ、注目画素Xが非透明画素である場合には、参照画素Aと注目画素Xとの画素値の差分を予測誤差として符号化する。
また、本符号化プログラム5は、透明画素を既定の画素値(デフォルト値)で埋めてもよい。これにより、符号化プログラム5は、透明画素と非透明画素との境界領域であるか否かによらず、直左画素(参照画素A)と注目画素Xとの差分値を予測誤差として符号化できる。この場合、画像処理装置2は、予測誤差に対応する符号を復号化する場合に、この符号の直前の符号が透明画素に対応する場合(参照画素Eに対応する符号である場合)に、上記デフォルト値と、予測誤差値とを合算することにより、注目画素Xの画素値を復号化し、この符号の直前の符号が非透明画素に対応する場合に、直左の画素値と、予測画素値とを合算することにより、注目画素Xの画素値を復号化する。
また、本符号化プログラム5は、予測誤差を算出する場合に、直近の非透明画素を参照して予測誤差を算出するようにしてもよい。この場合、注目画素Xと予測値とが近い値をとる可能性が高くなり、圧縮率で有利である。
FIG. 8 is a diagram for explaining processing for a boundary region between a transparent pixel and a non-transparent pixel. Note that the transparent pixel is a rectangular area represented as “transparent” in the figure, and is an area on which prediction has been made with reference to another layer (reference image). The code corresponding to the transparent pixel is information instructing to refer to another layer. In addition, the non-transparent pixel is a rectangular area represented as “colored” in the figure, and an area in which prediction (reference pixels A to D) in the same image is hit, or inter-layer prediction and intra-layer prediction. This is a region where none of them hit. The code | symbol of this non-transparent pixel becomes the information which instruct | indicates prediction within a layer, or the information which shows a prediction error.
As illustrated in FIG. 8, prediction error processing becomes a problem in a region where transparent pixels and non-transparent pixels are adjacent to each other. For example, at the target pixel X in this figure, neither intra-layer prediction (reference pixels A to D) nor inter-layer prediction (reference pixel E) hits, so a prediction error is calculated.
In order to be able to edit each layer independently, the calculation of the prediction error is preferably closed within the layer (target image). However, since the encoding program 5 in the present embodiment calculates the difference between the immediately left (reference pixel A) and the target pixel X as a prediction error, the target pixel X in FIG. The difference from the target pixel X is calculated.
Therefore, the encoding program 5 in the present embodiment performs exceptional processing in the calculation of the prediction error in the boundary region between the transparent pixel and the non-transparent pixel. For example, the encoding program 5 encodes the pixel value itself of the target pixel X in the boundary region between the transparent pixel and the non-transparent pixel. More specifically, the encoding program 5 encodes the pixel value of the target pixel X as it is when the immediately left pixel (reference pixel A) is a transparent pixel and the target pixel X is a non-transparent pixel. If the pixel immediately to the left (reference pixel A) is a non-transparent pixel and the target pixel X is a non-transparent pixel, the difference between the pixel values of the reference pixel A and the target pixel X is encoded as a prediction error. Turn into.
Further, the encoding program 5 may fill the transparent pixels with a predetermined pixel value (default value). As a result, the encoding program 5 encodes the difference value between the immediately left pixel (reference pixel A) and the target pixel X as a prediction error regardless of whether or not the boundary region is between the transparent pixel and the non-transparent pixel. it can. In this case, when the image processing apparatus 2 decodes the code corresponding to the prediction error, when the code immediately before this code corresponds to the transparent pixel (when the code corresponds to the reference pixel E), When the pixel value of the target pixel X is decoded by adding the default value and the prediction error value, and the code immediately before this code corresponds to a non-transparent pixel, the pixel value on the left and the predicted pixel value And the pixel value of the target pixel X is decoded.
The encoding program 5 may calculate the prediction error with reference to the nearest non-transparent pixel when calculating the prediction error. In this case, there is a high possibility that the target pixel X and the predicted value take close values, which is advantageous in terms of the compression rate.

以上説明したように、本実施形態における画像処理装置2は、符号化対象となるレイヤとは異なる他のレイヤを参照して予測符号化処理を行うことにより、レイヤ構造で管理された画像データを符号化することができる。   As described above, the image processing apparatus 2 according to the present embodiment performs the predictive coding process with reference to another layer different from the layer to be coded, thereby obtaining the image data managed in the layer structure. Can be encoded.

[変形例1]
次に、上記第1の実施形態の変形例を説明する。
図9は、第2の符号化プログラム52の機能構成を例示する図である。なお、本図における各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
図9に例示するように、第2の符号化プログラム52は、第1の層間予測部520を、透明画素値に基づいて予測データを生成する第2の層間予測部522に置換した構成をとる。
本変形例における第2の層間予測部522は、透明画素値として設定されている値を取得し、取得した透明画素値の値と、注目画素Xの画素値とを比較し、一致する場合に、層間予測部522に対応する予測部IDをラン計数部540に対して出力する。すなわち、層間予測部522は、予め設定されている透明画素値と、入力画像に含まれる注目画素Xの画素値とが一致する場合に、層間予測が的中したものと判定し、参照画像に対する参照を指示する参照情報(層間予測の予測部ID)を生成する。この場合にも、参照画像における参照画素の相対位置は、入力画像における注目画素Xの相対位置に対応する。
これにより、本変形例における符号化プログラム52は、参照画像を参照することなく、マスクレイヤ710の符号データを生成することができる。なお、画像処理装置2は、このように生成された符号データを復号化する場合には、符号データに応じて、参照画像を参照する。
[Modification 1]
Next, a modification of the first embodiment will be described.
FIG. 9 is a diagram illustrating a functional configuration of the second encoding program 52. It should be noted that among the components in this figure, the same reference numerals are given to the components that are substantially the same as those shown in FIG.
As illustrated in FIG. 9, the second encoding program 52 has a configuration in which the first interlayer prediction unit 520 is replaced with a second interlayer prediction unit 522 that generates prediction data based on transparent pixel values. .
The second interlayer prediction unit 522 in the present modification acquires a value set as the transparent pixel value, compares the acquired transparent pixel value with the pixel value of the target pixel X, and if they match, The prediction unit ID corresponding to the interlayer prediction unit 522 is output to the run counting unit 540. In other words, the interlayer prediction unit 522 determines that the interlayer prediction has been correct when the preset transparent pixel value matches the pixel value of the target pixel X included in the input image, and determines that the reference image is correct. Reference information for instructing reference is generated (prediction unit ID for inter-layer prediction). Also in this case, the relative position of the reference pixel in the reference image corresponds to the relative position of the target pixel X in the input image.
Thereby, the encoding program 52 in this modification can generate the code data of the mask layer 710 without referring to the reference image. Note that the image processing apparatus 2 refers to the reference image according to the code data when decoding the code data generated in this way.

また、画像処理装置2は、利用者の操作に応じて、参照画素を参照すべき領域を設定し、これに応じた符号データを生成してもよい。例えば、画像処理装置2は、ポインティングデバイスなどにより透明画素とすべき領域の指定を受け付け、指定された領域の画像データを、参照画像(他の画像)に対する参照を指示する符号データ(参照画素Eに対応する予測部ID及びその連続数)で置換してもよい。   In addition, the image processing apparatus 2 may set a region where reference pixels should be referred to in accordance with a user operation, and generate code data corresponding thereto. For example, the image processing apparatus 2 accepts designation of an area to be a transparent pixel by a pointing device or the like, and code data (reference pixel E) for instructing reference to a reference image (another image) as image data in the designated area. May be replaced by the prediction unit ID corresponding to the number of consecutive predictions).

[変形例2]
また、複数のフレーム画像からなる動画像に対しては、他のフレーム上に参照位置を設定することもできる。この場合の動画像は、例えばマルチマスク方式のフレーム画像により構成されている。
図10(A)は、マルチマスク方式のフレーム画像を例示し、図10(B)は、図10(A)に例示したフレーム画像に対する参照位置を説明する図である。
図11は、動画像の符号化に適用される第3の符号化プログラム54の機能構成を例示する図である。なお、本図における各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
[Modification 2]
In addition, for a moving image composed of a plurality of frame images, a reference position can be set on another frame. The moving image in this case is composed of, for example, a multi-mask type frame image.
FIG. 10A illustrates a multi-mask type frame image, and FIG. 10B illustrates a reference position with respect to the frame image illustrated in FIG.
FIG. 11 is a diagram illustrating a functional configuration of the third encoding program 54 applied to encoding of moving images. It should be noted that among the components in this figure, the same reference numerals are given to the components that are substantially the same as those shown in FIG.

図10(A)に例示するように、マルチマスク方式のフレーム画像は、それぞれマスクレイヤ710及びイメージレイヤ720を有する。本例では、マスクレイヤ710に、動くオブジェクト(画像要素)が割り当てられ、イメージレイヤ720に、背景となる静止オブジェクトが割り当てられている。したがって、前フレーム700におけるマスクレイヤ710と、現フレーム700’におけるマスクレイヤ710’とでは、オブジェクト(画像要素)の位置が異なる。
画像処理装置2は、このような現フレーム700’を符号化する場合に、現フレーム700’の他のレイヤ上と、前フレーム700のレイヤ上とに、参照位置を設定し予測符号化を行う。具体的には、画像処理装置2は、現フレーム700’のマスクレイヤ710’を符号化する場合に、図10(B)に例示するように、現フレーム700’上に複数の参照画素A〜Dを設定し、現フレーム700’のイメージレイヤ720上に参照画素E(層間予測に相当)を設定し、前フレーム700のマスクレイヤ710上に参照画素F(フレーム間予測に相当)を設定する。
また、画像処理装置2は、マスクレイヤ710に割り当てられたオブジェクトの移動方向及び移動量に応じて、参照画素Fの位置を移動させる。これにより、参照画素Fに基づく予測の的中率を向上させることができる。
As illustrated in FIG. 10A, a multi-mask type frame image has a mask layer 710 and an image layer 720, respectively. In this example, a moving object (image element) is assigned to the mask layer 710, and a still object as a background is assigned to the image layer 720. Therefore, the position of the object (image element) is different between the mask layer 710 in the previous frame 700 and the mask layer 710 ′ in the current frame 700 ′.
When encoding such a current frame 700 ′, the image processing apparatus 2 performs predictive encoding by setting reference positions on other layers of the current frame 700 ′ and on the layer of the previous frame 700. . Specifically, when the image processing apparatus 2 encodes the mask layer 710 ′ of the current frame 700 ′, as illustrated in FIG. 10B, the image processing apparatus 2 includes a plurality of reference pixels A˜ on the current frame 700 ′. D is set, a reference pixel E (corresponding to interlayer prediction) is set on the image layer 720 of the current frame 700 ′, and a reference pixel F (corresponding to interframe prediction) is set on the mask layer 710 of the previous frame 700. .
Further, the image processing apparatus 2 moves the position of the reference pixel F according to the moving direction and moving amount of the object assigned to the mask layer 710. As a result, the prediction accuracy based on the reference pixel F can be improved.

図11に例示するように、第3の符号化プログラム54は、第1の層間予測部520を複数(層間第1予測部520a及び層間第2予測部520b)配置した構成をとる。
符号化プログラム54において、層間第1予測部520aは、図10(B)に例示した参照画素Eの画素値を参照して、この参照画像の画素値を予測値とし、この予測値と注目画素(対象画像に含まれる画素)の画素値との比較結果をラン計数部540に対して出力する。
As illustrated in FIG. 11, the third encoding program 54 has a configuration in which a plurality of first interlayer prediction units 520 (interlayer first prediction unit 520a and interlayer second prediction unit 520b) are arranged.
In the encoding program 54, the interlayer first prediction unit 520a refers to the pixel value of the reference pixel E illustrated in FIG. 10B, sets the pixel value of the reference image as a predicted value, and uses the predicted value and the target pixel. The comparison result with the pixel value of (pixels included in the target image) is output to the run counter 540.

層間第2予測部520bは、図10(B)に例示した参照画素Fの画素値を参照して、この参照画像の画素値を予測値とし、この予測値と注目画素(対象画像に含まれる画素)の画素値との比較結果をラン計数部540に対して出力する。また、層間第2予測部520bは、オブジェクトの移動方向及び移動量に応じて、参照画素Fの位置を移動させる。   The interlayer second prediction unit 520b refers to the pixel value of the reference pixel F illustrated in FIG. 10B, sets the pixel value of the reference image as a predicted value, and uses the predicted value and the target pixel (included in the target image). The comparison result with the pixel value of pixel) is output to the run counter 540. Further, the interlayer second prediction unit 520b moves the position of the reference pixel F according to the moving direction and moving amount of the object.

これにより、第3の符号化プログラム54は、同一フレームにおける層間予測と、フレーム間予測とを用いて、マスクレイヤ710’を符号化するため、高い圧縮率を期待できる。   Thereby, since the 3rd encoding program 54 encodes the mask layer 710 'using the inter-layer prediction and inter-frame prediction in the same frame, it can anticipate a high compression rate.

[第2実施形態]
次に、第2の実施形態を説明する。レイヤ構造で画像データを管理する方法には、上記マルチマスク方式の他に、MRC(Mixed Raster Content)方式がある。MRC方式では、多値画像が割り当てられる2以上の画像レイヤと、これらの画像レイヤから画像領域毎に出力させる画像要素を選択する選択レイヤとで画像が構成される。
[Second Embodiment]
Next, a second embodiment will be described. As a method of managing image data with a layer structure, there is an MRC (Mixed Raster Content) method in addition to the multi-mask method. In the MRC method, an image is composed of two or more image layers to which a multi-valued image is assigned and a selection layer for selecting an image element to be output for each image region from these image layers.

図12は、MRC方式のレイヤ構造を説明する図である。
MRC方式の画像データは、画像を構成する画像要素が割り当てられる複数の画像レイヤと、出力させる画像要素を画像領域毎に選択する選択レイヤとで構成される。図12に示すように、本例の画像データ800は、画像レイヤとして前景レイヤ810及びイメージレイヤ820を有し、これらのレイヤから出力すべき画像要素を選択する選択レイヤ830をさらに有する。
本例の前景レイヤ810は、簡単なCG画像又は文字画像などの低階調画像が割り当てられている。なお、前景レイヤ810は、CG画像又は文字画像に含まれる複数の色情報及び中間調情報を有する。
本例のイメージレイヤ820は、前景レイヤ810よりも階調数が多い連続階調画像などが割り当てられる。
選択レイヤ830は、画像領域毎に(例えば画素毎に)前景レイヤ810及びイメージレイヤ820のいずれの画像要素を出力させるかを示す2値データで構成され、この2値データによりパターン像を構成している。本図における選択レイヤ830の黒色の部分は、前景レイヤ810の画像要素を選択するパターン像であり、白色の部分は、イメージレイヤ820の画像要素を選択するパターン像である。
表示画像850は、前景レイヤ810及びイメージレイヤ820に含まれる画像要素から、選択レイヤ830に含まれる2値パターンに応じて選択された画像要素を表示又は印刷等されたものである。
FIG. 12 is a diagram for explaining the layer structure of the MRC method.
The MRC image data is composed of a plurality of image layers to which image elements constituting an image are assigned, and a selection layer for selecting image elements to be output for each image area. As shown in FIG. 12, the image data 800 of this example includes a foreground layer 810 and an image layer 820 as image layers, and further includes a selection layer 830 for selecting an image element to be output from these layers.
The foreground layer 810 of this example is assigned a low gradation image such as a simple CG image or a character image. The foreground layer 810 has a plurality of color information and halftone information included in the CG image or character image.
The image layer 820 of this example is assigned a continuous tone image having a larger number of tones than the foreground layer 810.
The selection layer 830 is composed of binary data indicating which image element of the foreground layer 810 and the image layer 820 is output for each image region (for example, for each pixel), and a pattern image is configured by the binary data. ing. In the drawing, the black portion of the selection layer 830 is a pattern image for selecting an image element of the foreground layer 810, and the white portion is a pattern image for selecting an image element of the image layer 820.
The display image 850 is obtained by displaying or printing an image element selected from the image elements included in the foreground layer 810 and the image layer 820 according to the binary pattern included in the selection layer 830.

図12に例示された画像データ800を符号化する場合に、図11に例示した符号化プログラム54が適用可能である。すなわち、層間第1予測部520aは、前景レイヤ810(図12)を参照し、層間第2予測部520bは、イメージレイヤ820を参照する。この場合に、符号化プログラム54は、層間第1予測部520aによる予測結果、及び、層間第2予測部520bによる予測結果を、層内予測部510による予測結果よりも優先して適用し、これらの予測結果(予測部ID及びその連続数)を符号化することにより、選択レイヤ830の符号データを生成することができる。なお、この場合も、参照画像における参照画素の相対位置は、対象画像における注目画素の相対位置と対応し、例えば、対象画像の解像度と参照画像の解像度とが一致する場合には、同じ相対位置となる。すなわち、層間第1予測部520aにより参照される参照画素、及び、層間第2予測部520bにより参照される参照画素は、対象画像とこれらの参照画像とを重ね合わせた場合に、注目画素Xと重なり合う画素である。   When the image data 800 illustrated in FIG. 12 is encoded, the encoding program 54 illustrated in FIG. 11 can be applied. That is, the interlayer first prediction unit 520a refers to the foreground layer 810 (FIG. 12), and the interlayer second prediction unit 520b refers to the image layer 820. In this case, the encoding program 54 applies the prediction result by the interlayer first prediction unit 520a and the prediction result by the interlayer second prediction unit 520b in preference to the prediction result by the intra-layer prediction unit 510. By encoding the prediction result (prediction unit ID and its continuous number), code data of the selection layer 830 can be generated. In this case as well, the relative position of the reference pixel in the reference image corresponds to the relative position of the target pixel in the target image. For example, when the resolution of the target image matches the resolution of the reference image, the same relative position It becomes. That is, the reference pixel referred to by the interlayer first prediction unit 520a and the reference pixel referred to by the interlayer second prediction unit 520b are the pixel of interest X when the target image and these reference images are superimposed. Overlapping pixels.

以上説明したように、本実施形態における画像処理装置2は、複数の参照画像を参照して、入力画像を符号化することにより、選択レイヤ830(図10)の符号データを生成することができる。
ここで、本実施形態のように複数の参照画像を参照して符号化される場合には、生成される各レイヤの符号データは、ツリー的な関係となり、復号化する場合には、前景レイヤ810の符号データとイメージレイヤ820の符号データとの復号化順序は任意である。また、選択レイヤ830は、前景レイヤ810に割り当てられた画像要素、及び、イメージレイヤ820に割り当てられた画像要素のトリミング形状を保持する。そのため、選択レイヤ810及びイメージレイヤ820は、形状を持つ必要がなく、例えば、圧縮率が高くなるような模様又は色などで、割り当てられた画像要素の周囲を塗りつぶしてもよい。
As described above, the image processing apparatus 2 according to the present embodiment can generate code data of the selection layer 830 (FIG. 10) by encoding an input image with reference to a plurality of reference images. .
Here, when encoding is performed with reference to a plurality of reference images as in the present embodiment, the generated encoded data of each layer has a tree relationship, and when decoding, foreground layers are used. The decoding order of the code data of 810 and the code data of the image layer 820 is arbitrary. The selection layer 830 holds the image element assigned to the foreground layer 810 and the trimming shape of the image element assigned to the image layer 820. Therefore, the selection layer 810 and the image layer 820 do not need to have a shape, and may be filled around the assigned image element with, for example, a pattern or color that increases the compression rate.

[変形例1]
次に、第2の実施形態の第1の変形例を説明する。
図13は、第4の符号化プログラム56の機能構成を例示する図である。なお、本図における各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
図13に例示するように、第4の符号化プログラム56は、第1の層間予測部520を、選択レイヤ830(図12)の画像データに基づいて予測データを生成する第3の層間予測部524に置換した構成をとる。
本変形例における第3の層間予測部524は、選択レイヤ830の画像データ(ビットパターン)を取得し、取得した画像データに基づいて、いずれかの参照画像(図12における前景レイヤ810又はイメージレイヤ820)に対応する予測部IDをラン計数部540に対して出力する。例えば、図12に例示する画像データ800が入力された場合に、層間予測部524は、選択レイヤ830の黒色の領域(前景レイヤ810の選択を指示する2値パターンの領域)では、前景レイヤ810における参照画素の画素値が注目画素の画素値と一致したと判定し、前景レイヤ810の参照を指示する符号を符号生成部560に生成させ、選択レイヤ830の白色の領域(イメージレイヤ820の選択を指示する2値パターンの領域)では、イメージレイヤ820における参照画素の画素値が注目画素の画素値と一致したと判定し、イメージレイヤ820の参照を指示する符号を符号生成部560に生成させる。
これにより、本変形例における符号化プログラム56は、参照画像を参照することなく、選択レイヤ830の符号データを生成することができる。なお、画像処理装置2は、このように生成された符号データを復号化する場合には、符号データに応じて、参照画像(前景レイヤ810及びイメージレイヤ820)を参照する。
[Modification 1]
Next, a first modification of the second embodiment will be described.
FIG. 13 is a diagram illustrating a functional configuration of the fourth encoding program 56. It should be noted that among the components in this figure, the same reference numerals are given to the components that are substantially the same as those shown in FIG.
As illustrated in FIG. 13, the fourth encoding program 56 causes the first interlayer prediction unit 520 to generate a third interlayer prediction unit that generates prediction data based on the image data of the selected layer 830 (FIG. 12). The configuration replaced with 524 is adopted.
The third interlayer prediction unit 524 in this modification example acquires the image data (bit pattern) of the selected layer 830, and based on the acquired image data, any reference image (the foreground layer 810 or the image layer in FIG. 12). 820) is output to the run counter 540. For example, when the image data 800 illustrated in FIG. 12 is input, the interlayer prediction unit 524 causes the foreground layer 810 in the black region of the selection layer 830 (the region of the binary pattern instructing selection of the foreground layer 810). It is determined that the pixel value of the reference pixel matches the pixel value of the target pixel, and the code generation unit 560 is caused to generate a code instructing reference to the foreground layer 810, and the white region of the selection layer 830 (selection of the image layer 820) In the binary pattern area instructing the image layer 820, it is determined that the pixel value of the reference pixel in the image layer 820 matches the pixel value of the target pixel, and the code generation unit 560 generates a code instructing the reference of the image layer 820. .
Thereby, the encoding program 56 in the present modification can generate code data of the selection layer 830 without referring to the reference image. Note that the image processing apparatus 2 refers to the reference image (the foreground layer 810 and the image layer 820) according to the code data when decoding the code data generated in this way.

[変形例2]
また、上記のように、レイヤ毎に分割された画像データは、それぞれのレイヤに割り当てられた画像要素の性質に応じて、解像度変換がなされる場合がある。例えば、写真画像などは、文字画像又はCG画像などに比べて、エッジ量が少なく、解像度を低下させても画質劣化として目立ちにくい傾向にある。そこで、例えば、画像処理装置2は、図12に例示したMRC方式の画像データのうち、イメージレイヤ820の画像データの解像度を低下させて、符号量を低下させることができる。
[Modification 2]
In addition, as described above, the image data divided for each layer may be subjected to resolution conversion according to the properties of the image elements assigned to each layer. For example, a photographic image or the like has a smaller edge amount than a character image or a CG image, and tends to be inconspicuous as image quality deterioration even if the resolution is lowered. Therefore, for example, the image processing apparatus 2 can reduce the code amount by reducing the resolution of the image data of the image layer 820 in the MRC image data illustrated in FIG.

図14は、解像度が異なるレイヤの符号データを復号化する方法を説明する図であり、図14(A)は、レイヤ間で解像度が異なる画像データを例示し、図14(B)は、レイヤ間で解像度が異なる符号データを復号化する復号化プログラム6の機能構成を例示する図である。
図14(A)に例示するように、画像処理装置2は、MRC方式の画像データのうち、イメージレイヤの画像データを、他のレイヤ(前景レイヤ及び選択レイヤ)よりも低い解像度に変換することができる。本例のイメージレイヤは、他のレイヤに対して1/2の解像度に変換される。これにより、イメージレイヤの画像データは、主走査方向及び副走査方向にそれぞれ半分の画素数となる。
FIG. 14 is a diagram illustrating a method for decoding code data of layers having different resolutions. FIG. 14A illustrates image data having different resolutions between layers, and FIG. 14B illustrates layers. It is a figure which illustrates the function structure of the decoding program 6 which decodes the code data from which resolution differs between.
As illustrated in FIG. 14A, the image processing apparatus 2 converts image data of an image layer out of MRC image data to a resolution lower than that of other layers (foreground layer and selection layer). Can do. The image layer of this example is converted to 1/2 resolution with respect to other layers. As a result, the image layer image data has half the number of pixels in the main scanning direction and the sub-scanning direction.

図14(B)に例示するように、復号化プログラム6は、符号復号部610、層内抽出部620、誤差処理部630、座標変換部640、補間処理部650、層間抽出部660及び復号画像生成部670を有する。
復号化プログラム6において、符号復号部610は、図6(B)に例示したものと同様に、符号と予測部ID(参照位置)とを互いに対応付けるテーブルを有し、入力された符号データに基づいて、参照位置を特定する。また、符号復号部610は、入力された符号データに基づいて、予測部IDの連続数、及び、予測誤差などの数値も復号化する。
このように復号化された参照位置、連続数及び予測誤差は、層内抽出部620、誤差処理部630及び座標変換部640に入力される。
As illustrated in FIG. 14B, the decoding program 6 includes a code decoding unit 610, an intra-layer extraction unit 620, an error processing unit 630, a coordinate conversion unit 640, an interpolation processing unit 650, an interlayer extraction unit 660, and a decoded image. A generation unit 670 is included.
In the decoding program 6, the code decoding unit 610 has a table for associating codes and prediction unit IDs (reference positions) with each other, similar to the example illustrated in FIG. 6B, based on the input code data. To specify the reference position. The code decoding unit 610 also decodes the number of consecutive prediction unit IDs and numerical values such as prediction errors based on the input code data.
The reference position, the number of continuations, and the prediction error thus decoded are input to the in-layer extraction unit 620, the error processing unit 630, and the coordinate conversion unit 640.

層内抽出部620は、符号復号部610から入力された予測部IDが層内予測のいずれかに対応する場合(すなわち、参照画素A〜Dに対応する場合)に、対応する参照位置の画素を参照して、その画素の画素値を復号データとして復号画像生成部670に出力する。また、層内抽出部620は、この予測部IDと共に連続数が入力された場合には、予測部IDに対応する画素値に対応付けて、この連続数を復号画像生成部670に出力する。   The intra-layer extraction unit 620, when the prediction unit ID input from the code decoding unit 610 corresponds to any of intra-layer prediction (that is, corresponding to the reference pixels A to D), the pixel at the corresponding reference position The pixel value of the pixel is output to the decoded image generation unit 670 as decoded data. Further, when the continuous number is input together with the prediction unit ID, the in-layer extraction unit 620 outputs the continuous number to the decoded image generation unit 670 in association with the pixel value corresponding to the prediction unit ID.

誤差処理部630は、符号復号部610から予測誤差が入力された場合に、入力された予測誤差に対応する画素値を復号データとして復号画像生成部670に出力する。本例の誤差処理部630は、入力された予測誤差と、直左画素(参照画素Aに対応する位置)の画素値とを合算して復号データとする。なお、MRC方式で画像データが符号化された場合に、選択レイヤ830の符号は、必ず前景レイヤ810又はイメージレイヤ820のいずれかを参照する情報である。よって、誤差処理部630が予測誤差に基づいて復号データを生成するのは、前景レイヤ810又はイメージレイヤ820の符号データを復号化する場合である。   When a prediction error is input from the code decoding unit 610, the error processing unit 630 outputs a pixel value corresponding to the input prediction error to the decoded image generation unit 670 as decoded data. The error processing unit 630 of this example adds the input prediction error and the pixel value of the right-left pixel (position corresponding to the reference pixel A) to obtain decoded data. When image data is encoded by the MRC method, the code of the selection layer 830 is information that always refers to either the foreground layer 810 or the image layer 820. Therefore, the error processing unit 630 generates the decoded data based on the prediction error when the code data of the foreground layer 810 or the image layer 820 is decoded.

座標変換部640は、符号復号部610から入力された予測部IDが層間予測のいずれかに対応する場合(すなわち、前景レイヤ810又はイメージレイヤ820のいずれかの参照を指示する符号である場合)に、参照すべきレイヤの解像度と選択レイヤ830の解像度との相違に応じて、参照位置の座標変換を行い、座標変換がなされた参照位置と連続数とを補間処理部650に対して出力する。座標変換は、選択レイヤ830における注目画素の相対位置とイメージレイヤ820における参照画素の相対位置とが一致するようになされる。例えば、図14(A)に例示するように、解像度が1/2となったイメージレイヤ820が参照される場合に、座標変換部640は、注目画素Xの座標を1/2倍して、イメージレイヤ820における参照位置とする。
なお、最近傍法が適用される場合(すなわち、補間処理部650が設けられない形態である場合)、座標変換部640は、注目画素Xの座標を1/2倍した場合の整数部分をイメージレイヤ820における参照位置とする。また、参照すべきレイヤの解像度と選択レイヤ830の解像度とが同一である場合には、座標変換がなされない。
When the prediction unit ID input from the code decoding unit 610 corresponds to one of the inter-layer predictions (that is, when the code is an instruction to refer to either the foreground layer 810 or the image layer 820). In addition, coordinate conversion of the reference position is performed according to the difference between the resolution of the layer to be referred to and the resolution of the selection layer 830, and the reference position subjected to the coordinate conversion and the continuous number are output to the interpolation processing unit 650. . The coordinate conversion is performed so that the relative position of the target pixel in the selection layer 830 matches the relative position of the reference pixel in the image layer 820. For example, as illustrated in FIG. 14A, when an image layer 820 having a resolution of ½ is referred to, the coordinate conversion unit 640 halves the coordinate of the pixel of interest X, The reference position in the image layer 820 is used.
When the nearest neighbor method is applied (that is, when the interpolation processing unit 650 is not provided), the coordinate conversion unit 640 images the integer part when the coordinate of the pixel of interest X is halved. The reference position in the layer 820 is used. Further, when the resolution of the layer to be referred to and the resolution of the selection layer 830 are the same, coordinate conversion is not performed.

補間処理部650は、座標変換部640により座標変換がなされた参照位置と、参照位置の近傍にある近傍画素の画素値とに基づいて、イメージレイヤ820に対して補間処理を行う。補間処理は、例えば線形補間法又はキュービックコンボリューション法などである。
なお、補間処理部650が設けられない形態では、上記座標変換部640が座標変換を行うことにより、最近傍法による補間と同一の効果が得られる。
The interpolation processing unit 650 performs interpolation processing on the image layer 820 based on the reference position where the coordinate conversion is performed by the coordinate conversion unit 640 and the pixel values of neighboring pixels in the vicinity of the reference position. The interpolation process is, for example, a linear interpolation method or a cubic convolution method.
In the case where the interpolation processing unit 650 is not provided, the coordinate conversion unit 640 performs the coordinate conversion, thereby obtaining the same effect as the interpolation by the nearest neighbor method.

層間抽出部660は、符号復号部610から層間予測に対応する予測部ID及び連続数が入力された場合に、前景レイヤ810又はイメージレイヤ820の画素を参照して、その画素の画素値を抽出し、抽出された画素値と、入力された連続数とを復号画像生成部670に出力する。また、層間抽出部660は、解像度変換がなされたレイヤ(本例ではイメージレイヤ)が参照される場合には、座標変換部640により変換された参照位置に応じて、補間処理がなされた画素値を抽出する。   When the prediction unit ID and the continuous number corresponding to the interlayer prediction are input from the code decoding unit 610, the interlayer extraction unit 660 refers to the pixel of the foreground layer 810 or the image layer 820 and extracts the pixel value of the pixel The extracted pixel value and the input continuous number are output to the decoded image generation unit 670. In addition, when the resolution-converted layer (image layer in this example) is referred to, the interlayer extraction unit 660 performs pixel processing on which interpolation processing has been performed according to the reference position converted by the coordinate conversion unit 640. To extract.

復号画像生成部670は、層内抽出部620から入力された復号データ、誤差処理部630から入力された復号データ、及び、層間抽出部660から入力された復号データに基づいて、復号画像を生成する。より具体的には、復号画像生成部670は、層内抽出部620から復号データ(画素値及び連続数)が入力された場合に、入力された画素値の画素を連続数だけ連続して配置する。また、復号画像生成部670は、誤差処理部630から復号データ(予測誤差と直左画素値との合算値)が入力された場合に、この合算値の画素を配置する。また、復号画像生成部670は、層間抽出部660から復号データ(画素値及び連続数)が入力された場合に、入力された画素値の画素を連続数だけ連続して配置する。このように配置された画素群が復号画像となる。   The decoded image generation unit 670 generates a decoded image based on the decoded data input from the intra-layer extraction unit 620, the decoded data input from the error processing unit 630, and the decoded data input from the interlayer extraction unit 660. To do. More specifically, the decoded image generation unit 670 continuously arranges pixels having the input pixel value by the continuous number when the decoded data (pixel value and continuous number) is input from the in-layer extraction unit 620. To do. Further, when the decoded data (the sum of the prediction error and the immediately left pixel value) is input from the error processing unit 630, the decoded image generation unit 670 arranges the pixel having the sum. In addition, when the decoded data (pixel value and continuous number) is input from the interlayer extraction unit 660, the decoded image generation unit 670 continuously arranges pixels having the input pixel value by the continuous number. The pixel group arranged in this way becomes a decoded image.

このように、本例の復号化プログラム6は、復号画像の解像度と参照画像の解像度とが異なる場合に、座標変換処理及び補間処理により復号画像を生成し、復号画像の解像度と参照画像の解像度とが略同一である場合に、座標変換部640及び補間処理部650の機能を無効にして、復号画像を生成する。   As described above, when the resolution of the decoded image and the resolution of the reference image are different, the decoding program 6 of this example generates a decoded image by the coordinate conversion process and the interpolation process, and the resolution of the decoded image and the resolution of the reference image Are substantially the same, the functions of the coordinate conversion unit 640 and the interpolation processing unit 650 are disabled, and a decoded image is generated.

なお、画像処理装置2は、上記座標変換部640を応用することにより、特定のレイヤ(イメージレイヤ820)の画像データを、フリップ出力、回転出力又は繰り返し出力を行ってもよい。
図15は、レイヤ2の画像データを繰り返し出力する方法を説明する図であり、図15(A)は、繰り返し出力に用いられるレイヤ画像(レイヤ1及びレイヤ2)を例示し、図15(B)は、図15(A)に例示されたレイヤ2が繰り返し出力された復号画像を例示する。
図15(A)に例示するように、レイヤ1は、文字画像「シャボン玉」が割り当てられた前景レイヤ810であり、レイヤ2は、CG画像が割り当てられたイメージレイヤ820である。レイヤ2は、レイヤ1よりも解像度が低く、主走査方向の画素数がWであり、副走査方向の画素数がHである。
図14(B)に例示した座標変換部640は、選択レイヤ830(不図示)における注目画素の座標(x,y)をそれぞれ(W,H)で割った剰余を、参照位置とする。これにより、復号化プログラム6(図14(B))は、レイヤ2(図15(A))に割り当てられた画像要素を繰り返し参照することになり、図15(B)に例示するような復号画像を出力できる。
Note that the image processing apparatus 2 may perform flip output, rotation output, or repeated output of image data of a specific layer (image layer 820) by applying the coordinate conversion unit 640.
FIG. 15 is a diagram illustrating a method of repeatedly outputting image data of layer 2, and FIG. 15A illustrates layer images (layer 1 and layer 2) used for repeated output, and FIG. ) Illustrates a decoded image in which the layer 2 illustrated in FIG. 15A is repeatedly output.
As illustrated in FIG. 15A, layer 1 is a foreground layer 810 to which a character image “soap bubble” is assigned, and layer 2 is an image layer 820 to which a CG image is assigned. Layer 2 has a lower resolution than layer 1, the number of pixels in the main scanning direction is W, and the number of pixels in the sub-scanning direction is H.
The coordinate conversion unit 640 illustrated in FIG. 14B uses the remainder obtained by dividing the coordinates (x, y) of the pixel of interest in the selection layer 830 (not shown) by (W, H) as a reference position. As a result, the decoding program 6 (FIG. 14B) repeatedly refers to the image elements assigned to layer 2 (FIG. 15A), and the decoding as illustrated in FIG. 15B is performed. Images can be output.

[変形例3]
図16は、第5の符号化プログラム58の機能構成を例示する図である。なお、本図における各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
図16に例示するように、第5の符号化プログラム58は、層内予測部510及び層間予測部520の前段に、量子化部570が追加された構成をとる。
本変形例における量子化部570は、予測値提供部572及び画素値変更処理部574を含み、入力された画像データに基づいて量子化画像を生成し、層内予測部510、層間予測部520及び予測誤差算出部530に対して出力する。
具体的には、予測値提供部572が、参照画素(例えば、同一画像上の直左画素又は直上画素、あるいは、参照画像上の画素など)の画素値を画素値変更処理部574に対して出力し、画素値変更処理部574が、入力された参照画素の画素値と、注目画素の画素値とを比較して、その差分が既定の範囲内である場合に、この注目画素の画素値を参照画素の画素値で置換し、その差分が既定の範囲外である場合に、この注目画素の画素値をそのまま出力する。すなわち、量子化部570は、いずれかの参照画素A〜Eの画素値で、画素値が近似する注目画素Xを塗潰す。
これにより、本変形例における符号化プログラム58は、層内予測部510又は層間予測部520による予測の的中率を向上させ、圧縮率を向上させることができる。
[Modification 3]
FIG. 16 is a diagram illustrating a functional configuration of the fifth encoding program 58. It should be noted that among the components in this figure, the same reference numerals are given to the components that are substantially the same as those shown in FIG.
As illustrated in FIG. 16, the fifth encoding program 58 has a configuration in which a quantization unit 570 is added before the intra-layer prediction unit 510 and the interlayer prediction unit 520.
The quantization unit 570 in the present modification includes a predicted value providing unit 572 and a pixel value change processing unit 574, generates a quantized image based on the input image data, and generates an intra-layer prediction unit 510 and an interlayer prediction unit 520. And output to the prediction error calculation unit 530.
Specifically, the predicted value providing unit 572 sends the pixel value of the reference pixel (for example, the pixel immediately above or directly above the same image, or the pixel on the reference image) to the pixel value change processing unit 574. And the pixel value change processing unit 574 compares the input pixel value of the reference pixel with the pixel value of the target pixel, and if the difference is within a predetermined range, the pixel value of the target pixel Is replaced with the pixel value of the reference pixel, and when the difference is outside the predetermined range, the pixel value of the target pixel is output as it is. That is, the quantization unit 570 fills the pixel of interest X whose pixel value is approximate with the pixel values of any of the reference pixels A to E.
Thereby, the encoding program 58 in this modification can improve the prediction accuracy by the intra-layer prediction unit 510 or the interlayer prediction unit 520, and can improve the compression rate.

差分画像の生成を伴う符号化方式と、本実施形態における符号化方式との相違点を説明する図であり、(A)は、前フレームと現フレームとの差分画像を例示し、(B)は、本実施形態における予測データ生成の際に参照される参照位置を例示する。It is a figure explaining the difference with the encoding system accompanying the production | generation of a difference image, and the encoding system in this embodiment, (A) illustrates the difference image of a previous frame and the present frame, (B) Shows an example of a reference position that is referred to when predictive data is generated in the present embodiment. レイヤ構造(マルチマスク方式)で管理される画像データを例示する図である。It is a figure which illustrates the image data managed by a layer structure (multi-mask system). (A)は、立体形状の断面画像を例示する図であり、(B)は、本発明を適用して秘匿化処理が施された画像を例示する図である。(A) is a figure which illustrates the cross-sectional image of a solid shape, (B) is a figure which illustrates the image to which the concealment process was performed by applying this invention. 本発明にかかる符号化方法及び復号化方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。It is a figure which illustrates the hardware constitutions of the image processing apparatus 2 with which the encoding method and decoding method concerning this invention are applied centering on the control apparatus 20. FIG. 制御装置21(図4)により実行され、本発明にかかる符号化方法を実現する第1の符号化プログラム5の機能構成を例示する図である。It is a figure which illustrates the functional structure of the 1st encoding program 5 which is performed by the control apparatus 21 (FIG. 4), and implement | achieves the encoding method concerning this invention. 符号化プログラム5によりなされる符号化処理を説明する図であり、(A)は、層内予測部510及び層間予測部520により参照される画素の位置を例示し、(B)は、それぞれの参照画素に対応付けられた符号を例示し、(C)は、符号生成部560により生成される符号データを例示する図である。It is a figure explaining the encoding process performed by the encoding program 5, (A) illustrates the position of the pixel referred by the intra-layer prediction part 510 and the interlayer prediction part 520, (B) The code | symbol matched with the reference pixel is illustrated, (C) is a figure which illustrates the code | cord | chord data produced | generated by the code generation part 560. FIG. 符号化プログラム5(図5)により符号化されるレイヤ構造の画像データを例示する図であり、(A)は、CG画像が割り当てられたマスクレイヤ710aを符号化する場合を例示し、(B)は、文字画像が割り当てられたマスクレイヤ710bを符号化する場合を例示する。It is a figure which illustrates the image data of the layer structure encoded by the encoding program 5 (FIG. 5), (A) illustrates the case where the mask layer 710a to which the CG image was allocated is encoded, (B ) Illustrates a case where the mask layer 710b to which the character image is assigned is encoded. 透明画素と非透明画素との境界領域に対する処理を説明する図である。It is a figure explaining the process with respect to the boundary area | region of a transparent pixel and a non-transparent pixel. 第2の符号化プログラム52の機能構成を例示する図である。3 is a diagram illustrating a functional configuration of a second encoding program 52. FIG. (A)は、マルチマスク方式のフレーム画像を例示し、(B)は、(A)で例示したフレーム画像に対する参照位置を説明する図である。(A) illustrates a frame image of a multi-mask method, and (B) illustrates a reference position with respect to the frame image illustrated in (A). 動画像の符号化に適用される第3の符号化プログラム54の機能構成を例示する図である。It is a figure which illustrates the function structure of the 3rd encoding program 54 applied to encoding of a moving image. MRC方式のレイヤ構造を説明する図である。It is a figure explaining the layer structure of a MRC system. 第4の符号化プログラム56の機能構成を例示する図である。It is a figure which illustrates the function structure of the 4th encoding program. 解像度が異なるレイヤの符号データを復号化する方法を説明する図であり、(A)は、レイヤ間で解像度が異なる画像データを例示し、(B)は、レイヤ間で解像度が異なる符号データを復号化する復号化プログラム6の機能構成を例示する図である。It is a figure explaining the method to decode the code data of a layer from which resolution differs, (A) illustrates image data from which resolution differs between layers, (B) shows code data from which resolution differs between layers. It is a figure which illustrates the function structure of the decoding program 6 to decode. レイヤ2の画像データを繰り返し出力する方法を説明する図であり、(A)は、繰り返し出力に用いられるレイヤ画像(レイヤ1及びレイヤ2)を例示し、(B)は、(A)に例示されたレイヤ2が繰り返し出力された復号画像を例示する。It is a figure explaining the method to output repeatedly the image data of layer 2, (A) illustrates the layer image (Layer 1 and Layer 2) used for repeated output, (B) illustrates to (A) An example of a decoded image in which the layer 2 is repeatedly output is illustrated. 第5の符号化プログラム58の機能構成を例示する図である。It is a figure which illustrates the function structure of the 5th encoding program.

符号の説明Explanation of symbols

2・・・画像処理装置
5,52,54,56,58・・・符号化プログラム
510・・・層内予測部(層内第1予測部〜層内第4予測部)
520,522,524・・・層間予測部
530・・・予測誤差算出部
540・・・ラン計数部
550・・・選択部
560・・・符号生成部
6・・・復号化プログラム
610・・・符号復号部
620・・・層内抽出部
630・・・誤差処理部
640・・・座標変換部
650・・・補間処理部
660・・・層間抽出部
2 ... Image processing device 5, 52, 54, 56, 58 ... Coding program 510 ... Intra-layer prediction unit (first intra-layer prediction unit to fourth intra-layer prediction unit)
520, 522, 524 ... Interlayer prediction unit 530 ... Prediction error calculation unit 540 ... Run counting unit 550 ... Selection unit 560 ... Code generation unit 6 ... Decoding program 610 ... Code decoding unit 620 ... In-layer extraction unit 630 ... Error processing unit 640 ... Coordinate conversion unit 650 ... Interpolation processing unit 660 ... Interlayer extraction unit

Claims (1)

入力画像を構成するレイヤ画像である対象画像を符号化する符号化装置であって、
1つのレイヤ画像に含まれる注目画素の画素値を符号化する場合に、この注目画素に対応する他のレイヤ画像に含まれる画素の画素値に基づいて、第1の予測値を算出する第1の予測手段と、
この注目画素と同一のレイヤ画像に含まれる他の画素の画素値に基づいて、第2の予測値を算出する第2の予測手段と、
前記第1の予測値及び前記第2の予測値に基づいて、他のレイヤ画像に含まれる画素の位置を示す参照情報又は同一のレイヤ画像に含まれる他の画素の位置を示す参照情報を選択する選択手段と
を含む参照情報生成手段と、
注目画素の符号データとして、前記選択手段により選択された参照情報の符号データを生成する符号生成手段と
を有し、
前記入力画像を構成するレイヤ画像は、注目画素の画素値及び前記選択手段によって選択された参照情報によって位置が示される画素のうち他のレイヤ画像に含まれる画素の画素値が一致する領域である透明領域と、透明領域以外の領域である非透明領域とを含み、
前記符号生成手段は、前記透明領域及び前記非透明領域の境界において、注目画素及び同一のレイヤ画像に含まれる他の画素が前記透明領域及び前記非透明領域のいずれにあるかどうかに応じて、注目画素の画素値を注目画素の符号データとする
符号化装置。
An encoding device that encodes a target image that is a layer image constituting an input image,
When encoding the pixel value of the target pixel included in one layer image, the first prediction value is calculated based on the pixel value of the pixel included in another layer image corresponding to the target pixel. Prediction means,
Second prediction means for calculating a second predicted value based on pixel values of other pixels included in the same layer image as the target pixel;
Based on the first predicted value and the second predicted value, reference information indicating the position of a pixel included in another layer image or reference information indicating the position of another pixel included in the same layer image is selected. Reference information generating means including:
Code generating means for generating code data of reference information selected by the selecting means as code data of the pixel of interest;
The layer image constituting the input image is an area where the pixel value of the pixel of interest and the pixel value of the pixel included in the other layer image out of the pixels whose positions are indicated by the reference information selected by the selection unit Including a transparent region and a non-transparent region other than the transparent region,
The code generation means, depending on whether the pixel of interest and other pixels included in the same layer image are in the transparent region or the non-transparent region at the boundary between the transparent region and the non-transparent region, An encoding device that uses a pixel value of a target pixel as code data of the target pixel .
JP2004254083A 2004-09-01 2004-09-01 Encoding device, decoding device, encoding method, decoding method, and program thereof Expired - Fee Related JP4590986B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004254083A JP4590986B2 (en) 2004-09-01 2004-09-01 Encoding device, decoding device, encoding method, decoding method, and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004254083A JP4590986B2 (en) 2004-09-01 2004-09-01 Encoding device, decoding device, encoding method, decoding method, and program thereof

Publications (2)

Publication Number Publication Date
JP2006074336A JP2006074336A (en) 2006-03-16
JP4590986B2 true JP4590986B2 (en) 2010-12-01

Family

ID=36154485

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004254083A Expired - Fee Related JP4590986B2 (en) 2004-09-01 2004-09-01 Encoding device, decoding device, encoding method, decoding method, and program thereof

Country Status (1)

Country Link
JP (1) JP4590986B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008011408A (en) * 2006-06-30 2008-01-17 Ricoh Co Ltd Code converting apparatus, code decoding apparatus and program
CN109862365B (en) * 2019-01-30 2022-01-11 西安万像电子科技有限公司 Image data processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0622289A (en) * 1992-06-30 1994-01-28 Hitachi Ltd Multi-resolution image signal coder and decoder
JP2000078411A (en) * 1998-08-28 2000-03-14 Matsushita Electric Ind Co Ltd Device and method for reversible encoding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0622289A (en) * 1992-06-30 1994-01-28 Hitachi Ltd Multi-resolution image signal coder and decoder
JP2000078411A (en) * 1998-08-28 2000-03-14 Matsushita Electric Ind Co Ltd Device and method for reversible encoding

Also Published As

Publication number Publication date
JP2006074336A (en) 2006-03-16

Similar Documents

Publication Publication Date Title
US7415154B2 (en) Compression of palettized color images with variable length color codes
JP2005516554A6 (en) Compression of paletted color images using variable-length color codes
JPH1155664A (en) Binary shape signal encoding device
JP4154417B2 (en) Video data encoding device and video data decoding device
JP2006074339A (en) Encoder, decoder, encoding method, decoding method, and program for them
US20060045182A1 (en) Encoding device, decoding device, encoding method, decoding method, and program therefor
JP3466164B2 (en) Image encoding device, image decoding device, image encoding method, image decoding method, and medium
JP4590986B2 (en) Encoding device, decoding device, encoding method, decoding method, and program thereof
JP4584115B2 (en) Image encoding apparatus, image encoding method, image encoding program, and computer-readable recording medium recording the image encoding program
JP3491274B2 (en) Remote scan line coding method
CN104904199A (en) Method and apparatus for efficient coding of depth lookup table
WO2000018133A1 (en) Encoding device and method, and decoding device and method
Yeh et al. Scalable ideal-segmented chain coding
JP3929623B2 (en) Shape information encoding / decoding apparatus and method adaptively bordering according to video scanning method
KR100296339B1 (en) Video data coding method
KR100327482B1 (en) Image data encoding method
KR100495001B1 (en) Image compression encoding method and system
JP4192671B2 (en) Image processing apparatus and image processing method
US20090279796A1 (en) Method and apparatus for encoding and decoding image
Sahu et al. Hybrid Compression of Medical Images Based on Huffman and LPC For Telemedicine Application
JP4526069B2 (en) Image information arithmetic coding apparatus and image information arithmetic decoding apparatus
JP2000092333A (en) Image coding and decoding device
JPH1023406A (en) Bidirectional vertex predicting method
JP2007243512A (en) Image processor and image processing program
JP2000278536A (en) Multi-valued image data processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070816

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090417

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091029

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100514

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100709

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100830

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

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees