JP6044347B2 - Image processing apparatus, encoding method, and decoding method - Google Patents

Image processing apparatus, encoding method, and decoding method Download PDF

Info

Publication number
JP6044347B2
JP6044347B2 JP2013001476A JP2013001476A JP6044347B2 JP 6044347 B2 JP6044347 B2 JP 6044347B2 JP 2013001476 A JP2013001476 A JP 2013001476A JP 2013001476 A JP2013001476 A JP 2013001476A JP 6044347 B2 JP6044347 B2 JP 6044347B2
Authority
JP
Japan
Prior art keywords
color
value
information
pixel
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
JP2013001476A
Other languages
Japanese (ja)
Other versions
JP2014135574A (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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2013001476A priority Critical patent/JP6044347B2/en
Publication of JP2014135574A publication Critical patent/JP2014135574A/en
Application granted granted Critical
Publication of JP6044347B2 publication Critical patent/JP6044347B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置、符号化方法及び復号化方法に関する。   The present invention relates to an image processing device, an encoding method, and a decoding method.

画像形成装置等、画像データを取り扱う機器は、一般的に、画像データに符号化処理を施すための機能を有している(例えば、特許文献1参照)。ここでいう符号化処理とは、画像データを構成する一又は複数の画素の画素値を所定の量子化ビット数で量子化することにより、画像データのデータ量を低減させる処理である。画像形成装置は、符号化処理により画像データのデータ量を低減させることにより、画像データを記憶するための記憶部の記憶容量の消費量を低減している。
また、画像データを取り扱う機器は、画像形成の際に符号化処理が施された画像データに対して復号化処理を施し、符号化前と同一又は符号化前に近似した画像データを取得する。ここで、符号化処理における符号化の方法と復号化処理における復号化の方法は対になるものである。よって、係る画像データを取り扱う機器は、対になる符号化処理及び復号化処理の両方を行う機能を有する画像処理部を備えている。
Devices that handle image data, such as image forming apparatuses, generally have a function for performing encoding processing on image data (see, for example, Patent Document 1). The encoding process here is a process of reducing the data amount of the image data by quantizing the pixel value of one or a plurality of pixels constituting the image data with a predetermined number of quantization bits. The image forming apparatus reduces the amount of storage capacity of the storage unit for storing image data by reducing the amount of image data by encoding processing.
In addition, a device that handles image data performs a decoding process on the image data that has been subjected to the encoding process at the time of image formation, and acquires image data that is the same as that before encoding or approximated before the encoding. Here, the encoding method in the encoding process and the decoding method in the decoding process are paired. Therefore, a device that handles such image data includes an image processing unit having a function of performing both the encoding process and the decoding process as a pair.

特開2006−120145号公報JP 2006-120145 A

ところで、画像データを取り扱う機器に入力される複数の画像データの各々が属する色空間が異なる場合がある。例えば、CMYK色空間に属する画像データとRGB色空間に属する画像データが入力される場合がある。また、色空間の異なる画像データが集約された画像データを取り扱う必要がある場合がある。例えば、画像形成装置において、複数の画像データが組み合わされた画像の形成が要求された場合等である。
従来、上記のような異なる色空間が混在した画像データに符号化処理を施す場合、各々の色空間専用の符号化処理を施すか、又は、混在する色空間のうち、1つの色空間に統一するように他の色空間の画像データに色変換処理を施したうえで当該1つの色空間用の符号化処理を施すか、のいずれかの方法を取ることとなる。しかしながら、前者の方法には色空間毎の符号化の方法に対応した画像処理部が必要となるうえ、個別に符号化処理が施された画像データを個別に記憶するための記憶容量の消費量が大きくなる問題点があった。また、後者の方法には、色変換処理が施された他の色空間の本来の色情報が失われてしまうという問題点があった。
By the way, the color space to which each of a plurality of image data input to a device that handles image data belongs may be different. For example, image data belonging to the CMYK color space and image data belonging to the RGB color space may be input. In some cases, it is necessary to handle image data in which image data of different color spaces are aggregated. For example, when the image forming apparatus requests formation of an image in which a plurality of image data is combined.
Conventionally, when encoding processing is performed on image data in which different color spaces are mixed as described above, encoding processing dedicated to each color space is performed, or one color space is unified among the mixed color spaces. As described above, the color conversion processing is performed on the image data of another color space, and then the encoding processing for the one color space is performed. However, the former method requires an image processing unit corresponding to the encoding method for each color space, and also consumes a storage capacity for individually storing image data that has been individually encoded. There was a problem that increased. Further, the latter method has a problem that the original color information of another color space subjected to the color conversion process is lost.

また、画像データの階調幅によって適した符号化方法が異なる場合がある。具体的には、隣接する画素間の階調差が示す幅が相対的に小さい中間調領域に適した符号化方法と、隣接する画素間の階調差が示す幅が相対的に大きい高解像度領域に適した符号化方法とは異なる。
これらのことから、符号化処理は、画像データが属する複数の色空間及び階調幅に対応したものである必要があり、また、復号化処理も、当該符号化処理に対応したものである必要があった。しかしながら、従来の符号化処理及び復号化処理では、これらに対応することができないという問題点があった。
In addition, a suitable encoding method may differ depending on the gradation width of the image data. Specifically, an encoding method suitable for a halftone region in which the width indicated by the gradation difference between adjacent pixels is relatively small, and a high resolution in which the width indicated by the gradation difference between adjacent pixels is relatively large It is different from the encoding method suitable for the region.
Therefore, the encoding process needs to correspond to a plurality of color spaces and gradation widths to which the image data belongs, and the decoding process needs to correspond to the encoding process. there were. However, the conventional encoding process and decoding process have a problem that they cannot cope with them.

本発明は、画像データが属する複数の色空間及び階調幅に対応した符号化又は復号化を行うことができる画像処理装置、符号化方法及び復号化方法を提供することを目的とする。   An object of the present invention is to provide an image processing apparatus, an encoding method, and a decoding method capable of performing encoding or decoding corresponding to a plurality of color spaces and gradation widths to which image data belongs.

請求項1に記載の発明は、画像データを所定の画素領域単位で符号化する符号化部と、前記符号化部により符号化された前記画像データを前記所定の画素領域単位で復号化する復号化部と、を備える画像処理装置において、前記符号化部は、前記画像データに色空間が異なる画素領域が混在している場合に、前記所定の画素領域の各々の色空間を示す情報を含む第1情報を生成する第1生成部と、前記画像データに色空間が異なる画素領域が混在している場合に、各色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む第2情報を生成する第2生成部と、各所定の画素領域に含まれる各色の階調幅を示す情報を含む第3情報を生成する第3生成部と、前記第1情報、前記第2情報及び前記第3情報に基づいて、前記所定の画素領域を構成する複数の画素の画素値を色毎に前記階調幅に応じた符号化方法で符号化した符号値を示す第4情報を生成する第4生成部と、前記第1情報、前記第2情報、前記第3情報及び前記第4情報を含むデータを符号化された前記画像データとして出力する出力部と、を備え、前記復号化部は、前記第1情報に基づいて前記所定の画素領域の各々の色空間を特定する特定部と、前記第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得する取得部と、前記特定部により特定された色空間、前記取得部により取得された各色の画素値の最大値及び最小値、前記第3情報ならびに前記第4情報に基づいて符号値を色毎に復号化した復号値を生成する第5生成部と、を備えることを特徴とする。   According to the first aspect of the present invention, an encoding unit that encodes image data in units of a predetermined pixel region, and decoding that decodes the image data encoded by the encoding unit in units of the predetermined pixel region In the image processing apparatus comprising: an encoding unit, the encoding unit includes information indicating each color space of the predetermined pixel region when pixel regions having different color spaces are mixed in the image data When the first generation unit that generates the first information and the image data include pixel regions having different color spaces, the image data includes information indicating the maximum value and the minimum value of the pixel values of each color constituting each color space. A second generator for generating second information; a third generator for generating third information including information indicating a gradation width of each color included in each predetermined pixel region; the first information; and the second information. And the predetermined pixel based on the third information A fourth generation unit for generating fourth information indicating a code value obtained by encoding pixel values of a plurality of pixels constituting a region by an encoding method according to the gradation width for each color; the first information; 2, an output unit that outputs the data including the third information and the fourth information as the encoded image data, and the decoding unit is configured to output the predetermined pixel based on the first information. A specifying unit that specifies each color space of the region, an acquisition unit that acquires the maximum value and the minimum value of the pixel values of each color constituting each color space based on the second information, and the color specified by the specifying unit A fifth generation unit that generates a decoded value obtained by decoding a code value for each color based on the space, the maximum and minimum values of the pixel values of each color acquired by the acquisition unit, the third information, and the fourth information And.

請求項2に記載の発明は、請求項1に記載の画像処理装置において、前記第3生成部は、各所定の画素領域に含まれる各色の階調幅が中間調領域又は高解像度領域のいずれに属するかを示す情報を第3情報として生成し、前記第4生成部は、前記所定の画素領域に含まれる各色のうち、前記中間調領域に属する色の画素値を符号化する第1処理部と、前記所定の画素領域に含まれる各色のうち、前記高解像度領域に属する色の画素値を前記第1処理部による符号化と異なる符号化方法で符号化する第2処理部と、を備え、前記第5生成部は、前記第3情報に基づいて、前記第4生成部により符号化された前記所定の画素領域に含まれる各色が前記中間調領域又は前記高解像度領域のいずれに属するのかを判定する判定部と、前記判定部により前記中間調領域と判定された色の符号値を復号化する第3処理部と、前記判定部により前記高解像度領域と判定された色の符号値を前記第3処理部と異なる復号化方法で復号化する第4処理部と、を備えることを特徴とする。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the third generation unit is configured such that the gradation width of each color included in each predetermined pixel region is a halftone region or a high resolution region. The fourth processing unit generates information indicating whether it belongs as a third information, and the fourth generation unit encodes a pixel value of a color belonging to the halftone region among the colors included in the predetermined pixel region. And a second processing unit that encodes a pixel value of a color belonging to the high-resolution region among the colors included in the predetermined pixel region by an encoding method different from the encoding by the first processing unit. The fifth generation unit, based on the third information, whether each color included in the predetermined pixel region encoded by the fourth generation unit belongs to the halftone region or the high resolution region And a determination unit for determining A third processing unit that decodes a code value of a color determined to be a halftone region, and a decoding method different from that of the third processing unit that converts a code value of a color determined to be the high-resolution region by the determination unit. And a fourth processing unit for decoding.

請求項3に記載の発明は、請求項2に記載の画像処理装置において、前記第1処理部は、前記所定の画素領域を構成する複数の画素の画素値を平均化した平均値に基づいて符号値を得ることを特徴とする。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, the first processing unit is based on an average value obtained by averaging pixel values of a plurality of pixels constituting the predetermined pixel region. A code value is obtained.

請求項4に記載の発明は、請求項3に記載の画像処理装置において、前記第1処理部は、前記中間調領域に属すると判定された色について、当該色の前記最大値と前記最小値との差に対応する階調の範囲を所定数の区分に区切って各区分に対応する符号値を設定し、前記平均値が含まれる区分に対応する符号値を特定して前記平均値が算出された所定の画像領域の当該色の符号値とし、前記第3処理部は、符号値が取り得る値の各々に対して個別の復号値を色毎に設定し、前記中間調領域に属すると判定された色について、前記平均値が算出された所定の画素領域に対応する当該色の符号値に対応する復号値を特定することを特徴とする。   According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect, for the color determined to belong to the halftone area, the first processing unit has the maximum value and the minimum value of the color. The gradation range corresponding to the difference is divided into a predetermined number of sections, code values corresponding to the respective sections are set, code values corresponding to the sections including the average values are specified, and the average value is calculated. The third processing unit sets an individual decoded value for each color that can be taken by the code value and belongs to the halftone area. For the determined color, a decoded value corresponding to a code value of the color corresponding to the predetermined pixel area for which the average value is calculated is specified.

請求項5に記載の発明は、請求項2から4のいずれか一項に記載の画像処理装置において、前記第2処理部は、前記所定の画素領域を構成する複数の画素の各々の画素値のうち、前記高解像度領域に属する色の画素値を2値化した濃度パターンに対応する符号値を得、前記第4処理部は、前記第2処理部により得られた符号値と当該符号値に対応する濃度パターンを得るための参照データとに基づいて、当該符号値に対応する復号値を得ることを特徴とする。   According to a fifth aspect of the present invention, in the image processing device according to any one of the second to fourth aspects, the second processing unit includes a pixel value of each of a plurality of pixels constituting the predetermined pixel region. The code value corresponding to the density pattern obtained by binarizing the pixel values of the colors belonging to the high resolution region is obtained, and the fourth processing unit obtains the code value obtained by the second processing unit and the code value. The decoded value corresponding to the code value is obtained based on the reference data for obtaining the density pattern corresponding to.

請求項6に記載の発明は、請求項1から5のいずれか一項に記載の画像処理装置において、前記出力部は、色数が最も多い色空間の色数に応じた数の色別プレートと、前記色別プレートと別の追加プレートと、を生成し、前記色別プレートの各々に色数が最も多い色空間の前記第2情報、前記第3情報及び前記第4情報を色別に設定すると共に、一部又は全部の色別プレートの各々に他の色空間の前記第3情報及び前記第4情報を色別に設定し、追加プレートに前記第1情報及び他の色空間の前記第2情報を設定し、前記色別プレート及び前記追加プレートにより構成されるデータを符号化された前記画像データとして出力することを特徴とする。   According to a sixth aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, the output unit includes a number of color plates corresponding to the number of colors in the color space having the largest number of colors. And the color-specific plate and another additional plate are generated, and the second information, the third information, and the fourth information of the color space having the largest number of colors are set for each color in each of the color-specific plates. In addition, the third information and the fourth information of the other color space are set for each color in a part or all of the color-specific plates, and the first information and the second information of the other color spaces are set in the additional plate. Information is set, and data constituted by the color-specific plate and the additional plate is output as the encoded image data.

請求項7に記載の発明は、請求項1から6のいずれか一項に記載の画像処理装置において、色空間が異なる画素領域が混在している画像データは、色数が最も多い色空間の色数に応じた数の部分データの各々に当該色空間の画素値を色別に含むと共に、当該数の一部又は全部の部分データの各々に他の色空間の画素値を色別に含むことを特徴とする。   According to a seventh aspect of the present invention, in the image processing apparatus according to any one of the first to sixth aspects, the image data in which pixel regions having different color spaces are mixed is in the color space having the largest number of colors. Each of the partial data of the number corresponding to the number of colors includes the pixel value of the color space for each color, and the partial or all of the partial data of the number includes the pixel value of the other color space for each color. Features.

請求項8に記載の発明は、請求項7に記載の画像処理装置において、前記色空間が異なる画素領域が混在している画像データは、各部分データに含まれる画素値の色空間を示す情報を含む付加データを含むことを特徴とする。   According to an eighth aspect of the present invention, in the image processing apparatus according to the seventh aspect, the image data in which the pixel areas having different color spaces are mixed is information indicating the color space of the pixel value included in each partial data. Including additional data including.

請求項9に記載の発明は、請求項8に記載の画像処理装置において、前記付加データは、色数が最も多い色空間の色数に応じた数の前記部分データのうち、前記他の色空間の画素値が含まれない部分データに含まれることを特徴とする。   According to a ninth aspect of the present invention, in the image processing apparatus according to the eighth aspect, the additional data is the other color among the number of partial data corresponding to the number of colors in the color space having the largest number of colors. It is characterized in that it is included in the partial data that does not include the pixel value of the space.

請求項10に記載の発明は、画像データを所定の画素領域単位で符号化する符号化方法において、前記画像データに色空間が異なる画素領域が混在している場合に、前記所定の画素領域の各々の色空間を示す情報を含む第1情報を生成するステップと、前記画像データに色空間が異なる画素領域が混在している場合に、各色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む第2情報を生成するステップと、各所定の画素領域に含まれる各色の階調幅を示す情報を含む第3情報を生成するステップと、前記第1情報、前記第2情報及び前記第3情報に基づいて、前記所定の画素領域を構成する複数の画素の画素値を色毎に前記階調幅に応じた符号化方法で符号化した符号値を示す第4情報を生成するステップと、前記第1情報、前記第2情報、前記第3情報及び前記第4情報を含むデータを符号化された前記画像データとして出力するステップと、を有することを特徴とする。   According to a tenth aspect of the present invention, in the encoding method for encoding image data in units of a predetermined pixel area, when the pixel area having different color spaces is mixed in the image data, the predetermined pixel area Generating first information including information indicating each color space; and when the image data includes pixel regions having different color spaces, the maximum and minimum pixel values of each color constituting each color space Generating second information including information indicating a value; generating third information including information indicating a gradation width of each color included in each predetermined pixel region; and the first information and the second information. Then, based on the third information, fourth information indicating a code value obtained by encoding pixel values of a plurality of pixels constituting the predetermined pixel region for each color by an encoding method corresponding to the gradation width is generated. Step and the first information Said second information, and having the steps of: outputting the data including the third information and the fourth information as the image data encoded.

請求項11に記載の発明は、請求項10に記載の符号化方法により符号化された前記画像データを前記所定の画素領域単位で復号化する復号化方法において、前記第1情報に基づいて前記所定の画素領域の各々の色空間を特定するステップと、前記第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得するステップと、特定された色空間、取得された各色の画素値の最大値及び最小値、前記第3情報ならびに前記第4情報に基づいて符号値を色毎に復号化した復号値を生成するステップと、を有することを特徴とする。   The invention described in claim 11 is a decoding method for decoding the image data encoded by the encoding method according to claim 10 in units of the predetermined pixel area, based on the first information. Identifying each color space of a predetermined pixel area; obtaining a maximum value and a minimum value of pixel values of each color constituting each color space based on the second information; and identifying the specified color space. Generating a decoded value obtained by decoding the code value for each color based on the maximum value and the minimum value of the pixel values of each color, the third information, and the fourth information.

本発明によれば、画像データの各画素が属する色空間及び階調幅に対応した符号化又は復号化を行うことができる。   According to the present invention, encoding or decoding corresponding to the color space and gradation width to which each pixel of image data belongs can be performed.

本発明の画像処理装置として機能する画像処理部を備える画像形成装置及び画像形成装置に接続される構成の一例を示す機能ブロック図である。1 is a functional block diagram illustrating an example of an image forming apparatus including an image processing unit that functions as an image processing apparatus of the present invention and a configuration connected to the image forming apparatus. 画像処理部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of an image process part. 集約部による混在データの生成に係る説明図である。図3(a)は集約処理前のCMYK色空間の画像データの構成を示す模式図である。図3(b)は集約処理前のRGB色空間の画像データの構成を示す模式図である。図3(c)は混在データの構成を示す模式図である。It is explanatory drawing which concerns on the production | generation of the mixed data by an aggregation part. FIG. 3A is a schematic diagram showing a configuration of image data in the CMYK color space before the aggregation process. FIG. 3B is a schematic diagram illustrating a configuration of image data in the RGB color space before the aggregation process. FIG. 3C is a schematic diagram showing the configuration of mixed data. 画像データの画素と符号データのブロックとの対応関係の一例を示す説明図である。It is explanatory drawing which shows an example of the correspondence of the pixel of image data, and the block of code | cord | chord data. 混在データの符号化により生成された符号データの構造の一例を示す図である。It is a figure which shows an example of the structure of the code data produced | generated by encoding of mixed data. 符号データの色別プレートの詳細構成の一例を示す図である。It is a figure which shows an example of the detailed structure of the plate classified by color of code data. 中間調領域に係る区分と最大値、最小値、区分値との関係ならびに各区分の符号値及び復号値の一例を示す説明図である。It is explanatory drawing which shows an example of the relationship between the division | segmentation which concerns on a halftone area | region, the maximum value, the minimum value, and the division value, and the code value and decoding value of each division. 高解像度領域の符号化に係る濃度パターンの一例を示す図である。It is a figure which shows an example of the density pattern which concerns on encoding of a high resolution area | region. 高解像度領域の「00」の符号値に対応する第1のテンプレート群の一例を示す図である。It is a figure which shows an example of the 1st template group corresponding to the code value of "00" of a high resolution area | region. 高解像度領域の「01」の符号値に対応する第2のテンプレート群の一例を示す図である。It is a figure which shows an example of the 2nd template group corresponding to the code value of "01" of a high resolution area | region. 高解像度領域の「10」の符号値に対応する第3のテンプレート群の一例を示す図である。It is a figure which shows an example of the 3rd template group corresponding to the code value of "10" of a high resolution area | region. 高解像度領域の「11」の符号値に対応する第4のテンプレート群の一例を示す図である。It is a figure which shows an example of the 4th template group corresponding to the code value of "11" of a high resolution area | region. 符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of an encoding process. 符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of an encoding process. 第1符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a 1st encoding process. 第2符号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a 2nd encoding process. 復号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a decoding process. 第1復号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a 1st decoding process. 第2復号化処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a 2nd decoding process. パターンマッチングの流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of pattern matching. 混在データの構成の別の一例を示す模式図である。It is a schematic diagram which shows another example of a structure of mixed data.

以下、図面を参照して本発明の画像処理装置の実施の形態について説明する。   Embodiments of an image processing apparatus according to the present invention will be described below with reference to the drawings.

図1は、本発明の画像処理装置として機能する画像処理部20を備える画像形成装置1及び画像形成装置1に接続される構成の一例を示す機能ブロック図である。   FIG. 1 is a functional block diagram illustrating an example of an image forming apparatus 1 including an image processing unit 20 that functions as an image processing apparatus of the present invention and a configuration connected to the image forming apparatus 1.

画像形成装置1は、通信制御部11、読取制御部12、画像メモリー13、画像処理部20、入出力制御部14、記憶制御部15、記憶部16、画像形成部17、中央制御部18等を備える。
また、画像形成装置1は、例えば、通信ネットワークNを介してPC2及びプリントコントローラー3と通信可能に接続されている。通信ネットワークNは、例えば、専用線や既存の一般公衆回線を利用して構築された通信ネットワークであり、LANやWAN等の様々な回線形態を適用することが可能である。また、通信ネットワークNには、例えば、電話回線網、ISDN回線網、専用線、移動体通信網、通信衛星回線、ケーブルTV回線網等の各種通信回線網と、それらを接続するインターネットサービスプロバイダ等が含まれる。
The image forming apparatus 1 includes a communication control unit 11, a reading control unit 12, an image memory 13, an image processing unit 20, an input / output control unit 14, a storage control unit 15, a storage unit 16, an image forming unit 17, a central control unit 18, and the like. Is provided.
The image forming apparatus 1 is connected to the PC 2 and the print controller 3 via the communication network N, for example. The communication network N is, for example, a communication network constructed using a dedicated line or an existing general public line, and various line forms such as a LAN and a WAN can be applied. The communication network N includes, for example, various communication line networks such as a telephone line network, an ISDN line network, a dedicated line, a mobile communication network, a communication satellite line, a cable TV line network, and an Internet service provider that connects them. Is included.

PC2は、通信ネットワークNを介してデータを画像形成装置1に出力する。ここで、PC2から出力されるデータは、例えば、PostScript(登録商標)等のページ記述言語により記述された画像データである。ここで、当該画像データの色空間は、例えば、RGB色空間である。
プリントコントローラー3は、通信ネットワークNを介してCMYK色空間の画像データを出力する。具体的には、プリントコントローラー3は、画像データを出力する図示しない機器と画像形成装置1との間に介在して、当該機器から出力された画像データをCMYK色空間の画像データに変換して画像形成装置1に出力する。
The PC 2 outputs data to the image forming apparatus 1 via the communication network N. Here, the data output from the PC 2 is image data described in a page description language such as PostScript (registered trademark), for example. Here, the color space of the image data is, for example, an RGB color space.
The print controller 3 outputs image data in the CMYK color space via the communication network N. Specifically, the print controller 3 is interposed between a device (not shown) that outputs image data and the image forming apparatus 1, and converts the image data output from the device into image data in the CMYK color space. Output to the image forming apparatus 1.

通信制御部11は、ネットワークインターフェースカード等の通信機器を備え、通信ネットワークNを介して接続されたPC2やプリントコントローラー3等の機器と、TCP/IP等の所定の規格による通信を行う。通信制御部11は、例えば、PC2やプリントコントローラー3から出力された画像データを取得する。   The communication control unit 11 includes a communication device such as a network interface card, and performs communication according to a predetermined standard such as TCP / IP with devices such as the PC 2 and the print controller 3 connected via the communication network N. For example, the communication control unit 11 acquires image data output from the PC 2 or the print controller 3.

読取制御部12は、読取装置4に接続されている。
読取装置4は、原稿が設置されるコンタクトガラスや、コンタクトガラスを介して原稿に光を照射する光源、光源から発せられた光が原稿により反射された反射光を導くためのミラー群、ミラー群により導かれた反射光を結像させる集光レンズ、集光レンズによって結像された原稿からの反射光を光電変換することによって読取ライン毎のアナログの画像信号を生成するCCD等の撮像素子、等々を備え、アナログの画像信号を読取制御部12に出力する。
読取制御部12は、読取装置4の撮像素子により生成されたアナログの画像信号を所定のビット幅のデジタルの画像データに変換するA/D変換部や、当該画像データに対してシェーディング補正やMTFγ補正等の各種の補正処理を行う補正部等を備え、補正された画像データを出力する。
The reading control unit 12 is connected to the reading device 4.
The reading device 4 includes a contact glass on which an original is placed, a light source that irradiates light on the original through the contact glass, a mirror group for guiding reflected light reflected by the original, and a mirror group. An image sensor such as a CCD that generates an analog image signal for each reading line by photoelectrically converting reflected light from the original image formed by the condensing lens; And the like, and outputs an analog image signal to the reading control unit 12.
The reading control unit 12 converts an analog image signal generated by the image sensor of the reading device 4 into digital image data having a predetermined bit width, shading correction and MTFγ for the image data. A correction unit that performs various correction processes such as correction is provided, and the corrected image data is output.

画像メモリー13は、例えば、DRAM等からなる揮発性の記憶装置であり、通信制御部11や読取制御部12を介して取得された画像データ等を記憶する。   The image memory 13 is a volatile storage device including, for example, a DRAM and stores image data acquired through the communication control unit 11 and the reading control unit 12.

画像処理部20は、読取制御部12等から出力された画像データ等に色変換処理を施す色変換部21、画像メモリー13に記憶された画像データを符号化する符号化部30、符号化部30により符号化された画像データを復号化する復号化部40、複数の画像データを一つの画像データとする集約部22等を備える。画像処理部20の詳細については後述する。
入出力制御部14は、各種のデータの入出力を制御する。入出力制御部14は、例えば、通信制御部11、読取制御部12、画像メモリー13、記憶制御部15、画像形成部17、画像処理部20等の間におけるデータの転送を制御する。
The image processing unit 20 includes a color conversion unit 21 that performs color conversion processing on the image data output from the reading control unit 12 and the like, an encoding unit 30 that encodes image data stored in the image memory 13, and an encoding unit. 30 includes a decoding unit 40 that decodes the image data encoded by 30, an aggregation unit 22 that uses a plurality of pieces of image data as one image data, and the like. Details of the image processing unit 20 will be described later.
The input / output control unit 14 controls input / output of various data. The input / output control unit 14 controls, for example, data transfer among the communication control unit 11, the reading control unit 12, the image memory 13, the storage control unit 15, the image forming unit 17, the image processing unit 20, and the like.

記憶制御部15は、記憶部16に記憶されるデータの入出力を制御するコントローラーである。
記憶部16は、HDD等の補助記憶装置を有し、記憶制御部15の制御下で各種のデータを記憶する。
The storage control unit 15 is a controller that controls input / output of data stored in the storage unit 16.
The storage unit 16 has an auxiliary storage device such as an HDD, and stores various data under the control of the storage control unit 15.

画像形成部17は、画像データに基づいて、用紙に画像を形成する。
具体的には、画像形成部17は、例えば、用紙を搬送する搬送部、画像処理部20により処理が施された画像データ等を一時的に記憶するバッファー、バッファーに記憶された画像データに応じたトナー像を現像する現像部、現像されたトナー像を感光体に転写する第1転写部、感光体に転写されたトナー像を搬送されている用紙に転写する第2転写部、第2転写部により転写されたトナー像を用紙に定着させる定着部、定着部による処理後の用紙を排出する排出部等を備える。これらの画像形成部17の構成は、電子写真方式による画像形成を行う構成の一例であってこれに限られるものでない。例えば、インクジェット記録方式の画像形成等、他の方式の画像形成を行う画像形成部17であってもよい。
The image forming unit 17 forms an image on a sheet based on the image data.
Specifically, the image forming unit 17 responds to, for example, a conveyance unit that conveys paper, a buffer that temporarily stores image data processed by the image processing unit 20, and the image data stored in the buffer. A developing unit that develops the developed toner image, a first transfer unit that transfers the developed toner image to the photoconductor, a second transfer unit that transfers the toner image transferred to the photoconductor to the conveyed paper, and a second transfer A fixing unit that fixes the toner image transferred by the unit to the paper, a discharge unit that discharges the paper processed by the fixing unit, and the like. The configuration of the image forming unit 17 is an example of a configuration for performing image formation by an electrophotographic method, and is not limited thereto. For example, the image forming unit 17 may perform image formation using another method such as image formation using an inkjet recording method.

中央制御部18は、CPU、RAM、ROM等を備える。CPUは、ROMに記憶されている各種のプログラム、データ等をRAM読み出して実行し、実行された処理内容に応じて画像形成装置1の各部の動作を制御する。RAMにはCPUで実行される各種のプログラムの他、処理に必要なパラメータやデータ等が保持される。
中央制御部18は、例えば、通信制御部11を介してPC2から出力されたページ記述言語により記述された画像データを取得すると、当該画像データに解析処理を施して中間言語データに変換し、当該中間言語データに対応するビットマップデータを生成して画像メモリー13に記憶させる。
The central control unit 18 includes a CPU, a RAM, a ROM, and the like. The CPU reads out and executes various programs, data, and the like stored in the ROM, and controls the operation of each unit of the image forming apparatus 1 in accordance with the contents of the executed processing. In addition to various programs executed by the CPU, the RAM stores parameters and data necessary for processing.
For example, when the central control unit 18 acquires image data described in the page description language output from the PC 2 via the communication control unit 11, the central control unit 18 performs analysis processing on the image data to convert it into intermediate language data, Bitmap data corresponding to the intermediate language data is generated and stored in the image memory 13.

次に、画像処理部20について、図2等を参照して説明する。
画像処理部20は、上記の通り、色変換部21、符号化部30、復号化部40、集約部22等を備える。画像処理部20は、例えば、FPGAやASIC等の集積回路又はこれらの集積回路が複数設けられたシステムLSIからなる。画像処理部20が備える各構成及び各構成間の配線は、集積回路に実装されたものである。なお、FPGAはfield programmable gate array、ASICはApplication Specific Integrated Circuit、LSIはLarge Scale Integrationの頭字語である。
Next, the image processing unit 20 will be described with reference to FIG.
As described above, the image processing unit 20 includes the color conversion unit 21, the encoding unit 30, the decoding unit 40, the aggregation unit 22, and the like. The image processing unit 20 includes, for example, an integrated circuit such as an FPGA or an ASIC, or a system LSI provided with a plurality of these integrated circuits. Each component included in the image processing unit 20 and wiring between each component are mounted on an integrated circuit. Note that FPGA is a field programmable gate array, ASIC is an application specific integrated circuit, and LSI is an acronym for Large Scale Integration.

色変換部21は、画像データに各種の色変換処理を施す。色変換部21による色変換処理として、例えば、画像データの色空間の変更に係る色変換処理が挙げられる。具体的には、色変換部21は、読取制御部12から出力されたRGB色空間の画像データをCMYK色空間の画像データに変換する。当該変換に係る処理の具体的内容は周知のものであるので、詳細な説明を省略する。
色変換部21により行われる色変換処理は、色空間の変更に係る色変換処理に限らない。例えば、グレースケール処理等の減色に係る色変換処理、特定の色の強調等、視覚的影響の変更を目的とした各色に対する個別の色変換処理等が挙げられるが、一例であってこれに限られるものでない。
The color conversion unit 21 performs various color conversion processes on the image data. Examples of the color conversion processing by the color conversion unit 21 include color conversion processing related to a change in the color space of image data. Specifically, the color conversion unit 21 converts image data in the RGB color space output from the reading control unit 12 into image data in the CMYK color space. Since the specific contents of the processing relating to the conversion are well known, detailed description thereof will be omitted.
The color conversion process performed by the color conversion unit 21 is not limited to the color conversion process related to the change of the color space. For example, color conversion processing related to subtractive color such as gray scale processing, individual color conversion processing for each color for the purpose of changing the visual influence, such as emphasis on a specific color, etc. can be mentioned. It is not something that can be done.

符号化部30は、画像データを符号化する符号化処理を行う。
具体的には、符号化部30は、例えば、色変換部21により色変換が施されたCMYK色空間の画像データを符号化する。符号化部30により符号化された画像データは、記憶制御部15を介して記憶部16に記憶される。以下、符号化部30により符号化された画像データを符号データと記載する。
例えば、符号化部30は、色変換部21から出力されたCMYK色空間の画像データを符号化する。また、符号化部30は、通信制御部11を介してプリントコントローラー3から出力されたCMYK色空間の画像データを符号化する。
The encoding unit 30 performs an encoding process for encoding image data.
Specifically, the encoding unit 30 encodes, for example, image data in the CMYK color space that has been subjected to color conversion by the color conversion unit 21. The image data encoded by the encoding unit 30 is stored in the storage unit 16 via the storage control unit 15. Hereinafter, the image data encoded by the encoding unit 30 is referred to as code data.
For example, the encoding unit 30 encodes the CMYK color space image data output from the color conversion unit 21. The encoding unit 30 encodes image data in the CMYK color space output from the print controller 3 via the communication control unit 11.

復号化部40は、符号データを復号化する復号化処理を行う。
具体的には、復号化部40は、例えば、記憶制御部15を介して記憶部16から読み出された符号データを復号化して、復号化された画像データを取得する。以下、復号化部40により復号化された符号データを復号データと記載する。
The decoding unit 40 performs a decoding process for decoding the code data.
Specifically, for example, the decoding unit 40 decodes code data read from the storage unit 16 via the storage control unit 15 and acquires decoded image data. Hereinafter, the code data decoded by the decoding unit 40 is referred to as decoded data.

集約部22は、それぞれ色空間が異なる複数の画像データを一つの画像データとする集約処理を行う。
集約部22は、例えば、CMYK色空間の画像データとRGB色空間の画像データに基づいて、これらの色空間に対応するデータが混在した一つの画像データを生成する。以下、集約部22により生成された、複数の色空間に対応するデータが混在した画像データを混在データと記載する。
The aggregation unit 22 performs an aggregation process in which a plurality of pieces of image data having different color spaces are used as one image data.
For example, based on the image data in the CMYK color space and the image data in the RGB color space, the aggregating unit 22 generates one image data in which data corresponding to these color spaces are mixed. Hereinafter, image data generated by the aggregating unit 22 and including data corresponding to a plurality of color spaces is referred to as mixed data.

集約部22による混在データの生成について、図3(a)、(b)、(c)を参照して説明する。図3(a)は集約処理前のCMYK色空間の画像データの構成を示す模式図である。図3(b)は集約処理前のRGB色空間の画像データの構成を示す模式図である。図3(c)は混在データの構成を示す模式図である。なお、図3(a)、(b)、(c)では、各プレートを4×4マスで概略的に示しているが、あくまで便宜的な図示であって厳密な画素数を示すものではない。
集約処理前の各画像データは、それぞれの色空間を構成する色数に対応した数の部分データを有する。ここで、各部分データは、画像データを構成する各画素に設定された各色の画素値を示す情報が集合されたデータである。具体的には、例えば、図3(a)に示すように、集約処理前のCMYK色空間の画像データは、Cプレート、Mプレート、Yプレート及びKプレートのように、4つの部分データを有する。また、図3(b)に示すように、集約処理前のRGB色空間の画像データは、Rプレート、GプレートおよびBプレートのように、3つの部分データを有する。
The generation of mixed data by the aggregation unit 22 will be described with reference to FIGS. 3 (a), (b), and (c). FIG. 3A is a schematic diagram showing a configuration of image data in the CMYK color space before the aggregation process. FIG. 3B is a schematic diagram illustrating a configuration of image data in the RGB color space before the aggregation process. FIG. 3C is a schematic diagram showing the configuration of mixed data. In FIGS. 3A, 3B, and 3C, each plate is schematically shown as a 4 × 4 cell. However, the illustration is only for convenience and does not indicate the exact number of pixels. .
Each image data before the aggregation processing has partial data corresponding to the number of colors constituting each color space. Here, each partial data is data in which information indicating pixel values of each color set for each pixel constituting image data is collected. Specifically, for example, as shown in FIG. 3A, the image data in the CMYK color space before the aggregation processing includes four partial data such as a C plate, an M plate, a Y plate, and a K plate. . Further, as shown in FIG. 3B, the image data in the RGB color space before the aggregation processing has three partial data such as an R plate, a G plate, and a B plate.

集約部22は、色空間が異なる複数の画像データのうち、色空間を構成する色数が最も多い色空間の画像データの部分データに、他の画像データの部分データを集約するように混在データを生成する。具体的には、集約部22は、図3(c)に示すように、CとRが同一のC/Rプレートを、MとGが同一のM/Gプレートを、YとBが同一のY/Bプレートをそれぞれ集約された部分データとして生成する。また、これらの集約された部分データにより、RGB色空間に対応するデータをCMYK色空間に対応するデータに集約できることから、Kプレートについては色空間の混在を伴わずに単独で生成される。
このように、混在データは、色数が最も多い色空間の色数に応じた数の部分データの各々に当該色空間の画素値を色別に含むと共に、当該数の一部又は全部の部分データの各々に他の色空間の画素値を色別に含む。
The aggregating unit 22 mixes mixed data so that partial data of other image data is aggregated into partial data of image data in the color space having the largest number of colors constituting the color space among a plurality of image data having different color spaces. Is generated. Specifically, as shown in FIG. 3 (c), the consolidating unit 22 uses the same C / R plate for C and R, the same M / G plate for M and G, and the same for Y and B. The Y / B plate is generated as each aggregated partial data. Further, the data corresponding to the RGB color space can be aggregated into the data corresponding to the CMYK color space by using these aggregated partial data, so that the K plate is generated independently without mixing the color spaces.
As described above, the mixed data includes the pixel values of the color space in each of the partial data corresponding to the number of colors in the color space having the largest number of colors, and a part or all of the partial data of the number. Each pixel includes a pixel value in another color space for each color.

また、集約部22は、C/Rプレート、M/Gプレート、Y/Bプレート、Kプレートの4つの部分データとは別に、付加データとして、新たに1ビットの色系プレートを設けている。色系プレートは、各部分データに含まれる画素値の色空間を示す情報を含む。具体的には、集約部22は、C/Rプレート、M/Gプレート、Y/Bプレート、Kプレートの4つの部分データに含まれる各画素の画素値に対応するマトリクス形式を示すデータを色系プレートとして生成する。そして、集約部22は、当該マトリクスにより示された各画素の位置のうち、C/Rプレート、M/Gプレート、Y/Bプレート、Kプレートの4つの部分データにおいてCMYK色空間に対応する画素値が含まれている位置に「0」の符号を設定し、RGB色空間に対応する画素値が含まれている位置に「1」の符号を設定する。なお、各色空間に対応する「0」、「1」のビットパターンは、あくまで一例であってこれに限られるものでない。   In addition to the four partial data of the C / R plate, M / G plate, Y / B plate, and K plate, the aggregation unit 22 newly provides a 1-bit color system plate as additional data. The color system plate includes information indicating a color space of pixel values included in each partial data. Specifically, the aggregating unit 22 colors data indicating a matrix format corresponding to the pixel value of each pixel included in the four partial data of the C / R plate, the M / G plate, the Y / B plate, and the K plate. Generate as a system plate. Then, the aggregation unit 22 includes pixels corresponding to the CMYK color space in the four partial data of the C / R plate, the M / G plate, the Y / B plate, and the K plate among the positions of the pixels indicated by the matrix. A sign of “0” is set at a position where the value is included, and a sign of “1” is set at a position where the pixel value corresponding to the RGB color space is included. The bit patterns “0” and “1” corresponding to each color space are merely examples, and the present invention is not limited thereto.

次に、画像形成装置1が取り扱う画像データに係る処理の流れについて説明する。
例えば、読取制御部12から画像データが出力されると、色変換部21が当該画像データに色変換処理を施してCMYK色空間の画像データとし、符号化部30が当該CMYK色空間の画像データを符号化して符号データとする。また、通信制御部11を介してプリントコントローラー3から出力されたCMYK色空間の画像データが取得されると、符号化部30が当該CMYK色空間の画像データを符号化して符号データとする。また、通信制御部11を介してPC2から出力されたRGB色空間の画像データが取得されると、符号化部30が当該RGB色空間の画像データを符号化して符号データとする。これらの符号データは記憶制御部15を介して記憶部16に記憶される。
Next, a flow of processing related to image data handled by the image forming apparatus 1 will be described.
For example, when image data is output from the reading control unit 12, the color conversion unit 21 performs color conversion processing on the image data to obtain image data in the CMYK color space, and the encoding unit 30 outputs image data in the CMYK color space. Is encoded data. Further, when the CMYK color space image data output from the print controller 3 via the communication control unit 11 is acquired, the encoding unit 30 encodes the CMYK color space image data into code data. Further, when the RGB color space image data output from the PC 2 is acquired via the communication control unit 11, the encoding unit 30 encodes the RGB color space image data into code data. These code data are stored in the storage unit 16 via the storage control unit 15.

画像形成部17による画像形成に際して、記憶部16に記憶された符号データは記憶制御部15を介して読み出され、画像処理部20の復号化部40により復号化される。復号化部40による復号化を経て生成された復号データは画像メモリー13を経由して画像形成部17に出力される。画像形成部17は、復号データに基づいて画像形成を行う。   When the image is formed by the image forming unit 17, the code data stored in the storage unit 16 is read out via the storage control unit 15 and decoded by the decoding unit 40 of the image processing unit 20. The decoded data generated through the decoding by the decoding unit 40 is output to the image forming unit 17 via the image memory 13. The image forming unit 17 forms an image based on the decoded data.

ここで、符号化部30による符号化及び復号化部40による復号化について、図4の例を参照して概略を説明する。
符号化部30は、例えば、図4に示すように、画像データにおいて互いに直交する方向に沿って配置された複数の画素を8×8画素単位で順次符号化する。符号化処理において、符号化部30は、8×8画素を4×4ブロックの符号データとする。即ち、符号化部30は、2×2画素を1ブロックとするように符号化処理を行う。
また、符号化処理前の画像データを構成する各画素には、8ビットの画素値が設定されている。符号化部30は、各々に8ビットの画素値が設定された2×2画素の4つの画素に基づいて、4ビットの符号値を生成し、当該2×2画素に対応するブロックの符号値とする。
Here, the outline of the encoding by the encoding unit 30 and the decoding by the decoding unit 40 will be described with reference to the example of FIG.
For example, as illustrated in FIG. 4, the encoding unit 30 sequentially encodes a plurality of pixels arranged in directions orthogonal to each other in image data in units of 8 × 8 pixels. In the encoding process, the encoding unit 30 sets 8 × 8 pixels as 4 × 4 block code data. That is, the encoding unit 30 performs encoding processing so that 2 × 2 pixels are included in one block.
An 8-bit pixel value is set for each pixel constituting the image data before the encoding process. The encoding unit 30 generates a 4-bit code value based on four pixels of 2 × 2 pixels each having an 8-bit pixel value set, and a code value of a block corresponding to the 2 × 2 pixels And

復号化部40は、符号化部30により生成された符号データを、4×4ブロック単位で復号化して復号データを生成する。復号化処理において、復号化部40は、4×4ブロックに対応する8×8画素の復号データを生成する。
なお、図4を参照した説明では、画素領域とブロックの対応関係を簡便に示す目的で、復元化の矢印の図示においてbIJのブロックから画素aijが復元される関係を図示しているが、非可逆圧縮の場合、復元前の画素値と復元後の画素値とは異なる場合がある。以下、本実施の形態の説明において、符号化前の画素値と復号化された画素値を区別するため、符号化前の画素値をaijと記載し、復号化後の画素値をAijと記載する。
The decoding unit 40 decodes the code data generated by the encoding unit 30 in units of 4 × 4 blocks to generate decoded data. In the decoding process, the decoding unit 40 generates 8 × 8 pixel decoded data corresponding to 4 × 4 blocks.
In the description with reference to FIG. 4, for the purpose of simply showing the correspondence between the pixel area and the block, the relationship in which the pixel a ij is restored from the b IJ block in the illustration of the restoration arrow is illustrated. In the case of lossy compression, the pixel value before restoration may be different from the pixel value after restoration. Hereinafter, in the description of the present embodiment, in order to distinguish between a pixel value before encoding and a decoded pixel value, the pixel value before encoding is referred to as a ij, and the pixel value after decoding is referred to as A ij. It describes.

本実施の形態では、集約部22により生成された混在データの符号化と、当該符号化により生成された符号データの復号化とを行うことができる。以下、詳細に説明する。
図5は、混在データの符号化により生成された符号データの構造の一例を示す図である。
図6は、符号データの色別プレートの詳細構成の一例を示す図である。
符号化部30は、混在データの各部分データに対応する色別プレートと、符号化処理により生じた符号化に係る情報のうち、色別プレートに設定されない各種の情報を設定するための追加プレートと、を生成する。符号化部30は、例えば、図3(c)に示す混在データの符号化により、図5に示すように、C/Rプレート、M/Gプレート、Y/Bプレート、Kプレートの4つの色別プレートと、追加プレートとしてのTAGプレートと、を生成する。ここで、色別プレートの数は、混在データに含まれる色空間のうち色数が最も多い色空間の色数に応じた数となる。また、色別プレートはそれぞれ、異なる色の符号値等を含みうるデータとなる。例えば、CMYK色空間を構成する色のうち、シアン(C)の符号値はC/Rプレートに含まれ、マゼンタ(M)の符号値はM/Gプレートに含まれ、イエロー(Y)の符号値はY/Bプレートに含まれ、ブラック(K)の符号値はKプレートに含まれる。また、RGBの色空間を構成する色のうち、レッド(R)の符号値はC/Rプレートに含まれ、グリーン(G)の符号値はM/Gプレートに含まれ、ブルー(B)の符号値はY/Bプレートに含まれる。
図5に示す符号データの構造は、8×8画素に対応する4×4ブロックとなっているが、画像データが符号化されたデータとして最終的に生成される符号データは、画像データを構成する画素数に応じて図5に示す4×4ブロックが複数組み合わされたデータとなる。
In the present embodiment, it is possible to perform encoding of the mixed data generated by the aggregation unit 22 and decoding of the code data generated by the encoding. Details will be described below.
FIG. 5 is a diagram illustrating an example of the structure of code data generated by encoding mixed data.
FIG. 6 is a diagram illustrating an example of a detailed configuration of the color-specific plate of the code data.
The encoding unit 30 includes a plate for each color corresponding to each partial data of the mixed data, and an additional plate for setting various types of information that are not set in the plate for each color among the information related to encoding generated by the encoding process. And generate. The encoding unit 30, for example, encodes the mixed data shown in FIG. 3 (c), so that four colors of C / R plate, M / G plate, Y / B plate, and K plate are used as shown in FIG. 5. A separate plate and a TAG plate as an additional plate are generated. Here, the number of plates for each color is a number corresponding to the number of colors in the color space having the largest number of colors among the color spaces included in the mixed data. Each color plate is data that can include code values of different colors. For example, among the colors constituting the CMYK color space, the code value of cyan (C) is included in the C / R plate, the code value of magenta (M) is included in the M / G plate, and the code value of yellow (Y) The value is included in the Y / B plate, and the sign value of black (K) is included in the K plate. Among the colors constituting the RGB color space, the code value of red (R) is included in the C / R plate, the code value of green (G) is included in the M / G plate, and the color of blue (B) The sign value is included in the Y / B plate.
Although the structure of the code data shown in FIG. 5 is a 4 × 4 block corresponding to 8 × 8 pixels, the code data finally generated as encoded data of the image data constitutes the image data. The data is a combination of a plurality of 4 × 4 blocks shown in FIG.

色別プレート及び追加プレートには、それぞれ複数の情報が含まれる。
色別プレートは、4ビットで表される情報を4×4ブロックの各々に含む。当該4ビットの上位側から数えて先頭の1ビットが識別プレーンとして機能し、続く2ビットがBTCプレーンとして機能し、末尾の1ビットが第1の差分プレーンとして機能する。
Each of the color-specific plate and the additional plate includes a plurality of pieces of information.
The color plate includes information represented by 4 bits in each 4 × 4 block. The first 1 bit counted from the upper side of the 4 bits functions as an identification plane, the subsequent 2 bits function as a BTC plane, and the last 1 bit functions as a first difference plane.

識別プレーンは、各ブロックに対応する符号化前の2×2画素の画素領域に含まれる各色の階調幅を示す情報を含む。
具体的には、識別プレーンは、符号化前の2×2画素の画素領域に含まれる各画素の画素値の差に対応する階調幅が中間調領域又は高解像度領域のいずれに属するかを示す情報を各ブロックに含む。ここで、中間調領域と高解像度領域の区別は、2×2画素領域に含まれる各画素の画素値の差に基づいて算出される階調幅を示す値が中間調領域であることを示す所定の条件に該当するか否かに応じたものとなっている。当該所定の条件については後述する。
例えば、図6に示す色別プレーンにおける識別プレーンのFlag00には、画素a00、a01、a10、a11の画素からなる2×2の画素領域の各画素の画素値のうち、色別プレートに対応する色の画素値の差に対応する階調幅が中間調領域又は高解像度領域のいずれに属するかを示す値が設定される。当該値として、例えば、中間調領域の場合に「0」が設定され、高解像度領域の場合に「1」が設定されるが、一例であってこれに限られるものでない。他のFlagIJについても同様である。
The identification plane includes information indicating the gradation width of each color included in the pixel region of 2 × 2 pixels before encoding corresponding to each block.
Specifically, the identification plane indicates whether the gradation width corresponding to the pixel value difference of each pixel included in the 2 × 2 pixel area before encoding belongs to the halftone area or the high resolution area Contains information in each block. Here, the halftone area and the high resolution area are distinguished from each other by a predetermined value indicating that the value indicating the gradation width calculated based on the difference between the pixel values of each pixel included in the 2 × 2 pixel area is the halftone area. This is in accordance with whether or not this condition is met. The predetermined condition will be described later.
For example, Flag 00 of the identification plane in the color-specific plane shown in FIG. 6 includes a color among the pixel values of each pixel in a 2 × 2 pixel region composed of pixels a 00 , a 01 , a 10 , and a 11. A value indicating whether the gradation width corresponding to the difference between the pixel values of the colors corresponding to the different plates belongs to the halftone area or the high resolution area is set. As the value, for example, “0” is set in the case of the halftone area and “1” is set in the case of the high resolution area, but this is an example and is not limited thereto. The same applies to the other Flag IJs .

BTCプレーンは、2×2画素の画素領域を構成する複数の画素の画素値を階調幅に応じた符号化方法で符号化した符号値を含む。
具体的には、BTCプレーンは、識別プレーンに設定される情報、即ち、当該画素領域が中間調領域又は高解像度領域のいずれに属するかを示す情報に基づいて選択された符号化方法により、2×2画素の画素領域を構成する複数の画素の画素値が符号化されることで生成された「00」、「01」、「10」又は「11」のいずれかの2ビットの符号値を各ブロックに含む。
The BTC plane includes code values obtained by encoding pixel values of a plurality of pixels constituting a pixel region of 2 × 2 pixels by an encoding method corresponding to the gradation width.
Specifically, the BTC plane is encoded by a coding method selected based on information set as an identification plane, that is, information indicating whether the pixel area belongs to a halftone area or a high resolution area. A code value of 2 bits of any one of “00”, “01”, “10” or “11” generated by encoding the pixel values of a plurality of pixels constituting a pixel area of × 2 pixels. Include in each block.

例えば、図3(c)に示す画素a00、a01、a10、a11の画素値が符号化されて、図6に示すb00のブロックの符号値BTC00が生成される。また、画素a02、a03、a12、a13の画素値が符号化されてb01のブロックの符号値BTC01が生成される。また、画素a04、a05、a14、a15の画素値が符号化されてb02のブロックの符号値BTC02が生成される。また、画素a06、a07、a16、a17の画素値が符号化されてb03のブロックの符号値BTC03が生成される。また、画素a20、a21、a30、a31の画素値が符号化されてb10のブロックの符号値BTC10が生成される。他の4画素も同様に符号化されて、対応するブロックbIJの符号値BTCIJが生成される。 For example, the pixel values of the pixels a 00 , a 01 , a 10 , and a 11 shown in FIG. 3C are encoded, and the code value BTC 00 of the block b 00 shown in FIG. 6 is generated. Also, the pixel values of the pixels a 02 , a 03 , a 12 , and a 13 are encoded to generate the code value BTC 01 of the block b 01 . Further, the pixel values of the pixels a 04 , a 05 , a 14 , and a 15 are encoded to generate the code value BTC 02 of the block b 02 . Further, the pixel values of the pixels a 06 , a 07 , a 16 , and a 17 are encoded to generate the code value BTC 03 of the block of b 03 . Further, the pixel values of the pixels a 20 , a 21 , a 30 , and a 31 are encoded to generate the code value BTC 10 of the block b 10 . Other 4 pixels similarly be encoded, code values BTC IJ of the corresponding block b IJ is generated.

BTCプレーンは、混在データのように画像データに色空間が異なる画素領域が混在している場合に、色空間が異なる画素値に対応する符号データが混在した状態となる。
図4の例を参照して、CMYK色空間の画素が、a00〜a07、a10〜a17、a20〜a27、a30〜a37、a40〜a43、a50〜a53、a60〜a63、a70〜a73にあり、RGB色空間の画素が、a44〜a47、a54〜a57、a64〜a67、a74〜a77にある場合を例とする。当該例の場合、図5に示すように、CMYK色空間の画像データで表わされる画素とRGB色空間の画像データで表わされる画素が、それぞれ独立して符号化される。符号データに含まれる各ブロックのうち、b00、b01、b02、b03、b10、b11、b12、b13、b20、b21、b30、b31のブロックはCMYK色空間に対応し、b22、b23、b32、b33のブロックはRGB色空間に対応する。
The BTC plane is in a state where code data corresponding to pixel values having different color spaces are mixed when image data includes pixel regions having different color spaces, such as mixed data.
Referring to the example of FIG. 4, the pixels in the CMYK color space are a 00 to a 07 , a 10 to a 17 , a 20 to a 27 , a 30 to a 37 , a 40 to a 43 , a 50 to a. 53, located in a 60 ~a 63, a 70 ~a 73, the pixel of the RGB color space, a case in a 44 ~a 47, a 54 ~a 57, a 64 ~a 67, a 74 ~a 77 Take an example. In the case of this example, as shown in FIG. 5, the pixels represented by the image data in the CMYK color space and the pixels represented by the image data in the RGB color space are encoded independently. Among the blocks included in the code data, the blocks b 00 , b 01 , b 02 , b 03 , b 10 , b 11 , b 12 , b 13 , b 20 , b 21 , b 30 , b 31 are CMYK colors. The blocks b 22 , b 23 , b 32 , and b 33 correspond to the RGB color space.

第1の差分プレーンは、画像データに色空間が異なる画素領域が混在している場合に、画像データに混在している異なる色空間のうち、一つの色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む。
具体的には、第1の差分プレーンは、CMYK色空間の各々を構成する各色の画素値の最大値及び最小値を示す情報を含む。
なお、画素値は8ビットであることから、最大値と最小値の2つの画素値を示すためには16ビットの情報量が必要となる。また、第1の差分プレーンは、4×4の計16ブロックの各々について1ビットの情報量を有することから、その総情報量は16ビットとなる。よって、図5、図6に示すように、第1の差分プレーンの総情報量のうち、半分の8ビットが最大値を示す情報として割り当てられ、残り半分の8ビットが最小値を示す情報として割り当てられる。
The first difference plane is the maximum pixel value of each color constituting one color space among the different color spaces mixed in the image data when the pixel areas having different color spaces are mixed in the image data. Contains information indicating the value and the minimum value.
Specifically, the first difference plane includes information indicating the maximum value and the minimum value of the pixel values of each color constituting each of the CMYK color spaces.
Since the pixel value is 8 bits, a 16-bit information amount is required to indicate the two pixel values of the maximum value and the minimum value. Further, since the first difference plane has an information amount of 1 bit for each of a total of 16 blocks of 4 × 4, the total information amount is 16 bits. Therefore, as shown in FIGS. 5 and 6, half of the 8 bits of the total information amount of the first difference plane is assigned as information indicating the maximum value, and the remaining half of 8 bits is the information indicating the minimum value. Assigned.

図5に示すC/Rプレートに含まれる第1の差分プレーンには、シアン(C)の画素値の最大値CMax及び最小値CMinが設定されている。また、M/Gプレートに含まれる第1の差分プレーンには、マゼンタ(M)の画素値の最大値MMax及び最小値MMinが設定されている。また、Y/Bプレートに含まれる第1の差分プレーンには、イエロー(Y)の画素値の最大値YMax及び最小値YMinが設定されている。また、Kプレートに含まれる第1の差分プレーンには、ブラック(K)の画素値の最大値KMax及び最小値KMinが設定されている。このように、色別プレートの差分プレーンである第1の差分プレーンは、色別プレーンの数に対応する色空間、即ち、混在データに含まれる色空間のうち、色数が最も多い色空間の各色の画素値の最大値及び最小値を示す情報を含む。   In the first difference plane included in the C / R plate shown in FIG. 5, the maximum value CMax and the minimum value CMin of the cyan (C) pixel value are set. In the first difference plane included in the M / G plate, the maximum value MMax and the minimum value MMin of the magenta (M) pixel value are set. Further, the maximum value YMax and the minimum value YMin of the yellow (Y) pixel value are set in the first difference plane included in the Y / B plate. In the first difference plane included in the K plate, the maximum value KMax and the minimum value KMin of the black (K) pixel value are set. As described above, the first difference plane that is the difference plane of the color-specific plate is the color space corresponding to the number of color-specific planes, that is, the color space having the largest number of colors among the color spaces included in the mixed data. It includes information indicating the maximum and minimum pixel values of each color.

追加プレートも、色別プレートと同様に、4ビットで表される情報を4×4ブロックの各々に含む。当該4ビットの上位側から数えて先頭の1ビットが色系プレーンとして機能し、残りの3ビットが1ビット毎に第2の差分プレーンとして機能する。   The additional plate also includes information represented by 4 bits in each 4 × 4 block, similarly to the color-specific plate. The first 1 bit counted from the upper side of the 4 bits functions as a color plane, and the remaining 3 bits function as a second difference plane for each bit.

色系プレーンは、画像データに色空間が異なる画素領域が混在している場合に、所定の画素領域の各々の色空間を示す情報を含む。
具体的には、色系プレーンは、4×4の計16ブロックのうち、符号化前の画像データに含まれるC/Rプレート、M/Gプレート、Y/Bプレート、Kプレートの4つの部分データにおいてCMYK色空間に対応する画素領域のブロックに「0」の符号が設定されていると共に、RGB色空間に対応する画素領域のブロックに「1」の符号が設定されている。
The color plane includes information indicating each color space of a predetermined pixel region when pixel regions having different color spaces are mixed in the image data.
Specifically, the color system plane has four parts of C / R plate, M / G plate, Y / B plate, and K plate included in the image data before encoding, out of a total of 16 blocks of 4 × 4. In the data, a code of “0” is set for the block of the pixel area corresponding to the CMYK color space, and a code of “1” is set for the block of the pixel area corresponding to the RGB color space.

第2の差分プレーンは、画像データに色空間が異なる画素領域が混在している場合に、画像データに混在している異なる色空間のうち、第1の差分プレーンに対応する色空間とは異なる一つの色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む。
具体的には、第2の差分プレーンは、RGB色空間の各々を構成する各色の画素値の最大値及び最小値を示す情報を含む。より具体的には、TAGプレートを構成する4ビットの上位側から数えて2ビット目の16ブロックには、ブルー(B)の画素値の最大値BMax及び最小値BMinが設定されている。また、3ビット目の16ブロックには、グリーン(G)の画素値の最大値GMax及び最小値GMinが設定されている。また、4ビット目の16ブロックには、レッド(R)の画素値の最大値RMax及び最小値RMinが設定されている。第2の差分プレーンにおける各色の画素値の最大値及び最小値の情報量と16ブロックを用いた情報の設定方法との対応関係は、第1の差分プレーンと同様である。
The second difference plane is different from the color space corresponding to the first difference plane among the different color spaces mixed in the image data when pixel regions having different color spaces are mixed in the image data. It includes information indicating the maximum value and the minimum value of the pixel values of each color constituting one color space.
Specifically, the second difference plane includes information indicating the maximum value and the minimum value of the pixel values of each color constituting each of the RGB color spaces. More specifically, the maximum value BMax and the minimum value Bmin of the blue (B) pixel value are set in 16 blocks of the second bit counted from the high-order side of the 4-bit constituting the TAG plate. Also, the maximum value GMax and the minimum value GMin of the pixel value of green (G) are set in 16 blocks of the third bit. Further, the maximum value RMax and the minimum value Rmin of the pixel value of red (R) are set in 16 blocks of the fourth bit. The correspondence between the information amount of the maximum and minimum pixel values of each color in the second difference plane and the information setting method using 16 blocks is the same as that of the first difference plane.

ここで、符号化前の画像データの2×2画素の画素領域の各々の色空間を示す情報を第1情報とし、当該画像データに係る各色空間を構成する各色の画素値の最大値及び最小値を示す情報を第2情報とし、2×2画素の画素領域の各々に含まれる各色の階調幅を示す情報を第3情報とし、2×2画素の画素領域を構成する複数の画素の画素値を色毎に階調幅に応じた符号化方法で符号化した符号値を第4情報とする。
符号データは、色数が最も多い色空間の色数に応じた数の色別プレートと、色別プレートと別の追加プレートと、を有し、色別プレートの各々に色数が最も多い色空間の第2情報、第3情報及び第4情報を色別に含むと共に、Kプレートを除く色別プレートの各々に他の色空間の第3情報及び第4情報を色別に含み、追加プレートに第1情報及び他の色空間の第2情報を含むデータである。
Here, the information indicating the color space of each 2 × 2 pixel area of the image data before encoding is the first information, and the maximum value and the minimum pixel value of each color constituting each color space related to the image data The information indicating the value is the second information, the information indicating the gradation width of each color included in each pixel area of 2 × 2 pixels is the third information, and pixels of a plurality of pixels constituting the pixel area of 2 × 2 pixels A code value obtained by encoding the value with an encoding method corresponding to the gradation width for each color is set as fourth information.
The code data has a number of color plates corresponding to the number of colors in the color space with the largest number of colors, a color plate and another additional plate, and each color plate has the largest number of colors. The second information, the third information, and the fourth information of the space are included for each color, and the third information and the fourth information of the other color space are included for each color except for the K plate, and the additional plate includes the second information. Data including one information and second information of another color space.

次に、符号データの生成について説明する。
図2に示すように、符号化部30は、第1生成部31、第2生成部32、第3生成部33、第4生成部34、出力部35等を備える。
以下、一例として、符号化前の混在データのうち、C/Rプレートに含まれる画素値に係る符号化について説明する。
Next, generation of code data will be described.
As shown in FIG. 2, the encoding unit 30 includes a first generation unit 31, a second generation unit 32, a third generation unit 33, a fourth generation unit 34, an output unit 35, and the like.
Hereinafter, as an example, encoding according to pixel values included in the C / R plate in the mixed data before encoding will be described.

第1生成部31は、第1情報、即ち、符号化前の画像データの2×2画素の画素領域の各々の色空間を示す情報を生成する。
具体的には、第1生成部31は、混在データの付加データに設定された「0」又は「1」の符号に応じて各画素が属する色空間を判別することで、符号化処理の単位となる2×2画素の画素領域に含まれる各画素が属する色空間を判別する。そして、第1生成部31は、判別結果に応じて、各々の色空間を示す符号を各ブロックに設定するための情報を第2生成部32、第3生成部33、第4生成部34及び出力部35に出力する。
The first generation unit 31 generates first information, that is, information indicating each color space of a pixel region of 2 × 2 pixels of image data before encoding.
Specifically, the first generation unit 31 determines the color space to which each pixel belongs in accordance with the code “0” or “1” set in the additional data of the mixed data, so that the unit of the encoding process The color space to which each pixel included in the pixel region of 2 × 2 pixels becomes is determined. Then, the first generation unit 31 sets information for setting a code indicating each color space in each block according to the determination result, the second generation unit 32, the third generation unit 33, the fourth generation unit 34, and Output to the output unit 35.

例えば、上記と同様に、a00〜a07、a10〜a17、a20〜a27、a30〜a37、a40〜a43、a50〜a53、a60〜a63、a70〜a73に、「0」の符号、即ち、CMYK色空間を示す符号が設定されており、a44〜a47、a54〜a57、a64〜a67、a74〜a77に、「1」の符号、即ち、RGB色空間を示す符号が設定されている混在データを例とする。当該例の場合、第1生成部31は、図5に示すように、各画素の符号に対応するように、b00、b01、b02、b03、b10、b11、b12、b13、b20、b21、b30、b31にCMYK色空間を示す「0」の符号を設定し、b22、b23、b32、b33にRGB色空間を示す「1」の符号を設定する。 For example, as above, a 00 to a 07 , a 10 to a 17 , a 20 to a 27 , a 30 to a 37 , a 40 to a 43 , a 50 to a 53 , a 60 to a 63 , a A code of “0”, that is, a code indicating the CMYK color space is set in 70 to a 73 , and a code of a 44 to a 47 , a 54 to a 57 , a 64 to a 67 , and a 74 to a 77 is set. , “1”, that is, mixed data in which a code indicating an RGB color space is set as an example. In the case of the example, as illustrated in FIG. 5, the first generation unit 31 includes b 00 , b 01 , b 02 , b 03 , b 10 , b 11 , b 12 , b 13 , b 20 , b 21 , b 30 , b 31 are set to “0” indicating the CMYK color space, and b 22 , b 23 , b 32 , b 33 are set to “1” indicating the RGB color space. Set the sign.

第2生成部32は、第2情報、即ち、符号化前の画像データに係る各色空間を構成する各色の画素値の最大値及び最小値を示す情報を生成する。
具体的には、第2生成部32は、符号化前の混在データのC/Rプレートに含まれる各色の画素値の最大値と最小値を特定する。即ち、第2生成部32は、シアン(C)の画素値の最大値CMax及び最小値CMinならびにレッド(R)の画素値の最大値RMax及び最小値RMinを特定する。そして、第2生成部32は、特定された各色の最大値及び最小値を示す情報を第3生成部33、第4生成部34及び出力部35に出力する。なお、C/Rプレートに含まれる各画素値がシアン(C)又はレッド(R)のいずれの画素値であるかの判別は、第1生成部31による色空間の判別結果による。
The second generation unit 32 generates second information, that is, information indicating the maximum value and the minimum value of the pixel values of each color constituting each color space related to the image data before encoding.
Specifically, the second generation unit 32 specifies the maximum value and the minimum value of the pixel values of each color included in the C / R plate of the mixed data before encoding. That is, the second generation unit 32 specifies the maximum value CMax and the minimum value CMin of the cyan (C) pixel value and the maximum value RMax and the minimum value Rmin of the red (R) pixel value. Then, the second generation unit 32 outputs information indicating the maximum value and the minimum value of each specified color to the third generation unit 33, the fourth generation unit 34, and the output unit 35. Note that the determination of whether each pixel value included in the C / R plate is a cyan (C) or red (R) pixel value is based on the determination result of the color space by the first generation unit 31.

例えば、上記の例による混在データの場合、シアン(C)の最大値CMax及びCMinは、以下の式(1)、(2)により特定される。
CMax=MAX(a00,a01,a02,a03,a04,a05,a06,a07
10,a11,a12,a13,a14,a15,a16,a17
20,a21,a22,a23,a24,a25,a26,a27
30,a31,a32,a33,a34,a35,a36,a37
40,a41,a42,a43
50,a51,a52,a53
60,a61,a62,a63
70,a71,a72,a73)…(1)
CMin=MIN(a00,a01,a02,a03,a04,a05,a06,a07
10,a11,a12,a13,a14,a15,a16,a17
20,a21,a22,a23,a24,a25,a26,a27
30,a31,a32,a33,a34,a35,a36,a37
40,a41,a42,a43
50,a51,a52,a53
60,a61,a62,a63
70,a71,a72,a73)…(2)
また、レッド(R)の最大値RMax及びRMinは、以下の式(3)、(4)により特定される。
RMax=MAX(a44,a45,a46,a47
54,a55,a56,a57
64,a65,a66,a67
74,a75,a76,a77)…(3)
RMin=MIN(a44,a45,a46,a47
54,a55,a56,a57
64,a65,a66,a67
74,a75,a76,a77)…(4)
式(1)、(3)におけるMAX()の記載は、()内の対応する色の画素値のうち、最大の画素値を抽出することを示す。式(2)、(4)におけるMIN()の記載は、()内の対応する色の画素値のうち、最小の画素値を抽出することを示す。
For example, in the case of mixed data according to the above example, the maximum values CMax and CMin of cyan (C) are specified by the following equations (1) and (2).
CMax = MAX (a 00, a 01, a 02, a 03, a 04, a 05, a 06, a 07,
a 10, a 11, a 12 , a 13, a 14, a 15, a 16, a 17,
a 20, a 21, a 22 , a 23, a 24, a 25, a 26, a 27,
a 30 , a 31 , a 32 , a 33 , a 34 , a 35 , a 36 , a 37 ,
a 40 , a 41 , a 42 , a 43 ,
a 50 , a 51 , a 52 , a 53 ,
a 60 , a 61 , a 62 , a 63 ,
a 70 , a 71 , a 72 , a 73 ) (1)
CMin = MIN (a 00, a 01, a 02, a 03, a 04, a 05, a 06, a 07,
a 10, a 11, a 12 , a 13, a 14, a 15, a 16, a 17,
a 20, a 21, a 22 , a 23, a 24, a 25, a 26, a 27,
a 30 , a 31 , a 32 , a 33 , a 34 , a 35 , a 36 , a 37 ,
a 40 , a 41 , a 42 , a 43 ,
a 50 , a 51 , a 52 , a 53 ,
a 60 , a 61 , a 62 , a 63 ,
a 70 , a 71 , a 72 , a 73 ) (2)
Further, the maximum values RMax and RMin of red (R) are specified by the following formulas (3) and (4).
RMax = MAX (a 44 , a 45 , a 46 , a 47 ,
a 54 , a 55 , a 56 , a 57 ,
a 64 , a 65 , a 66 , a 67 ,
a 74 , a 75 , a 76 , a 77 ) (3)
Rmin = MIN (a 44 , a 45 , a 46 , a 47 ,
a 54 , a 55 , a 56 , a 57 ,
a 64 , a 65 , a 66 , a 67 ,
a 74 , a 75 , a 76 , a 77 ) (4)
The description of MAX () in Expressions (1) and (3) indicates that the maximum pixel value is extracted from the corresponding color pixel values in (). The description of MIN () in Expressions (2) and (4) indicates that the minimum pixel value is extracted from the corresponding color pixel values in ().

第3生成部33は、第3情報、即ち、2×2画素の画素領域の各々に含まれる各色の階調幅を示す情報を生成する。
具体的には、第3生成部33は、第2生成部32により得られた各色の最大値及び最小値を用いて、2×2画素の画素領域がそれぞれ中間調領域に属するか否かを判定するために用いられる区分値を算出する。より具体的には、第3生成部33は、シアン(C)の区分値CTh1、CTh2、CTh3を以下の式(5)〜(7)により算出する。また、第3生成部33は、レッド(R)の区分値RTh1、RTh2、RTh3を以下の式(8)〜(10)により算出する。図7や後述する図13等における記載の対応関係を考慮し、これらの各色の3つの区分値のうち、CTh1、RTh1等に対応する各色の最小の区分値をTh1と記載し、CTh2、RTh2等に対応する各色の中間の区分値をTh2と記載し、CTh3、RTh3等に対応する各色の最大の区分値をTh3と記載する。
CTh1=CMin+(CMax−CMin)×1/6…(5)
CTh2=CMin+(CMax−CMin)×3/6…(6)
CTh3=CMin+(CMax−CMin)×5/6…(7)
RTh1=RMin+(RMax−RMin)×1/6…(8)
RTh2=RMin+(RMax−RMin)×3/6…(9)
RTh3=RMin+(RMax−RMin)×5/6…(10)
The third generation unit 33 generates third information, that is, information indicating the gradation width of each color included in each pixel region of 2 × 2 pixels.
Specifically, the third generation unit 33 uses the maximum value and the minimum value of each color obtained by the second generation unit 32 to determine whether each 2 × 2 pixel region belongs to a halftone region. A partition value used for determination is calculated. More specifically, the third generation unit 33 calculates cyan (C) segment values CTh1, CTh2, and CTh3 by the following equations (5) to (7). The third generation unit 33 calculates the red (R) segment values RTh1, RTh2, and RTh3 according to the following equations (8) to (10). Considering the correspondence described in FIG. 7 and FIG. 13 described later, among the three segment values of each color, the minimum segment value of each color corresponding to CTh1, RTh1, etc. is denoted as Th1, and CTh2, RTh2 The intermediate segment value of each color corresponding to etc. is described as Th2, and the maximum segment value of each color corresponding to CTh3, RTh3, etc. is described as Th3.
CTh1 = CMin + (CMax−CMin) × 1/6 (5)
CTh2 = CMin + (CMax−CMin) × 3/6 (6)
CTh3 = CMin + (CMax−CMin) × 5/6 (7)
RTh1 = RMin + (RMax−RMin) × 1/6 (8)
RTh2 = RMin + (RMax−RMin) × 3/6 (9)
RTh3 = RMin + (RMax−RMin) × 5/6 (10)

次に、第3生成部33は、以下に記載する中間調領域に属する画素領域の特徴に係る判定を行う。   Next, the 3rd production | generation part 33 performs the determination which concerns on the characteristic of the pixel area which belongs to the halftone area | region described below.

中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、最大値と最小値との差が基準値未満であるか否かの判定を色毎に行う。ここで、最大値と最小値との差が基準値未満であると判定された場合に、第3生成部33は、当該最大値及び最小値が対応する8×8画素に含まれる当該色の全ての画素領域が中間調領域であると判定する。
例えば、第3生成部33は、上記のシアン(C)の最大値CMax及び最小値CMinについて、以下の式(11)が満たされるか否か判定し、満たされると判定された場合、図3(c)の混在データのうちシアン(C)の画素値が含まれる全ての画素領域を中間調領域に属する画素領域と判定する。
CMax−CMin<CT…(11)
ここで、CTは8×8画素の画像ブロックを構成する色空間の各色のうち、シアン(C)の階調値の変位幅を判定するために設定される閾値である。後述する図13等における記載の対応関係を考慮し、このように階調値の変位幅を判定するために設定される各色の閾値にTの符号を付して記載する。CTは、シアン(C)の閾値Tである。CTは、0≦CT≦255の範囲内で、経験則から決定される。
同様に、第3生成部33は、上記のレッド(R)の最大値RMax及び最小値RMinについて、以下の式(12)が満たされるか否か判定し、満たされると判定された場合、図3(c)の混在データのうちレッド(R)の画素値が含まれる全ての画素領域を中間調領域と判定する。
RMax−RMin<RT…(12)
ここで、RTは、レッド(R)の閾値Tである。RTは、0≦RT≦255の範囲内で、経験則から決定される。
As the determination related to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 determines whether the difference between the maximum value and the minimum value is less than the reference value for each color. Here, when it is determined that the difference between the maximum value and the minimum value is less than the reference value, the third generation unit 33 sets the color of the color included in the 8 × 8 pixel corresponding to the maximum value and the minimum value. It is determined that all the pixel areas are halftone areas.
For example, the third generation unit 33 determines whether or not the following expression (11) is satisfied with respect to the maximum value CMax and the minimum value CMin of the cyan (C), and when it is determined that they are satisfied, FIG. Of the mixed data of (c), all the pixel areas including the cyan (C) pixel value are determined as pixel areas belonging to the halftone area.
CMax-CMin <CT (11)
Here, CT is a threshold value set to determine the displacement width of the cyan (C) tone value among the colors of the color space constituting the 8 × 8 pixel image block. In consideration of the correspondence relationship described in FIG. 13 and the like to be described later, the threshold value of each color set in order to determine the displacement width of the gradation value is described with the symbol T. CT is a threshold value T of cyan (C). CT is determined from an empirical rule within the range of 0 ≦ CT ≦ 255.
Similarly, the third generation unit 33 determines whether or not the following expression (12) is satisfied with respect to the maximum value RMax and the minimum value Rmin of the red (R), and when it is determined that the expression is satisfied, Of the mixed data of 3 (c), all the pixel areas including the red (R) pixel value are determined as halftone areas.
RMax-RMin <RT (12)
Here, RT is a threshold value T of red (R). RT is determined from empirical rules within the range of 0 ≦ RT ≦ 255.

また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、シアン(C)の2×2画素の画素領域に含まれる4画素のうち、以下の式(13)を満たす画素が1つ以上存在するか否かの判定を画素領域毎に行う。第3生成部33は、式(13)を満たすと判定された画素が含まれるシアン(C)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
CTh1<aij≦CTh3…(13)
また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、レッド(R)の2×2画素の画素領域に含まれる計4画素のうち、以下の式(14)を満たす画素が1つ以上存在するか否かの判定を画素領域毎に行う。第3生成部33は、式(14)を満たすと判定された画素が含まれるレッド(R)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
RTh1<aij≦RTh3…(14)
In addition, as a determination related to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 calculates the following expression (13) among the four pixels included in the 2 × 2 pixel area of cyan (C). It is determined for each pixel area whether one or more pixels are satisfied. The third generation unit 33 determines a 2 × 2 pixel area of cyan (C) including pixels determined to satisfy Expression (13) as a pixel area belonging to the halftone area.
CTh1 <a ij ≦ CTh3 (13)
Further, as a determination related to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 includes the following expression (14) among the total of four pixels included in the red (R) 2 × 2 pixel area: It is determined for each pixel area whether or not there is one or more pixels satisfying the above condition. The third generation unit 33 determines a pixel region of 2 × 2 pixels of red (R) that includes a pixel determined to satisfy Expression (14) as a pixel region belonging to the halftone region.
RTh1 <a ij ≦ RTh3 (14)

また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、シアン(C)の2×2画素の画素領域に含まれる4画素全てが以下の式(15)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(15)を満たすと判定されたシアン(C)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
ij≦CTh1…(15)
また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、レッド(R)の2×2画素の画素領域に含まれる4画素全てが以下の式(16)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(16)を満たすと判定されたレッド(R)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
ij≦RTh1…(16)
Further, as a determination related to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 satisfies all of the following Expression (15) for all four pixels included in the pixel area of 2 × 2 pixels of cyan (C). Is determined for each pixel region. The third generation unit 33 determines a pixel area of 2 × 2 pixels of cyan (C) that is determined that all four pixels satisfy Expression (15) as a pixel area belonging to the halftone area.
a ij ≦ CTh1 (15)
In addition, as a determination relating to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 satisfies all of the following Expression (16) for all four pixels included in the red (R) 2 × 2 pixel area. Is determined for each pixel region. The third generation unit 33 determines that the pixel area of 2 × 2 pixels of red (R), in which it is determined that all four pixels satisfy Expression (16), as the pixel area belonging to the halftone area.
a ij ≦ RTh1 (16)

また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、シアン(C)の2×2画素の画素領域に含まれる4画素全てが以下の式(17)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(17)を満たすと判定されたシアン(C)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
CTh3<aij…(17)
また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、レッド(R)の2×2画素の画素領域に含まれる4画素全てが以下の式(18)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(18)を満たすと判定されたレッド(R)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
RTh3<aij…(18)
Further, as a determination related to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 satisfies all of the four pixels included in the pixel area of 2 × 2 pixels of cyan (C) satisfying the following expression (17). Is determined for each pixel region. The third generation unit 33 determines a pixel area of 2 × 2 pixels of cyan (C) that is determined that all four pixels satisfy Expression (17) as a pixel area belonging to the halftone area.
CTh3 <a ij (17)
Further, as a determination relating to the characteristics of the pixel area belonging to the halftone area, the third generation unit 33 satisfies all of the following Expression (18) for all four pixels included in the red (R) 2 × 2 pixel area. Is determined for each pixel region. The third generation unit 33 determines that the pixel area of 2 × 2 pixels of red (R), in which it is determined that all four pixels satisfy Expression (18), as the pixel area belonging to the halftone area.
RTh3 <a ij (18)

また、第3生成部33は、これらの中間調領域に属する画素領域の特徴に係る判定を経て、いずれの判定においても中間調領域と判定されなかった2×2の画素領域を高解像度領域に属する画素領域と判定する。
第3生成部33は、上記の判定結果に応じて各ブロックに対応する画素領域が中間調領域又は高解像度領域のいずれに属するかを示す情報を第4生成部34及び出力部35に出力する。
In addition, the third generation unit 33 determines, as a high-resolution area, a 2 × 2 pixel area that has not been determined as a halftone area in any of the determinations after determining the characteristics of the pixel areas belonging to these halftone areas. The pixel area is determined to belong.
The third generation unit 33 outputs, to the fourth generation unit 34 and the output unit 35, information indicating whether the pixel area corresponding to each block belongs to the halftone area or the high resolution area according to the determination result. .

第4生成部34は、第1情報、第2情報及び第3情報に基づいて、第4情報、即ち、2×2画素の画素領域を構成する複数の画素の画素値を色毎に階調幅に応じた符号化方法で符号化した符号値を生成する。また、第4生成部34は、各画素領域に対応する各ブロックの符号値を示す情報を出力部35に出力する。
図2に示すように、第4生成部34は、第1処理部34a及び第2処理部34bを備える。
Based on the first information, the second information, and the third information, the fourth generation unit 34 converts the fourth information, that is, the pixel values of a plurality of pixels constituting the pixel region of 2 × 2 pixels for each color to the gradation width. A code value encoded by an encoding method according to the above is generated. Further, the fourth generation unit 34 outputs information indicating the code value of each block corresponding to each pixel region to the output unit 35.
As illustrated in FIG. 2, the fourth generation unit 34 includes a first processing unit 34a and a second processing unit 34b.

第1処理部34aは、中間調領域に属する色の画素値を符号化する。以下、第1処理部34aによる符号化を第1符号化処理と記載する場合がある。
具体的には、第1処理部34aは、まず、中間調領域に属する2×2画素の画素領域に含まれる4画素の画素値の平均値を画素領域毎に算出する。そして、第1処理部34aは、算出された平均値と、第2生成部32から出力された各色の画素値の最大値及び最小値ならびに第3生成部33から出力された各色の区分値とに基づいて、各画素領域に対応するブロックの符号値を決定する。
The first processing unit 34a encodes pixel values of colors belonging to the halftone area. Hereinafter, the encoding by the first processing unit 34a may be referred to as a first encoding process.
Specifically, the first processing unit 34a first calculates an average value of pixel values of four pixels included in a 2 × 2 pixel region belonging to the halftone region for each pixel region. Then, the first processing unit 34 a calculates the calculated average value, the maximum and minimum pixel values of each color output from the second generation unit 32, and the division value of each color output from the third generation unit 33. Based on the above, the code value of the block corresponding to each pixel region is determined.

例えば、第1処理部34aは、以下の式(19)により、中間調領域に属する色の2×2画素の画素領域に含まれる4画素の画素値の平均値avrijを算出する。

Figure 0006044347
また、第1処理部34aは、シアン(C)の2×2画素の画素領域について、以下の関係式(20)〜(23)により、平均値avrijを最小値CMin、3つの区分値CTh1、CTh2、CTh3、最大値CMaxと比較することによって量子化してBTC符号の符号値BTCIJを割り当てる。
CMin≦avrij<CTh1の場合、BTCIJ=00…(20)
CTh1≦avrij<CTh2の場合、BTCIJ=01…(21)
CTh2≦avrij<CTh3の場合、BTCIJ=10…(22)
CTh3≦avrij≦CMaxの場合、BTCIJ=11…(23)
また、第1処理部34aは、レッド(R)の2×2画素の画素領域について、以下の関係式(24)〜(27)により、平均値avrijを最小値RMin、3つの区分値RTh1、RTh2、RTh3、最大値RMaxと比較することによって量子化してBTC符号の符号値BTCIJを割り当てる。
RMin≦avrij<RTh1の場合、BTCIJ=00…(24)
RTh1≦avrij<RTh2の場合、BTCIJ=01…(25)
RTh2≦avrij<RTh3の場合、BTCIJ=10…(26)
RTh3≦avrij≦RMaxの場合、BTCIJ=11…(27) For example, the first processing unit 34a calculates the average value avr ij of the pixel values of four pixels included in the pixel region of 2 × 2 pixels of the color belonging to the halftone region by the following equation (19).
Figure 0006044347
Further, the first processing unit 34a calculates the average value avr ij as the minimum value CMin and the three segment values CTh1 according to the following relational expressions (20) to (23) for the pixel region of 2 × 2 pixels of cyan (C). , CTh2, CTh3, and the maximum value CMmax are quantized and assigned with a code value BTC IJ of the BTC code.
When CMin ≦ avr ij <CTh1, BTC IJ = 00 (20)
In the case of CTh1 ≦ avr ij <CTh2, BTC IJ = 01 (21)
If CTh2 ≦ avr ij <CTh3, BTC IJ = 10 (22)
If CTh3 ≦ avr ij ≦ CMax, BTC IJ = 11 (23)
Further, the first processing unit 34a sets the average value avr ij to the minimum value RMin and the three segment values RTh1 according to the following relational expressions (24) to (27) for the pixel region of 2 × 2 pixels of red (R). , RTh2, RTh3 and the maximum value RMax are quantized and assigned a code value BTC IJ of the BTC code.
When RMin ≦ avr ij <RTh1, BTC IJ = 00 (24)
When RTh1 ≦ avr ij <RTh2, BTC IJ = 01 (25)
When RTh2 ≦ avr ij <RTh3, BTC IJ = 10 (26)
When RTh3 ≦ avr ij ≦ RMax, BTC IJ = 11 (27)

このように、第1処理部34aは、2×2画素の画素領域を構成する複数の画素の画素値を平均化した平均値に基づいて当該一色の符号値を得る。また、第1処理部34aは、中間調領域に属する色について、当該色の最大値と最小値との差に対応する階調の範囲をCTh1、CTh2、CTh3等の3つの区分値で4つの区分に区切って各区分に対応する符号値として「00」、「01」、「10」、「11」の符号値を設定し、平均値が含まれる区分に対応する符号値を特定し、その平均値が算出された2×2画素の画素領域の当該色の符号値とする。   As described above, the first processing unit 34a obtains the code value of the one color based on the average value obtained by averaging the pixel values of a plurality of pixels constituting the 2 × 2 pixel region. In addition, the first processing unit 34a has four gradation values corresponding to the difference between the maximum value and the minimum value of the color for the color belonging to the halftone area with three division values such as CTh1, CTh2, and CTh3. The code values of “00”, “01”, “10”, “11” are set as the code values corresponding to each of the sections divided into the sections, the code values corresponding to the sections including the average value are specified, The code value of the color of the pixel region of 2 × 2 pixels for which the average value is calculated is used.

第2処理部34bは、高解像度領域に属する色の画素値を第1処理部34aによる符号化と異なる符号化方法で符号化する。以下、第2処理部34bによる符号化を第2符号化処理と記載する場合がある。
具体的には、第2処理部34bは、まず、高解像度領域に属する2×2画素の画素領域を構成する4画素の各々の画素値を2値化して2×2画素に対応する濃度パターンを生成する。そして、第2処理部34bは、予め定められた濃度パターンと符号値との対応関係に応じて、生成された濃度パターンに対応する符号値を得る。
The second processing unit 34b encodes the pixel value of the color belonging to the high resolution region by an encoding method different from the encoding by the first processing unit 34a. Hereinafter, the encoding by the second processing unit 34b may be referred to as a second encoding process.
Specifically, the second processing unit 34b first binarizes the pixel values of the four pixels constituting the pixel region of 2 × 2 pixels belonging to the high resolution region, and density patterns corresponding to 2 × 2 pixels. Is generated. Then, the second processing unit 34b obtains a code value corresponding to the generated density pattern in accordance with a correspondence relationship between a predetermined density pattern and a code value.

例えば、第2処理部34bは、以下の関係式(28)、(29)により、高解像度領域に属するシアン(C)の2×2画素の画素領域を構成する4画素の各々の画素値を「0」又は「1」のいずれかの値に置き換える2値化処理を行う。
ij>CTh3の場合、aij=1…(28)
ij≦CTh1の場合、aij=0…(29)
そして、第2処理部34bは、図8に示すように、予め定められた濃度パターンと符号値との対応関係を示す濃度パターンデータを参照して、上記の関係式(28)、(29)により「0」と「1」の値の組み合わせに置き換えられた2×2画素の濃度パターンが該当する符号値を特定する。濃度パターンデータは、例えば、第2処理部34bに接続された濃度パターンデータ記憶部34cに記憶されている。
例えば、2×2画素の画素領域に含まれる4画素のうち、「0」に置き換えられた画素が3つであり、「1」に置き換えられた画素が1つである濃度パターンの場合、第2処理部34bは、当該画素領域の符号を「00」とする。また、2×2画素の画素領域に含まれる4画素のうち、「0」に置き換えられた画素が1つであり、「1」に置き換えられた画素が3つである濃度パターンの場合、第2処理部34bは、当該画素領域の符号を「11」とする。また、2×2画素の画素領域に含まれる4画素のうち、「0」に置き換えられた画素が2つであり、「1」に置き換えられた画素が2つである濃度パターンの場合、第2処理部34bは、「0」と「1」の位置関係に応じて、当該画素領域の符号を「01」又は「10」のいずれかとする。
また、第2処理部34bは、以下の関係式(30)、(31)により、高解像度領域に属するレッド(R)の2×2画素の画素領域を構成する4画素の各々の画素値を「0」又は「1」のいずれかの値に置き換える2値化処理を行う。
ij>RTh3の場合、aij=1…(30)
ij≦RTh1の場合、aij=0…(31)
そして、第2処理部34bは、図8に示すように、予め定められた濃度パターンと符号値との対応関係を示す濃度パターンデータを参照して、上記の関係式(30)、(31)により「0」と「1」の値の組み合わせに置き換えられた2×2画素の濃度パターンが該当する符号値を特定する。
For example, the second processing unit 34b uses the following relational expressions (28) and (29) to calculate the pixel values of the four pixels constituting the 2 × 2 pixel area of cyan (C) belonging to the high resolution area. A binarization process is performed to replace the value with either “0” or “1”.
When a ij > CTh3, a ij = 1 (28)
When a ij ≦ CTh1, a ij = 0 (29)
Then, as shown in FIG. 8, the second processing unit 34b refers to the density pattern data indicating the correspondence between the predetermined density pattern and the code value, and the relational expressions (28) and (29) described above. Thus, the code value corresponding to the density pattern of 2 × 2 pixels replaced with the combination of the values “0” and “1” is specified. The density pattern data is stored in, for example, a density pattern data storage unit 34c connected to the second processing unit 34b.
For example, in the case of a density pattern in which four pixels included in a pixel area of 2 × 2 pixels have three pixels replaced with “0” and one pixel replaced with “1”, The two processing unit 34b sets the code of the pixel area to “00”. In the case of a density pattern in which one pixel replaced with “0” and three pixels replaced with “1” among the four pixels included in the 2 × 2 pixel region are The two processing unit 34b sets the code of the pixel area to “11”. In the case of a density pattern in which two pixels replaced with “0” and two pixels replaced with “1” are included in the four pixels included in the pixel region of 2 × 2 pixels, The two processing unit 34b sets the code of the pixel area to “01” or “10” according to the positional relationship between “0” and “1”.
In addition, the second processing unit 34b calculates the pixel values of the four pixels constituting the red (R) 2 × 2 pixel area belonging to the high resolution area according to the following relational expressions (30) and (31). A binarization process is performed to replace the value with either “0” or “1”.
When a ij > RTh3, a ij = 1 (30)
When a ij ≦ RTh1, a ij = 0 (31)
Then, as shown in FIG. 8, the second processing unit 34b refers to the density pattern data indicating the correspondence relationship between the predetermined density pattern and the code value, and the relational expressions (30) and (31) described above. Thus, the code value corresponding to the density pattern of 2 × 2 pixels replaced with the combination of the values “0” and “1” is specified.

このように、第2処理部34bは、濃度パターンを4つのパターンにグループ分けし、各グループに割り当てられた符号値に応じて高解像度領域に属する2×2画素の画素領域を量子化してBTC符号の符号値BTCIJを割り当てる。 As described above, the second processing unit 34b divides the density pattern into four patterns, quantizes the 2 × 2 pixel area belonging to the high resolution area according to the code value assigned to each group, and performs BTC. A code value BTC IJ of the code is assigned.

以上、混在データに含まれる部分データのうち、C/Rプレートに含まれる画素値の符号化について説明したが、他の部分データに係る符号化についても同様の流れで符号化が行われる。
例えば、M/Gプレートに含まれる画素値の符号化処理は、上記のシアン(C)をマゼンタ(M)に置き換え、上記のレッド(R)をグリーン(G)に置き換えた処理となる。同様に、Y/Bプレートに含まれる画素値の符号化処理は、上記のシアン(C)をイエロー(Y)に置き換え、上記のレッド(R)をブルー(B)に置き換えた処理となる。また、Kプレートに含まれる画素値の符号化処理は、上記のシアン(C)をマゼンタ(K)に置き換えた処理となる。
In the above, encoding of pixel values included in the C / R plate among the partial data included in the mixed data has been described. However, encoding related to other partial data is performed in the same flow.
For example, the encoding process of the pixel values included in the M / G plate is a process in which the above cyan (C) is replaced with magenta (M) and the above red (R) is replaced with green (G). Similarly, the encoding process of the pixel values included in the Y / B plate is a process in which the above cyan (C) is replaced with yellow (Y) and the above red (R) is replaced with blue (B). Further, the encoding process of the pixel values included in the K plate is a process in which the above cyan (C) is replaced with magenta (K).

出力部35は、第1情報、第2情報、第3情報及び第4情報を含むデータを符号データとして出力する。
具体的には、出力部35は、色数が最も多い色空間の色数に応じた数の色別プレートと、色別プレートと別の追加プレートと、を生成し、色別プレートの各々に色数が最も多い色空間の第2情報、第3情報及び第4情報を色別に設定すると共に、一部又は全部の色別プレートの各々に他の色空間の第3情報及び第4情報を色別に設定し、追加プレートに第1情報及び他の色空間の第2情報を設定し、色別プレート及び追加プレートにより構成されるデータを符号データとして出力する。
より具体的には、出力部35は、例えば、図5、図6を参照して説明した形式の符号データを出力する。
The output unit 35 outputs data including first information, second information, third information, and fourth information as code data.
Specifically, the output unit 35 generates a number of color-specific plates corresponding to the number of colors in the color space with the largest number of colors, a color-specific plate, and another additional plate, and each color-specific plate The second information, the third information, and the fourth information of the color space having the largest number of colors are set for each color, and the third information and the fourth information of the other color space are set on each of the color-specific plates. Setting is performed for each color, the first information and the second information of another color space are set on the additional plate, and data constituted by the color-specific plate and the additional plate is output as code data.
More specifically, the output unit 35 outputs code data in the format described with reference to FIGS. 5 and 6, for example.

符号化部30は、上記のように、混在データを構成する複数の画素を8×8画素単位で色毎に符号化して符号データを生成する処理を繰り返すことで混在データの全画素及び全色の符号化を行う。   As described above, the encoding unit 30 encodes a plurality of pixels constituting the mixed data for each color in units of 8 × 8 pixels, and repeats the process of generating the code data, whereby all the pixels and all the colors of the mixed data are generated. Is encoded.

次に、符号データの復号化について説明する。
図2に示すように、復号化部40は、特定部41、取得部42、第5生成部43等を備える。
Next, decoding of code data will be described.
As illustrated in FIG. 2, the decoding unit 40 includes a specifying unit 41, an acquisition unit 42, a fifth generation unit 43, and the like.

特定部41は、第1情報に基づいて2×2画素の画素領域の各々の色空間を特定する。
具体的には、特定部41は、符号データの追加プレートであるTAGプレートの上位側から数えて先頭の1ビットに設定された色系プレーンを読み出して、4×4の各ブロックの色空間を特定する。特定部41は、各ブロックの色空間の特定結果を第5生成部43に出力する。
The specifying unit 41 specifies the color space of each 2 × 2 pixel area based on the first information.
Specifically, the specifying unit 41 reads the color system plane set to the first bit counted from the upper side of the TAG plate, which is an additional plate of code data, and determines the color space of each 4 × 4 block. Identify. The specifying unit 41 outputs the result of specifying the color space of each block to the fifth generation unit 43.

例えば、図5に示す例の場合、b00、b01、b02、b03、b10、b11、b12、b13、b20、b21、b30、b31にはCMYK色空間を示す「0」の符号が設定され、b22、b23、b32、b33にはRGB色空間を示す「1」の符号が設定されている。この場合、特定部41は、b00、b01、b02、b03、b10、b11、b12、b13、b20、b21、b30、b31の各ブロックに対応する2×2の画素領域が符号化前にCMYK色空間の画素値を含む画素領域であったと特定し、b22、b23、b32、b33の各ブロックに対応する2×2の画素領域が符号化前にRGB色空間の画素値を含む画素領域であったと特定する。 For example, in the case of the example shown in FIG. 5, b 00 , b 01 , b 02 , b 03 , b 10 , b 11 , b 12 , b 13 , b 20 , b 21 , b 30 , b 31 are in the CMYK color space. A code “0” indicating the RGB color space is set in b 22 , b 23 , b 32 , and b 33 . In this case, the specifying unit 41 is a block corresponding to each block of b 00 , b 01 , b 02 , b 03 , b 10 , b 11 , b 12 , b 13 , b 20 , b 21 , b 30 , b 31. The 2 × 2 pixel area corresponding to each block of b 22 , b 23 , b 32 , and b 33 is identified as a pixel area including a pixel value of the CMYK color space before encoding. It is specified that the pixel region includes a pixel value in the RGB color space before encoding.

取得部42は、第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得する。
具体的には、取得部42は、符号データの色別プレートの各々の上位側から数えて4ビット目、即ち、末尾の1ビットに設定された第1の差分プレーンを読み出して、CMYK色空間の各色の画素値の最大値及び最小値を取得する。
また、取得部42は、符号データの追加プレートであるTAGプレートの上位側から数えて2〜4ビット目に設定された第2の差分プレーンを読み出して、RGB色空間の各色の画素値の最大値及び最小値を取得する。
取得部42は、取得された各色の画素値の最大値及び最小値を第5生成部43に出力する。
The acquisition unit 42 acquires the maximum value and the minimum value of the pixel values of each color constituting each color space based on the second information.
Specifically, the acquisition unit 42 reads the first difference plane set to the fourth bit, that is, the last one bit from the upper side of each color-coded plate of the code data, and obtains the CMYK color space. The maximum value and the minimum value of the pixel values of each color are acquired.
In addition, the acquisition unit 42 reads the second difference plane set in the 2nd to 4th bits from the upper side of the TAG plate, which is an additional plate of code data, and calculates the maximum pixel value of each color in the RGB color space. Get value and minimum value.
The acquisition unit 42 outputs the acquired maximum value and minimum value of the pixel values of each color to the fifth generation unit 43.

第5生成部43は、特定部41により特定された色空間、取得部42により特定された各色の画素値の最大値及び最小値、第3情報及び第4情報に基づいて符号値を色毎に復号化した復号値を生成する。以下、第5生成部43による復号値の生成の一例として、符号データの色別プレートのうち、C/Rプレートに含まれる符号値に対応する復号値の生成について説明する。
図2に示すように、第5生成部43は、判定部43a、第3処理部43b及び第4処理部43cを備える。
The fifth generation unit 43 sets the code value for each color based on the color space specified by the specifying unit 41, the maximum and minimum pixel values of each color specified by the acquisition unit 42, the third information, and the fourth information. A decrypted value is generated by decrypting the data. Hereinafter, as an example of the generation of the decoded value by the fifth generation unit 43, generation of a decoded value corresponding to the code value included in the C / R plate among the color-specific plates of the code data will be described.
As illustrated in FIG. 2, the fifth generation unit 43 includes a determination unit 43a, a third processing unit 43b, and a fourth processing unit 43c.

判定部43aは、第3情報に基づいて、符号化部30の第4生成部34により符号化された所定の画素領域に含まれる各色が中間調領域又は高解像度領域のいずれに属するのかを判定する。
具体的には、判定部43aは、符号データのC/Rプレートの上位側から数えて先頭の1ビットに設定された識別プレーンを読み出して、各ブロックに対応する2×2画素の画素領域が符号化前に中間調領域又は高解像度領域のいずれに属する画素領域であったのかを判定する。
The determination unit 43a determines, based on the third information, whether each color included in the predetermined pixel region encoded by the fourth generation unit 34 of the encoding unit 30 belongs to the halftone region or the high resolution region. To do.
Specifically, the determination unit 43a reads the identification plane set to the first 1 bit counted from the upper side of the C / R plate of the code data, and the pixel area of 2 × 2 pixels corresponding to each block is obtained. Before encoding, it is determined whether the pixel area belongs to the halftone area or the high resolution area.

第3処理部43bは、判定部43aにより中間調領域と判定された色の符号値を復号化する。以下、第3処理部43bによる復号化を第1復号化処理と記載する場合がある。
具体的には、第3処理部43bは、例えば、特定部41から出力された情報を用いて、C/Rプレートの各ブロックのうち、判定部43aにより中間調領域と判定されたブロックの色空間を特定する。次に、第3処理部43bは、CMYK色空間と特定されたブロックの上位側から数えて2、3ビット目に設定された符号値を読み出す。ここで、C/Rプレートから読み出されるCMYK色空間の符号値は、シアン(C)の符号値であることから、即ち、第3処理部43bは、シアン(C)の符号値を読み出す。そして、第3処理部43bは、取得部42から出力された情報を用いて、読み出されたシアン(C)の符号値を復号化する。
また、第3処理部43bは、例えば、RGB色空間と特定されたブロックの上位側から数えて2、3ビット目に設定された符号値を読み出して、レッド(R)の符号値を読み出す。そして、第3処理部43bは、取得部42から出力された情報を用いて、読み出されたレッド(R)の符号値を復号化する。
The third processing unit 43b decodes the code value of the color determined as the halftone area by the determination unit 43a. Hereinafter, the decoding by the third processing unit 43b may be referred to as a first decoding process.
Specifically, the third processing unit 43b uses the information output from the specifying unit 41, for example, among the blocks of the C / R plate, the color of the block determined as the halftone area by the determination unit 43a Identify the space. Next, the third processing unit 43b reads the code value set in the second and third bits from the upper side of the block identified as the CMYK color space. Here, since the code value of the CMYK color space read from the C / R plate is the code value of cyan (C), that is, the third processing unit 43b reads the code value of cyan (C). Then, the third processing unit 43b decodes the read cyan (C) code value using the information output from the acquisition unit 42.
In addition, the third processing unit 43b reads the code value set in the second and third bits from the upper side of the block specified as the RGB color space, for example, and reads the code value of red (R). And the 3rd process part 43b decodes the read code value of red (R) using the information output from the acquisition part 42. FIG.

例えば、第3処理部43bは、図7にも示すように、以下の関係式(32)〜(35)により、シアン(C)の符号値を復号化して当該符号値が設定されたブロックに対応する2×2画素の画素領域の4画素の画素値Aijを算出する。中間調領域と判定されたブロックに対応する2×2画素のシアン(C)の画素値は、4画素とも、算出された同一の画素値Aijに復号化される。
BTCIJ=00の場合、Aij=CMin…(32)
BTCIJ=01の場合、Aij=CMin+(CMax−CMin)×1/3…(33)
BTCIJ=10の場合、Aij=CMin+(CMax−CMin)×2/3…(34)
BTCIJ=11の場合、Aij=CMax…(35)
また、第3処理部43bは、図7にも示すように、以下の関係式(36)〜(39)により、レッド(R)の符号値を復号化して当該符号値が設定されたブロックに対応する2×2画素の画素領域の4画素の画素値Aijを算出する。中間調領域と判定されたブロックに対応する2×2画素のレッド(R)の画素値は、4画素とも同一の画素値Aijに復号化される。
BTCIJ=00の場合、Aij=RMin…(36)
BTCIJ=01の場合、Aij=RMin+(RMax−RMin)×1/3…(37)
BTCIJ=10の場合、Aij=RMin+(RMax−RMin)×2/3…(38)
BTCIJ=11の場合、Aij=RMax…(39)
For example, as shown in FIG. 7, the third processing unit 43b decodes the code value of cyan (C) according to the following relational expressions (32) to (35), and sets the code value to the block. A pixel value A ij of four pixels in the corresponding 2 × 2 pixel pixel region is calculated. All the 2 × 2 pixel values of cyan (C) corresponding to the block determined to be a halftone area are decoded into the same calculated pixel value A ij .
When BTC IJ = 00, A ij = CMin (32)
When BTC IJ = 01, A ij = CMin + (CMax−CMin) × 1/3 (33)
When BTC IJ = 10, A ij = CMin + (CMax−CMin) × 2/3 (34)
When BTC IJ = 11, A ij = CMax (35)
Further, as shown in FIG. 7, the third processing unit 43b decodes the code value of red (R) according to the following relational expressions (36) to (39) and sets the code value to the block set with the code value. A pixel value A ij of four pixels in the corresponding 2 × 2 pixel pixel region is calculated. The red (R) pixel value of 2 × 2 pixels corresponding to the block determined to be a halftone area is decoded to the same pixel value A ij for all four pixels.
When BTC IJ = 00, A ij = RMin (36)
When BTC IJ = 01, A ij = RMin + (RMax−RMin) × 1/3 (37)
When BTC IJ = 10, A ij = RMin + (RMax−RMin) × 2/3 (38)
When BTC IJ = 11, A ij = RMax (39)

このように、第3処理部43bは、符号値が取り得る値である「00」、「01」、「10」、「11」の各々に対して個別に復号値を色毎に設定し、各ブロックの符号値のうち、中間調領域に属すると判定された色のブロックについて、当該色の符号値に対応する復号値を特定する。
また、上記の(32)〜(39)の式において、画素値Aijは8ビットの画素値となる。即ち、第3処理部43bは、読み出された符号値に応じた場合分けを行うことで、符号値を8ビットの画素値に復号する。
In this way, the third processing unit 43b individually sets the decoded value for each color for each of “00”, “01”, “10”, and “11” that can be taken by the code value, Among the code values of each block, for a color block determined to belong to the halftone area, a decoded value corresponding to the code value of the color is specified.
In the above equations (32) to (39), the pixel value A ij is an 8-bit pixel value. That is, the third processing unit 43b decodes the code value into an 8-bit pixel value by performing case classification according to the read code value.

第4処理部43cは、判定部43aにより高解像度領域と判定された色の符号値を第3処理部43bと異なる復号化方法で復号化する。以下、第4処理部43cによる復号化を第2復号化処理と記載する場合がある。
具体的には、第4処理部43cは、符号化部30の第2処理部34bにより得られた符号値と当該符号値に対応する濃度パターンを得るための参照データとに基づいて、当該符号値に対応する復号値を得る。
The fourth processing unit 43c decodes the code value of the color determined as the high resolution region by the determination unit 43a by a decoding method different from that of the third processing unit 43b. Hereinafter, the decoding by the fourth processing unit 43c may be referred to as a second decoding process.
Specifically, the fourth processing unit 43c, based on the code value obtained by the second processing unit 34b of the encoding unit 30 and the reference data for obtaining the density pattern corresponding to the code value, A decoded value corresponding to the value is obtained.

より具体的には、第4処理部43cは、例えば、図9から図12に示すテンプレート群を参照データとして、符号データの各ブロックの符号値のうち、高解像度領域と判定されたブロックの復号値を色毎に得るための処理を行う。図9〜図12に示すテンプレート群は、処理対象となる符号値が設定されたブロックを注目ブロックPとし、注目ブロックPとその周囲のブロックとの関係についてパターンマッチングを行うためのテンプレート群である。参照データは、例えば、第4処理部43cに接続された参照データ記憶部43dに記憶されている。   More specifically, for example, the fourth processing unit 43c decodes a block determined as a high-resolution area among the code values of each block of the code data using, for example, the template group illustrated in FIGS. 9 to 12 as reference data. Performs processing to obtain a value for each color. The template group illustrated in FIGS. 9 to 12 is a template group for performing pattern matching on the relationship between the block of interest P and its surrounding blocks, with the block to which the code value to be processed is set as the block of interest P. . The reference data is stored in, for example, a reference data storage unit 43d connected to the fourth processing unit 43c.

以下、一例として、高解像度領域と判定されたシアン(C)の符号値の復号化について説明する。
高解像度領域と判定されたシアン(C)の符号値が「00」である場合、第4処理部43cは、図9に示す第1テンプレート群を参照する。ここで、図9等においてVの符号が付されたブロックは、中間調領域と判定されたブロックであって、かつ、以下の式(40)を満たすことを条件とする。
|Vden−bIJMax|<T…(40)
ここで、Vdenは、第3処理部43bにより復号化されたVのブロックの復号値である。また、bIJMaxは、注目ブロックPが含まれる符号データの4×4ブロックにおけるシアン(C)の最大値CMaxである。また、Tは、中間調領域の復号値とbIJMaxの間における濃度差の大小を判断するための閾値として設定された所定の値である。
また、図9等においてWの符号が付されたブロックは、高解像度領域と判定されたブロックであって、かつ、以下の式(41)を満たすことを条件とする。
|WMax−bIJMax|<T…(41)
ここで、WMaxは、Wが含まれる符号データの4×4ブロックにおけるシアン(C)の最大値である。また、bIJMaxは、上記と同様、注目ブロックPが含まれる符号データの4×4ブロックにおけるシアン(C)の最大値CMaxである。ここで、Wの符号が付されたブロックと、注目ブロックPが同一の4×4ブロックに含まれている場合、|WMax−bIJMax|は0である。Wの符号が付されたブロックと、注目ブロックPとの関係が、符号化される4×4ブロックどうしの境目を挟んで隣接するブロックである場合、|WMax−bIJMax|が0とならない場合が有り得る。また、Tは、高解像度領域のブロック間の濃度差の大小を判断するための閾値として設定された所定の値である。
なお、テンプレートにおいて符号が付されている領域が注目ブロックPの色空間と異なる色空間である場合、条件は満たされないものとして扱われる。例えば、シアン(C)の注目ブロックPに対して、VやWの符号が付されたブロックの色がRGB色空間の色であるレッド(R)である場合、条件は満たされないこととなる。
Hereinafter, as an example, decoding of a code value of cyan (C) determined to be a high resolution region will be described.
When the code value of cyan (C) determined to be the high resolution region is “00”, the fourth processing unit 43c refers to the first template group shown in FIG. Here, in FIG. 9 and the like, the block to which the symbol V is attached is a block determined as a halftone area, and satisfies the following expression (40).
| V den -b IJMax | <T C ... (40)
Here, V den is a decoded value of the block of V decoded by the third processing unit 43b. B IJMax is the maximum value CMax of cyan (C) in the 4 × 4 block of the code data including the target block P. TC is a predetermined value set as a threshold value for determining the magnitude of the density difference between the decoded value of the halftone area and b IJMax .
In addition, in FIG. 9 and the like, a block to which a symbol W is attached is a block that is determined to be a high-resolution area and satisfies the following expression (41).
| W Max −b IJMax | <T M (41)
Here, W Max is the maximum value of cyan (C) in a 4 × 4 block of code data including W. Further, b IJMax is the maximum value CMax of cyan (C) in the 4 × 4 block of the code data including the target block P, as described above. Here, if the block with the symbol W and the target block P are included in the same 4 × 4 block, | W Max −b IJMax | is 0. When the relationship between the block to which the sign of W is attached and the target block P is an adjacent block across the boundary between 4 × 4 blocks to be encoded, | W Max −b IJMax | does not become 0. There may be cases. Further, TM is a predetermined value set as a threshold for determining the magnitude of the density difference between blocks in the high resolution area.
In addition, when the area | region to which the code | symbol is attached | subjected in the template is a color space different from the color space of the block of attention P, it is handled as what is not satisfy | filled. For example, the condition is not satisfied when the color of a block to which a symbol of V or W is attached is red (R), which is a color in the RGB color space, for the target block P of cyan (C).

なお、T、Tは濃度差が小さいかどうかを判断するための閾値であり、適宜設定することが可能であるが、例えば、T=30、T=35等に設定することができる。このようにT、Tは異なる値としてもよいし同じ値としてもよい。このT、Tと比較することにより、濃度差が小さい、即ち、V又はWの位置の画素と注目ブロックPとが同程度の濃度となる濃度パターンを予測する。 Note that T C and T M are thresholds for determining whether the density difference is small, and can be set as appropriate. For example, T C = 30, T M = 35, and the like can be set. it can. Thus, T C and T M may be different values or the same value. By comparing with T C and T M , a density pattern is predicted in which the density difference is small, that is, the pixel at the V or W position and the target block P have the same density.

図9等に示すように、各テンプレートには、復号パターンと優先順位を示す情報が対応付けられている。
復号パターンは、注目ブロックPの符号値を復号化する際に用いられる濃度パターンである。第4処理部43cは、各テンプレートについて、V、W等の符号が付されたブロックに係る条件が満たされたか否かを判定し、最も条件が合致するテンプレートを特定する。そして、第4処理部43cは、特定されたテンプレートに対応付けられた復号パターンに応じた復号値を算出する。ここで、復号パターンとして記載された2×2画素に付された数値のうち、「1」に対応する位置の画素には注目ブロックPが含まれる符号データの4×4ブロックにおけるシアン(C)の最大値CMaxが復号値として設定される。また、復号パターンとして記載された2×2画素に付された数値のうち、「0」に対応する位置の画素には注目ブロックPが含まれる符号データの4×4ブロックにおけるシアン(C)の最小値CMinが復号値として設定される。ここで、復号値として設定されることとなるCMax、CMinは共に8ビットの値である。即ち、第4処理部43cは、符号値を8ビットの画素値に復号する。
As shown in FIG. 9 and the like, each template is associated with information indicating a decoding pattern and a priority order.
The decoding pattern is a density pattern used when decoding the code value of the block of interest P. For each template, the fourth processing unit 43c determines whether or not a condition related to a block with a symbol such as V or W is satisfied, and specifies a template that most closely matches the condition. And the 4th process part 43c calculates the decoding value according to the decoding pattern matched with the identified template. Here, among the numerical values assigned to the 2 × 2 pixels described as the decoding pattern, the pixel at the position corresponding to “1” includes cyan (C) in the 4 × 4 block of the code data including the target block P. Is set as the decoded value. Of the numerical values assigned to the 2 × 2 pixels described as the decoding pattern, the pixel at the position corresponding to “0” has cyan (C) in the 4 × 4 block of the code data including the block of interest P. The minimum value CMin is set as the decoded value. Here, CMax and CMin to be set as decoded values are both 8-bit values. That is, the fourth processing unit 43c decodes the code value into an 8-bit pixel value.

優先順位を示す情報は、第4処理部43cが各テンプレート群に含まれる複数のテンプレートを用いたパターンマッチングを行うに際して用いるテンプレートの優先順位を示す。
具体的には、図9等に示すように、テンプレートは3つの優先順位Q1、Q2、Q3に分類されており、各テンプレートに各々の優先順位を示す情報が対応付けられている。優先順位Q1は、優先順位Q2、Q3よりも優先順位が高いことを示し、優先順位Q2は、優先順位Q3よりも優先順位が高いことを示す。
第4処理部43cは、まず、優先順位Q1のテンプレートを用いてパターンマッチングを行う。優先順位Q1のテンプレートのいずれも「復号値を算出するための条件」を満たさなかった場合、第4処理部43cは、優先順位Q2のテンプレートを用いてパターンマッチングを行う。優先順位Q1、Q2のテンプレートのいずれも「復号値を算出するための条件」を満たさなかった場合、第4処理部43cは、優先順位Q3のテンプレートを用いてパターンマッチングを行う。
The information indicating the priority order indicates the priority order of templates used when the fourth processing unit 43c performs pattern matching using a plurality of templates included in each template group.
Specifically, as shown in FIG. 9 and the like, templates are classified into three priority orders Q1, Q2, and Q3, and information indicating each priority order is associated with each template. The priority level Q1 indicates that the priority level is higher than the priority levels Q2 and Q3, and the priority level Q2 indicates that the priority level is higher than the priority level Q3.
First, the fourth processing unit 43c performs pattern matching using a template with the priority order Q1. If none of the templates with the priority order Q1 satisfies the “condition for calculating the decoded value”, the fourth processing unit 43c performs pattern matching using the template with the priority order Q2. If neither of the templates of the priority orders Q1 and Q2 satisfies the “condition for calculating the decoded value”, the fourth processing unit 43c performs pattern matching using the template of the priority order Q3.

ここで、「復号値を算出するための条件」を満たすテンプレートの選定基準は、任意に定めることができる。
例えば、第4処理部43cは、優先順位Q1のテンプレートを用いたパターンマッチングでは、第4処理部43cは、V、W等の符号が付されたブロックについて全ての条件が満たされたテンプレートを復号化に用い、優先順位Q2のテンプレートを用いたパターンマッチングでは、第4処理部43cは、V、W等の符号が付されたブロックについて条件が満たされるブロックの個数を数値化し、当該数値化された数値が第1の基準値以上で、かつ、最大の数値を示すテンプレートを復号化に用い、優先順位Q3のテンプレートを用いたパターンマッチングでは、第4処理部43cは、V、W等の符号が付されたブロックについて条件が満たされるブロックの個数を数値化し、当該数値化された数値が第1の基準値よりも低い第2の基準値以上で、かつ、最大の数値を示すテンプレートを復号化に用いるようにしてもよい。当該例は一例であって、これに限られるものでなく、適宜変更することができる。
Here, a template selection criterion satisfying the “condition for calculating the decoded value” can be arbitrarily determined.
For example, in the pattern matching using the template of the priority order Q1, the fourth processing unit 43c decodes the template in which all the conditions are satisfied for the blocks with the codes such as V and W. In the pattern matching using the template of the priority order Q2, the fourth processing unit 43c quantifies the number of blocks that satisfy the condition for the blocks with the signs such as V and W, and performs the quantification. In the pattern matching using a template having a numerical value equal to or greater than the first reference value and indicating the maximum numerical value for decoding and using a template with the priority order Q3, the fourth processing unit 43c uses codes such as V and W. The number of blocks for which the condition is satisfied is quantified for the blocks marked with, and the quantified numerical value is equal to or lower than a second reference value lower than the first reference value. In, and may be used to decrypt the template indicating the maximum value. The said example is an example, Comprising: It is not restricted to this, It can change suitably.

また、優先順位Q3のテンプレートを用いたパターンマッチングを全て完了してもなお、「復号値を算出するための条件」を満たすテンプレートがない場合、第4処理部43cは、平均化パターンを用いて符号値を復号化する。
例えば、高解像度領域と判定されたシアン(C)の「00」の符号値について図9に示すテンプレートを用いてパターンマッチングを行い、「復号値を算出するための条件」を満たすテンプレートがないという結果が得られた場合、第4処理部43cは、以下の式(42)により平均化された画素値Aijを算出して当該符号値を復号化する。
BTCIJ=00の場合、Aij=CMax×1/4…(42)
平均化パターンを用いて符号値を復号化する場合、第4処理部43cは、当該符号値が設定されたブロックに対応する2×2画素の画素領域に含まれる4画素全てを平均化された画素値Aijで復号化する。
In addition, even when all the pattern matching using the templates of the priority order Q3 is completed, if there is no template that satisfies the “condition for calculating the decoded value”, the fourth processing unit 43c uses the average pattern. Decode the code value.
For example, pattern matching is performed using the template shown in FIG. 9 for the code value “00” of cyan (C) determined to be a high resolution area, and there is no template that satisfies the “condition for calculating the decoded value”. When the result is obtained, the fourth processing unit 43c calculates a pixel value A ij averaged by the following equation (42) and decodes the code value.
When BTC IJ = 00, A ij = CMax × 1/4 (42)
When the code value is decoded using the average pattern, the fourth processing unit 43c averages all four pixels included in the 2 × 2 pixel pixel area corresponding to the block in which the code value is set. Decode with pixel value A ij .

以上、高解像度領域と判定されたシアン(C)の「00」の符号値の復号化について説明したが、第4処理部43cは、他の符号値についても同様の流れで復号化を行う。
例えば、高解像度領域と判定されたシアン(C)の「01」の符号値について、第4処理部43cは、図10に示す第2テンプレート群を用いてパターンマッチングを行う。また、高解像度領域と判定されたシアン(C)の「10」の符号値について、第4処理部43cは、図11に示す第3テンプレート群を用いてパターンマッチングを行う。また、高解像度領域と判定されたシアン(C)の「11」の符号値について、第4処理部43cは、図12に示す第4テンプレート群を用いてパターンマッチングを行う。
パターンマッチングを行った結果として「復号値を算出するための条件」を満たすテンプレートがないという結果が得られた場合、第4処理部43cは、式(43)〜(45)のうち、復号化される符号値に応じた式により平均化された画素値を算出して当該符号値を復号化する。なお、式(42)〜(45)に示すように、画素値Aijは、CMaxを用いて算出される8ビットの画素値である。即ち、第4処理部43cは、符号値を8ビットの画素値に復号する。
BTCIJ=01の場合、Aij=CMax×2/4…(43)
BTCIJ=10の場合、Aij=CMax×2/4…(44)
BTCIJ=11の場合、Aij=CMax×3/4…(45)
The decoding of the code value “00” of cyan (C) determined to be the high resolution region has been described above, but the fourth processing unit 43 c performs decoding in the same flow for other code values.
For example, for the code value “01” of cyan (C) determined to be a high resolution region, the fourth processing unit 43c performs pattern matching using the second template group shown in FIG. For the code value “10” of cyan (C) determined to be the high resolution region, the fourth processing unit 43c performs pattern matching using the third template group shown in FIG. Further, the fourth processing unit 43c performs pattern matching on the code value “11” of cyan (C) determined to be the high resolution region, using the fourth template group shown in FIG.
When the result of the pattern matching is that there is no template that satisfies the “condition for calculating the decoded value”, the fourth processing unit 43c decodes among the expressions (43) to (45). The averaged pixel value is calculated by an expression corresponding to the code value, and the code value is decoded. As shown in equations (42) to (45), the pixel value A ij is an 8-bit pixel value calculated using CMax. That is, the fourth processing unit 43c decodes the code value into an 8-bit pixel value.
When BTC IJ = 01, A ij = CMax × 2/4 (43)
When BTC IJ = 10, A ij = CMax × 2/4 (44)
When BTC IJ = 11, A ij = CMax × 3/4 (45)

なお、図10等に示すテンプレートにおいて、Xの符号が付されたブロックは、上記のWの符号に係る条件に加えて当該ブロックの符号値が「01」であることを条件とする。
また、Yの符号が付されたブロックは、上記のWの符号に係る条件に加えて当該ブロックの符号値が「10」であることを条件とする。
また、Zの符号が付されたブロックは、上記のV、W、X、Yのいずれの条件も満たさないブロックであることを条件とする。
In addition, in the template shown in FIG. 10 and the like, the block to which the code of X is attached is conditional on the code value of the block being “01” in addition to the condition relating to the code of W described above.
Further, in addition to the condition relating to the above W code, the block to which the Y code is attached is conditional on the code value of the block being “10”.
Moreover, the block to which the code | symbol of Z was attached | subjected is on condition that it is a block which does not satisfy | fill all the conditions of said V, W, X, and Y.

以上、高解像度領域と判定されたシアン(C)の符号値の復号化について説明したが、高解像度領域と判定された他の色の符号値の復号化についても同様の流れで復号化が行われる。例えば、高解像度領域と判定されたレッド(R)の符号値の復号化に際して、第4処理部43cは、図9〜図12のテンプレート群を用いたパターンマッチングを行い、パターンマッチングの結果に応じて、取得部42から出力されたレッド(R)の最大値RMaxや最小値RMinを用いて復号化を行う。   The decoding of the code value of cyan (C) determined to be the high resolution region has been described above. However, the decoding of code values of other colors determined to be the high resolution region is performed in the same flow. Is called. For example, when decoding a red (R) code value determined to be a high-resolution area, the fourth processing unit 43c performs pattern matching using the template group of FIGS. 9 to 12, and according to the result of pattern matching. Thus, decoding is performed using the maximum value RMax and the minimum value Rmin of red (R) output from the acquisition unit 42.

以上、符号データの色別プレートのうち、C/Rプレートに含まれる符号値の復号化について説明したが、他の色別プレートの符号値の復号化についても同様の流れで復号化が行われる。
例えば、M/Gプレートに含まれる符号値の復号化処理は、上記のシアン(C)をマゼンタ(M)に置き換え、上記のレッド(R)をグリーン(G)に置き換えた処理となる。同様に、Y/Bプレートに含まれる符号値の復号化処理は、上記のシアン(C)をイエロー(Y)に置き換え、上記のレッド(R)をブルー(B)に置き換えた処理となる。また、Kプレートに含まれる符号値の復号化処理は、上記のシアン(C)をマゼンタ(K)に置き換えた処理となる。
The decoding of the code values included in the C / R plate among the color-specific plates of the code data has been described above. However, the decoding of the code values of the other color-specific plates is performed in the same flow. .
For example, the decoding process of the code value included in the M / G plate is a process in which the above cyan (C) is replaced with magenta (M) and the above red (R) is replaced with green (G). Similarly, the decoding process of the code value included in the Y / B plate is a process in which the above cyan (C) is replaced with yellow (Y) and the above red (R) is replaced with blue (B). The decoding process of the code value included in the K plate is a process in which the above cyan (C) is replaced with magenta (K).

復号化部40は、符号化された画像データである符号データを4×4ブロック単位で色毎に復号化して復号データを生成する処理を繰り返すことで全ブロック、全色の復号化を行い、これによって符号化部30により符号化された画像データを復号化する。   The decoding unit 40 decodes all the blocks and all the colors by repeating the process of decoding the encoded data, which is the encoded image data, for each color in units of 4 × 4 blocks and generating decoded data, As a result, the image data encoded by the encoding unit 30 is decoded.

以下、図13〜図16のフローチャートを参照して、符号化処理の流れについて説明する。
符号化処理に際して、符号化部30に8×8画素単位で画像データの入力が行われる(ステップS1)。
8×8画素の入力が行われると、第1生成部31は、各画素の色空間を示す情報を取得して、符号化の処理単位となる2×2画素の画素領域に対応するブロック単位で色空間を特定し、特定された色空間を示す情報を生成して出力する(ステップS2)。即ち、第1生成部31は、第1情報を出力する。
また、第2生成部32は、各色空間を構成する各色の画素値の最大値及び最小値を特定し、特定された最大値及び最小値を示す情報を出力する(ステップS3)。即ち、第2生成部32は、第2情報を出力する。
Hereinafter, the flow of the encoding process will be described with reference to the flowcharts of FIGS.
During the encoding process, image data is input to the encoding unit 30 in units of 8 × 8 pixels (step S1).
When 8 × 8 pixels are input, the first generation unit 31 acquires information indicating the color space of each pixel, and a block unit corresponding to a pixel region of 2 × 2 pixels, which is an encoding processing unit The color space is specified by and information indicating the specified color space is generated and output (step S2). That is, the 1st production | generation part 31 outputs 1st information.
Further, the second generation unit 32 specifies the maximum value and the minimum value of the pixel values of each color constituting each color space, and outputs information indicating the specified maximum value and minimum value (step S3). In other words, the second generation unit 32 outputs the second information.

次に、第3生成部33は、符号化がまだ行われていない1つの色について、当該色の最大値と最小値の差が閾値T未満であるか否か判定する(ステップS4)。ここで、当該色の最大値と最小値の差が閾値T未満であると判定された場合(ステップS4:YES)、第3生成部33は、当該1つの色について、8×8画素に含まれる全ての2×2の画素領域が中間調領域であると判定し、当該判定結果を示す情報を生成して出力する。また、この場合、当該1つの色について、8×8画素に含まれる全ての2×2の画素領域に対して中間調領域の符号化処理、即ち、第1符号化処理が行われる(ステップS5)。   Next, the third generation unit 33 determines whether the difference between the maximum value and the minimum value of the color that is not yet encoded is less than the threshold T (step S4). Here, when it is determined that the difference between the maximum value and the minimum value of the color is less than the threshold value T (step S4: YES), the third generation unit 33 includes 8 × 8 pixels for the one color. It is determined that all 2 × 2 pixel areas are halftone areas, and information indicating the determination result is generated and output. In this case, the encoding process of the halftone area, that is, the first encoding process is performed on all the 2 × 2 pixel areas included in the 8 × 8 pixels for the one color (step S5). ).

ここで、図15を参照して、第1符号化処理の流れについて説明する。
第4生成部34の第1処理部34aは、まず、8×8画素のうち、符号化の処理単位となる2×2画素の画素領域に含まれる4画素の画素値の平均値avrijを算出する(ステップS21)。
また、第3生成部33は、図7に示すように、ステップS4にて判定された色の最大値及び最小値を用いて3つの区分値Th1、Th2、Th3を算出する(ステップS22)。
その後、第4生成部34は、上記の式(20)〜(23)、(24)〜(27)の例で示すように、ステップS21にて算出された平均値avrijと、ステップS4にて判定された色の最大値及び最小値ならびに区分値Th1、Th2、Th3と、の比較結果に応じて、ステップS21にて平均値avrijが算出された画素領域の符号値BTCIJを決定し(ステップS23)、決定された符号値BTCIJを示す情報を出力する。
Here, the flow of the first encoding process will be described with reference to FIG.
First, the first processing unit 34a of the fourth generation unit 34 first calculates an average value avr ij of the pixel values of four pixels included in the pixel region of 2 × 2 pixels that is an encoding processing unit among the 8 × 8 pixels. Calculate (step S21).
Further, as illustrated in FIG. 7, the third generation unit 33 calculates three segment values Th1, Th2, and Th3 using the maximum and minimum values of the color determined in step S4 (step S22).
Thereafter, as shown in the examples of the above formulas (20) to (23) and (24) to (27), the fourth generation unit 34 calculates the average value avr ij calculated in step S21 and the step S4. In step S21, the code value BTC IJ of the pixel area in which the average value avr ij is calculated is determined according to the comparison result of the maximum and minimum values of the color determined in this way and the segment values Th1, Th2, and Th3. (Step S23), information indicating the determined code value BTC IJ is output.

図13に戻り、第1処理部34aは、ステップS4にて判定の対象となった1つの色について、8×8画素に含まれる全ての2×2画素の画素領域に対する符号化が完了するまで、ステップS5の処理を繰り返す(ステップS6:NO)。
ステップS4にて判定の対象となった1つの色について、全ての2×2画素の画素領域に対する符号化が完了すると(ステップS6:YES)、第4生成部34は、8×8画素内に含まれる全ての色空間の各々を構成する全ての色について符号化が完了したか否か判定する(ステップS7)。ここで、全ての色空間の各々を構成する全ての色について符号化が完了していないと判定された場合(ステップS7:NO)、ステップS4の処理に移行する。
一方、ステップS7にて、全ての色空間の各々を構成する全ての色について符号化が完了したと判定された場合(ステップS7:YES)、出力部35は、全ての色空間の各々を構成する全ての色について符号化が完了された8×8画素に対応する4×4ブロックの符号データを出力する(ステップS8)。その後、画像データを構成する全画素の符号化が完了していない場合に(ステップS9:NO)、再びステップS1の処理に移行する。即ち、画像データを構成する全画素の符号化が完了するまで、8×8画素単位で符号化が行われる。画像データを構成する全画素の符号化が完了すると(ステップS9:YES)、符号化部30は、符号化処理を終了する。
Returning to FIG. 13, the first processing unit 34a completes encoding for all 2 × 2 pixel pixel areas included in 8 × 8 pixels for one color determined in step S4. The process of step S5 is repeated (step S6: NO).
When the encoding for all the 2 × 2 pixel areas is completed for one color determined in step S4 (step S6: YES), the fourth generation unit 34 includes the 8 × 8 pixels. It is determined whether or not encoding has been completed for all colors constituting each of all the included color spaces (step S7). Here, when it is determined that encoding has not been completed for all the colors constituting each of all the color spaces (step S7: NO), the process proceeds to step S4.
On the other hand, when it is determined in step S7 that encoding has been completed for all the colors constituting each of all the color spaces (step S7: YES), the output unit 35 configures each of all the color spaces. Code data of 4 × 4 blocks corresponding to 8 × 8 pixels for which encoding has been completed for all colors to be performed is output (step S8). Thereafter, when encoding of all the pixels constituting the image data has not been completed (step S9: NO), the process proceeds to step S1 again. That is, encoding is performed in units of 8 × 8 pixels until encoding of all pixels constituting the image data is completed. When encoding of all the pixels constituting the image data is completed (step S9: YES), the encoding unit 30 ends the encoding process.

また、ステップS4にて、当該色の最大値と最小値の差が閾値T未満でないと判定された場合(ステップS4:NO)、図14に示すように、第3生成部33は、ステップS4にて判定の対象となった1つの色の最大値及び最小値を用いて3つの区分値Th1、Th2、Th3を算出する(ステップS10)。
また、第3生成部33は、8×8画素のうち、ステップS4にて判定の対象となった1つの色について符号化がまだ行われていない2×2画素の画素領域を処理対象とし(ステップS11)、当該画素領域が中間調領域であると判定されない限り、区分値を用いたステップS12〜S14の判定を順次行う。ステップS12〜ステップS14の判定の順序はあくまで一例であってこれに限られるものでなく、順不同である。
Further, when it is determined in step S4 that the difference between the maximum value and the minimum value of the color is not less than the threshold value T (step S4: NO), as illustrated in FIG. 14, the third generation unit 33 performs step S4. The three segment values Th1, Th2, and Th3 are calculated using the maximum value and the minimum value of one color that has been determined in step S10 (step S10).
In addition, the third generation unit 33 sets a pixel region of 2 × 2 pixels that is not yet encoded for one color determined in step S4 out of 8 × 8 pixels as a processing target ( Step S11) Unless the pixel area is determined to be a halftone area, the determinations in steps S12 to S14 using the segment values are sequentially performed. The order of determination in steps S12 to S14 is merely an example, and is not limited to this, and the order is not limited.

第3生成部33は、Th1より大きく、Th3以下の画素値の画素が当該画素領域に含まれているか否か判定する(ステップS12)。ここで、Th1より大きく、Th3以下の画素値の画素が当該画素領域に含まれていると判定された場合(ステップS12:YES)、第3生成部33は、当該画素領域が中間調領域であると判定し、当該判定結果を示す情報を生成して出力する。また、この場合、当該画素領域に対して中間調領域の符号化処理、即ち、第1符号化処理が行われる(ステップS15)。
一方、ステップS12にて、Th1より大きく、Th3以下の画素値の画素が当該画素領域に含まれていないと判定された場合(ステップS12:NO)、第3生成部33は、当該画素領域に含まれる4画素の画素値全てがTh1以下であるか否か判定する(ステップS13)。ここで、当該画素領域に含まれる4画素の画素値全てがTh1以下であると判定された場合(ステップS13:YES)、第3生成部33は、当該画素領域が中間調領域であると判定し、当該判定結果を示す情報を生成して出力する。また、この場合、ステップS15の処理に移行する。
一方、ステップS13にて、当該画素領域に含まれる4画素の画素値全てがTh1以下でないと判定された場合(ステップS13:NO)、第3生成部33は、当該画素領域に含まれる4画素の画素値全てがTh3より大きい否か判定する(ステップS14)。ここで、当該画素領域に含まれる4画素の画素値全てがTh3より大きいと判定された場合(ステップS14:YES)、第3生成部33は、当該画素領域が中間調領域であると判定し、当該判定結果を示す情報を生成して出力する。また、この場合、ステップS15の処理に移行する。
一方、ステップS14にて、当該画素領域に含まれる4画素の画素値全てがTh3より大きくないと判定された場合(ステップS14:NO)、第3生成部33は、当該画素領域が高解像度領域であると判定し、当該判定結果を示す情報を出力する。また、この場合、当該画素領域に対して高解像度領域の符号化処理、即ち、第2符号化処理が行われる(ステップS16)。
このように、第3生成部33は、ステップS4や、ステップS12〜S14の判定結果に基づいて、第3情報を生成する。
The third generation unit 33 determines whether or not a pixel having a pixel value greater than Th1 and equal to or less than Th3 is included in the pixel region (step S12). Here, when it is determined that a pixel having a pixel value greater than Th1 and equal to or less than Th3 is included in the pixel area (step S12: YES), the third generation unit 33 determines that the pixel area is a halftone area. It is determined that there is, and information indicating the determination result is generated and output. In this case, the halftone area encoding process, that is, the first encoding process is performed on the pixel area (step S15).
On the other hand, when it is determined in step S12 that the pixel area has a pixel value greater than Th1 and less than or equal to Th3 (step S12: NO), the third generation unit 33 sets the pixel area in the pixel area. It is determined whether or not all of the four pixel values included are equal to or less than Th1 (step S13). Here, when it is determined that all the pixel values of the four pixels included in the pixel area are equal to or less than Th1 (step S13: YES), the third generation unit 33 determines that the pixel area is a halftone area. Then, information indicating the determination result is generated and output. In this case, the process proceeds to step S15.
On the other hand, when it is determined in step S13 that all the pixel values of the four pixels included in the pixel region are not equal to or less than Th1 (step S13: NO), the third generation unit 33 includes the four pixels included in the pixel region. It is determined whether or not all the pixel values of are larger than Th3 (step S14). Here, when it is determined that all the pixel values of the four pixels included in the pixel area are larger than Th3 (step S14: YES), the third generation unit 33 determines that the pixel area is a halftone area. Then, information indicating the determination result is generated and output. In this case, the process proceeds to step S15.
On the other hand, when it is determined in step S14 that all the pixel values of the four pixels included in the pixel area are not greater than Th3 (step S14: NO), the third generation unit 33 determines that the pixel area is a high-resolution area. And information indicating the determination result is output. In this case, the high-resolution area encoding process, that is, the second encoding process is performed on the pixel area (step S16).
Thus, the 3rd production | generation part 33 produces | generates 3rd information based on the determination result of step S4 or step S12-S14.

ステップS15の第1符号化処理の流れは、ステップS5の第1符号化処理の流れと同様であるので、説明を省略する。なお、ステップS15の第1符号化処理では、ステップS22の処理を省略してもよい。   Since the flow of the first encoding process in step S15 is the same as the flow of the first encoding process in step S5, description thereof is omitted. In the first encoding process in step S15, the process in step S22 may be omitted.

図16を参照して、第2符号化処理の流れについて説明する。
第4生成部34の第2処理部34bは、まず、符号化の処理単位となる2×2画素の画素領域に含まれる4画素の画素値を2値化する(ステップS31)。そして、第2処理部34bは、濃度パターンデータを参照して、2値化された2×2画素の濃度パターンに対応する符号値BTCIJを特定する(ステップS32)。
このように、第4生成部34は、ステップS5、ステップS15又はステップS16の処理内容に応じて、第4情報を生成する。
The flow of the second encoding process will be described with reference to FIG.
First, the second processing unit 34b of the fourth generation unit 34 binarizes the pixel values of the four pixels included in the pixel region of 2 × 2 pixels, which is an encoding processing unit (step S31). Then, the second processing unit 34b specifies the code value BTC IJ corresponding to the binarized 2 × 2 pixel density pattern with reference to the density pattern data (step S32).
Thus, the 4th production | generation part 34 produces | generates 4th information according to the processing content of step S5, step S15, or step S16.

ステップS15又はステップS16の処理後、第4生成部34は、ステップS4にて判定の対象となった1つの色について、8×8画素に含まれる全ての2×2画素の画素領域に対する符号化が完了したか否か判定する(ステップS17)。ここで、ステップS4にて判定の対象となった1つの色について、8×8画素に含まれる全ての2×2画素の画素領域に対する符号化が完了していないと判定された場合(ステップS17:NO)、ステップS11の処理に移行する。一方、ステップS4にて判定の対象となった1つの色について、8×8画素に含まれる全ての2×2画素の画素領域に対する符号化が完了したと判定された場合(ステップS17:YES)、ステップS7の処理に移行する。   After the processing of step S15 or step S16, the fourth generation unit 34 encodes all the 2 × 2 pixel pixel regions included in the 8 × 8 pixels with respect to one color determined in step S4. It is determined whether or not has been completed (step S17). Here, when it is determined that the encoding for all the pixel regions of 2 × 2 pixels included in the 8 × 8 pixels is not completed for one color that is the determination target in Step S4 (Step S17). : NO), the process proceeds to step S11. On the other hand, when it is determined that the encoding of all the 2 × 2 pixel pixel areas included in the 8 × 8 pixels has been completed for one color that has been determined in step S4 (step S17: YES). The process proceeds to step S7.

以下、図17〜図20のフローチャートを参照して、復号化処理の流れについて説明する。
符号化処理に際して、復号化部40に4×4ブロック単位で符号データの入力が行われる(ステップS41)。
4×4ブロックの入力が行われると、特定部41は、第1情報に基づいて各ブロックに対応する2×2画素の画素領域の各々の色空間を特定する(ステップS42)。
また、取得部42は、第2情報に基づいて、各色空間を構成する各色の画素値の最大値及び最小値を取得する(ステップS43)。
Hereinafter, the flow of the decoding process will be described with reference to the flowcharts of FIGS.
In the encoding process, code data is input to the decoding unit 40 in units of 4 × 4 blocks (step S41).
When the 4 × 4 block is input, the specifying unit 41 specifies the color space of each pixel region of 2 × 2 pixels corresponding to each block based on the first information (step S42).
Further, the acquisition unit 42 acquires the maximum value and the minimum value of the pixel values of each color constituting each color space based on the second information (step S43).

次に、第5生成部43は、まだ復号化が行われていない1つの色を処理対象の色とする(ステップS44)。また、第5生成部43は、ステップS44にて処理対象とされた1つの色に対応する色別プレートのうち、まだ復号化が行われていない1つのブロックを処理対象とする(ステップS45)。   Next, the fifth generation unit 43 sets one color that has not been decoded yet as a color to be processed (step S44). In addition, the fifth generation unit 43 sets one block that has not been decoded yet as a processing target among the color-specific plates corresponding to the one color to be processed in step S44 (step S45). .

第5生成部43の判定部43aは、ステップS45にて処理対象とされた1つのブロックについて、第3情報に基づいて、当該ブロックに対応する符号化前の2×2画素の画素領域が中間調領域又は高解像度領域のいずれに属するのかを判定する。ここで、中間調領域に属すると判定された場合(ステップS46:YES)、当該ブロックに対して中間調領域の復号化処理、即ち、第1復号化処理が行われる(ステップS47)。一方、高解像度領域に属すると判定された場合(ステップS46:NO)、当該ブロックに対して高解像度領域の復号化処理、即ち、第2復号化処理が行われる(ステップS48)。   Based on the third information, the determination unit 43a of the fifth generation unit 43 determines that the 2 × 2 pixel region before encoding corresponding to the block is intermediate based on the third information. It is determined whether it belongs to a tone area or a high resolution area. If it is determined that the image belongs to the halftone area (step S46: YES), the decoding process of the halftone area, that is, the first decoding process is performed on the block (step S47). On the other hand, if it is determined that the block belongs to the high resolution area (step S46: NO), the high resolution area decoding process, that is, the second decoding process is performed on the block (step S48).

以下、第1復号化処理、第2復号化処理の流れについて、順次説明する。
図18は、第1復号化処理の流れの一例を示すフローチャートである。
第5生成部43の第3処理部43bは、上記の関係式(32)〜(35)や、関係式(36)〜(39)の例で示すように、ステップS43で取得された最大値及び最小値のうち、ステップS44にて処理対象とされた1つの色の最大値及び最小値を用いて、ステップS45にて処理対象とされたブロックの符号値BTCIJに対応した復号値を算出する(ステップS61)。そして、第3処理部43bは、ステップS61にて算出された復号値を当該ブロックに対応する2×2画素の画素領域の4画素全ての画素値として(ステップS62)、復号データを出力する。
Hereinafter, the flow of the first decoding process and the second decoding process will be sequentially described.
FIG. 18 is a flowchart illustrating an example of the flow of the first decoding process.
The third processing unit 43b of the fifth generation unit 43 obtains the maximum value acquired in step S43 as shown in the examples of the relational expressions (32) to (35) and the relational expressions (36) to (39). And, using the maximum value and the minimum value of one color that is the processing target in step S44 among the minimum values, the decoding value corresponding to the code value BTC IJ of the block that is the processing target is calculated in step S45. (Step S61). Then, the third processing unit 43b sets the decoded value calculated in step S61 as the pixel values of all four pixels in the pixel region of 2 × 2 pixels corresponding to the block (step S62), and outputs decoded data.

図19は、第2復号化処理の流れの一例を示すフローチャートである。
第5生成部43の第4処理部43cは、まず、ステップS45にて処理対象とされたブロックの符号値BTCIJに対応した参照データの特定に係る処理を行う。
具体的には、第4処理部43cは、例えば、当該ブロックの符号値BTCIJが「00」であるか否か判定し(ステップS71)、「00」である場合に(ステップS71:YES)、図9に示す第1テンプレート群を参照する(ステップS74)。
また、ステップS71にて、当該ブロックの符号値BTCIJが「00」でない場合(ステップS71:NO)、第4処理部43cは、当該ブロックの符号値BTCIJが「01」であるか否か判定し(ステップS72)、「01」である場合に(ステップS72:YES)、図10に示す第2テンプレート群を参照する(ステップS75)。
また、ステップS72にて、当該ブロックの符号値BTCIJが「01」でない場合(ステップS72:NO)、第4処理部43cは、当該ブロックの符号値BTCIJが「10」であるか否か判定し(ステップS73)、「10」である場合に(ステップS73:YES)、図11に示す第3テンプレート群を参照し(ステップS76)、そうでない場合、即ち、当該ブロックの符号値BTCIJが「11」である場合に(ステップS73:NO)、図12に示す第4テンプレート群を参照する(ステップS77)。
なお、ステップS71〜S73の判定順序や判定対象となる符号値BTCIJは一例であってこれに限られるものでなく、符号値BTCIJに対応した参照データの特定が行えればよい。
FIG. 19 is a flowchart illustrating an example of the flow of the second decoding process.
The fourth processing unit 43c of the fifth generation unit 43 first performs processing related to the identification of reference data corresponding to the code value BTC IJ of the block to be processed in step S45.
Specifically, for example, the fourth processing unit 43c determines whether or not the code value BTC IJ of the block is “00” (step S71), and when it is “00” (step S71: YES). Reference is made to the first template group shown in FIG. 9 (step S74).
In step S71, if the code value BTC IJ of the block is not “00” (step S71: NO), the fourth processing unit 43c determines whether the code value BTC IJ of the block is “01”. If it is determined (step S72) and it is “01” (step S72: YES), the second template group shown in FIG. 10 is referred to (step S75).
In step S72, if the code value BTC IJ of the block is not “01” (step S72: NO), the fourth processing unit 43c determines whether the code value BTC IJ of the block is “10”. If it is determined (step S73) and is “10” (step S73: YES), the third template group shown in FIG. 11 is referred to (step S76). If not, that is, the code value BTC IJ of the block. Is “11” (step S73: NO), the fourth template group shown in FIG. 12 is referred to (step S77).
Note that the determination order of steps S71 to S73 and the code value BTC IJ to be determined are merely examples, and the present invention is not limited to this, and it is sufficient that the reference data corresponding to the code value BTC IJ can be specified.

第4処理部43cは、ステップS74〜S77のいずれかの処理を経て参照されたテンプレート群によるパターンマッチングを行う(ステップS78)。
図20は、パターンマッチングの流れの一例を示すフローチャートである。
第4処理部43cは、まず、優先順位Q1のテンプレートを用いて照合を行う(ステップS81)。ここで、全ての条件が満たされたテンプレートがあった場合(ステップS82:YES)、第4処理部43cは、当該テンプレートと対応付けられた復号パターンに応じて復号値を算出し、処理対象とされたブロックに対応する2×2画素の画素値として(ステップS83)、復号データを出力する。
一方、ステップS82にて、全ての条件が満たされたテンプレートがなかった場合(ステップS82:NO)、第4処理部43cは、優先順位Q2のテンプレートを用いて照合を行う(ステップS84)。ここで、優先順位Q2のテンプレートの各々に設定された条件が満たされたブロックの個数を数値化した場合に、当該数値化された数値が第1の基準値以上となるテンプレートがあった場合(ステップS85:YES)、第4処理部43cは、当該数値が最大であるテンプレートを特定し(ステップS86)、特定されたテンプレートと対応付けられた復号パターンに応じて復号値を算出し、処理対象とされたブロックに対応する2×2画素の画素値として(ステップS83)、復号データを出力する。
一方、ステップS85にて、数値が第1の基準値以上となるテンプレートがなかった場合(ステップS85:NO)、第4処理部43cは、優先順位Q3のテンプレートを用いて照合を行う(ステップS87)。ここで、優先順位Q3のテンプレートの各々に設定された条件が満たされたブロックの個数を数値化した場合に、当該数値化された数値が第2の基準値以上となるテンプレートがあった場合(ステップS88:YES)、ステップS86の処理に移行する。一方、数値が第2の基準値以上となるテンプレートがなかった場合(ステップS88:NO)、第4処理部43cは、平均化パターンを用いて復号値を算出し、処理対象とされたブロックに対応する2×2画素の画素値として(ステップS89)、復号データを出力する。
The fourth processing unit 43c performs pattern matching using the template group referred to through any of the processes in steps S74 to S77 (step S78).
FIG. 20 is a flowchart illustrating an example of the flow of pattern matching.
First, the fourth processing unit 43c performs collation using the template with the priority order Q1 (step S81). Here, when there is a template that satisfies all the conditions (step S82: YES), the fourth processing unit 43c calculates a decoded value according to the decoding pattern associated with the template, The decoded data is output as a pixel value of 2 × 2 pixels corresponding to the block (step S83).
On the other hand, if there is no template that satisfies all the conditions in step S82 (step S82: NO), the fourth processing unit 43c performs collation using the template of the priority order Q2 (step S84). Here, when the number of blocks that satisfy the conditions set in each of the templates of the priority order Q2 is quantified, there is a template in which the quantified numerical value is equal to or greater than the first reference value ( (Step S85: YES), the fourth processing unit 43c specifies the template having the maximum value (Step S86), calculates a decoded value according to the decoding pattern associated with the specified template, and performs processing. The decoded data is output as the pixel value of 2 × 2 pixels corresponding to the determined block (step S83).
On the other hand, in step S85, when there is no template whose numerical value is equal to or greater than the first reference value (step S85: NO), the fourth processing unit 43c performs collation using the template of the priority order Q3 (step S87). ). Here, when the number of blocks satisfying the conditions set in each of the templates of the priority order Q3 is digitized, there is a template in which the numeric value is equal to or greater than the second reference value ( Step S88: YES), the process proceeds to Step S86. On the other hand, when there is no template whose numerical value is equal to or larger than the second reference value (step S88: NO), the fourth processing unit 43c calculates a decoded value using the average pattern, and sets the block to be processed. The decoded data is output as the corresponding 2 × 2 pixel value (step S89).

図17に戻り、ステップS47又はステップS48の処理後、第5生成部43は、ステップS44にて判定の対象となった1つの色について、4×4ブロックに含まれる全てのブロックの符号値BTCIJの復号化が完了したか否か判定する(ステップS49)。ここで、ステップS44にて判定の対象となった1つの色について、4×4ブロックに含まれる全てのブロックの符号値BTCIJの復号化が完了していないと判定された場合(ステップS49:NO)、ステップS45の処理に移行する。
一方、ステップS44にて判定の対象となった1つの色について、4×4ブロックに含まれる全てのブロックの符号値BTCIJの復号化が完了したと判定された場合(ステップS49:YES)、ステップS42にて特定された全ての色空間の各々を構成する全ての色について復号が完了したか否か判定する(ステップS50)。ここで、全ての色空間の各々を構成する全ての色について復号化が完了していないと判定された場合(ステップS50:NO)、ステップS44の処理に移行する。
一方、ステップS50にて、全ての色空間の各々を構成する全ての色について復号化が完了したと判定された場合(ステップS50:YES)であって、符号化前の画像データの全画素に対応する復号化が完了していない場合に(ステップS51:NO)、再びステップS41の処理に移行する。即ち、符号データの全ブロックの復号化が完了するまで、4×4ブロック単位で復号化が行われる。全ブロックの符号化が完了すると(ステップS51:YES)、復号化部40は、復号化処理を終了する。
Returning to FIG. 17, after the processing in step S47 or step S48, the fifth generation unit 43 performs the code values BTC of all the blocks included in the 4 × 4 block for one color determined in step S44. It is determined whether or not IJ decoding has been completed (step S49). Here, when it is determined that the decoding of the code values BTC IJ of all the blocks included in the 4 × 4 block has not been completed for one color to be determined in step S44 (step S49: NO), the process proceeds to step S45.
On the other hand, when it is determined that the decoding of the code values BTC IJ of all the blocks included in the 4 × 4 block has been completed for one color that has been determined in step S44 (step S49: YES), It is determined whether or not the decoding has been completed for all the colors constituting each of all the color spaces specified in step S42 (step S50). Here, when it is determined that decoding has not been completed for all the colors constituting each of all the color spaces (step S50: NO), the process proceeds to step S44.
On the other hand, if it is determined in step S50 that the decoding has been completed for all the colors constituting each of all the color spaces (step S50: YES), all the pixels of the image data before encoding are processed. When the corresponding decoding is not completed (step S51: NO), the process proceeds to step S41 again. In other words, decoding is performed in units of 4 × 4 blocks until decoding of all blocks of the code data is completed. When encoding of all blocks is completed (step S51: YES), the decoding unit 40 ends the decoding process.

以上、本実施形態の画像形成装置1によれば、符号化処理において、2×2画素の画素領域の各々の色空間を示す情報を含む第1情報を生成するので、各々の色空間を示す情報を保持して符号化を行うことができる。よって、混在データのように、色空間が異なる画素領域が混在している画像データであっても、1つの画像処理装置で符号化を行うことができる。また、2×2画素の画素領域の各々に含まれる各色の階調幅を示す情報を含む第3情報等に基づいて、2×2画素の画素領域を構成する4画素の画素値を色毎に階調幅に応じた符号化方法で符号化した符号値を示す第4情報を生成するので、各画素領域の階調幅に応じた符号化を行うことができる。このように、画像データの各画素が属する色空間及び階調幅に対応した符号化を行うことができる。そして、第1情報、第2情報、第3情報及び第4情報を含むデータを符号データとして出力するので、復号化に必要な情報を一つの符号データにまとめて出力することができることから、符号化された画像データの記憶領域の管理をより容易に行うことができる。
また、復号化処理において、第1情報に基づいて符号化前の2×2画素の画素領域の各々の色空間の特定と、第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値の取得とを行い、特定された色空間、取得された各色の画素値の最大値及び最小値、第3情報及び第4情報に基づいて符号値を色毎に復号化した復号値を生成するので、特定された色空間や第3情報により示される階調幅に対応した復号化を行うことができる。
As described above, according to the image forming apparatus 1 of the present embodiment, the first information including information indicating each color space of the pixel area of 2 × 2 pixels is generated in the encoding process, and thus each color space is indicated. Information can be retained and encoded. Therefore, even image data in which pixel areas having different color spaces are mixed, such as mixed data, can be encoded by one image processing apparatus. Further, based on the third information including information indicating the gradation width of each color included in each pixel area of 2 × 2 pixels, the pixel values of the four pixels constituting the pixel area of 2 × 2 pixels are set for each color. Since the fourth information indicating the code value encoded by the encoding method corresponding to the gradation width is generated, encoding according to the gradation width of each pixel region can be performed. In this way, encoding corresponding to the color space and gradation width to which each pixel of image data belongs can be performed. Since the data including the first information, the second information, the third information, and the fourth information is output as code data, information necessary for decoding can be output as a single code data. The storage area of the converted image data can be managed more easily.
Further, in the decoding process, the specification of each color space of the pixel area of 2 × 2 pixels before encoding based on the first information, and the maximum pixel value of each color constituting each color space based on the second information Decoding that performs code value decoding for each color based on the specified color space, the maximum and minimum values of the acquired pixel values of each color, the third information, and the fourth information. Since the value is generated, it is possible to perform decoding corresponding to the specified color space and the gradation width indicated by the third information.

また、符号化処理において、2×2画素の画素領域の各々に含まれる各色の階調幅が中間調領域又は高解像度領域のいずれに属するかを示す情報を第3情報とし、中間調領域に属する色の画素値と高解像度領域に属する色の画素値とを個別の処理により符号化するので、中間調領域と高解像度領域の双方に対応した符号化を行うことができる。
また、復号化処理において、第3情報に基づいて、符号化された2×2画素の画素領域に含まれる各色が中間調領域又は高解像度領域のいずれに属するのかを判定し、中間調領域と判定された色の符号値と高解像度領域と判定された色の符号値とを個別の処理により復号化するので、中間調領域と高解像度領域の双方に対応した復号化を行うことができる。
In the encoding process, information indicating whether the gradation width of each color included in each pixel area of 2 × 2 pixels belongs to a halftone area or a high resolution area is set as third information and belongs to the halftone area Since the pixel value of the color and the pixel value of the color belonging to the high resolution area are encoded by separate processing, encoding corresponding to both the halftone area and the high resolution area can be performed.
In the decoding process, based on the third information, it is determined whether each color included in the encoded pixel region of 2 × 2 pixels belongs to the halftone region or the high resolution region, Since the code value of the determined color and the code value of the color determined to be the high resolution area are decoded by separate processing, decoding corresponding to both the halftone area and the high resolution area can be performed.

また、中間調領域の符号化に際して、2×2画素の画素領域を構成する4画素の画素値を平均化した平均値に基づいて符号値を得るので、画素間の画素値の差が相対的に小さい中間調領域の符号化をより簡易に行うことができる。   Further, when encoding the halftone area, the code value is obtained based on the average value obtained by averaging the pixel values of the four pixels constituting the pixel area of 2 × 2 pixels. Therefore, it is possible to more easily encode a small halftone area.

また、中間調領域に属すると判定された色について、当該色の最大値と最小値との差に対応する階調の範囲を所定数の区分に区切って各区分に対応する符号値を設定し、平均値が含まれる区分に対応する符号値を特定して平均値が算出された2×2画素の画像領域の当該色の符号値とするので、中間調領域を階調の範囲に応じて符号化することができる。
また、符号化された中間調領域の復号化において、符号値が取り得る値の各々に対して個別の復号値を色毎に設定し、平均値が算出された2×2画素の画素領域に対応する当該色の符号値に対応する復号値を特定するので、階調の範囲に応じて得られた符号値の区分数に応じて設定された個別の復号値により復号化することができる。
In addition, for a color determined to belong to the halftone area, a range of gradation corresponding to the difference between the maximum value and the minimum value of the color is divided into a predetermined number of sections, and a code value corresponding to each section is set. Since the code value corresponding to the section including the average value is identified and the average value is calculated as the code value of the color of the image area of 2 × 2 pixels, the halftone area is set according to the gradation range. Can be encoded.
In the decoding of the encoded halftone area, an individual decoded value is set for each color for each possible value of the code value, and the average value is calculated in the pixel area of 2 × 2 pixels. Since the decoding value corresponding to the corresponding code value of the color is specified, it is possible to decode with the individual decoding value set according to the number of code value categories obtained according to the gradation range.

また、符号化処理において、2×2画素の画素領域を構成する4画素の各々の画素値のうち、高解像度領域に属する色の画素値を2値化した濃度パターンに対応する符号値を得るので、濃度パターンを用いたパターンマッチングにより画素間の画素値の差が相対的に大きい高解像度領域を符号化することができ、符号化をより簡易に行うことができる。
また、符号化された高解像度領域の復号化処理において、符号値と当該符号値に対応する濃度パターンを得るための参照データとに基づいて、当該符号値に対応する復号値を得るので、参照データを用いたパターンマッチングにより画素間の画素値の差が相対的に大きい高解像度領域の符号値を復号化することができ、符号化をより簡易に行うことができる。
Also, in the encoding process, a code value corresponding to a density pattern obtained by binarizing the pixel values of colors belonging to the high resolution region among the pixel values of the four pixels constituting the pixel region of 2 × 2 pixels is obtained. Therefore, it is possible to encode a high-resolution region having a relatively large pixel value difference between pixels by pattern matching using a density pattern, and to perform encoding more easily.
Further, in the decoding process of the encoded high-resolution area, the decoded value corresponding to the code value is obtained based on the code value and the reference data for obtaining the density pattern corresponding to the code value. By pattern matching using data, it is possible to decode a code value in a high resolution region where the difference in pixel value between pixels is relatively large, and encoding can be performed more easily.

また、符号化処理において、色数が最も多い色空間の色数に応じた数の色別プレートと、色別プレートと別の追加プレートと、を生成し、色別プレートの各々に色数が最も多い色空間の第2情報、第3情報及び第4情報を色別に設定すると共に、一部又は全部の色別プレートの各々に他の色空間の第3情報及び第4情報を色別に設定し、追加プレートに第1情報及び他の色空間の第2情報を設定し、色別プレート及び追加プレートにより構成されるデータを符号データとして出力するので、符号化された画像データを定まったフォーマットで出力することができることから、当該フォーマットを符号化及び復号化の前提とすることで、符号化された画像データのデータ管理や復号化に際して必要な情報の取得をより容易なものとすることができる。   Also, in the encoding process, a number of color plates corresponding to the number of colors in the color space with the largest number of colors, a color plate and another additional plate are generated, and each color plate has the number of colors. The second information, the third information, and the fourth information in the most color space are set for each color, and the third information and the fourth information for the other color space are set for each color in some or all of the color plates. Since the first information and the second information of the other color space are set in the additional plate and the data constituted by the color-specific plate and the additional plate is output as the code data, the encoded image data is in a predetermined format. Therefore, by using the format as a premise for encoding and decoding, information necessary for data management and decoding of encoded image data can be made easier. so That.

また、色空間が異なる画素領域が混在している画像データが、色数が最も多い色空間の色数に応じた数の部分データの各々に当該色空間の画素値を色別に含むと共に、当該数の一部又は全部の部分データの各々に他の色空間の画素値を色別に含むので、色空間毎に部分データを設ける必要がないことから、よりコンパクトな画像データとすることができ、画像データの処理に係り消費されるメモリーの容量等を低減させることができる。   Further, the image data in which pixel regions having different color spaces are mixed includes the pixel values of the color space in each of the partial data corresponding to the number of colors of the color space having the largest number of colors, and Since the pixel values of other color spaces are included for each color in part or all of the partial data, it is not necessary to provide partial data for each color space, so that more compact image data can be obtained. It is possible to reduce the memory capacity consumed in the processing of image data.

また、色空間が異なる画素領域が混在している画像データは、各部分データに含まれる画素値の色空間を示す情報を含む付加データを含むので、付加データを参照することで、各部分データに含まれる画素値がどの色空間に属する色の画素値なのか判別することができ、色空間別の符号化処理等をより容易に行うことができる。   In addition, image data in which pixel areas having different color spaces are mixed includes additional data including information indicating the color space of the pixel value included in each partial data. Therefore, by referring to the additional data, each partial data It is possible to determine which color space the pixel value included in the color value belongs to, and encoding processing for each color space can be performed more easily.

なお、本発明の実施の形態は、今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment of the present invention should be considered that the embodiment disclosed this time is illustrative and not restrictive in all respects. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

例えば、図21に示すように、色空間が異なる画素領域が混在している画像データは、各部分データに含まれる画素値の色空間を示す情報を他の色空間の画素値が含まれない部分データに含んでいてもよい。
図21に示す例では、部分データのうち、RGB色空間の色を含まないKプレートの最下位ビットを色系プレートとして割り当てている。最下位ビットは、0〜255の256階調を最大とする8ビットの色値の1階調分に相当するに過ぎないため、ブラック(K)の画素値の色再現に与える影響は軽微であると考えられる。
このように、各部分データに含まれる画素値の色空間を示す情報を他の色空間の画素値が含まれない部分データに含ませることで、画像データをよりコンパクトにすることができる。
For example, as shown in FIG. 21, image data in which pixel areas having different color spaces are mixed does not include information indicating the color space of the pixel value included in each partial data. It may be included in the partial data.
In the example shown in FIG. 21, the least significant bit of the K plate that does not include the color of the RGB color space is assigned as the color system plate among the partial data. Since the least significant bit corresponds to only one gradation of 8-bit color values that maximize 256 gradations from 0 to 255, the influence of black (K) pixel values on color reproduction is slight. It is believed that there is.
In this way, by including information indicating the color space of the pixel value included in each partial data in the partial data not including the pixel value of the other color space, the image data can be made more compact.

また、上記の実施の形態では、混在データ生成前にCMYK色空間の画像データが符号化されているが、一例であってこれに限られるものでない。例えば、混在データ生成前に行われるCMYK色空間の画像データに対する符号化及び復号化を省略して符号化を経ていないCMYK色空間の画像データとRGB色空間の画像データを集約するようにしてもよい。
また、RGB色空間のみによる画像データの符号化や復号化も可能である。
In the above embodiment, the image data in the CMYK color space is encoded before the mixed data is generated. However, this is an example, and the present invention is not limited to this. For example, encoding and decoding of image data in the CMYK color space performed before the mixed data generation is omitted, and image data in the CMYK color space and image data in the RGB color space that have not been encoded are aggregated. Good.
It is also possible to encode and decode image data only in the RGB color space.

また、上記の実施の形態では、Th1〜Th3の3つの区分値により階調の範囲を4つに区切っているが、これは符号値が2ビットで表されることから、「00」、「01」、「10」、「11」の計4パターンの符号値となることに対応したものであり、一例であってこれに限られるものでない。符号値のビット数は適宜変更可能であり、符号値のビット数に応じて、区分値の数、即ち、符号化に係り設定される階調の範囲の区分の数も変更される。   In the above-described embodiment, the gradation range is divided into four by the three segment values Th1 to Th3. Since the code value is represented by 2 bits, “00”, “ This corresponds to a total of four patterns of code values of “01”, “10”, and “11”, and is an example and is not limited thereto. The number of bits of the code value can be changed as appropriate, and the number of partition values, that is, the number of sections of the gradation range set for encoding is also changed according to the number of bits of the code value.

また、上記の実施の形態では、符号化処理における第1情報〜第4情報の生成や符号データの出力等の各種の処理が符号化部30の各部により個別に行われているが、一例であってこれに限られるものでない。例えば、符号化部30が備える各部の機能のうち、2以上の機能を有する処理部が設けられていてもよい。復号化処理における各種の処理についても同様である。   Further, in the above embodiment, various processes such as the generation of the first information to the fourth information and the output of the code data in the encoding process are individually performed by each unit of the encoding unit 30. It is not limited to this. For example, a processing unit having two or more functions among the functions of the units included in the encoding unit 30 may be provided. The same applies to various processes in the decryption process.

また、復号化処理に際して、復号データに含まれる各画素に、符号化前の同一の位置の画素が属していた色空間を示す情報を付加するようにしてもよい。
また、上記の実施の形態では、2×2の画素領域を所定の画素領域としているが、一例であってこれに限られるものでなく、適宜変更可能である。また、上記の実施の形態では、画像データを8×8画素単位で4×4ブロックの符号データに符号化しているが、一例であってこれに限られるものでなく、適宜変更可能である。復号化についても同様に、符号化の変更に応じて適宜変更可能である。
In the decoding process, information indicating a color space to which a pixel at the same position before encoding may be added to each pixel included in the decoded data.
In the above embodiment, the 2 × 2 pixel area is a predetermined pixel area. However, this is only an example, and the present invention is not limited to this, and can be changed as appropriate. In the above embodiment, the image data is encoded into 4 × 4 block code data in units of 8 × 8 pixels. However, this is an example, and the present invention is not limited to this, and can be changed as appropriate. Similarly, decoding can be changed as appropriate according to changes in encoding.

また、上記の実施の形態では、通信ネットワークNを介し画像形成装置1と他の機器が接続されているが、一例であってこれに限られるものでない。例えば、専用のインタフェースやバス等を介して画像形成装置1と他の機器を接続してもよい。   In the above embodiment, the image forming apparatus 1 and other devices are connected via the communication network N, but this is an example and the present invention is not limited to this. For example, the image forming apparatus 1 may be connected to another device via a dedicated interface or bus.

1 画像形成装置
4 読取装置
11 通信制御部
12 読取制御部
13 画像メモリー
14 入出力制御部
15 記憶制御部
16 記憶部
17 画像形成部
18 中央制御部
20 画像処理部
21 色変換部
22 集約部
30 符号化部
31 第1生成部
32 第2生成部
33 第3生成部
34 第4生成部
34a 第1処理部
34b 第2処理部
34c 濃度パターンデータ記憶部
35 出力部
40 復号化部
41 特定部
42 取得部
43 第5生成部
43a 判定部
43b 第3処理部
43c 第4処理部
43d 参照データ記憶部
DESCRIPTION OF SYMBOLS 1 Image forming apparatus 4 Reading apparatus 11 Communication control part 12 Reading control part 13 Image memory 14 Input / output control part 15 Storage control part 16 Storage part 17 Image forming part 18 Central control part 20 Image processing part 21 Color conversion part 22 Aggregation part 30 Encoding unit 31 First generation unit 32 Second generation unit 33 Third generation unit 34 Fourth generation unit 34a First processing unit 34b Second processing unit 34c Density pattern data storage unit 35 Output unit 40 Decoding unit 41 Identification unit 42 Acquisition unit 43 Fifth generation unit 43a Determination unit 43b Third processing unit 43c Fourth processing unit 43d Reference data storage unit

Claims (11)

画像データを所定の画素領域単位で符号化する符号化部と、前記符号化部により符号化された前記画像データを前記所定の画素領域単位で復号化する復号化部と、を備える画像処理装置において、
前記符号化部は、
前記画像データに色空間が異なる画素領域が混在している場合に、前記所定の画素領域の各々の色空間を示す情報を含む第1情報を生成する第1生成部と、
前記画像データに色空間が異なる画素領域が混在している場合に、各色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む第2情報を生成する第2生成部と、
各所定の画素領域に含まれる各色の階調幅を示す情報を含む第3情報を生成する第3生成部と、
前記第1情報、前記第2情報及び前記第3情報に基づいて、前記所定の画素領域を構成する複数の画素の画素値を色毎に前記階調幅に応じた符号化方法で符号化した符号値を示す第4情報を生成する第4生成部と、
前記第1情報、前記第2情報、前記第3情報及び前記第4情報を含むデータを符号化された前記画像データとして出力する出力部と、を備え、
前記復号化部は、
前記第1情報に基づいて前記所定の画素領域の各々の色空間を特定する特定部と、
前記第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得する取得部と、
前記特定部により特定された色空間、前記取得部により取得された各色の画素値の最大値及び最小値、前記第3情報ならびに前記第4情報に基づいて符号値を色毎に復号化した復号値を生成する第5生成部と、
を備えることを特徴とする画像処理装置。
An image processing apparatus comprising: an encoding unit that encodes image data in units of a predetermined pixel region; and a decoding unit that decodes the image data encoded by the encoding unit in units of the predetermined pixel region. In
The encoding unit includes:
A first generation unit configured to generate first information including information indicating each color space of the predetermined pixel region when pixel regions having different color spaces are mixed in the image data;
A second generation unit that generates second information including information indicating a maximum value and a minimum value of a pixel value of each color constituting each color space when pixel regions having different color spaces are mixed in the image data;
A third generation unit that generates third information including information indicating a gradation width of each color included in each predetermined pixel region;
Based on the first information, the second information, and the third information, a code obtained by encoding pixel values of a plurality of pixels constituting the predetermined pixel region for each color by an encoding method corresponding to the gradation width A fourth generation unit for generating fourth information indicating a value;
An output unit that outputs the data including the first information, the second information, the third information, and the fourth information as the encoded image data;
The decoding unit
A specifying unit that specifies each color space of the predetermined pixel area based on the first information;
An acquisition unit for acquiring a maximum value and a minimum value of pixel values of each color constituting each color space based on the second information;
Decoding by decoding the code value for each color based on the color space specified by the specifying unit, the maximum and minimum pixel values of each color acquired by the acquiring unit, the third information, and the fourth information A fifth generation unit for generating a value;
An image processing apparatus comprising:
前記第3生成部は、各所定の画素領域に含まれる各色の階調幅が中間調領域又は高解像度領域のいずれに属するかを示す情報を第3情報として生成し、
前記第4生成部は、
前記所定の画素領域に含まれる各色のうち、前記中間調領域に属する色の画素値を符号化する第1処理部と、
前記所定の画素領域に含まれる各色のうち、前記高解像度領域に属する色の画素値を前記第1処理部による符号化と異なる符号化方法で符号化する第2処理部と、を備え、
前記第5生成部は、
前記第3情報に基づいて、前記第4生成部により符号化された前記所定の画素領域に含まれる各色が前記中間調領域又は前記高解像度領域のいずれに属するのかを判定する判定部と、
前記判定部により前記中間調領域と判定された色の符号値を復号化する第3処理部と、
前記判定部により前記高解像度領域と判定された色の符号値を前記第3処理部と異なる復号化方法で復号化する第4処理部と、
を備えることを特徴とする請求項1に記載の画像処理装置。
The third generation unit generates, as third information, information indicating whether the gradation width of each color included in each predetermined pixel region belongs to a halftone region or a high resolution region,
The fourth generation unit includes:
A first processing unit that encodes pixel values of colors belonging to the halftone area among the colors included in the predetermined pixel area;
A second processing unit that encodes a pixel value of a color belonging to the high-resolution region among the colors included in the predetermined pixel region by an encoding method different from the encoding by the first processing unit;
The fifth generator is
A determination unit that determines, based on the third information, whether each color included in the predetermined pixel region encoded by the fourth generation unit belongs to the halftone region or the high-resolution region;
A third processing unit for decoding the code value of the color determined as the halftone region by the determination unit;
A fourth processing unit that decodes the code value of the color determined as the high-resolution area by the determination unit by a decoding method different from that of the third processing unit;
The image processing apparatus according to claim 1, further comprising:
前記第1処理部は、前記所定の画素領域を構成する複数の画素の画素値を平均化した平均値に基づいて符号値を得ることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the first processing unit obtains a code value based on an average value obtained by averaging pixel values of a plurality of pixels constituting the predetermined pixel region. 前記第1処理部は、前記中間調領域に属すると判定された色について、当該色の前記最大値と前記最小値との差に対応する階調の範囲を所定数の区分に区切って各区分に対応する符号値を設定し、前記平均値が含まれる区分に対応する符号値を特定して前記平均値が算出された所定の画像領域の当該色の符号値とし、
前記第3処理部は、符号値が取り得る値の各々に対して個別の復号値を色毎に設定し、前記中間調領域に属すると判定された色について、前記平均値が算出された所定の画素領域に対応する当該色の符号値に対応する復号値を特定することを特徴とする請求項3に記載の画像処理装置。
For each color determined to belong to the halftone area, the first processing unit divides a gradation range corresponding to a difference between the maximum value and the minimum value of the color into a predetermined number of sections. Set the code value corresponding to the above, specify the code value corresponding to the section including the average value, and the code value of the color of the predetermined image area where the average value is calculated,
The third processing unit sets a separate decoded value for each color that can be taken by the code value for each color, and the average value is calculated for the color determined to belong to the halftone area. The image processing apparatus according to claim 3, wherein a decoded value corresponding to a code value of the color corresponding to the pixel region is specified.
前記第2処理部は、前記所定の画素領域を構成する複数の画素の各々の画素値のうち、前記高解像度領域に属する色の画素値を2値化した濃度パターンに対応する符号値を得、
前記第4処理部は、前記第2処理部により得られた符号値と当該符号値に対応する濃度パターンを得るための参照データとに基づいて、当該符号値に対応する復号値を得ることを特徴とする請求項2から4のいずれか一項に記載の画像処理装置。
The second processing unit obtains a code value corresponding to a density pattern obtained by binarizing pixel values of colors belonging to the high resolution region among pixel values of a plurality of pixels constituting the predetermined pixel region. ,
The fourth processing unit obtains a decoded value corresponding to the code value based on the code value obtained by the second processing unit and reference data for obtaining a density pattern corresponding to the code value. The image processing apparatus according to claim 2, wherein the image processing apparatus is characterized.
前記出力部は、色数が最も多い色空間の色数に応じた数の色別プレートと、前記色別プレートと別の追加プレートと、を生成し、前記色別プレートの各々に色数が最も多い色空間の前記第2情報、前記第3情報及び前記第4情報を色別に設定すると共に、一部又は全部の色別プレートの各々に他の色空間の前記第3情報及び前記第4情報を色別に設定し、追加プレートに前記第1情報及び他の色空間の前記第2情報を設定し、前記色別プレート及び前記追加プレートにより構成されるデータを符号化された前記画像データとして出力することを特徴とする請求項1から5のいずれか一項に記載の画像処理装置。   The output unit generates a number of color-specific plates corresponding to the number of colors in the color space having the largest number of colors, the color-specific plate, and another additional plate, and each of the color-specific plates has a number of colors. The second information, the third information, and the fourth information of the most color space are set for each color, and the third information and the fourth of the other color space are set on each of all or some of the color plates. Information is set for each color, the first information and the second information of another color space are set in an additional plate, and the data composed of the color-specific plate and the additional plate is encoded as the image data The image processing apparatus according to claim 1, wherein the image processing apparatus outputs the image. 色空間が異なる画素領域が混在している画像データは、色数が最も多い色空間の色数に応じた数の部分データの各々に当該色空間の画素値を色別に含むと共に、当該数の一部又は全部の部分データの各々に他の色空間の画素値を色別に含むことを特徴とする請求項1から6のいずれか一項に記載の画像処理装置。   The image data in which pixel areas having different color spaces are mixed includes the pixel values of the color space in each of the partial data corresponding to the number of colors in the color space having the largest number of colors, The image processing apparatus according to any one of claims 1 to 6, wherein a pixel value of another color space is included for each color in part or all of the partial data. 前記色空間が異なる画素領域が混在している画像データは、各部分データに含まれる画素値の色空間を示す情報を含む付加データを含むことを特徴とする請求項7に記載の画像処理装置。   The image processing apparatus according to claim 7, wherein the image data in which pixel areas having different color spaces are mixed includes additional data including information indicating a color space of a pixel value included in each partial data. . 前記付加データは、色数が最も多い色空間の色数に応じた数の前記部分データのうち、前記他の色空間の画素値が含まれない部分データに含まれることを特徴とする請求項8に記載の画像処理装置。   The additional data is included in partial data that does not include pixel values in the other color space, out of the number of partial data corresponding to the number of colors in the color space having the largest number of colors. The image processing apparatus according to 8. 画像データを所定の画素領域単位で符号化する符号化方法において、
前記画像データに色空間が異なる画素領域が混在している場合に、前記所定の画素領域の各々の色空間を示す情報を含む第1情報を生成するステップと、
前記画像データに色空間が異なる画素領域が混在している場合に、各色空間を構成する各色の画素値の最大値及び最小値を示す情報を含む第2情報を生成するステップと、
各所定の画素領域に含まれる各色の階調幅を示す情報を含む第3情報を生成するステップと、
前記第1情報、前記第2情報及び前記第3情報に基づいて、前記所定の画素領域を構成する複数の画素の画素値を色毎に前記階調幅に応じた符号化方法で符号化した符号値を示す第4情報を生成するステップと、
前記第1情報、前記第2情報、前記第3情報及び前記第4情報を含むデータを符号化された前記画像データとして出力するステップと、を有することを特徴とする符号化方法。
In an encoding method for encoding image data in a predetermined pixel area unit,
When pixel regions having different color spaces are mixed in the image data, generating first information including information indicating each color space of the predetermined pixel region;
Generating second information including information indicating a maximum value and a minimum value of pixel values of each color constituting each color space when pixel regions having different color spaces are mixed in the image data;
Generating third information including information indicating a gradation width of each color included in each predetermined pixel region;
Based on the first information, the second information, and the third information, a code obtained by encoding pixel values of a plurality of pixels constituting the predetermined pixel region for each color by an encoding method corresponding to the gradation width Generating fourth information indicating a value;
And outputting the data including the first information, the second information, the third information, and the fourth information as the encoded image data.
請求項10に記載の符号化方法により符号化された前記画像データを前記所定の画素領域単位で復号化する復号化方法において、
前記第1情報に基づいて前記所定の画素領域の各々の色空間を特定するステップと、
前記第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得するステップと、
特定された色空間、取得された各色の画素値の最大値及び最小値、前記第3情報ならびに前記第4情報に基づいて符号値を色毎に復号化した復号値を生成するステップと、を有することを特徴とする復号化方法。
The decoding method for decoding the image data encoded by the encoding method according to claim 10 in units of the predetermined pixel area,
Identifying each color space of the predetermined pixel area based on the first information;
Obtaining a maximum value and a minimum value of pixel values of each color constituting each color space based on the second information;
Generating a decoded value obtained by decoding a code value for each color based on the specified color space, the maximum value and minimum value of the acquired pixel values of each color, the third information, and the fourth information; A decoding method characterized by comprising:
JP2013001476A 2013-01-09 2013-01-09 Image processing apparatus, encoding method, and decoding method Expired - Fee Related JP6044347B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013001476A JP6044347B2 (en) 2013-01-09 2013-01-09 Image processing apparatus, encoding method, and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013001476A JP6044347B2 (en) 2013-01-09 2013-01-09 Image processing apparatus, encoding method, and decoding method

Publications (2)

Publication Number Publication Date
JP2014135574A JP2014135574A (en) 2014-07-24
JP6044347B2 true JP6044347B2 (en) 2016-12-14

Family

ID=51413580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013001476A Expired - Fee Related JP6044347B2 (en) 2013-01-09 2013-01-09 Image processing apparatus, encoding method, and decoding method

Country Status (1)

Country Link
JP (1) JP6044347B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6701845B2 (en) 2016-03-16 2020-05-27 富士ゼロックス株式会社 Image processing apparatus and image processing program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3630828B2 (en) * 1996-01-31 2005-03-23 株式会社リコー Image forming apparatus and image data storage method
JP5029560B2 (en) * 2008-10-01 2012-09-19 コニカミノルタビジネステクノロジーズ株式会社 Image processing apparatus, compression method and decompression method
JP2011254429A (en) * 2010-06-04 2011-12-15 Fuji Xerox Co Ltd Image processing system and image processing program

Also Published As

Publication number Publication date
JP2014135574A (en) 2014-07-24

Similar Documents

Publication Publication Date Title
CN101902549B (en) Image processing apparatus and image processing method
CN102480581B (en) Image processing apparatus, image forming apparatus and image processing method
EP2173102B1 (en) Compression of photographic and halftone images
JP4548528B2 (en) Image processing apparatus and edge classification method
CN104702962A (en) Intra-frame coding and decoding method, coder and decoder
JP2009094619A (en) Compression method, extension method, and image processing apparatus
JP5668530B2 (en) Image processing method and image processing apparatus
JP2008236223A (en) Image processing apparatus and image processing program
JP6044347B2 (en) Image processing apparatus, encoding method, and decoding method
JP2007306513A (en) Method and device for image data compression
Memon et al. Lossless compression of RGB color images
CN110024383B (en) Image compression technique
US8233731B2 (en) Method and apparatus to encode and decode halftone image
CN104243768B (en) Image processing apparatus and image processing system
JP4584805B2 (en) Image processing apparatus, image processing method, and image processing program
JP4759502B2 (en) Image processing method, image processing apparatus, image processing program, and computer-readable recording medium recording the image processing program
CN101277366A (en) Image processing device, image processing method
JP4735806B2 (en) Encoding device, decoding device, and programs thereof
JP2013143609A (en) Image processing device, coding method and decoding method
JP2014099742A (en) Color/monochromatic determination
JP2016225724A (en) Image processing apparatus and image forming system
KR20080048391A (en) Apparatus and method for embedding data into image, and computer readable medium recording computer product
JP4382828B2 (en) Line image separation method, image compression method, and image processing apparatus using the same
Sahu et al. Hybrid Compression of Medical Images Based on Huffman and LPC For Telemedicine Application
JP5181916B2 (en) Image processing apparatus, compression method and decompression method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150817

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161013

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161031

R150 Certificate of patent or registration of utility model

Ref document number: 6044347

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees