JPH09247444A - Method and device for binarizing image - Google Patents

Method and device for binarizing image

Info

Publication number
JPH09247444A
JPH09247444A JP8047295A JP4729596A JPH09247444A JP H09247444 A JPH09247444 A JP H09247444A JP 8047295 A JP8047295 A JP 8047295A JP 4729596 A JP4729596 A JP 4729596A JP H09247444 A JPH09247444 A JP H09247444A
Authority
JP
Japan
Prior art keywords
pixel
binarization
pixel value
error
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.)
Granted
Application number
JP8047295A
Other languages
Japanese (ja)
Other versions
JP3552180B2 (en
Inventor
Kunio Ikuta
国男 生田
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP04729596A priority Critical patent/JP3552180B2/en
Publication of JPH09247444A publication Critical patent/JPH09247444A/en
Application granted granted Critical
Publication of JP3552180B2 publication Critical patent/JP3552180B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate moire in the case of binarizing a dot image and to speed up processing time. SOLUTION: As to an error caused by binarizing a noted picture element, some picture elements before binarization and in existence in the vicinity of the noted picture element are selected as error sum object picture elements. When the result of binarizing the noted picture element is zero, a maximum value smaller than an upper limit of a picture element value range is selected from an error sum object picture element as a sum object. Then the error is added to the picture element. When the result of binarizing the noted picture element is 1, a minimum value larger than a lower limit of the picture element value range is selected from the error sum object picture element as a sum object. Then the error is added to the picture element. The shape as dots is maintained by adding the error caused in the noted picture element to unprocessed picture elements before binarization in existence in the vicinity of the noted picture element in this way and no moire is produced. When the addition of the error generated from the noted picture element is finished, since the binarization processing with respect to the noted picture element is finished, high speed processing is attained.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、画素の配列とし
て与えられた原画像を、画像出力装置に出力し得る2値
の複製画像信号に変換する画像の2値化方法および装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image binarization method and device for converting an original image given as an array of pixels into a binary duplicated image signal that can be output to an image output device.

【0002】[0002]

【従来の技術】従来、いったん記録された網点画像を走
査して読取り、得られた画像信号から再び2値信号を得
るためには、走査して得られたアナログ画像信号値を一
定のしきい値と比較し、単純に2値化する方式が採られ
ていた。この単純2値化方式においては、原画像そのも
のが有する濃淡周期と走査周期との干渉により、いわゆ
るモアレと呼ばれる干渉縞が発生し、記録画像の品質を
損なう原因となっていた。
2. Description of the Related Art Conventionally, in order to obtain a binary signal again from the obtained image signal by scanning and reading a once recorded halftone image, the analog image signal value obtained by scanning is fixed. A method of simply binarizing was used in comparison with the threshold value. In this simple binarization method, interference between the grayscale period and the scanning period of the original image itself causes interference fringes called so-called moire, which is a cause of impairing the quality of the recorded image.

【0003】そしてこのようなモアレを除去する方法と
して、特公平1−29349号などに開示された方法が
知られている。
As a method for removing such moire, the method disclosed in Japanese Patent Publication No. 1-29349 is known.

【0004】[0004]

【発明が解決しようとする課題】特公平1−29349
号などに開示された技術は、網点画像などの濃度の周期
性をもつ原画を走査し、2値化された画像信号を得るに
際しては、一度マトリクス走査によって画素値の再配分
を行っておき、その後各画素について2値化を行わなけ
ればならない。したがってこのような従来の技術は、2
段階の処理を必要とするため、処理が完了するまでに多
大な時間を要する欠点を有している。
[Problems to be Solved by the Invention] Japanese Patent Publication No. 1-29349
In the technique disclosed in Japanese Patent Laid-Open Publication No. 2000-242242, an original image having a periodicity of density such as a halftone dot image is scanned, and when a binarized image signal is obtained, pixel values are redistributed once by matrix scanning. , Then, each pixel must be binarized. Therefore, such a conventional technique has two problems.
Since it requires processing in stages, it has a drawback that it takes a lot of time to complete the processing.

【0005】この発明は、上記のような課題に鑑み、モ
アレを良好に除去するとともに、高速に処理が行える画
像の2値化方法および装置を提供することを目的とす
る。
In view of the above problems, it is an object of the present invention to provide an image binarization method and apparatus capable of satisfactorily removing moire and performing high-speed processing.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の発明
は、画素の配列として与えられた原画像から注目画素を
順次に選択して2値化し、2値化後の論理レベルに対応
する画素値からの2値化前の画素値の誤差を前記注目画
素の近辺の2値化前画素の画素値に加算しつつ、前記原
画像の各画素についての2値化を行う方法であって、注
目画素の近辺に存在する複数の2値化前画素のうち、前
記注目画素の2値化後の画素値に近い画素値を有する画
素よりも遠い画素値を有する画素に優先的に前記誤差を
加算するようにしている。
According to a first aspect of the present invention, a target pixel is sequentially selected from an original image given as an array of pixels to be binarized, which corresponds to the logic level after binarization. A method of performing binarization for each pixel of the original image while adding the error of the pixel value before binarization from the pixel value to the pixel value of the pre-binarization pixel in the vicinity of the target pixel Among the plurality of pre-binarized pixels existing in the vicinity of the pixel of interest, the error is preferentially given to a pixel having a pixel value farther than a pixel having a pixel value close to the pixel value of the pixel of interest after binarization. Is added.

【0007】請求項2に記載の発明は、請求項1の方法
において、前記複数の2値化前画素のうち、前記注目画
素の2値化後の論理レベルに対応する画素値から遠い画
素値を有する順に加算候補画素の順序を指定し、前記順
序に従って指定された第1加算候補画素の画素値が、前
記加算によって前記原画像の画像値に許容される所定の
画素値レンジを越えるときには、前記誤差のうち前記第
1加算候補画素について前記画素値レンジを越える部分
を、前記順序において次の候補となる第2加算候補画素
に繰り越して加算するようにしている。
According to a second aspect of the present invention, in the method of the first aspect, among the plurality of pre-binarized pixels, a pixel value far from a pixel value corresponding to a binarized logical level of the target pixel. When the pixel value of the first addition candidate pixel specified according to the order exceeds a predetermined pixel value range allowed for the image value of the original image by the addition, A portion of the error that exceeds the pixel value range for the first addition candidate pixel is carried over to the second addition candidate pixel that is the next candidate in the order.

【0008】請求項3に記載の発明は、請求項2の方法
において、前記2値化後の論理レベルは1または0であ
り、前記注目画素についての前記2値化後の論理レベル
が1であるときには、前記複数の2値化前画素のうち、
画素値の昇順で前記加算候補画素の順序を指定し、前記
注目画素についての前記2値化後の論理レベルが0であ
るときには、前記複数の2値化前画素のうち、画素値の
降順で前記加算候補画素の順序を指定するようにしてい
る。
According to a third aspect of the present invention, in the method of the second aspect, the logic level after the binarization is 1 or 0, and the logic level after the binarization for the target pixel is 1. In one case, among the plurality of pre-binarized pixels,
When the order of the addition candidate pixels is specified in the ascending order of pixel values and the logic level after the binarization of the target pixel is 0, the pixel values in the descending order of the pixel values among the plurality of pre-binarization pixels are set. The order of the addition candidate pixels is specified.

【0009】請求項4に記載の発明は、請求項1ないし
請求項3のいずれかの方法において、前記原画像は、網
点画像を光電的に読取って得られた画像である。
According to a fourth aspect of the present invention, in the method according to any one of the first to third aspects, the original image is an image obtained by photoelectrically reading a halftone dot image.

【0010】請求項5に記載の発明は、画素の配列とし
て与えられた原画像を画素ごとに2値化する装置であっ
て、前記画素の配列から選択された注目画素の画素値を
2値化する2値化手段と、前記注目画素について、2値
化後の論理レベルに対応する画素値からの2値化前の画
素値の誤差を算出する誤差算出手段と、前記注目画素の
近辺に存在し、かつまだ前記2値化の対象となっていな
い複数の画素の中のうち、前記注目画素の2値化後の論
理レベルに対応する画素値から遠い画素値を有する順序
に従って特定画素を選択する特定画素選択手段と、前記
特定画素の画素値に前記誤差を加算することにより、前
記特定画素の前記画素値を更新する誤差加算手段と、前
記原画像の各画素を前記注目画素として順次に選択して
前記2値化の対象とするとともに、新たに選択された注
目画素が、前記特定画素として既に前記加算を受けた後
のものである場合には、前記更新を受けた後の画素値に
基づいて前記2値化を行う2値化繰返し手段と、を備え
ている。
According to a fifth aspect of the present invention, there is provided an apparatus for binarizing an original image given as an array of pixels for each pixel, wherein the pixel value of a target pixel selected from the array of pixels is binary. Binarizing means for binarizing, error calculating means for calculating the error of the pixel value before binarization from the pixel value corresponding to the logic level after binarization for the target pixel, and in the vicinity of the target pixel. Among a plurality of pixels that are present and have not yet been binarized, a specific pixel is selected according to an order having a pixel value far from a pixel value corresponding to the logic level of the pixel of interest after binarization. Specific pixel selecting means for selecting, error adding means for updating the pixel value of the specific pixel by adding the error to the pixel value of the specific pixel, and each pixel of the original image as the target pixel in order. Select the target of the binarization In addition, if the newly selected pixel of interest is the pixel after the addition as the specific pixel, the binarization is performed based on the pixel value after the update 2 And binarizing and repeating means.

【0011】請求項6に記載の発明は、請求項5の装置
において、前記特定画素選択手段は、前記複数の2値化
前画素のうち、前記注目画素の2値化後の論理レベルに
対応する画素値から遠い順に加算候補画素の順序を決定
する順序決定手段と、前記順序に従って指定された第1
加算候補画素の画素値が前記加算によって前記原画像の
画像値に許容される所定の画素値レンジを越えるとき
に、前記誤差のうち前記第1加算候補画素について前記
画素値レンジを越える部分を、前記順序において次の候
補となる第2加算候補画素に繰り越して加算する繰越し
加算手段を有している。
According to a sixth aspect of the present invention, in the apparatus according to the fifth aspect, the specific pixel selection means corresponds to the logic level of the target pixel after binarization among the plurality of pre-binarization pixels. Ordering means for deciding the order of the addition candidate pixels in the order distant from the pixel value to be processed, and the first order specified according to the order.
When the pixel value of the addition candidate pixel exceeds a predetermined pixel value range allowed for the image value of the original image by the addition, a portion of the error that exceeds the pixel value range of the first addition candidate pixel, It has a carry-over addition means for carrying over and adding to the second addition candidate pixel which is the next candidate in the above order.

【0012】請求項7に記載の発明は、請求項6の装置
において、前記2値化後の論理レベルは1または0であ
り、前記順序決定手段が、前記注目画素についての前記
2値化後の論理レベルが1であるときに、前記複数の2
値化前画素のうち、画素値の昇順で前記加算候補画素の
順序を決定する手段と、前記注目画素についての前記2
値化後の論理レベルが0であるときに、前記複数の2値
化前画素のうち、画素値の降順で前記加算候補画素の順
序を決定する手段と、を有している。
According to a seventh aspect of the present invention, in the apparatus according to the sixth aspect, the logic level after the binarization is 1 or 0, and the order determining means after the binarization for the pixel of interest. When the logic level of 1 is 1, the plurality of 2
Means for determining the order of the addition candidate pixels in ascending order of pixel values among the pre-valued pixels;
And a means for determining the order of the addition candidate pixels in descending order of the pixel value among the plurality of pre-binarized pixels when the logic level after the binarization is 0.

【0013】請求項8に記載の発明は、請求項5ないし
請求項7のいずれかの装置において、前記原画像は、網
点画像を光電的に読取って得られた画像である。
The invention described in claim 8 is the apparatus according to any one of claims 5 to 7, wherein the original image is an image obtained by photoelectrically reading a halftone image.

【0014】[0014]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

<全体構成>図1はこの発明の実施の一形態を示すブロ
ック図である。図1の画像入力装置1としては、網点画
像として記録された原画像を走査することによって光電
的な読取りを行うものであり、この実施の形態ではイメ
ージスキャナなどを使用している。また画像出力装置4
としては、この実施の形態ではインクジェットプリンタ
ーなどを使用している。画像入力装置1によって原画像
を画素毎に読取り、得られた画像信号は多階調のデジタ
ル信号としてメモリー3に格納される。CPU2はこの
格納された画像信号を画素毎に読み出して2値化を行
う。ここでCPU2によってメモリー3から読み出さ
れ、その時点で2値化の対象となっている画素を注目画
素と呼ぶ。注目画素の2値化の結果およびそれに伴う誤
差の補償結果(後述)は、再びメモリー3に格納され
る。そして画像信号のすべての画素について2値化が完
了すると、この2値画像信号を画像出力装置4に転送す
るように構成されている。
<Overall Structure> FIG. 1 is a block diagram showing an embodiment of the present invention. As the image input device 1 of FIG. 1, an original image recorded as a halftone image is scanned for photoelectric reading, and an image scanner or the like is used in this embodiment. Also, the image output device 4
In this embodiment, an ink jet printer or the like is used. The original image is read for each pixel by the image input device 1, and the obtained image signal is stored in the memory 3 as a multi-tone digital signal. The CPU 2 reads the stored image signal for each pixel and binarizes it. Here, the pixel read from the memory 3 by the CPU 2 and being binarized at that time is called a target pixel. The binarization result of the pixel of interest and the error compensation result (described later) associated therewith are stored in the memory 3 again. Then, when the binarization is completed for all the pixels of the image signal, the binary image signal is transferred to the image output device 4.

【0015】<2値化と誤差配分の原理>画像入力装置
1で網点画像を読取って、得られた多値の画像信号は図
2のようになる。この図2は画像信号を構成する画素の
配列を示す図であり、原画像における1個の網点Pを読
み取ったときの各画素の信号値(画素値)を示してい
る。なお、この実施の形態において、画素値のダイナミ
ックレンジ(画素値レンジ)は0から255である。図
2に示すように、1つの画素(例えば第2行,第2列の
画素)全体が網点Pに覆われる場合は、その画素値は2
55となる。これに対し、1つの画素(例えば第0行,
第0列の画素)と網点Pとが交わる部分が全く存在しな
い場合は、その画素値は0となる。また、1つの画素
(例えば第0行,第1列の画素)において網点Pと交わ
る部分が存在する場合、その画素値は、画素全体の面積
と、網点Pと交わる部分の面積との割合に対応した値と
なる。なお、以下の説明において、第m行,第n列
(m,nはともに0または自然数)の画素を示すとき
は、画素(m,n)とする。
<Principle of Binarization and Error Distribution> A multi-valued image signal obtained by reading a halftone image with the image input apparatus 1 is as shown in FIG. FIG. 2 is a diagram showing an array of pixels forming an image signal, and shows a signal value (pixel value) of each pixel when one halftone dot P in the original image is read. In this embodiment, the dynamic range of pixel values (pixel value range) is 0 to 255. As shown in FIG. 2, when one pixel (for example, the pixel in the second row and the second column) is entirely covered with the halftone dot P, the pixel value is 2
55. On the other hand, one pixel (for example, the 0th row,
If there is no portion where the pixel in the 0th column) and the halftone dot P intersect, the pixel value becomes 0. When there is a portion that intersects with the halftone dot P in one pixel (for example, the pixel in the 0th row and the first column), the pixel value is the area of the entire pixel and the area of the portion that intersects with the halftone dot P. It becomes a value corresponding to the ratio. In the following description, a pixel in the m-th row and the n-th column (m and n are both 0 or a natural number) is a pixel (m, n).

【0016】はじめ、図2に示す画像信号において注目
画素を画素(0,0)とする。注目画素は画素(0,
0)から図中のXの方向(主走査方向)に順次移動し、
原画像を2値化していく。注目画素が画素(0,n)ま
で到達したときは、注目画素を1つY方向(副走査方
向)に移動させ、再び第0列から主走査方向Xに順次2
値化していく。このように注目画素を走査させ、画素
(m,n)の2値化が完了すれば、全画素の2値化が完
了する。
First, in the image signal shown in FIG. 2, the pixel of interest is pixel (0,0). The pixel of interest is a pixel (0,
From 0) in the X direction (main scanning direction) in the figure,
The original image is binarized. When the pixel of interest reaches the pixel (0, n), the pixel of interest is moved by one in the Y direction (sub-scanning direction), and again from the 0th column in the main scanning direction X.
It will be valued. When the target pixel is scanned in this way and the binarization of the pixel (m, n) is completed, the binarization of all the pixels is completed.

【0017】この発明の実施形態において実際に注目画
素を2値化する場合、2値化のしきい値として128を
使用する。このため2値化前の画素値が画素値レンジの
50%未満(この実施形態の場合127以下)であると
すると、2値化した結果は0となり、2値化前の画素値
レンジでは0に対応する。また2値化前の画素値が画素
値レンジの50%以上(この実施形態の場合128以
上)であるとすると、2値化した結果は1となり、2値
化前の画素値レンジでは255に対応する。
When the pixel of interest is actually binarized in the embodiment of the present invention, 128 is used as the binarization threshold value. Therefore, if the pixel value before binarization is less than 50% of the pixel value range (127 or less in this embodiment), the result of binarization is 0, and 0 in the pixel value range before binarization. Corresponding to. If the pixel value before binarization is 50% or more of the pixel value range (128 or more in this embodiment), the binarization result is 1 and the pixel value range before binarization is 255. Correspond.

【0018】2値化した結果において生ずる誤差をつぎ
のように定める。つまり、誤差をE,注目画素の2値化
前の画素値をSとしたときで、2値化した結果が0のと
きは、 E=S であり、同じく2値化した結果が1のときは、 E=S−255 である。ここで図2でいくつかの例を考える。注目画素
が画素(0,1)のとき、画素値が15であるため、2
値化した結果は0になる。しかしこの場合、もともとこ
の画素が保有していた15の情報が欠落したことにな
る。これがすなわち誤差であり、ここでの誤差Eは+1
5となる。つぎに、注目画素が画素(1,1)のとき、
画素値が180であるため、2値化した結果は1にな
る。この場合は、もともとこの画素が保有していた18
0の情報よりも75が余分に加わったことになる。すな
わち誤差Eは−75となる。注目画素の2値化前の画素
値が0または255のときは、誤差Eは勿論0である。
The error generated in the binarized result is determined as follows. That is, when the error is E and the pixel value of the pixel of interest before binarization is S, and the binarization result is 0, E = S, and when the binarization result is 1 Is E = S-255. Consider now some examples in FIG. When the pixel of interest is pixel (0, 1), the pixel value is 15, so 2
The digitized result is 0. However, in this case, 15 pieces of information originally held by this pixel are lost. This is the error, and the error E here is +1
It becomes 5. Next, when the pixel of interest is pixel (1, 1),
Since the pixel value is 180, the binarized result is 1. In this case, this pixel originally had 18
It means that 75 is added more than 0 information. That is, the error E is -75. When the pixel value of the pixel of interest before binarization is 0 or 255, the error E is of course 0.

【0019】2値化によって発生した誤差は、原画像に
含まれていた信号を失ったり、余分な信号を付加したり
しているため、原画像における網点が変形することにな
る。したがって、この誤差を注目画素の近辺に存在する
2値化前の画素に加算することによって、網点の変形を
少なくすることができる。すなわち注目画素を2値化し
た結果、原画像に含まれていた信号の一部を失った場合
は、注目画素の近辺に存在する2値化前の画素に失った
信号分だけ加え、また原画像に含まれない余分な信号が
加わった場合は、注目画素の近辺に存在する2値化前の
画素から余分な信号分を減じることになる。なお後者の
場合の減算は、「マイナスの符号を持つ誤差の加算」と
等価であるため、このような誤差の補償は一般に「誤差
の加算」と考えることができる。
The error generated by the binarization loses the signal contained in the original image or adds an extra signal, so that the halftone dots in the original image are deformed. Therefore, by adding this error to the pixel before binarization existing in the vicinity of the pixel of interest, it is possible to reduce the deformation of the halftone dots. That is, when a part of the signal included in the original image is lost as a result of binarizing the pixel of interest, only the lost signal is added to the pixel before binarization existing in the vicinity of the pixel of interest and the original signal is added. When an extra signal not included in the image is added, the extra signal is subtracted from the pixel before binarization existing in the vicinity of the pixel of interest. Since the subtraction in the latter case is equivalent to “addition of error having a minus sign”, such error compensation can be generally considered as “addition of error”.

【0020】この実施の形態では、図3(a)に示すよ
うに注目画素の近辺に存在する2値化前の画素を4画素
とし、誤差の加算対象としている。注目画素が主走査方
向Xまたは副走査方向Yに走査していくと、この誤差の
加算対象の数は当然変化する。図3(b)は注目画素が
第0列(ただし画素(m,0)は除く)に位置するとき
の誤差の加算対象を示し、図3(c)は注目画素が第n
列(ただし画素(m,n)は除く)に位置するときの誤
差の加算対象である。図3(d)は注目画素が第m行
(ただし画素(m,n)は除く)に位置するときである
が、この場合は2値化前の画素が1つしかないため、必
然的に誤差の加算もその画素が対象となる。また図3
(e)は注目画素が画素(m,n)であるときである
が、この場合は全画素について2値化が完了しているた
め、ここで発生する誤差は捨てるものとする。なお、図
3(b)〜(e)は原画像の画素の中では例外的なもの
であるため、図3(a)の場合を中心として考えること
ができる。
In this embodiment, as shown in FIG. 3A, the pixels before binarization existing in the vicinity of the pixel of interest are 4 pixels, and the error is to be added. When the pixel of interest scans in the main scanning direction X or the sub scanning direction Y, the number of error addition targets naturally changes. FIG. 3B shows an addition target of the error when the pixel of interest is located in the 0th column (excluding the pixel (m, 0)), and FIG. 3C shows that the pixel of interest is the nth pixel.
It is the addition target of the error when it is located in the column (excluding the pixel (m, n)). FIG. 3D shows the case where the pixel of interest is located in the m-th row (excluding the pixel (m, n)). However, in this case, there is only one pixel before binarization, so it is inevitable. The pixel is also targeted for the addition of the error. FIG.
(E) is when the pixel of interest is the pixel (m, n). In this case, since the binarization is completed for all the pixels, the error generated here is discarded. Note that FIGS. 3B to 3E are exceptional among the pixels of the original image, so that the case of FIG. 3A can be mainly considered.

【0021】つぎに誤差の加算について説明する。図4
(a)は、注目画素Zaと、その近辺に存在する2値化
前の4画素Z1,Z2,Z3,Z4との画素値の例であ
る。注目画素Zaの画素値は192であり、2値化前の
4画素Z1,Z2,Z3,Z4は、それぞれ224,1
60,32,96である。このとき注目画素Zaを2値
化すれば1となり、生ずる誤差は−63である。注目画
素Zaの2値化結果が1のときは、2値化前の4画素Z
1,Z2,Z3,Z4のうちで画素値が最小のものを加
算候補とし、その誤差−63を加算する。そして加算
(具体的には63を減算)を行った結果、加算候補画素
の画素値が画素値レンジの下限値0より小さくなる場合
は、加算候補画素の画素値は下限値0とし、残った誤差
はつぎの加算候補画素に加算する。図4(a)の場合は
画素Z3が最小値32であるので、この画素値に前記の
誤差−63を加算する。そして画素Z3の画素値が0と
なるが、さらに誤差−31が残った状態である。そのた
め残りの2値化前の3画素Z1,Z2,Z4のうちから
同様に最小のものに、残りの誤差−31を加算する。こ
のようにして図4(a)において注目画素Zaを2値化
し、生じた誤差を加算配分した結果を図4(b)に示
す。2値化前の画素Z3,Z4の画素値が更新されてい
る。
Next, the error addition will be described. FIG.
(A) is an example of the pixel value of the pixel of interest Za and the four pixels Z1, Z2, Z3, and Z4 before binarization that exist in the vicinity thereof. The pixel value of the pixel of interest Za is 192, and the four pixels Z1, Z2, Z3, and Z4 before binarization are 224 and 1 respectively.
60, 32, 96. At this time, if the pixel of interest Za is binarized, the value becomes 1, and the resulting error is -63. When the binarization result of the pixel of interest Za is 1, 4 pixels Z before binarization
Among Z1, Z2, Z3 and Z4, the one having the smallest pixel value is set as the addition candidate, and the error -63 is added. Then, as a result of addition (specifically, subtracting 63), when the pixel value of the addition candidate pixel is smaller than the lower limit value 0 of the pixel value range, the pixel value of the addition candidate pixel is set to the lower limit value 0 and remains. The error is added to the next addition candidate pixel. In the case of FIG. 4A, since the pixel Z3 has the minimum value 32, the error −63 is added to this pixel value. Then, the pixel value of the pixel Z3 becomes 0, but the error -31 still remains. Therefore, the remaining error of −31 is added to the smallest one of the remaining three pixels Z1, Z2, and Z4 before binarization. FIG. 4B shows the result of binarizing the pixel of interest Za in FIG. 4A and adding and distributing the generated error in this way. The pixel values of the pixels Z3 and Z4 before binarization are updated.

【0022】さらに図5(a)について考える。注目画
素Zbの画素値は64であり、2値化前の4画素Z5,
Z6,Z7,Z8は、それぞれ160,224,32,
96である。このとき注目画素Zbを2値化すれば0と
なり、生ずる誤差は64である。注目画素Zbの2値化
結果が0のときは、2値化前の4画素Z5,Z6,Z
7,Z8のうちで画素値が最大のものを加算候補画素と
し、その誤差64を加算する。そして加算を行った結
果、加算候補画素の画素値が画素値レンジの上限値25
5より大きくなる場合は、加算候補画素の画素値は上限
値255とし、残った誤差をつぎの加算候補画素に加算
する。図5(a)の場合は画素Z6が最大値224であ
るので、この画素値に前記の誤差64を加算する。そし
て画素Z6の画素値が255となるが、さらに誤差33
が残った状態である。そのため残りの2値化前の3画素
Z5,Z7,Z8のうちから同様に最大のものに、残り
の誤差33を加算する。このようにして図5(a)にお
いて注目画素Zbを2値化し、生じた誤差を加算配分し
た結果を図5(b)に示す。2値化前の画素Z5,Z6
の画素値が更新されている。
Further, consider FIG. 5A. The pixel value of the target pixel Zb is 64, and the 4 pixel Z5 before binarization
Z6, Z7, and Z8 are 160, 224, 32, and
96. At this time, if the pixel of interest Zb is binarized, it becomes 0, and the resulting error is 64. When the binarization result of the target pixel Zb is 0, the four pixels Z5, Z6, Z before binarization
Of Z7 and Z8, the pixel having the largest pixel value is set as an addition candidate pixel, and the error 64 thereof is added. Then, as a result of the addition, the pixel value of the addition candidate pixel is the upper limit value 25 of the pixel value range.
When it becomes larger than 5, the pixel value of the addition candidate pixel is set to the upper limit value 255, and the remaining error is added to the next addition candidate pixel. In the case of FIG. 5A, since the pixel Z6 has the maximum value 224, the error 64 is added to this pixel value. Then, the pixel value of the pixel Z6 becomes 255, but the error 33
Is the state that remains. Therefore, the remaining error 33 is similarly added to the largest one of the remaining three pixels Z5, Z7, and Z8 before binarization. FIG. 5B shows the result of binarizing the pixel of interest Zb in FIG. 5A in this way and adding and distributing the generated error. Pixels Z5 and Z6 before binarization
The pixel value of has been updated.

【0023】なお、このような誤差配分を進めて行った
結果として、配分すべき誤差がまだ残っているにもかか
わらず、加算候補画素として4画素を使い切ってしまっ
た場合には、その誤差はつぎに2値化を行う画素に加算
する。この結果つぎに2値化を行う画素の画素値は、画
素値レンジからオーバーフロー(255より大きい値)
もしくはアンダーフロー(0より小さい値)してもよ
い。すなわち、つぎに2値化を行う画素の画素値は、画
素値レンジとは関係なく任意の値となり得る。これは注
目画素の近辺において情報の欠落をなるべく小さくする
ためであるため、注目画素が第n列であるときは適用し
ない。
As a result of advancing the error distribution as described above, when four pixels are used up as addition candidate pixels even though there are still errors to be distributed, the error is Is added to the pixel to be binarized. As a result, the pixel value of the pixel to be binarized next overflows from the pixel value range (value larger than 255).
Alternatively, underflow (value smaller than 0) may be performed. That is, the pixel value of the pixel to be binarized next can be any value regardless of the pixel value range. This is to reduce information loss in the vicinity of the pixel of interest as much as possible, and thus is not applied when the pixel of interest is in the n-th column.

【0024】<具体例>ここでこの発明に基づき2値化
処理を行っていく過程において、個々の画素の画素値が
更新されていく様子を説明する。図2に示す画像信号か
ら第0行から第4行,第0列から第5列の範囲に位置す
る画素について考え、その他の画素は存在しないものと
する。
<Specific Example> Here, a state in which the pixel value of each pixel is updated in the process of performing the binarization processing according to the present invention will be described. Consider the pixels located in the range from the 0th row to the 4th row and the 0th column to the 5th column from the image signal shown in FIG. 2, and it is assumed that other pixels do not exist.

【0025】◎注目画素(0,0) まず、注目画素が画素(0,0)であるとき、画素値は
0であるから、2値化の結果は0である。ここでの誤差
は0であるから他の画素は更新されない。この2値化の
結果を図6に示す。
◎ Target pixel (0, 0) First, when the target pixel is the pixel (0, 0), the pixel value is 0, so the binarization result is 0. Since the error here is 0, other pixels are not updated. The result of this binarization is shown in FIG.

【0026】◎注目画素(0,1) つぎに注目画素が画素(0,1)に移動する。このと
き、画素値は15であるから、2値化の結果は0とな
り、15の誤差が発生する。この誤差の加算の対象とな
る画素は画素(0,2),画素(1,0),画素(1,
1),画素(1,2)の4画素であり、このうちで画素
値が最大のものは画素(1,2)である。しかし画素
(1,2)は画素値が255であり、画素値レンジの上
限値である。このため画素(1,2)には誤差の加算を
行えないため、画素(0,2),画素(1,0),画素
(1,1)のうちで画素値が最大のものに加算を行う。
ここでは画素(1,1)が画素値180であり最大であ
るため、加算候補となり、誤差である15が加算され
る。この処理の結果を図7に示す。
[Pixel of interest (0, 1)] Next, the pixel of interest moves to pixel (0, 1). At this time, since the pixel value is 15, the binarization result is 0, and an error of 15 occurs. Pixels for which this error is added are pixel (0, 2), pixel (1, 0), pixel (1,
1) and pixel (1, 2), and the pixel having the largest pixel value is pixel (1, 2). However, the pixel value of the pixel (1, 2) is 255, which is the upper limit value of the pixel value range. For this reason, it is not possible to add an error to the pixel (1, 2), so that the pixel having the largest pixel value among the pixel (0, 2), the pixel (1, 0), and the pixel (1, 1) is added. To do.
Here, the pixel (1, 1) has the maximum pixel value of 180, and thus is a candidate for addition, and an error of 15 is added. The result of this process is shown in FIG.

【0027】◎注目画素(0,2) つぎに注目画素が画素(0,2)に移動する。この画素
値は121であるから、2値化の結果は0であり、12
1の誤差が発生する。まず第1に加算候補画素となる画
素(1,1)に、誤差121のうち60が加算され画素
(1,1)の画素値は255になる。残った誤差61は
第2の加算候補である画素(0,3)に加算される。こ
の処理の結果を図8に示す。
[Pixel of interest (0, 2)] Next, the pixel of interest moves to pixel (0, 2). Since this pixel value is 121, the binarization result is 0,
An error of 1 occurs. First, 60 of the error 121 is added to the pixel (1,1) that is the addition candidate pixel, and the pixel value of the pixel (1,1) becomes 255. The remaining error 61 is added to the pixel (0, 3) that is the second addition candidate. The result of this processing is shown in FIG.

【0028】◎注目画素(0,3) つぎに注目画素が画素(0,3)に移る。この画素値が
222であるため、2値化の結果は1となり、誤差は−
33となる。この誤差は画素(0,4),画素(1,
2),画素(1,3),画素(1,4)のうち画素値が
最小である画素(0,4)に加算される。その結果、画
素(0,4)の画素値は120と更新される。この処理
の結果を図9に示す。
◎ Target pixel (0, 3) Next, the target pixel moves to the pixel (0, 3). Since this pixel value is 222, the binarization result is 1 and the error is −
33. This error is due to pixel (0,4), pixel (1,
2), the pixel (1, 3), and the pixel (1, 4) are added to the pixel (0, 4) having the smallest pixel value. As a result, the pixel value of the pixel (0,4) is updated to 120. The result of this processing is shown in FIG.

【0029】◎注目画素(0,4) つぎに注目画素が画素(0,4)に移動する。この画素
値が120であるため、2値化の結果は0であり、誤差
は120である。この誤差は画素(1,3),画素
(1,4)の画素値が255であるため、画素(1,
5)に加算される。この処理の結果を図10に示す。
[Pixel of interest (0,4)] Next, the pixel of interest moves to pixel (0,4). Since this pixel value is 120, the binarization result is 0 and the error is 120. This error has a pixel value of 255 for pixel (1,3) and pixel (1,4).
5) is added. The result of this processing is shown in FIG.

【0030】◎注目画素(0,5) つぎに注目画素が画素(0,5)に移動する。この画素
値が16であるため、2値化の結果は0であり、誤差は
16である。この場合、加算の対象となり得るのは画素
(1,4)と画素(1,5)の2画素しか存在しない
が、この2つのうちで画素(1,5)の方が小さいため
に、この画素に誤差が加算される。この結果を図11に
示す。
◎ Target pixel (0, 5) Next, the target pixel moves to the pixel (0, 5). Since this pixel value is 16, the binarization result is 0 and the error is 16. In this case, only two pixels, pixel (1,4) and pixel (1,5), can be added, but pixel (1,5) is the smaller of these two pixels. The error is added to the pixel. The result is shown in FIG.

【0031】◎以後の処理 以上で第0行の2値化が完了するが、続いて第1行から
第4行まで同様の処理を施すことによって、すべての画
素につて2値化を行う。その結果を図12に示す。図1
2で画素(4,5)を2値化した結果、その画素の右に
示すように−47の誤差が発生するが、この誤差は加算
対象が存在しないためつぎに2値化を行う画素に加算す
る。このようにして2値化処理が完了したことになる
が、図12に示すように、2値化結果が1であるもの
は、まとまった塊を形成し、2値化結果が0であるもの
は、いくつか接合した塊を形成している。このことは、
すなわち原画像の網点としての形状が良好に保たれてい
ること示す。
(2) Subsequent processing Although the binarization of the 0th row is completed as described above, the same processing is subsequently performed from the 1st row to the 4th row to binarize all the pixels. FIG. 12 shows the result. FIG.
As a result of binarizing the pixel (4, 5) in 2, an error of -47 occurs as shown on the right of the pixel, but since this error does not exist in the addition target, the pixel to be binarized next to add. Although the binarization process is completed in this way, as shown in FIG. 12, a binarization result of 1 forms a cluster and a binarization result of 0 is obtained. Form several joined masses. This means
That is, it indicates that the shape of the original image as a halftone dot is well maintained.

【0032】<装置における処理フロー>つぎに図1の
CPU2が行う処理のフローを図13,図14に示す。
図13は全画素について2値化を行うための処理全体の
流れである。図14は、図13の誤差の加算配分(ステ
ップS5)の処理について、詳解したフローチャートで
ある。
<Processing Flow in Device> Next, FIGS. 13 and 14 show a processing flow performed by the CPU 2 of FIG.
FIG. 13 is a flow of the whole processing for binarizing all pixels. FIG. 14 is a flowchart illustrating in detail the process of adding and distributing the error (step S5) in FIG.

【0033】まず図13において、ステップS1で注目
画素を画素(0,0)にし、ステップS2で注目画素を
2値化したときに発生する誤差の加算対象となる画素の
画素値を読み出す。そしてステップS3により注目画素
の2値化を行い、ステップS4で注目画素の画素値を2
値化結果に更新する。そしてステップS5で誤差の加算
配分が行われる。図14より、ステップS10で注目画
素を2値化した結果発生した誤差Eを算出し、ステップ
11でこの誤差Eが0であるか判定する。E=0なら誤
差の加算配分(ステップS5)の処理は終了であるが、
誤差Eが0でないならステップS12に処理が移る。
First, in FIG. 13, the pixel of interest is set to pixel (0, 0) in step S1, and the pixel value of the pixel to which the error generated when the pixel of interest is binarized is added is read out in step S2. Then, the target pixel is binarized in step S3, and the pixel value of the target pixel is set to 2 in step S4.
Update to the quantification result. Then, in step S5, the additional distribution of the error is performed. From FIG. 14, an error E generated as a result of binarizing the target pixel is calculated in step S10, and it is determined in step 11 whether this error E is 0 or not. If E = 0, the process of the additional distribution of error (step S5) is completed,
If the error E is not 0, the process proceeds to step S12.

【0034】ステップS12では、誤差Eが0以上かど
うか判定する。誤差EがE>0なら、ステップS13で
誤差の加算対象画素のうち画素値が254以下のものを
抽出し、抽出されなければ(ステップS14)、誤差を
つぎに2値化を行う画素(次画素)に加算し(ステップ
S21)、誤差の加算配分処理(ステップS5)は終了
する。抽出できていれば、そのうちからさらに画素値が
最大であるものを選び出す(ステップS15)。そして
その画素に255を上限として誤差Eを加算し、更新す
る(ステップS16)。そして再びステップS11に処
理を戻す。またステップS12で誤差EがE>0でない
なら、ステップS17で誤差の加算対象画素のうち画素
値が1以上のものを抽出し、抽出されなければ(ステッ
プS18)、誤差をつぎに2値化を行う画素(次画素)
に加算し(ステップS21)、誤差の加算配分処理(ス
テップS5)は終了する。抽出できていれば、そのうち
からさらに画素値が最小であるものを選び出す(ステッ
プS19)。そしてその画素に0を下限として誤差Eを
加算し、更新する(ステップS20)。そして先と同様
にステップS11に処理を戻す。このような流れで誤差
の加算配分(ステップS5)を行っている。
In step S12, it is determined whether the error E is 0 or more. If the error E is E> 0, in step S13, pixels with a pixel value of 254 or less are extracted from the error addition target pixels, and if not extracted (step S14), the pixel to be binarized with the error (next Pixels) (step S21), and the error addition and distribution process (step S5) ends. If it has been extracted, the one with the maximum pixel value is further selected (step S15). Then, the error E is added to the pixel with 255 being the upper limit, and the pixel is updated (step S16). Then, the process is returned to step S11 again. If the error E is not E> 0 in step S12, the pixel whose pixel value is 1 or more is extracted from the error addition target pixels in step S17. If not extracted (step S18), the error is then binarized. Pixel (Next pixel)
(Step S21), and the error addition and distribution process (step S5) ends. If the pixel values have been extracted, the one with the smallest pixel value is selected (step S19). Then, the error E is added to the pixel with the lower limit being 0, and the pixel is updated (step S20). Then, similar to the above, the process is returned to step S11. With such a flow, the error is added and distributed (step S5).

【0035】図13に戻り、ステップS5が終了すれ
ば、ステップS6,S7またはステップS8,S9によ
って注目画素を走査していく。そして全画素について2
値化が完了すればすべての処理は終了する。
Returning to FIG. 13, when step S5 is completed, the pixel of interest is scanned in steps S6, S7 or steps S8, S9. And 2 for all pixels
When the value conversion is completed, all the processing is completed.

【0036】ここまでの説明では、注目画素の近辺に存
在する2値化前の画素であり誤差の加算の対象となり得
る画素として、図3(a)に示すような4画素を選んだ
が、図15に示す斜線部分のように12画素を選んでも
よい。また注目画素の近辺に存在する2値化前の画素で
あれば、他の画素構成でもよい。
In the above description, four pixels as shown in FIG. 3A are selected as the pixels existing in the vicinity of the target pixel before binarization and which can be the targets of error addition. Twelve pixels may be selected as indicated by the shaded area in FIG. Further, other pixel configurations may be used as long as they are pixels before binarization existing near the target pixel.

【0037】<処理の一般化>以上、この発明の実施の
形態について説明したが、このような処理を一般化する
と次のようになる。
<Generalization of Processing> The embodiment of the present invention has been described above. The generalization of such processing is as follows.

【0038】すなわち、図4の例では、注目画素Zaの
2値化によって生じる誤差: E=192−255=−63 を、注目画素Zaの近辺に存在する複数の2値化前画素
Z1〜Z4のうち、 ・その注目画素Zaの2値化後の画素値255(出力論
理レベル=1)に近い画素値を有する画素(Z1=22
4など)よりも、 ・遠い画素値を有する画素(Z3=32など)へ優先的
に加算する。
That is, in the example of FIG. 4, the error caused by binarization of the pixel of interest Za: E = 192−255 = −63 is set to a plurality of pre-binarized pixels Z1 to Z4 existing in the vicinity of the pixel of interest Za. Of these, a pixel (Z1 = 22) having a pixel value close to the pixel value 255 (output logic level = 1) after binarization of the target pixel Za.
4), etc.-Preferentially adding to a pixel having a far pixel value (Z3 = 32, etc.).

【0039】具体的には、注目画素Zaの2値化後の画
素値255から遠い画素値を有する順(32,96,
…)に加算候補画素の順序を指定する。そして、上記順
序に従って指定された第1加算候補画素(Z3=32)
の画素値が、誤差−63の加算によって画素値レンジ0
〜255を越える(この場合は0より小さくなる)場合
は、誤差−63のうちこのレンジを越える部分−31
を、上記順序において次の候補となる第2候補画素Z4
の画素値96に加算する。
Specifically, in the order of the pixel values far from the binarized pixel value 255 of the pixel of interest Za (32, 96,
...) designates the order of addition candidate pixels. Then, the first addition candidate pixel (Z3 = 32) designated in the above order
The pixel value of the
If it exceeds ~ 255 (less than 0 in this case), the part of error -63 that exceeds this range -31
Is the second candidate pixel Z4 which is the next candidate in the above order.
To the pixel value 96 of.

【0040】図5の場合にも、同様の表現をすることが
できる。すなわち、注目画素Zbの2値化によって生じ
る誤差: E=64−0=64 を、注目画素Zbの近辺に存在する複数の2値化前画素
Z5〜Z8のうち、 ・その注目画素Zbの2値化後の画素値0(出力論理レ
ベル=0)に近い画素値を有する画素(Z7=32な
ど)よりも、 ・遠い画素値を有する画素(Z6=224など)へ優先
的に加算する。
The same expression can be used in the case of FIG. That is, an error caused by binarization of the pixel of interest Zb: E = 64-0 = 64, among the plurality of pre-binarization pixels Z5 to Z8 existing in the vicinity of the pixel of interest Zb: 2 of the pixel of interest Zb Pixels having pixel values close to the pixel value 0 (output logic level = 0) after binarization (Z7 = 32, etc.) are preferentially added to pixels having far pixel values (Z6 = 224, etc.).

【0041】具体的には、注目画素Zbの2値化後の画
素値0から遠い画素値を有する順(224,160,
…)に加算候補画素の順序を指定する。そして、上記順
序に従って指定された第1加算候補画素(Z6=22
4)の画素値が、誤差64の加算によって画素値レンジ
0〜255を越える(この場合は255より大きくな
る)場合は、誤差64のうちこのレンジを越える部分3
3を、上記順序において次の候補となる第2候補画素Z
5の画素値160に加算する。
Specifically, in the order of the pixel values farther from the pixel value 0 after binarization of the target pixel Zb (224, 160,
...) designates the order of addition candidate pixels. Then, the first addition candidate pixel (Z6 = 22) designated according to the above order.
When the pixel value of 4) exceeds the pixel value range of 0 to 255 (in this case, becomes larger than 255) due to the addition of the error 64, the portion 3 of the error 64 that exceeds this range 3
3 is the second candidate pixel Z which is the next candidate in the above order.
5 is added to the pixel value 160.

【0042】以上のように、この発明は、「注目画素の
2値化によって生じる誤差(E)を、注目画素の近辺に
存在する複数の2値化前画素のうち、その注目画素の2
値化後の論理レベル(0または1)に対応する画素値
(0または255)に近い画素値を有する画素よりも、
遠い画素値を有する画素へ優先的に加算する」という形
で一般的に表現可能である。ただし、ここで括弧内はダ
イナミックレンジが0〜255である場合についての例
示である。
As described above, according to the present invention, "the error (E) caused by the binarization of the target pixel is determined to be 2 of the target pixel among the plurality of pre-binarized pixels existing in the vicinity of the target pixel.
Pixels having a pixel value closer to the pixel value (0 or 255) corresponding to the logic level (0 or 1) after binarization,
It can be generally expressed in the form of "addition is preferentially applied to pixels having distant pixel values". However, the values in the parentheses are examples of the case where the dynamic range is 0 to 255.

【0043】[0043]

【発明の効果】請求項1または請求項5に記載の発明に
よれば、2値化の結果が例えば1となった場合は、その
近辺の画素でなるべく0が増えるように誤差を配分して
いる。このため2値化の前後において、整合性が良好に
保たれている。
According to the invention described in claim 1 or 5, when the binarization result is 1, for example, the error is distributed so that 0 is increased in the pixels in the vicinity thereof. There is. Therefore, good consistency is maintained before and after binarization.

【0044】さらに請求項2,請求項3,請求項6およ
び請求項7に記載の発明によれば、誤差の加算によって
加算候補画素が画素値レンジを越えた場合でも、誤差は
切り捨てられず次の加算候補画素に加算されるため、発
生した誤差で、失われる誤差信号を極力小さくしてい
る。このため請求項1または請求項5に記載の場合より
も2値化前後における整合性がさらに良好に保たれる。
Further, according to the inventions of claim 2, claim 3, claim 6 and claim 7, even if the addition candidate pixel exceeds the pixel value range due to the addition of the error, the error is not truncated and Since it is added to the addition candidate pixel of, the error signal lost due to the generated error is minimized. For this reason, the consistency before and after the binarization can be maintained even better than in the case of claim 1 or claim 5.

【0045】すなわち上記結果として、網点としての形
状を維持することができ、モアレが発生しない。
That is, as a result of the above, the shape as a halftone dot can be maintained, and moire does not occur.

【0046】また注目画素を2値化することにより発生
した誤差の加算配分が完了すれば、その時点で注目画素
に対する2値化処理は完了するため、高速な処理が可能
となる。
Further, if the addition and distribution of the error generated by binarizing the pixel of interest is completed, the binarization process for the pixel of interest is completed at that point, so high-speed processing is possible.

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

【図1】この発明の実施の形態を示すブロック図であ
る。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】画像信号を構成する画素の配列を示す図であ
る。
FIG. 2 is a diagram showing an array of pixels forming an image signal.

【図3】この発明の実施の形態における注目画素とその
近辺に存在する2値化前の画素の構成を示す図である。
FIG. 3 is a diagram showing a configuration of a pixel of interest and a pixel before binarization existing in the vicinity thereof according to the embodiment of the present invention.

【図4】2値化結果が1になる場合のその注目画素と、
その近辺に存在する2値化前の4画素との画素値を示す
図である。
FIG. 4 is a pixel of interest when the binarization result is 1, and
It is a figure which shows the pixel value with four pixels before binarization which exist in the vicinity.

【図5】2値化結果が0になる場合のその注目画素と、
その近辺に存在する2値化前の4画素との画素値を示す
図である。
FIG. 5 is a pixel of interest when the binarization result is 0,
It is a figure which shows the pixel value with four pixels before binarization which exist in the vicinity.

【図6】注目画素(0,0)を2値化した結果を示す図
である。
FIG. 6 is a diagram showing a result of binarizing a target pixel (0, 0).

【図7】注目画素(0,1)を2値化した結果を示す図
である。
FIG. 7 is a diagram showing a result of binarizing a target pixel (0, 1).

【図8】注目画素(0,2)を2値化した結果を示す図
である。
FIG. 8 is a diagram showing a result of binarizing a target pixel (0, 2).

【図9】注目画素(0,3)を2値化した結果を示す図
である。
FIG. 9 is a diagram showing a result of binarizing a target pixel (0, 3).

【図10】注目画素(0,4)を2値化した結果を示す
図である。
FIG. 10 is a diagram showing a result of binarizing a pixel of interest (0, 4).

【図11】注目画素(0,5)を2値化した結果を示す
図である。
FIG. 11 is a diagram showing a result of binarizing a pixel of interest (0, 5).

【図12】注目画素(4,5)を2値化した結果を示す
図である。
FIG. 12 is a diagram showing a result of binarizing a pixel of interest (4,5).

【図13】この発明の実施の形態の全体の処理の流れを
示すフローチャートである。
FIG. 13 is a flowchart showing an overall processing flow according to the embodiment of the present invention.

【図14】この発明の実施の形態の誤差の加算配分の処
理の流れを示すフローチャートである。
FIG. 14 is a flowchart showing a flow of processing of error addition and distribution according to the embodiment of the present invention.

【図15】注目画素とその近辺に存在する2値化前の画
素の構成でその他の例を示す図である。
FIG. 15 is a diagram showing another example of the configuration of a pixel of interest and a pixel existing in the vicinity thereof before binarization.

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

P 原画像の網点 X 注目画素の主走査方向 Y 注目画素の副走査方向 1 画像入力装置 2 CPU 3 メモリー 4 画像出力装置 P halftone dot of original image X main scanning direction of target pixel Y sub-scanning direction of target pixel 1 image input device 2 CPU 3 memory 4 image output device

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 画素の配列として与えられた原画像から
注目画素を順次に選択して2値化し、2値化後の論理レ
ベルに対応する画素値からの2値化前の画素値の誤差を
前記注目画素の近辺の2値化前画素の画素値に加算しつ
つ、前記原画像の各画素についての2値化を行う方法で
あって、 注目画素の近辺に存在する複数の2値化前画素のうち、
前記注目画素の2値化後の論理レベルに対応する画素値
に近い画素値を有する画素よりも遠い画素値を有する画
素に優先的に前記誤差を加算することを特徴とする、画
像の2値化方法。
1. An error of a pixel value before binarization from a pixel value corresponding to a logical level after binarization by sequentially selecting a pixel of interest from an original image given as an array of pixels and binarizing it. Is a method of performing binarization for each pixel of the original image while adding to the pixel value of the pre-binarization pixel in the vicinity of the target pixel, wherein a plurality of binarization existing in the vicinity of the target pixel is performed. Of the previous pixel
Binary image, characterized in that the error is preferentially added to a pixel having a pixel value far from a pixel value having a pixel value close to the pixel value corresponding to the logic level of the pixel of interest after binarization. Method.
【請求項2】 請求項1の方法において、 前記複数の2値化前画素のうち、前記注目画素の2値化
後の論理レベルに対応する画素値から遠い画素値を有す
る順に加算候補画素の順序を指定し、 前記順序に従って指定された第1加算候補画素の画素値
が、前記加算によって前記原画像の画像値に許容される
所定の画素値レンジを越えるときには、前記誤差のうち
前記第1加算候補画素について前記画素値レンジを越え
る部分を、前記順序において次の候補となる第2加算候
補画素に繰り越して加算することを特徴とする、画像の
2値化方法。
2. The method according to claim 1, wherein among the plurality of pre-binarization pixels, addition candidate pixels are arranged in the order of having a pixel value far from a pixel value corresponding to the logic level of the pixel of interest after binarization. When the pixel value of the first addition candidate pixel specified by the order exceeds the predetermined pixel value range allowed for the image value of the original image by the addition, the first of the errors is determined. A method for binarizing an image, characterized in that a portion of the addition candidate pixel that exceeds the pixel value range is carried over to the second addition candidate pixel which is the next candidate in the order.
【請求項3】 請求項2の方法において、 前記2値化後の論理レベルは1または0であり、 前記注目画素についての前記2値化後の論理レベルが1
であるときには、前記複数の2値化前画素のうち、画素
値の昇順で前記加算候補画素の順序を指定し、 前記注目画素についての前記2値化後の論理レベルが0
であるときには、前記複数の2値化前画素のうち、画素
値の降順で前記加算候補画素の順序を指定すること、を
特徴とする、画像の2値化方法。
3. The method according to claim 2, wherein the logic level after the binarization is 1 or 0, and the logic level after the binarization for the target pixel is 1.
, The order of the addition candidate pixels is specified in the ascending order of pixel values among the plurality of pre-binarized pixels, and the logic level after binarization of the target pixel is 0.
And the order of the addition candidate pixels is specified in the descending order of pixel values among the plurality of pre-binarized pixels.
【請求項4】 請求項1ないし請求項3のいずれかの方
法において、 前記原画像は、網点画像を光電的に読取って得られた画
像であることを特徴とする、画像の2値化方法。
4. The binarization of an image according to claim 1, wherein the original image is an image obtained by photoelectrically reading a halftone dot image. Method.
【請求項5】 画素の配列として与えられた原画像を画
素ごとに2値化する装置であって、 前記画素の配列から選択された注目画素の画素値を2値
化する2値化手段と、 前記注目画素について、2値化後の論理レベルに対応す
る画素値からの2値化前の画素値の誤差を算出する誤差
算出手段と、 前記注目画素の近辺に存在し、かつまだ前記2値化の対
象となっていない複数の画素の中のうち、前記注目画素
の2値化後の論理レベルに対応する画素値から遠い画素
値を有する順序に従って特定画素を選択する特定画素選
択手段と、 前記特定画素の画素値に前記誤差を加算することによ
り、前記特定画素の前記画素値を更新する誤差加算手段
と、 前記原画像の各画素を前記注目画素として順次に選択し
て前記2値化の対象とするとともに、新たに選択された
注目画素が、前記特定画素として既に前記加算を受けた
後のものである場合には、前記更新を受けた後の画素値
に基づいて前記2値化を行う2値化繰返し手段と、を備
えることを特徴とする、画像の2値化装置。
5. An apparatus for binarizing an original image given as an array of pixels for each pixel, the binarizing unit binarizing a pixel value of a target pixel selected from the array of pixels. Error calculation means for calculating an error of a pixel value before binarization from a pixel value corresponding to the logic level after binarization for the pixel of interest, and the error calculation unit existing in the vicinity of the pixel of interest and still A specific pixel selecting means for selecting a specific pixel according to an order having a pixel value far from a pixel value corresponding to the binarized logic level of the pixel of interest among a plurality of pixels which are not to be binarized; Error adding means for updating the pixel value of the specific pixel by adding the error to the pixel value of the specific pixel, and each pixel of the original image is sequentially selected as the pixel of interest to select the binary value. As well as new If the selected pixel of interest is one that has already been subjected to the addition as the specific pixel, a binarization repeating unit that performs the binarization based on the pixel value after receiving the update. An image binarization device comprising:
【請求項6】 請求項5の装置において、 前記特定画素選択手段は、 前記複数の2値化前画素のうち、前記注目画素の2値化
後の論理レベルに対応する画素値から遠い順に加算候補
画素の順序を決定する順序決定手段と、 前記順序に従って指定された第1加算候補画素の画素値
が前記加算によって前記原画像の画像値に許容される所
定の画素値レンジを越えるときに、前記誤差のうち前記
第1加算候補画素について前記画素値レンジを越える部
分を、前記順序において次の候補となる第2加算候補画
素に繰り越して加算する繰越し加算手段を有することを
特徴とする、画像の2値化装置。
6. The apparatus according to claim 5, wherein the specific pixel selection means adds the plurality of pre-binarized pixels in an order from a pixel value corresponding to a binarized logic level of the pixel of interest. Order determining means for determining the order of the candidate pixels, and when the pixel value of the first addition candidate pixel specified according to the order exceeds a predetermined pixel value range allowed for the image value of the original image by the addition, An image is characterized by further comprising a carry-over addition means for carrying over and adding a portion of the error exceeding the pixel value range for the first addition candidate pixel to the second candidate candidate pixel for addition in the order. Binarization device.
【請求項7】 請求項6の装置において、 前記2値化後の論理レベルは1または0であり、 前記順序決定手段が、 前記注目画素についての前記2値化後の論理レベルが1
であるときに、前記複数の2値化前画素のうち、画素値
の昇順で前記加算候補画素の順序を決定する手段と、 前記注目画素についての前記2値化後の論理レベルが0
であるときに、前記複数の2値化前画素のうち、画素値
の降順で前記加算候補画素の順序を決定する手段と、を
有することを特徴とする、画像の2値化装置。
7. The apparatus according to claim 6, wherein the logic level after the binarization is 1 or 0, and the order determining means sets the logic level after the binarization for the target pixel to be 1.
And a means for determining the order of the addition candidate pixels in the ascending order of the pixel value among the plurality of pre-binarized pixels, and the logic level after the binarization for the target pixel is 0.
And a means for determining the order of the addition candidate pixels in descending order of pixel value among the plurality of pre-binarized pixels.
【請求項8】 請求項5ないし請求項7のいずれかの装
置において、 前記原画像は、網点画像を光電的に読取って得られた画
像であることを特徴とする、画像の2値化装置。
8. The binarization of an image according to claim 5, wherein the original image is an image obtained by photoelectrically reading a halftone dot image. apparatus.
JP04729596A 1996-03-05 1996-03-05 Image binarization method and apparatus Expired - Fee Related JP3552180B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04729596A JP3552180B2 (en) 1996-03-05 1996-03-05 Image binarization method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04729596A JP3552180B2 (en) 1996-03-05 1996-03-05 Image binarization method and apparatus

Publications (2)

Publication Number Publication Date
JPH09247444A true JPH09247444A (en) 1997-09-19
JP3552180B2 JP3552180B2 (en) 2004-08-11

Family

ID=12771302

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04729596A Expired - Fee Related JP3552180B2 (en) 1996-03-05 1996-03-05 Image binarization method and apparatus

Country Status (1)

Country Link
JP (1) JP3552180B2 (en)

Also Published As

Publication number Publication date
JP3552180B2 (en) 2004-08-11

Similar Documents

Publication Publication Date Title
US6052484A (en) Image-region discriminating method and image-processing apparatus
JPS6246105B2 (en)
JPH06276392A (en) Picture processing unit
JP3578878B2 (en) Image processing device
JPH09247444A (en) Method and device for binarizing image
JP2621879B2 (en) Image processing method
JP3539552B2 (en) Image processing device
JP3783815B2 (en) Image processing device
JP2608404B2 (en) Image processing device
JP3512462B2 (en) Black isolated point removal device
JPS60136478A (en) Picture processor
JPH0546749B2 (en)
JPS6348226B2 (en)
JPS6349428B2 (en)
JP3974271B2 (en) Image processing method and image processing apparatus
JP3742227B2 (en) Image data binarization processing circuit and method
JPH05160996A (en) Image processing method
JP3221152B2 (en) Facsimile machine
JPH1155507A (en) Image processor
JPH0950514A (en) Processing method and device for converting picture element density
JPH08265569A (en) Pseudo halftone processor
JPH05145747A (en) Image processor
JPH087090A (en) Method and device for picture processing
JPS6255347B2 (en)
JPH09307756A (en) Image processing unit

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040322

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040423

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20090514

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090514

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees