JP2002290731A - Image processing method - Google Patents

Image processing method

Info

Publication number
JP2002290731A
JP2002290731A JP2001086557A JP2001086557A JP2002290731A JP 2002290731 A JP2002290731 A JP 2002290731A JP 2001086557 A JP2001086557 A JP 2001086557A JP 2001086557 A JP2001086557 A JP 2001086557A JP 2002290731 A JP2002290731 A JP 2002290731A
Authority
JP
Japan
Prior art keywords
pixel
error
value
target pixel
pixels
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
JP2001086557A
Other languages
Japanese (ja)
Inventor
Hironobu Masuoka
広宣 枡岡
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.)
Mutoh Industries Ltd
Original Assignee
Mutoh Industries 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 Mutoh Industries Ltd filed Critical Mutoh Industries Ltd
Priority to JP2001086557A priority Critical patent/JP2002290731A/en
Publication of JP2002290731A publication Critical patent/JP2002290731A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an error diffusion method that allows easily acquiring high quality image data. SOLUTION: In the image processing method for binarizing pixels of image data represented by multi-valued gradation values or converting them to a predetermined plurality of values with a predetermined threshold as a criterion, when value pluralizing, each pixel of multi-valued image data is scanned in reversed right and left direction for each line, a target pixel is binarized, and an error between the binarized value and an original value is calculated. The error of the pixel to be binarized is distributed to a pixel toward the front of scanning direction and a pixel toward the rear and on the skew of the scanning direction in a predetermined ratio of the targeted pixels. The distribution ratio of the error is one second for the front pixel of the error, while one second for the rear and skew of the error.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、多値画像データの
各画素の階調値を2値などの所定の複数値で出力し、複
数値化対象画素の誤差を他の画素に拡散するようにした
画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for outputting the gradation value of each pixel of multi-valued image data as a predetermined plural value such as a binary value, and diffusing an error of the pixel to be multi-valued to another pixel. The present invention relates to an image processing method described above.

【0002】[0002]

【従来の技術】従来、多くの階調をもつ画像データを2
値化するための方法としてディザ法と誤差拡散方式が知
られている。誤差拡散方式は、最も基本的には多階調の
ピクセル(画素)データを2値化する方法である。例え
ば、1ピクセルを256段階で表現するイメージを、1
ピクセルを2段階(インクジェットプリンタ的に言えば
ドットを打つか打たないか)で表現するイメージに変換
する方法である。
2. Description of the Related Art Conventionally, image data having many gradations is
A dither method and an error diffusion method are known as methods for converting the value. The error diffusion method is basically a method of binarizing multi-gradation pixel data. For example, an image representing one pixel in 256 levels is represented by 1
This is a method of converting a pixel into an image that is expressed in two stages (in terms of an ink jet printer, whether or not to hit a dot).

【0003】ピクセルの値が0〜127の場合、基本的
には「0」にし、ピクセルの値が128〜255の場
合、基本的には「255」にする。この「255」は一
般的には「1」と表現する。このように、単純に1,0
に変換だけすると、その変換したときの元になった数値
と、変換された後の値との間には誤差が生じる。この誤
差をそれぞれ2値化処理の対象となっているピクセルの
周りのピクセルに振る即ち分配して、対象ピクセルの誤
差を周りのピクセルに拡散している。従来の誤差拡散法
には、走査方向を右に向けて一方向に移動するときに、
誤差の10分の3を次(右)のピクセルに、10分の7
を真下のピクセルに分配する方法や、誤差の16分の7
を次(右)のピクセルに、16分の5を真下のピクセル
に、16分の3を左下のピクセルに、16分の1を右下
のピクセルに分配する方式が知られている。
When the pixel value is 0 to 127, the value is basically "0". When the pixel value is 128 to 255, the value is basically "255". This “255” is generally expressed as “1”. Thus, simply 1,0
If only the conversion is performed, an error occurs between the original numerical value at the time of the conversion and the converted value. These errors are respectively distributed or distributed to pixels around the pixel to be binarized, and the error of the target pixel is diffused to surrounding pixels. In the conventional error diffusion method, when the scanning direction is moved in one direction to the right,
3/10 of the error to the next (right) pixel, 7/10
To the pixel directly below, or 7/16 of the error
Is distributed to the next (right) pixel, 5/16 to the pixel immediately below, 3/16 to the lower left pixel, and 1/16 to the lower right pixel.

【0004】また、特開平3−151762号公報や特
開平4−37256号公報や特開平11−88685号
公報には、走査方向を交互又はランダムに変更させる方
法が開示されている。また、特開昭63−155952
号公報のように、注目画素の周辺画素に対する2値化に
よる誤差の配分比率を一定とせず、画素処理とともに複
数組の配分係数セットの中から選択して用いる方法や、
更に複雑な方法をとる特開平8−228284号公報に
記載されたものなど、多数の誤差拡散方式が提案されて
いる。
Japanese Patent Application Laid-Open Nos. Hei 3-151762, Hei 4-37256 and Hei 11-88685 disclose a method of alternately or randomly changing a scanning direction. Also, JP-A-63-155952
As disclosed in Japanese Patent Application Laid-Open Publication No. H10-157, a method of selecting and using a plurality of distribution coefficient sets together with pixel processing without making the distribution ratio of error by binarization of a target pixel to peripheral pixels constant,
Many error diffusion systems have been proposed, such as the one described in JP-A-8-228284, which takes a more complicated method.

【0005】[0005]

【発明が解決しようとする課題】誤差拡散の方式がシン
プルであると、画像に縞模様の発生が多くなり、逆に複
雑に処理をすれば、それは解消されてくるが画像の処理
に時間がかかってしまうという問題点が生じる。また、
従来の通常の誤差拡散法では、出力画像の斜め右下方向
に不自然な傾向が発生するという問題点があった。本発
明は、上記問題点を解決することを目的とするものであ
る。
If the error diffusion method is simple, the occurrence of stripes in the image will increase. Conversely, if the processing is complicated, it will be eliminated, but it will take time to process the image. There is a problem that it takes place. Also,
The conventional ordinary error diffusion method has a problem that an unnatural tendency occurs in the diagonally lower right direction of the output image. An object of the present invention is to solve the above problems.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、多値階調値で表現される画像データの画
素を所定の閾値を基準として2値化或いは所定の複数値
化するとき、複数値化の対象画素の変換後の値と元の値
との誤差を演算し、この誤差を他の画素に分配し対象画
素の誤差を拡散する画像処理方法であって、多値画像デ
ータの各画素の走査を各ライン毎に方向を左右反転させ
て走査し、複数値化の対象画素の前記誤差を所定の比率
で、走査方向に向かって対象画素の前方の画素と、対象
画素の後方側斜め下の画素に分配するようにしたもので
ある。また本発明は、前記誤差の分配比率が、前方の画
素に対して前記誤差の2分の1、後方側斜め下の画素に
対して前記誤差の2分の1であることを特徴とするもの
である。
In order to achieve the above object, the present invention binarizes a pixel of image data expressed by a multi-valued gradation value into a predetermined value or a predetermined value based on a predetermined threshold value. An image processing method for calculating an error between a converted value of a target pixel for multi-value conversion and an original value, distributing this error to other pixels, and diffusing the error of the target pixel, comprising: The scanning of each pixel of the data is performed by inverting the direction of each line for each line, and the error of the target pixel to be multi-valued is determined at a predetermined ratio by a pixel in front of the target pixel in the scanning direction and a target pixel. Are distributed to pixels obliquely below the rear side. Further, the present invention is characterized in that the distribution ratio of the error is one half of the error with respect to the front pixel, and is one half of the error with respect to the pixel obliquely below the rear side. It is.

【0007】[0007]

【発明の実施の形態】以下に本発明の実施の形態を添付
した図面を参照して詳細に説明する。図7において、
(6)は画像処理装置として機能するコンピュータのC
PU(中央演算処理装置)とコンピュータに格納された
画像処理プログラムとで構成される誤差拡散処理部、
(7)は、各画素ごとに3値以上の階調値を表現できる
画像データを記憶するための多値画像メモリ、(8)は
誤差拡散処理部(6)で2値化された画像データを記憶
する2値画像メモリ、(9)は、2値化画素の誤差を一
時記憶する誤差バッファメモリである。
Embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In FIG.
(6) is a computer C functioning as an image processing device.
An error diffusion processing unit including a PU (Central Processing Unit) and an image processing program stored in a computer;
(7) is a multi-valued image memory for storing image data capable of expressing three or more gradation values for each pixel, and (8) is image data binarized by the error diffusion processing unit (6). Is an error buffer memory for temporarily storing the error of the binarized pixel.

【0008】誤差拡散処理部(6)は、多値画像メモリ
(7)から読み出した、注目する画素の階調値を、多値
画像データ(10)の各ラインごとに上から順番に、各
ラインの左端から右端に向けて走査し、走査位置が画像
データ(10)の右端に達すると、図1(A)に示すよ
うに、今度は走査方向を反転させ、次ラインを、右端か
ら左端に向けて左方向に走査する。誤差拡散処理部
(6)はこの走査を繰り返し、画像データ(10)の終
端に達するまで行う。
[0008] The error diffusion processing unit (6) reads the gradation value of the pixel of interest read from the multi-valued image memory (7) in order from the top for each line of the multi-valued image data (10). The scanning is performed from the left end to the right end of the line, and when the scanning position reaches the right end of the image data (10), the scanning direction is reversed this time as shown in FIG. Scan leftward toward. The error diffusion processing unit (6) repeats this scanning until the end of the image data (10) is reached.

【0009】図1(A)において、(12)は、第1ラ
インの走査方向を示し、(14)は、第2ラインの走査
方向を示している。本発明では、右方向に画素を走査す
る場合と、左方向に画素を走査する場合とでは、誤差を
振る即ち分配する画素が異なる。まず、右方向に画素を
走査する場合について説明する。図2は多値画像データ
の一部分であり、注目画素とその周辺画素を示してい
る。(X)は注目画素である。
In FIG. 1A, (12) shows the scanning direction of the first line, and (14) shows the scanning direction of the second line. According to the present invention, the pixels to which the error is assigned, that is, the pixels to be distributed are different between the case where the pixels are scanned rightward and the case where the pixels are scanned leftward. First, a case where pixels are scanned in the right direction will be described. FIG. 2 shows a part of the multi-valued image data, showing a target pixel and its surrounding pixels. (X) is the pixel of interest.

【0010】注目画素(X)の左隣の画素(1)は、図
3に示すように、既に2値化処理済みであり、階調値
(A)も既に決定済みである。注目画素(X)の真下の
画素(4)とその右隣の画素(5)に対しては、注目画
素(X)の誤差の分配が行われない。そのため、画素
(4)(5)の階調値(D)(E)には変化がない。誤
差拡散処理部(6)は、多値画像メモリ(7)から注目画素
(X)の階調値を読み出し、誤差バッファメモリ(9)からそ
の注目画素(X)に与える誤差値を読み出す。そして、そ
の2つの値を加算しそれと閾値とを比較して、大きけれ
ば階調値「1」、そうでなければ階調値「0」とする。
As shown in FIG. 3, the pixel (1) on the left of the target pixel (X) has already been binarized, and the gradation value (A) has already been determined. The error of the pixel of interest (X) is not distributed to the pixel (4) immediately below the pixel of interest (X) and the pixel (5) on the right side thereof. Therefore, the gradation values (D) and (E) of the pixels (4) and (5) do not change. The error diffusion processing unit (6) reads the pixel of interest from the multi-valued image memory (7).
The gradation value of (X) is read, and the error value given to the target pixel (X) is read from the error buffer memory (9). Then, the two values are added and compared with the threshold value. If the two values are larger, the gradation value is “1”, and if not, the gradation value is “0”.

【0011】このように2値化した階調値は、2値画像メ
モリ(8)に記録する。この2値化によって生じる元の階調
値との誤差は、図1(B)及び図3に示すようにその2分の1
を前方(右)の画素(2)に、残りの2分の1を後方(左)下の
画素(3)に分配する。この各画素に分配する誤差値は、
誤差バッファメモリ(9)に記録する。各画素に誤差値を
分配するということは、具体的には、次のように各画素
の階調値を変更することである。例えば、階調値が0〜2
55の256段階である多値画像において、図4に示すよう
に、注目画素(X)の誤差分配済みの階調値が90、画
素(2)の階調値が98、画素(3)の階調値が92、
画素(4)の階調値が100、画素(5)の階調値が1
36とし、閾値が128だとすると、注目画素(X)
は、2値化変換後「0」になる。
The binarized gradation values are recorded in the binary image memory (8). The error from the original gradation value caused by this binarization is one half that as shown in FIG. 1 (B) and FIG.
Is distributed to the front (right) pixel (2), and the remaining half is distributed to the rear (left) lower pixel (3). The error value distributed to each pixel is
Record in the error buffer memory (9). Distributing the error value to each pixel specifically means changing the gradation value of each pixel as follows. For example, if the gradation value is 0-2
As shown in FIG. 4, in the multi-valued image having 256 stages of 55, the target pixel (X) has an error-distributed gradation value of 90, the pixel (2) has a gradation value of 98, and the pixel (3) has a gradation value of 98. The gradation value is 92,
The gradation value of the pixel (4) is 100, and the gradation value of the pixel (5) is 1
If the threshold value is 128 and the threshold value is 128, the pixel of interest (X)
Becomes “0” after the binarization conversion.

【0012】この変換後の値「0」と元の値90との差
「+90」を2分の1ずつ、画素(2)(3)に分配す
る。その結果、画素(2)の値は、98+[90×(1
/2)]=143、画素(3)の値は、92+[90×
(1/2)]=137となる。画素(4)(5)の値
は、そのままである。同様に、走査方向が、右から左に
向かって左方向に行われる場合は、図1(C)及び図5
に示すように、注目画素(X)の誤差の2分の1が前方
(左)の画素(1)に、残りの2分の1が注目画素
(X)の後方側斜め下の画素(5)に分配される。
The difference "+90" between the converted value "0" and the original value 90 is distributed to the pixels (2) and (3) by half. As a result, the value of the pixel (2) is 98+ [90 × (1
/ 2)] = 143, and the value of pixel (3) is 92+ [90 ×
(1/2)] = 137. The values of the pixels (4) and (5) remain as they are. Similarly, when the scanning direction is performed from left to right from right to left, FIGS.
As shown in the figure, one half of the error of the target pixel (X) is in the front (left) pixel (1), and the remaining half is in the pixel (5) obliquely below the target pixel (X). ).

【0013】例えば、図6に示すように、注目画素(X)の
誤差配分済みの階調値が150、画素(1)の値が98、画素
(3)の値が92、画素(4)の値が100、画素(5)の値が136と
すると、注目画素(X)は、2値化変換後「255」になる。
この変換後の値「255」と元の値150との差「−105」を2
分の1づつ画素(1),(5)に配分する。その結果、画素(1)
の値は、98+[−105×(1/2)]=46、画素
(5)の値は、136+ [−105−(−105×(1/2)] =83と
なる。画素(3),(4)の値は、そのままである。
For example, as shown in FIG. 6, the error-distributed gradation value of the target pixel (X) is 150, the value of the pixel (1) is 98,
Assuming that the value of (3) is 92, the value of pixel (4) is 100, and the value of pixel (5) is 136, the target pixel (X) becomes “255” after the binarization conversion.
The difference “−105” between the converted value “255” and the original value 150 is calculated as 2
Pixels are distributed to pixels (1) and (5) in units of one minute. As a result, pixel (1)
Is 98 + [− 105 × (1 /)] = 46, the pixel
The value of (5) is 136 + [− 105 − (− 105 × (1)]] = 83 The values of the pixels (3) and (4) remain as they are.

【0014】階調値が0〜255の256段階である画素は、2
値化変換後は、0か255の階調値になる。各画素の変換結
果が0の場合「0」を、255の場合「1」を多値画像メモリ
(7)に記録する。上記実施形態において、誤差の2分の
1の分配処理はコンピュータの内部的には、値を横にシ
フトするだけの処理になるので、コンピュータでは比較
的扱いが簡単であり、処理が早くなる。なお、本実施形
態は、注目画素を2値化した場合の誤差拡散処理につい
て説明したが、この2値化に特に限定されるものではな
く、4値化その他の場合にも適用することができる。
Pixels having 256 gradation levels from 0 to 255 are 2
After the value conversion, the gradation value becomes 0 or 255. If the conversion result of each pixel is 0, set "0"; if it is 255, set "1".
Record in (7). In the above-described embodiment, since the distribution processing of 誤差 of the error is processing in which only the value is shifted horizontally in the computer, the processing is relatively easy and the processing is relatively quick in the computer. In the present embodiment, the error diffusion processing when the target pixel is binarized has been described. However, the present invention is not particularly limited to this binarization, and can be applied to quaternary and other cases. .

【0015】[0015]

【発明の効果】本発明は上述の如く、双方向に交互に走
査を行うことにより、ある程度対象ピクセルの左右の誤
差を相殺し、対象ピクセルの後方の部分はそれに1番近
い画素である斜め下のピクセルに誤差を割り振ること
で、対象ピクセルの左右のピクセルに誤差を振ったのと
ほぼ同じ処理とすることができ、簡単な方法で高品質の
画像データを得ることができる。また、誤差の配分を2
分の1とすることにより、処理速度を向上できる。
As described above, according to the present invention, by performing scanning alternately in both directions, the right and left errors of the target pixel are offset to a certain extent, and the portion behind the target pixel is the obliquely lower pixel which is the closest pixel to it. By assigning an error to the pixel of the target pixel, the processing can be performed in substantially the same manner as when an error is assigned to the left and right pixels of the target pixel, and high-quality image data can be obtained by a simple method. Also, the distribution of the error is 2
The processing speed can be improved by setting the ratio to one-half.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の説明図である。FIG. 1 is an explanatory diagram of the present invention.

【図2】本発明の説明図である。FIG. 2 is an explanatory diagram of the present invention.

【図3】本発明の説明図である。FIG. 3 is an explanatory diagram of the present invention.

【図4】本発明の説明図である。FIG. 4 is an explanatory diagram of the present invention.

【図5】本発明の説明図である。FIG. 5 is an explanatory diagram of the present invention.

【図6】本発明の説明図である。FIG. 6 is an explanatory diagram of the present invention.

【図7】本発明の機能ブロック説明図である。FIG. 7 is a functional block diagram of the present invention.

【符号の説明】[Explanation of symbols]

1 画素 2 画素 3 画素 4 画素 5 画素 6 誤差拡散処理部 7 多値画像メモリ 8 2値画像メモリ 9 誤差バッファメモリ 10 多値画像データ 12 走査方向 14 走査方向 1 pixel 2 pixel 3 pixel 4 pixel 5 pixel 6 error diffusion processing unit 7 multi-level image memory 8 binary image memory 9 error buffer memory 10 multi-level image data 12 scanning direction 14 scanning direction

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 多値階調値で表現される画像データの画
素を所定の閾値を基準として2値化或いは所定の複数値
化するとき、複数値化の対象画素の変換後の値と元の値
との誤差を演算し、この誤差を他の画素に分配し対象画
素の誤差を拡散する画像処理方法であって、多値画像デ
ータの各画素の走査を各ライン毎に方向を左右反転させ
て走査し、複数値化の対象画素の前記誤差を所定の比率
で、走査方向に向かって対象画素の前方の画素と、対象
画素の後方側斜め下の画素に分配するようにしたことを
特徴とする画像処理方法。
When a pixel of image data represented by a multi-level gradation value is binarized or multi-valued with a predetermined threshold as a reference, a converted value of a multi-valued target pixel and an original value This is an image processing method that calculates an error with the value of the target pixel, distributes this error to other pixels, and diffuses the error of the target pixel. And scanning, the error of the target pixel of the multi-valued is distributed at a predetermined ratio to a pixel in front of the target pixel in the scanning direction and a pixel obliquely below and behind the target pixel. Characteristic image processing method.
【請求項2】 前記誤差の分配比率が、前方の画素に対
して前記誤差の2分の1、後方側斜め下の画素に対して
前記誤差の2分の1であることを特徴とする「請求項
1」に記載の画像処理方法。
2. The method according to claim 1, wherein a distribution ratio of the error is one half of the error with respect to a front pixel, and is one half of the error with respect to a diagonally lower pixel on the rear side. The image processing method according to claim 1.
JP2001086557A 2001-03-26 2001-03-26 Image processing method Pending JP2002290731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001086557A JP2002290731A (en) 2001-03-26 2001-03-26 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001086557A JP2002290731A (en) 2001-03-26 2001-03-26 Image processing method

Publications (1)

Publication Number Publication Date
JP2002290731A true JP2002290731A (en) 2002-10-04

Family

ID=18941915

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001086557A Pending JP2002290731A (en) 2001-03-26 2001-03-26 Image processing method

Country Status (1)

Country Link
JP (1) JP2002290731A (en)

Similar Documents

Publication Publication Date Title
JP4068181B2 (en) Multilevel gradation pixel value level reduction method and system
JP3834901B2 (en) Method for binarizing halftone images
JP2002290731A (en) Image processing method
JPH10341338A (en) Image-binarizing method, image-binarizing device and recording medium
JP4469511B2 (en) Image processing method
JP3539552B2 (en) Image processing device
JP2003110852A (en) Halftone processing method and processor
JP2002325177A (en) Image processing method
JP2007265055A (en) Resolution conversion processing method of binary image
JP2002290734A (en) Image processing method
JPH03151762A (en) Picture processor
JP2000270210A (en) Picture processor
JP2002290733A (en) Image processing method
JP4445150B2 (en) Image processing method
JP4798860B2 (en) Image processing method
JP2608404B2 (en) Image processing device
JP3290867B2 (en) Multi-value data conversion device and multi-value data conversion method
JP2904364B2 (en) Binarization method of gradation image
JP2008306427A (en) Device and method for processing image
JPH05207273A (en) Picture reduction method
JP2966848B2 (en) Image processing method
JPH0965126A (en) Picture processor
JPH08228285A (en) Method and device for processing image
JP2001148783A (en) Image processing unit
JPH09191405A (en) Gradation processing system

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20070822

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091008

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100107