JP2011019095A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2011019095A
JP2011019095A JP2009162413A JP2009162413A JP2011019095A JP 2011019095 A JP2011019095 A JP 2011019095A JP 2009162413 A JP2009162413 A JP 2009162413A JP 2009162413 A JP2009162413 A JP 2009162413A JP 2011019095 A JP2011019095 A JP 2011019095A
Authority
JP
Japan
Prior art keywords
pixel
value
prediction
prediction error
interest
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009162413A
Other languages
Japanese (ja)
Inventor
Naohito Shiraishi
尚人 白石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009162413A priority Critical patent/JP2011019095A/en
Publication of JP2011019095A publication Critical patent/JP2011019095A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processor performing compression encoding processing for an image at a higher speed.SOLUTION: A simple prediction processing portion 410 determines whether a pixel value is in agreement for a sequence composed of a pixel of interest and peripheral pixels a, b, and c around the pixel of interest at lease in one of the longitudinal direction and the lateral direction, respectively. If it is determined that the pixel value is in agreement for every sequence in the longitudinal direction or the lateral direction, a run-length-generation processing portion 405 generates a run-length, under the condition that a prediction error to the pixel of interest is 0. On the other hand, if it is determined that a sequence with a mismatched pixel value exists in the longitudinal direction and a sequence with a mismatched pixel value exists in the lateral direction, a prediction processing portion 403 predicts a pixel value of the pixel of interest using the LOCO-I system or the Paeth system. A prediction error processing portion 404 calculates a prediction error. The run-length-generation processing portion 405 generates the run-length, based on the prediction error.

Description

本発明は、画像データを圧縮符号化する画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for compressing and encoding image data.

プリンタ装置などの画像形成装置では、入力された画像データを一時的にメモリに記憶し、このメモリに記憶された画像データを所定のタイミングで読み出して、印刷動作を行う。この場合、画像データをそのままメモリに格納しようとすると、大容量のメモリが必要になり装置のコストが嵩んでしまう。そのため、一般的には、入力された画像データを、圧縮符号化してメモリに格納するようにしている。   In an image forming apparatus such as a printer, input image data is temporarily stored in a memory, and the image data stored in the memory is read at a predetermined timing to perform a printing operation. In this case, if the image data is stored in the memory as it is, a large-capacity memory is required and the cost of the apparatus increases. Therefore, generally, input image data is compression-encoded and stored in a memory.

この、プリンタ装置などでは、予測符号化を用いた圧縮符号化が一般的に用いられる。予測符号化は、画像において、隣接する画素同士の相関が高いという性質を利用し、符号化済みの画素の画素値から符号化対象である注目画素の画素値を予測し、予測値と注目画素の実際の画素値との差分を、エントロピー符号化により符号化する。   In this printer apparatus or the like, compression encoding using predictive encoding is generally used. Predictive coding uses the property that the correlation between adjacent pixels is high in an image, predicts the pixel value of a target pixel to be encoded from the pixel values of the encoded pixels, and predicts the predicted value and the target pixel. The difference from the actual pixel value is encoded by entropy encoding.

この予測符号化に従来から用いられる方法として、平面予測方式やPaeth方式、LOCO−I(LOw COmplexity LOssless COmpression for Images)方式などが知られている。平面予測方式は、JPEG(Joint Photographic Experts Group)の可逆符号化モードに採用されている。Paeth方式は、Alan W.Paeth氏が考案した予測方式であり、国際標準化された可逆圧縮方式であるPNG(Portable Network Graphics)に採用されている。Paeth方式については、「Paeth, A.W.,"Image File Compression Made Easy", in Graphics Gems II, James Arvo, editor. Academic Press, San Diego, 1991」に記載がある。また、LOCO−I方式は、国際標準化された圧縮方式であるJPEG−LS(Joint Photographic Experts Group-LS)に採用されている。LOCO−I方式については、「M.J.Weinberger," LOCO-I: A Low Complexity, Context-Based, Lossless Image Compression Algorithm" Proc. IEEE Data Compression conference(DCC),snowbird,Utah」に記載がある。   As a method conventionally used for this predictive coding, a plane prediction method, a Paeth method, a LOCO-I (LOw COmplexity Lossless Compression for Images) method, and the like are known. The plane prediction method is adopted in a lossless encoding mode of JPEG (Joint Photographic Experts Group). The Paeth method is disclosed in Alan W. It is a prediction method devised by Mr. Paeth and is adopted in PNG (Portable Network Graphics) which is an internationally standardized lossless compression method. The Paeth method is described in “Paeth, A.W.,“ Image File Compression Made Easy ”, Graphics Gems II, James Arvo, editor. Academic Press, San Diego, 1991”. The LOCO-I system is adopted in JPEG-LS (Joint Photographic Experts Group-LS), which is an internationally standardized compression system. The LOCO-I system is described in “M. J. Weinberger,“ LOCO-I: A Low Complexity, Context-Based, Lossless Image Compression Algorithm ”Proc. IEEE Data Compression conference (DCC), snowbird, Utah”.

これらの予測方式のうち、LOCO−I方式およびPaeth方式は、平面予測と比較して、画素毎の処理量が多い一方で、予測値の注目画素の画素値に対する予測誤差が小さく、より高精度な予測が可能なことが知られている。   Among these prediction methods, the LOCO-I method and the Paeth method have a larger amount of processing for each pixel than the planar prediction, but the prediction error of the prediction value with respect to the pixel value of the target pixel is small, and higher accuracy. It is known that accurate prediction is possible.

特許文献1には、注目画素を周辺画素から予測した予測誤差をハフマン符号化する際に、予測誤差の値を、その値の範囲で複数のグループに分類して分類内部の順位を示す数値である付加ビットへ変換し、グループ値と付加ビット値とをハフマン符号化する技術が開示されている。   In Patent Document 1, when a prediction error obtained by predicting a target pixel from surrounding pixels is Huffman-coded, the prediction error values are classified into a plurality of groups within the range of the values, and are numerical values indicating the rank within the classification. A technique is disclosed in which a group value and an additional bit value are converted into a certain additional bit and Huffman encoded.

また、特許文献2には、複数の予測部および予測誤差算出部と、それらを選択する選択部と、選択部で選択された予測誤差や複数の予測部の識別番号を符号化する符号化部で構成される画像符号化装置が開示されている。特許文献2では、複数の予測部において予測が的中した長さをランレングスで符号化し、的中しない場合は、予測誤差算出部で求めた予測誤差を符号化するようにしている。   Patent Document 2 discloses a plurality of prediction units and prediction error calculation units, a selection unit that selects them, and an encoding unit that encodes the prediction error selected by the selection unit and the identification numbers of the plurality of prediction units. Is disclosed. In Patent Document 2, the length predicted by a plurality of prediction units is encoded by run length, and when the prediction is not correct, the prediction error obtained by the prediction error calculation unit is encoded.

さらに、特許文献3には、第1および第2の予測方法を用いて注目画素の画素値を予測する技術が記載されている。すなわち、特許文献3では、先ず第1の予測方法を用いて注目画素の画素値を予測し、予測値が注目画素の画素値と一致する場合には、この第1の予測方法を示すIDを符号に付加し、一致しない場合は、第2の予測方法で注目画素の画素値を予測する。第2の予測方法による予測値が注目画素の画素値と一致する場合には、この第2の予測方法を示すIDを符号に付加する。そして、第1および第2の予測方法により予測された予測値が何れも注目画素の画素値に一致しない場合は、予測誤差が小さい方の予測方法に対して不一致を示すIDを符号に付加し、その予測誤差を符号化するようにしている。   Furthermore, Patent Document 3 describes a technique for predicting the pixel value of a target pixel using the first and second prediction methods. That is, in Patent Document 3, first, the pixel value of the target pixel is predicted using the first prediction method, and when the predicted value matches the pixel value of the target pixel, an ID indicating the first prediction method is set. If it is added to the code and does not match, the pixel value of the pixel of interest is predicted by the second prediction method. When the predicted value according to the second prediction method matches the pixel value of the target pixel, an ID indicating the second prediction method is added to the code. If the prediction values predicted by the first and second prediction methods do not match the pixel value of the target pixel, an ID indicating a mismatch with respect to the prediction method with the smaller prediction error is added to the code. The prediction error is encoded.

ところで、プリンタ装置などでは、印字のための画像処理を、プリントエンジンの印字速度に応じて行う必要がある。印字速度の高速化に対応するためには、画像の圧縮率を高めると共に、画像の圧縮符号化に要する処理速度の高速化が必要となる。すなわち、プリントエンジンの印字速度よりも画像の圧縮符号化の処理速度の方が遅くなると、良好な印字品質が得られなくなる。そのため、より高速な画像の圧縮符号化方法が求められている。   Incidentally, in a printer apparatus or the like, it is necessary to perform image processing for printing in accordance with the printing speed of the print engine. In order to cope with an increase in printing speed, it is necessary to increase the image compression rate and increase the processing speed required for image compression encoding. That is, if the processing speed of image compression encoding is slower than the printing speed of the print engine, good print quality cannot be obtained. Therefore, there is a need for a faster image compression encoding method.

多値画像の可逆圧縮方式として知られているJPEGの可逆符号化モードは、7つの予測式で予測誤差の統計を作成し、最も良い結果が得られた予測式を1つ選択し、選択された予測式を用いて画像データの符号化を行う。しかしながら、このJPEGの可逆符号化モードでは、1つの画像に対して7つの予測式のそれぞれで予測誤差の統計を作成するために、多値画像を2回処理する2パス方式となり、処理時間が多くかかるという問題点があった。   JPEG's lossless encoding mode, known as a lossless compression method for multi-valued images, creates prediction error statistics with seven prediction formulas, selects one prediction formula that gives the best results, and is selected. The image data is encoded using the prediction formula. However, in this lossless encoding mode of JPEG, in order to create a prediction error statistic with each of seven prediction formulas for one image, a two-pass method for processing a multi-valued image twice is used, and the processing time is reduced. There was a problem that it took a lot.

また、上述した特許文献2によれば、複数の予測部により複数の予測処理を行い予測誤差を求めているため、多くの処理を必要とし、この場合においても処理時間が多くかかってしまうという問題点があった。   Further, according to Patent Document 2 described above, since a plurality of prediction processes are performed by a plurality of prediction units to obtain a prediction error, a large amount of processing is required, and even in this case, it takes a long processing time. There was a point.

さらに、上述した特許文献3によれば、少なくとも2の予測方法を試行してから予測誤差を求めるようにしているため、多くの処理が必要となり、処理時間が多くかかってしまうという問題点があった。   Further, according to Patent Document 3 described above, since the prediction error is obtained after trying at least two prediction methods, a large amount of processing is required and a long processing time is required. It was.

さらにまた、上述した特許文献1では、入力画像の画素単位に画素毎に予測誤差を求めてハフマン符号化を行っている。すなわち、特許文献1によれば、上述した平面予測方式、Paeth方式、LOCO−I方式などを用いて、画素毎に予測処理を行う必要がある。そのため、処理速度の高速化が困難であるという問題点があった。   Furthermore, in Patent Document 1 described above, a prediction error is obtained for each pixel for each pixel of the input image, and Huffman coding is performed. That is, according to Patent Document 1, it is necessary to perform prediction processing for each pixel using the above-described planar prediction method, Paeth method, LOCO-I method, and the like. Therefore, there is a problem that it is difficult to increase the processing speed.

本発明は、上記に鑑みてなされたものであって、画像の圧縮符号化処理をより高速に行うことが可能な画像処理装置および画像処理方法を提供することを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to provide an image processing apparatus and an image processing method capable of performing image compression encoding processing at higher speed.

上述した課題を解決し、目的を達成するために、本発明は、多値画像データを圧縮符号化する画像処理装置であって、注目画素と注目画素の周辺画素との、画像の縦方向および横方向のうち少なくとも一方の相関に基づき、注目画素の画素値と注目画素の画素値に対する予測値との差分である予測誤差値が0であるか否かの判定を行う第1の予測手段と、第1の予測手段により予測誤差値が0ではないと判定された場合に、注目画素の画素値に対する予測値を、注目画素の画素値と注目画素の周辺画素の画素値とに基づく予測により求め、予測により求められた予測値の注目画素の画素値に対する予測誤差値を算出する第2の予測手段と、第1の予測手段および第2の予測手段で得られた予測誤差値の符号化を行う符号化手段とを有することを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention is an image processing apparatus that compresses and encodes multi-valued image data, and includes a vertical direction of an image of a target pixel and peripheral pixels of the target pixel, and First prediction means for determining whether or not a prediction error value, which is a difference between a pixel value of a target pixel and a predicted value with respect to the pixel value of the target pixel, is 0 based on at least one correlation in the horizontal direction; When the prediction error value is determined not to be 0 by the first prediction unit, the prediction value for the pixel value of the target pixel is calculated based on the prediction based on the pixel value of the target pixel and the pixel values of the surrounding pixels of the target pixel. Second prediction means for calculating a prediction error value for the pixel value of the target pixel of the prediction value obtained by the determination and prediction, and encoding of the prediction error value obtained by the first prediction means and the second prediction means Coding means for performing And features.

また、本発明は、多値画像データを圧縮符号化する画像処理方法であって、注目画素と注目画素の周辺画素との、画像の縦方向および横方向のうち少なくとも一方の相関に基づき、注目画素の画素値と注目画素の画素値に対する予測値との差分である予測誤差値が0であるか否かの判定を行う第1の予測ステップと、第1の予測ステップにより予測誤差値が0ではないと判定された場合に、注目画素の画素値に対する予測値を、注目画素の画素値と注目画素の周辺画素の画素値とに基づく予測により求め、予測により求められた予測値の注目画素の画素値に対する予測誤差値を算出する第2の予測ステップと、第1の予測ステップおよび第2の予測ステップで得られた予測誤差値の符号化を行う符号化ステップとを有することを特徴とする。   The present invention is also an image processing method for compressing and encoding multi-value image data, and based on a correlation between at least one of a vertical direction and a horizontal direction of an image between a target pixel and peripheral pixels of the target pixel. A first prediction step for determining whether or not a prediction error value, which is a difference between a pixel value of a pixel and a prediction value with respect to a pixel value of a target pixel, is 0, and the prediction error value is 0 by the first prediction step. If it is determined that the pixel value of the target pixel is not, the prediction value for the pixel value of the target pixel is obtained by prediction based on the pixel value of the target pixel and the pixel values of the surrounding pixels of the target pixel. A second prediction step for calculating a prediction error value for each pixel value, and an encoding step for encoding the prediction error value obtained in the first prediction step and the second prediction step. To do.

本発明によれば、画像の圧縮符号化処理をより高速に行うことが可能となるという効果を奏する。   According to the present invention, it is possible to perform an image compression encoding process at a higher speed.

図1は、この発明の実施形態による画像処理装置を適用可能な画像形成装置の機構部の構成例を示す略線図である。FIG. 1 is a schematic diagram illustrating a configuration example of a mechanism unit of an image forming apparatus to which an image processing apparatus according to an embodiment of the present invention can be applied. 図2は この発明の実施形態による画像処理装置を適用可能な画像形成装置における電装・制御装置の一例の構成を示すブロック図である。FIG. 2 is a block diagram showing a configuration of an example of the electrical / control apparatus in the image forming apparatus to which the image processing apparatus according to the embodiment of the present invention can be applied. 図3は、メインメモリ210の一例のフォーマットを示す略線図である。FIG. 3 is a schematic diagram illustrating an example format of the main memory 210. 図4は、メインメモリおけるCMYKバンドデータ格納領域の一例のフォーマットを示す略線図である。FIG. 4 is a schematic diagram showing a format of an example of the CMYK band data storage area in the main memory. 図5は、この発明の実施形態による画像処理装置を適用可能なカラープリンタにおける画像処理を概略的に示す一例のフローチャートである。FIG. 5 is a flowchart of an example schematically showing image processing in a color printer to which the image processing apparatus according to the embodiment of the present invention can be applied. 図6は、本発明の実施形態による符号化部の一例の構成を示すブロック図である。FIG. 6 is a block diagram showing a configuration of an example of an encoding unit according to the embodiment of the present invention. 図7は、CMYKバンドデータ格納領域からのCMYKバンドデータの読み出し順を説明するための略線図である。FIG. 7 is a schematic diagram for explaining the reading order of CMYK band data from the CMYK band data storage area. 図8は、予測処理で用いる画素を説明するための略線図である。FIG. 8 is a schematic diagram for explaining pixels used in the prediction process. 図9は、LOCO−I方式による予測処理の例を示すフローチャートである。FIG. 9 is a flowchart illustrating an example of prediction processing by the LOCO-I method. 図10は、Paeth方式による予測処理の例を示すフローチャートである。FIG. 10 is a flowchart illustrating an example of prediction processing by the Paeth method. 図11−1は、本発明の実施形態による符号の一例のフォーマットを示す略線図である。FIG. 11A is a schematic diagram illustrating an exemplary format of a code according to an embodiment of the present invention. 図11−2は、本発明の実施形態による符号の一例のフォーマットを示す略線図である。FIG. 11B is a schematic diagram illustrating an exemplary format of a code according to an embodiment of the present invention. 図12は、本発明の実施形態による符号の一例のフォーマットを示す略線図である。FIG. 12 is a schematic diagram illustrating a format of an example of a code according to the embodiment of the present invention. 図13は、本発明の実施形態による符号化処理を示す一例のフローチャートである。FIG. 13 is an example flowchart illustrating an encoding process according to an embodiment of the present invention. 図14は、本発明の実施形態による簡易的な予測処理における一例の判定処理を示すフローチャートである。FIG. 14 is a flowchart showing an exemplary determination process in the simple prediction process according to the embodiment of the present invention. 図15−1は、実際のプリンタ画像の一例を示す略線図である。FIG. 15A is a schematic diagram illustrating an example of an actual printer image. 図15−2は、実際のプリンタ画像の一例を示す略線図である。FIG. 15B is a schematic diagram illustrating an example of an actual printer image. 図16−1は、本発明の実施形態による簡易的な予測処理について検証するために用いる略線図である。FIG. 16A is a schematic diagram used for verifying simple prediction processing according to the embodiment of the present invention. 図16−2は、本発明の実施形態による簡易的な予測処理について検証するために用いる略線図である。FIG. 16-2 is a schematic diagram used for verifying simple prediction processing according to the embodiment of the present invention. 図17−1は、本発明の実施形態による簡易的な予測処理について検証するために用いる略線図である。FIG. 17A is a schematic diagram used for verifying simple prediction processing according to the embodiment of the present invention. 図17−2は、本発明の実施形態による簡易的な予測処理について検証するために用いる略線図である。FIG. 17-2 is a schematic diagram used for verifying simple prediction processing according to the embodiment of the present invention.

以下に添付図面を参照して、この発明に係る画像処理装置の最良な実施形態を詳細に説明する。図1は、この発明の実施形態による画像処理装置を適用可能な画像形成装置(カラープリンタとする)の機構部の構成例を示す。なお、本実施形態では、本発明に係る画像処理装置および画像処理方法をカラープリンタである画像形成装置に適用した例について説明するが、文字画像を含む画像に画像処理を施すものであれば、これに限定するものではない。例えば、本発明は、複写機、ファクシミリ、複合機などの画像処理装置にも適用することができる。   Exemplary embodiments of an image processing apparatus according to the present invention will be explained below in detail with reference to the accompanying drawings. FIG. 1 shows an example of the structure of a mechanism part of an image forming apparatus (referred to as a color printer) to which an image processing apparatus according to an embodiment of the present invention can be applied. In this embodiment, an example in which the image processing apparatus and the image processing method according to the present invention are applied to an image forming apparatus that is a color printer will be described. However, as long as image processing is performed on an image including a character image, However, the present invention is not limited to this. For example, the present invention can be applied to an image processing apparatus such as a copying machine, a facsimile machine, and a multifunction machine.

図1に例示されるカラープリンタ100は、4色(Y、M、C、K)の画像をそれぞれ独立の作像系1Y、1M、1C、1Kで形成し、この4色の画像を合成する4ドラムタンデムエンジンタイプの画像形成装置である。各作像系1Y、1M、1C、1Kは、像担持体としての感光体、例えば小径のOPC(有機感光体)ドラム2Y、2M、2C、2Kを有し、このOPCドラム2Y、2M、2C、2Kを取り囲むように作像の上流側から帯電手段としての帯電ローラ3Y、3M、3C、3Kと、OPCドラム2Y、2M、2C、2K上の静電潜像をそれぞれ現像剤で現像してY、M、C、K各色のトナー像とする現像装置4Y、4M、4C、4Kと、クリーニング装置5Y、5M、5C、5Kと、除電装置6Y、6M、6C、6Kなどが配置されている。   A color printer 100 illustrated in FIG. 1 forms images of four colors (Y, M, C, K) by independent image forming systems 1Y, 1M, 1C, and 1K, and synthesizes these four color images. This is a 4-drum tandem engine type image forming apparatus. Each of the image forming systems 1Y, 1M, 1C, and 1K includes a photoconductor as an image carrier, for example, small-diameter OPC (organic photoconductor) drums 2Y, 2M, 2C, and 2K, and the OPC drums 2Y, 2M, and 2C. The electrostatic latent images on the charging rollers 3Y, 3M, 3C, and 3K as charging means and the OPC drums 2Y, 2M, 2C, and 2K are developed with a developer from the upstream side of image formation so as to surround 2K. Developing devices 4Y, 4M, 4C, and 4K that produce toner images of Y, M, C, and K colors, cleaning devices 5Y, 5M, 5C, and 5K, static eliminators 6Y, 6M, 6C, and 6K are disposed. .

各現像装置4Y、4M、4C、4Kの脇には、Yトナー、Mトナー、Cトナー、Kトナーをそれぞれ現像装置4Y、4M、4C、4Kへ補給するトナーボトルユニット7Y、7M、7C、7Kが配置されている。また、各作像系1Y、1M、1C、1Kは各々独立な光書き込み装置8Y、8M、8C、8Kが配置され、この光書き込み装置8Y、8M、8C、8Kはレーザ光源としてのレーザダイオード(LD)光源9Y、9M、9C、9Kや、コリメートレンズ10Y、10M、10C、10K、fθレンズ11Y、11M、11C、11K、といった光学部品、偏向走査手段としてのポリゴンミラー12Y、12M、12C、12K、折り返しミラー13Y、13M、13C、13K、14Y、14M、14C、14Kなどを有する。   Beside each developing device 4Y, 4M, 4C, 4K, toner bottle units 7Y, 7M, 7C, 7K for supplying Y toner, M toner, C toner, K toner to the developing devices 4Y, 4M, 4C, 4K, respectively. Is arranged. In addition, each of the image forming systems 1Y, 1M, 1C, and 1K is provided with independent optical writing devices 8Y, 8M, 8C, and 8K. The optical writing devices 8Y, 8M, 8C, and 8K are laser diodes (laser light sources). LD) Light source 9Y, 9M, 9C, 9K, collimating lens 10Y, 10M, 10C, 10K, fθ lens 11Y, 11M, 11C, 11K, and other optical components, polygon mirrors 12Y, 12M, 12C, 12K as deflection scanning means And folding mirrors 13Y, 13M, 13C, 13K, 14Y, 14M, 14C, 14K, and the like.

各作像系1Y、1M、1C、1Kは垂直に配列され、その右側には転写ベルトユニット15がOPCドラム2Y、2M、2C、2Kに接する形で配置される。転写ベルトユニット15は、転写ベルト16がローラ17〜20に張架されて図示しない駆動源により回転駆動される。装置下側には転写材としての転写紙が収納された給紙トレイ21が配置され、装置上部に定着装置22、排紙ローラ23及び排紙トレイ24が配設される。   The image forming systems 1Y, 1M, 1C, and 1K are arranged vertically, and the transfer belt unit 15 is arranged on the right side so as to be in contact with the OPC drums 2Y, 2M, 2C, and 2K. The transfer belt unit 15 is rotationally driven by a drive source (not shown) with the transfer belt 16 stretched around rollers 17 to 20. A paper feed tray 21 storing transfer paper as a transfer material is disposed on the lower side of the apparatus, and a fixing device 22, a paper discharge roller 23, and a paper discharge tray 24 are disposed at the top of the apparatus.

作像時には、各作像系1Y、1M、1C、1Kにおいて、それぞれ、OPCドラム2Y、2M、2C、2Kが図示しない駆動源により回転駆動され、帯電ローラ3Y、3M、3C、3KによりOPCドラム2Y、2M、2C、2Kが一様に帯電されて光書き込み装置8Y、8M、8C、8Kが各色の画像データに基づきOPCドラム2Y、2M、2C、2Kに光書込みを行うことによって、OPCドラム2Y、2M、2C、2K上に静電潜像が形成される。   At the time of image formation, in each of the image forming systems 1Y, 1M, 1C, and 1K, the OPC drums 2Y, 2M, 2C, and 2K are rotationally driven by a driving source (not shown), and the OPC drums are charged by the charging rollers 3Y, 3M, 3C, and 3K. The 2Y, 2M, 2C, and 2K are uniformly charged, and the optical writing devices 8Y, 8M, 8C, and 8K perform optical writing on the OPC drums 2Y, 2M, 2C, and 2K based on the image data of each color, whereby the OPC drum Electrostatic latent images are formed on 2Y, 2M, 2C, and 2K.

このOPCドラム2Y、2M、2C、2K上の静電潜像はそれぞれ現像装置4Y、4M、4C、4Kにより現像されてY、M、C、K各色のトナー像となり、一方、給紙トレイ21から給紙ローラ25により転写紙が水平方向に給紙されて搬送系により作像系1Y、1M、1C、1K方向へ垂直に搬送される。この転写紙は、転写ベルト16に静電的に吸着保持されて転写ベルト16により搬送され、図示しない転写バイアス印加手段により転写バイアスが印加されてOPCドラム2Y、2M、2C、2K上のY、M、C、K各色のトナー像が順次に重ねて転写されることでフルカラー画像が形成される。このフルカラー画像が形成された転写紙は、定着装置22によりフルカラー画像が定着されて排紙ローラ23により排紙トレイ24へ排出される。   The electrostatic latent images on the OPC drums 2Y, 2M, 2C, and 2K are developed by developing devices 4Y, 4M, 4C, and 4K, respectively, to become toner images of colors Y, M, C, and K, while the paper feed tray 21 Then, the transfer paper is fed in the horizontal direction from the paper feed roller 25 and is conveyed vertically in the image forming systems 1Y, 1M, 1C and 1K by the transport system. This transfer paper is electrostatically held by the transfer belt 16 and conveyed by the transfer belt 16, and a transfer bias is applied by a transfer bias applying means (not shown), and Y on the OPC drums 2Y, 2M, 2C, 2K, A full color image is formed by sequentially superimposing and transferring toner images of M, C, and K colors. The transfer sheet on which the full-color image is formed is fixed to the full-color image by the fixing device 22 and is discharged to the discharge tray 24 by the discharge roller 23.

上述した、カラープリンタ100における各部の制御は、電装・制御装置26により行われる。   The control of each part in the color printer 100 described above is performed by the electrical / control device 26.

図2は 図1の電装・制御装置26の一例の構成を示すブロック図である。図2の例では、電装・制御装置26は、CPU(Central Processing Unit)200、プリンタ用ASIC(Application Specific Integrated Circuit)230およびメインメモリ210を備える。プリンタ用ASIC230は、CPU I/F201、メインメモリアービタ(ARB)202、メインメモリコントローラ203、符号化部204、復号部205、階調処理部206およびエンジンコントローラ207を含む。   FIG. 2 is a block diagram showing a configuration of an example of the electrical / control apparatus 26 of FIG. In the example of FIG. 2, the electrical / control device 26 includes a CPU (Central Processing Unit) 200, a printer ASIC (Application Specific Integrated Circuit) 230, and a main memory 210. The printer ASIC 230 includes a CPU I / F 201, a main memory arbiter (ARB) 202, a main memory controller 203, an encoding unit 204, a decoding unit 205, a gradation processing unit 206, and an engine controller 207.

CPU200は、メインメモリ210に格納されるプログラムに従い、このカラープリンタ100の全体の動作を制御する。CPU200は、CPU I/F201を介してメインメモリアービタ202に接続される。メインメモリアービタ202は、CPU200、符号化部204、復号部205および通信コントローラ208の、メインメモリ210に対するアクセスを調停する。   The CPU 200 controls the overall operation of the color printer 100 according to a program stored in the main memory 210. The CPU 200 is connected to the main memory arbiter 202 via the CPU I / F 201. The main memory arbiter 202 arbitrates access to the main memory 210 by the CPU 200, the encoding unit 204, the decoding unit 205, and the communication controller 208.

メインメモリ210は、メインメモリコントローラ203を介してメインメモリアービタ202に接続される。メインメモリコントローラ203は、メインメモリ210に対するアクセスの制御を行う。メインメモリ210は、上述した、CPU200が動作するためのプログラムや、CPU200から出力される描画コマンドが格納される。メインメモリ210は、さらに、バンドデータや、ページの圧縮データなどの各種データを格納する。   The main memory 210 is connected to the main memory arbiter 202 via the main memory controller 203. The main memory controller 203 controls access to the main memory 210. The main memory 210 stores the above-described program for operating the CPU 200 and drawing commands output from the CPU 200. The main memory 210 further stores various data such as band data and page compression data.

符号化部204は、メインメモリ210に格納されるバンドデータを符号化する。符号化されたバンドデータは、メインメモリアービタ202およびメインメモリコントローラ203を介してメインメモリ210に供給され、ページ符号格納領域に書き込まれる。復号部205は、後述するプリンタエンジン211に同期して、符号化部204で符号化されメインメモリ210に書き込まれた符号化バンドデータをメインメモリ210から読み出して復号する。復号されたバンドデータは、階調処理部206に供給される。階調処理部206は、復号部205から供給されたバンドデータに対して階調処理を施してエンジンコントローラ207に転送する。   The encoding unit 204 encodes band data stored in the main memory 210. The encoded band data is supplied to the main memory 210 via the main memory arbiter 202 and the main memory controller 203, and is written in the page code storage area. The decoding unit 205 reads out the encoded band data encoded by the encoding unit 204 and written in the main memory 210 from the main memory 210 in synchronization with a printer engine 211 described later. The decoded band data is supplied to the gradation processing unit 206. The gradation processing unit 206 performs gradation processing on the band data supplied from the decoding unit 205 and transfers the band data to the engine controller 207.

エンジンコントローラ207は、プリンタエンジン211を制御する。図2では、プリンタエンジン211としてC版のものだけが記載され、M版、Y版、K版については煩雑さを避けるために省略されている。   The engine controller 207 controls the printer engine 211. In FIG. 2, only the C version of the printer engine 211 is shown, and the M, Y, and K versions are omitted to avoid complication.

通信コントローラ208は、ネットワーク221を介しての通信を制御する。例えば、コンピュータ220から出力されたPDL(Page Description Language)データは、ネットワーク221を介して通信コントローラ208により受信される。通信コントローラ208は、受信したPDLデータを、メインメモリアービタ202およびメインメモリコントローラ203を介してメインメモリ210に転送する。   The communication controller 208 controls communication via the network 221. For example, PDL (Page Description Language) data output from the computer 220 is received by the communication controller 208 via the network 221. The communication controller 208 transfers the received PDL data to the main memory 210 via the main memory arbiter 202 and the main memory controller 203.

なお、ネットワーク221は、LAN(Local Area Network)などの所定の範囲内で通信を行うものでもよいし、インターネットなどより広範囲に通信可能なものでもよい。また、ネットワーク221は、有線通信に限らず無線通信を用いたものでもよいし、USB(Universal Serial Bus)やIEEE(Institute Electrical and Electronics Engineers)1394といったシリアル通信を行うものでもよい。   The network 221 may be one that performs communication within a predetermined range such as a LAN (Local Area Network), or may be one that can communicate over a wider range than the Internet. The network 221 is not limited to wired communication but may be wireless communication, or may be serial communication such as USB (Universal Serial Bus) or IEEE (Institute Electrical and Electronics Engineers) 1394.

図3は、メインメモリ210の一例のフォーマットを示す。プログラム格納領域300は、CPU200が動作するためのプログラムが格納される。PDLデータ格納領域301は、例えばコンピュータ220から供給されたPDLデータが格納される。CMYKバンドデータ格納領域302は、CMYKバンドデータが格納される。ページ符号格納領域303は、バンドデータが圧縮符号化された符号データが格納される。ページ符号格納領域303は、複数ページ分の符号データを格納可能とされている。領域304は、上述した以外のデータが格納される。   FIG. 3 shows an exemplary format of the main memory 210. The program storage area 300 stores a program for the CPU 200 to operate. The PDL data storage area 301 stores, for example, PDL data supplied from the computer 220. The CMYK band data storage area 302 stores CMYK band data. The page code storage area 303 stores code data obtained by compression-coding band data. The page code storage area 303 can store code data for a plurality of pages. The area 304 stores data other than those described above.

図4は、図3におけるCMYKバンドデータ格納領域302の一例のフォーマットを示す。このように、CMYKバンドデータ格納領域302は、C版、M版、Y版およびK版の各版毎のプレーン構成とされ、各画素に対してそれぞれ8ビットが割り当てられる。すなわち、CMYKバンドデータは、各画素がそれぞれ8ビットのビット深度を持つ多値プレーン画像となっている。   FIG. 4 shows an exemplary format of the CMYK band data storage area 302 in FIG. In this way, the CMYK band data storage area 302 has a plane configuration for each of the C, M, Y, and K plates, and 8 bits are assigned to each pixel. That is, the CMYK band data is a multi-value plane image in which each pixel has a bit depth of 8 bits.

図5は、上述した構成を有するカラープリンタ100における画像処理を概略的に示す一例のフローチャートである。この図5のフローチャートを用い、上述した図2を参照しながら、カラープリンタ100の動作について概略的に説明する。   FIG. 5 is a flowchart of an example schematically illustrating image processing in the color printer 100 having the above-described configuration. The operation of the color printer 100 will be schematically described with reference to FIG. 2 described above using the flowchart of FIG.

例えばコンピュータ220で生成されたPDLデータがネットワーク221を介して通信コントローラ208に受信され、メインメモリ210のPDLデータ格納領域301に記憶される(ステップS1)。CPU200は、メインメモリ210のPDLデータ格納領域301からPDLデータを読み出し、PDLを解析して(ステップS2)、解析結果に基づきCMYKのバンド画像を描画する(ステップS3)。描画されたCMYKのバンド画像によるCMYKバンドデータは、メインメモリ210のCMYKバンドデータ格納領域302に格納される(ステップS4)。このCMYKバンドデータは、上述したように、各画素が8ビットのビット深度を持つ多値プレーン画像データである。   For example, PDL data generated by the computer 220 is received by the communication controller 208 via the network 221 and stored in the PDL data storage area 301 of the main memory 210 (step S1). The CPU 200 reads PDL data from the PDL data storage area 301 of the main memory 210, analyzes the PDL (step S2), and draws a CMYK band image based on the analysis result (step S3). The drawn CMYK band data based on the drawn CMYK band image is stored in the CMYK band data storage area 302 of the main memory 210 (step S4). As described above, this CMYK band data is multi-value plane image data in which each pixel has a bit depth of 8 bits.

符号化部204は、CMYKバンドデータ格納領域302からCMYKバンドデータを読み出して、本発明の実施形態による予測符号化方法に従い符号化する(ステップS5)。CMYKバンドデータが符号化された符号データは、メインメモリ210のページ符号格納領域303に格納される(ステップS6)。   The encoding unit 204 reads CMYK band data from the CMYK band data storage area 302 and encodes it according to the predictive encoding method according to the embodiment of the present invention (step S5). Code data obtained by encoding the CMYK band data is stored in the page code storage area 303 of the main memory 210 (step S6).

復号部205は、ページ符号格納領域303からCMYKバンドデータが符号化された符号データを読み出して復号し、復号されたCMYKバンドデータを階調処理部206に供給する(ステップS7)。階調処理部206は、復号部205から供給されたCMYKバンドデータに対して階調処理を施す(ステップS8)。階調処理されたCMYKバンドデータは、プリンタエンジンコントローラ207を介してプリンタエンジン211に供給される(ステップS9)。プリンタエンジン211は、供給されたCMYKバンドデータに基づきプリントアウトを行う。   The decoding unit 205 reads and decodes code data obtained by encoding CMYK band data from the page code storage area 303, and supplies the decoded CMYK band data to the gradation processing unit 206 (step S7). The gradation processing unit 206 performs gradation processing on the CMYK band data supplied from the decoding unit 205 (step S8). The gradation-processed CMYK band data is supplied to the printer engine 211 via the printer engine controller 207 (step S9). The printer engine 211 performs printout based on the supplied CMYK band data.

<符号化処理の概略>
図6は、本発明の実施形態による符号化部204の一例の構成を示す。符号化部204において、メインメモリ210のCMYKバンドデータ格納領域302から、画像読み込み部400によりCMYK各版毎のCMYKバンドデータが読み出される。このとき、CMYK各版毎のCMYKバンドデータは、図7に例示されるように、画像読み込み部400によりスキャンライン毎に順次、画素単位でCMYKバンドデータ格納領域302から読み出される。
<Outline of encoding process>
FIG. 6 shows an exemplary configuration of the encoding unit 204 according to the embodiment of the present invention. In the encoding unit 204, CMYK band data for each version of CMYK is read by the image reading unit 400 from the CMYK band data storage area 302 of the main memory 210. At this time, as illustrated in FIG. 7, CMYK band data for each plate of CMYK is sequentially read from the CMYK band data storage area 302 pixel by pixel by the image reading unit 400.

画像読み込み部400により画素単位で読み出されたCMYKバンドデータは、ラインメモリ制御処理部401によりラインメモリ402に格納される。ラインメモリ402は、少なくとも2ライン分のCMYKバンドデータを格納可能とされており、今回供給されたデータを格納すると共に、直前に格納した1ライン分のデータを保持するように、ラインメモリ制御処理部401に制御される。   The CMYK band data read in pixel units by the image reading unit 400 is stored in the line memory 402 by the line memory control processing unit 401. The line memory 402 is capable of storing CMYK band data for at least two lines. The line memory control process stores the data supplied this time and holds the data for one line stored immediately before. Controlled by the unit 401.

例えば、ラインメモリ402は、それぞれ1ライン分の画素を格納可能な第1および第2の領域を有し、1ライン分の画素データの符号化が終了すると、この符号化が終了した領域の画素データを保持し、他方の領域に次のラインの画素データを書き込むように制御される。   For example, the line memory 402 has first and second areas each capable of storing pixels for one line, and when encoding of pixel data for one line is completed, pixels in the area where the encoding is completed Control is performed to hold the data and write the pixel data of the next line in the other region.

ラインメモリ制御処理部401の制御により、ラインメモリ402から、符号化対象の画素(以下、注目画素と呼ぶ)の画素データと、注目画素の周辺3画素の画素データが読み出され、簡易予測処理部410に渡される。ここでラインメモリ402から読み出される周辺3画素は、注目画素に近接する、既に符号化が終了した画素である。より具体的には、図8に例示されるように、注目画素のスキャン順で直前の画素aと、当該注目画素が属する現ラインに対してスキャン順で直前の前ライン、すなわち当該注目画素が属するラインの直上のラインにおいて当該注目画素の直上に位置する画素bおよび画素bのスキャン順で直前の画素cである。   Under the control of the line memory control processing unit 401, pixel data of a pixel to be encoded (hereinafter referred to as a target pixel) and pixel data of three pixels around the target pixel are read from the line memory 402, and simple prediction processing is performed. To the unit 410. Here, the peripheral three pixels read from the line memory 402 are pixels that have already been encoded and are close to the target pixel. More specifically, as illustrated in FIG. 8, the immediately preceding pixel a in the scan order of the target pixel and the previous line in the scan order with respect to the current line to which the target pixel belongs, that is, the target pixel The pixel b located immediately above the target pixel in the line immediately above the line to which it belongs and the pixel c immediately before in the scanning order of the pixel b.

なお、以下では、符号化対象である注目画素が属するラインを符号化ライン、符号化ラインに対してスキャン順で直前のラインを参照ラインと呼ぶ。   In the following, the line to which the target pixel to be encoded belongs is referred to as an encoding line, and the immediately preceding line in the scan order with respect to the encoding line is referred to as a reference line.

簡易予測処理部410は、ラインメモリ制御処理部401から渡された画素a、画素bおよび画素cの画素値と、注目画素の画素値とを用いて、注目画素の画素値に対する予測値を簡易的に求める(以下、簡易的な予測処理と呼ぶ)。この簡易的な予測処理では、簡易予測処理部410において、画素a、bおよびcと、注目画素との4画素について、縦方向または横方向に隣接する2画素の画素値が、当該縦方向または横方向それぞれの並び、すなわち、縦方向の各列または横方向の各行でそれぞれ一致するか否かが判定される。   The simple prediction processing unit 410 uses the pixel values of the pixel a, pixel b, and pixel c passed from the line memory control processing unit 401 and the pixel value of the target pixel to simplify the prediction value for the pixel value of the target pixel. (Hereinafter referred to as simple prediction processing). In this simple prediction processing, in the simple prediction processing unit 410, pixel values of two pixels adjacent to each other in the vertical direction or the horizontal direction for the four pixels a, b, and c and the pixel of interest are the vertical direction or It is determined whether or not there is a match in each row in the horizontal direction, that is, in each column in the vertical direction or each row in the horizontal direction.

若し、一致しないと判定されたら、予測処理部403により、画素a、bおよびcの画素値に基づき注目画素の画素値を予測する。本実施形態では、予測処理部403において、後述するLOCO−I方式またはPaeth方式を用いて注目画素の画素値を予測する。これらLOCO−I方式またはPaeth方式は、画素a、bおよびcと、注目画素との4画素からなる平面の、画素aおよび画素bを軸とした傾きを求める平面予測方式と比較して、より高い精度で予測値を求めることが可能である。   If it is determined that they do not match, the prediction processing unit 403 predicts the pixel value of the target pixel based on the pixel values of the pixels a, b, and c. In the present embodiment, the prediction processing unit 403 predicts the pixel value of the target pixel using the LOCO-I method or the Paeth method, which will be described later. These LOCO-I method or Paeth method are more compared to the planar prediction method for obtaining the inclination of the plane consisting of the pixels a, b, and c and the pixel of interest about the pixel a and the pixel b as axes. It is possible to obtain a predicted value with high accuracy.

予測処理部403で求められた予測値は、注目画素の画素値と共に予測誤差処理部404に供給される。予測誤差処理部404は、注目画素の画素値と、予測処理部403で求められた予測値との差分を予測誤差値として算出する。この予測誤差値は、ランレングス生成処理部405に供給される。   The prediction value obtained by the prediction processing unit 403 is supplied to the prediction error processing unit 404 together with the pixel value of the target pixel. The prediction error processing unit 404 calculates a difference between the pixel value of the target pixel and the prediction value obtained by the prediction processing unit 403 as a prediction error value. This prediction error value is supplied to the run length generation processing unit 405.

一方、簡易予測処理部410において、画素a、bおよびcと、注目画素との4画素について、縦方向または横方向に隣接する2画素の画素値が各列または各行でそれぞれで一致すると判定されたら、予測誤差値を「0」としてランレングス生成処理部405に供給する。この場合、上述した予測処理部403および予測誤差処理部404による処理は行われない。   On the other hand, the simple prediction processing unit 410 determines that the pixel values of two pixels adjacent in the vertical direction or the horizontal direction are the same in each column or each row for the four pixels a, b, and c and the target pixel. Then, the prediction error value is set to “0” and supplied to the run length generation processing unit 405. In this case, the processing by the prediction processing unit 403 and the prediction error processing unit 404 described above is not performed.

なお、注目画素がラインのスキャン順で先頭画素である場合、ならびに、符号化ラインがスキャン順で先頭のラインである場合は、予測値が「0」であるものとして、予測処理部403および予測誤差処理部404の処理を行う。   When the target pixel is the first pixel in the line scan order and when the encoded line is the first line in the scan order, the prediction processing unit 403 and the prediction are assumed to have a predicted value of “0”. The error processing unit 404 is processed.

ランレングス生成処理部405は、簡易予測処理部410または予測誤差処理部404から供給された予測誤差値が「0」である場合に、ランレングス値を「1」だけ増加させる。簡易予測処理部410からランレングス生成処理部405に対して直接的に予測誤差値が供給される場合は、当該予測誤差値が必ず「0」であるので、ランレングス値が「1」、増加される。一方、予測誤差値が「0」ではない場合は、ランレングス生成処理部405は、予測誤差値とランレングス値と注目画素の画素値とを符号フォーマット生成処理部406に渡し、その後、ランレングス値をリセットする。   The run length generation processing unit 405 increases the run length value by “1” when the prediction error value supplied from the simple prediction processing unit 410 or the prediction error processing unit 404 is “0”. When the prediction error value is directly supplied from the simple prediction processing unit 410 to the run length generation processing unit 405, the prediction error value is always “0”, so the run length value is “1” and increased. Is done. On the other hand, when the prediction error value is not “0”, the run length generation processing unit 405 passes the prediction error value, the run length value, and the pixel value of the target pixel to the code format generation processing unit 406, and then the run length. Reset the value.

符号フォーマット生成処理部406は、ランレングス生成処理部405から渡されたランレングス値と、予測誤差値とをそれぞれ後述する符号フォーマットに従い符号化する。また、詳細を後述するように、予測誤差値が差分符号で表現可能な範囲外であれば、注目画素の画素値そのものを符号として用いる。符号フォーマット生成処理部406で生成された符号は、符号書き込み部407に渡され、メインメモリ210のページ符号格納領域303に書き込まれる。   The code format generation processing unit 406 encodes the run length value and the prediction error value passed from the run length generation processing unit 405 according to a code format described later. As will be described in detail later, if the prediction error value is outside the range that can be expressed by the difference code, the pixel value itself of the target pixel is used as the code. The code generated by the code format generation processing unit 406 is transferred to the code writing unit 407 and written in the page code storage area 303 of the main memory 210.

<予測処理の例>
ここで、予測処理部403で用いられる予測方式について説明する。上述したように、本実施形態では、符号化済みの画素a、bおよびcの画素値から注目画素の画素値を予測する予測処理に、高精度の予測が可能なLOCO−I(LOw COmplexity LOssless COmpression for Images)方式またはPaeth方式を用いる。
<Example of prediction processing>
Here, the prediction method used in the prediction processing unit 403 will be described. As described above, in the present embodiment, LOCO-I (LOw COmplexity LOssless) capable of high-precision prediction is used for prediction processing for predicting the pixel value of the target pixel from the pixel values of the encoded pixels a, b, and c. COmpression for Images) method or Paeth method.

以下では、図8を用いて説明したように、符号化を画素単位では画像の左から右へ向けて行い、ライン単位では画像の上から下に向けて行う場合において、注目画素の左に隣接する画素を画素a、注目画素の上に隣接する画素を画素b、注目画素の左上に接する画素を画素cとして説明する。   In the following, as described with reference to FIG. 8, when encoding is performed from the left to the right of the image in pixel units and from the top to the bottom of the image in line units, it is adjacent to the left of the target pixel. In the following description, the pixel to be processed is pixel a, the pixel adjacent to the target pixel is pixel b, and the pixel in contact with the upper left of the target pixel is pixel c.

先ず、LOCO−I方式について説明する。LOCO−I方式は、画素cの画素値と画素aおよび画素bの画素値とを比較した結果に応じて、予測値の算出方法を切り替える。図9は、LOCO−I方式による予測処理の例を示すフローチャートである。最初のステップS30で、画素cの画素値が画素aの画素値以上であって、且つ、画素cの画素値が画素bの画素値以上であるか否かが判定される。若し、画素cの画素値がこの条件を満たしていると判定されたら、処理はステップS31に移行され、画素aの画素値と画素bの画素値とが比較され、値が小さい方の画素値が予測値とされる。   First, the LOCO-I system will be described. In the LOCO-I method, the calculation method of the predicted value is switched according to the result of comparing the pixel value of the pixel c with the pixel values of the pixel a and the pixel b. FIG. 9 is a flowchart illustrating an example of prediction processing by the LOCO-I method. In the first step S30, it is determined whether or not the pixel value of the pixel c is greater than or equal to the pixel value of the pixel a and the pixel value of the pixel c is greater than or equal to the pixel value of the pixel b. If it is determined that the pixel value of the pixel c satisfies this condition, the process proceeds to step S31, the pixel value of the pixel a and the pixel value of the pixel b are compared, and the pixel having the smaller value is compared. The value is taken as the predicted value.

一方、ステップS30で、画素cの画素値が上述の条件を満たしていない、すなわち、画素cの画素値が画素aの画素値未満であるか、または、画素cの画素値が画素bの画素値未満であると判定されたら、処理はステップS32に移行される。ステップS32では、画素cの画素値が画素aの画素値以下であって、且つ、画素cの画素値が画素bの画素値以下であるか否かが判定される。若し、画素cの画素値がこの条件を満たしていると判定されたら、処理はステップS33に移行され、画素aの画素値と画素bの画素値とが比較され、値が大きい方の画素値が予測値とされる。   On the other hand, in step S30, the pixel value of the pixel c does not satisfy the above condition, that is, the pixel value of the pixel c is less than the pixel value of the pixel a, or the pixel value of the pixel c is the pixel b. If it is determined that the value is less than the value, the process proceeds to step S32. In step S32, it is determined whether or not the pixel value of the pixel c is equal to or smaller than the pixel value of the pixel a and the pixel value of the pixel c is equal to or smaller than the pixel value of the pixel b. If it is determined that the pixel value of the pixel c satisfies this condition, the process proceeds to step S33, the pixel value of the pixel a and the pixel value of the pixel b are compared, and the pixel having the larger value is compared. The value is taken as the predicted value.

一方、ステップS32で、画素cの画素値が上述の条件を満たしていない、すなわち、画素cの画素値が画素aの画素値以上であるか、または、画素cの画素値が画素bの画素値以上であると判定されたら、処理はステップS34に移行される。これは、換言すれば、画素aおよび画素bのうち何れか一方の画素値が画素cの画素値以上であり、他方の画素値が画素cの画素値未満であることを意味する。ステップS34では、画素a、bおよびcの画素値について次式(1)の演算を行い、得られた値pを予測値とする。
p=a+b−c …(1)
On the other hand, in step S32, the pixel value of the pixel c does not satisfy the above condition, that is, the pixel value of the pixel c is greater than or equal to the pixel value of the pixel a, or the pixel value of the pixel c is the pixel of the pixel b. If it is determined that the value is greater than or equal to the value, the process proceeds to step S34. In other words, this means that one of the pixel a and the pixel b has a pixel value greater than or equal to the pixel value of the pixel c, and the other pixel value is less than the pixel value of the pixel c. In step S34, the following equation (1) is calculated for the pixel values of the pixels a, b, and c, and the obtained value p is set as a predicted value.
p = a + b−c (1)

次に、Paeth方式について説明する。図10は、Paeth方式による予測処理の例を示すフローチャートである。Paeth方式は、各画素a、bおよびcの単純な線形関数を計算し、各画素a、bおよびcのうち計算された値に最も近い値を予測値として選択する。より具体的には、上述の式(1)で値pを求め、求めた値pと、各画素a、bおよびcそれぞれの画素値との差分絶対値pa、pbおよびpcを算出する。算出されたこれら差分絶対値pa、pbおよびpcの大小関係に基づき、各画素a、bおよびcから予測値を選択する。   Next, the Paeth method will be described. FIG. 10 is a flowchart illustrating an example of prediction processing by the Paeth method. In the Paeth method, a simple linear function of each pixel a, b, and c is calculated, and a value closest to the calculated value among the pixels a, b, and c is selected as a predicted value. More specifically, the value p is obtained by the above-described equation (1), and absolute differences pa, pb, and pc between the obtained value p and the pixel values of the pixels a, b, and c are calculated. A predicted value is selected from each of the pixels a, b, and c based on the calculated magnitude relationship between the difference absolute values pa, pb, and pc.

最初のステップS40で、上述の式(1)により、画素a、bおよびcの画素値から値pが計算される。そして、次のステップS41、ステップS42およびステップS43で、値pと各画素a、bおよびcそれぞれの画素値との差分絶対値pa、pbおよびpcが求められる。   In the first step S40, the value p is calculated from the pixel values of the pixels a, b and c according to the above equation (1). Then, in the next step S41, step S42 and step S43, absolute difference values pa, pb and pc between the value p and the pixel values of the respective pixels a, b and c are obtained.

なお、図10において、演算子absは、括弧内の値の絶対値を求めることを示す。また、以下では、煩雑さを避けるために、差分絶対値pa、pbおよびpcをそれぞれ値pa、pbおよびpcと呼ぶ。   In FIG. 10, the operator abs indicates that the absolute value of the value in parentheses is obtained. In the following, in order to avoid complexity, the absolute difference values pa, pb, and pc are referred to as values pa, pb, and pc, respectively.

ステップS43までの処理により値pa、pbおよびpcが求められると、処理はステップS44に移行される。ステップS44では、値paと値pbおよび値pcとが比較され、値paが値pb以下であって、且つ、値paが値pc以下であるか否かが判定される。若し、値paがこの条件を満たしていると判定されたら、処理はステップS45に移行され、画素aの画素値が予測値とされる。   When the values pa, pb, and pc are obtained by the process up to step S43, the process proceeds to step S44. In step S44, the value pa is compared with the value pb and the value pc, and it is determined whether or not the value pa is not more than the value pb and the value pa is not more than the value pc. If it is determined that the value pa satisfies this condition, the process proceeds to step S45, and the pixel value of the pixel a is set as a predicted value.

一方、ステップS44で、値paが値pb以下であって、且つ、値paが値pc以下ではない、すなわち、値paが値pbを超えるか、または、値paが値pcを超えると判定されたら、処理はステップS46に移行される。ステップS46では、値pbと値paおよび値pcとが比較され、値pbが値pa以下であって、且つ、値pbが値pc以下であるか否かが判定される。若し、値pbがこの条件を満たしていると判定されたら、処理はステップS47に移行され、画素bの画素値が予測値とされる。   On the other hand, in step S44, it is determined that the value pa is not more than the value pb and the value pa is not less than the value pc, that is, the value pa exceeds the value pb or the value pa exceeds the value pc. Then, the process proceeds to step S46. In step S46, the value pb is compared with the value pa and the value pc, and it is determined whether or not the value pb is equal to or less than the value pa and the value pb is equal to or less than the value pc. If it is determined that the value pb satisfies this condition, the process proceeds to step S47, and the pixel value of the pixel b is set as the predicted value.

一方、ステップS46で値pbが値pa以下であって、且つ、値pbが値pc以下ではない、すなわち、値pbが値paを超えるか、または、値pbが値pcを超えると判定されたら、処理はステップS48に移行され、画素cの画素値が予測値とされる。   On the other hand, if it is determined in step S46 that the value pb is less than or equal to the value pa and the value pb is not less than or equal to the value pc, that is, the value pb exceeds the value pa or the value pb exceeds the value pc. The process proceeds to step S48, and the pixel value of the pixel c is set as a predicted value.

<符号フォーマット>
次に、図11−1および図11−2を用いて、符号フォーマット生成処理部406で生成される符号の一例のフォーマットについて説明する。本実施形態においては、予測誤差値とランレングス値とをそれぞれ符号化する。そして、図12に例示されるように、符号化されたランレングス値(符号化ランレングス値と呼ぶ)の後ろに符号化された予測誤差値(符号化予測誤差値と呼ぶ)を接続し、符号化ランレングス値および符号化予測誤差値の組を単位として符号列を生成する。
<Code format>
Next, an exemplary format of a code generated by the code format generation processing unit 406 will be described with reference to FIGS. 11A and 11B. In the present embodiment, the prediction error value and the run length value are each encoded. Then, as illustrated in FIG. 12, the encoded prediction error value (referred to as the encoded prediction error value) is connected after the encoded run length value (referred to as the encoded run length value), A code string is generated with a set of a coded run length value and a coded prediction error value as a unit.

図11−1は、符号化予測誤差値の一例の符号フォーマットを示す。本実施形態では、予測誤差値は、値が大きいほど頻度が低くなるものとしてハフマン符号化される。このとき、予測誤差値を、段階的に設定された範囲に対してグループ分けし、グループ毎に異なる符号長が割り当てられるように符号化を行う。グループの識別は、生成されたハフマン符号の先頭から、グループ数に応じたビット数分の符号を用いて行う。本実施形態では、予測誤差値を8のグループに分類し、3ビットをグループの識別用に用いている。   FIG. 11A illustrates a code format as an example of the encoded prediction error value. In the present embodiment, the prediction error value is Huffman encoded assuming that the larger the value, the lower the frequency. At this time, the prediction error values are grouped into ranges set in stages, and encoding is performed so that a different code length is assigned to each group. Group identification is performed using codes for the number of bits corresponding to the number of groups from the top of the generated Huffman code. In this embodiment, the prediction error values are classified into 8 groups, and 3 bits are used for group identification.

以下では、グループの識別に用いるビットをグループ識別ビットと呼び、このグループ識別ビットに付加されるビットを付加ビットと呼ぶ。グループ識別ビットと付加ビットとで、予測誤差値毎にユニークなハフマン符号が構成される。   Hereinafter, a bit used for group identification is referred to as a group identification bit, and a bit added to the group identification bit is referred to as an additional bit. The group identification bits and the additional bits constitute a unique Huffman code for each prediction error value.

本実施形態では、予測誤差値Peに対して例えば次のように範囲を設定し、予測誤差値Peをグループ#0〜グループ#7の8グループに分類する。
グループ#0:Pe=1,Pe=−1
グループ#1:Pe=−3,Pe=−2,Pe=2,Pe=3
グループ#2:−7≦Pe≦−4,4≦Pe≦7
グループ#3:−15≦Pe≦−8,8≦Pe≦15
グループ#4:−31≦Pe≦−16,16≦Pe≦31
グループ#5:−63≦Pe≦−32,32≦Pe≦63
グループ#6:−127≦Pe≦−64,64≦Pe≦127
グループ#7:Pe≦−128,128≦Pe
In the present embodiment, a range is set for the prediction error value Pe as follows, for example, and the prediction error value Pe is classified into eight groups of group # 0 to group # 7.
Group # 0: Pe = 1, Pe = -1
Group # 1: Pe = -3, Pe = -2, Pe = 2, Pe = 3
Group # 2: −7 ≦ Pe ≦ −4, 4 ≦ Pe ≦ 7
Group # 3: −15 ≦ Pe ≦ −8, 8 ≦ Pe ≦ 15
Group # 4: −31 ≦ Pe ≦ −16, 16 ≦ Pe ≦ 31
Group # 5: −63 ≦ Pe ≦ −32, 32 ≦ Pe ≦ 63
Group # 6: −127 ≦ Pe ≦ −64, 64 ≦ Pe ≦ 127
Group # 7: Pe ≦ −128, 128 ≦ Pe

また、各グループのグループ識別ビットと、付加ビットのビット長とを、例えば次のように設定する。
グループ#0:グループ識別ビット=「000」,付加ビット長=1ビット
グループ#1:グループ識別ビット=「001」,付加ビット長=2ビット
グループ#2:グループ識別ビット=「010」,付加ビット長=3ビット
グループ#3:グループ識別ビット=「011」,付加ビット長=4ビット
グループ#4:グループ識別ビット=「100」,付加ビット長=5ビット
グループ#5:グループ識別ビット=「101」,付加ビット長=6ビット
グループ#6:グループ識別ビット=「110」,付加ビット長=7ビット
グループ#7:グループ識別ビット=「111」,付加ビット長=8ビット
Further, the group identification bits and the bit lengths of the additional bits of each group are set as follows, for example.
Group # 0: Group identification bit = “000”, additional bit length = 1 bit Group # 1: Group identification bit = “001”, additional bit length = 2 bits Group # 2: Group identification bit = “010”, additional bits Length = 3 bit group # 3: Group identification bit = “011”, additional bit length = 4 bit group # 4: group identification bit = “100”, additional bit length = 5 bit group # 5: group identification bit = “101” ”, Additional bit length = 6 bits group # 6: group identification bit =“ 110 ”, additional bit length = 7 bits group # 7: group identification bit =“ 111 ”, additional bit length = 8 bits

ここで、グループ#7の、注目画素の予測誤差値が−127より小さいか、若しくは、127より大きい場合は、ハフマン符号を用いずに、当該注目画素の画素値をそのまま付加ビットとして用いる。これは、予測誤差値が−255より小さいか、若しくは、255よりも大きくなった場合に、符号長が8ビットよりも大きくなり圧縮率が低下してしまうことを防止するためである。   Here, when the prediction error value of the target pixel in group # 7 is smaller than −127 or larger than 127, the pixel value of the target pixel is used as it is as an additional bit without using the Huffman code. This is to prevent the code length from becoming larger than 8 bits and reducing the compression rate when the prediction error value is smaller than −255 or larger than 255.

図11−2は、符号化ランレングス値の一例の符号フォーマットを示す。本実施形態では、ランレングス値は、値が小さいほど短い符号長が割り当てられるようにハフマン符号化され、ランレングス値が「0」で1ビットの符号長が割り当てられ、符号「0」に符号化される。   FIG. 11-2 illustrates a code format of an example of the encoded run length value. In the present embodiment, the run length value is Huffman coded so that the shorter the value, the shorter the code length is assigned, the run length value is “0”, the code length of 1 bit is assigned, and the code “0” is encoded. It becomes.

以下、図11−2に例示されるように、ランレングス値が「1」の場合には、2ビットの符号長が割り当てられ、符号「10」に符号化される。また、ランレングス値が「2」〜「4」の場合は、4ビットの符号長が割り当てられ、それぞれ符号「1100」、「1101」および「1110」に符号化される。   Hereinafter, as illustrated in FIG. 11B, when the run length value is “1”, a 2-bit code length is assigned and encoded to a code “10”. When the run length values are “2” to “4”, a 4-bit code length is assigned and encoded into codes “1100”, “1101”, and “1110”, respectively.

ランレングス値が「5」以上の場合、4ビットの符号長を持つ符号「1111」の後ろに所定符号長の数値部を接続した形式に符号化される。数値部は、図11−2の下段に示されるように、例えば先頭に1ビットのヘッダを含む4ビットの符号長を有する、1または複数のフレームからなる。ランレングス値を示す符号が3ビット毎に区切られ、各フレームのヘッダを除く3ビットに対し、上述の符号「1111」側がMSBとなるように詰め込まれる。図11−2の例では、フレームは、最大数が7個に制限され、ランレングス値が「1048576」まで表現可能とされている。ランレングス値が「5」の場合は、フレームを省略することができる。   When the run length value is “5” or more, it is encoded into a format in which a numerical value part having a predetermined code length is connected after a code “1111” having a code length of 4 bits. As shown in the lower part of FIG. 11-2, the numerical value part is composed of one or a plurality of frames having a code length of 4 bits including a 1-bit header at the head, for example. The code indicating the run length value is divided every 3 bits, and the 3 bits excluding the header of each frame are packed so that the above-mentioned code “1111” side is the MSB. In the example of FIG. 11B, the maximum number of frames is limited to 7, and the run length value can be expressed up to “1048576”. When the run length value is “5”, the frame can be omitted.

なお、ヘッダは、あるフレームに次のフレームが続くか否かを示す。例えば、ヘッダの値が「0」で次のフレームがあることを示し、ヘッダの値が「1」でそのフレームで終了することを示す。   The header indicates whether or not the next frame follows a certain frame. For example, a header value “0” indicates that there is a next frame, and a header value “1” indicates that the frame ends.

<予測符号化処理の詳細>
次に、符号化部204で行われる、本実施形態による予測符号化処理の例について、図13のフローチャートを用いてより詳細に説明する。なお、この図13のフローチャートの処理に先んじて、ランレングス値が予め0にリセットされているものとする。
<Details of predictive encoding processing>
Next, an example of predictive encoding processing performed by the encoding unit 204 according to the present embodiment will be described in more detail with reference to the flowchart of FIG. It is assumed that the run length value has been previously reset to 0 prior to the processing of the flowchart of FIG.

ステップS10で、画像読み込み部400は、メインメモリ210のCMYKバンドデータ格納領域302から処理対象の1画素(注目画素GDATA)を読み出す。読み出された注目画素GDATAは、ラインメモリ制御処理部401の制御により、ラインメモリ402の、符号化ラインの画素データが格納される領域に書き込まれる(ステップS11)。 In step S <b> 10, the image reading unit 400 reads one pixel (target pixel G DATA ) to be processed from the CMYK band data storage area 302 of the main memory 210. The read target pixel G DATA is written into an area of the line memory 402 where the pixel data of the encoded line is stored under the control of the line memory control processing unit 401 (step S11).

次のステップS23で、簡易予測処理部410は、ラインメモリ制御処理部401の制御によりラインメモリ402から注目画素GDATAの周辺3画素a、bおよびc(図8参照)の画素データを読み出し、これら画素a、bおよびcの画素値と、注目画素GDATAの画素値とを用いて、上述した簡易的な予測処理を行う。 In the next step S23, the simple prediction processing unit 410 reads the pixel data of the three neighboring pixels a, b and c (see FIG. 8) of the pixel of interest G DATA from the line memory 402 under the control of the line memory control processing unit 401. by using the pixel values of the pixels a, b and c, and the pixel value of the target pixel G DATA, performing simple prediction process described above.

ステップS23における判定は、次のようになされる。縦方向に並ぶ画素について、画素aと画素cとで画素値が等しく、且つ、画素bと注目画素GDATAとで画素値が等しいことを第1の条件とする。また、横方向に並ぶ画素について、画素bと画素cとで画素値が等しく、且つ、画素aと注目画素GDATAとで画素値が等しいことを第2の条件とする。簡易予測処理部410は、これら第1の条件および第2の条件のうち少なくとも一方が満足されるか否かを判定する。 The determination in step S23 is made as follows. Regarding the pixels arranged in the vertical direction, the first condition is that the pixel value is the same between the pixel a and the pixel c, and the pixel value is the same between the pixel b and the target pixel GDATA . Furthermore, for the pixels arranged in the horizontal direction, the pixel value at the pixel b and pixel c is equal and, a second condition that the pixel value is equal between the pixel of interest G DATA pixel a. The simple prediction processing unit 410 determines whether or not at least one of the first condition and the second condition is satisfied.

ステップS23による簡易的な予測により、画素a、bおよびcと、注目画素GDATAとの4画素について、縦方向または横方向に隣接する2画素の画素値が各列または各行でそれぞれ一致すると判定された場合、注目画素GDATAの画素値に対する予測誤差が「0」となる。すなわち、この場合は、簡易的な予測処理により注目画素GDATAの画素値を予測できたということができる。この場合、処理がステップS24に移行され、ランレングス値が「1」だけ増加される。そして、処理はステップS10に戻され、スキャン順で次の画素を新たな注目画素GDATAとして、処理が繰り返される。 By simple prediction in step S23, it is determined that the pixel values of two pixels adjacent in the vertical direction or the horizontal direction are the same in each column or each row for the four pixels a, b, and c and the target pixel G DATA. In this case, the prediction error for the pixel value of the target pixel G DATA is “0”. That is, in this case, it can be said that the pixel value of the target pixel G DATA was predicted by a simple prediction process. In this case, the process proceeds to step S24, and the run length value is increased by “1”. Then, the process returns to step S10, the next pixel as a new target pixel G DATA in scan order, the process is repeated.

一方、ステップS23で、縦方向に隣接する2画素の画素値が各列の少なくとも一方で一致せず、且つ、横方向に隣接する2画素の画素値が各行の少なくとも一方で一致しないと判定された場合は、処理がステップS12に移行され、画素a、bおよびcの画素値に基づき予測処理が行われる。この場合は、簡易的な予測処理では注目画素GDATAの画素値を予測できなかったことになる。 On the other hand, in step S23, it is determined that the pixel values of two pixels adjacent in the vertical direction do not match at least one of the columns, and the pixel values of two pixels adjacent in the horizontal direction do not match at least one of the rows. If the result is YES, the process proceeds to step S12, and a prediction process is performed based on the pixel values of the pixels a, b, and c. In this case, the pixel value of the target pixel G DATA cannot be predicted by a simple prediction process.

図14は、ステップS23で行われる、本実施形態による簡易的な予測処理における一例の判定処理を示すフローチャートである。この例では、先ずステップS50およびステップS51で縦方向の一致(第1の条件)を判定し、次にステップS52およびステップS53で横方向の一致(第2の条件)を判定している。   FIG. 14 is a flowchart illustrating an exemplary determination process in the simple prediction process according to the present embodiment, which is performed in step S23. In this example, first, in step S50 and step S51, a match in the vertical direction (first condition) is determined, and then in step S52 and step S53, a match in the horizontal direction (second condition) is determined.

すなわち、ステップS50で画素aと画素cとで画素値が等しいか否かが判定される。ステップS50で等しいと判定されたら、処理はステップS51に移行され、画素bと注目画素GDATAとで画素値が等しいか否かが判定される。ステップS51で等しいと判定されたら、簡易的な予測で注目画素GDATAの画素値が予測できたとされ、処理がステップS24に移行される。 That is, it is determined in step S50 whether the pixel values of the pixel a and the pixel c are equal. If it is determined that the pixel values are equal in step S50, the process proceeds to step S51, and it is determined whether the pixel values of the pixel b and the target pixel G DATA are equal. If it is determined in step S51 that they are equal, it is assumed that the pixel value of the target pixel GDATA has been predicted by simple prediction, and the process proceeds to step S24.

一方、上述のステップS50で画素aと画素cとで画素値が異なると判定された場合、あるいは、ステップS51で画素bと注目画素GDATAとで画素値が異なると判定された場合、処理はステップS52に移行される。ステップS52では、画素bと画素cとで画素値が等しいか否かが判定される。ステップS52で等しいと判定されたら、処理はステップS53に移行され、画素aと注目画素GDATAとで画素値が等しいか否かが判定される。ステップS53で等しいと判定されたら、簡易的な予測で注目画素GDATAの画素値が予測できたとされ、処理がステップS24に移行される。 On the other hand, if it is determined in step S50 that the pixel value is different between the pixel a and the pixel c, or if it is determined in step S51 that the pixel value is different between the pixel b and the target pixel GDATA , the process is as follows. The process proceeds to step S52. In step S52, it is determined whether or not the pixel values of the pixel b and the pixel c are equal. If it is determined in step S52 that they are equal, the process proceeds to step S53, and it is determined whether or not the pixel values of the pixel a and the target pixel GDATA are equal. If it is determined in step S53 that they are equal, it is determined that the pixel value of the target pixel GDATA has been predicted by simple prediction, and the process proceeds to step S24.

一方、上述のステップS52で画素bと画素cとで画素値が異なると判定された場合、あるいは、ステップS53で画素aと注目画素GDATAとで画素値が異なると判定された場合、簡易的な予測では注目画素GDATAの画素値を予測できなかったとされ、処理はステップS12に移行される。 On the other hand, when the pixel value at the pixel b and pixel c at step S52 described above it is determined to be different, or, if the pixel value is determined to differ between the pixel a and the pixel of interest G DATA in step S53, simple In such prediction, it is assumed that the pixel value of the target pixel G DATA cannot be predicted, and the process proceeds to step S12.

なお、ここでは第1の条件すなわち縦方向に並ぶ画素について先に処理を行ったが、これはこの例に限らず、第2の条件すなわち横方向に並ぶ画素についての処理を先に行ってもよい。   Here, the first condition, i.e., processing for pixels arranged in the vertical direction is performed first, but this is not limited to this example, and the second condition, i.e., processing for pixels arranged in the horizontal direction may be performed first. Good.

ステップS12では、予測処理部403により、画素a、bおよびcの画素値を用いて注目画素GDATAの画素値を予測する。本実施形態では、上述したように、高精度な予測が可能なLOCO−I方式またはPaeth方式を用いて予測処理を行う。そして、次のステップS13で、予測誤差処理部404により、注目画素GDATAの画素値から、ステップS12で予測された予測値を減じて、注目画素GDATAに対する予測値の誤差(予測誤差値)を求める。 In step S12, the prediction processing unit 403 predicts the pixel value of the target pixel G DATA using the pixel values of the pixels a, b, and c. In the present embodiment, as described above, the prediction process is performed using the LOCCO-I method or the Paeth method capable of highly accurate prediction. In the next step S13, the prediction error processing unit 404, from the pixel value of the target pixel G DATA, by subtracting the predicted prediction value in step S12, the error (prediction error value) of the predicted value for the target pixel G DATA Ask for.

ステップS13で注目画素GDATAに対する予測誤差値が求められると、処理はステップS14に移行される。ステップS14では、ランレングス生成処理部405で、ステップS13で求められた予測誤差値が「0」以外の値であるか、若しくは、注目画素GDATAがラインの最終画素であるか否かが判定される。 When the prediction error value for the target pixel G DATA is obtained in step S13, the process proceeds to step S14. In step S14, the run length generation processing unit 405 determines whether the prediction error value obtained in step S13 is a value other than “0” or whether the target pixel G DATA is the last pixel of the line. Is done.

若し、求めた予測誤差値が「0」であって、且つ、注目画素GDATAがラインの最終画素ではないと判定されたら、処理はステップS15に移行され、ランレングス値を「1」だけ増加させる。そして、処理はステップS10に戻され、スキャン順で次の画素を新たな注目画素GDATAとして、処理が繰り返される。 If it is determined that the obtained prediction error value is “0” and the target pixel G DATA is not the last pixel of the line, the process proceeds to step S15, and the run length value is set to “1”. increase. Then, the process is returned to step S10, and the process is repeated with the next pixel in the scan order as the new target pixel GDATA .

一方、ステップS14で、予測差分値が「0」以外の値であるか、若しくは、注目画素GDATAがラインの最終画素であると判定されたら、処理はステップS16に移行される。ステップS16では、図11−2を用いて説明した符号化フォーマットに従い、ランレングス値を符号化して符号化ランレングス値を生成する。このとき、上述したように、ランレングス値が「0」であってもランレングス値の符号化を行い、1ビットの符号長で符号「0」を生成する。 On the other hand, if it is determined in step S14 that the predicted difference value is a value other than “0” or the target pixel GDATA is the last pixel of the line, the process proceeds to step S16. In step S16, the run length value is encoded according to the encoding format described with reference to FIG. 11B to generate an encoded run length value. At this time, as described above, even if the run-length value is “0”, the run-length value is encoded, and a code “0” is generated with a 1-bit code length.

次のステップS17およびステップS18では、符号フォーマット生成処理部406により、図11−1を用いて説明した符号化フォーマットに従い、予測誤差値を符号化して符号化予測誤差値を生成する。すなわち、ステップS17で、予測誤差値に基づき当該予測誤差値が属するグループを求め、グループを示す値の符号化を行う。次のステップS18で、予測誤差値とステップS17で求めたグループとに基づき、付加ビットの符号化を行う。そして、符号化されたグループと付加ビットとを接続して、符号化予測誤差値を生成する。   In the next step S17 and step S18, the code format generation processing unit 406 encodes the prediction error value according to the encoding format described with reference to FIG. 11A to generate an encoded prediction error value. That is, in step S17, a group to which the prediction error value belongs is obtained based on the prediction error value, and a value indicating the group is encoded. In the next step S18, additional bits are encoded based on the prediction error value and the group obtained in step S17. Then, the encoded group and the additional bits are connected to generate an encoded prediction error value.

符号書き込み部407は、ステップS16で求められた符号化ランレングス値に対してステップS18で求められた符号化予測誤差値を接続して、メインメモリ210のページ符号格納領域303に書き込む。   The code writing unit 407 connects the encoded prediction error value obtained in step S18 to the encoded run length value obtained in step S16 and writes it in the page code storage area 303 of the main memory 210.

処理はステップS19に移行され、注目画素GDATAがラインの最終画素であるか否かが判定される。若し、注目画素GDATAがラインの最終画素ではないと判定されたら、処理はステップS20に移行され、ランレングス値が「0」にリセットされる。そして、処理はステップS10に戻され、スキャン順で次の画素を新たな注目画素GDATAとして、処理が繰り返される。 The process proceeds to step S19, and it is determined whether or not the target pixel GDATA is the last pixel of the line. If it is determined that the target pixel G DATA is not the final pixel of the line, the process proceeds to step S20, and the run length value is reset to “0”. Then, the process is returned to step S10, and the process is repeated with the next pixel in the scan order as the new target pixel GDATA .

一方、ステップS19で注目画素GDATAがラインの最終画素であると判定されたら、処理はステップS21に移行される。ステップS21では、当該注目画素GDATAの属するラインを符号化済みの参照ラインとしてラインメモリ402の一方の領域にそのまま保持し、ラインメモリ402の他方の領域を、次に符号化を行う符号化ラインの画素データが格納される領域とする。そして、処理はステップS22に移行され、全てのラインについて処理が終了したか否かが判定される。若し、終了したと判定されたら、一連の符号化処理が終了される。 On the other hand, if it is determined in step S19 that the target pixel GDATA is the last pixel of the line, the process proceeds to step S21. In step S21, the line to which the target pixel G DATA belongs is held as it is in one area of the line memory 402 as an encoded reference line, and the other area of the line memory 402 is encoded next for encoding. The pixel data is stored in the area. Then, the process proceeds to step S22, and it is determined whether or not the process has been completed for all lines. If it is determined that the processing has been completed, a series of encoding processing is ended.

一方、ステップS22で全てのラインについて処理が終了していないと判定されたら、処理はステップS10に戻され、次のラインの先頭画素を注目画素GDATAとして、処理が繰り返される。 On the other hand, if it is determined in step S22 that the process has not been completed for all lines, the process returns to step S10, and the process is repeated with the first pixel of the next line as the target pixel GDATA .

ここで、上述したステップS23における簡易的な予測処理の妥当性について説明する。図15−1および図15−2は、実際のプリンタ画像の例を示す。図15−1は、一般的なビジネス文書などで多用される、白地に対して文字やCG(Computer Graphics)による画像が配置されている例である。また、図15−2は、画像の縦方向にグラデーション処理が施された地に対して文字やCGによる画像が配置されている例であり、このような形式も、一般的なビジネス文書などで多用される。   Here, the validity of the simple prediction process in step S23 described above will be described. 15A and 15B show examples of actual printer images. FIG. 15A is an example in which characters and CG (Computer Graphics) images are arranged on a white background, which is frequently used in general business documents. Further, FIG. 15-2 is an example in which an image of characters or CG is arranged on the ground subjected to gradation processing in the vertical direction of the image, and such a format is also a general business document or the like. Often used.

このような、CGやテキストを中心に構成されたプリンタ画像は、一定の規則性を以て画素が配列され、画像の横方向や縦方向に画素単位で高い相関を持つことが期待される。ここで、横方向の相関が高い場合とは、上述の図8を参照して、画素bと画素cとで画素値が等しく、且つ、画素aと注目画素GDATAとで画素値が等しい場合である。また、縦方向の相関が高い場合とは、画素aと画素cとで画素値が等しく、且つ、画素bと注目画素GDATAとで画素値が等しい場合である。したがって、このように横方向や縦方向に相関が高い画像の場合には、上述したような、縦方向または横方向に隣接する2画素の画素値が各列または各行でそれぞれ一致するか否かを判定する簡易予測処理で予測が的中し、注目画素GDATAの画素値に対する予測誤差が「0」となる。 In such a printer image composed mainly of CG and text, pixels are arranged with a certain regularity, and it is expected to have a high correlation in pixel units in the horizontal and vertical directions of the image. Here, when the correlation in the horizontal direction is high, referring to FIG. 8 described above, the pixel values of the pixel b and the pixel c are equal, and the pixel value of the pixel a and the target pixel G DATA are equal. It is. The case where the correlation in the vertical direction is high is a case where the pixel value is the same between the pixel a and the pixel c, and the pixel value is the same between the pixel b and the target pixel GDATA . Therefore, in the case of an image having a high correlation in the horizontal direction and the vertical direction as described above, whether or not the pixel values of the two pixels adjacent in the vertical direction or the horizontal direction match in each column or each row as described above. hits are predicted by simple prediction process for determining the prediction error for the pixel value of the target pixel G DATA is "0".

図16および図17を用いて、本実施形態による簡易的な予測処理について検証する。図16−1および図16−2は、LOCO−I方式を用いて予測を行い、簡易的な予測処理を検証する。図16−1は、横方向に相関が高い画像の例を示す。図16−1の例では、横方向に並ぶ画素bおよび画素cの画素値がそれぞれ「100」であり、画素aおよび注目画素GDATAの画素値がそれぞれ「20」となっている。本実施形態の簡易的な予測処理によれば、画素bおよび画素cとで画素値が等しく、且つ、画素aおよび注目画素GDATAとで画素値が等しいので、ステップS23で説明した判定に従い、注目画素GDATAの画素値に対する予測誤差が「0」になる。 A simple prediction process according to the present embodiment will be verified with reference to FIGS. 16 and 17. FIGS. 16A and 16B perform prediction using the LOCO-I method and verify simple prediction processing. FIG. 16A illustrates an example of an image having a high correlation in the horizontal direction. In the example of FIG. 16A, the pixel values of the pixel b and the pixel c arranged in the horizontal direction are each “100”, and the pixel value of the pixel a and the target pixel G DATA are each “20”. According to the simple prediction process of the present embodiment, the pixel value is the same for the pixel b and the pixel c, and the pixel value is the same for the pixel a and the target pixel G DATA , so according to the determination described in step S23. The prediction error for the pixel value of the target pixel G DATA is “0”.

この例の場合、上述の図9のフローチャートを参照し、画素値が画素cと画素bとで等しく、画素cと画素aとでは画素cの画素値の方が大きいので、ステップS30の判定により処理がステップS31に移行される。画素aと画素bとでは画素aの方が画素値が小さいので、予測値が画素aの画素値である「20」とされる。注目画素の画素値は「20」であるので予測が的中し、予測誤差が「0」となる。これは、本実施形態による簡易的な予測処理による結果と一致する。なお、図中、演算子minは、括弧内に併記される値のうち小さい方を選択することを示す。   In the case of this example, referring to the flowchart of FIG. 9 described above, the pixel value is the same for the pixel c and the pixel b, and the pixel value of the pixel c is larger between the pixel c and the pixel a. The process proceeds to step S31. Since the pixel a has a smaller pixel value between the pixel a and the pixel b, the predicted value is “20”, which is the pixel value of the pixel a. Since the pixel value of the target pixel is “20”, the prediction is correct, and the prediction error is “0”. This coincides with the result of the simple prediction process according to the present embodiment. In the figure, the operator min indicates that the smaller one of the values written in parentheses is selected.

図16−2は、縦方向に相関が高い画像の例を示す。図16−2の例では、縦方向に並ぶ画素aおよび画素cの画素値がそれぞれ「80」であり、画素bおよび注目画素GDATAの画素値がそれぞれ「30」となっている。本実施形態の簡易的な予測処理によれば、画素aおよび画素cとで画素値が等しく、且つ、画素bと注目画素GDATAとで画素値が等しいので、ステップS23で説明した判定に従い、注目画素GDATAの画素値に対する予測誤差が「0」になる。 FIG. 16B illustrates an example of an image having a high correlation in the vertical direction. In the example of FIG. 16B, the pixel values of the pixels a and c arranged in the vertical direction are “80”, and the pixel values of the pixel b and the target pixel G DATA are “30”. According to the simple prediction process of the present embodiment, the pixel value is the same between the pixel a and the pixel c, and the pixel value is the same between the pixel b and the target pixel G DATA , so according to the determination described in step S23. The prediction error for the pixel value of the target pixel G DATA is “0”.

この例の場合、上述の図9のフローチャートを参照し、画素値が画素aと画素cとで等しく、画素cと画素bとでは画素cの画素値の方が大きいので、ステップS30の判定により処理がステップS31に移行される。画素aと画素bとでは画素bの画素値の方が小さいので、予測値が画素bの画素値である「30」とされる。注目画素の画素値は「30」であるので予測が的中し、予測誤差は、「0」となる。これは、本実施形態による簡易的な予測処理による結果と一致する。   In the case of this example, referring to the flowchart of FIG. 9 described above, the pixel value is the same for the pixel a and the pixel c, and the pixel c is larger in the pixel c and the pixel b. The process proceeds to step S31. Since the pixel value of the pixel b is smaller between the pixel a and the pixel b, the predicted value is set to “30” which is the pixel value of the pixel b. Since the pixel value of the target pixel is “30”, the prediction is correct, and the prediction error is “0”. This coincides with the result of the simple prediction process according to the present embodiment.

図17−1および図17−2は、Paeth方式を用いて予測を行う例である。画素a、bおよびc、ならびに、注目画素の画素値は、それぞれ、上述の図16−1および図16−2と同一としてある。したがって、本実施形態による簡易的な予測処理による予測誤差は、上述と同様に、図17−1および図17−2でそれぞれ「0」となる。   FIGS. 17A and 17B are examples in which prediction is performed using the Paeth method. The pixel values of the pixels a, b, and c and the pixel of interest are the same as those in FIGS. 16-1 and 16-2 described above, respectively. Therefore, the prediction errors due to the simple prediction processing according to the present embodiment are “0” in FIGS. 17A and 17B, respectively, as described above.

図17−1の例の場合、図10のフローチャートを参照し、画素aの画素値が「20」、画素cおよび画素bの画素値がそれぞれ「100」となっているので、ステップS40で画素a、bおよびcの画素値から値pを算出すると、値p=20+100−100=20となる。この値pを用いてステップS41〜ステップS43で値pa、pbおよびpcを求めると、値pa=0、値pb=80、値pc=80となる。値paは、値pbおよび値pc以下であるので、ステップS44の判定により値a=20が予測値とされる。注目画素GDATAの画素値は「20」であるので、予測誤差が「0」となり、本実施形態による簡易的な予測処理による結果と一致する。 In the case of the example in FIG. 17A, referring to the flowchart in FIG. 10, the pixel value of the pixel a is “20”, and the pixel values of the pixel c and pixel b are “100”. When the value p is calculated from the pixel values of a, b and c, the value p = 20 + 100−100 = 20. When the values pa, pb, and pc are obtained in steps S41 to S43 using this value p, the values pa = 0, pb = 80, and pc = 80 are obtained. Since the value pa is equal to or less than the value pb and the value pc, the value a = 20 is set as the predicted value by the determination in step S44. Since the pixel value of the target pixel G DATA is “20”, the prediction error is “0”, which matches the result of the simple prediction process according to the present embodiment.

図17−2の例の場合、図10のフローチャートを参照し、画素aおよび画素cの画素値がそれぞれ「80」、画素bの画素値が「30」となっているので、ステップS40で画素a、bおよびcの画素値から値pを算出すると、値p=80+30−80=30となる。この値pを用いてステップS41〜ステップS43で値pa、pbおよびpcを求めると、値pa=50、値pb=0、値pc=50となる。値paは、値pbより大きいので、ステップS44の判定により処理がステップS46に移行される。値pbは、値paおよび値pcより小さいので、ステップS46の判定により値b=30が予測値とされる。注目画素GDATAの画素値は「30」であるので、予測誤差が「0」となり、本実施形態による簡易的な予測処理による結果と一致する。 In the case of the example of FIG. 17-2, referring to the flowchart of FIG. 10, the pixel values of the pixel a and the pixel c are “80” and the pixel value of the pixel b is “30”. When the value p is calculated from the pixel values of a, b and c, the value p = 80 + 30−80 = 30. When the values pa, pb, and pc are obtained in steps S41 to S43 using this value p, the values pa = 50, the value pb = 0, and the value pc = 50 are obtained. Since the value pa is larger than the value pb, the process proceeds to step S46 according to the determination in step S44. Since the value pb is smaller than the value pa and the value pc, the value b = 30 is set as the predicted value by the determination in step S46. Since the pixel value of the pixel of interest G DATA is “30”, the prediction error is “0”, which matches the result of the simple prediction process according to the present embodiment.

このように、本実施形態の簡易的な予測処理によれば、画像中の縦方向または横方向の相関がある部分では、LOCO−I方式やPaeth方式による予測と同一の結果を、LOCO−I方式やPaeth方式と比較して遙かに少ない手順で得ることができる。したがって、本実施形態によれば、画像の予測符号化を、LOCO−I方式やPaeth方式による高精度の予測を維持しつつ、より高速に行うことができる。   As described above, according to the simple prediction process of the present embodiment, the same result as the prediction by the LOCO-I method or the Paeth method is obtained in the portion where there is a correlation in the vertical direction or the horizontal direction in the image. Compared to the method and the Paeth method, it can be obtained with much fewer procedures. Therefore, according to the present embodiment, predictive coding of an image can be performed at a higher speed while maintaining high-precision prediction by the LOCO-I method or the Paeth method.

本実施形態では、予測誤差値が「0」であることを符号長が1ビットのランレングス値で示すように符号フォーマットを構成すると共に、符号を、ランレングス値および予測誤差値の組を単位として構成している。そのため、符号化処理および復号処理を簡易にできる。また、符号をこのように構成することで、ランレングス値および予測誤差値を示すヘッダや、符号化時に用いた予測処理を示すヘッダを符号中に含める必要が無くなり、より効率的に圧縮符号化を行うことができる。   In this embodiment, the code format is configured to indicate that the prediction error value is “0” by a run length value having a code length of 1 bit, and the code is a unit of a set of the run length value and the prediction error value. It is configured as. Therefore, the encoding process and the decoding process can be simplified. Also, by configuring the code in this way, it is not necessary to include a header indicating the run-length value and the prediction error value, or a header indicating the prediction process used at the time of encoding, and compression encoding can be performed more efficiently. It can be performed.

<他の実施形態>
なお、上述では、本発明の実施形態による符号化部204を構成する各部がハードウェア的に構成されるように説明したが、これはこの例に限定されない。すなわち、本発明に実施形態に適用な可能なカラープリンタ100における符号化部204は、カラープリンタ100に組み込まれたCPU(図示しない)上で動作するプログラムとして、それぞれ実現可能である。
<Other embodiments>
In the above description, each unit configuring the encoding unit 204 according to the embodiment of the present invention has been described as being configured in hardware, but this is not limited to this example. That is, the encoding unit 204 in the color printer 100 applicable to the embodiment of the present invention can be realized as a program that operates on a CPU (not shown) incorporated in the color printer 100.

この場合、CPU上で符号化部204として実行されるプログラムは、例えば図6を用いて説明した符号化部204の各機能部(画像読み込み部400、ラインメモリ制御処理部401、簡易予測処理部410、予測処理部403、予測誤差処理部404、ランレングス生成処理部405、符号フォーマット生成処理部406および符号書き込み部407)を含むモジュール構成となっている。   In this case, the program executed as the encoding unit 204 on the CPU is, for example, each functional unit (the image reading unit 400, the line memory control processing unit 401, the simple prediction processing unit) of the encoding unit 204 described with reference to FIG. 410, a prediction processing unit 403, a prediction error processing unit 404, a run length generation processing unit 405, a code format generation processing unit 406, and a code writing unit 407).

このプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD(Compact Disk)、フレキシブルディスク(FD)、DVD(Digital Versatile Disk)などのコンピュータで読み取り可能な記録媒体に記録されて提供される。これに限らず、プログラムは、CPUに接続されるROM(図示しない)に予め記憶させておいてもよい。さらに、プログラムは、インターネットなどのネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、このプログラムを、インターネットなどのネットワーク経由で提供または配布するように構成してもよい。   This program is a file in an installable or executable format, and is provided by being recorded on a computer-readable recording medium such as a CD (Compact Disk), a flexible disk (FD), or a DVD (Digital Versatile Disk). . The program is not limited to this, and the program may be stored in advance in a ROM (not shown) connected to the CPU. Furthermore, the program may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. The program may be configured to be provided or distributed via a network such as the Internet.

実際のハードウェアとしては、CPUが、例えば上述した記録媒体から符号化部204として機能するプログラムを読み出して実行することにより、上述した各部が主記憶装置(図示しない)上にロードされる。そして、画像読み込み部400、ラインメモリ制御処理部401、簡易予測処理部410、予測処理部403、予測誤差処理部404、ランレングス生成処理部405、符号フォーマット生成処理部406および符号書き込み部407が主記憶装置上に生成されるようになっている。   As actual hardware, for example, the CPU reads out and executes a program that functions as the encoding unit 204 from the above-described recording medium, whereby each of the above-described units is loaded on a main storage device (not shown). Then, an image reading unit 400, a line memory control processing unit 401, a simple prediction processing unit 410, a prediction processing unit 403, a prediction error processing unit 404, a run length generation processing unit 405, a code format generation processing unit 406, and a code writing unit 407 are provided. It is generated on the main memory.

204 符号化部
205 復号部
210 メインメモリ
302 CMYKバンドデータ格納領域
303 ページ符号格納領域
401 ラインメモリ制御部
402 ラインメモリ
403 予測処理部
404 予測誤差処理部
405 ランレングス生成処理部
406 符号フォーマット生成処理部
410 簡易予測処理部
204 Coding unit 205 Decoding unit 210 Main memory 302 CMYK band data storage area 303 Page code storage area 401 Line memory control unit 402 Line memory 403 Prediction processing unit 404 Prediction error processing unit 405 Run length generation processing unit 406 Code format generation processing unit 410 Simple prediction processing unit

特開2002−344323号公報JP 2002-344323 A 特許第2888186号公報Japanese Patent No. 2888186 特開平11−234683号公報JP-A-11-234683

Claims (10)

多値画像データを圧縮符号化する画像処理装置であって、
注目画素と該注目画素の周辺画素との、画像の縦方向および横方向のうち少なくとも一方の相関に基づき、該注目画素の画素値と該注目画素の画素値に対する予測値との差分である予測誤差値が0であるか否かの判定を行う第1の予測手段と、
前記第1の予測手段により前記予測誤差値が0ではないと判定された場合に、前記注目画素の画素値に対する予測値を、該注目画素の画素値と該注目画素の周辺画素の画素値とに基づく予測により求め、該予測により求められた該予測値の該注目画素の画素値に対する予測誤差値を算出する第2の予測手段と、
前記第1の予測手段および前記第2の予測手段で得られた前記予測誤差値の符号化を行う符号化手段と
を有する
ことを特徴とする画像処理装置。
An image processing apparatus for compressing and encoding multi-value image data,
Prediction that is the difference between the pixel value of the pixel of interest and the predicted value for the pixel value of the pixel of interest based on the correlation of at least one of the vertical and horizontal directions of the image between the pixel of interest and the surrounding pixels of the pixel of interest First prediction means for determining whether or not the error value is 0;
When it is determined by the first prediction means that the prediction error value is not 0, the prediction value for the pixel value of the pixel of interest is determined as the pixel value of the pixel of interest and the pixel values of the surrounding pixels of the pixel of interest. Second prediction means for calculating a prediction error value for the pixel value of the target pixel of the target pixel of the prediction value determined by the prediction,
An image processing apparatus comprising: an encoding unit that encodes the prediction error value obtained by the first prediction unit and the second prediction unit.
前記第1の予測手段は、
前記注目画素および該注目画素の周辺画素について、前記縦方向および前記横方向のうち少なくとも一方のそれぞれの並びで同一の画素値を持つ場合に、前記予測誤差値が0であると判定する
ことを特徴とする請求項1に記載の画像処理装置。
The first prediction means includes
Determining that the prediction error value is 0 when the pixel of interest and the peripheral pixels of the pixel of interest have the same pixel value in each of at least one of the vertical direction and the horizontal direction. The image processing apparatus according to claim 1, wherein:
前記第2の予測手段は、LOCO−I方式を用いて前記予測値を求める
ことを特徴とする請求項1または請求項2に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the second prediction unit obtains the predicted value using a LOCO-I method.
前記第2の予測手段は、Paeth方式を用いて前記予測値を求める
ことを特徴とする請求項1または請求項2に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the second prediction unit obtains the predicted value using a Paeth method.
前記第1の予測手段および前記第2の予測手段で求められた前記予測誤差値が0の長さを示すランレングスを生成するランレングス生成手段をさらに有し、
前記符号化手段は、
前記第1の予測手段および前記第2の予測手段で求められた前記予測誤差値と前記ランレングス生成手段で生成された前記ランレングスとをそれぞれ符号化する
ことを特徴とする請求項1乃至請求項4の何れか1項に記載の画像処理装置。
A run length generating means for generating a run length in which the prediction error value obtained by the first predicting means and the second predicting means has a length of 0;
The encoding means includes
2. The encoding method according to claim 1, wherein the prediction error value obtained by the first prediction unit and the second prediction unit and the run length generated by the run length generation unit are encoded. Item 5. The image processing apparatus according to any one of Items 4 to 5.
前記符号化手段は、
前記ランレングスおよび前記予測誤差値の符号化をハフマン符号を用いて行う
ことを特徴とする請求項5に記載の画像処理装置。
The encoding means includes
The image processing apparatus according to claim 5, wherein the run length and the prediction error value are encoded using a Huffman code.
前記符号化手段は、
前記ランレングスおよび前記予測誤差値の符号化を互いに独立したハフマン木に基づきそれぞれ行う
ことを特徴とする請求項6に記載の画像処理装置。
The encoding means includes
The image processing apparatus according to claim 6, wherein the run length and the prediction error value are encoded based on mutually independent Huffman trees.
前記符号化手段は、
前記予測誤差値に対応するハフマン符号の符号長が前記注目画素による画像データのビット長以上の長さになる場合に、前記符号化を行った符号として該注目画素による画像データそのものを用いる
ことを特徴とする請求項6または請求項7に記載の画像処理装置。
The encoding means includes
When the code length of the Huffman code corresponding to the prediction error value is equal to or longer than the bit length of the image data of the target pixel, the image data itself of the target pixel is used as the encoded code. The image processing apparatus according to claim 6 or 7, wherein the image processing apparatus is characterized in that:
前記符号化手段は、
前記符号化を行った前記ランレングスと、前記符号化を行った前記予測誤差値とによる組を単位として符号データを形成する
ことを特徴とする請求項5乃至請求項8の何れか1項に記載の画像処理装置。
The encoding means includes
The code data is formed in units of a set of the run length that has been encoded and the prediction error value that has been encoded, according to any one of claims 5 to 8. The image processing apparatus described.
多値画像データを圧縮符号化する画像処理方法であって、
注目画素と該注目画素の周辺画素との、画像の縦方向および横方向のうち少なくとも一方の相関に基づき、該注目画素の画素値と該注目画素の画素値に対する予測値との差分である予測誤差値が0であるか否かの判定を行う第1の予測ステップと、
前記第1の予測ステップにより前記予測誤差値が0ではないと判定された場合に、前記注目画素の画素値に対する予測値を、該注目画素の画素値と該注目画素の周辺画素の画素値とに基づく予測により求め、該予測により求められた該予測値の該注目画素の画素値に対する予測誤差値を算出する第2の予測ステップと、
前記第1の予測ステップおよび前記第2の予測ステップで得られた前記予測誤差値の符号化を行う符号化ステップと
を有する
ことを特徴とする画像処理方法。
An image processing method for compressing and encoding multi-value image data,
Prediction that is the difference between the pixel value of the pixel of interest and the predicted value for the pixel value of the pixel of interest based on the correlation of at least one of the vertical and horizontal directions of the image between the pixel of interest and the surrounding pixels of the pixel of interest A first prediction step for determining whether the error value is 0;
When it is determined in the first prediction step that the prediction error value is not 0, a prediction value for the pixel value of the target pixel is determined as a pixel value of the target pixel and a pixel value of a peripheral pixel of the target pixel. A second prediction step of calculating a prediction error value for the pixel value of the target pixel of the target pixel of the prediction value obtained by the prediction,
An image processing method comprising: an encoding step for encoding the prediction error value obtained in the first prediction step and the second prediction step.
JP2009162413A 2009-07-09 2009-07-09 Image processor and image processing method Pending JP2011019095A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009162413A JP2011019095A (en) 2009-07-09 2009-07-09 Image processor and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009162413A JP2011019095A (en) 2009-07-09 2009-07-09 Image processor and image processing method

Publications (1)

Publication Number Publication Date
JP2011019095A true JP2011019095A (en) 2011-01-27

Family

ID=43596547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009162413A Pending JP2011019095A (en) 2009-07-09 2009-07-09 Image processor and image processing method

Country Status (1)

Country Link
JP (1) JP2011019095A (en)

Similar Documents

Publication Publication Date Title
JP5369982B2 (en) Image processing apparatus and image processing method
JP5081539B2 (en) Image data encoding apparatus, image data encoding method, image forming apparatus, image forming method, image data decoding apparatus, and image data decoding method
US20050249427A1 (en) Image data compression apparatus for compressing both binary image data and multiple value image data
US20060028664A1 (en) Printing apparatus and control method therefor
JP2005309865A (en) Image processing apparatus and method, and computer readable recording medium for recording program for causing computer to implement this method
US8712174B2 (en) Image processing apparatus and image processing method
JP2011019096A (en) Image processor and image processing method
JP4568685B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP5218332B2 (en) Image processing apparatus and image processing method
JP5201040B2 (en) Image processing apparatus, image processing method, and program
JP2011019095A (en) Image processor and image processing method
JP4490783B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP2010219777A (en) Apparatus and method for processing image, and program
JP2012134929A (en) Image processing system and image processing method
JP7040058B2 (en) Encoding device
JP6451221B2 (en) Image processing apparatus and image processing method
JP2010219776A (en) Image processing apparatus and method, and program
JP4773223B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JP4774914B2 (en) Image processing apparatus and image processing method
JP2005252573A (en) Image processor and picture processing method
JP2004236042A (en) Image processor and image processing method
JP2005305873A (en) Image processor, method of processing image, and computer readable recording medium containing program for allowing computer to execute the method
JP2012134659A (en) Image processing device and image processing method
JP2005260872A (en) Image processor and image processing method, and computer-readable recording medium with program for allowing computer to execute image processing method recorded thereon
JP2006231854A (en) Image formation device and its controlling method