JP4182960B2 - Image processing apparatus and image processing program for binarization processing - Google Patents

Image processing apparatus and image processing program for binarization processing Download PDF

Info

Publication number
JP4182960B2
JP4182960B2 JP2005185445A JP2005185445A JP4182960B2 JP 4182960 B2 JP4182960 B2 JP 4182960B2 JP 2005185445 A JP2005185445 A JP 2005185445A JP 2005185445 A JP2005185445 A JP 2005185445A JP 4182960 B2 JP4182960 B2 JP 4182960B2
Authority
JP
Japan
Prior art keywords
image data
gradation
binarization
error
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005185445A
Other languages
Japanese (ja)
Other versions
JP2007006271A (en
Inventor
誠 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2005185445A priority Critical patent/JP4182960B2/en
Priority to US11/473,462 priority patent/US7620255B2/en
Publication of JP2007006271A publication Critical patent/JP2007006271A/en
Application granted granted Critical
Publication of JP4182960B2 publication Critical patent/JP4182960B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

本発明は,多階調画像データを中間階調表示可能な二値化データに変換する二値化処理(ハーフトーニング処理)を行う画像処理装置及び画像処理プログラムに関し,特に,低解像度画像データを高画質の二値化データに変換することができる画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus and an image processing program for performing binarization processing (halftoning processing) for converting multi-gradation image data into binarized data that can be displayed with intermediate gradations. The present invention relates to an image processing apparatus and an image processing program that can be converted into high-quality binarized data.

ファクシミリや複写機は,紙などの印刷媒体に形成された画像をスキャナユニットにより読み取り多階調画像データを取得し,それを中間階調表示可能な二値化データに変換する二値化処理を行う。ファクシミリは,その二値化データを通信回線を経由して送信する。また,複写機は,二値化データを印刷ユニットにより画像再生する。また,ファクシミリや複写機以外にも,パーソナルコンピュータシステムが,スキャナ機能を利用して印刷媒体の画像を読み取り,読み取った多階調画像データを二値化データに変換して,例えば表示装置に画像再生して表示する。   Facsimile and copiers perform binarization processing that reads images formed on printing media such as paper with a scanner unit to acquire multi-gradation image data, and converts it into binary data that can be displayed in intermediate gradations. Do. The facsimile transmits the binarized data via a communication line. In addition, the copying machine reproduces the image of the binarized data by the printing unit. In addition to facsimile machines and copiers, personal computer systems use the scanner function to read images on print media, convert the read multi-tone image data into binary data, and display the image on a display device, for example. Play and display.

特に,ファクシミリの場合,標準化規格により200dpi程度の低解像度の二値化データを生成することが要求されており,そのスキャナユニットはそれに対応して200dpi程度の低解像度の多階調画像データを出力する。このようにスキャナユニットにより取得された低解像度の多階調画像データを二値化データに変換する場合,細線や文字の視認性を向上しつつ写真の階調性を維持することが必要になる。   In particular, in the case of facsimiles, it is required to generate binary data with a low resolution of about 200 dpi according to standardization standards, and the scanner unit outputs multi-tone image data with a low resolution of about 200 dpi correspondingly. To do. Thus, when converting low-resolution multi-gradation image data acquired by the scanner unit into binarized data, it is necessary to maintain the gradation of the photograph while improving the visibility of thin lines and characters. .

一般に,多階調画像データの二値化処理として,固定された閾値マトリクスを使用する固定ディザ法や誤差拡散法などがある。さらに,固定ディザ法には,閾値マトリクスの低閾値を中心部分に配置することで入力階調が高くなるにしたがって網点または線が成長するドット集中型固定ディザ法と,閾値マトリクスの閾値を分散させたドット分散型固定ディザ法とがある。ドット集中型は,ドットが集中した網点の大きさで階調を表現することからAM(振幅変調)スクリーンと呼ばれ,ドット分散型は,孤立ドットの間隔の粗密により画像を再現することからFM(周期変調)スクリーンと呼ばれている。   In general, as a binarization process of multi-tone image data, there are a fixed dither method using a fixed threshold matrix and an error diffusion method. In addition, the fixed dither method includes a dot-concentrated fixed dither method in which halftone dots or lines grow as the input gradation increases by placing the low threshold of the threshold matrix in the center, and the threshold matrix threshold is distributed. Dot dispersion type fixed dither method. The dot concentration type is called an AM (amplitude modulation) screen because it expresses the gradation by the size of the dot where the dots are concentrated, and the dot dispersion type reproduces the image by the density of isolated dots. It is called an FM (periodic modulation) screen.

ドット集中型固定ディザ法では,階調性を重視してスクリーン線数を増加させれば解像性が低下し,解像性を重視してスクリーン線数を低下させれば階調性が低下するので,低解像度画像データを二値化する場合,細線や文字の視認性を向上しつつ写真の階調性も維持することは困難である。   In the dot-concentrated fixed dither method, if the number of screen lines is increased with emphasis on gradation, the resolution decreases. If the number of screen lines is decreased with emphasis on resolution, the gradation decreases. Therefore, when binarizing low-resolution image data, it is difficult to maintain the gradation of a photograph while improving the visibility of thin lines and characters.

また,インクジェットプリンタなどで採用されているドット分散型固定ディザ法は,ドットを分散させてドットの粗密により階調を表現するので階調性は向上するものの,低解像度画像データの場合ドット抜けが目立って文字や細線の視認性を確保することができない。   In addition, the dot dispersion type fixed dither method used in inkjet printers and the like disperses the dots and expresses the gradation by the density of the dots, so that the gradation is improved. However, in the case of low resolution image data, missing dots are lost. The visibility of characters and fine lines cannot be ensured.

一方,誤差拡散法は,二値化により発生した入力画像データとの誤差を周囲の画素に伝搬しながら二値化を繰り返す処理であり,階調性と解像性を両立させることができる二値化処理として知られている。かかる誤差拡散法については,例えば特許文献1に記載されている。
特開平8−307680号公報
On the other hand, the error diffusion method is a process of repeating binarization while propagating an error from input image data generated by binarization to surrounding pixels, and can achieve both gradation and resolution. This is known as a valuation process. Such an error diffusion method is described in Patent Document 1, for example.
JP-A-8-307680

しかしながら,誤差拡散法は,二値化により発生した誤差を周囲の画素に伝搬するので,低濃度領域においてドットの生成が遅れるドット生成の遅延や,中濃度領域において誤差拡散法特有のテクスチャの発生があり,画質の低下を招いている。誤差拡散法では固定された誤差伝搬マトリクスで誤差を周囲の画素に伝搬するので,中濃度領域ではドットの発生に規則性が生じ,ワームノイズと呼ばれるテクスチャが生成されやすい。したがって,誤差拡散法は,文字や細線の解像性は優れてはいるものの,低濃度領域でのドット生成の遅延や中濃度領域でのテクスチャ発生に問題がある。   However, the error diffusion method propagates the error generated by binarization to surrounding pixels, so the dot generation delay that delays the generation of dots in the low density region and the generation of textures specific to the error diffusion method in the medium density region There is a decrease in image quality. In the error diffusion method, an error is propagated to surrounding pixels using a fixed error propagation matrix. Therefore, regularity occurs in the generation of dots in the medium density region, and a texture called worm noise is easily generated. Therefore, although the error diffusion method is excellent in the resolution of characters and fine lines, there are problems in the delay of dot generation in the low density region and the generation of texture in the medium density region.

そこで,本発明の目的は,誤差拡散法のドット発生の遅延や中濃度領域でのテクスチャ発生を抑制して高い画質の二値化データに二値化することができる画像処理装置及び画像処理プログラムを提供することにある。   Accordingly, an object of the present invention is to provide an image processing apparatus and an image processing program that can binarize into high-quality binarized data by suppressing dot generation delay in the error diffusion method and texture generation in an intermediate density region. Is to provide.

上記の目的を達成するために,本発明の第1の側面によれば,所定の解像度の画素毎に多階調画像データを有する入力画像データを前記画素毎の二値化データに変換する画像処理装置において,
前記多階調画像データの最大階調値の1/2未満の基準値より処理対象画素の多階調画像データの階調値が低い場合は,複数の低い閾値を集中させることなく複数の閾値が分散配置された閾値マトリクスに基づいて当該処理対象画素をドット有りとドットなしの二値化データに変換する第1の二値化処理を行い,
前記基準値より処理対象画素の多階調画像データの階調値が高い場合は,当該処理対象画素をドット有りの二値化データに変換する第2の二値化処理と,前記処理対象画素の入力階調値と最大階調値との差からなる誤差を第1の誤差伝搬マトリクスに基づいて周囲の画素の前記多階調画像データに加算する誤差伝搬処理とを行う二値化ユニットを有する画像処理装置である。
To achieve the above object, according to the first aspect of the present invention, an image for converting input image data having multi-gradation image data for each pixel having a predetermined resolution into binarized data for each pixel. In the processing unit,
When the gradation value of the multi-gradation image data of the pixel to be processed is lower than the reference value less than ½ of the maximum gradation value of the multi-gradation image data, the plurality of threshold values are concentrated without concentrating the plurality of low threshold values. Performing a first binarization process for converting the pixel to be processed into binary data with and without dots based on a threshold matrix in which
When the gradation value of the multi-tone image data of the processing target pixel is higher than the reference value, a second binarization process for converting the processing target pixel into binary data with dots, and the processing target pixel A binarization unit that performs error propagation processing for adding an error consisting of a difference between the input gradation value and the maximum gradation value to the multi-gradation image data of surrounding pixels based on a first error propagation matrix An image processing apparatus.

上記の第1の側面によれば,基準値より低い階調値の場合は,ドット分散型固定ディザ法により二値化するので,誤差拡散法に特有の低階調濃度領域におけるドット再現の遅延をなくし中階調濃度領域におけるテクスチャの発生を抑制することができる。また,基準値より高い階調値の場合は,常にドット有りの二値化データに変換して誤差を周囲の画素に伝搬する誤差拡散法による二値化処理をするので,低解像度の入力画像データであっても,文字や細線のドット抜けによる視認性の低下を抑制することができる。   According to the first aspect described above, when the gradation value is lower than the reference value, binarization is performed by the dot dispersion type fixed dither method. Therefore, the dot reproduction delay in the low gradation density region peculiar to the error diffusion method. And the occurrence of texture in the middle gradation density region can be suppressed. Also, in the case of a gradation value higher than the reference value, the binarization process is always performed by the error diffusion method in which the error is propagated to surrounding pixels by converting it into binary data with dots. Even for data, it is possible to suppress a decrease in visibility due to missing dots of characters or fine lines.

第1の側面において,好ましい態様によれば,前記二値化ユニットは,前記第1の二値化処理と共に,当該第1の二値化処理が行われた処理対象画素の誤差を周囲の画素の前記多階調画像データに加算する誤差伝搬処理を行う。かかる態様によれば,低濃度領域の画素についても二値化に伴う誤差を周囲の画素に伝搬するので,高濃度領域の画素での誤差伝搬の連続性を保つことができ,ドットの粗密な部分で生じるドットむらを抑制することができる。文字や細線の視認性や低濃度領域でのドット発生の遅延については,必ずしもこの誤差伝搬処理には依存しない。   In the first aspect, according to a preferred embodiment, the binarization unit, together with the first binarization process, calculates an error of a pixel to be processed on which the first binarization process has been performed as a surrounding pixel. Error propagation processing to be added to the multi-gradation image data. According to this aspect, the error due to the binarization is propagated to the surrounding pixels even for the pixels in the low density region, so that the continuity of error propagation in the pixels in the high density region can be maintained, and the dot density is high. It is possible to suppress dot unevenness that occurs in the portion. The visibility of characters and thin lines and the delay in dot generation in the low density region do not necessarily depend on this error propagation process.

以下,図面にしたがって本発明の実施の形態について説明する。但し,本発明の技術的範囲はこれらの実施の形態に限定されず,特許請求の範囲に記載された事項とその均等物まで及ぶものである。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited to these embodiments, but extends to the matters described in the claims and equivalents thereof.

以下の実施の形態では,低解像度画像を二値化する例として,ファクシミリの画像処理を一例にして説明する。ただし,ファクシミリ以外でも低解像度画像を二値化する場合に本実施の形態を適用することができる。   In the following embodiments, as an example of binarizing a low resolution image, facsimile image processing will be described as an example. However, the present embodiment can be applied to a case where a low-resolution image is binarized even if it is not a facsimile.

図1は,本実施の形態における画像処理ユニットを有するファクシミリ装置の構成図である。図中,送信側100の構成と受信側200の構成とが示されている。送信側の構成100は,オリジナル画像10をスキャンして画素毎の多階調画像データ13を生成するスキャナ12と,スキャナ12が生成した多階調画像データ13を画像処理して画素毎の二値化データ(ドット有り,ドットなしのデータ)19を生成する画像処理ユニット14と,二値化データ19を送出する送信ユニット20とを有する。多階調画像データ13は,例えば200dpiの低解像度の画素毎に8ビット,256階調の階調表現を行うことができるデータである。ファクシミリ装置の場合,標準規格により送信データの解像度が200dpiと定められている関係上,スキャナ12はそれと同程度の解像度を有するのが一般的である。それより高い解像度で多階調画像データを生成しても二値化データの解像度がそれより低い場合は,スキャナを高解像度にする意味がないからである。   FIG. 1 is a configuration diagram of a facsimile apparatus having an image processing unit according to the present embodiment. In the figure, the configuration of the transmission side 100 and the configuration of the reception side 200 are shown. The transmission-side configuration 100 includes a scanner 12 that scans an original image 10 to generate multi-tone image data 13 for each pixel, and multi-tone image data 13 generated by the scanner 12 to perform image processing and perform two-pixel-by-pixel processing. It has an image processing unit 14 that generates binarized data (data with dots and data without dots), and a transmission unit 20 that sends binarized data 19. The multi-gradation image data 13 is data that can perform gradation representation of 8 bits and 256 gradations for each pixel with a low resolution of 200 dpi, for example. In the case of a facsimile machine, because the resolution of transmission data is set to 200 dpi according to the standard, the scanner 12 generally has a resolution comparable to that. This is because, even if multi-tone image data is generated at a higher resolution, if the resolution of the binarized data is lower than that, there is no point in making the scanner high resolution.

本実施の形態における画像処理ユニット14は,スキャナ12が生成した多階調画像データ13を補正するガンマ補正ユニット16と,補正された多階調画像データを二値化する二値化ユニット18とで構成される。画像処理ユニット14は,それぞれ専用のハードウエアによるガンマ補正ユニットと二値化ユニットで構成される場合もあれば,内蔵するCPUユニットがガンマ補正プログラムと二値化プログラムを実行することにより,ガンマ補正処理と二値化処理を行う場合もある。   The image processing unit 14 according to the present embodiment includes a gamma correction unit 16 that corrects the multi-tone image data 13 generated by the scanner 12, and a binarization unit 18 that binarizes the corrected multi-tone image data. Consists of. The image processing unit 14 may be composed of a dedicated hardware gamma correction unit and binarization unit, respectively, or the built-in CPU unit executes a gamma correction program and a binarization program, thereby performing gamma correction. Processing and binarization processing may be performed.

受信側の構成200は,送信された二値化データを受信する通信ユニット22と,受信した二値化データ23にしたがって画素にドット有り,ドットなしで画像再生を行う印刷ユニット24とを有する。印刷ユニット24が二値化データに基づいて画像再生を行うことで,受信画像26が形成される。   The receiving-side configuration 200 includes a communication unit 22 that receives the transmitted binarized data, and a printing unit 24 that reproduces an image without dots and without dots according to the received binarized data 23. The print unit 24 performs image reproduction based on the binarized data, whereby a received image 26 is formed.

[ハイブリッド誤差拡散による二値化処理]
本実施の形態における二値化処理は,誤差拡散法とドット分散型固定ディザ法とを併用することで,誤差拡散法による文字や細線の高解像度性を維持したまま,低濃度領域におけるドット生成の遅延を抑制し,中濃度領域でのテクスチャ(ワームノイズ)の発生を抑制する。そして,二値化された画素の誤差を周囲の画素の階調値に加算する誤差拡散処理を行う。
[Binary processing by hybrid error diffusion]
In the binarization process in this embodiment, the error diffusion method and the dot dispersion type fixed dither method are used together to generate dots in the low density area while maintaining the high resolution of characters and fine lines by the error diffusion method. This suppresses the occurrence of texture (worm noise) in the medium density region. Then, error diffusion processing is performed in which the binarized pixel error is added to the gradation values of surrounding pixels.

図2は,本実施の形態における二値化ユニットの二値化処理を示すフローチャート図である。この二値化処理によれば,処理済みの画素から伝搬された誤差を加えた注目画素の階調値(濃度)が,最大階調値255の半分より小さい基準値,例えば64,より小さい低濃度領域か,基準値より大きい高濃度領域かに応じて,固定ディザ法による二値化処理と,常にドット有りとして誤差を拡散する誤差拡散処理とを区別して行う。つまり,注目されている処理対象画素の濃度が基準値(64)より小さい場合は(S10のYES),固定ディザ法による二値化処理を行う(S12)。この固定ディザ法による二値化処理は,例えばドット集中型固定ディザ法よりもドット分散型固定ディザ法のほうが好ましい。そして,固定ディザ法による二値化処理した場合に,その二値化により生成される誤差を後述する誤差伝搬マトリクスによって周囲の画素の多階調画像データの階調値に加算(伝搬)する。   FIG. 2 is a flowchart showing the binarization processing of the binarization unit in the present embodiment. According to this binarization processing, the gradation value (density) of the target pixel to which the error propagated from the processed pixel is added is a reference value smaller than half of the maximum gradation value 255, for example, 64, a smaller low value. Depending on whether it is a density area or a high density area that is larger than the reference value, the binarization process by the fixed dither method and the error diffusion process that always diffuses an error with dots are performed. In other words, if the density of the processing target pixel of interest is smaller than the reference value (64) (YES in S10), binarization processing by the fixed dither method is performed (S12). For the binarization processing by the fixed dither method, for example, the dot dispersion type fixed dither method is preferable to the dot concentration type fixed dither method. Then, when binarization processing is performed by the fixed dither method, an error generated by the binarization is added (propagated) to gradation values of multi-gradation image data of surrounding pixels by an error propagation matrix described later.

また,処理対象画素の濃度が基準値以上の場合は(S10のNO),基準値を閾値とする誤差拡散法により二値化処理する(S16)。つまり,処理対象画素をドット有りの二値化データに変換し,それに伴う誤差を第1の誤差伝搬マトリクスに基づいて周囲の画素の多階調画像データの階調値に加算(伝搬)する。即ち,この誤差拡散法により二値化処理S16は,基準値を閾値とする誤差拡散法と同等である。   If the density of the pixel to be processed is equal to or higher than the reference value (NO in S10), binarization processing is performed by an error diffusion method using the reference value as a threshold (S16). That is, the pixel to be processed is converted into binarized data with dots, and the error associated therewith is added (propagated) to the gradation values of the multi-gradation image data of the surrounding pixels based on the first error propagation matrix. That is, the binarization processing S16 by this error diffusion method is equivalent to the error diffusion method using the reference value as a threshold value.

図3は,ドット分散型固定ディザ法における閾値マトリクスの例を示す図である。この例では,多階調画像データの階調値が0〜15を前提にしており,閾値マトリクスには4x4の画素マトリクスにそれぞれ閾値(0〜15)が分散して配置されている。多階調画像データの階調値が0〜255の場合は,閾値マトリクスのサイズに応じた離散的値が分散して配置される。例えば図3の4x4のマトリクス例では0〜15の閾値が、0〜255に正規化した17刻みの離散的閾値となる。このように,注目画素の濃度が低濃度領域の場合にドット分散型固定ディザ法による二値化処理を行うことで,低解像度の画像データであっても文字や細線のドット欠けを減らして視認性を高めることができる。   FIG. 3 is a diagram illustrating an example of a threshold matrix in the dot dispersion type fixed dither method. In this example, it is assumed that the gradation values of the multi-gradation image data are 0 to 15, and the threshold values (0 to 15) are dispersedly arranged in the 4 × 4 pixel matrix in the threshold matrix. When the gradation values of the multi-gradation image data are 0 to 255, discrete values corresponding to the size of the threshold matrix are distributed and arranged. For example, in the 4 × 4 matrix example of FIG. 3, the threshold value of 0 to 15 is a discrete threshold value of 17 increments normalized to 0 to 255. In this way, when the density of the pixel of interest is in the low density area, binarization processing by the dot dispersion type fixed dither method is performed, so that even low-resolution image data can be visually recognized with reduced dot missing of characters and fine lines. Can increase the sex.

そして,固定ディザ法による二値化処理をした場合は,注目されている処理対象画素がドット有りの二値化データに変換されると,それによる誤差を第1の誤差伝搬マトリクスで周囲の画素の多階調画像データの階調値に加算(伝搬)する。一方,処理対象画素がドットなしの二値化データに変換されると,それによる誤差を第1の誤差伝搬マトリクスとは異なる第2の誤差伝搬マトリクスで伝搬する(S14)。つまり,処理対象画素の多階調画像データの階調値が図3に示した閾値マトリクス(但し閾値は0〜255)の閾値以上の場合はドット有り(階調値=255)の二値化データに変換されると,処理対象画素の入力階調値とドット有りの階調値(最大階調値255)との差であるマイナス誤差は,高濃度画素の誤差伝搬に使用する誤差伝搬マトリクスと同じ第1の誤差伝搬マトリクスにしたがって周囲の画素に伝搬する。一方,処理対象画素の多階調画像データの階調値が閾値マトリクスの閾値より小さい場合はドットなし(階調値=0)の二値化データに変換されると,処理対象画素の入力階調値とドットなしの階調値(最小階調値0)との差であるプラス誤差は,第1の誤差伝搬マトリクスとは誤差伝搬方向が異なり,伝搬する誤差の量も異なる第2の誤差伝搬マトリクスにしたがって周囲の画素に伝搬する。   When binarization processing is performed by the fixed dither method, when the target pixel of interest is converted into binarized data with dots, the error due to the error is converted into surrounding pixels by the first error propagation matrix. Is added (propagated) to the tone value of the multi-tone image data. On the other hand, when the pixel to be processed is converted into binarized data without dots, an error caused by the pixel is propagated in a second error propagation matrix different from the first error propagation matrix (S14). That is, when the gradation value of the multi-tone image data of the processing target pixel is equal to or higher than the threshold value of the threshold value matrix (threshold value is 0 to 255) shown in FIG. 3, binarization with dots (gradation value = 255) is performed. When converted to data, a minus error, which is the difference between the input gradation value of the pixel to be processed and the gradation value with dots (maximum gradation value 255), is an error propagation matrix used for error propagation of high density pixels. To the surrounding pixels according to the same first error propagation matrix. On the other hand, if the gradation value of the multi-tone image data of the pixel to be processed is smaller than the threshold value of the threshold matrix, it is converted into binarized data without dots (gradation value = 0), and the input floor of the pixel to be processed is converted. The plus error, which is the difference between the tone value and the tone value without dots (minimum tone value 0), is the second error in which the error propagation direction is different from the first error propagation matrix and the amount of error to propagate is also different. Propagates to surrounding pixels according to the propagation matrix.

図4は,第1及び第2の誤差伝搬マトリクスの一例を示す図である。第1の閾値伝搬マトリクスETM1は,処理対象画素である注目画素(図中※)で二値化により発生した誤差(注目画素の入力階調値と二値化後の階調値(0または255)の差分)を周囲の画素に伝搬する量の割合を示している。この例は,Javis-Judice-Ninke型の誤差伝搬マトリクスであり,誤差を3行5列の周囲の画素に伝搬する割合を有し,その割合は,右横と下の画素に7/48,右横2番目と右下と左下の画素に5/48,右下2番目と左下2番目とに3/48,そして,右下3番目と左下3番目とに1/48が配置される。したがって,第1の誤差伝搬マトリクスETM1は,誤差の全てを周囲の画素に伝搬し,伝搬方向が注目画素を中心に且つやや右下方向に広がっているところに特徴がある。   FIG. 4 is a diagram illustrating an example of the first and second error propagation matrices. The first threshold value propagation matrix ETM1 is an error generated by binarization at a target pixel (* in the figure) that is a processing target pixel (the input tone value of the target pixel and the tone value after binarization (0 or 255). ) Is a ratio of the amount of propagation to the surrounding pixels. This example is an error propagation matrix of the Javis-Judice-Ninke type, which has a ratio of propagating an error to surrounding pixels of 3 rows and 5 columns, and the ratio is 7/48 for the right side and the lower pixels. 5/48 is arranged in the second right side, lower right and lower left pixels, 3/48 is arranged in the second lower right and second lower left, and 1/48 is arranged in the lower right third and lower left third. Therefore, the first error propagation matrix ETM1 is characterized in that all of the errors are propagated to surrounding pixels, and the propagation direction is centered on the pixel of interest and spreads slightly to the lower right.

一方,第2の誤差伝搬マトリクスETM2は,注目画素で二値化により発生した誤差の一部を周囲の画素に伝搬している。つまり,誤差は第1の誤差伝搬マトリクスETM1より小さい2行3列のマトリクスサイズであり,その割合は,注目画素の左下に5/16,下に3/16,左下2番目に1/16が配置される。したがって,第2の誤差伝搬マトリクスETM2は,誤差の一部9/16を,周囲の3つの画素に図示された位置に伝搬する。この伝搬方向は,第1の誤差伝搬マトリクスのやや右下とは異なるやや左下方向となっている。   On the other hand, the second error propagation matrix ETM2 propagates a part of the error generated by the binarization at the target pixel to surrounding pixels. That is, the error is a matrix size of 2 rows and 3 columns smaller than the first error propagation matrix ETM1, and the ratio is 5/16 at the lower left of the pixel of interest, 3/16 at the lower, and 1/16 at the second lower left. Be placed. Therefore, the second error propagation matrix ETM2 propagates a part 9/16 of the error to the positions illustrated in the three surrounding pixels. This propagation direction is slightly lower left than the lower right of the first error propagation matrix.

本実施の形態における二値化処理の意味するところは以下の通りである。まず,注目されている処理対象画素の濃度が中低濃度の場合(階調値が64未満),ドット分散型固定ディザ法により,閾値マトリクスの閾値より高い階調値ならドット有りに,低い階調値ならドットなしに二値化する。このようにドット分散型固定ディザ法による二値化処理を行うことで,文字や細線のドット欠けを抑制し視認性を向上させることができる。また,誤差拡散法に特有の低濃度領域でのドット発生の後れをなくすことができる。   The meaning of the binarization processing in the present embodiment is as follows. First, when the density of the processing target pixel of interest is medium to low density (gradation value is less than 64), if the gradation value is higher than the threshold value of the threshold matrix by the dot dispersion type fixed dither method, there is a dot and a lower floor. If it is a key value, binarize without dots. By performing the binarization process using the dot dispersion type fixed dither method in this way, it is possible to suppress the dot missing of characters and fine lines and improve the visibility. In addition, it is possible to eliminate the lag in the generation of dots in the low density region that is characteristic of the error diffusion method.

そして,ドット分散型固定ディザ法で二値化した画素について,固定ディザ法では誤差の拡散は通常行われないにもかかわらず,本実施の形態では誤差を周囲の画素に伝搬する。しかも,誤差の伝搬は,ドット有りに二値化された画素のマイナス誤差は,全誤差を所定の割合で配置して且つやや右下方向に伝搬する第1の誤差伝搬マトリクスETM1に基づいて周囲の画素に伝搬する。一方,ドットなしに二値化された画素のプラス誤差は,一部の誤差を所定の割合で配置して且つやや左下方向に伝搬する第2の誤差伝搬マトリクスETM2に基づいて周囲の画素に伝搬する。つまり,第1に,マイナス誤差とプラス誤差の誤差拡散の方向を異ならせることで,誤差拡散法に特有の固定方向に誤差伝搬することによるテクスチャ(ワームノイズ)を抑制することができるものと考えられる。第2に,最大階調値の1/2より低い基準値より更に低い濃度の画素に対して閾値マトリクスにより二値化しているので,マイナス誤差は全誤差を伝搬して画像がドット過剰になるのを防止するとともに,プラス誤差は一部の誤差だけを伝搬して低濃度領域でドット不足になるのを防止する。   Then, regarding the pixels binarized by the dot dispersion type fixed dither method, the error is propagated to surrounding pixels in the present embodiment, although error diffusion is not normally performed by the fixed dither method. In addition, the error propagation is based on the first error propagation matrix ETM1 in which the minus error of the pixel binarized with the dot is based on the first error propagation matrix ETM1 in which all errors are arranged at a predetermined ratio and propagated slightly in the lower right direction Propagates to the next pixel. On the other hand, the plus error of a pixel binarized without a dot is propagated to surrounding pixels based on the second error propagation matrix ETM2 in which some errors are arranged at a predetermined ratio and slightly propagated in the lower left direction. To do. That is, first, it is considered that the texture (worm noise) due to error propagation in the fixed direction peculiar to the error diffusion method can be suppressed by making the error diffusion directions of the minus error and the plus error different. It is done. Second, since binarization is performed with a threshold matrix for pixels having a density lower than the reference value lower than 1/2 of the maximum gradation value, a minus error propagates all errors and the image becomes excessive in dots. The positive error propagates only a part of the error and prevents the dot shortage in the low density region.

次に,注目されている処理対象画素の濃度が中高濃度の場合(階調値が64以上),画素を全てドット有りの二値化データにし,そのマイナス誤差を第1の誤差伝搬マトリクスETM1に基づいて周囲の画素に伝搬する。つまり,基準値64を閾値とする誤差拡散法による二値化処理である。これにより,最大階調値の1/2を閾値とする誤差拡散法に特有の中濃度領域でのテクスチャ(ワームノイズ)の発生を抑制することができる。つまり,最大階調値の1/2より低い濃度であっても64以上であればドット有りに二値化されるので,テクスチャの発生は抑制される。ただし,全誤差を第1の誤差伝搬マトリクスで伝搬させることで,中濃度領域での適切な中間階調を二値化データで表現することができる。また,基準値を64と低めに設定することで,文字や細線に対してドットの発生が起きやすくなり視認性を向上できる。   Next, when the density of the pixel to be processed of interest is medium to high density (gradation value is 64 or more), all the pixels are converted to binarized data with dots, and the minus error is stored in the first error propagation matrix ETM1. Based on the surrounding pixels. That is, it is a binarization process by the error diffusion method using the reference value 64 as a threshold value. As a result, it is possible to suppress the occurrence of texture (worm noise) in the medium density region, which is characteristic of the error diffusion method using 1/2 of the maximum gradation value as a threshold value. That is, even if the density is lower than ½ of the maximum gradation value, if it is 64 or more, binarization is performed with dots, and the occurrence of texture is suppressed. However, by propagating all errors in the first error propagation matrix, an appropriate intermediate gradation in the intermediate density region can be expressed by binarized data. In addition, by setting the reference value as low as 64, it is easy for dots to occur with respect to characters and fine lines, and visibility can be improved.

さらに,画素の濃度が低濃度領域,つまり階調値が64以下で且つ固定ディザ法でドット有りに二値化された画素については,中高濃度領域の誤差拡散法で利用した第1の誤差伝搬マトリクスを使って誤差を周囲の画素に伝搬しているので,中濃度から高濃度領域での誤差伝搬の連続性を保って,異なる二値化処理による不自然さを抑制している。   Furthermore, the first error propagation used in the error diffusion method in the medium / high density region is applied to the low density region where the pixel density is 64 or less and the pixel is binarized with the fixed dither method. Since errors are propagated to surrounding pixels using a matrix, the continuity of error propagation in medium to high density regions is maintained, and unnaturalness due to different binarization processes is suppressed.

また,画素の濃度が中低濃度領域では,誤差拡散法を採用せずに固定ディザ法を採用するので,誤差拡散法に特有の低濃度領域でのドット発生の遅延を抑制することができ,一律に誤差拡散法で処理するよりも中低濃度領域の中間階調の画質を向上させることができる。つまり,低濃度であっても閾値マトリクスの閾値よりも大きければドットが確実に発生するので,ドット発生の遅延を抑制できるのである。   In addition, since the fixed dither method is used instead of the error diffusion method when the pixel density is medium to low density, the delay of dot generation in the low density region, which is peculiar to the error diffusion method, can be suppressed. Compared with the error diffusion method, it is possible to improve the image quality of the intermediate gradation in the middle / low density region. That is, even if the density is low, dots are surely generated if they are larger than the threshold value of the threshold value matrix, so that the delay of dot generation can be suppressed.

[ガンマ補正]
図1に示したとおり,本実施の形態の画像処理ユニット14では,二値化ユニット18による二値化処理に先立って,ガンマ補正ユニット16が入力される多階調画像データ13をガンマ補正している。このガンマ補正により,本実施の形態において採用したハイブリッド誤差拡散による二値化処理で生じるノンリニア特性を補正する。つまり,ハイブリッド誤差拡散法では,基準値より高濃度は常にドット有りに二値化しその誤差を伝搬し,基準値より低濃度は閾値マトリクスにより二値化して誤差を伝搬させている。このハイブリッド誤差拡散法により二値化前の多階調画像データの入力階調値と二値化データの出力階調値との間にノンリニアな特性が含まれる。そこで,このノンリニア特性を是正するために,ガンマ補正が行われる。
[Gamma correction]
As shown in FIG. 1, in the image processing unit 14 of the present embodiment, prior to the binarization processing by the binarization unit 18, the gamma correction unit 16 performs gamma correction on the input multi-tone image data 13. ing. By this gamma correction, the non-linear characteristic generated in the binarization process by the hybrid error diffusion adopted in the present embodiment is corrected. That is, in the hybrid error diffusion method, the density higher than the reference value is always binarized with dots and the error is propagated, and the density lower than the reference value is binarized by the threshold matrix and the error is propagated. By this hybrid error diffusion method, non-linear characteristics are included between the input tone value of the multi-tone image data before binarization and the output tone value of the binarized data. Therefore, gamma correction is performed to correct this nonlinear characteristic.

図5は,本実施の形態におけるガンマ補正処理を示す図である。第1象限に示した濃度特性曲線30が,ハイブリッド誤差拡散による二値化処理の入出力特性である。二値化処理の入力階調値に対して二値データの出力階調値とは,例えば特性曲線30に示されるような下に凸のノンリニア特性を有する。つまり,理想的なリニア特性32に比較すると,入力階調INに対する二値化後の出力階調OUTは,理想的なリニア特性32による二値化された場合の出力階調COUTよりも小さくなっている。   FIG. 5 is a diagram showing gamma correction processing in the present embodiment. A density characteristic curve 30 shown in the first quadrant is an input / output characteristic of binarization processing by hybrid error diffusion. The output gradation value of the binary data with respect to the input gradation value of the binarization process has a non-linear characteristic that protrudes downward as shown by the characteristic curve 30, for example. That is, compared with the ideal linear characteristic 32, the output gradation OUT after binarization with respect to the input gradation IN is smaller than the output gradation COUT when binarized with the ideal linear characteristic 32. ing.

そこで,本実施の形態では,第4象限に示される補正ガンマテーブル34によって入力階調INを補正し,その補正入力CINを二値化ユニットにより二値化処理する。この補正ガンマテーブル34は,特性曲線30とは逆に上に凸の特性を有する一次元テーブルであり,入力INがこの補正ガンマテーブル34で補正されると補正入力CINは入力INよりも大きい値になる。   Therefore, in the present embodiment, the input gradation IN is corrected by the correction gamma table 34 shown in the fourth quadrant, and the correction input CIN is binarized by the binarization unit. The correction gamma table 34 is a one-dimensional table having an upward convex characteristic as opposed to the characteristic curve 30. When the input IN is corrected by the correction gamma table 34, the correction input CIN is larger than the input IN. become.

第3象限は補正入力CINを第2象限の横軸に移動するための折り返し線36を有する。つまり,第3,4象限の縦軸の補正入力CINと第2象限の横軸の補正入力CINとは同じ値である。   The third quadrant has a fold line 36 for moving the correction input CIN to the horizontal axis of the second quadrant. That is, the correction input CIN on the vertical axis in the third and fourth quadrants and the correction input CIN on the horizontal axis in the second quadrant have the same value.

最後に,第2象限には特性曲線30と左右対称の特性曲線30Rが示され,補正入力CINをこの特性曲線30Rで二値化処理された補正出力COUTは,入力INを理想的なリニア特性32で二値化した場合の出力値に一致する。   Finally, a characteristic curve 30 and a symmetrical characteristic curve 30R are shown in the second quadrant, and the correction output COUT obtained by binarizing the correction input CIN with the characteristic curve 30R is used to convert the input IN into an ideal linear characteristic. This corresponds to the output value when binarized by 32.

上記の補正ガンマテーブル34は,次のようにして求められる。まず,入力画像データとして所定の階調値のパッチ画像データを生成する。このパッチ画像データは,白(階調値0)〜黒ベタ(階調値255)までを所定の階調刻みの階調値を有する複数のパッチパターンデータからなる。そして,このパッチ画像データを二値化ユニット18によりハイブリッド誤差拡散法で二値化データに変換し,その二値化データで画像を形成し,形成された画像の各階調のパッチパターン濃度を測定することで,二値化ユニットの特性曲線30を検出する。この二値化データの画像形成には,ファクシミリ装置の印刷ユニットを利用して紙媒体に画像を印刷することで行われる。または,二値化データによる画像を表示装置に表示しそのパッチパターン濃度を測定することでも良い。印刷ユニットを利用した場合は,特性曲線30に印刷ユニットの特性も含まれてしまう。また,表示装置に表示した場合も,同様に特性曲線30にその表示装置の特性が含まれる。このようにして検出した特性曲線30に対して,理想的なリニア特性が得られるように,補正ガンマテーブル34が求められる。これが濃度補正用ガンマテーブルである。   The correction gamma table 34 is obtained as follows. First, patch image data having a predetermined gradation value is generated as input image data. The patch image data is composed of a plurality of patch pattern data having gradation values in predetermined gradation steps from white (gradation value 0) to solid black (gradation value 255). The patch image data is converted into binarized data by the hybrid error diffusion method by the binarizing unit 18, an image is formed with the binarized data, and the patch pattern density of each gradation of the formed image is measured. As a result, the characteristic curve 30 of the binarization unit is detected. The image formation of the binarized data is performed by printing an image on a paper medium using a printing unit of a facsimile apparatus. Alternatively, an image based on binarized data may be displayed on a display device and the patch pattern density may be measured. When the printing unit is used, the characteristic of the printing unit is included in the characteristic curve 30. Similarly, when displayed on the display device, the characteristic curve 30 includes the characteristics of the display device. A correction gamma table 34 is obtained so that an ideal linear characteristic can be obtained with respect to the characteristic curve 30 thus detected. This is a density correction gamma table.

図6は,本実施の形態における濃度補正用ガンマテーブルの具体例を示す図である。この具体例では,入力画像データとして,階調値33刻みで白(0)から黒(255)までの8ビットのパッチ画像データを生成し,ハイブリッド誤差拡散法で二値化データを生成し,その二値化データを印刷して,各階調のパッチ画像の出力濃度を測定した。この測定値は64ビットの浮動小数点による実数精度の出力濃度データである。この実数精度の出力濃度データから濃度補正用ガンマテーブル34が求められる。   FIG. 6 is a diagram showing a specific example of the density correction gamma table in the present embodiment. In this specific example, as input image data, 8-bit patch image data from white (0) to black (255) is generated in gradation steps of 33, and binarized data is generated by a hybrid error diffusion method. The binarized data was printed, and the output density of each tone patch image was measured. This measured value is output density data with a real number precision in 64-bit floating point. A density correction gamma table 34 is obtained from the output density data with real number accuracy.

この濃度補正用ガンマテーブル34に基づいて,ガンマ補正ユニット16が入力される多階調画像データの階調値を補正入力階調値に変換する。この時,補正入力階調値は浮動小数点のビット形式による実数精度である。したがって,より高精度の補正が可能である。補正された入力階調値が二値化ユニット18により二値化されるので,二値化ユニット18は,実数精度の補正入力階調値に対応して,各画素の多階調画像データを64ビットで処理する。そのため,二値化処理には多くの処理負荷が発生する。そこで,より好ましい実施の形態の形態では,後述するとおり,64ビットの実数精度を16ビットの固定小数点のビット形式の整数精度にし,拡散する誤差の計算を除算ではなく右ビットシフトを利用する。   Based on the density correction gamma table 34, the gamma correction unit 16 converts the tone value of the multi-tone image data input to a correction input tone value. At this time, the corrected input gradation value has a real number precision in a floating-point bit format. Therefore, more accurate correction is possible. Since the corrected input gradation value is binarized by the binarization unit 18, the binarization unit 18 converts the multi-gradation image data of each pixel corresponding to the corrected input gradation value of real number accuracy. Process with 64 bits. Therefore, a lot of processing load occurs in the binarization process. Therefore, in a more preferred embodiment, as will be described later, 64-bit real number precision is changed to integer precision in a 16-bit fixed-point bit format, and a right bit shift is used instead of division for calculation of a diffusion error.

図7は,本実施の形態における背景除去と黒強調の画像処理用ガンマテーブルを示す図である。モノクロファクシミリの場合,オリジナル画像の印刷物の紙白部分に濃度情報が発生する。この濃度情報が,二値化データでドットを生成させ,画質の低下と二値化データの圧縮率(例えばランレングス圧縮の場合白(階調値0)の繰り返し頻度)が低下する。そこで,紙白領域にドットを発生させないための背景除去処理を行う。さらに,黒文字の品質を向上するために黒強調処理を行う。これらの処理は,いずれもスキャナ12の特性も考慮して行う必要がある。   FIG. 7 is a diagram showing an image processing gamma table for background removal and black enhancement in the present embodiment. In the case of a monochrome facsimile, density information is generated in the white paper portion of the printed material of the original image. This density information causes dots to be generated from the binarized data, resulting in a decrease in image quality and a binarized data compression ratio (for example, the repetition frequency of white (tone value 0 in the case of run-length compression)). Therefore, background removal processing is performed to prevent dots from being generated in the paper white area. Furthermore, black enhancement processing is performed to improve the quality of black characters. These processes must be performed in consideration of the characteristics of the scanner 12.

図7に示される変換用のガンマテーブル40は,入力が低濃度領域40Aでは補正出力がより低く,具体的には階調値0になるようにし,入力が高濃度領域40Bでは補正出力がより高く,具体的には階調値255になるようにする。このようなガンマテーブル40を利用して入力の多階調画像データ13を補正出力に変換することで,低濃度領域での背景除去処理と高濃度領域での黒強調処理を行うことができる。   In the conversion gamma table 40 shown in FIG. 7, the correction output is lower when the input is the low density region 40A, specifically, the gradation value is 0, and the correction output is higher when the input is the high density region 40B. Specifically, the gradation value is set to 255. By converting the input multi-gradation image data 13 into a correction output using such a gamma table 40, the background removal process in the low density area and the black enhancement process in the high density area can be performed.

上記の背景除去と黒強調の画像処理は,ガンマ補正ユニット16により行われる。この画像処理用ガンマテーブル40は固定テーブルとし,濃度補正用の補正ガンマテーブル34は再調整可能なような変動テーブルとすることが望ましい。補正ガンマテーブル34にはハイブリッド誤差拡散によるノンリニア特性と印刷ユニットのノンリニア特性とが含まれ,印刷ユニットのノンリニア特性は経年変化により変動するからである。   The background removal and black enhancement image processing are performed by the gamma correction unit 16. The image processing gamma table 40 is preferably a fixed table, and the density correction correction gamma table 34 is preferably a changeable table. This is because the correction gamma table 34 includes non-linear characteristics due to hybrid error diffusion and non-linear characteristics of the printing unit, and the non-linear characteristics of the printing unit fluctuate due to aging.

また,画像処理用ガンマテーブル40と補正ガンマテーブル36とを合成して合成ガンマテーブルを生成しておき,その合成ガンマテーブルを参照して入力の多階調画像データの階調値を補正するようにしても良い。合成ガンマテーブルを利用することでガンマ補正ユニットでの処理工数を減らすことができる。   Further, a composite gamma table is generated by combining the image processing gamma table 40 and the correction gamma table 36, and the gradation value of the input multi-tone image data is corrected with reference to the composite gamma table. Anyway. By using a composite gamma table, the number of processing steps in the gamma correction unit can be reduced.

図8は,合成ガンマテーブルの具体例を示す図である。図中,濃度補正用の補正ガンマテーブル36と画像処理用ガンマテーブル40の例が示され,これらを合成した合成ガンマテーブル44が示されている。合成するためには,画像処理用ガンマテーブル40も出力を64ビットの実数精度にしておく必要がある。   FIG. 8 is a diagram showing a specific example of the composite gamma table. In the figure, an example of a correction gamma table 36 for density correction and an image processing gamma table 40 is shown, and a composite gamma table 44 obtained by combining these is shown. In order to synthesize, the image processing gamma table 40 also needs to have an output with 64-bit real number precision.

図9は,本実施の形態における画像処理ユニットの構成図である。この画像処理ユニットは,入力多階調画像データ13を受信するインターフェースIFと,中央処理ユニットCPUと,合成ガンマテーブルが格納されているメモリ44と,二値化プログラムが格納されているメモリ50と,誤差伝搬マトリクスが格納されているメモリETMと,二値化処理に利用される画像データバッファ54及び二値化データが格納される二値化データバッファ56を有するワークメモリ52と,それらを接続する内部バスBUSとを有する。   FIG. 9 is a configuration diagram of an image processing unit in the present embodiment. This image processing unit includes an interface IF that receives input multi-gradation image data 13, a central processing unit CPU, a memory 44 that stores a composite gamma table, and a memory 50 that stores a binarization program. , A memory ETM in which an error propagation matrix is stored, a work memory 52 having an image data buffer 54 used for binarization processing and a binarized data buffer 56 in which binarized data is stored, and these are connected And an internal bus BUS.

画像データバッファ54は,図4に示した誤差伝搬マトリクスETM1にしたがって二値化処理に伴う誤差を3行5列の周囲の画素に伝搬するので,画像データの水平方向の画素数に両側に2画素のダミー画素を加えた3行の容量を有する。合成ガンマテーブル44により8ビットの入力多階調画像データ13が64ビットの補正された多階調画像データに変換されるので,各画素は64ビットのデータを格納する容量が必要になる。   The image data buffer 54 propagates an error due to the binarization process to the surrounding pixels of 3 rows and 5 columns in accordance with the error propagation matrix ETM1 shown in FIG. It has a capacity of 3 rows including a dummy pixel. Since the composite gamma table 44 converts the 8-bit input multi-gradation image data 13 into 64-bit corrected multi-gradation image data, each pixel requires a capacity for storing 64-bit data.

画像処理ユニット14は,合成ガンマテーブル44を参照して入力多階調画像データ13を補正された多階調画像データに変換する。この多階調画像データは,前述したとおり浮動小数点の実数精度であり1画素64ビットのデータ長を有する。補正された多階調画像データは,画像データバッファ54に一時的に格納される。次に,画像処理ユニット14の中央処理ユニットCPUは,二値化プログラム50を実行して,補正された多階調画像データをハイブリッド誤差拡散による二値化処理を行って,画素毎にドット有り,なしの二値化データに変換し,二値化データバッファ56に格納する。このハイブリッド誤差拡散による二値化処理中,画像データバッファ54内の各画素の多階調画像データには,二値化処理で発生した誤差が誤差伝搬マトリクスETMに基づいて加算され,その誤差が加算された画像データに対して二値化処理が行われる。   The image processing unit 14 refers to the composite gamma table 44 and converts the input multi-tone image data 13 into corrected multi-tone image data. As described above, this multi-tone image data has a floating-point real number precision and a data length of 64 bits per pixel. The corrected multi-gradation image data is temporarily stored in the image data buffer 54. Next, the central processing unit CPU of the image processing unit 14 executes the binarization program 50, performs binarization processing on the corrected multi-gradation image data by hybrid error diffusion, and there is a dot for each pixel. , None, and stored in the binarized data buffer 56. During the binarization processing by the hybrid error diffusion, the error generated by the binarization processing is added to the multi-gradation image data of each pixel in the image data buffer 54 based on the error propagation matrix ETM. A binarization process is performed on the added image data.

図10,図11は,本実施の形態における二値化プログラムのフローチャート図である。この二値化プログラムは,ガンマ補正処理と二値化処理の両方を含んでいるが,ガンマ補正された画像データに対して二値化処理するようにしても良い。   10 and 11 are flowcharts of the binarization program in the present embodiment. The binarization program includes both gamma correction processing and binarization processing, but binarization processing may be performed on gamma-corrected image data.

二値化プログラムは,まず入力画像幅Wdと高さHgを取得し(S20),幅Wd+4,高さ3行の画像データバッファ54を確保し,初期化する(S22)。そして,変数の処理画素w,hをw=1,h=1に初期化する。この変数w,hは画像データバッファ54内での処理対象の画素の位置を示すものである。次に,1画素分の入力画像データ13を入力し,変数wをw=w+1に更新する(S24)。入力画像データ13は,合成ガンマテーブルを参照して補正された画像データに変換される(S26)。これにより入力画像データXが補正された画像データX‘に変換される。   The binarization program first acquires the input image width Wd and height Hg (S20), secures the image data buffer 54 of width Wd + 4 and three rows in height, and initializes it (S22). The variable processing pixels w and h are initialized to w = 1 and h = 1. The variables w and h indicate the position of the pixel to be processed in the image data buffer 54. Next, the input image data 13 for one pixel is input, and the variable w is updated to w = w + 1 (S24). The input image data 13 is converted into image data corrected with reference to the composite gamma table (S26). As a result, the input image data X is converted into corrected image data X ′.

そして,変換された画像データX‘は,画像データバッファ内のhライン上に格納される(S30)。上記の補正と画像データバッファ内への保存は,変数hが3に達するまで繰り返される(S28,S32,S34)。変数h=3になると,変換画像データX’が画像データバッファの3ライン上に格納される(S36,S37,S38)。変数h=3になると,それ以降は常に変換画像データX‘は画像データバッファの3ライン上に格納される(S36)。   The converted image data X ′ is stored on the h line in the image data buffer (S30). The above correction and storage in the image data buffer are repeated until the variable h reaches 3 (S28, S32, S34). When the variable h = 3, the converted image data X 'is stored on three lines of the image data buffer (S36, S37, S38). When the variable h = 3, the converted image data X ′ is always stored on three lines of the image data buffer thereafter (S36).

画像データバッファ内に3行分の補正画像データが格納されると,バッファ内の1ライン目の画素の補正画像データについてハイブリッド誤差拡散による二値化処理が行われる(S40)。この二値化処理は,図11に詳述されている。1ライン目の画素の二値化処理が完了すると,画像データバッファの更新が行われる(S42)。具体的には,画像データバッファの更新処理では,2ライン,3ラインの画像データを1ライン,2ラインに移動し,3ライン目を初期化する。   When the corrected image data for three rows is stored in the image data buffer, the binarization processing by hybrid error diffusion is performed on the corrected image data of the pixels on the first line in the buffer (S40). This binarization process is described in detail in FIG. When the binarization processing of the pixels on the first line is completed, the image data buffer is updated (S42). Specifically, in the update process of the image data buffer, the image data of 2 lines and 3 lines are moved to 1 line and 2 lines, and the 3rd line is initialized.

最後に,変数h=Hgに達すると(S44),画像データバッファ内の3ライン分の画素の画像データがハイブリッド誤差拡散による二値化処理され(S46),二値化プログラムを終了する。   Finally, when the variable h = Hg is reached (S44), the image data of the pixels for three lines in the image data buffer is binarized by hybrid error diffusion (S46), and the binarization program is terminated.

上記のように,図10の処理では,3ライン分の補正画像データを画像データバッファに格納し,二値化処理を行う。また,二値化処理中に二値化に伴う誤差が周囲の画素の階調値に加算され画像データバッファ内に再度格納される。ただし,誤差バッファを別に設けることで,画像データバッファ内には補正画像データを格納し,二値化処理で発生する誤差を誤差バッファに格納し,二値化処理は補正画像データと誤差とを加算した階調値に対して行うようにしても良い。   As described above, in the processing of FIG. 10, the corrected image data for three lines is stored in the image data buffer, and binarization processing is performed. Also, during the binarization process, an error accompanying binarization is added to the gradation values of surrounding pixels and stored again in the image data buffer. However, by providing a separate error buffer, the corrected image data is stored in the image data buffer, the error generated by the binarization process is stored in the error buffer, and the binarization process stores the corrected image data and the error. You may make it perform with respect to the added gradation value.

図11のハイブリッド誤差拡散による二値化処理を説明する。まず,処理画素の位置を示す変数wをw=0に初期化する(S50)。そして,注目画素の多階調画像データX‘を画像データバッファから読み出して,処理画素の階調値を示す変数TagをTag=X’とする(S52)。この階調値Tagには,補正された画像データに二値化処理で伝搬された誤差が加算されている。   A binarization process by hybrid error diffusion in FIG. 11 will be described. First, a variable w indicating the position of the processing pixel is initialized to w = 0 (S50). Then, the multi-gradation image data X ′ of the target pixel is read from the image data buffer, and the variable Tag indicating the gradation value of the processing pixel is set to Tag = X ′ (S52). To this gradation value Tag, the error propagated by the binarization process is added to the corrected image data.

そして,注目画素の階調値Tagが,最大階調値255の1/2より小さい64未満か否かの判定が行われる(S54)。ここで,注目画素の階調値Tagが64以上の場合は(S54のNO),その画素の二値化データは常にドット有り(黒)に分類される(S56)。つまり,二値化後の階調値は最大階調値のx=255となる。そして,その二値化により発生したマイナス誤差E=Tag−xが算出され(S58),第1の誤差伝搬マトリクスETM1に基づいて周辺画素に伝搬され,誤差Eが周辺画素の階調値に加算される(S60)。第1の誤差伝搬マトリクスETM1の例は,図4で示したとおりであり,全誤差をマトリクスに示した割合で分配する。この誤差伝搬マトリクスにより,誤差はやや右下方向に伝搬される。   Then, it is determined whether or not the gradation value Tag of the target pixel is less than 64, which is smaller than ½ of the maximum gradation value 255 (S54). Here, when the gradation value Tag of the target pixel is 64 or more (NO in S54), the binarized data of the pixel is always classified as having a dot (black) (S56). That is, the binarized gradation value is the maximum gradation value x = 255. Then, the minus error E = Tag−x generated by the binarization is calculated (S58), propagated to the peripheral pixels based on the first error propagation matrix ETM1, and the error E is added to the gradation value of the peripheral pixels. (S60). An example of the first error propagation matrix ETM1 is as shown in FIG. 4, and all errors are distributed at a ratio shown in the matrix. Due to this error propagation matrix, the error is slightly propagated in the lower right direction.

このように階調値Tagが基準値64以上の場合に,その画素をドット有りに二値化することで,閾値を最大階調値の1/2である127にした誤差拡散の場合に発生する中濃度領域でのテクスチャ(ワームノイズ)の発生を抑制することができる。   As described above, when the gradation value Tag is equal to or greater than the reference value 64, the pixel is binarized with a dot to generate an error diffusion in which the threshold value is set to 127 that is ½ of the maximum gradation value. It is possible to suppress the occurrence of texture (worm noise) in the medium density region.

一方,注目画素の階調値Tagが64未満の場合は(S5のYES),図3に示したドット分散型ディザマトリクスから注目画素に対応する閾値Dthを取得し(S62),注目画素の階調値Tagが閾値Dth以下か否かが判定される(S64)。注目画素の階調値Tagが閾値Dthを越えている場合は(S64のNO),その画素の二値化データはドット有り(黒)に分類され(S54),そのマイナス誤差Eが算出され(S56),誤差Eが第1の誤差伝搬マトリクスETM1にしたがって周囲の画素に伝搬される(S60)。一方,注目画素の階調値Tagが閾値Dth以下の場合は(S64のYES),その画素の二値化データはドットなし(白)に分類される(S66)。つまり二値化後の階調値は最小階調値のx=0になる。そして,その二値化処理により発生したプラスの誤差E=Tag−xが算出され(S68),そのプラス誤差Eが,第2の誤差伝搬マトリクスにより周辺の画素に伝搬される(S70)。第2の誤差伝搬マトリクスETM2の例は,図4で示したとおりであり,誤差の一部をマトリクスに示した割合で分配する。この誤差伝搬マトリクスにより,誤差はやや左下方向に伝搬される。   On the other hand, when the gradation value Tag of the target pixel is less than 64 (YES in S5), the threshold value Dth corresponding to the target pixel is acquired from the dot dispersion type dither matrix shown in FIG. It is determined whether or not the adjustment value Tag is equal to or less than the threshold value Dth (S64). If the tone value Tag of the pixel of interest exceeds the threshold value Dth (NO in S64), the binarized data of that pixel is classified as having a dot (black) (S54), and its minus error E is calculated ( S56), error E is propagated to surrounding pixels in accordance with first error propagation matrix ETM1 (S60). On the other hand, when the gradation value Tag of the target pixel is equal to or smaller than the threshold value Dth (YES in S64), the binarized data of the pixel is classified as no dot (white) (S66). That is, the gradation value after binarization becomes the minimum gradation value x = 0. Then, a positive error E = Tag−x generated by the binarization processing is calculated (S68), and the positive error E is propagated to surrounding pixels by the second error propagation matrix (S70). An example of the second error propagation matrix ETM2 is as shown in FIG. 4, and a part of the error is distributed at a ratio shown in the matrix. Due to this error propagation matrix, the error is slightly propagated in the lower left direction.

上記のように,階調値Tagが基準値未満になる中低濃度領域では,ドット分散型固定ディザ法により二値化処理が行われる。固定ディザ法の場合ではあるが,二値化により発生したマイナス誤差は,階調値Tagが基準値以上の場合との連続性を考慮して,第1の誤差伝搬マトリクスによって周囲の画素に伝搬される。これにより,基準値を境にして異なる二値化処理をしてもそれによる不連続な階調表現にはされない。また,マイナス誤差については,プラス誤差の第1の誤差伝搬マトリクスとは誤差伝搬方向と伝搬量が異なる第2の誤差伝搬マトリクスにより周囲の画素に伝搬する。このように伝搬することで,本発明者は経験的に中低濃度領域でのテクスチャが抑制されたことを確認した。これは,プラスとマイナスの誤差伝搬が互いに打ち消し合うことによる効果と考えられる。   As described above, binarization processing is performed by the dot dispersion type fixed dither method in the middle and low density region where the gradation value Tag is less than the reference value. Although in the case of the fixed dither method, the minus error generated by binarization is propagated to surrounding pixels by the first error propagation matrix in consideration of continuity with the case where the gradation value Tag is greater than or equal to the reference value. Is done. Thus, even if different binarization processes are performed with the reference value as a boundary, discontinuous gradation expression is not obtained. Further, a minus error is propagated to surrounding pixels by a second error propagation matrix having a propagation amount and a propagation amount different from those of the first error propagation matrix of the plus error. By propagating in this way, the present inventor has empirically confirmed that the texture in the medium and low density region was suppressed. This is considered to be the effect of the positive and negative error propagation canceling each other.

上記のハイブリッド誤差拡散による二値化処理が,処理画素の位置を示す変数wがw=Wdに達するまで繰り返される(S72,S74)。以上で,1ライン分の画素のハイブリッド誤差拡散による二値化処理が完了する。   The above binarization processing by hybrid error diffusion is repeated until the variable w indicating the position of the processing pixel reaches w = Wd (S72, S74). This completes the binarization process by hybrid error diffusion of pixels for one line.

[階調値を固定小数点のビット構成にした高速化処理]
上記の実施の形態では,合成ガンマテーブルによる補正精度を上げるために補正後の階調値を浮動小数点によるビット形式(倍精度の64ビット)にした。しかし,浮動小数点のビット形式の実数を誤差伝搬などのために48で除算する処理は,コンピュータには多くの処理工数を要する。そこで,高速処理を可能にするために,階調値を整数の固定小数点によるビット形式(16ビット,−32767〜+32767)にし,誤差伝搬マトリクスの割合を2のべき乗で除算した割合にする。
[High-speed processing with gradation values in fixed-point bit configuration]
In the above embodiment, in order to improve the correction accuracy by the composite gamma table, the gradation value after correction is in a bit format using floating point (double precision 64 bits). However, the process of dividing a real number in the floating-point bit format by 48 for error propagation or the like requires a lot of processing steps for the computer. Therefore, in order to enable high-speed processing, the gradation value is set to a bit format (16 bits, −32767 to +32767) using an integer fixed point, and the ratio of the error propagation matrix is divided by a power of two.

すなわち,まず,ドット分散型閾値マトリクス内の閾値を8ビットから16ビット(0〜32767)に,実数精度であった合成ガンマテーブルも16ビット(0〜32767)に正規化しておく。これらは正の整数であるため、16ビット中の負の整数領域(−32767〜−1)は使用されない。さらに,画像データバッファの各画素を16ビットの容量にする。また,低濃度領域判定のための基準値64を,0〜32767内の基準値に正規化した8224(64×32767/255)にするし、伝播誤差が16ビット(最大で216/2−1=−32767〜+32767)で伝搬されるようにする。 That is, first, the threshold value in the dot dispersion type threshold value matrix is normalized from 8 bits to 16 bits (0 to 32767), and the composite gamma table having real number precision is also normalized to 16 bits (0 to 32767). Since these are positive integers, the negative integer region (−32767 to −1) in 16 bits is not used. Further, each pixel of the image data buffer has a 16-bit capacity. Further, the reference value 64 for determining the low density region is set to 8224 (64 × 32767/255) normalized to the reference value within 0 to 32767, and the propagation error is 16 bits (2 16 / 2− at maximum). 1 = −32767 to +32767).

そして,誤差を第1の誤差伝搬マトリクスで伝搬するとき,誤差を2のべき乗分のn(nは整数)の割合で配置した誤差伝搬マトリクスを利用する。図12は,2の5乗(64)分のnの割合で分配する第1の誤差伝搬マトリクスの例を示す図である。この例は,図4の第1の誤差伝搬マトリクスETM1と同様に,全誤差をほぼ右下方向に伝搬するものである。これによれば,伝搬すべき誤差は,二値化により発生した誤差(Tag−x)を64で除算し整数倍(9,7,4倍)した値になる。したがって,誤差伝搬処理において発生した誤差のバイナリデータを6ビット右シフトする処理により64で除算し,それにそれぞれの整数倍することで,伝搬すべき誤差を簡単に求めることができ,プロセッサによる処理工数を削減することができる。   Then, when the error is propagated by the first error propagation matrix, an error propagation matrix in which the error is arranged at a ratio of n of a power of 2 (n is an integer) is used. FIG. 12 is a diagram illustrating an example of a first error propagation matrix distributed at a ratio of n to the fifth power of (64). In this example, like the first error propagation matrix ETM1 in FIG. 4, all errors are propagated substantially in the lower right direction. According to this, the error to be propagated is a value obtained by dividing the error (Tag-x) generated by binarization by 64 and multiplying it by an integer (9, 7, 4). Therefore, the binary data of the error generated in the error propagation process is divided by 64 by the process of right-shifting 6 bits, and the error to be propagated can be easily obtained by multiplying it by an integral multiple of each. Can be reduced.

また,プラス誤差については,図4の第2の誤差伝搬マトリクスWETM2をそのまま利用することができる。この例では,発生した誤差のバイナリデータを4ビット右シフトして16で除算することができる。このように,固定小数点によるビット形式にし,分配誤差の計算に右シフトを利用することで,演算処理工数を大きく削減することができる。   For the plus error, the second error propagation matrix WETM2 in FIG. 4 can be used as it is. In this example, the binary data of the generated error can be shifted 4 bits to the right and divided by 16. In this way, by using the fixed-point bit format and using the right shift for calculating the distribution error, the number of processing steps can be greatly reduced.

[二値化処理結果の比較]
本実施の形態のハイブリッド誤差拡散による二値化処理した結果と,従来の固定ディザ法,誤差拡散法による二値化結果とを比較する。第1の比較例は,中高濃度領域はドット有りに二値化して誤差を拡散し,中低濃度領域はディザ法による閾値マトリクスによる二値化を行う処理をした場合である。この第1の比較例では,中低濃度領域でディザ法で二値化した時に発生する誤差は伝搬させていない。第2の比較例は,同様に,中高濃度領域はドット有りに二値化して誤差を伝搬し,中低濃度領域はディザ法による閾値マトリクスによる二値化してその誤差を伝搬する処理をした場合である。
[Comparison of binarization results]
The result of binarization processing by the hybrid error diffusion of this embodiment is compared with the binarization result by the conventional fixed dither method and error diffusion method. The first comparative example is a case where the middle and high density regions are binarized with dots to diffuse errors, and the middle and low density regions are binarized by a threshold matrix by the dither method. In the first comparative example, an error that occurs when binarization is performed by the dither method in the middle and low density region is not propagated. Similarly, in the second comparative example, the medium / high density area is binarized with dots and propagates the error, and the medium / low density area is binarized by the threshold matrix by the dither method and the error is propagated. It is.

[第1の比較例]
図13,14は,中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。オリジナル画像(A)には,階調値68,69,70のパッチパターンが上段に,階調値84,85,86のパッチパターンが下段に配置されている。これらは,低い基準値による二値化に伴うマイナス誤差の拡散で,二値化処理時には多くの画素の階調値が基準値未満になる。したがって,低中濃度領域での分散ディザ法とその誤差拡散の処理結果と,中濃度領域での分散ディザ法と誤差拡散法の境界部分での連続性とを比較することができる。ドット分散型固定ディザ法(B)では,やや大きなテクスチャ(ワームノイズ)が見られる。また,誤差拡散法(C)では,処理開始時のドット発生後れと大きなテクスチャ(ワームノイズ)が見られる。それに対して,本実施の形態(D)では,誤差拡散特有のワームノイズは抑制されているものの,誤差伝搬の連続性がないのでドットの粗密な部分で生じるムラが目立っている。
[First Comparative Example]
FIGS. 13 and 14 show binarization results of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) for the patch image in the medium density region. In the original image (A), patch patterns with gradation values 68, 69, and 70 are arranged in the upper stage, and patch patterns with gradation values 84, 85, and 86 are arranged in the lower stage. These are diffusion of minus errors accompanying binarization with a low reference value, and the gradation values of many pixels become less than the reference value during binarization processing. Therefore, it is possible to compare the dispersion dither method and its error diffusion processing result in the low and medium concentration region with the continuity at the boundary between the dispersion dither method and the error diffusion method in the medium concentration region. In the dot dispersion type fixed dither method (B), a slightly large texture (worm noise) is observed. In addition, in the error diffusion method (C), there are a large amount of texture (worm noise) after dot generation at the start of processing. On the other hand, in the present embodiment (D), although worm noise peculiar to error diffusion is suppressed, since there is no continuity of error propagation, unevenness occurring in a dense portion of dots is conspicuous.

図15は,文字についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。ドット分散型固定ディザ法(B)では,予想とおり文字にドット欠けが目立ち視認性が低下している。誤差拡散法(C)では,ドット欠けが少なく視認性は高い。そして,本実施の形態(D)でも誤差拡散法と同様にドット欠けが少なく視認性が改善されている。   FIG. 15 shows the binarization results of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) for characters. In the dot dispersion type fixed dither method (B), as expected, missing dots are conspicuous in the characters, and the visibility is lowered. In the error diffusion method (C), there are few missing dots and the visibility is high. Also in the present embodiment (D), as in the error diffusion method, there are few missing dots and the visibility is improved.

図16は,低濃度領域を有するパッチパターンについて,オリジナル画像(A),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。誤差拡散法(C)では,予想とおり低濃度領域でドット発生の遅延(領域60)が生じている。それに対して,本実施の形態(D)では,低濃度領域をドット分散型固定ディザ法で二値化しているので,ドット発生の遅延は生じていない。   FIG. 16 shows binarization results of an original image (A), error diffusion (C), and hybrid error diffusion (D) for a patch pattern having a low density region. In the error diffusion method (C), the dot generation delay (region 60) occurs in the low density region as expected. On the other hand, in the present embodiment (D), since the low density region is binarized by the dot dispersion type fixed dither method, no dot generation delay occurs.

[第2の比較例]
図17,18は,中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。オリジナル画像(A)には,階調値68,69,70のパッチパターンが上段に,階調値84,85,86のパッチパターンが下段に配置されている。これらは,低い基準値による二値化に伴うマイナス誤差の拡散で,二値化処理時には多くの画素の階調値が基準値未満になる。したがって,低中濃度領域での分散ディザ法とその誤差拡散の処理結果と,中濃度領域での分散ディザ法と誤差拡散法の境界部分での連続性とを比較することができる。ドット分散型固定ディザ法(B)では,やや大きなテクスチャ(ワームノイズ)が見られる。また,誤差拡散法(C)では,処理開始時のドット発生後れと大きなテクスチャ(ワームノイズ)が見られる。それに対して,本実施の形態(D)では,誤差伝搬の連続性があるのでテクスチャが抑制され画質が向上しているのがわかる。
[Second Comparative Example]
17 and 18 show the binarization results of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) for the patch image in the medium density region. In the original image (A), patch patterns with gradation values 68, 69, and 70 are arranged in the upper stage, and patch patterns with gradation values 84, 85, and 86 are arranged in the lower stage. These are diffusion of minus errors accompanying binarization with a low reference value, and the gradation values of many pixels become less than the reference value during binarization processing. Therefore, it is possible to compare the dispersion dither method and its error diffusion processing result in the low and medium concentration region with the continuity at the boundary between the dispersion dither method and the error diffusion method in the medium concentration region. In the dot dispersion type fixed dither method (B), a slightly large texture (worm noise) is observed. In addition, in the error diffusion method (C), there are a large amount of texture (worm noise) after dot generation at the start of processing. On the other hand, in the present embodiment (D), it can be seen that since there is continuity of error propagation, the texture is suppressed and the image quality is improved.

図19は,文字についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。ドット分散型固定ディザ法(B)では,予想とおり文字にドット欠けが目立ち視認性が低下している。誤差拡散法(C)では,ドット欠けが少なく視認性は高い。そして,本実施の形態(D)でも誤差拡散法と同様にドット欠けが少なく視認性が改善されている。   FIG. 19 shows binarization results of an original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) for characters. In the dot dispersion type fixed dither method (B), as expected, missing dots are conspicuous in the characters, and the visibility is lowered. In the error diffusion method (C), there are few missing dots and the visibility is high. Also in the present embodiment (D), as in the error diffusion method, there are few missing dots and the visibility is improved.

図20は,低濃度領域を有するパッチパターンについて,オリジナル画像(A),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す。誤差拡散法(C)では,予想とおり低濃度領域でドット発生の遅延(領域60)が生じている。それに対して,本実施の形態(D)では,低濃度領域をドット分散型固定ディザ法で二値化しているので,ドット発生の遅延は生じていない。   FIG. 20 shows the binarization results of the original image (A), error diffusion (C), and hybrid error diffusion (D) for a patch pattern having a low density region. In the error diffusion method (C), the dot generation delay (region 60) occurs in the low density region as expected. On the other hand, in the present embodiment (D), since the low density region is binarized by the dot dispersion type fixed dither method, no dot generation delay occurs.

以上説明したとおり,本実施の形態によれば,中低濃度領域ではドット分散型固定ディザ法で二値化し,中高濃度領域ではドット有りに二値化しそこで発生したマイナス誤差を第1の誤差伝搬マトリクスで伝搬しているので,誤差拡散法で低濃度領域で発生するドット発生の遅延や中濃度領域で発生するテクスチャ(ワームノイズ)の発生を抑えることができる。   As described above, according to the present embodiment, binarization is performed by the dot dispersion type fixed dither method in the middle / low density region, and binarization is performed in the middle / high density region by the presence of dots. Since propagation is performed in a matrix, it is possible to suppress the delay of dot generation that occurs in the low density region and the generation of texture (worm noise) that occurs in the medium density region by the error diffusion method.

本実施の形態における画像処理ユニットを有するファクシミリ装置の構成図である。1 is a configuration diagram of a facsimile apparatus having an image processing unit in the present embodiment. 本実施の形態における二値化ユニットの二値化処理を示すフローチャート図である。It is a flowchart figure which shows the binarization process of the binarization unit in this Embodiment. ドット分散型固定ディザ法における閾値マトリクスの例を示す図である。It is a figure which shows the example of the threshold value matrix in a dot dispersion type fixed dither method. 第1及び第2の誤差伝搬マトリクスの一例を示す図である。It is a figure which shows an example of the 1st and 2nd error propagation matrix. 本実施の形態におけるガンマ補正処理を示す図である。It is a figure which shows the gamma correction process in this Embodiment. 本実施の形態における濃度補正用ガンマテーブルの具体例を示す図である。It is a figure which shows the specific example of the gamma table for density correction in this Embodiment. 本実施の形態における背景除去と黒強調の画像処理用ガンマテーブルを示す図である。It is a figure which shows the gamma table for image processing of a background removal and black emphasis in this Embodiment. 合成ガンマテーブルの具体例を示す図である。It is a figure which shows the specific example of a synthetic | combination gamma table. 本実施の形態における画像処理ユニットの構成図である。It is a block diagram of the image processing unit in this Embodiment. 本実施の形態における二値化プログラムのフローチャート図である。It is a flowchart figure of the binarization program in this Embodiment. 本実施の形態における二値化プログラムのフローチャート図である。It is a flowchart figure of the binarization program in this Embodiment. 高速化処理用の第1の誤差伝搬マトリクスの例を示す図である。It is a figure which shows the example of the 1st error propagation matrix for high speed processing. 中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the patch image of the medium density area. 中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the patch image of the medium density area. 文字についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the character. 低濃度領域を有するパッチパターンについて,オリジナル画像(A),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of an original image (A), error diffusion (C), and hybrid error diffusion (D) about the patch pattern which has a low density area | region. 中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the patch image of the medium density area. 中濃度領域のパッチ画像についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the patch image of the medium density area. 文字についてオリジナル画像(A),ドット分散型固定ディザ(B),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of the original image (A), dot dispersion type fixed dither (B), error diffusion (C), and hybrid error diffusion (D) about the character. 低濃度領域を有するパッチパターンについて,オリジナル画像(A),誤差拡散(C),ハイブリッド誤差拡散(D)の二値化結果を示す図である。It is a figure which shows the binarization result of an original image (A), error diffusion (C), and hybrid error diffusion (D) about the patch pattern which has a low density area | region.

符号の説明Explanation of symbols

12:スキャナ 13:入力多階調画像データ
14:画像処理ユニット(画像処理装置)
16:ガンマ補正ユニット 18:二値化ユニット
19:二値化データ
12: Scanner 13: Input multi-gradation image data 14: Image processing unit (image processing apparatus)
16: Gamma correction unit 18: Binarization unit 19: Binarization data

Claims (11)

所定の解像度の画素毎に多階調画像データを有する入力画像データを前記画素毎の二値化データに変換する画像処理装置において,
前記多階調画像データの最大階調値の1/2未満の基準値より処理対象画素の多階調画像データの階調値が低い場合は,複数の低い閾値を集中させることなく複数の閾値が分散配置された閾値マトリクスに基づいて当該処理対象画素をドット有りとドットなしの二値化データに変換する第1の二値化処理を行い,
前記基準値より処理対象画素の多階調画像データの階調値が高い場合は,当該処理対象画素をドット有りの二値化データに変換する第2の二値化処理と,前記処理対象画素の入力階調値と最大階調値との差からなる誤差を第1の誤差伝搬マトリクスに基づいて周囲の画素の前記多階調画像データに加算する誤差伝搬処理とを行う二値化ユニットを有する画像処理装置。
In an image processing apparatus for converting input image data having multi-gradation image data for each pixel of a predetermined resolution into binary data for each pixel,
When the gradation value of the multi-gradation image data of the pixel to be processed is lower than the reference value less than ½ of the maximum gradation value of the multi-gradation image data, the plurality of threshold values are concentrated without concentrating the plurality of low threshold values. Performing a first binarization process for converting the pixel to be processed into binary data with and without dots based on a threshold matrix in which
When the gradation value of the multi-tone image data of the processing target pixel is higher than the reference value, a second binarization process for converting the processing target pixel into binary data with dots, and the processing target pixel A binarization unit that performs error propagation processing for adding an error consisting of a difference between the input gradation value and the maximum gradation value to the multi-gradation image data of surrounding pixels based on a first error propagation matrix An image processing apparatus.
請求項1において,
前記二値化ユニットは,前記第1の二値化処理と共に,当該第1の二値化処理が行われた処理対象画素の誤差を周囲の画素の前記多階調画像データに加算する誤差伝搬処理を行うことを特徴とする画像処理装置。
In claim 1,
The binarization unit adds error of the processing target pixel on which the first binarization processing is performed to the multi-gradation image data of surrounding pixels together with the first binarization processing. An image processing apparatus that performs processing.
請求項1において,
前記二値化ユニットは,前記第1の二値化処理においてドット有りに二値化された処理対象画素の誤差を,前記第1の誤差伝搬マトリクスに基づいて周囲の画素の前記多階調画像データに加算する誤差伝搬処理を行うことを特徴とする画像処理装置。
In claim 1,
The binarization unit converts the error of the pixel to be processed binarized with the dots in the first binarization processing into the multi-gradation image of surrounding pixels based on the first error propagation matrix. An image processing apparatus that performs error propagation processing to be added to data.
請求項3において,
前記第1の誤差伝搬マトリクスは,処理対象画素から所定方向に位置する周囲の画素により高い重み付けで前記誤差の全てを伝搬することを特徴とする画像処理装置。
In claim 3,
The image processing apparatus according to claim 1, wherein the first error propagation matrix propagates all of the errors with higher weight to surrounding pixels located in a predetermined direction from the processing target pixel.
請求項1において,
前記二値化ユニットは,前記第1の二値化処理においてドットなしに二値化された処理対象画素の誤差を,第2の誤差伝搬マトリクスに基づいて周囲の画素の前記多階調画像データに加算する誤差伝搬処理を行うことを特徴とする画像処理装置。
In claim 1,
The binarization unit converts an error of a pixel to be processed binarized without a dot in the first binarization process, based on a second error propagation matrix, the multi-gradation image data of surrounding pixels. An image processing apparatus that performs error propagation processing to be added to
請求項5において,
前記第2の誤差伝搬マトリクスは,処理対象画素から所定方向に位置する周囲の画素により高い重み付けで前記誤差の一部を伝搬することを特徴とする画像処理装置。
In claim 5,
The second error propagation matrix propagates a part of the error with higher weight to surrounding pixels located in a predetermined direction from a processing target pixel.
請求項1において,
更に,前記画素毎に多階調画像データを有する入力画像データを,前記二値化ユニットによる二値化処理に伴って発生する,入力画像データの階調値と二値化データにより再現される画像の階調値とのノンリニア特性を補正するガンマ補正処理ユニットを有し,
前記ガンマ補正処理ユニットにより補正された補正入力画像データが,前記二値化ユニットにより二値化されることを特徴とする画像処理装置。
In claim 1,
Further, the input image data having multi-gradation image data for each pixel is reproduced by the gradation value and binarization data of the input image data generated by the binarization processing by the binarization unit. It has a gamma correction processing unit that corrects nonlinear characteristics with the gradation value of the image,
An image processing apparatus, wherein the corrected input image data corrected by the gamma correction processing unit is binarized by the binarization unit.
請求項7において,
前記ガンマ補正処理ユニットは,更に,前記入力画像データに対して低濃度階調領域でより低濃度階調に補正するドット除去補正と,高濃度階調領域でより高濃度階調に補正する黒強調補正を行うことを特徴とする画像処理装置。
In claim 7,
The gamma correction processing unit further includes dot removal correction for correcting the input image data to a lower density gradation in a low density gradation area and a black correction for correcting the input image data to a higher density gradation in a high density gradation area. An image processing apparatus that performs enhancement correction.
請求項8において,
前記ガンマ補正処理ユニットは,前記ノンリニア特性の補正と前記ドット除去補正と前記黒強調補正とが合成された合成補正テーブルに基づいて,前記入力画像データを補正することを特徴とする画像処理装置。
In claim 8,
The gamma correction processing unit corrects the input image data based on a composite correction table in which the nonlinear characteristic correction, the dot removal correction, and the black enhancement correction are combined.
請求項1,2,3,5のいずれかにおいて,処理対象画素の多階調データが複数ビットからなるバイナリデータ形式で処理され,前記誤差伝搬処理において,当該多階調データを所定数ビット右シフト処理することで,伝搬すべき誤差を算出することを特徴とする画像処理装置。   6. The multi-tone data of a processing target pixel according to claim 1, wherein the multi-tone data of a pixel to be processed is processed in a binary data format consisting of a plurality of bits. An image processing apparatus that calculates an error to be propagated by performing a shift process. 所定の解像度の画素毎に多階調画像データを有する入力画像データを前記画素毎の二値化データに変換する画像処理プログラムにおいて,
前記多階調画像データの最大階調値の1/2未満の基準値より処理対象画素の多階調画像データの階調値が低い場合は,複数の低い閾値を集中させることなく複数の閾値が分散配置された閾値マトリクスに基づいて当該処理対象画素をドット有りとドットなしの二値化データに変換する第1の二値化処理工程をコンピュータに実行させ,
前記基準値より処理対象画素の多階調画像データの階調値が高い場合は,当該処理対象画素をドット有りの二値化データに変換する第2の二値化処理工程と,前記処理対象画素の入力階調値と最大階調値との差からなる誤差を第1の誤差伝搬マトリクスに基づいて周囲の画素の前記多階調画像データに加算する誤差伝搬処理工程とをコンピュータに実行させる画像処理プログラム。
In an image processing program for converting input image data having multi-gradation image data for each pixel of a predetermined resolution into binary data for each pixel,
When the gradation value of the multi-gradation image data of the pixel to be processed is lower than the reference value less than ½ of the maximum gradation value of the multi-gradation image data, the plurality of threshold values are concentrated without concentrating the plurality of low threshold values. The computer executes the first binarization processing step for converting the pixel to be processed into binarized data with and without dots based on the threshold matrix in which is distributed and arranged,
When the gradation value of the multi-tone image data of the processing target pixel is higher than the reference value, a second binarization processing step for converting the processing target pixel into binary data with dots, and the processing target Causing the computer to execute an error propagation processing step of adding an error consisting of a difference between the input gradation value of the pixel and the maximum gradation value to the multi-gradation image data of the surrounding pixels based on the first error propagation matrix. Image processing program.
JP2005185445A 2005-06-24 2005-06-24 Image processing apparatus and image processing program for binarization processing Expired - Fee Related JP4182960B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005185445A JP4182960B2 (en) 2005-06-24 2005-06-24 Image processing apparatus and image processing program for binarization processing
US11/473,462 US7620255B2 (en) 2005-06-24 2006-06-22 Image processor and image processing program for binary processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005185445A JP4182960B2 (en) 2005-06-24 2005-06-24 Image processing apparatus and image processing program for binarization processing

Publications (2)

Publication Number Publication Date
JP2007006271A JP2007006271A (en) 2007-01-11
JP4182960B2 true JP4182960B2 (en) 2008-11-19

Family

ID=37691421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005185445A Expired - Fee Related JP4182960B2 (en) 2005-06-24 2005-06-24 Image processing apparatus and image processing program for binarization processing

Country Status (1)

Country Link
JP (1) JP4182960B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6175915B2 (en) * 2013-06-05 2017-08-09 セイコーエプソン株式会社 Printing apparatus, printing method, program, and image processing apparatus
JP6358417B2 (en) * 2013-08-20 2018-07-18 セイコーエプソン株式会社 Printing apparatus and printing method
JP6759938B2 (en) * 2016-09-29 2020-09-23 セイコーエプソン株式会社 Image processing equipment, image processing methods, and computer programs

Also Published As

Publication number Publication date
JP2007006271A (en) 2007-01-11

Similar Documents

Publication Publication Date Title
JP4634292B2 (en) Image processing apparatus, image processing method, and program for causing computer to execute the method
JP3360391B2 (en) Image processing apparatus and image processing method
US7620255B2 (en) Image processor and image processing program for binary processing
JP3313399B2 (en) Image processing device
US8477324B2 (en) Image processor and image processing method that uses s-shaped gamma curve
US5353127A (en) Method for quantization gray level pixel data with extended distribution set
US6011878A (en) Image processing method and apparatus
US5805738A (en) Image processing apparatus and method
US6233360B1 (en) Method and system for hybrid error diffusion processing of image information using adaptive white and black reference values
JPH1093820A (en) Error spread system and error spread method
JP4182960B2 (en) Image processing apparatus and image processing program for binarization processing
JP4182959B2 (en) Image processing apparatus and image processing program for binarization processing
JP4342560B2 (en) Image processing method, image processing apparatus, computer program, and recording medium
JPH11196271A (en) Image data conversion method, device and recording medium recording image data conversion program and readable by computer
JP6836726B2 (en) Image processing device
JP4537211B2 (en) Image processing apparatus, image processing method, program causing computer to execute the method, image forming apparatus, and computer-readable recording medium recording the program
JPH118769A (en) Density adjustment method and device using the same
JP3685148B2 (en) Image processing apparatus and method
KR100381651B1 (en) Apparatus for processing color halftoning
JP3679522B2 (en) Image processing method and apparatus
JP2004304814A (en) Image processing unit and method
JP3207888B2 (en) Image processing device
JP2008228106A (en) Image processor, image processing method, program, recording medium and image forming apparatus
JP2738865B2 (en) Image processing device
JPH09298663A (en) Gradation converter

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080513

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080711

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080812

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080825

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees