JPH09219791A - Binarization processor - Google Patents

Binarization processor

Info

Publication number
JPH09219791A
JPH09219791A JP8046851A JP4685196A JPH09219791A JP H09219791 A JPH09219791 A JP H09219791A JP 8046851 A JP8046851 A JP 8046851A JP 4685196 A JP4685196 A JP 4685196A JP H09219791 A JPH09219791 A JP H09219791A
Authority
JP
Japan
Prior art keywords
pixels
density
image
pixel
image area
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
JP8046851A
Other languages
Japanese (ja)
Inventor
Fujio Ihara
富士夫 井原
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP8046851A priority Critical patent/JPH09219791A/en
Publication of JPH09219791A publication Critical patent/JPH09219791A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To properly execute the separation of a character picture area from a gradation picture area. SOLUTION: A picture judging part 7 calculates the gradation difference between an area adding a picture element to be considered and the area adding the picture element which is separated from the picture element to be considered by planned distance, that is, a density pitch. The picture elements of an n-th line and the n-1-th line are objects concerning density data of the picture element for calculating the density pitch. The area is judged to be the density picture area when the calculated density pitch is within a planned range and is judged to be the character picture area when the pitch is out of the planned range and the judgement result is inputted to a difference diffusing circuit 3. The difference diffusing circuit 3 gives a bias for diffusing difference to input data at the time of the density picture area and supplies input data to a binarizing circuit by '0' bias at the time of the character picture area.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、2値化処理装置に
関し、特に、文字画像と濃淡画像とが混在した原画像を
読み取って得られる画情報の処理を行う2値化処理装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a binarization processing device, and more particularly to a binarization processing device for processing image information obtained by reading an original image in which a character image and a grayscale image are mixed.

【0002】[0002]

【従来の技術】文字画像と濃淡画像とを含む原稿に対し
て、単一閾値を用いた2値化を行うと、文字画像領域で
は原画像を美しく再現できるが濃淡画像領域では原画像
の再現性が良くない。一方、そのような原稿に対して、
ディザあるいは誤差拡散法などの中間調処理法を用いる
と、濃淡画像領域は美しく再現されるが、文字画像領域
では文字のエッジがぼけてくっきりした文字が得られな
い。このように、文字画像と濃淡画像とではそれぞれに
適した2値化方法があることが知られている。
2. Description of the Related Art When an original including a character image and a grayscale image is binarized using a single threshold, the original image can be beautifully reproduced in the character image area, but the original image is reproduced in the grayscale image area. The sex is not good. On the other hand, for such manuscripts,
When a halftone processing method such as dithering or an error diffusion method is used, the grayscale image area is reproduced beautifully, but in the character image area, the character edge is blurred and a clear character cannot be obtained. As described above, it is known that there are binarization methods suitable for the character image and the grayscale image.

【0003】そこで、文字画像領域と濃淡画像領域をう
まく切りわけて、おのおのに適した2値化処理を施すこ
とがよく行われる。この文字画像領域と濃淡画像領域と
の切りわけを像域分離という。
Therefore, it is often the case that the character image area and the grayscale image area are well separated and binarization processing suitable for each is performed. The division between the character image area and the grayscale image area is called image area separation.

【0004】従来の像域分離法では、文字画像および濃
淡画像のそれぞれの濃度変化の違いに着目し、この濃度
変化の違いによって文字画像と濃淡画像とを微視的な領
域で分離する。すなわち、濃度勾配が大きいところは文
字画像領域と考えて単一閾値による2値化を行い、濃度
勾配の小さいところは濃淡画像領域と考えて中間調処理
法による2値化を行っていた。
In the conventional image area separation method, attention is paid to a difference in density change between a character image and a grayscale image, and the character image and the grayscale image are separated in a microscopic area by the difference in the density change. That is, binarization by a single threshold value is performed assuming that the density gradient is large as a character image area, and binarization by the halftone processing method is considered as a density image area where the density gradient is small.

【0005】ところが、このような処理で像域分離を行
う方式においては、例えば、濃淡画像領域にノイズが存
在した場合、ノイズ部分の濃度勾配が大きくなってしま
うために、誤って文字領域と判定されてしまうという不
具合が発生してしまう。図6はノッチノイズによる読み
取り画像の一例を示す図である。同図(a)は原稿の画
像、同図(b)はスキャナで読み取った画像、同図
(c)は読み取った画像の部分拡大図である。このよう
に、本来は凹凸や抜けのない画像にノイズによる凹凸や
抜けが生じて領域が不明瞭になってしまっており、この
ために判定誤りという不具合が生ずる。
However, in the method of performing image area separation by such processing, for example, when noise exists in the grayscale image area, the density gradient of the noise portion becomes large, so it is erroneously determined to be a character area. The problem that it is done occurs. FIG. 6 is a diagram showing an example of an image read by notch noise. 9A is an image of a document, FIG. 8B is an image read by a scanner, and FIG. 7C is a partially enlarged view of the read image. As described above, an image that is originally free from irregularities or omissions has irregularities or omissions due to noise, and the region is unclear, which causes a problem of erroneous determination.

【0006】ファクシミリ装置や複写機等のスキャナに
よって入力された画像では、ノイズが入ってしまうこと
は必至であり、このようなノイズのある画情報から濃度
勾配を計算すると、誤った判定結果を出力してしまう。
また、特に解像度が高い場合にノイズが入りやすい。
It is inevitable that an image input by a scanner such as a facsimile machine or a copying machine will have noise, and if a density gradient is calculated from such noisy image information, an erroneous determination result is output. Resulting in.
Also, noise is likely to occur especially when the resolution is high.

【0007】これに対して、特開平2−132968号
公報に記載された画像処理装置では、注目画素を含む所
定範囲の平均濃度Daにより、所定範囲内で濃度がDa
よりも大きい画素を全て加算し、同様に所定範囲内で濃
度がDaよりも小さい画素を全て加算し、それらの平均
の差により文字画像領域と濃淡画像領域を分離すること
でノイズの影響を軽減している。
On the other hand, in the image processing apparatus disclosed in Japanese Patent Laid-Open No. Hei 2-132968, the density Da within the predetermined range is determined by the average density Da within the predetermined range including the pixel of interest.
All pixels that are larger than the above are added, and pixels that have a density smaller than Da within the predetermined range are added, and the effect of noise is reduced by separating the character image area and the grayscale image area by the difference of their averages. doing.

【0008】[0008]

【発明が解決しようとする課題】前記公報に記載された
画像処理装置には依然として問題点がある。すなわち、
この画像処理装置によっても、ノイズが存在した場合に
は、ノイズ自身が平均濃度Daに影響を及ぼしてしまう
ので、結果的に、正確に領域を区別することができな
い。また、注目画素を含む所定範囲のみで平均を求めて
いるので、ノッチノイズを含みやすい文字画像領域を、
誤って濃淡画像領域と判定してしまいやすいという問題
点がある。
The image processing apparatus described in the above publication still has a problem. That is,
Also with this image processing apparatus, when noise is present, the noise itself affects the average density Da, and as a result, the regions cannot be accurately distinguished. Further, since the average is obtained only in the predetermined range including the pixel of interest, the character image area that is likely to include notch noise is
There is a problem that it is easy to erroneously determine a grayscale image area.

【0009】本発明は、上記問題点に鑑みてなされたも
のであり、ノイズを含む原稿であっても適切に文字画像
領域と濃淡画像領域の像域分離ができ、その結果として
画像の性質に適応した処理を施すことにより美しい画像
出力を作り出すことを目的としたものである。
The present invention has been made in view of the above problems, and it is possible to appropriately separate the image areas of the character image area and the grayscale image area even in the case of an original containing noise, and as a result, the characteristics of the image are improved. The purpose is to create a beautiful image output by applying an adapted process.

【0010】[0010]

【課題を解決するための手段】本発明は、注目画素の周
辺に位置する複数の画素のうちその濃度が最小のものと
最大のものとを除いた数画素の平均濃度を求める第1の
平均濃度算出手段と、前記注目画素と同じライン上に存
在し、該注目画素から予定距離離れて位置する近隣画素
の周辺に位置する複数の画素のうちその濃度が最小のも
のと最大のものとを除いた数画素の平均濃度を求める第
2の平均濃度算出手段と、前記第1および第2の平均濃
度算出手段でそれぞれ算出された平均濃度の差Dを求め
る濃度勾配算出手段と、前記差Dが予め設定された範囲
内の濃度勾配を示す場合には濃淡画像領域を示すデータ
を出力し、前記範囲外の濃度勾配を示す場合には文字画
像領域を示すデータを出力する画像判定手段と、前記画
像判定手段から濃淡画像領域を示すデータが出力された
ときには、中間調処理方式を選択して画情報を2値化
し、前記画像判定手段から文字画像領域を示すデータが
出力されたときには、単一閾値によって画情報を2値化
する2値化処理手段とを具備した点に第1の特徴があ
る。
SUMMARY OF THE INVENTION According to the present invention, a first average of a plurality of pixels located around a pixel of interest excluding the minimum and maximum densities is calculated. The density calculating means and a plurality of pixels existing on the same line as the pixel of interest and located in the periphery of neighboring pixels located at a predetermined distance from the pixel of interest have the minimum and maximum densities. Second average density calculating means for calculating the average density of the excluded pixels, density gradient calculating means for calculating the difference D between the average densities calculated by the first and second average density calculating means, and the difference D An image determination unit that outputs data indicating a grayscale image area when the density gradient is within a preset range, and outputs data indicating a character image area when the density gradient is outside the range, From the image determination means When the data indicating the image area is output, the halftone processing method is selected to binarize the image information, and when the data indicating the character image area is output from the image determining means, the image information is converted by the single threshold value. A first feature is that the image forming apparatus is provided with a binarizing processing unit for binarizing.

【0011】また、本発明は、前記平均濃度算出手段
で、濃度が最大および最小の画素を除いた画素が2画素
となるように、注目画素および近隣画素の周辺から4画
素を選択するとともに、前記2値化処理手段が、前記注
目画素が濃淡画像領域と判定されたときには、中間調処
理方式として誤差拡散法を用いて画情報を2値化するよ
うに構成された点に第2の特徴がある。
Further, according to the present invention, the average density calculating means selects four pixels from the periphery of the pixel of interest and the neighboring pixels so that the number of pixels excluding the pixels having the maximum and minimum densities is two. A second feature is that the binarization processing unit is configured to binarize image information using an error diffusion method as a halftone processing method when the pixel of interest is determined to be a grayscale image area. There is.

【0012】また、本発明は、前記注目画素と前記近隣
画素の距離を予め設定する距離設定手段を具備した点に
第3の特徴がある。
Further, the present invention has a third feature in that a distance setting means for presetting a distance between the target pixel and the neighboring pixels is provided.

【0013】第1ないし第3の特徴によれば、注目画素
および近隣画素のそれぞれ周辺にある画素のうち濃度が
最大および最小のものを除く残りの画素の濃度平均値に
より、前記注目画素および近隣画素が含まれる領域間の
濃度勾配を算出することができる。そして、この濃度勾
配が予定の範囲内にある場合は濃淡画像領域と判定し、
予定の範囲から外れている場合に文字画像領域と判定す
る。画情報の2値化処理方式は、この判定結果に応じて
選択される。
According to the first to third characteristics, among the pixels around the target pixel and the neighboring pixels, the density average value of the remaining pixels excluding the pixels having the maximum and minimum densities is used to determine the target pixel and the neighboring pixels. It is possible to calculate a density gradient between regions including pixels. Then, if this density gradient is within the predetermined range, it is determined to be a grayscale image area,
If it is outside the planned range, it is determined to be a character image area. The image information binarization processing method is selected according to the determination result.

【0014】また、第2の特徴によれば、最大および最
小濃度の画素を除くと2画素になり、平均値を算出する
ための平均濃度算出手段の構成を簡単にできる。また、
第3の特徴によれば、注目画素および近隣画素間の距離
を任意に設定することができる。
Further, according to the second feature, the number of pixels is 2 except for the pixels of maximum and minimum densities, and the structure of the average density calculating means for calculating the average value can be simplified. Also,
According to the third feature, the distance between the target pixel and the neighboring pixels can be set arbitrarily.

【0015】[0015]

【発明の実施の形態】以下に、図面を参照して本発明を
詳細に説明する。図2は処理対象となる画素の位置を説
明するための模式図である。同図に示すように、平均濃
度を求めるための注目画素Xおよびその周辺画素A1〜
A4が定義され、さらに、注目画素Xと同一ライン上に
あるもう1つの画素(以下、「近隣画素」という)Yお
よびその周辺画素B1〜B4が定義されている。
DETAILED DESCRIPTION OF THE INVENTION The present invention will be described in detail below with reference to the drawings. FIG. 2 is a schematic diagram for explaining the positions of pixels to be processed. As shown in the figure, the pixel of interest X and its peripheral pixels A1 to
A4 is defined, and another pixel (hereinafter, referred to as “neighboring pixel”) Y on the same line as the pixel of interest X and its peripheral pixels B1 to B4 are defined.

【0016】図1は、本発明の一実施形態に係る画像処
理装置の要部構成を示すブロック図である。同図におい
て、第1ライン・バッファ1は、誤差拡散回路3が出力
した誤差を1ライン分保持するものである。誤差拡散回
路3の詳細は図4に関して後述する。第2ライン・バッ
ファ2は、注目画素X(図2参照)を含む1ライン分の
画像データを保持している。誤差拡散回路3は、画像判
定部7の出力により、誤差拡散後の2値化と単純2値化
のどちらかを選択する。なお、画像判定部7の構成は図
3に関して後述する。
FIG. 1 is a block diagram showing a main configuration of an image processing apparatus according to an embodiment of the present invention. In the figure, the first line buffer 1 holds the error output by the error diffusion circuit 3 for one line. Details of the error diffusion circuit 3 will be described later with reference to FIG. The second line buffer 2 holds one line of image data including the pixel of interest X (see FIG. 2). The error diffusion circuit 3 selects either binarization after error diffusion or simple binarization based on the output of the image determination unit 7. The configuration of the image determination unit 7 will be described later with reference to FIG.

【0017】ポインタ制御回路4は、誤差拡散回路3や
画像判定部7に送り込むデータを指示するポインタを生
成する。距離設定装置5は、注目画素Xと近隣画素Yと
の距離S(図2参照)の設定に使われる手段であり、R
AM等のメモリから構成できる。ポインタ制御回路4
は、距離設定装置5によって指定された値Sだけ注目画
素Xから離れたところの画素、つまり近隣画素Yをポイ
ントし、その周辺の画素データ取得のために使用され
る。注目画素Xと近隣画素Yとの距離Sの設定は、図示
されていないCPUから行われ、システム内で取り扱わ
れる解像度に合わせて適切な値が指定される。通常は、
解像度が高いほど大きな値が与えられ、解像度が低いほ
ど小さな値が与えられる。
The pointer control circuit 4 generates a pointer for instructing the data to be sent to the error diffusion circuit 3 and the image determination section 7. The distance setting device 5 is means used for setting the distance S (see FIG. 2) between the pixel of interest X and the neighboring pixel Y, and R
It can be composed of a memory such as an AM. Pointer control circuit 4
Is used to obtain pixel data in the vicinity of a pixel that is a pixel distant from the pixel of interest X by a value S designated by the distance setting device 5, that is, a neighboring pixel Y. The setting of the distance S between the pixel of interest X and the neighboring pixel Y is performed by a CPU (not shown), and an appropriate value is designated according to the resolution handled in the system. Normally,
A higher resolution gives a larger value, and a lower resolution gives a smaller value.

【0018】バッファ6は、前記距離Sの間に存在する
画像データを保持するのに十分な大きさを持っている。
通常、距離Sは小さな値なので、このバッファも小さい
ものでよい。画像判定部7は、注目画素Xが文字画像領
域にあるのか濃淡画像領域にあるのかを検出する。符号
Piは本処理装置への入力データ、符号Poは誤差拡散
回路3の2値化出力、符号Errは誤差拡散回路3の誤
差出力である。
The buffer 6 is large enough to hold the image data existing within the distance S.
Since the distance S is usually a small value, this buffer may be small. The image determination unit 7 detects whether the pixel of interest X is in the character image area or the grayscale image area. Reference symbol Pi is input data to the processing apparatus, reference symbol Po is a binarized output of the error diffusion circuit 3, and reference symbol Err is an error output of the error diffusion circuit 3.

【0019】次に、前記画像判定部7を詳細に説明す
る。図3は、画像判定部7の構成を示すブロック図であ
る。同図において、第2ライン・バッファ2は、注目画
素Xおよび近隣画素Yを含む1ライン(n−1ライン
目)の画像データを蓄積している。一方、バッファ6は
注目画素Xおよび近隣画素Yを含むラインの次のライン
(nライン目)の画像データのうち前記画素B2からA
4までの画像データを蓄積している。平均濃度算出器8
a,8bはそれぞれ6入力の加算器とその結果を1ビッ
トだけ右に算術シフトする回路とからなる。平均濃度算
出器8aは画素Y周辺の画素B1〜B4の平均濃度を算
出するもので、平均濃度算出器8bは注目画素X周辺の
画素A1〜A4の平均濃度を算出するものである。
Next, the image judging section 7 will be described in detail. FIG. 3 is a block diagram showing the configuration of the image determination unit 7. In the figure, the second line buffer 2 stores the image data of the first line (n-1th line) including the target pixel X and the neighboring pixel Y. On the other hand, the buffer 6 includes the pixels B2 to A among the image data of the line (nth line) next to the line including the target pixel X and the neighboring pixel Y.
Up to 4 image data are stored. Average concentration calculator 8
Each of a and 8b is composed of a 6-input adder and a circuit for arithmetically shifting the result by 1 bit to the right. The average density calculator 8a calculates the average density of the pixels B1 to B4 around the pixel Y, and the average density calculator 8b calculates the average density of the pixels A1 to A4 around the target pixel X.

【0020】最大・最小検出回路9aは画素Y周辺の画
素B1〜B4から最大濃度と最小濃度とを検出する回路
で、最大・最小検出回路9bは画素X周辺の画素A1〜
A4から最大濃度と最小濃度とを検出する回路である。
最大・最小検出回路9aの最大値出力をDMaxY、最
小値出力をDMinYとすると、平均濃度算出器8aで
は次の(式1)により平均濃度が計算される。
The maximum / minimum detection circuit 9a is a circuit for detecting the maximum density and the minimum density from the pixels B1 to B4 around the pixel Y, and the maximum / minimum detection circuit 9b is the pixels A1 to around the pixel X.
This is a circuit for detecting the maximum density and the minimum density from A4.
When the maximum value output of the maximum / minimum detection circuit 9a is DMaxY and the minimum value output is DMinY, the average density calculator 8a calculates the average density by the following (Equation 1).

【0021】 (B1+B2+B3+B4‐DMaxY‐DMinY)/2…(式1) 平均濃度検出器8bも同様であり、最大・最小検出回路
9bの最大値出力をDMaxX、最小値出力をDMin
Xとすると、平均濃度検出器8aでは次の(式2)によ
り平均濃度が計算される。
(B1 + B2 + B3 + B4-DMaxY-DMinY) / 2 (Equation 1) The average concentration detector 8b is also the same, and the maximum value output of the maximum / minimum detection circuit 9b is DMaxX and the minimum value output is DMin.
If X, the average concentration detector 8a calculates the average concentration by the following (formula 2).

【0022】 (A1+A2+A3+A4‐DMaxX‐DMinX)/2…(式2) このように、(式1)では画素B1〜B4のうち最大濃
度を有する画素と最小濃度を有する画素が除かれ、それ
以外の2つの画素の濃度の平均値が算出される。また、
(式2)では画素A1〜A4のうち最大濃度を有する画
素と最小濃度を有する画素が除かれ、それ以外の2つの
画素の濃度の平均値が算出される。
(A1 + A2 + A3 + A4-DMaxX-DMinX) / 2 (Equation 2) As described above, in (Equation 1), the pixel having the maximum density and the pixel having the minimum density are excluded from the pixels B1 to B4, and the other pixels are excluded. The average value of the densities of the two pixels is calculated. Also,
In (Equation 2), the pixel having the maximum density and the pixel having the minimum density are excluded from the pixels A1 to A4, and the average value of the densities of the other two pixels is calculated.

【0023】平均濃度検出器8a,8b、ならびに最大
・最小検出回路9a,9bに画像データつまり濃度デー
タが入力される対象となる画素A1,A2,A3,A
4,B1,B2,B3,B4は、ポインタ制御回路4に
より図2のように指定される。
Pixels A1, A2, A3, A for which image data, that is, density data, are input to the average density detectors 8a, 8b and the maximum / minimum detection circuits 9a, 9b.
4, B1, B2, B3, B4 are designated by the pointer control circuit 4 as shown in FIG.

【0024】このように注目画素Xおよび近隣画素Yの
それぞれの周辺から平均濃度を求める際に、図2のよう
な4点をそれぞれ選んだのは次の理由による。すなわ
ち、誤差拡散処理を行う場合でもライン・バッファを2
本で済ませることができ、また最大および最小画素を除
くと、結果的に2画素の平均値を求めることになり、除
算が2での除算となるためにシフタで済ますことができ
て回路構成が簡単になるからである。
The reason for selecting four points as shown in FIG. 2 when obtaining the average densities from the periphery of the target pixel X and the neighboring pixels Y is as follows. That is, even if error diffusion processing is performed, the line buffer is
This can be done with a book, and if the maximum and minimum pixels are excluded, the average value of 2 pixels will be obtained as a result, and the division will be a division by 2, so it can be done with a shifter and the circuit configuration will be Because it will be easier.

【0025】これら最大・最小検出回路9a,9bでそ
れぞれ得られた平均濃度の差が差分器10で算出されて
濃度勾配が求められる。この濃度勾配は、比較器11に
入力され、あらかじめ設定された閾値N1,N2と比較
されて、注目画素Xが文字画像領域にあるのか、濃淡画
像領域にあるのかが判定される。
The difference between the average densities obtained by the maximum / minimum detection circuits 9a and 9b is calculated by the differentiator 10 to obtain the concentration gradient. This density gradient is input to the comparator 11 and compared with preset threshold values N1 and N2 to determine whether the target pixel X is in the character image area or the grayscale image area.

【0026】判定のアルゴリズムは、次の通りである。
閾値N1<N2において、N1≦D≦N2であれば濃淡
画像領域、D<N1,D>N2であれば文字画像領域と
判定される。比較器11は判定出力12を出力し、該判
定出力12が「0」ならば濃淡画像領域、「1」ならば
文字画像領域であることを示す。
The determination algorithm is as follows.
At the threshold value N1 <N2, if N1 ≦ D ≦ N2, it is determined as a grayscale image area, and if D <N1, D> N2, it is determined as a character image area. The comparator 11 outputs the determination output 12, and if the determination output 12 is "0", it indicates that it is a grayscale image area, and if it is "1", it is a character image area.

【0027】そして、画像判定部7によって、注目画素
Xが濃淡画像領域であると判定された場合には、前記誤
差拡散回路3によって各画素の濃度データに誤差拡散法
によりバイアスを与えた後2値化され、注目画素Xが文
字画像領域であると判定された場合には、バイアスを与
えないで単純2値化が行われる。
When the image determination unit 7 determines that the pixel of interest X is a grayscale image region, the error diffusion circuit 3 biases the density data of each pixel by the error diffusion method, and then 2 If the pixel of interest X is binarized and is determined to be the character image area, simple binarization is performed without applying a bias.

【0028】図4は、誤差拡散回路3を具体的に示した
もので、図5は、誤差データの加重平均を求める際に用
いられる誤差と係数を示したものである。図4におい
て、入力データPi´は前記第2ライン・バッファ2か
ら供給される画素の濃度データであり、例えば8ビット
256階調のデータである。第1ライン・バッファ1は
すでに述べたように誤差データを1ライン分保持してい
る。2値化回路13は、加算器14でバイアスされた入
力データPieを、閾値、例えば、「128」と比較し
て、バイアスされた入力データPieの方が大きければ
「1」を出力し、小さかったならば「0」を出力データ
Poとして出力する。
FIG. 4 shows the error diffusion circuit 3 concretely, and FIG. 5 shows the error and the coefficient used when obtaining the weighted average of the error data. In FIG. 4, input data Pi ′ is pixel density data supplied from the second line buffer 2 and is, for example, 8-bit 256 gradation data. The first line buffer 1 holds the error data for one line as already described. The binarization circuit 13 compares the input data Pie biased by the adder 14 with a threshold value, for example, “128”, and outputs “1” if the biased input data Pie is larger, and outputs the smaller value. If so, “0” is output as the output data Po.

【0029】レベル変換器15は2値化回路13の出力
データPoを多値データに変換する。該レベル変換器1
5は2値化回路13の出力データPoに8ビットの最大
値、すなわち、「255」を掛けて出力する。なお、該
レベル変換回路15は「1」または「0」の入力をアド
レスとして多値データ「255」または「0」をそれぞ
れ発生するメモリで構成してもよい。誤差算出器16は
前記加算器14の出力データPieからレベル変換器1
5の出力多値データPo´を減算し、誤差データを求め
る。誤差データは、加重平均回路17に入力されると共
に、第1ライン・バッファ1へも入力される。加重平均
回路17は注目画素X周辺の誤差拡散処理で生じた誤差
に対し、予め決定された適当な重み付けをして加重平均
をとる回路である。
The level converter 15 converts the output data Po of the binarization circuit 13 into multivalued data. The level converter 1
Reference numeral 5 multiplies the output data Po of the binarization circuit 13 by the maximum value of 8 bits, that is, "255" and outputs it. The level conversion circuit 15 may be composed of a memory which generates multi-valued data "255" or "0" with an input of "1" or "0" as an address. The error calculator 16 calculates the level converter 1 from the output data Pie of the adder 14.
The output multivalued data Po ′ of 5 is subtracted to obtain error data. The error data is input to the weighted average circuit 17 and also to the first line buffer 1. The weighted average circuit 17 is a circuit which weights the error generated in the error diffusion process around the pixel of interest X by appropriately weighting it in advance.

【0030】マルチプレクサ(MUX)18は前記画像
判定部7の判定出力12によって制御される。該マルチ
プレクサ18は前記判定出力12が「0」の場合は、加
重平均回路17の出力を選択して加算器14に出力し、
前記判定出力12が「1」の場合は、「0」データを選
択して加算器14に出力する。すなわち、入力データP
i´は、画像判定部7の判定出力12の値に応じ、加重
平均回路17から出力される重み付けをされた誤差デー
タによりバイアスされるか、「0」をバイアスされるか
して2値化回路13への入力となる。
The multiplexer (MUX) 18 is controlled by the judgment output 12 of the image judgment unit 7. When the judgment output 12 is “0”, the multiplexer 18 selects the output of the weighted average circuit 17 and outputs it to the adder 14,
When the judgment output 12 is "1", "0" data is selected and output to the adder 14. That is, the input data P
i ′ is binarized by being biased by the weighted error data output from the weighted average circuit 17 or biased by “0” according to the value of the determination output 12 of the image determination unit 7. It is an input to the circuit 13.

【0031】上述のように、画像判定部7により、濃淡
画像領域と判定されたときには入力データに誤差データ
の加重平均値がバイアスされたあと2値化され、文字画
像領域と判定されたときには入力データに「0」バイア
スされたあと2値化される。
As described above, when the image determination unit 7 determines that the image is a gray image region, the input data is biased by the weighted average value of the error data and then binarized. After the data is biased by "0", it is binarized.

【0032】次に、誤差データの加重平均の取り方の一
例を説明する。図5(a)に示すように注目画素Xの前
ライン(n−1ライン)からa,b,c,d,eの5画
素、ならびに注目画素Xの前方のf,g2画素に対して
行う。それぞれの画素に対して、図5(b)の誤差フィ
ルタによって加重平均をとると、加重平均された誤差デ
ータは、次の(式3)で計算できる。誤差データ=1/
16×a+2/16×b+4/16×c+2/16×d
+1/16×e+2/16×f+4/16×g…(式
3) こうして、注目画素Xが濃淡画像領域にあると判定され
た場合には、注目画素Xの2値化は以下のアルゴリズム
により行われる。まず、(式4)により注目画素Xに前
記加重平均された誤差データをバイアスして出力データ
(Qとする)を得る。Q=1/16×a+2/16×b
+4/16×c+2/16×d+1/16×e+2/1
6×f+4/16×g+X…(式4) そうして、Q≧128なら、2値化データ「1」を出力
する。また、Q<128なら、2値化データ「0」を出
力する。
Next, an example of how to obtain a weighted average of error data will be described. As shown in FIG. 5A, it is performed for five pixels a, b, c, d, and e from the previous line (n-1 line) of the target pixel X, and f and g2 pixels in front of the target pixel X. . When the weighted average is calculated for each pixel by the error filter of FIG. 5B, the weighted averaged error data can be calculated by the following (formula 3). Error data = 1 /
16 x a + 2/16 x b + 4/16 x c + 2/16 x d
+ 1/16 × e + 2/16 × f + 4/16 × g (Equation 3) In this way, when it is determined that the target pixel X is in the grayscale image area, the target pixel X is binarized by the following algorithm. Be seen. First, according to (Equation 4), the weighted averaged error data is biased to the target pixel X to obtain output data (denoted as Q). Q = 1/16 x a + 2/16 x b
+ 4/16 × c + 2/16 × d + 1/16 × e + 2/1
6 × f + 4/16 × g + X (Equation 4) If Q ≧ 128, the binarized data “1” is output. If Q <128, binarized data “0” is output.

【0033】また、誤差算出器46の出力は、Q≧12
8なら、誤差データ(Q−255),Q<128なら、
誤差データ(Q)をそれぞれ出力する。誤差データは第
1ライン・バッファ1に蓄積される。
The output of the error calculator 46 is Q ≧ 12.
If 8, error data (Q-255), if Q <128,
The error data (Q) is output. The error data is stored in the first line buffer 1.

【0034】このように、本実施形態では、注目画素が
濃淡画像領域または文字画像領域のいずれにあるかを、
周辺画素のうち最大と最小濃度のものを除く平均濃度で
判定するようにした。なお、この判定の結果により濃淡
画像領域と判定されたときには誤差拡散法により2値化
したが、これは誤差拡散法に限らず、ディザ処理法等、
他の中間調処理方式を用いるように変形することができ
る。
As described above, in the present embodiment, it is determined whether the pixel of interest is in the grayscale image area or the character image area.
The judgment is made based on the average density excluding the maximum and minimum density of the peripheral pixels. When it is determined that the image is a grayscale image region based on the result of this determination, binarization is performed by the error diffusion method. However, this is not limited to the error diffusion method, but a dither processing method, etc.
It can be modified to use other halftone processing schemes.

【0035】[0035]

【発明の効果】請求項1ないし請求項3の発明によれ
ば、注目画素および近隣画素のそれぞれ周辺にある画素
のうち濃度が最大および最小のものを除く残りの画素の
平均値により、前記注目画素および近隣画素が含まれる
領域間の濃度勾配を算出することができる。したがっ
て、画像にノイズが含まれるような場合でも、前記濃度
勾配により文字画像領域と濃淡画像領域の像域分離を適
切に行える。その結果、画像領域に応じた適切な処理方
式を選択できるので美しい2値化画像を得ることができ
る。
According to the first to third aspects of the invention, among the pixels around the target pixel and the neighboring pixels, the average value of the remaining pixels excluding the pixels having the maximum and minimum densities is used to detect the target pixel. It is possible to calculate a density gradient between regions including pixels and neighboring pixels. Therefore, even when the image contains noise, the image area separation between the character image area and the grayscale image area can be appropriately performed by the density gradient. As a result, an appropriate processing method can be selected according to the image area, and a beautiful binarized image can be obtained.

【0036】特に、請求項2の発明によれば、最大およ
び最小濃度の画素を除く残りの画素が2つとなり、平均
値を算出するための平均濃度算出手段の構成を簡単にで
きる。
In particular, according to the second aspect of the invention, the number of remaining pixels excluding the pixels of maximum and minimum densities is two, and the structure of the average density calculating means for calculating the average value can be simplified.

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

【図1】 本発明の一実施形態に係る2値化処理装置の
構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a binarization processing device according to an embodiment of the present invention.

【図2】 画像領域の判定に用いられる注目画素および
周辺画素の位置を示す図である。
FIG. 2 is a diagram showing positions of a target pixel and peripheral pixels used for determining an image region.

【図3】 画像判定部の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of an image determination unit.

【図4】 誤差拡散回路の構成を示すブロック図であ
る。
FIG. 4 is a block diagram showing a configuration of an error diffusion circuit.

【図5】 加重平均に用いられる誤差配分画素と誤差配
分の係数を示す図である。
FIG. 5 is a diagram showing error distribution pixels used for weighted average and coefficients of error distribution.

【図6】 読取り画像のノッチノイズの一例を示す図で
ある。
FIG. 6 is a diagram showing an example of notch noise of a read image.

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

1…第1ライン・バッファ、 2…第2ライン・バッフ
ァ、 3…誤差拡散回路、 5…距離設定装置、 6…
バッファ、 7…画像判定部
1 ... 1st line buffer, 2 ... 2nd line buffer, 3 ... Error diffusion circuit, 5 ... Distance setting device, 6 ...
Buffer, 7 ... Image determination unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 文字画像と濃淡画像の混在した原画像を
読み取って得られる画情報の2値化処理装置において、 注目画素の周辺に位置する複数の画素のうちその濃度が
最小のものと最大のものとを除いた数画素の平均濃度を
求める第1の平均濃度算出手段と、 前記注目画素と同じライン上に存在し、該注目画素から
予定距離離れて位置する近隣画素の周辺に位置する複数
の画素のうちその濃度が最小のものと最大のものとを除
いた数画素の平均濃度を求める第2の平均濃度算出手段
と、 前記第1および第2の平均濃度算出手段でそれぞれ算出
された平均濃度の差Dを求める濃度勾配算出手段と、 前記差Dが予め設定された値N1,N2に対してN1≦
D≦N2であれば、濃淡画像領域を示すデータを出力
し、D<N1またはD>N2であれば、文字画像領域を
示すデータを出力する画像判定手段と、 前記画像判定手段から濃淡画像領域を示すデータが出力
されたときには、中間調処理方式を選択して画情報を2
値化し、前記画像判定手段から文字画像領域を示すデー
タが出力されたときには、単一閾値によって画情報を2
値化する2値化処理手段とを具備したことを特徴とする
2値化処理装置。
1. A binarization device for image information obtained by reading an original image in which a character image and a grayscale image are mixed, wherein a plurality of pixels located around a pixel of interest have a minimum density and a maximum density. And a first average density calculating means for obtaining the average density of several pixels except for the ones, which are located on the same line as the target pixel, and which are located in the vicinity of neighboring pixels located at a predetermined distance from the target pixel. Second average density calculating means for calculating the average density of several pixels excluding the minimum density and the maximum density of a plurality of pixels, and the first and second average density calculating means respectively. Concentration gradient calculating means for obtaining the difference D between the average densities, and N1 ≦ with respect to the preset values N1 and N2.
If D ≦ N2, output data indicating a grayscale image area, and if D <N1 or D> N2, output image data indicating a character image area; and the grayscale image area from the image determination means. Is output, the halftone processing method is selected and the image information is set to 2
When data indicating the character image area is output from the image determination means, the image information is converted into 2 by a single threshold value.
A binarization processing device comprising: a binarization processing unit for binarizing.
【請求項2】 前記平均濃度算出手段で、濃度が最大お
よび最小の画素を除いた画素が2画素となるように、注
目画素および近隣画素の周辺から4画素を選択するとと
もに、 前記2値化処理手段が、前記注目画素が濃淡画像領域と
判定されたときには、中間調処理方式として誤差拡散法
を用いて画情報を2値化するように構成されたことを特
徴とする請求項1記載の2値化処理装置。
2. The average density calculating means selects four pixels from the periphery of the target pixel and neighboring pixels so that the number of pixels excluding the pixels having the maximum and minimum densities is two, and the binarization is performed. The processing means is configured to binarize image information by using an error diffusion method as a halftone processing method when the pixel of interest is determined to be a grayscale image area. Binarization processing device.
【請求項3】 前記注目画素と前記近隣画素の距離を予
め設定する距離設定手段を具備したことを特徴とする請
求項1または2記載の2値化処理装置。
3. The binarization processing apparatus according to claim 1, further comprising a distance setting unit that sets a distance between the pixel of interest and the neighboring pixel in advance.
JP8046851A 1996-02-09 1996-02-09 Binarization processor Pending JPH09219791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8046851A JPH09219791A (en) 1996-02-09 1996-02-09 Binarization processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8046851A JPH09219791A (en) 1996-02-09 1996-02-09 Binarization processor

Publications (1)

Publication Number Publication Date
JPH09219791A true JPH09219791A (en) 1997-08-19

Family

ID=12758854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8046851A Pending JPH09219791A (en) 1996-02-09 1996-02-09 Binarization processor

Country Status (1)

Country Link
JP (1) JPH09219791A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139353A (en) * 2015-08-14 2015-12-09 河南师范大学 Blind separation method for replacing aliasing image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139353A (en) * 2015-08-14 2015-12-09 河南师范大学 Blind separation method for replacing aliasing image
CN105139353B (en) * 2015-08-14 2018-01-09 河南师范大学 A kind of blind separating method for replacing aliased image

Similar Documents

Publication Publication Date Title
JPH02253765A (en) Picture processor
JP2006065834A (en) Image processing device and image processing method
JP3040896B2 (en) Image processing device
US7965413B2 (en) Method and system for detection of binary halftone frequencies
JPH09219791A (en) Binarization processor
JPH1093821A (en) Picture data processing method/system
US7933446B2 (en) Method and apparatus for automatically detecting image and character data
JPH11346311A (en) Gradation reproduction method
JPH11168628A (en) Image data processing method and system thereof
US6842267B1 (en) Image processing method
JP2874592B2 (en) Image processing device for distinguishing text / photo / dot area
JP3256267B2 (en) Image processing device
JP3225138B2 (en) Image processing apparatus and image processing method
JPH05167842A (en) Image processor
JPH11150659A (en) Method for processing image
JPH0969942A (en) Method and device for image processing
JPH0326065A (en) Picture processing unit
JPH0554190A (en) Picture processor
JPS6180970A (en) Picture signal processor
JPH0490680A (en) Picture binarizing method
JPH05344334A (en) Isolated point judging circuit
JPH11187260A (en) Video signal binarizing device
JPH05130392A (en) Picture processing unit and picture processing system
JPH08265569A (en) Pseudo halftone processor
JPH05227432A (en) Picture processor