JP6044347B2 - Image processing apparatus, encoding method, and decoding method - Google Patents
Image processing apparatus, encoding method, and decoding method Download PDFInfo
- 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
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.
ところで、画像データを取り扱う機器に入力される複数の画像データの各々が属する色空間が異なる場合がある。例えば、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
本発明によれば、画像データの各画素が属する色空間及び階調幅に対応した符号化又は復号化を行うことができる。 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.
以下、図面を参照して本発明の画像処理装置の実施の形態について説明する。 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
画像形成装置1は、通信制御部11、読取制御部12、画像メモリー13、画像処理部20、入出力制御部14、記憶制御部15、記憶部16、画像形成部17、中央制御部18等を備える。
また、画像形成装置1は、例えば、通信ネットワークNを介してPC2及びプリントコントローラー3と通信可能に接続されている。通信ネットワークNは、例えば、専用線や既存の一般公衆回線を利用して構築された通信ネットワークであり、LANやWAN等の様々な回線形態を適用することが可能である。また、通信ネットワークNには、例えば、電話回線網、ISDN回線網、専用線、移動体通信網、通信衛星回線、ケーブルTV回線網等の各種通信回線網と、それらを接続するインターネットサービスプロバイダ等が含まれる。
The
The
PC2は、通信ネットワークNを介してデータを画像形成装置1に出力する。ここで、PC2から出力されるデータは、例えば、PostScript(登録商標)等のページ記述言語により記述された画像データである。ここで、当該画像データの色空間は、例えば、RGB色空間である。
プリントコントローラー3は、通信ネットワークNを介してCMYK色空間の画像データを出力する。具体的には、プリントコントローラー3は、画像データを出力する図示しない機器と画像形成装置1との間に介在して、当該機器から出力された画像データをCMYK色空間の画像データに変換して画像形成装置1に出力する。
The
The
通信制御部11は、ネットワークインターフェースカード等の通信機器を備え、通信ネットワークNを介して接続されたPC2やプリントコントローラー3等の機器と、TCP/IP等の所定の規格による通信を行う。通信制御部11は、例えば、PC2やプリントコントローラー3から出力された画像データを取得する。
The
読取制御部12は、読取装置4に接続されている。
読取装置4は、原稿が設置されるコンタクトガラスや、コンタクトガラスを介して原稿に光を照射する光源、光源から発せられた光が原稿により反射された反射光を導くためのミラー群、ミラー群により導かれた反射光を結像させる集光レンズ、集光レンズによって結像された原稿からの反射光を光電変換することによって読取ライン毎のアナログの画像信号を生成するCCD等の撮像素子、等々を備え、アナログの画像信号を読取制御部12に出力する。
読取制御部12は、読取装置4の撮像素子により生成されたアナログの画像信号を所定のビット幅のデジタルの画像データに変換するA/D変換部や、当該画像データに対してシェーディング補正やMTFγ補正等の各種の補正処理を行う補正部等を備え、補正された画像データを出力する。
The
The
The
画像メモリー13は、例えば、DRAM等からなる揮発性の記憶装置であり、通信制御部11や読取制御部12を介して取得された画像データ等を記憶する。
The
画像処理部20は、読取制御部12等から出力された画像データ等に色変換処理を施す色変換部21、画像メモリー13に記憶された画像データを符号化する符号化部30、符号化部30により符号化された画像データを復号化する復号化部40、複数の画像データを一つの画像データとする集約部22等を備える。画像処理部20の詳細については後述する。
入出力制御部14は、各種のデータの入出力を制御する。入出力制御部14は、例えば、通信制御部11、読取制御部12、画像メモリー13、記憶制御部15、画像形成部17、画像処理部20等の間におけるデータの転送を制御する。
The
The input /
記憶制御部15は、記憶部16に記憶されるデータの入出力を制御するコントローラーである。
記憶部16は、HDD等の補助記憶装置を有し、記憶制御部15の制御下で各種のデータを記憶する。
The
The
画像形成部17は、画像データに基づいて、用紙に画像を形成する。
具体的には、画像形成部17は、例えば、用紙を搬送する搬送部、画像処理部20により処理が施された画像データ等を一時的に記憶するバッファー、バッファーに記憶された画像データに応じたトナー像を現像する現像部、現像されたトナー像を感光体に転写する第1転写部、感光体に転写されたトナー像を搬送されている用紙に転写する第2転写部、第2転写部により転写されたトナー像を用紙に定着させる定着部、定着部による処理後の用紙を排出する排出部等を備える。これらの画像形成部17の構成は、電子写真方式による画像形成を行う構成の一例であってこれに限られるものでない。例えば、インクジェット記録方式の画像形成等、他の方式の画像形成を行う画像形成部17であってもよい。
The
Specifically, the
中央制御部18は、CPU、RAM、ROM等を備える。CPUは、ROMに記憶されている各種のプログラム、データ等をRAM読み出して実行し、実行された処理内容に応じて画像形成装置1の各部の動作を制御する。RAMにはCPUで実行される各種のプログラムの他、処理に必要なパラメータやデータ等が保持される。
中央制御部18は、例えば、通信制御部11を介してPC2から出力されたページ記述言語により記述された画像データを取得すると、当該画像データに解析処理を施して中間言語データに変換し、当該中間言語データに対応するビットマップデータを生成して画像メモリー13に記憶させる。
The
For example, when the
次に、画像処理部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
As described above, the
色変換部21は、画像データに各種の色変換処理を施す。色変換部21による色変換処理として、例えば、画像データの色空間の変更に係る色変換処理が挙げられる。具体的には、色変換部21は、読取制御部12から出力されたRGB色空間の画像データをCMYK色空間の画像データに変換する。当該変換に係る処理の具体的内容は周知のものであるので、詳細な説明を省略する。
色変換部21により行われる色変換処理は、色空間の変更に係る色変換処理に限らない。例えば、グレースケール処理等の減色に係る色変換処理、特定の色の強調等、視覚的影響の変更を目的とした各色に対する個別の色変換処理等が挙げられるが、一例であってこれに限られるものでない。
The
The color conversion process performed by the
符号化部30は、画像データを符号化する符号化処理を行う。
具体的には、符号化部30は、例えば、色変換部21により色変換が施されたCMYK色空間の画像データを符号化する。符号化部30により符号化された画像データは、記憶制御部15を介して記憶部16に記憶される。以下、符号化部30により符号化された画像データを符号データと記載する。
例えば、符号化部30は、色変換部21から出力されたCMYK色空間の画像データを符号化する。また、符号化部30は、通信制御部11を介してプリントコントローラー3から出力されたCMYK色空間の画像データを符号化する。
The
Specifically, the
For example, the
復号化部40は、符号データを復号化する復号化処理を行う。
具体的には、復号化部40は、例えば、記憶制御部15を介して記憶部16から読み出された符号データを復号化して、復号化された画像データを取得する。以下、復号化部40により復号化された符号データを復号データと記載する。
The
Specifically, for example, the
集約部22は、それぞれ色空間が異なる複数の画像データを一つの画像データとする集約処理を行う。
集約部22は、例えば、CMYK色空間の画像データとRGB色空間の画像データに基づいて、これらの色空間に対応するデータが混在した一つの画像データを生成する。以下、集約部22により生成された、複数の色空間に対応するデータが混在した画像データを混在データと記載する。
The
For example, based on the image data in the CMYK color space and the image data in the RGB color space, the aggregating
集約部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
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
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
次に、画像形成装置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
For example, when image data is output from the
画像形成部17による画像形成に際して、記憶部16に記憶された符号データは記憶制御部15を介して読み出され、画像処理部20の復号化部40により復号化される。復号化部40による復号化を経て生成された復号データは画像メモリー13を経由して画像形成部17に出力される。画像形成部17は、復号データに基づいて画像形成を行う。
When the image is formed by the
ここで、符号化部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
For example, as illustrated in FIG. 4, the
An 8-bit pixel value is set for each pixel constituting the image data before the encoding process. The
復号化部40は、符号化部30により生成された符号データを、4×4ブロック単位で復号化して復号データを生成する。復号化処理において、復号化部40は、4×4ブロックに対応する8×8画素の復号データを生成する。
なお、図4を参照した説明では、画素領域とブロックの対応関係を簡便に示す目的で、復元化の矢印の図示においてbIJのブロックから画素aijが復元される関係を図示しているが、非可逆圧縮の場合、復元前の画素値と復元後の画素値とは異なる場合がある。以下、本実施の形態の説明において、符号化前の画素値と復号化された画素値を区別するため、符号化前の画素値をaijと記載し、復号化後の画素値をAijと記載する。
The
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
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
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
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
Specifically, the
例えば、上記と同様に、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
第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
Specifically, the
例えば、上記の例による混在データの場合、シアン(C)の最大値CMax及びCMinは、以下の式(1)、(2)により特定される。
CMax=MAX(a00,a01,a02,a03,a04,a05,a06,a07,
a10,a11,a12,a13,a14,a15,a16,a17,
a20,a21,a22,a23,a24,a25,a26,a27,
a30,a31,a32,a33,a34,a35,a36,a37,
a40,a41,a42,a43,
a50,a51,a52,a53,
a60,a61,a62,a63,
a70,a71,a72,a73)…(1)
CMin=MIN(a00,a01,a02,a03,a04,a05,a06,a07,
a10,a11,a12,a13,a14,a15,a16,a17,
a20,a21,a22,a23,a24,a25,a26,a27,
a30,a31,a32,a33,a34,a35,a36,a37,
a40,a41,a42,a43,
a50,a51,a52,a53,
a60,a61,a62,a63,
a70,a71,a72,a73)…(2)
また、レッド(R)の最大値RMax及びRMinは、以下の式(3)、(4)により特定される。
RMax=MAX(a44,a45,a46,a47,
a54,a55,a56,a57,
a64,a65,a66,a67,
a74,a75,a76,a77)…(3)
RMin=MIN(a44,a45,a46,a47,
a54,a55,a56,a57,
a64,a65,a66,a67,
a74,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
Specifically, the
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 |
中間調領域に属する画素領域の特徴に係る判定として、第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
For example, the
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
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
CTh1 <a ij ≦ CTh3 (13)
Further, as a determination related to the characteristics of the pixel area belonging to the halftone area, the
RTh1 <a ij ≦ RTh3 (14)
また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、シアン(C)の2×2画素の画素領域に含まれる4画素全てが以下の式(15)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(15)を満たすと判定されたシアン(C)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
aij≦CTh1…(15)
また、中間調領域に属する画素領域の特徴に係る判定として、第3生成部33は、レッド(R)の2×2画素の画素領域に含まれる4画素全てが以下の式(16)を満たすか否かの判定を画素領域毎に行う。第3生成部33は、4画素全てが式(16)を満たすと判定されたレッド(R)の2×2画素の画素領域を中間調領域に属する画素領域と判定する。
aij≦RTh1…(16)
Further, as a determination related to the characteristics of the pixel area belonging to the halftone area, the
a ij ≦ CTh1 (15)
In addition, as a determination relating to the characteristics of the pixel area belonging to the halftone area, the
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
CTh3 <a ij (17)
Further, as a determination relating to the characteristics of the pixel area belonging to the halftone area, the
RTh3 <a ij (18)
また、第3生成部33は、これらの中間調領域に属する画素領域の特徴に係る判定を経て、いずれの判定においても中間調領域と判定されなかった2×2の画素領域を高解像度領域に属する画素領域と判定する。
第3生成部33は、上記の判定結果に応じて各ブロックに対応する画素領域が中間調領域又は高解像度領域のいずれに属するかを示す情報を第4生成部34及び出力部35に出力する。
In addition, the
The
第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
As illustrated in FIG. 2, the
第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
例えば、第1処理部34aは、以下の式(19)により、中間調領域に属する色の2×2画素の画素領域に含まれる4画素の画素値の平均値avrijを算出する。
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).
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
Specifically, the
例えば、第2処理部34bは、以下の関係式(28)、(29)により、高解像度領域に属するシアン(C)の2×2画素の画素領域を構成する4画素の各々の画素値を「0」又は「1」のいずれかの値に置き換える2値化処理を行う。
aij>CTh3の場合、aij=1…(28)
aij≦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値化処理を行う。
aij>RTh3の場合、aij=1…(30)
aij≦RTh1の場合、aij=0…(31)
そして、第2処理部34bは、図8に示すように、予め定められた濃度パターンと符号値との対応関係を示す濃度パターンデータを参照して、上記の関係式(30)、(31)により「0」と「1」の値の組み合わせに置き換えられた2×2画素の濃度パターンが該当する符号値を特定する。
For example, the
When a ij > CTh3, a ij = 1 (28)
When a ij ≦ CTh1, a ij = 0 (29)
Then, as shown in FIG. 8, the
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
In addition, the
When a ij > RTh3, a ij = 1 (30)
When a ij ≦ RTh1, a ij = 0 (31)
Then, as shown in FIG. 8, the
このように、第2処理部34bは、濃度パターンを4つのパターンにグループ分けし、各グループに割り当てられた符号値に応じて高解像度領域に属する2×2画素の画素領域を量子化してBTC符号の符号値BTCIJを割り当てる。
As described above, the
以上、混在データに含まれる部分データのうち、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
Specifically, the
More specifically, the
符号化部30は、上記のように、混在データを構成する複数の画素を8×8画素単位で色毎に符号化して符号データを生成する処理を繰り返すことで混在データの全画素及び全色の符号化を行う。
As described above, the
次に、符号データの復号化について説明する。
図2に示すように、復号化部40は、特定部41、取得部42、第5生成部43等を備える。
Next, decoding of code data will be described.
As illustrated in FIG. 2, the
特定部41は、第1情報に基づいて2×2画素の画素領域の各々の色空間を特定する。
具体的には、特定部41は、符号データの追加プレートであるTAGプレートの上位側から数えて先頭の1ビットに設定された色系プレーンを読み出して、4×4の各ブロックの色空間を特定する。特定部41は、各ブロックの色空間の特定結果を第5生成部43に出力する。
The specifying
Specifically, the specifying
例えば、図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
取得部42は、第2情報に基づいて各色空間を構成する各色の画素値の最大値及び最小値を取得する。
具体的には、取得部42は、符号データの色別プレートの各々の上位側から数えて4ビット目、即ち、末尾の1ビットに設定された第1の差分プレーンを読み出して、CMYK色空間の各色の画素値の最大値及び最小値を取得する。
また、取得部42は、符号データの追加プレートであるTAGプレートの上位側から数えて2〜4ビット目に設定された第2の差分プレーンを読み出して、RGB色空間の各色の画素値の最大値及び最小値を取得する。
取得部42は、取得された各色の画素値の最大値及び最小値を第5生成部43に出力する。
The
Specifically, the
In addition, the
The
第5生成部43は、特定部41により特定された色空間、取得部42により特定された各色の画素値の最大値及び最小値、第3情報及び第4情報に基づいて符号値を色毎に復号化した復号値を生成する。以下、第5生成部43による復号値の生成の一例として、符号データの色別プレートのうち、C/Rプレートに含まれる符号値に対応する復号値の生成について説明する。
図2に示すように、第5生成部43は、判定部43a、第3処理部43b及び第4処理部43cを備える。
The
As illustrated in FIG. 2, the
判定部43aは、第3情報に基づいて、符号化部30の第4生成部34により符号化された所定の画素領域に含まれる各色が中間調領域又は高解像度領域のいずれに属するのかを判定する。
具体的には、判定部43aは、符号データのC/Rプレートの上位側から数えて先頭の1ビットに設定された識別プレーンを読み出して、各ブロックに対応する2×2画素の画素領域が符号化前に中間調領域又は高解像度領域のいずれに属する画素領域であったのかを判定する。
The
Specifically, the
第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
Specifically, the
In addition, the
例えば、第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
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
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
In the above equations (32) to (39), the pixel value A ij is an 8-bit pixel value. That is, the
第4処理部43cは、判定部43aにより高解像度領域と判定された色の符号値を第3処理部43bと異なる復号化方法で復号化する。以下、第4処理部43cによる復号化を第2復号化処理と記載する場合がある。
具体的には、第4処理部43cは、符号化部30の第2処理部34bにより得られた符号値と当該符号値に対応する濃度パターンを得るための参照データとに基づいて、当該符号値に対応する復号値を得る。
The
Specifically, the
より具体的には、第4処理部43cは、例えば、図9から図12に示すテンプレート群を参照データとして、符号データの各ブロックの符号値のうち、高解像度領域と判定されたブロックの復号値を色毎に得るための処理を行う。図9〜図12に示すテンプレート群は、処理対象となる符号値が設定されたブロックを注目ブロックPとし、注目ブロックPとその周囲のブロックとの関係についてパターンマッチングを行うためのテンプレート群である。参照データは、例えば、第4処理部43cに接続された参照データ記憶部43dに記憶されている。
More specifically, for example, the
以下、一例として、高解像度領域と判定されたシアン(C)の符号値の復号化について説明する。
高解像度領域と判定されたシアン(C)の符号値が「00」である場合、第4処理部43cは、図9に示す第1テンプレート群を参照する。ここで、図9等においてVの符号が付されたブロックは、中間調領域と判定されたブロックであって、かつ、以下の式(40)を満たすことを条件とする。
|Vden−bIJMax|<TC…(40)
ここで、Vdenは、第3処理部43bにより復号化されたVのブロックの復号値である。また、bIJMaxは、注目ブロックPが含まれる符号データの4×4ブロックにおけるシアン(C)の最大値CMaxである。また、TCは、中間調領域の復号値とbIJMaxの間における濃度差の大小を判断するための閾値として設定された所定の値である。
また、図9等においてWの符号が付されたブロックは、高解像度領域と判定されたブロックであって、かつ、以下の式(41)を満たすことを条件とする。
|WMax−bIJMax|<TM…(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とならない場合が有り得る。また、TMは、高解像度領域のブロック間の濃度差の大小を判断するための閾値として設定された所定の値である。
なお、テンプレートにおいて符号が付されている領域が注目ブロック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
| V den -b IJMax | <T C ... (40)
Here, V den is a decoded value of the block of V decoded by the
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).
なお、TC、TMは濃度差が小さいかどうかを判断するための閾値であり、適宜設定することが可能であるが、例えば、TC=30、TM=35等に設定することができる。このようにTC、TMは異なる値としてもよいし同じ値としてもよい。このTC、TMと比較することにより、濃度差が小さい、即ち、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
優先順位を示す情報は、第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
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
ここで、「復号値を算出するための条件」を満たすテンプレートの選定基準は、任意に定めることができる。
例えば、第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
また、優先順位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
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
When BTC IJ = 00, A ij = CMax × 1/4 (42)
When the code value is decoded using the average pattern, the
以上、高解像度領域と判定されたシアン(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
For example, for the code value “01” of cyan (C) determined to be a high resolution region, the
When the result of the pattern matching is that there is no template that satisfies the “condition for calculating the decoded value”, the
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
以上、符号データの色別プレートのうち、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
以下、図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
When 8 × 8 pixels are input, the
Further, the
次に、第3生成部33は、符号化がまだ行われていない1つの色について、当該色の最大値と最小値の差が閾値T未満であるか否か判定する(ステップS4)。ここで、当該色の最大値と最小値の差が閾値T未満であると判定された場合(ステップS4:YES)、第3生成部33は、当該1つの色について、8×8画素に含まれる全ての2×2の画素領域が中間調領域であると判定し、当該判定結果を示す情報を生成して出力する。また、この場合、当該1つの色について、8×8画素に含まれる全ての2×2の画素領域に対して中間調領域の符号化処理、即ち、第1符号化処理が行われる(ステップS5)。
Next, the
ここで、図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
Further, as illustrated in FIG. 7, the
Thereafter, as shown in the examples of the above formulas (20) to (23) and (24) to (27), the
図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
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
また、ステップ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
In addition, the
第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
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
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
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
Thus, the 3rd production |
ステップ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
Thus, the 4th production |
ステップ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
以下、図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
When the 4 × 4 block is input, the specifying
Further, the
次に、第5生成部43は、まだ復号化が行われていない1つの色を処理対象の色とする(ステップS44)。また、第5生成部43は、ステップS44にて処理対象とされた1つの色に対応する色別プレートのうち、まだ復号化が行われていない1つのブロックを処理対象とする(ステップS45)。
Next, the
第5生成部43の判定部43aは、ステップS45にて処理対象とされた1つのブロックについて、第3情報に基づいて、当該ブロックに対応する符号化前の2×2画素の画素領域が中間調領域又は高解像度領域のいずれに属するのかを判定する。ここで、中間調領域に属すると判定された場合(ステップS46:YES)、当該ブロックに対して中間調領域の復号化処理、即ち、第1復号化処理が行われる(ステップS47)。一方、高解像度領域に属すると判定された場合(ステップS46:NO)、当該ブロックに対して高解像度領域の復号化処理、即ち、第2復号化処理が行われる(ステップS48)。
Based on the third information, the
以下、第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
図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
Specifically, for example, the
In step S71, if the code value BTC IJ of the block is not “00” (step S71: NO), the
In step S72, if the code value BTC IJ of the block is not “01” (step S72: NO), the
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
FIG. 20 is a flowchart illustrating an example of the flow of pattern matching.
First, the
On the other hand, if there is no template that satisfies all the conditions in step S82 (step S82: NO), the
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
図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
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
以上、本実施形態の画像形成装置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
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
また、復号化処理に際して、復号データに含まれる各画素に、符号化前の同一の位置の画素が属していた色空間を示す情報を付加するようにしてもよい。
また、上記の実施の形態では、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
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
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:
前記第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:
前記第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.
前記第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.
前記画像データに色空間が異なる画素領域が混在している場合に、前記所定の画素領域の各々の色空間を示す情報を含む第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.
前記第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:
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)
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)
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 |
-
2013
- 2013-01-09 JP JP2013001476A patent/JP6044347B2/en not_active Expired - Fee Related
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 |