JP2007088687A - Image processing apparatus, image processing method and program thereof - Google Patents

Image processing apparatus, image processing method and program thereof Download PDF

Info

Publication number
JP2007088687A
JP2007088687A JP2005273459A JP2005273459A JP2007088687A JP 2007088687 A JP2007088687 A JP 2007088687A JP 2005273459 A JP2005273459 A JP 2005273459A JP 2005273459 A JP2005273459 A JP 2005273459A JP 2007088687 A JP2007088687 A JP 2007088687A
Authority
JP
Japan
Prior art keywords
representative color
image
reference information
color
representative
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.)
Pending
Application number
JP2005273459A
Other languages
Japanese (ja)
Inventor
Taro Yokose
太郎 横瀬
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
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 filed Critical Fuji Xerox Co Ltd
Priority to JP2005273459A priority Critical patent/JP2007088687A/en
Publication of JP2007088687A publication Critical patent/JP2007088687A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of obtaining a high compression rate by a comparatively light processing load. <P>SOLUTION: An image processing apparatus 2 divides an input image into image blocks of a predetermined size, and determines a plurality of representative colors for each of the image blocks. The apparatus 2 determines a combination of a unique representative color and a reference representative color so that the number of reference representative colors increases (e. g. variations of the unique representative colors increase) from among the representative colors determined by each of image blocks, and corrects the determined combination of the unique representative color and the reference representative color depending on a predetermined existing coding system. Correction in this case is performed so that the number of reference representative colors is not reduced. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像データを減色処理する画像処理装置に関する。   The present invention relates to an image processing apparatus that performs color reduction processing on image data.

例えば、特許文献1は、元画像に対して減色処理を行い、カラー情報とインデクスカラー画像を出力し、最上位以外のカラー情報とインデクスカラー画像を用いて色毎の二値画像を生成してMMR等の方法で圧縮処理する画像符号化装置を開示する。
特開2003−309727号公報
For example, Patent Document 1 performs a color reduction process on an original image, outputs color information and an index color image, and generates a binary image for each color using color information other than the highest level and the index color image. An image encoding apparatus that performs compression processing by a method such as MMR is disclosed.
JP 2003-309727 A

本発明は、上述した背景からなされたものであり、比較的軽い処理負荷で、高圧縮率を実現する画像処理装置を提供することを目的とする。   The present invention has been made from the above-described background, and an object thereof is to provide an image processing apparatus that achieves a high compression rate with a relatively light processing load.

[画像処理装置]
上記目的を達成するために、本発明にかかる画像処理装置は、既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得する画像データ取得手段と、前記画像データ取得手段により取得された画像データのうち、少なくとも一部の画像データに含まれる代表色及び参照情報の少なくとも一方を補正する補正手段と、前記補正手段により少なくとも一部が補正された画像データを符号化する符号化手段とを有する。
[Image processing device]
In order to achieve the above object, an image processing apparatus according to the present invention stores image data including a representative color of an image block of a predetermined size and reference information instructing reference to a representative color of another image block. An image data acquisition unit to be acquired; a correction unit that corrects at least one of representative colors and reference information included in at least a part of the image data acquired by the image data acquisition unit; and the correction unit. Coding means for coding image data corrected at least in part.

好適には、前記補正手段は、連続する複数の画像ブロックの代表色が同一の値になるように、一部の画像データを補正する。   Preferably, the correction unit corrects some image data so that representative colors of a plurality of consecutive image blocks have the same value.

また、本発明にかかる画像処理装置は、入力された画像データにおいて、既定サイズの画像ブロックを設定するブロック設定手段と、前記ブロック設定手段により設定された画像ブロックに含まれる色に基づいて、画像ブロック毎に既定数以下の代表色を決定する代表色決定手段と、前記代表色決定手段によりそれぞれの画像ブロックについて決定された代表色を用いて、減色された画像ブロックのデータを生成する減色手段と、複数の画像ブロックそれぞれについて決定された代表色を互いに比較して、代表色の参照先を指定する参照情報を生成する参照情報生成手段と、前記減色手段によりそれぞれの画像ブロックについて生成された代表色のうち、一部の代表色を、前記参照情報生成手段により生成された参照情報で置換する置換手段と、前記置換手段により一部の代表色が参照情報で置換された画像ブロックの他の代表色を符号化する符号化手段とを有し、前記参照情報生成手段は、前記符号化手段により生成される符号量が小さくなるように、前記参照情報を生成する。   The image processing apparatus according to the present invention includes a block setting unit that sets an image block of a predetermined size in input image data, and an image based on a color included in the image block set by the block setting unit. Representative color determining means for determining a predetermined number or less of representative colors for each block, and color reducing means for generating reduced color image block data using the representative colors determined for each image block by the representative color determining means And reference information generating means for comparing the representative colors determined for each of the plurality of image blocks with each other to generate reference information for designating a reference destination of the representative color, and the color reduction means for each image block. Replacement means for replacing a part of representative colors with reference information generated by the reference information generation means. Encoding means for encoding another representative color of an image block in which some representative colors are replaced by reference information by the replacement means, and the reference information generation means is generated by the encoding means The reference information is generated so that the amount of code to be generated is small.

好適には、前記参照情報生成手段は、処理対象である画像ブロックの代表色と、この画像ブロックの周囲にある画像ブロックの代表色とを比較して、参照情報を生成する周囲参照手段と、前記符号化手段によりなされる符号化方式に応じて、前記周囲参照手段により生成された参照情報を補正する参照情報補正手段とを含み、前記置換手段は、前記参照情報補正手段により補正された参照情報を用いて、置換処理を行う。   Preferably, the reference information generating unit compares the representative color of the image block to be processed with the representative color of the image block around the image block, and generates a reference information. Reference information correction means for correcting the reference information generated by the surrounding reference means in accordance with the encoding method made by the encoding means, and the replacement means is the reference corrected by the reference information correction means A replacement process is performed using the information.

好適には、前記符号化手段は、処理対象である画像ブロックの代表色と、この画像ブロックに対して既定の位置にある画像ブロックの代表色とを比較して、予測符号化処理により符号データを生成し、前記参照情報補正手段は、予測符号化処理における予測の的中率が向上するように、参照情報を補正する。   Preferably, the encoding unit compares the representative color of the image block to be processed with the representative color of the image block at a predetermined position with respect to the image block, and performs code data by predictive encoding processing. And the reference information correcting unit corrects the reference information so that the prediction accuracy in the predictive encoding process is improved.

好適には、前記参照情報補正手段は、処理対象である画像ブロックの代表色が他の画像ブロックから参照されていないことを条件として、参照情報の補正を行う。   Preferably, the reference information correction unit corrects the reference information on the condition that the representative color of the image block to be processed is not referred to by another image block.

[画像処理方法]
また、本発明にかかる画像処理方法は、既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得し、既定の符号化方式により生成される符号量が小さくなるように、取得された画像データのうち、少なくとも一部の画像データに含まれる代表色及び参照情報の少なくとも一方を補正し、少なくとも一部が補正された画像データを、前記符号化方式で符号化する。
[Image processing method]
The image processing method according to the present invention obtains image data including a representative color of an image block of a predetermined size and reference information instructing reference to a representative color of another image block, and a predetermined code At least one of the representative color and the reference information included in at least a part of the acquired image data is corrected, and at least a part of the acquired image data is corrected so that the code amount generated by the conversion method is reduced. Image data is encoded by the encoding method.

[プログラム]
また、本発明にかかるプログラムは、既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得するステップと、既定の符号化方式により生成される符号量が小さくなるように、取得された画像データのうち、少なくとも一部の画像データを補正するステップと、少なくとも一部が補正された画像データを、前記符号化方式で符号化するステップとをコンピュータに実行させる。
[program]
Further, the program according to the present invention includes a step of obtaining image data including a representative color of an image block of a predetermined size and reference information instructing reference to a representative color of another image block; The step of correcting at least a part of the acquired image data so that the amount of code generated by the encoding method is small, and the image data corrected at least partly by the encoding method And causing the computer to execute the encoding step.

本発明の画像処理装置によれば、比較的軽い処理負荷で、高圧縮率を実現することができる。   According to the image processing apparatus of the present invention, a high compression rate can be realized with a relatively light processing load.

まず、本発明の理解を助けるために、その背景を説明する。
画像データの符号量を小さくするために、減色処理が行われる場合がある。減色処理とは、画像データに含まれる複数の色を1つの色に縮退させることである。ここで、色とは、画素値の組合せを意味し、例えば、RGB画像におけるR値、G値及びB値の組合せ、又は、モノクロ画像における画素値を意味する。
例えば、減色処理では、入力された画像(入力画像)に含まれる色が複数のグループに分類され、分類されたグループ毎に代表色(それぞれのグループに属する色を置換するための色)を決定し、決定された代表色で、各グループに属する色が置換される。それぞれのグループには、互いに似た色が分類され、代表色は、各グループに属する色群に似たものであるため、代表色で置換された画像は、入力画像と近似したものとなる。
このように、入力画像に含まれる色を、既定数(グループの数)の代表色に縮退させることにより、圧縮効率が向上する。
First, the background will be described in order to help understanding of the present invention.
In order to reduce the code amount of the image data, a color reduction process may be performed. The color reduction processing is to reduce a plurality of colors included in the image data into one color. Here, the color means a combination of pixel values, for example, a combination of R value, G value and B value in an RGB image, or a pixel value in a monochrome image.
For example, in the color reduction process, colors included in an input image (input image) are classified into a plurality of groups, and a representative color (a color for replacing a color belonging to each group) is determined for each classified group. Then, the colors belonging to each group are replaced with the determined representative color. Since colors similar to each other are classified into each group, and the representative color is similar to the color group belonging to each group, the image replaced with the representative color is approximate to the input image.
Thus, the compression efficiency is improved by reducing the colors included in the input image to a predetermined number (the number of groups) of representative colors.

しかしながら、画像全体を勘案して、このような減色処理を行うと、処理負荷が大きくなる。例えば、代表色を決定するために、画像全体を記憶するための記憶領域が大きくなったり、代表色を決定するための演算量が膨大になったりする。
また、代表色が画像全体に基づいて決定されると、遠く離れた複数の色に基づいて、1つの代表色が決定されることになるため、画質劣化が顕在化しやすくなる。
However, if such a color reduction process is performed in consideration of the entire image, the processing load increases. For example, in order to determine the representative color, the storage area for storing the entire image becomes large, or the calculation amount for determining the representative color becomes enormous.
Further, when the representative color is determined based on the entire image, one representative color is determined based on a plurality of distant colors, so that image quality deterioration is likely to be manifested.

そこで、減色処理を局所的に行うことが、処理負荷及び画質の観点から望ましい。
図1は、局所的な減色処理の具体例を説明する図である。
図1(A)に例示するように、画像処理装置2は、入力画像を、既定サイズの画像ブロック(本例では、主走査方向に4画素、副走査方向に4画素の正方形ブロック)に分割し、各画像ブロックに含まれる色を複数のグループ(本例では、第1グループと、第2グループの2つ)に分類し、それぞれのグループに含まれる色に基づいて代表色を決定し、決定された代表色で、各グループに属する色を置換する。
本例では、第1の代表色は、第1グループに属する色の平均値であり、第2の代表色は、第2グループに属する色の平均値である。第1グループに属する色群は、第1の代表色で置換されるため、第1グループの色を有する画素は、第1の代表色で塗り潰される。また、第2グループに属する色群は、第2の代表色で置換されるため、第2グループの色を有する画素は、第2の代表色で塗り潰される。
このように、ブロック単位で減色処理を行うことにより、処理負荷が軽くなり、かつ、減色処理による画質劣化が顕在化しにくくなる。
Therefore, it is desirable to perform the color reduction processing locally from the viewpoint of processing load and image quality.
FIG. 1 is a diagram illustrating a specific example of local color reduction processing.
As illustrated in FIG. 1A, the image processing apparatus 2 divides the input image into image blocks of a predetermined size (in this example, square blocks of 4 pixels in the main scanning direction and 4 pixels in the sub scanning direction). Then, the colors included in each image block are classified into a plurality of groups (in this example, two of the first group and the second group), representative colors are determined based on the colors included in each group, The colors belonging to each group are replaced with the determined representative color.
In this example, the first representative color is an average value of colors belonging to the first group, and the second representative color is an average value of colors belonging to the second group. Since the color group belonging to the first group is replaced with the first representative color, the pixels having the color of the first group are filled with the first representative color. In addition, since the color group belonging to the second group is replaced with the second representative color, the pixels having the color of the second group are filled with the second representative color.
As described above, by performing the color reduction processing in units of blocks, the processing load is reduced, and image quality deterioration due to the color reduction processing is hardly realized.

このように、局所的な減色処理がなされた画像ブロックの画像データは、図1(B)に例示するように、複数の代表色の画素値と、代表色を指定するマスクとで表現可能になる。図1(B)に例示する画像データは、画像ブロックに含まれる16画素の画像データに相当する。
本例では、第1の代表色及び第2の代表色は、それぞれR値(8ビット)、G値(8ビット)及びB値(8ビット)を有するため、それぞれ、24ビットのデータとなる。
また、本例のマスクでは、「0」が第1の代表色を指定し、「1」が第2の代表色を指定する。本例のマスクが「0001・・・」となっているため、走査方向に最初の3画素が第1の代表色であり、走査方向3番目の画素が第2の代表色であることが示されている。
As described above, the image data of the image block subjected to the local color reduction processing can be expressed by the pixel values of a plurality of representative colors and a mask for designating the representative colors as illustrated in FIG. 1B. Become. The image data illustrated in FIG. 1B corresponds to 16-pixel image data included in an image block.
In this example, the first representative color and the second representative color each have an R value (8 bits), a G value (8 bits), and a B value (8 bits). .
In the mask of this example, “0” designates the first representative color and “1” designates the second representative color. Since the mask in this example is “0001...”, It indicates that the first three pixels in the scanning direction are the first representative color and the third pixel in the scanning direction is the second representative color. Has been.

また、画像の連続性を考慮すると、隣り合う画像ブロックの代表色の相関が高くなることが多い。この特性を利用して、処理対象である画像ブロック(以下、注目ブロックとよぶ)の複数の代表色のうち、所定数の代表色を、隣接する画像ブロック(以下、周囲ブロックとよぶ)の参照情報で置換する。すなわち、画像処理装置2は、注目ブロックに含まれる一部の代表色と、周囲ブロックの代表色との差分が基準値以下である場合に、注目ブロックの代表色を、この周囲ブロックへの参照を指示する参照情報で置換する。
例えば、注目ブロックの第1の代表色が、左側に隣接する周囲ブロックの代表色と近似する場合には、図1(C)に例示するように、第1の代表色(24ビット)を、参照情報(本例では、8つの周囲ブロックのいずれかを参照先とするため、3ビットで表現可能)で置換することができる。
なお、以下の説明において、参照情報で置換される代表色(本例では、第1の代表色)を参照代表色とよび、参照情報で置換されない代表色(本例では、第2の代表色)を固有代表色とよぶ。
In consideration of image continuity, the correlation between representative colors of adjacent image blocks often increases. Using this characteristic, among a plurality of representative colors of an image block to be processed (hereinafter referred to as a target block), a predetermined number of representative colors are referred to adjacent image blocks (hereinafter referred to as surrounding blocks). Replace with information. That is, when the difference between a part of representative colors included in the target block and the representative colors of the surrounding blocks is equal to or less than the reference value, the image processing apparatus 2 refers to the representative color of the target block with respect to the surrounding blocks. Replace with the reference information that indicates
For example, when the first representative color of the block of interest approximates the representative color of the surrounding block adjacent on the left side, the first representative color (24 bits) is set as illustrated in FIG. It can be replaced with reference information (in this example, any of the eight surrounding blocks can be represented by 3 bits because it is a reference destination).
In the following description, the representative color replaced with the reference information (in this example, the first representative color) is referred to as the reference representative color, and the representative color not replaced with the reference information (in this example, the second representative color). ) Is called a unique representative color.

代表色の参照先は、隣接する画像ブロックの固有代表色に限定することにより、減色処理の範囲を狭い範囲に制限することができる。また、代表色の一部を参照情報で置換することにより、データ量を小さくすることができる。   By limiting the reference destination of the representative color to the unique representative color of the adjacent image block, the range of the color reduction process can be limited to a narrow range. In addition, the data amount can be reduced by replacing a part of the representative color with the reference information.

このように、図1(C)に例示した構成(すなわち、参照情報、固有代表色及びマスクからなる構成)で画像データを表現することにより、データ量を小さくすることができるが、これを効率化し、かつ、画質劣化を抑えるには、連続する画像ブロックの固有代表色が、できるだけ異なる値となることが望ましい。
すなわち、連続する画像ブロックの固有代表色のバリエーションが増えると、注目ブロックの代表色との差分が置換基準以下となる周囲ブロックの存在確率が高くなる。また、周囲ブロックにある固有代表色のバリエーションが増えると、より近似する代表色の参照が可能になり、画質劣化が顕在化しにくくなる。
As described above, the amount of data can be reduced by expressing the image data with the configuration illustrated in FIG. 1C (that is, the configuration including the reference information, the unique representative color, and the mask). In order to reduce the image quality and suppress deterioration in image quality, it is desirable that the unique representative colors of consecutive image blocks have different values as much as possible.
That is, when the variation of the unique representative colors of consecutive image blocks increases, the presence probability of surrounding blocks whose difference from the representative color of the target block is not more than the replacement criterion increases. Further, when the variation of the unique representative colors in the surrounding blocks increases, it becomes possible to refer to the representative colors that are closer to each other, and the deterioration of the image quality is difficult to be realized.

しかしながら、図1(C)に例示した表現は、必ずしも一通りではない。すなわち、画像ブロックの複数の代表色のうち、いずれを参照代表色とし、いずれを固有代表色とするかは、複数の組合せがありうる。例えば、図1(B)に例示した代表色のうち、第2の代表色を参照情報で置換し、第1の代表色を固有代表色としてもよい。
また、固有代表色の圧縮効率を考えた場合には、固有代表色のバリエーションが増えるように、参照情報及び固有代表色を決定する方法が、常に最適であるとはいえない。
However, the expressions illustrated in FIG. 1C are not necessarily one way. That is, among the plurality of representative colors of the image block, which can be a reference representative color and which is a unique representative color can have a plurality of combinations. For example, among the representative colors illustrated in FIG. 1B, the second representative color may be replaced with the reference information, and the first representative color may be the unique representative color.
Further, when considering the compression efficiency of the unique representative color, the method of determining the reference information and the unique representative color so as to increase the variation of the unique representative color is not always optimal.

そこで、本実施形態における画像処理装置2は、既定の符号化方式で圧縮率が向上するように、各画像ブロックについて参照代表色及び固有代表色の組合せを決定し、決定された参照代表色を参照情報で置換し、決定された固有代表色を既定の符号化方式で符号化する。
より具体的には、画像処理装置2は、入力された画像データを既定サイズの画像ブロックに分割し、各画像ブロックについて複数の代表色を決定し、各画像ブロックについて決定された代表色の中から、参照代表色の数が増えるように(すなわち、固有代表色のバリエーションが増えるように)、固有代表色及び参照代表色の組合せを決定し、決定された固有代表色及び参照代表色の組合せを、既定の符号化方式に応じて補正する。この場合の補正は、参照代表色の数を減らさないようになされる。
これにより、固有代表色の圧縮効率が向上するため、画像データのデータサイズをより小さくすることができる。
Therefore, the image processing apparatus 2 according to the present embodiment determines a combination of the reference representative color and the unique representative color for each image block so that the compression rate is improved by a predetermined encoding method, and uses the determined reference representative color. Substituting with the reference information, the determined unique representative color is encoded by a predetermined encoding method.
More specifically, the image processing apparatus 2 divides input image data into image blocks of a predetermined size, determines a plurality of representative colors for each image block, and among the representative colors determined for each image block. From the above, the combination of the unique representative color and the reference representative color is determined so that the number of reference representative colors increases (that is, the variation of the unique representative color increases), and the determined combination of the unique representative color and the reference representative color is determined. Are corrected according to a predetermined encoding method. The correction in this case is made so as not to reduce the number of reference representative colors.
As a result, the compression efficiency of the unique representative color is improved, so that the data size of the image data can be further reduced.

[ハードウェア構成]
次に、本実施形態における画像処理装置2のハードウェア構成を説明する。
図2は、本発明にかかる画像処理方法が適応される画像処理装置2のハードウェア構成を、制御装置21を中心に例示する図である。
図2に例示するように、画像処理装置2は、CPU212及びメモリ214などを含む制御装置21、通信装置22、HDD・CD装置などの記録装置24、並びに、LCD表示装置あるいはCRT表示装置およびキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)25から構成される。
画像処理装置2は、例えば、プリンタ装置3の筐体内部に設けられ、本発明にかかる画像処理プログラム5(後述)がインストールされ、画像形成処理に用いられる画像データを処理する。
[Hardware configuration]
Next, a hardware configuration of the image processing apparatus 2 in the present embodiment will be described.
FIG. 2 is a diagram illustrating the hardware configuration of the image processing apparatus 2 to which the image processing method according to the present invention is applied, centering on the control apparatus 21.
As illustrated in FIG. 2, 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 provided, for example, inside the housing of the printer apparatus 3, and an image processing program 5 (described later) according to the present invention is installed to process image data used for image forming processing.

[画像処理プログラム]
図3は、制御装置21(図2)により実行され、本発明にかかる画像処理方法を実現する符号化プログラム5の機能構成を例示する図である。
図3に例示するように、符号化プログラム5は、データ取得部500、減色処理部510、参照置換部520、参照情報補正部530、及び符号化部540を有する。
なお、参照置換部520及び参照情報補正部530の組合せは、本発明にかかる参照情報生成手段及び置換手段の一例である。
[Image processing program]
FIG. 3 is a diagram illustrating a functional configuration of the encoding program 5 which is executed by the control device 21 (FIG. 2) and implements the image processing method according to the present invention.
As illustrated in FIG. 3, the encoding program 5 includes a data acquisition unit 500, a color reduction processing unit 510, a reference replacement unit 520, a reference information correction unit 530, and an encoding unit 540.
The combination of the reference substitution unit 520 and the reference information correction unit 530 is an example of the reference information generation unit and the substitution unit according to the present invention.

符号化プログラム5において、データ取得部500は、処理対象となる画像データを取得し、取得された画像データを減色処理部510又は参照情報補正部530に出力する。
本例のデータ取得部500は、図1(C)に例示する画像データ(すなわち、参照情報、固有代表色及びマスクからなる画像データ)を取得した場合には、取得された画像データを参照情報補正部530に出力し、その他の形式で表現された画像データを取得した場合には、減色処理部510に出力する。
In the encoding program 5, the data acquisition unit 500 acquires image data to be processed, and outputs the acquired image data to the color reduction processing unit 510 or the reference information correction unit 530.
When the data acquisition unit 500 of this example acquires the image data illustrated in FIG. 1C (that is, image data including reference information, a unique representative color, and a mask), the acquired image data is used as reference information. When output to the correction unit 530 and image data expressed in another format is acquired, the image data is output to the color reduction processing unit 510.

減色処理部510(減色手段)は、データ取得部500から入力された画像データに対して、局所的な減色処理を行う。
本例の減色処理部510は、入力された画像データを既定サイズの画像ブロックに分割し、分割された各画像ブロックについて、既定数の代表色を決定し、決定された代表色で各画像ブロックの画素を塗り潰す。
The color reduction processing unit 510 (color reduction means) performs local color reduction processing on the image data input from the data acquisition unit 500.
The color reduction processing unit 510 of this example divides the input image data into image blocks of a predetermined size, determines a predetermined number of representative colors for each of the divided image blocks, and each image block with the determined representative color Fill the pixels.

参照置換部520(周囲参照手段)は、減色処理部510により減色処理が施された画像データに基づいて、他の画像ブロックの代表色に対する参照を指示する参照情報を生成し、生成された参照情報で、代表色の一部(すなわち、参照代表色)を置換する。
本例の参照置換部520は、注目ブロックの代表色それぞれと、この注目ブロックの周囲にある周囲ブロックの代表色(固有代表色)とを比較して、差分が基準値以下となる代表色が存在する場合には、注目ブロックの代表色の一部を、この代表色との差分が基準値以下となる周囲ブロックの代表色への参照情報で置換する。参照置換部520により代表色の一部が参照情報で置換されると、図1(C)に例示する画像データが生成される。
また、本例の参照置換部520は、置換可能な参照情報が複数存在する場合には、周囲ブロックの固有代表色とできるだけ一致しない固有代表色を残すように、参照代表色を決定し、参照情報で置換する。
The reference replacement unit 520 (surrounding reference unit) generates reference information that indicates a reference to a representative color of another image block, based on the image data subjected to the color reduction processing by the color reduction processing unit 510, and the generated reference With information, a part of the representative color (that is, the reference representative color) is replaced.
In this example, the reference replacement unit 520 compares each representative color of the target block with the representative colors (specific representative colors) of the surrounding blocks around the target block, and the representative color whose difference is equal to or less than the reference value is determined. If it exists, a part of the representative color of the target block is replaced with reference information to the representative color of the surrounding block whose difference from the representative color is equal to or less than the reference value. When a part of the representative color is replaced with reference information by the reference replacement unit 520, image data illustrated in FIG. 1C is generated.
In addition, when there are a plurality of replaceable reference information, the reference replacement unit 520 of this example determines a reference representative color so as to leave a unique representative color that does not match the specific representative colors of surrounding blocks as much as possible, Replace with information.

参照情報補正部530(補正手段)は、代表色の一部が参照情報で置換された画像データ(すなわち、データ取得部500又は参照置換部520から入力された画像データ)に対して、符号化部540の符号化効率が向上するように、参照情報を補正する。参照情報の補正とは、参照先の変更、及び、参照元となる代表色(すなわち参照代表色)の変更の少なくとも一方を意味する。
本例では、予測符号化方式が適用されるため、参照情報補正部530は、隣接する画像ブロックの固有代表色と、注目ブロックの固有代表色とが一致するように、注目ブロックの参照代表色及び固有代表色を入替える。また、本例の参照情報補正部530は、画像データに含まれる参照情報の数を減少させないように、注目ブロックの固有代表色が他の画像ブロックから参照されている場合には、参照代表色と固有代表色との入替えを禁止する。
なお、本例では、予測符号化方式を適用する場合を具体例として説明するが、これに限定されるものではなく、例えば、JPEG方式が適用される場合には、参照情報補正部530は、固有代表色がなだらかに変化するように、参照情報を補正する。
The reference information correction unit 530 (correction unit) encodes image data in which a part of the representative color is replaced with the reference information (that is, image data input from the data acquisition unit 500 or the reference replacement unit 520). The reference information is corrected so that the coding efficiency of the unit 540 is improved. The correction of the reference information means at least one of a change of a reference destination and a change of a representative color (that is, a reference representative color) serving as a reference source.
In this example, since the predictive coding method is applied, the reference information correction unit 530 causes the reference representative color of the target block so that the unique representative color of the adjacent image block matches the unique representative color of the target block. And replace the unique representative color. In addition, the reference information correction unit 530 of the present example does not reduce the number of reference information included in the image data, and the reference representative color when the unique representative color of the target block is referenced from another image block. And replacement with unique representative colors are prohibited.
In this example, a case where the predictive coding scheme is applied will be described as a specific example. However, the present invention is not limited to this. For example, when the JPEG scheme is applied, the reference information correction unit 530 The reference information is corrected so that the unique representative color changes gently.

符号化部540は、参照情報補正部530により参照情報が補正された画像データを符号化する。
例えば、符号化部540は、画像データに含まれる参照情報、固有代表色及びマスクを、それぞれ別個に既定の符号化方式で符号化する。
本例の符号化部540は、予測符号化方式を用いて、固有代表色を符号化する。
The encoding unit 540 encodes the image data in which the reference information is corrected by the reference information correction unit 530.
For example, the encoding unit 540 separately encodes the reference information, the unique representative color, and the mask included in the image data using a predetermined encoding method.
The encoding unit 540 of this example encodes the unique representative color using a predictive encoding method.

図4(A)は、減色処理部510(図3)の構成を例示し、図4(B)は、参照情報補正部530(図3)の構成を例示する図である。
図4(A)に例示するように、減色処理部510は、ブロック抽出部512、代表値決定部514、及び減色部516を含む。
減色処理部510において、ブロック抽出部512(ブロック設定手段)は、入力された画像データから、既定サイズの画像ブロックを抽出し、抽出された画像ブロックを代表値決定部514に出力する。
本例の減色処理部510は、入力された画像データを、図1(A)に例示する4×4サイズの画像ブロックに分割する。
4A illustrates the configuration of the color reduction processing unit 510 (FIG. 3), and FIG. 4B illustrates the configuration of the reference information correction unit 530 (FIG. 3).
As illustrated in FIG. 4A, the color reduction processing unit 510 includes a block extraction unit 512, a representative value determination unit 514, and a color reduction unit 516.
In the color reduction processing unit 510, the block extraction unit 512 (block setting unit) extracts an image block having a predetermined size from the input image data, and outputs the extracted image block to the representative value determination unit 514.
The color reduction processing unit 510 of this example divides the input image data into 4 × 4 size image blocks illustrated in FIG.

代表値決定部514は、ブロック抽出部512により抽出された画像ブロックそれぞれについて、既定数の代表色を決定する。
本例の代表値決定部514は、図1(A)に例示するように、画像ブロックに含まれる色を、画素値に応じて2つのグループに分類し、各グループに属する色の平均画素値を代表色とする。
The representative value determining unit 514 determines a predetermined number of representative colors for each of the image blocks extracted by the block extracting unit 512.
As illustrated in FIG. 1A, the representative value determination unit 514 of this example classifies colors included in an image block into two groups according to pixel values, and average pixel values of colors belonging to each group. Is the representative color.

減色部516は、図1(A)に例示するように、画像ブロックに含まれる各画素の色を、この色の属するグループの代表色で置換する。   As illustrated in FIG. 1A, the color reduction unit 516 replaces the color of each pixel included in the image block with the representative color of the group to which this color belongs.

図4(B)に例示するように、参照情報補正部530は、候補検出部532、圧縮性判定部534、入替え禁止部536、及び入替え部538を含む。
参照情報補正部530において、候補検出部532は、注目ブロックの固有代表色と、周囲ブロックの固有代表色とを比較して、補正対象となりうる固有代表色を検出し、検出された固有代表色を圧縮性判定部534及び入替え禁止部536に出力する。
本例の候補検出部532は、注目ブロックの固有代表色と、この注目ブロックの周囲にある周囲ブロックの固有代表色との差分を算出し、差分が基準値以下である場合に、この注目ブロックの固有代表色を、入替え候補として検出する。
As illustrated in FIG. 4B, the reference information correction unit 530 includes a candidate detection unit 532, a compressibility determination unit 534, a replacement prohibition unit 536, and a replacement unit 538.
In the reference information correction unit 530, the candidate detection unit 532 detects the unique representative color that can be corrected by comparing the unique representative color of the block of interest with the unique representative color of the surrounding blocks, and detects the detected unique representative color. Is output to the compressibility determination unit 534 and the replacement prohibition unit 536.
The candidate detection unit 532 of this example calculates the difference between the unique representative color of the block of interest and the unique representative colors of surrounding blocks around the block of interest, and if the difference is equal to or less than the reference value, the block of interest Are detected as replacement candidates.

圧縮性判定部534は、候補検出部532により検出された固有代表色が参照代表色と入替えられた場合に、符号化部540による符号化処理の圧縮率が向上するか否かを判定し、圧縮率が向上する場合には、この入替え候補である固有代表色と参照代表色との入替えを許可し、圧縮率が向上しない場合には、この入替え候補の入替えを禁止する。
本例では、予測符号化方式が適用されるため、圧縮性判定部534は、固有代表色と参照代表色とが入替えられた場合に、予測符号化処理の予測的中率が向上するか否かを判定し、予測的中率が向上する場合にのみ、入替えを許可する。
なお、ランレングス符号化方式のように特定の参照位置(直前の画像ブロック)のみに着目する場合には、圧縮性判定部534は、入替え候補の固有代表色に対応する参照代表色が、直前の画像ブロック(本例では、左隣の画像ブロック)の固有代表色と一致するか否かを判定し、一致する場合に、この入替え候補の入替えを許可し、一致しない場合に、この入替え候補の入替えを禁止する。
The compressibility determination unit 534 determines whether or not the compression rate of the encoding process by the encoding unit 540 is improved when the unique representative color detected by the candidate detection unit 532 is replaced with the reference representative color. When the compression rate is improved, the replacement of the unique representative color that is the replacement candidate and the reference representative color is permitted. When the compression rate is not improved, the replacement of the replacement candidate is prohibited.
In this example, since the predictive coding method is applied, the compressibility determination unit 534 determines whether or not the predictive predictive ratio of the predictive coding process is improved when the unique representative color and the reference representative color are switched. The replacement is permitted only when the predictive predictive value improves.
When attention is paid only to a specific reference position (the immediately preceding image block) as in the run-length encoding method, the compressibility determination unit 534 determines that the reference representative color corresponding to the unique representative color of the replacement candidate is the immediately preceding reference color. It is determined whether or not it matches the unique representative color of the image block (in this example, the image block on the left on the left), and if it matches, this replacement candidate is allowed to be replaced. The replacement of is prohibited.

入替え禁止部536は、候補検出部532により検出された固有代表色が他の画像ブロックの参照代表色から参照されているか否かを判定し、参照されている場合には、入替え候補の入替えを禁止し、参照されていない場合には、この入替え候補の入替えを許可する。
すなわち、入替え禁止部536は、候補検出部532により検出された固有代表色が他の画像ブロックの参照代表色から参照されていないことを条件として、入替え候補である固有代表色と参照代表色との入替えを許可する。
The replacement prohibition unit 536 determines whether or not the unique representative color detected by the candidate detection unit 532 is referenced from the reference representative color of another image block. If the unique representative color is referenced, the replacement prohibition unit 536 replaces the replacement candidate. If it is prohibited and not referenced, this replacement candidate is allowed to be replaced.
In other words, the replacement prohibition unit 536 sets the unique representative color and the reference representative color that are replacement candidates on the condition that the unique representative color detected by the candidate detection unit 532 is not referenced from the reference representative color of another image block. Allow replacement of.

入替え部538は、圧縮判定部534及び入替え禁止部536により入替え候補の入替えが許可された場合に、入替え候補である固有代表色と参照代表色とを入れ替え、圧縮判定部534及び入替え禁止部536のいずれかにより入替えが禁止された場合に、入替えを行わない。
すなわち、入替え部538は、注目ブロックの固有代表色が周囲ブロックの固有代表色を参照可能であり、かつ、周囲圧縮判定部534及び入替え禁止部536により注目ブロックの固有代表色と参照代表色との入替えが許可された場合にのみ、注目ブロックの参照代表色を固有代表色とし、固有代表色を参照情報で置換する。
また、入替え部538は、固有代表色と参照代表色とを入れ替えた場合に、これらの固有代表色及び参照代表色を選択するマスクを反転させる。
When the replacement determination unit 534 and the replacement prohibition unit 536 permit replacement of replacement candidates, the replacement unit 538 replaces the unique representative color that is a replacement candidate and the reference representative color, and the compression determination unit 534 and replacement replacement unit 536. If replacement is prohibited by any of the above, replacement is not performed.
That is, the replacement unit 538 can refer to the unique representative color of the target block as the unique representative color of the target block. Only when the replacement is permitted, the reference representative color of the target block is set as the unique representative color, and the unique representative color is replaced with the reference information.
Further, when the unique representative color and the reference representative color are exchanged, the replacement unit 538 inverts the mask for selecting the unique representative color and the reference representative color.

図5は、参照情報補正部530(図4(B))による補正処理を説明する図であり、図5(A)は、補正前の参照関係を例示し、図5(B)は、補正後の参照関係を例示する。
また、図6は、入替え禁止部536(図4(B))により補正が禁止される場合を例示する図である。
なお、図5及び図6における「D1」〜「D8」それぞれは、各画像ブロックの代表色の値を示している。
図5(A)に例示するように、参照置換部520(図3)は、注目ブロックの代表色「D1」と、この注目ブロックの直前(左)にある周囲ブロック1の代表色「D1」とが一致しているため、注目ブロックの代表色「D1」を、周囲ブロック1への参照情報で置換する。これにより、注目ブロックの代表色「D2」が固有代表色となる。
図5(A)に例示する参照関係(補正前)では、周囲ブロック1の固有代表色「D1」と、注目ブロックの固有代表色「D2」とが一致しないため、ランレングス符号化方式などを適用する場合には、連続長が途切れて、圧縮効率が低下する。
FIG. 5 is a diagram for explaining the correction processing by the reference information correction unit 530 (FIG. 4B). FIG. 5A illustrates the reference relationship before correction, and FIG. The following reference relationship is illustrated.
FIG. 6 is a diagram illustrating a case where correction is prohibited by the replacement prohibition unit 536 (FIG. 4B).
Each of “D1” to “D8” in FIGS. 5 and 6 indicates the value of the representative color of each image block.
As illustrated in FIG. 5A, the reference replacement unit 520 (FIG. 3) displays the representative color “D1” of the target block and the representative color “D1” of the surrounding block 1 immediately before (on the left) of this target block. Therefore, the representative color “D1” of the block of interest is replaced with the reference information to the surrounding block 1. As a result, the representative color “D2” of the block of interest becomes the unique representative color.
In the reference relationship (before correction) illustrated in FIG. 5A, the unique representative color “D1” of the surrounding block 1 and the unique representative color “D2” of the target block do not match. When applied, the continuous length is interrupted and the compression efficiency is lowered.

ここで、注目ブロックの上にある周囲ブロック2を見ると、注目ブロックの固有代表色「D2」と、周囲ブロック2の固有代表色「D2」とが一致しているため、注目ブロックの固有代表色「D2」も参照可能な代表色(すなわち、入替え候補)である。そこで、候補検出部532は、この注目ブロックの固有代表色「D2」を入替え候補として検出する。
また、この注目ブロックの参照代表色「D1」は、周囲ブロック1の固有代表色「D1」と一致しているため、固有代表色となることにより、同一の固有代表色「D1」が連続することになる。つまり、注目ブロックの参照代表色「D1」を固有代表色とすることにより、ランレングス符号化方式などを適用した場合の符号量が小さくなる。そこで、圧縮性判定部534は、本例のように、入替え候補である注目ブロックの参照代表色「D1」を固有代表色に入れ替えると、圧縮率が向上する場合に、入替えを許可する。
また、入替え禁止部536は、注目ブロックの固有代表色「D1」が周囲ブロックから参照されていないか判定し、参照されていない場合に、入替えを許可する。
そして、入替え部538は、図5(A)に例示するように、注目ブロックの固有代表色「D2」が周囲ブロックの固有代表色と一致し、かつ、注目ブロックの参照代表色「D1」を固有代表色とすることにより圧縮効率が向上し、かつ、注目ブロックの固有代表色「D2」が周囲ブロックから参照されていない場合に、図5(B)に例示するように、注目ブロックの固有代表色と参照代表色とを入れ替える。
Here, when the surrounding block 2 above the block of interest is viewed, the unique representative color “D2” of the block of interest and the unique representative color “D2” of the surrounding block 2 match. The color “D2” is also a representative color (that is, a replacement candidate) that can be referred to. Accordingly, the candidate detection unit 532 detects the unique representative color “D2” of this block of interest as a replacement candidate.
In addition, since the reference representative color “D1” of the target block matches the unique representative color “D1” of the surrounding block 1, the same unique representative color “D1” continues by becoming a unique representative color. It will be. That is, by making the reference representative color “D1” of the block of interest the unique representative color, the code amount when the run-length encoding method or the like is applied becomes small. Thus, as in this example, the compressibility determination unit 534 permits replacement when the reference representative color “D1” of the target block that is a replacement candidate is replaced with a unique representative color, and the compression rate is improved.
Further, the replacement prohibition unit 536 determines whether the unique representative color “D1” of the block of interest is not referenced from the surrounding blocks, and permits replacement when it is not referenced.
Then, as illustrated in FIG. 5A, the replacement unit 538 matches the unique representative color “D2” of the target block with the unique representative color of the surrounding block, and sets the reference representative color “D1” of the target block. When the unique representative color is used, the compression efficiency is improved and the unique representative color “D2” of the target block is not referred to from the surrounding blocks, as illustrated in FIG. Swap the representative color and the reference representative color.

一方、図6(A)に例示するように、注目ブロックの固有代表色「D2」が、周囲ブロック3の参照代表色「D2」と一致して、この周囲ブロック3から参照されている場合には、図6(B)に例示するように、注目ブロックの固有代表色「D2」を参照代表色とし、注目ブロックの参照代表色「D1」を固有代表色とすると、周囲ブロック3からの参照が不可能になる。
そこで、入替え禁止部536(図4(B))は、注目ブロックの固有代表色「D2」が周囲ブロック3から参照されている場合には、注目ブロックにおける固有代表色と参照代表色との入替えを禁止する。
On the other hand, as illustrated in FIG. 6A, when the unique representative color “D2” of the target block matches the reference representative color “D2” of the surrounding block 3 and is referenced from the surrounding block 3. 6B, if the unique representative color “D2” of the target block is the reference representative color and the reference representative color “D1” of the target block is the unique representative color, the reference from the surrounding block 3 Becomes impossible.
Therefore, when the unique representative color “D2” of the target block is referenced from the surrounding block 3, the replacement prohibition unit 536 (FIG. 4B) replaces the specific representative color and the reference representative color in the target block. Is prohibited.

図7は、符号化部540(図3)の構成をより詳細に説明する図である。
図7に例示するように、符号化部540は、予測部542、予測誤差算出部544、ラン計数部546、選択部548、及び符号生成部550を含む。なお、以下の説明では、固有代表色を符号化する場合を説明するが、参照情報及びマスクを同様に符号化してもよい。
FIG. 7 is a diagram for explaining the configuration of the encoding unit 540 (FIG. 3) in more detail.
As illustrated in FIG. 7, the encoding unit 540 includes a prediction unit 542, a prediction error calculation unit 544, a run counting unit 546, a selection unit 548, and a code generation unit 550. In the following description, the case where the unique representative color is encoded will be described. However, the reference information and the mask may be encoded in the same manner.

予測部542は、注目ブロックの固有代表色を符号化する場合に、他の画像ブロックの固有代表色に基づいて、注目ブロックの予測データを生成し、生成された予測データと、注目ブロックの固有代表色とを比較して、比較結果をラン計数部546に出力する。
本例の予測部542は、注目ブロックの直前の周囲ブロック(図5に例示した周囲ブロック1)の固有代表色を予測データとし、この予測データと、注目ブロックの固有代表色とを比較して、固有代表色と予測データとが一致した場合(すなわち、予測が的中した場合)に、自己を識別する予測部IDをラン計数部546に対して出力し、これ以外の場合に、一致しなかった旨をラン計数部546に対して出力する。
なお、予測部542は、2種類以上であってもよく、例えば、注目ブロックの直上の周囲ブロック(図5の周囲ブロック2)の固有代表色を参照する予測部を追加してもよい。
When the unique representative color of the block of interest is encoded, the prediction unit 542 generates prediction data of the block of interest based on the unique representative color of another image block, and the generated prediction data and the unique block of the block of interest The representative color is compared, and the comparison result is output to the run counter 546.
The prediction unit 542 of this example uses the unique representative color of the surrounding block immediately before the target block (the peripheral block 1 illustrated in FIG. 5) as prediction data, and compares this prediction data with the specific representative color of the target block. When the unique representative color and the prediction data match (that is, when the prediction is correct), the prediction unit ID for identifying itself is output to the run counting unit 546, and in other cases, the prediction data matches. The fact that there was no output is output to the run counter 546.
Note that the prediction unit 542 may be two or more types, and for example, a prediction unit that refers to the unique representative color of the surrounding block immediately above the target block (the surrounding block 2 in FIG. 5) may be added.

予測誤差算出部544は、予め定められた予測方法で注目ブロックの固有代表色の予測データを生成し、生成された予測データと、この注目ブロックの固有代表色との差分を算出し、算出された差分を予測誤差として選択部548に出力する。
本例の予測誤差算出部544は、注目ブロックの直前の周囲ブロックの固有代表色を予測データとして、予測誤差値を算出する。
The prediction error calculation unit 544 generates prediction data of the unique representative color of the block of interest by a predetermined prediction method, calculates a difference between the generated prediction data and the unique representative color of the block of interest. The difference is output to the selection unit 548 as a prediction error.
The prediction error calculation unit 544 of this example calculates a prediction error value using the unique representative color of the surrounding block immediately before the target block as prediction data.

ラン計数部546は、予測部IDが連続する数をカウントし、予測部ID及びその連続数を選択部548に対して出力する。
本例のラン計数部548は、予測部542において予測データが注目ブロックの固有代表色と一致しなかった場合に、内部カウンタでカウントされている連続数を出力する。
The run counting unit 546 counts the number of consecutive prediction unit IDs, and outputs the prediction unit ID and the number of continuous predictions to the selection unit 548.
The run counting unit 548 of the present example outputs the number of continuations counted by the internal counter when the prediction unit 542 does not match the unique representative color of the block of interest.

選択部548は、ラン計数部546から連続数が入力されると、入力された連続数を符号生成部550に出力し、予測誤差算出部544から予測誤差値が入力されると、連続数を出力した後に、入力された予測誤差値を符号生成部550に出力する。   When the continuous number is input from the run counting unit 546, the selection unit 548 outputs the input continuous number to the code generation unit 550, and when the prediction error value is input from the prediction error calculation unit 544, the selection unit 548 calculates the continuous number. After the output, the input prediction error value is output to the code generation unit 550.

符号生成部550は、選択部548から入力された連続数及び予測誤差値を符号化し、通信装置22(図2)又は記録装置24(図2)などに出力する。
なお、符号生成部550は、連続数0が入力された場合に、この連続数を無視する。
The code generation unit 550 encodes the continuous number and the prediction error value input from the selection unit 548, and outputs them to the communication device 22 (FIG. 2) or the recording device 24 (FIG. 2).
The code generation unit 550 ignores this continuous number when the continuous number 0 is input.

図8は、画像処理プログラム5(図3)による符号化処理(S10)のフローチャートである。なお、本例では、減色処理などがなされていない画像データが入力される場合を具体例として説明する。
図8に示すように、ステップ100(S100)において、データ取得部500(図3)は、入力された画像データを減色処理部510に出力する。
FIG. 8 is a flowchart of the encoding process (S10) by the image processing program 5 (FIG. 3). In this example, a case where image data that has not undergone color reduction processing is input will be described as a specific example.
As shown in FIG. 8, in step 100 (S100), the data acquisition unit 500 (FIG. 3) outputs the input image data to the color reduction processing unit 510.

ステップ120(S120)において、減色処理部510は、データ取得部500から入力された画像データに対して、図1(A)に例示するように、局所的な減色処理を施し、減色処理が施された画像データを参照置換部520に出力する。
より具体的には、減色処理部510のブロック抽出部512(図4(A))は、入力された画像データを、4×4サイズの画像ブロックに分割し、代表値決定部514は、分割された画像ブロックそれぞれについて2つの代表色を決定し、減色部516は、決定された代表色で、画像ブロックに含まれる各画素の色を置換する。
In step 120 (S120), the color reduction processing unit 510 performs local color reduction processing on the image data input from the data acquisition unit 500, as illustrated in FIG. The processed image data is output to the reference replacement unit 520.
More specifically, the block extraction unit 512 (FIG. 4A) of the color reduction processing unit 510 divides the input image data into 4 × 4 size image blocks, and the representative value determination unit 514 Two representative colors are determined for each of the image blocks, and the color reduction unit 516 replaces the color of each pixel included in the image block with the determined representative colors.

ステップ140(S140)において、参照情報置換部520(図3)は、減色処理部510から入力された画像データに基づいて、周囲ブロックの代表色を参照するよう指示する参照情報を生成し、図1(C)に例示するように、生成された参照情報で、注目ブロックの一部の代表色(すなわち、参照代表色)を置換する。   In step 140 (S140), the reference information replacement unit 520 (FIG. 3) generates reference information for instructing to refer to the representative colors of the surrounding blocks based on the image data input from the color reduction processing unit 510. As illustrated in 1 (C), some representative colors (that is, reference representative colors) of the block of interest are replaced with the generated reference information.

ステップ160(S160)において、参照情報補正部530は、符号化部540の圧縮効率が向上するように、参照情報置換部520により生成された参照情報を補正し、少なくとも一部の参照情報が補正された画像データを符号化部540に出力する。   In step 160 (S160), the reference information correction unit 530 corrects the reference information generated by the reference information replacement unit 520 so that the compression efficiency of the encoding unit 540 is improved, and corrects at least part of the reference information. The processed image data is output to the encoding unit 540.

ステップ180(S180)において、符号化部540は、参照情報補正部530から入力された画像データ(各ブロックの固有代表色、参照情報及びマスク)をそれぞれ別個に符号化し、符号データを外部に出力する。   In step 180 (S180), the encoding unit 540 separately encodes the image data (inherent representative color of each block, reference information, and mask) input from the reference information correction unit 530, and outputs the code data to the outside. To do.

なお、本例では、参照情報置換部520により一部の代表色を参照情報で置換した後で、圧縮率が向上するように、参照情報の補正(すなわち、固有代表色と参照代表色との入替え)を行っているが、参照情報を生成し、圧縮率が向上するように、生成された参照情報を補正した後で、補正された参照情報で代表色の一部を置換するように構成してもよい。   In this example, after replacing some representative colors with reference information by the reference information replacing unit 520, the reference information is corrected (that is, the unique representative color and the reference representative color are corrected so that the compression rate is improved). However, after generating the reference information and correcting the generated reference information so that the compression rate is improved, a part of the representative color is replaced with the corrected reference information. May be.

図9は、図8に示した参照情報補正処理(S160)のフローチャートである。
図9に示すように、ステップ162(S162)において、参照情報補正部530(図3,図4)は、入力された画像データ(図1(C))の中から、順に注目ブロックの画像データを設定する。
FIG. 9 is a flowchart of the reference information correction process (S160) shown in FIG.
As shown in FIG. 9, in step 162 (S162), the reference information correction unit 530 (FIGS. 3 and 4) sequentially selects the image data of the target block from the input image data (FIG. 1C). Set.

ステップ164(S164)において、候補検出部532(図4(B))は、注目ブロックの固有代表色と、この注目ブロックの周囲にある周囲ブロックの固有代表色とを比較して、参照可能であるか否かを判定する。より具体的には、候補検出部532は、注目ブロックの固有代表色と、この注目ブロックの周囲にある周囲ブロックの固有代表色との差分を算出し、算出された差分が基準値以下である場合に、参照可能であると判定し、これ以外の場合に、参照不可能であると判定する。
参照情報補正部530は、候補検出部532により注目ブロックの固有代表色が周囲ブロックの固有代表色を参照可能であると判定された場合に、S166の処理に移行し、参照不可能であると判定された場合に、S172の処理に移行する。
In step 164 (S164), the candidate detecting unit 532 (FIG. 4B) can refer to the unique representative color of the block of interest by comparing the unique representative colors of the surrounding blocks around the block of interest. It is determined whether or not there is. More specifically, the candidate detection unit 532 calculates a difference between the unique representative color of the block of interest and the unique representative colors of surrounding blocks around the block of interest, and the calculated difference is equal to or less than the reference value. In this case, it is determined that reference is possible, and in other cases, it is determined that reference is impossible.
When the candidate detection unit 532 determines that the unique representative color of the target block can refer to the unique representative colors of the surrounding blocks, the reference information correction unit 530 proceeds to the process of S166 and cannot refer to it. If it is determined, the process proceeds to S172.

ステップ166(S166)において、圧縮性判定部534(図4(B))は、注目ブロックの参照代表色と固有代表色とが入れ替えられた場合に圧縮率が向上するか否かを判定する。本例では、直前の周囲ブロックの固有代表色と注目ブロックの固有代表色とが一致する場合に、予測が的中して圧縮率が向上するため、本例の圧縮性判定部534は、注目ブロックの参照代表色と、この注目ブロックの直前の周囲ブロックの固有代表色とが一致するか否かを判定し、一致する場合には、圧縮率が向上すると判定し、一致しない場合には、圧縮率が向上しないと判定する。
参照情報補正部530は、入替えにより圧縮率が向上すると圧縮性判定部534に判定された場合に、S168の処理に移行し、圧縮率が向上しないと判定された場合に、S172の処理に移行する。
In step 166 (S166), the compressibility determination unit 534 (FIG. 4B) determines whether or not the compression rate is improved when the reference representative color and the unique representative color of the block of interest are exchanged. In this example, when the unique representative color of the immediately preceding surrounding block matches the unique representative color of the block of interest, the prediction is correct and the compression rate is improved. Therefore, the compressibility determination unit 534 of this example It is determined whether or not the reference representative color of the block matches the unique representative color of the surrounding block immediately before this block of interest. If they match, it is determined that the compression ratio is improved. It is determined that the compression rate is not improved.
The reference information correction unit 530 proceeds to the processing of S168 when the compressibility determination unit 534 determines that the compression rate is improved by replacement, and proceeds to the processing of S172 when it is determined that the compression rate is not improved. To do.

ステップ168(S168)において、入替え禁止部536(図4(B))は、注目ブロックの固有代表色が周囲ブロックの代表色に参照されているか否かを判定する。
参照情報補正部530は、入替え禁止部536によりいずれの周囲ブロックからも参照されていないと判定された場合に、S170の処理に移行し、いずれかの周囲ブロックから参照されている場合に、S172の処理に移行する。
In step 168 (S168), the replacement prohibition unit 536 (FIG. 4B) determines whether or not the unique representative color of the block of interest is referenced by the representative colors of the surrounding blocks.
The reference information correction unit 530 proceeds to the process of S170 when the replacement prohibition unit 536 determines that no reference is made from any of the surrounding blocks, and when it is referenced from any of the surrounding blocks, the reference information correction unit 530 proceeds to S172. Move on to processing.

ステップ170(S170)において、入替え部538(図4(B))、注目ブロックの固有代表色を、周囲ブロックへの参照情報で置換し、この注目ブロックの参照情報に基づいて、参照代表色を特定し、特定された参照代表色を固有代表色とする。
なお、入替え部538は、注目ブロックの固有代表色と参照代表色とを入れ替えた場合に、マスクを反転させる。
In step 170 (S170), the replacement unit 538 (FIG. 4B) replaces the unique representative color of the block of interest with reference information to surrounding blocks, and sets the reference representative color based on the reference information of the block of interest. The identified reference representative color is specified as the unique representative color.
Note that the replacement unit 538 inverts the mask when the unique representative color and the reference representative color of the block of interest are replaced.

ステップ172(S172)において、参照情報補正部530は、全ての画像ブロックについて処理が終了したか否かを判定し、全ての画像ブロックについて処理が終了した場合に、参照情報補正処理を終了し、未処理の画像ブロックが存在する場合には、次の注目ブロックを設定して、S164の処理に戻る。   In step 172 (S172), the reference information correction unit 530 determines whether or not the processing has been completed for all the image blocks, and ends the reference information correction processing when the processing has been completed for all the image blocks. If there is an unprocessed image block, the next block of interest is set, and the process returns to S164.

なお、本図では、入替え候補を検出し、検出された入替え候補について、圧縮率が向上するか否か、及び、他の画像ブロックから参照されていないか否かを確認しているが、例えば、4ライン分のラインバッファを用意して、まず、注目ラインに属する画像ブロックの中から、周囲ブロックにより参照されている画像ブロックを除外し、その後で、注目ラインの中から、固有代表色が周囲ブロックの固有代表色と一致し、かつ、固有代表色と参照代表色とを入れ替えることにより圧縮率が向上する画像ブロックを検出し、検出された画像ブロックの入替えを行うように構成してもよい。   In this figure, replacement candidates are detected, and it is confirmed whether or not the compression rate is improved and whether the detected replacement candidates are not referenced from other image blocks. Prepare a line buffer for 4 lines. First, exclude the image block referenced by the surrounding blocks from the image blocks belonging to the line of interest, and then select the unique representative color from the line of interest. It is also possible to detect an image block that matches the unique representative color of the surrounding block and improves the compression ratio by exchanging the unique representative color and the reference representative color, and replace the detected image block. Good.

以上説明したように、本実施形態における画像処理装置2は、局所的な減色処理を行い、かつ、減色処理の結果を符号化方式に適合するように補正する。これにより、画像処理装置2は、比較的軽い処理負荷で、高圧縮率の符号データを生成することができる。また、減色処理による画質劣化も顕在化しにくい。   As described above, the image processing apparatus 2 according to the present embodiment performs local color reduction processing and corrects the result of color reduction processing so as to conform to the encoding method. Thereby, the image processing apparatus 2 can generate code data with a high compression rate with a relatively light processing load. In addition, image quality deterioration due to the color reduction process is hardly realized.

局所的な減色処理の具体例を説明する図である。It is a figure explaining the specific example of a local color reduction process. 本発明にかかる画像処理方法が適応される画像処理装置2のハードウェア構成を、制御装置21を中心に例示する図である。It is a figure which illustrates the hardware constitutions of the image processing apparatus 2 with which the image processing method concerning this invention is applied centering on the control apparatus 21. FIG. 制御装置21(図2)により実行され、本発明にかかる画像処理方法を実現する符号化プログラム5の機能構成を例示する図である。It is a figure which illustrates the functional structure of the encoding program 5 which is performed by the control apparatus 21 (FIG. 2) and implement | achieves the image processing method concerning this invention. (A)は、減色処理部510(図3)の構成を例示し、(B)は、参照情報補正部530(図3)の構成を例示する図である。(A) illustrates the configuration of the color reduction processing unit 510 (FIG. 3), and (B) illustrates the configuration of the reference information correction unit 530 (FIG. 3). 参照情報補正部530(図4(B))による補正処理を説明する図であり、図5(A)は、補正前の参照関係を例示し、図5(B)は、補正後の参照関係を例示する。FIGS. 5A and 5B are diagrams illustrating correction processing by the reference information correction unit 530 (FIG. 4B). FIG. 5A illustrates a reference relationship before correction, and FIG. 5B illustrates a reference relationship after correction. Is illustrated. 入替え禁止部536(図4(B))により補正が禁止される場合を例示する図である。It is a figure which illustrates the case where correction | amendment is prohibited by the replacement prohibition part 536 (FIG.4 (B)). 符号化部540(図3)の構成をより詳細に説明する図である。It is a figure explaining the structure of the encoding part 540 (FIG. 3) in detail. 画像処理プログラム5(図3)による符号化処理(S10)のフローチャートである。It is a flowchart of the encoding process (S10) by the image processing program 5 (FIG. 3). 図8に示した参照情報補正処理(S160)のフローチャートである。It is a flowchart of the reference information correction process (S160) shown in FIG.

符号の説明Explanation of symbols

2・・・画像処理装置
5・・・符号化プログラム
500・・・データ取得部
510・・・減色処理部
512・・・ブロック抽出部
514・・・代表値決定部
516・・・減色部
520・・・参照置換部
530・・・参照情報補正部
532・・・候補検出部
534・・・圧縮性判定部
536・・・入替え禁止部
538・・・入替え部
540・・・符号化部
DESCRIPTION OF SYMBOLS 2 ... Image processing apparatus 5 ... Encoding program 500 ... Data acquisition part 510 ... Color reduction process part 512 ... Block extraction part 514 ... Representative value determination part 516 ... Color reduction part 520 Reference replacement unit 530 Reference information correction unit 532 Candidate detection unit 534 Compressibility determination unit 536 Replacement prohibiting unit 538 Replacement unit 540 Encoding unit

Claims (8)

既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得する画像データ取得手段と、
前記画像データ取得手段により取得された画像データのうち、少なくとも一部の画像データに含まれる代表色及び参照情報の少なくとも一方を補正する補正手段と、
前記補正手段により少なくとも一部が補正された画像データを符号化する符号化手段と
を有する画像処理装置。
Image data acquisition means for acquiring image data including a representative color of an image block of a predetermined size and reference information instructing reference to a representative color of another image block;
Correction means for correcting at least one of the representative color and the reference information included in at least a part of the image data acquired by the image data acquisition means;
An image processing apparatus comprising: encoding means for encoding image data at least partially corrected by the correction means.
前記補正手段は、連続する複数の画像ブロックの代表色が同一の値になるように、一部の画像データを補正する
請求項2に記載の画像処理装置。
The image processing apparatus according to claim 2, wherein the correction unit corrects some image data so that representative colors of a plurality of continuous image blocks have the same value.
入力された画像データにおいて、既定サイズの画像ブロックを設定するブロック設定手段と、
前記ブロック設定手段により設定された画像ブロックに含まれる色に基づいて、画像ブロック毎に既定数以下の代表色を決定する代表色決定手段と、
前記代表色決定手段によりそれぞれの画像ブロックについて決定された代表色を用いて、減色された画像ブロックのデータを生成する減色手段と、
複数の画像ブロックそれぞれについて決定された代表色を互いに比較して、代表色の参照先を指定する参照情報を生成する参照情報生成手段と、
前記減色手段によりそれぞれの画像ブロックについて生成された代表色のうち、一部の代表色を、前記参照情報生成手段により生成された参照情報で置換する置換手段と、
前記置換手段により一部の代表色が参照情報で置換された画像ブロックの他の代表色を符号化する符号化手段と
を有し、
前記参照情報生成手段は、前記符号化手段により生成される符号量が小さくなるように、前記参照情報を生成する
画像処理装置。
Block setting means for setting an image block of a predetermined size in the input image data;
Representative color determining means for determining a predetermined number of representative colors or less for each image block based on the color included in the image block set by the block setting means;
Color reduction means for generating data of reduced image blocks using the representative color determined for each image block by the representative color determination means;
Reference information generating means for comparing the representative colors determined for each of the plurality of image blocks with each other and generating reference information for specifying a reference destination of the representative color;
Substitution means for replacing some representative colors among the representative colors generated for each image block by the color reduction means with reference information generated by the reference information generation means,
Encoding means for encoding other representative colors of the image block in which some representative colors are replaced with reference information by the replacement means, and
The image processing apparatus, wherein the reference information generation unit generates the reference information so that a code amount generated by the encoding unit is small.
前記参照情報生成手段は、
処理対象である画像ブロックの代表色と、この画像ブロックの周囲にある画像ブロックの代表色とを比較して、参照情報を生成する周囲参照手段と、
前記符号化手段によりなされる符号化方式に応じて、前記周囲参照手段により生成された参照情報を補正する参照情報補正手段と
を含み、
前記置換手段は、前記参照情報補正手段により補正された参照情報を用いて、置換処理を行う
請求項3に記載の画像処理装置。
The reference information generating means includes
A surrounding reference means for generating reference information by comparing a representative color of an image block to be processed with a representative color of an image block around the image block;
Reference information correction means for correcting the reference information generated by the surrounding reference means in accordance with the encoding method performed by the encoding means, and
The image processing apparatus according to claim 3, wherein the replacement unit performs a replacement process using the reference information corrected by the reference information correction unit.
前記符号化手段は、処理対象である画像ブロックの代表色と、この画像ブロックに対して既定の位置にある画像ブロックの代表色とを比較して、予測符号化処理により符号データを生成し、
前記参照情報補正手段は、予測符号化処理における予測の的中率が向上するように、参照情報を補正する
請求項4に記載の画像処理装置。
The encoding means compares the representative color of the image block to be processed with the representative color of the image block at a predetermined position with respect to the image block, and generates code data by predictive encoding processing,
The image processing apparatus according to claim 4, wherein the reference information correction unit corrects the reference information so that a prediction accuracy in the predictive encoding process is improved.
前記参照情報補正手段は、処理対象である画像ブロックの代表色が他の画像ブロックから参照されていないことを条件として、参照情報の補正を行う
請求項4又は5に記載の画像処理装置。
The image processing apparatus according to claim 4, wherein the reference information correction unit corrects the reference information on the condition that a representative color of the image block to be processed is not referenced from another image block.
既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得し、
既定の符号化方式により生成される符号量が小さくなるように、取得された画像データのうち、少なくとも一部の画像データに含まれる代表色及び参照情報の少なくとも一方を補正し、
少なくとも一部が補正された画像データを、前記符号化方式で符号化する
画像処理方法。
Obtain image data including the representative color of the image block of the default size and the reference information instructing reference to the representative color of another image block,
Correcting at least one of the representative color and the reference information included in at least some of the acquired image data so that the amount of code generated by a predetermined encoding method is small;
An image processing method for encoding image data, at least a part of which is corrected, by the encoding method.
既定サイズの画像ブロックの代表色と、他の画像ブロックの代表色への参照を指示する参照情報とが含まれた画像データを取得するステップと、
既定の符号化方式により生成される符号量が小さくなるように、取得された画像データのうち、少なくとも一部の画像データを補正するステップと、
少なくとも一部が補正された画像データを、前記符号化方式で符号化するステップと
をコンピュータに実行させるプログラム。
Obtaining image data including a representative color of an image block of a predetermined size and reference information instructing reference to a representative color of another image block;
Correcting at least some of the acquired image data so that the amount of code generated by a predetermined encoding method is small; and
A program for causing a computer to execute a step of encoding image data, at least a part of which has been corrected, by the encoding method.
JP2005273459A 2005-09-21 2005-09-21 Image processing apparatus, image processing method and program thereof Pending JP2007088687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005273459A JP2007088687A (en) 2005-09-21 2005-09-21 Image processing apparatus, image processing method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005273459A JP2007088687A (en) 2005-09-21 2005-09-21 Image processing apparatus, image processing method and program thereof

Publications (1)

Publication Number Publication Date
JP2007088687A true JP2007088687A (en) 2007-04-05

Family

ID=37975247

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005273459A Pending JP2007088687A (en) 2005-09-21 2005-09-21 Image processing apparatus, image processing method and program thereof

Country Status (1)

Country Link
JP (1) JP2007088687A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010232953A (en) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd Image processing apparatus, and image processing program
JP2010277413A (en) * 2009-05-29 2010-12-09 Tani Electronics Corp Two-dimensional color code of image picked up by camera, generation method thereof, display method, and using method
JP2012015970A (en) * 2010-07-05 2012-01-19 Konica Minolta Business Technologies Inc Image processing device and image processing method
JP2012134807A (en) * 2010-12-22 2012-07-12 Konica Minolta Business Technologies Inc Image processing device, and image processing method
JP2012238244A (en) * 2011-05-12 2012-12-06 Fuji Heavy Ind Ltd Environment recognition device and environment recognition method
JP2014033419A (en) * 2012-08-06 2014-02-20 Konica Minolta Inc Image processing apparatus and image processing method
JP2015029242A (en) * 2013-06-28 2015-02-12 京セラドキュメントソリューションズ株式会社 Image processing system
WO2015136693A1 (en) * 2014-03-14 2015-09-17 富士通株式会社 Image encoding apparatus, image decoding apparatus, image encoding method, and image decoding method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010232953A (en) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd Image processing apparatus, and image processing program
JP4662189B2 (en) * 2009-03-27 2011-03-30 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP2010277413A (en) * 2009-05-29 2010-12-09 Tani Electronics Corp Two-dimensional color code of image picked up by camera, generation method thereof, display method, and using method
JP2012015970A (en) * 2010-07-05 2012-01-19 Konica Minolta Business Technologies Inc Image processing device and image processing method
JP2012134807A (en) * 2010-12-22 2012-07-12 Konica Minolta Business Technologies Inc Image processing device, and image processing method
JP2012238244A (en) * 2011-05-12 2012-12-06 Fuji Heavy Ind Ltd Environment recognition device and environment recognition method
US9792519B2 (en) 2011-05-12 2017-10-17 Subaru Corporation Environment recognition device and environment recognition method
JP2014033419A (en) * 2012-08-06 2014-02-20 Konica Minolta Inc Image processing apparatus and image processing method
JP2015029242A (en) * 2013-06-28 2015-02-12 京セラドキュメントソリューションズ株式会社 Image processing system
WO2015136693A1 (en) * 2014-03-14 2015-09-17 富士通株式会社 Image encoding apparatus, image decoding apparatus, image encoding method, and image decoding method
JPWO2015136693A1 (en) * 2014-03-14 2017-04-06 富士通株式会社 Image encoding device, image decoding device, image encoding method, and image decoding method
US10116962B2 (en) 2014-03-14 2018-10-30 Fujitsu Limited Image coding device, image decoding device, image coding method and image decoding method

Similar Documents

Publication Publication Date Title
JP5132517B2 (en) Image processing apparatus and image processing method
JP2007088687A (en) Image processing apparatus, image processing method and program thereof
JP4418762B2 (en) Image encoding apparatus, image decoding apparatus, control method thereof, computer program, and computer-readable storage medium
US7689048B2 (en) Image encoding apparatus, method, and computer-readable storage medium for encoding a pixel value
JP4979323B2 (en) Image processing apparatus and control method thereof
AU715514B2 (en) Method and apparatus for encoding and decoding an image
JP2008042688A (en) Image processing apparatus and control method thereof, and computer program and computer readable storage medium
JP4777185B2 (en) Image processing apparatus and control method thereof, computer program, computer-readable storage medium, and image encoding apparatus
US8244033B2 (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP5049921B2 (en) Image processing apparatus and image processing method
JP4260781B2 (en) Information embedding device, information embedding method, and information embedding program
JP4687900B2 (en) Image processing apparatus and program.
US10477219B2 (en) Image-processing apparatus and lossless image compression method using intra-frame prediction
JP6693310B2 (en) Image processing apparatus, image processing method and program
JP5506588B2 (en) Image processing method and image processing apparatus using digital watermark
JP2003244696A (en) Encoding processor, decoding processor, method therefor and computer program
JP4766230B2 (en) Encoding device, data processing device, decoding device, and program
JP2008109478A (en) Image encoding device, method, program and storage medium
JP4324079B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP4748805B2 (en) Image coding apparatus and control method thereof
JP4418736B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2007049594A (en) Processing method for image data
JP2007129468A (en) Multicolor image data compressing device
JP5495113B2 (en) Image encoding apparatus, image forming apparatus, and program
JP4382828B2 (en) Line image separation method, image compression method, and image processing apparatus using the same