JPH0583557A - Image processor - Google Patents

Image processor

Info

Publication number
JPH0583557A
JPH0583557A JP3241037A JP24103791A JPH0583557A JP H0583557 A JPH0583557 A JP H0583557A JP 3241037 A JP3241037 A JP 3241037A JP 24103791 A JP24103791 A JP 24103791A JP H0583557 A JPH0583557 A JP H0583557A
Authority
JP
Japan
Prior art keywords
value
address
image
error
line memory
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
JP3241037A
Other languages
Japanese (ja)
Inventor
Eiji Miyakoshi
英司 宮越
Hiroyuki Nakahira
博幸 中平
Masakatsu Maruyama
征克 丸山
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP3241037A priority Critical patent/JPH0583557A/en
Publication of JPH0583557A publication Critical patent/JPH0583557A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide the image processor by an error distributing method reducing the scale of a hardware comparing with the conventional device. CONSTITUTION:This image processor is equipped with a register 2 to store the processed result of a picture element preceding to an objective picture element and a computing element 3 to add a value weighting the processing result of a picture element preceding to the objective picture element for 1H stored in a line memory 4, a value weighting the processed result of a picture element preceding to the objective picture element for (1H+1) and a value weighting the value of the register 2 to the value of the objective picture element, to binarize the added value and to output difference between the added value and the binarized value, and the output of the binarized value from the computing element 3 is defined as an output image.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、より原画像に近い2値
化画像を生成するための擬似諧調表現を用いた画像処理
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus using pseudo gradation expression for generating a binarized image closer to an original image.

【0002】[0002]

【従来の技術】近年、誤差配分法による画像処理装置
は、固定しきい値法などの単純2値化法に比較して原画
像に近い2値化画像を生成するため、プリンタ出力及び
イメ−ジスキャナ−の読み込みの前処理等に用いられて
いる。ここで簡単に誤差配分法について説明すると、2
値化による誤差を周囲画素に配分することにより、その
誤差を周囲画素で吸収すると言ったものである。以下に
従来の誤差配分法に関する画像処理装置について説明す
る(C言語による画像処理 株式会社昭晃堂 安居院
猛)。
2. Description of the Related Art In recent years, an image processing apparatus using the error distribution method generates a binarized image closer to an original image as compared with a simple binarization method such as a fixed threshold method. It is used for pre-processing etc. of reading by the scanner. The error distribution method will be briefly described here.
By allocating the error due to binarization to the surrounding pixels, the error is absorbed by the surrounding pixels. An image processing apparatus relating to the conventional error distribution method will be described below (image processing by C language Shokoido Takeshi Yasuiin).

【0003】図4は従来の誤差配分法による画像処理装
置のブロック図を示すものである。8は、原画像データ
が記憶されている画像メモリである。9は、2値化及び
入力画像と出力画像の差分である誤差値を算出する演算
器である。10は、誤差値を配分する2ラインのライン
メモリである。
FIG. 4 is a block diagram of an image processing apparatus using a conventional error distribution method. An image memory 8 stores original image data. Reference numeral 9 is an arithmetic unit for binarizing and calculating an error value which is a difference between the input image and the output image. Reference numeral 10 is a line memory of two lines for distributing error values.

【0004】図5は従来の画像処理装置のアルゴリズム
を示すフローチャートである。以下図4の画像処理装置
の構成の説明を図5のフローチャートに従って行う。な
お、本説明では、画像データは、0〜255までの値
(8ビットデータ)とし、2値化は255と0の2値と
する。また、しきい値は127とする。図5の51と
は、図4の画像メモリ内の列アドレスm、行アドレスn
(以下これをアドレスAmnと称す。)に記憶されている
対象画素値と図4のラインメモリのアドレスAm0また
は、Am1(画像メモリ内の行アドレスの先頭を0とした
場合、その画像メモリ内の行アドレスが偶数ならAm0
奇数ならAm1)に記憶されている誤差値を図4の演算器
9に読み込み、加算し誤差付加値を算出し、その結果か
らしきい値を引いた値が正であるか、負であるかを判定
するステップである。例えば、誤差付加値が260であ
った場合、しきい値は127であり、正と判定し、誤差
付加値が40であった場合、負と判定することになる。
FIG. 5 is a flowchart showing an algorithm of a conventional image processing apparatus. The configuration of the image processing apparatus in FIG. 4 will be described below according to the flowchart in FIG. In this description, the image data is a value from 0 to 255 (8-bit data), and the binarization is a binary value of 255 and 0. The threshold value is 127. 51 in FIG. 5 is a column address m and a row address n in the image memory of FIG.
(Hereinafter, this is referred to as address A mn .) And the target pixel value stored in the line memory of FIG. 4 or the address A m0 or A m1 (when the head of the row address in the image memory is 0, the image If the row address in memory is even, A m0 ,
If it is an odd number, the error value stored in A m1 ) is read into the arithmetic unit 9 of FIG. 4 and added to calculate the error addition value, and the value obtained by subtracting the threshold value from the result is positive or negative. This is a step of determining whether or not. For example, when the additional error value is 260, the threshold value is 127, and it is determined to be positive, and when the additional error value is 40, it is determined to be negative.

【0005】つぎに、ここで述べたラインメモリに記憶
されている誤差値について説明する。図6は、ラインメ
モリに記憶されている誤差値を説明したものである。図
6の11は図4の画像メモリ8の先頭アドレス付近を示
したもので、12は図4のラインメモリ10を示したも
のである。図6の画像メモリ11のAはアドレスA00
画像データであり、BはアドレスA10の画像データであ
り、CはアドレスA01の画像データであり、Dはアドレ
スA11の画像データである。
Next, the error value stored in the line memory described above will be described. FIG. 6 illustrates the error value stored in the line memory. Reference numeral 11 in FIG. 6 shows the vicinity of the head address of the image memory 8 in FIG. 4, and reference numeral 12 shows the line memory 10 in FIG. In the image memory 11 of FIG. 6, A is image data at address A 00 , B is image data at address A 10 , C is image data at address A 01 , and D is image data at address A 11. ..

【0006】ステップ61は、まず画像メモリのアドレ
スA00即ち、画像データAを図4の演算器9に読み込
み、2値化することを考える。例えばAが200であっ
た場合、しきい値127で2値化すると、2値化の結果
が255となり、55多く見積もったこととなり、周囲
画素へは、−55配分すれば誤差を吸収することができ
る。即ち、−55が誤差となる。逆に、Aが40であっ
た場合、しきい値127で2値化すると、2値化の結果
が0となり、40少なく見積もったこととなり、周囲画
素へは、40配分すれば誤差を吸収することができる。
即ち、40が誤差となる。いま、Aを2値化することに
より発生した誤差をEAとする。次に、ラインメモリの
アドレスA10にEA×3/8を書き込み、ラインメモリ
のアドレスA11にEA×2/8を書き込み、ラインメモ
リのアドレスA01にEA×3/8を書き込み、誤差を周
囲に配分する。
In step 61, first, it is considered that the address A 00 of the image memory, that is, the image data A is read into the arithmetic unit 9 of FIG. 4 and binarized. For example, if A is 200, binarization with the threshold value 127 results in a binarization result of 255, which is an overestimation of 55, and the error is absorbed by allocating −55 to surrounding pixels. You can That is, −55 is an error. On the contrary, when A is 40, if the threshold value 127 is binarized, the binarization result becomes 0, which means that 40 is underestimated. If 40 is distributed to the surrounding pixels, the error is absorbed. be able to.
That is, 40 is an error. Now, the error generated by binarizing A is E A. Next, the address A 10 of the line memory write E A × 3/8, the address A 11 of the line memory write E A × 2/8, writes E A × 3/8 to address A 01 of the line memory , Distribute the error around.

【0007】ステップ62は、まず画像メモリのアドレ
スA10即ち、画像データBとラインメモリのアドレスA
10に記憶されている誤差値EA×3/8を図4の演算器
9に読み込み、加算し誤差付加値を算出する。
In step 62, first, the address A 10 of the image memory, that is, the image data B and the address A of the line memory are used.
The error value E A × 3/8 stored in 10 is read into the arithmetic unit 9 of FIG. 4 and added to calculate the error addition value.

【0008】つぎにステップ61と同様に2値化し、2
値化により発生した誤差値EBを周囲画素に配分するた
めに、ラインメモリのアドレスA20にEB×3/8を書
き込み、アドレスA21にEB×2/8を書き込み、アド
レスA11に既に記憶されている値とEB×3/8を加算
した値を書き込む。
Next, as in step 61, binarization is performed and 2
An error value E B generated by binarization to allocate the surrounding pixels, the line memory of the address A 20 to write the E B × 3/8, writes the E B × 2/8 to address A 21, address A 11 Write the value that is the sum of the value already stored and E B × 3/8.

【0009】ステップ63は、まず画像メモリのアドレ
スA01即ち、画像データCとラインメモリのアドレスA
01に記憶されている誤差値EA×3/8を図4の演算器
9に読み込み、加算し誤差付加値を算出する。つぎにス
テップ61と同様に2値化し、2値化により発生した誤
差値ECを周囲画素に配分するために、ラインメモリの
アドレスA11に既に記憶されている値とEC×3/8を
加算した結果を書き込み、アドレスA00にEC×3/8
を書き込み、アドレスA10にEC×3/8を書き込む。
In step 63, first, the address A 01 of the image memory, that is, the image data C and the address A of the line memory.
The error value E A × 3/8 stored in 01 is read into the arithmetic unit 9 of FIG. 4 and added to calculate the error addition value. Then, in the same manner as in step 61, in order to binarize and distribute the error value E C generated by binarization to the surrounding pixels, the value already stored in the address A 11 of the line memory and E C × 3/8 Write the result of adding and write E C × 3/8 to address A 00
And write E C × 3/8 to address A 10 .

【0010】このような走査を画像メモリのすべての画
素で行えば、画像メモリのアドレスAmnに加算する周囲
から配分された誤差は、ラインメモリのアドレスAm0
たは、Am1(画像メモリ内の行アドレスの先頭を0とし
た場合、その画像メモリ内の行アドレスが偶数なら
m0、奇数ならAm1)に記憶されていることになる。
If such scanning is performed for all pixels in the image memory, the error distributed from the surroundings, which is added to the address A mn of the image memory, becomes the address A m0 or A m1 (in the image memory) of the line memory. If the head of the row address is 0, it is stored in A m0 if the row address in the image memory is even, and in A m1 if it is odd.

【0011】また、ステップ52とは、ステップ51が
正であった場合、2値化の結果として、255を図4の
演算器9が出力し、またステップ51が負であった場
合、2値化の結果として、0を図4の演算器9が出力す
るステップである。また、出力された2値化結果は、図
4の画像メモリのアドレスAmnに記憶する。
Further, the step 52 means that when the step 51 is positive, the arithmetic unit 9 of FIG. 4 outputs 255 as a result of the binarization, and when the step 51 is negative, the binary value is obtained. This is a step in which the arithmetic unit 9 of FIG. 4 outputs 0 as a result of the conversion. The output binarization result is stored in the address A mn of the image memory in FIG.

【0012】次にステップ53は、ステップ51及びス
テップ52で行った2値化による誤差を算出するステッ
プであり、ステップ51の演算結果が正の場合、図4の
演算器は”対象画素値(画像メモリのアドレスAmn)+
誤差値(ラインメモリのアドレスAm0または、Am1)−
255”を算出し、対象画素値の誤差値を得、またステ
ップ51の演算結果が負の場合”図4の演算器は、対象
画素値(アドレスAmn)+誤差値−0”を算出し、対象
画素値の誤差値を得る。
Next, step 53 is a step of calculating an error due to the binarization performed in steps 51 and 52. If the calculation result of step 51 is positive, the calculator of FIG. Image memory address A mn ) +
Error value (line memory address A m0 or A m1 ) −
255 "to obtain the error value of the target pixel value, and when the calculation result of step 51 is negative," the calculator of FIG. 4 calculates the target pixel value (address A mn ) + error value-0 ". , Get the error value of the target pixel value.

【0013】ステップ54とは、画像メモリ内の行アド
レスnが偶数の場合、ラインメモリ上のアドレスA
(m+1)0に”アドレスA(m+1)0に記憶されているデータ+
対象画素の誤差値×3/8”を書き込み、さらにライン
メモリ上のアドレスA(m+1)1に”対象画素の誤差値×2
/8”を書き込み、さらにラインメモリ上のアドレスA
m1に”対象画素の誤差値×3/8”を書き込む。また、
画像メモリ内の行アドレスnが奇数の場合、ラインメモ
リ上のアドレスA(m+1)1に”アドレスA(m+1)1に記憶さ
れている現データ+対象画素の誤差値×3/8”を書き
込み、さらにラインメモリ上のアドレスA(m+1)0に”対
象画素の誤差値×2/8”を書き込み、さらにラインメ
モリ上のアドレスAm0に”対象画素の誤差値×3/8”
を書き込むというステップである。
Step 54 is the address A on the line memory when the row address n in the image memory is an even number.
(m + 1) 0 to "address A (m + 1) 0 is stored in the data +
Write the error value of the target pixel x 3/8 ", and then write the error value of the target pixel x 2 to the address A (m + 1) 1 on the line memory.
/ 8 "is written, and the address A on the line memory is written.
Write “error value of target pixel × 3/8 ” in m1 . Also,
If the row address n in the image memory is odd, the address of the line memory A (m + 1) 1 to "address A (m + 1) error values of the current data + target pixel stored in 1 × 3 / 8 "is written," Error value of target pixel x 2/8 "is written to address A (m + 1) 0 on the line memory, and" Error value of target pixel x 3 is written to address A m0 on the line memory. / 8 "
Is the step of writing.

【0014】上記ステップ51〜ステップ54の処理を
画像メモリ内のアドレスAmnを変化させて、画像全体に
渡って行うのが従来の誤差配分法による画像処理装置で
ある。
An image processing apparatus according to the conventional error distribution method performs the above steps 51 to 54 over the entire image by changing the address A mn in the image memory.

【0015】[0015]

【発明が解決しようとする課題】しかしながら上記の従
来の構成では、ラインメモリを2ライン必要とし、ハー
ドウェア規模が大きくなるという問題点を有していた。
However, the above-mentioned conventional configuration has a problem that two lines of line memory are required and the hardware scale becomes large.

【0016】本発明は上記従来の問題点を解決するもの
で、ハードウェア規模を小さくでき、かつ処理結果が従
来例と同様である画像処理装置を提供することを目的と
する。
An object of the present invention is to solve the above-mentioned conventional problems, and an object thereof is to provide an image processing apparatus in which the hardware scale can be reduced and the processing result is similar to that of the conventional example.

【0017】[0017]

【課題を解決するための手段】この目的を達成するため
に、本発明画像処理装置は、入力画像を2値化する際に
生ずる出力画像と入力画像の差分である誤差値を周囲画
素に配分し、出力画像の劣化を防ぐ誤差配分法による画
像処理装置であって、入力画像をラスタ走査し、対象画
素の処理結果である誤差値を1H分だけ保持するライン
メモリと、対象画素の1つ前の画素の処理結果を記憶す
るレジスタと、対象画素値に、ラインメモリに記憶され
ている対象画素の1H前の画素の処理結果に重み付けし
た値と、対象画素の(1H+1)前の画素の処理結果に
重み付けした値と、レジスタの値に重み付けした値とを
加算し、加算した値を2値化し、加算した値と2値化し
た値との差分を出力とする演算器とを有し、前記演算器
の前記2値化した値の出力を出力画像とするといった特
徴を有している。
In order to achieve this object, an image processing apparatus of the present invention allocates an error value, which is a difference between an output image and an input image, which occurs when binarizing an input image, to surrounding pixels. An image processing apparatus using an error distribution method for preventing deterioration of an output image, which includes a line memory for raster-scanning an input image and holding an error value corresponding to a processing result of a target pixel by 1H and one of the target pixel A register for storing the processing result of the previous pixel, a value obtained by weighting the target pixel value with the processing result of the pixel 1H before the target pixel stored in the line memory, and the pixel of (1H + 1) before the target pixel And a calculator for adding a value obtained by weighting the processing result and a value obtained by weighting the value of the register, binarizing the added value, and outputting a difference between the added value and the binarized value. , The binarization of the computing unit Has characteristics such that the output of the output image.

【0018】[0018]

【作用】この構成によって、従来例では誤差配分法によ
る画像処理装置を実現するためにラインメモリを2ライ
ン必要としたが、本発明の誤差配分法による画像処理装
置では、1ラインのラインメモリと1つのレジスタで実
現することができる。
With this configuration, in the conventional example, two lines of line memory were required to realize the image processing device by the error distribution method, but in the image processing device by the error distribution method of the present invention, a line memory of one line is used. It can be realized by one register.

【0019】[0019]

【実施例】以下本発明の一実施例について、図面を参照
しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0020】図1は、本発明の一実施例における誤差配
分法による画像処理装置のブロック図を示すものであ
る。1は現画像が記憶されている画像メモリである。2
は対象画素の1画素前の誤差値を記憶するレジスタであ
る。3は2値化及び入力画像と出力画像の差分である誤
差値を算出する演算器である。4は誤差値を出力する1
ラインのラインメモリである。
FIG. 1 is a block diagram of an image processing apparatus using an error distribution method according to an embodiment of the present invention. An image memory 1 stores the current image. Two
Is a register for storing the error value of the target pixel one pixel before. Reference numeral 3 is an arithmetic unit for binarizing and calculating an error value which is a difference between the input image and the output image. 4 outputs the error value 1
A line memory for lines.

【0021】図2は本発明の一実施例における画像処理
装置のアルゴリズムを示すフローチャートである。以下
図1の画像処理装置の構成の説明を図2のフローチャー
トに従って行う。なお、本説明では、画像データは、0
〜255までの値(8ビットデータ)とし、2値化は2
55と0の2値とする。また、しきい値は127とす
る。任意のアドレスを列アドレスm、行アドレスn(以
下これをAmnと称する)とする。
FIG. 2 is a flow chart showing the algorithm of the image processing apparatus in one embodiment of the present invention. The configuration of the image processing apparatus in FIG. 1 will be described below with reference to the flowchart in FIG. In this description, the image data is 0
Up to 255 (8-bit data), and binarization is 2
It is a binary value of 55 and 0. The threshold value is 127. An arbitrary address is a column address m and a row address n (hereinafter referred to as A mn ).

【0022】図2のステップ21とは、図1に示した画
像メモリ1のアドレスAmnから画像データ(以下画像デ
ータをaとする。)を演算器3に読み込むことを意味し
ている。
Step 21 in FIG. 2 means that the image data (hereinafter, image data is referred to as a) from the address A mn of the image memory 1 shown in FIG.

【0023】図2のステップ22とは、図1のラインメ
モリ4のアドレスAm0に記憶されている、対象画素のア
ドレスと、列アドレスが同じで行アドレスが1つ前の画
素(アドレスAm(n-1))の誤差値を図1の演算器3に読
み込み、3/8を乗算するステップである(以下乗算さ
れた結果の値をbとする)。
The step 22 in FIG. 2 is the pixel (address A m) that has the same column address and the previous row address as the target pixel address stored in the address A m0 of the line memory 4 in FIG. This is a step of reading the error value of (n-1) ) into the arithmetic unit 3 of FIG. 1 and multiplying by 3/8 (hereinafter, the value of the multiplied result is referred to as b).

【0024】つぎに、ここで述べたラインメモリに記憶
されている誤差値について説明する。図3は、ラインメ
モリに記憶されている誤差値を説明するための図であ
る。5は図1に示した画像メモリの先頭アドレス付近を
示したものである。6は図1に示した1ラインのライン
メモリである。7は図1に示した対象画素の1画素前の
誤差値を記憶しているレジスタである。
Next, the error value stored in the line memory described here will be described. FIG. 3 is a diagram for explaining the error value stored in the line memory. 5 shows the vicinity of the start address of the image memory shown in FIG. Reference numeral 6 is a line memory for one line shown in FIG. Reference numeral 7 is a register that stores an error value one pixel before the target pixel shown in FIG.

【0025】ステップ31は、まず画像メモリのアドレ
スA00即ち、画像データAを図1の演算器に読み込み2
値化することを考える。例えばAが200であった場
合、しきい値127で2値化すると、2値化の結果が2
55となり、55多く見積もったこととなり、周囲画素
へは、−55配分すれば誤差を吸収することができる。
即ち、−55が誤差となる。逆に、Aが40であった場
合、しきい値127で2値化すると、2値化の結果が0
となり、40少なく見積もったこととなり、周囲画素へ
は、40配分すれば誤差を吸収することができる。即
ち、40が誤差となる。いま、Aを2値化することによ
り発生した誤差値をEAとする。次に演算結果EAをレジ
スタに書き込む。
In step 31, first, the address A 00 of the image memory, that is, the image data A is read into the arithmetic unit of FIG.
Think about valuing. For example, if A is 200 and the threshold value 127 is binarized, the binarization result is 2
This is 55, which means that overestimation of 55 is made, and error can be absorbed by allocating −55 to surrounding pixels.
That is, −55 is an error. On the contrary, if A is 40 and the binarization is performed with the threshold value 127, the binarization result is 0.
Therefore, 40 is estimated to be less, and the error can be absorbed by distributing 40 to the surrounding pixels. That is, 40 is an error. Now, let E A be the error value generated by binarizing A. Next, the calculation result E A is written in the register.

【0026】ステップ32は、まず、画像メモリのアド
レスA10即ち、画像データBとステップ31によってレ
ジスタに記憶した画像メモリのアドレスA00の画素の誤
差値EAを図1の演算器3に読み込み、EAに3/8を乗
算し、画像データBを加算した値をステップ31と同様
に2値化し、2値化による誤差値EBを算出する。つぎ
に、ステップ31で書き込まれた誤差値EAをラインメ
モリのアドレスA00に書き込み、誤差値EBをレジスタ
に書き込むというステップである。上記の処理をライン
メモリの行アドレス0の全ての列アドレスに対して、行
った結果がステップ33である。ステップ33のライン
メモリの列アドレスA20の誤差値EEは画像メモリの画
像データEの誤差値であり、EXは画像メモリの画像デ
ータXの誤差値である。
In step 32, first, the address A 10 of the image memory, that is, the image data B and the error value E A of the pixel of the image memory address A 00 stored in the register in step 31 are read into the arithmetic unit 3 of FIG. , E A is multiplied by 3/8 and the value obtained by adding the image data B is binarized in the same manner as in step 31, and an error value E B due to binarization is calculated. Then, the error value E A written in step 31 is written to the address A 00 of the line memory, and the error value E B is written to the register. The result of performing the above processing for all the column addresses of the row address 0 of the line memory is step 33. The error value E E of the column address A 20 of the line memory in step 33 is the error value of the image data E of the image memory, and E X is the error value of the image data X of the image memory.

【0027】ステップ34は、まず、画像メモリのアド
レスA01の画像データCとラインメモリ上のアドレスA
00のEAを図1の演算器3に読み込み、EAに3/8を乗
算し、画像データCを加算した値をステップ31と同様
に2値化し、2値化による誤差値ECをレジスタに書き
込むというステップである。
In step 34, first, the image data C at the address A 01 in the image memory and the address A in the line memory are set.
The 00 E A read to the arithmetic unit 3 in FIG. 1, multiplied by 3/8 to E A, binarizing the value obtained by adding the image data C as in step 31, the error value E C by binarizing It is the step of writing to the register.

【0028】ステップ35は、まず、画像メモリのアド
レスA11の画像データDとラインメモリ上のアドレスA
00の誤差値EAとアドレスA10の誤差値EBとレジスタ上
の誤差値ECを図1の演算器3に読み込み、EAに2/8
を乗算した結果と、EBに3/8を乗算した結果とEC
3/8を乗算した結果と、画像データDを加算した値を
ステップ31と同様に2値化し、2値化による誤差値E
Dを算出する。次にステップ34でレジスタに書き込ま
れた誤差値ECをラインメモリ4のアドレスA00に書き
込み、誤差値EDをレジスタ2に書き込むというステッ
プである。
In step 35, first, the image data D at the address A 11 in the image memory and the address A in the line memory are searched.
00 of the error value E C on the error value E B and the register error values E A and the address A 10 is read to the arithmetic unit 3 in FIG. 1, 2/8 to E A
The result obtained by multiplying E B , the result obtained by multiplying E B by 3/8, the result obtained by multiplying E C by 3/8, and the image data D are binarized in the same manner as in step 31, and binarized. Error value E
Calculate D. Next, in step 34, the error value E C written in the register is written in the address A 00 of the line memory 4, and the error value E D is written in the register 2.

【0029】このような走査を画像メモリのすべての画
素で行えば、画像メモリのアドレスAmnに加算する周囲
画素の誤差は、ラインメモリのアドレスAm0とラインメ
モリのアドレスA(m-1)0とレジスタ7に記憶されている
ことになる。
If such scanning is performed for all the pixels of the image memory, the error of the surrounding pixels added to the address A mn of the image memory is the address A m0 of the line memory and the address A (m-1) of the line memory. It is stored in 0 and the register 7.

【0030】図2のステップ23とは、図1のラインメ
モリ4のアドレスA(m-1)0に記憶されている対象画素の
アドレスに対して、列アドレスが1つ前で、行アドレス
が1つ前の画素(アドレスA(m-1)(n-1))の誤差値を図
1の演算器3に読み込み、2/8を乗算するステップで
ある(以下乗算された結果の値をcとする)。
The step 23 in FIG. 2 is that the column address is one before and the row address is before the address of the target pixel stored in the address A (m-1) 0 of the line memory 4 in FIG. This is a step of reading the error value of the previous pixel (address A (m-1) (n-1) ) into the calculator 3 of FIG. 1 and multiplying it by 2/8 (hereinafter, the value of the multiplied result is c)).

【0031】図2のステップ24とは、図1のレジスタ
2に記憶されている対象画素のアドレスに対して、列ア
ドレスが1つ前で、行アドレスが同じ画素(アドレスA
(m-1 )n)の誤差値を図1の演算器3に読み込み、3/8
を乗算するステップである(以下乗算された結果の値を
dとする)。
The step 24 in FIG. 2 means that the column address is one before and the row address is the same for the target pixel address stored in the register 2 in FIG.
The error value of (m-1 ) n ) is read into the arithmetic unit 3 of FIG.
This is the step of multiplying by (hereinafter, the value of the multiplied result is d).

【0032】図2のステップ25とは、図1の演算器3
により、ステップ21で読み込まれた画像データaとス
テップ22〜24で算出された値(b,c,d)を加算
し誤差付加値を算出するステップである。
Step 25 in FIG. 2 is the operation unit 3 in FIG.
Is a step of adding the image data a read in step 21 and the values (b, c, d) calculated in steps 22 to 24 to calculate the error addition value.

【0033】図2のステップ26とは、図1の演算器3
により、ステップ25で算出された誤差付加値を任意の
しきい値で2値化するステップであり、ステップ27
は、2値化結果を画像メモリのアドレスAmnに書き込む
ステップである。
The step 26 in FIG. 2 is the operation unit 3 in FIG.
Is a step of binarizing the error addition value calculated in step 25 with an arbitrary threshold value by
Is a step of writing the binarized result to the address A mn of the image memory.

【0034】また、ステップ28は、演算器によりステ
ップ25で算出された誤差付加値の誤差値を算出するス
テップであり、ステップ29は、画像メモリのアドレス
(m -1)nにおける画像データに対して、ステップ21〜
ステップ29までの処理を行うことにより、算出された
誤差値をラインメモリのアドレスA(m-1)0に記憶するス
テップである。また、ステップ30は、ステップ28で
算出された誤差付加値の誤差値をレジスタに書き込むス
テップである。
Further, step 28 is a step of calculating the error value of the error addition value calculated in step 25 by the arithmetic unit, and step 29 is the step of converting the image data at the address A (m -1) n of the image memory. On the other hand, steps 21 to
This is a step of storing the calculated error value in the address A (m-1) 0 of the line memory by performing the processing up to step 29. Further, step 30 is a step of writing the error value of the error addition value calculated in step 28 in the register.

【0035】図1に示した画像処理装置により、ステッ
プ21からステップ30までの処理を画像メモリ内のア
ドレスA00からアドレスAMNまで変化させ、行うことに
より本実施例の誤差配分による画像処理がラインメモリ
1つ、レジスタ1つの小規模なハードウェア構成で実現
される。
By the image processing apparatus shown in FIG. 1, the processing from step 21 to step 30 is changed from the address A 00 to the address A MN in the image memory, and the image processing by the error distribution of this embodiment is performed. It is realized by a small-scale hardware configuration with one line memory and one register.

【0036】[0036]

【発明の効果】以上のように本発明は、従来例のよう
に、対象画素値の誤差を周囲画素に配分するということ
を行わず、周囲画素からの誤差値の配分を対象画素が受
けるといった構成にすることにより、従来例では、ライ
ンメモリを2ライン必要としていたが、ラインメモリ1
ライン分とレジスタ1つにより実現でき、ハードウェア
規模を縮少することができる。
As described above, according to the present invention, unlike the conventional example, the error of the target pixel value is not distributed to the surrounding pixels, but the target pixel receives the distribution of the error value from the surrounding pixels. According to the configuration, the conventional example requires two line memories, but the line memory 1
This can be realized by one line and one register, and the hardware scale can be reduced.

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

【図1】本発明の一実施例における誤差配分法による画
像処理装置のブロック図
FIG. 1 is a block diagram of an image processing apparatus using an error distribution method according to an embodiment of the present invention.

【図2】本発明の一実施例における画像処理装置のアル
ゴリズムを示すフローチャート
FIG. 2 is a flowchart showing an algorithm of the image processing apparatus according to the embodiment of the present invention.

【図3】ラインメモリに記憶されている誤差値を説明す
るための図
FIG. 3 is a diagram for explaining an error value stored in a line memory.

【図4】従来の誤差配分法による画像処理装置のブロッ
ク図
FIG. 4 is a block diagram of an image processing apparatus using a conventional error distribution method.

【図5】従来の画像処理装置のアルゴリズムを示すフロ
ーチャート
FIG. 5 is a flowchart showing an algorithm of a conventional image processing apparatus.

【図6】ラインメモリに記憶されている誤差値を説明す
るための図
FIG. 6 is a diagram for explaining an error value stored in a line memory.

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

1,5 画像メモリ 2,7 レジスタ 3 演算器 4,6 ラインメモリ 1,5 image memory 2,7 register 3 arithmetic unit 4,6 line memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】入力画像を2値化する際に生ずる出力画像
と前記入力画像の差分である誤差値を周囲画素に配分
し、出力画像の劣化を防ぐ誤差配分法による画像処理装
置であって、入力画像をラスタ走査し、対象画素の処理
結果である誤差値を1H分だけ保持するラインメモリ
と、前記対象画素の1つ前の画素の処理結果を記憶する
レジスタと、対象画素値に、前記ラインメモリに記憶さ
れている前記対象画素の1H前の画素の処理結果に重み
付けした値と、前記対象画素の(1H+1)前の画素の
処理結果に重み付けした値と、前記レジスタの値に重み
付けした値とを加算し、加算した値を2値化し、前記加
算した値と2値化した値との差分を出力とする演算器と
を有し、前記演算器の前記2値化した値の出力を出力画
像とする画像処理装置。
1. An image processing apparatus according to an error distribution method, wherein an error value, which is a difference between an output image generated when an input image is binarized and the input image, is distributed to surrounding pixels to prevent deterioration of the output image. , A line memory that raster-scans an input image and holds an error value that is a processing result of a target pixel for 1H, a register that stores a processing result of a pixel immediately before the target pixel, and a target pixel value, A value weighted to the processing result of the pixel 1H before the target pixel stored in the line memory, a value weighted to the processing result of the pixel 1H + 1 before the target pixel, and a weight to the value of the register Of the binarized value of the computing unit, and a binarizing the added value, and outputting a difference between the added value and the binarized value. Image processing device that uses output as output image
JP3241037A 1991-09-20 1991-09-20 Image processor Pending JPH0583557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3241037A JPH0583557A (en) 1991-09-20 1991-09-20 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3241037A JPH0583557A (en) 1991-09-20 1991-09-20 Image processor

Publications (1)

Publication Number Publication Date
JPH0583557A true JPH0583557A (en) 1993-04-02

Family

ID=17068381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3241037A Pending JPH0583557A (en) 1991-09-20 1991-09-20 Image processor

Country Status (1)

Country Link
JP (1) JPH0583557A (en)

Similar Documents

Publication Publication Date Title
US4695884A (en) Correction of shading effects in video images
US8411987B2 (en) Method and apparatus for contrast enhancement
US5337160A (en) Error diffusion processor and method for converting a grey scale pixel image to a binary value pixel image
JPH07210670A (en) Image processor
JP3482660B2 (en) Image data processing apparatus and image data processing method
JPH0865508A (en) Error diffusion method,error diffusion system and error generation
JPH05219377A (en) Method of quantizing in-picture picture element value
US5381490A (en) Image processing apparatus for emphasizing edge components of an image
JPH09307789A (en) Image processing unit
JP3142334B2 (en) Error diffusion method and image processing apparatus using error diffusion method
JPH0583557A (en) Image processor
US8699080B2 (en) Method and apparatus for generating multi-site FM screen dots simultaneously
JPH11184841A (en) Picture processing method and picture processor
US6480195B1 (en) Method and apparatus for generating a straight line
US6903744B2 (en) Graphics processing system
JP2585872B2 (en) Image noise removal device
JPH01156069A (en) Image processor
JP4767568B2 (en) Error diffusion circuit
JP2861435B2 (en) Pipeline type arithmetic unit
JPH06253133A (en) Picture processing device
JPH0654173A (en) Image processor
JPH11185033A (en) Image processing method and device
JPH0563963A (en) Picture processor
JPH09135348A (en) Multivalued data conversion device
JPH01168164A (en) Picture processing unit