JPS6359272A - Picture processor - Google Patents

Picture processor

Info

Publication number
JPS6359272A
JPS6359272A JP61201813A JP20181386A JPS6359272A JP S6359272 A JPS6359272 A JP S6359272A JP 61201813 A JP61201813 A JP 61201813A JP 20181386 A JP20181386 A JP 20181386A JP S6359272 A JPS6359272 A JP S6359272A
Authority
JP
Japan
Prior art keywords
level
value
pixel
white
image
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
JP61201813A
Other languages
Japanese (ja)
Inventor
Hiroshi Ochi
宏 越智
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP61201813A priority Critical patent/JPS6359272A/en
Publication of JPS6359272A publication Critical patent/JPS6359272A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Abstract

PURPOSE:To obtain a binary image with high quality, by extracting only an area where high resolution is requested such as a character, etc., separately from a background part, or a photographing area, etc., and setting a threshold value corresponding to a picture signal at every small area. CONSTITUTION:An image is divided into blocks consisting of (m Xm)-number of picture elements, and the maximum value Smax, the minimum value Smin, and a mean value S0 of a picture signal level at every block are found. A differential value D=Smax-Smin is compared with a value T set in advance, and when it is D>T, the picture signal level of each picture element of the said block is binarized setting the S0 as a threshold value. In other words, the picture signal level Sij (1<=i<=m, 1<=j<=m) of a certain picture element is set as a black when it approaches to a black level nearer than the S0, and is set as a white when the former approaches to a white level nearer than the latter. Meanwhile, when it is D<=T, the signal level is compared with a value ST, and is binarized. Namely, the picture signal level is set as the black when it approaches to the black level nearer than the ST, and as the white when it approaches to the white level nearer than the ST.

Description

【発明の詳細な説明】 (発明の属する技術分野) 本発明は、簡易な構成でコントラストの低い画像も良好
に読み取れるような画像処理装置を提供するものである
DETAILED DESCRIPTION OF THE INVENTION (Technical field to which the invention pertains) The present invention provides an image processing device that has a simple configuration and can read images with low contrast well.

(従来の技術) ファクシミリ等で読取られる原稿には、濃度コントラス
トの高いもの、低いもの、色地原稿等。
(Prior Art) Documents read by facsimiles include those with high density contrast, those with low density contrast, and those with colored backgrounds.

各種存在する。Various types exist.

従来の装置では、原稿の背景部の白レベルを検出して、
色地原稿であっても背景部が黒くならないようにしてい
る。
Conventional devices detect the white level of the background of the document and
This prevents the background from turning black even if the original is colored.

コントラストの低い原稿も良好に再現できるようにする
手段としては、2値化の閾値を白寄りに設定している。
As a means to enable good reproduction of documents with low contrast, the binarization threshold is set closer to white.

然し乍ら、このためコントラストの高い原稿に対しても
2値化の閾値を必要以上に白寄りに設定することになり
、分解能が悪くなる原因となっている。
However, for this reason, even for high-contrast documents, the binarization threshold is set to be whiter than necessary, which causes deterioration in resolution.

分解能を良くする方法としては1着目画素の近傍の画素
の画信号レベルの平均値によって2値化することが有効
である。然し乍ら、この方法では近傍がすべて同一画信
号レベルである場合に対応できない他、画信号中に含ま
れるノイズの影響によって異常ドツトが生じる欠点があ
る。
An effective method for improving the resolution is to perform binarization using the average value of the image signal levels of pixels in the vicinity of the first pixel of interest. However, this method cannot handle the case where all neighboring pixels have the same image signal level, and has the disadvantage that abnormal dots may occur due to the influence of noise contained in the image signal.

(発明の目的) 本発明の目的は、これらの欠点を解決して、画信号内容
に応じて閾値を自動的に設定し、高品質な2値化画像が
得られる画像処理装置を提供することにある。
(Object of the Invention) An object of the present invention is to solve these drawbacks and provide an image processing device that can automatically set a threshold value according to the image signal content and obtain a high-quality binarized image. It is in.

(発明の構成) (発明の特徴と従来技術との差異) 本発明は、小領域毎に独立した閾値を決定するものであ
って画信号レベルの変化が大きい部分では、その近傍画
素の信号レベルの中間的な値を閾値とし、信号レベルの
変化が小さい部分では、近傍画素の画信号レベルの値に
かかわらず、これとは独立に設定される閾値を用いるこ
とを最も主要な特徴とする。
(Structure of the Invention) (Characteristics of the Invention and Differences from the Prior Art) The present invention determines an independent threshold value for each small area, and in a part where the image signal level changes significantly, the signal level of the neighboring pixels is determined. The most important feature is that a threshold value is set to an intermediate value of , and a threshold value that is set independently of the pixel signal level value of a neighboring pixel is used in a portion where the change in signal level is small, regardless of the value of the pixel signal level of a neighboring pixel.

(実施例) 〔実施例1〕 画像をmXm画素よりなるブロックに分割して。(Example) [Example 1] Divide the image into blocks of mXm pixels.

各ブロック毎に画信号レベルの最大値S□、、最小値S
mlイ、ならびに平均値S。を求める。
Maximum value S□, minimum value S of image signal level for each block
ml i, as well as the average value S. seek.

差分値D =Smaf  Sml+の値を予め定められ
ている値Tと比較してDOTならば当該ブロックの各画
素の画信号レベルはSoを閾値として2値化する。
The value of the difference value D=Smaf Sml+ is compared with a predetermined value T, and if it is DOT, the pixel signal level of each pixel of the block is binarized using So as a threshold value.

すなわち、ある画素の画信号レベル 5z(1≦i≦m、1≦j≦l11)がSoより黒レベ
ルに近ければ黒、白レベルに近ければ白とする。
That is, if the image signal level 5z (1≦i≦m, 1≦j≦l11) of a certain pixel is closer to the black level than So, it is considered black, and if it is closer to the white level, it is considered white.

一方、D≦Tならば予め定められている値S?と比較し
て2値化する。すなわち1画信号レベルがS、より黒レ
ベルに近ければ黒、白レベルに近ければ白とする。
On the other hand, if D≦T, is the predetermined value S? Compare and binarize. That is, if the one-picture signal level is S, closer to the black level, it is black, and if it is closer to the white level, it is white.

第1図及び第2図は本発明装置の機能説明のための画信
号例及び処理画像を示す。
FIGS. 1 and 2 show examples of image signals and processed images for explaining the functions of the apparatus of the present invention.

第1図はm=4の場合について1ブロツク内の画信号例
を示す。小さな正方形は、画信号レベル(黒レベル:0
.白レベル:31)を表す。    ゛この場合、平均
値は、S、=12.最大値、最小値はS□x”23. 
S−+−= 8− D = 5となる。
FIG. 1 shows an example of an image signal within one block in the case of m=4. The small square indicates the image signal level (black level: 0
.. White level: 31).゛In this case, the average value is S, = 12. The maximum value and minimum value are S□x”23.
S−+−=8−D=5.

T=10に設定されているならば、D>Tであるから、
閾値としてはSoすなわち12を用いることとなり、各
画素信号は第2図のように2値化される。
If T=10, then D>T, so
As the threshold value, So, that is, 12 is used, and each pixel signal is binarized as shown in FIG.

なお、画信号レベルが閾値と等しい場合は白とした。Note that when the image signal level is equal to the threshold value, it is assumed to be white.

第3図及び第4図は本発明装置の機能説明のための他の
画信号例及び処理画像を示す。
3 and 4 show other examples of image signals and processed images for explaining the functions of the apparatus of the present invention.

第3図は他の画信号例であって、50=30゜S□r=
31. S−1−=28.D = 3となるT=10の
場合、D<Tであるので閾値はS9を使うこととなる。
FIG. 3 shows another image signal example, 50=30°S□r=
31. S-1-=28. In the case of T=10, where D=3, since D<T, the threshold value S9 is used.

S、の値は通常白レベル(31)と黒レベル(0)の中
間に近い値が選ばれているので、S、 = 18とすれ
ば、全画信号はS、より大であるので第4図に示すよう
に全画素とも白となる。
The value of S is usually chosen to be close to the middle between the white level (31) and the black level (0), so if S, = 18, the full picture signal is larger than S, so the fourth As shown in the figure, all pixels become white.

このような例は原稿上で文字図形等が記載されていない
背景部で生じる。
Such an example occurs in a background portion of a manuscript where no characters or graphics are written.

第5図及び第6図は本発明装置の機能説明のためのさら
に他の画信号例及び処理画像を示す。
FIGS. 5 and 6 show further examples of image signals and processed images for explaining the functions of the apparatus of the present invention.

第5図は、黒領域の中央部等で発生する画信号例であり
、D<Tであるため2値化信号は第6図のようになる。
FIG. 5 shows an example of an image signal generated at the center of a black area, and since D<T, the binary signal becomes as shown in FIG. 6.

本装置によらず全画素を一定閾値18により2値化した
場合、第3図、第5図の場合は、第4図。
In the case of FIGS. 3 and 5 when all pixels are binarized using a constant threshold value 18 regardless of the present apparatus, FIG.

第6図と同様になるが、第1図の画信号例の場合は第7
図のように2値化される。
The result is the same as in Fig. 6, but in the case of the image signal example in Fig. 1, the 7th
The image is binarized as shown in the figure.

第7図は従来装置による処理画例である。FIG. 7 is an example of an image processed by a conventional device.

これを第2図と比較すると画素1,2.3及び画素4が
異なっている。この差が、本方式において分解能の良い
2値化処理画像が得られる理由である。
Comparing this with FIG. 2, pixels 1, 2.3 and pixel 4 are different. This difference is the reason why a binarized image with good resolution can be obtained in this method.

上記説明では、D>Tのブロックでは閾値S。を画信号
レベルの平均として求めたが、S□、とSm1nの間で
種々に設定できる。
In the above description, the threshold value S is used for blocks where D>T. was determined as the average of the image signal level, but it can be set variously between S□ and Sm1n.

〔実施例2〕 第8図、第9図は画素単位に処理する場合の画信号例と
処理画例を示す。
[Embodiment 2] FIGS. 8 and 9 show an example of an image signal and an example of a processed image when processing is performed pixel by pixel.

第8図において、9画素の中央の画素を2値化する場合
について説明する。当該画素の画信号レベルをX、周辺
の8画素の画信号レベルをそれぞれat b* Cr 
d+ e+ L g+ hとする。
In FIG. 8, a case will be described in which the central pixel of nine pixels is binarized. The pixel signal level of the relevant pixel is X, and the pixel signal levels of the surrounding eight pixels are at b* Cr.
Let d+ e+ L g+ h.

a−Xg b−x、 c−x、 d−x、 e−x、 
f−x、 g−X+ h−xの値を求め、これらの絶対
値のうちの最も大きい値をDlとする。
a-Xg b-x, c-x, d-x, e-x,
The values of f−x, g−X+h−x are determined, and the largest value among these absolute values is set as Dl.

また、X及びa、t’t Ct d+ e* L gt
 hの9固化号レベルの平均値を81とする。D、の値
を予め定められている値T1と比較してDl>T工なら
ば画信号Xを閾値S1により2値化する。
Also, X and a, t't Ct d+ e* L gt
The average value of the No. 9 hardening level of h is assumed to be 81. The value of D is compared with a predetermined value T1, and if Dl>T, the image signal X is binarized using a threshold value S1.

すなわちX≧S、ならば白、XくS□ならば黒とする。That is, if X≧S, the color is white, and if X×S□, the color is black.

一方、D工≦T1ならば、予め定められている値S?に
より2値化する。
On the other hand, if D<T1, then the predetermined value S? It is binarized by

例えば、第9図の画信号例について説明する。For example, the image signal example shown in FIG. 9 will be explained.

画素Pを2値化する場合を考えると、この場合、D□=
12,51=16.7.T1=8とすれば、D工>rx
であるので画素Pは閾値S8によって2値化することと
なり、20) S 1= 16.7であるので画素Pは
白となる。
Considering the case where pixel P is binarized, in this case, D□=
12,51=16.7. If T1=8, then D>rx
Therefore, the pixel P is binarized using the threshold value S8, and 20) Since S 1 = 16.7, the pixel P becomes white.

一方、画素Qの場合はり、=7.S□= 25.8とな
る。D1≦T1であるのでS、により2値化することと
なる。S?=18ならば画素Qは白となる。
On the other hand, in the case of pixel Q, =7. S□=25.8. Since D1≦T1, binarization is performed using S. S? =18, the pixel Q becomes white.

第8図では、着目画素の周辺8画素を参照してSl、D
lを求めたが、上下左右の4画素のみとするとか、ある
いは第10図に示すように200画素含めてSl、D□
の値を求めるなど種々の方法が可能である。
In FIG. 8, referring to the eight pixels surrounding the pixel of interest, Sl, D
I have calculated l, but it is possible to calculate only 4 pixels on the top, bottom, left and right, or to include 200 pixels as shown in Fig. 10, Sl, D□
Various methods are possible, such as finding the value of .

第10図は画素単位に処理する場合の他の構成例を示す
FIG. 10 shows another example of the configuration when processing is performed pixel by pixel.

実施例1ではブロック単位に、実施例2では画素単位に
処理する場合について説明したが、共通する点は次の事
である。
In the first embodiment, a case has been described in which processing is performed block by block, and in Example 2, processing is performed pixel by pixel, but the common points are as follows.

(1)着目画素近傍の画信号レベルの変化が大きいとき
は画信号レベルの変化に情報が含まれているものとみな
し、近傍画素の画信号レベルより求められた閾値により
着目画素を2値化する。
(1) When the change in the image signal level near the pixel of interest is large, it is assumed that the change in the image signal level contains information, and the pixel of interest is binarized using a threshold value determined from the pixel signal level of the neighboring pixel. do.

(2)着目画素近傍の画信号レベルの変化が小さいとき
は画信号レベルの変化はノイズ等によるものであるとみ
なし、近傍画素の画信号レベルとは独立に設定される閾
値によって2値化する。
(2) When the change in the image signal level near the pixel of interest is small, the change in the image signal level is assumed to be due to noise, etc., and is binarized using a threshold that is set independently of the image signal level of the nearby pixel. .

以上の説明では白レベル、黒レベル、閾値S?、閾値選
択のためのパラメータT(あるいはT、)を一定値にと
る場合を説明した。然し乍ら、これらは必ずしも一定値
とする必要はなく、これらすべてを、あるいはその一部
を画信号の内容に応じて変えることもできる。
In the above explanation, white level, black level, threshold S? , the case where the parameter T (or T) for threshold selection is set to a constant value has been explained. However, these do not necessarily have to be constant values, and all or some of them can be changed depending on the content of the image signal.

以下、これについて説明する。This will be explained below.

原画像のコントラストが小さいと、濃淡の変化に情報が
含まれている場合であってもD(あるいはり、)が小さ
くなるため、D<T(あるいはn t < T 1)と
なり、分解能が悪くなりやすい。
If the contrast of the original image is low, even if information is included in changes in shading, D (or ratio) will be small, so D < T (or n t < T 1), resulting in poor resolution. Prone.

この対策としては例えばコントラストが小さい場合はT
(あるいはT□)の値も小さくなるようにパラメータが
自動設定されるようになっていればよい。そのためには
、特願昭60−156065号でも述べているように、
原画像中より白レベル、黒レベルを検出してこれをもと
に閾値S9、パラメータT(あるいはT1)等を算出す
ればよい。
As a countermeasure for this, for example, if the contrast is small, T
It is sufficient if the parameters are automatically set so that the value of (or T□) also becomes small. To that end, as stated in Japanese Patent Application No. 156065/1980,
The white level and black level may be detected from the original image, and based on these, the threshold value S9, parameter T (or T1), etc. may be calculated.

〔実施例3〕 第11図は本発明の実施例の構成を示す図であってm 
X mのブロックを単位として処理する場合を示し、5
はラインメモリ、6はコンパレータ、7は白黒レベル検
出回路、8はブロック平均(So)算出回路、9はブロ
ック内差分値CD)算出回路、10はコンパレータ、1
1.12はメモリである。
[Embodiment 3] FIG. 11 is a diagram showing the configuration of an embodiment of the present invention.
Indicates the case where blocks of X m are processed as a unit, and 5
is a line memory, 6 is a comparator, 7 is a black and white level detection circuit, 8 is a block average (So) calculation circuit, 9 is an intra-block difference value CD) calculation circuit, 10 is a comparator, 1
1.12 is a memory.

これらを動作するには、ライン順次に入力される画信号
をラインメモリ5に記憶しながら、白黒レベル検出回路
7により、画像の白レベルSw及び黒レベルS、を求め
る。この場合、第nライン目までの画信号によって求め
たSl及びS8の値を用いて、第n+1ライン目の画信
号を処理すブロック内差分値検出回路9は各ブロック毎
の画信号レベルの最大値S□、と最小値s+wtaの差
りを求める。
In order to operate these, the white level Sw and black level S of the image are determined by the monochrome level detection circuit 7 while storing the image signals that are inputted line-by-line in the line memory 5. In this case, using the values of Sl and S8 obtained from the image signals up to the n-th line, the intra-block difference value detection circuit 9 that processes the image signal of the (n+1)-th line detects the maximum image signal level of each block. Find the difference between the value S□ and the minimum value s+wta.

コンパレータ10は、ブロック内差分値検出回路9の出
力りを白黒レベル検出回路7の出力Tと比較し、D)T
ならば出力をHighレベル、D≦TならLowレベル
とする。
The comparator 10 compares the output of the intra-block difference value detection circuit 9 with the output T of the black and white level detection circuit 7, and D)T
If so, the output is set to High level, and if D≦T, the output is set to Low level.

コンパレータの出力は、各ブロック毎に独立の値が出力
されるので、これらを−時メモリ11に記憶する。
Since the comparator outputs independent values for each block, these are stored in the -time memory 11.

この間、ブロック平均算出回路8は、各ブロック毎の画
信号レベルの平均値S。を求め、これらを−時、メモリ
12に記憶する。
During this time, the block average calculation circuit 8 calculates the average value S of the image signal level for each block. are calculated and stored in the memory 12.

第mライン目の画信号が入力され終ったとき。When the mth line image signal has been input.

各画素の画信号レベル、最初のブロック列の各ブロック
の平均値S0の値、ならびにDとTの比較結果がそれぞ
れメモリ5.12.11に記憶されいる。
The image signal level of each pixel, the average value S0 of each block in the first block row, and the comparison results between D and T are stored in the memory 5.12.11, respectively.

第m+1ライン目のに画素目信号をラインメモリ5に記
憶する場合、その直前に、すでに記憶されている第1ラ
イン目のに画素目の画信号を読み出しコンパレータ6に
入力する。
Immediately before storing the pixel signal on the m+1th line in the line memory 5, the already stored pixel signal on the first line is read out and input to the comparator 6.

コンパレータ6は、ラインメモリ5より出力される画信
号レベルaをセレクタ13の出力すと比較し、a≧bな
らば出力を)lighレベル(白に相当)。
The comparator 6 compares the image signal level a output from the line memory 5 with the output from the selector 13, and if a≧b, outputs a light level (corresponding to white).

a < bならば出力をLowレベル(黒に相当)とす
る。
If a < b, the output is set to Low level (corresponding to black).

この場合、メモリ11の出力は当該画信号が属するブロ
ックの閾値選択信号を表しており、セレクタ13はメモ
リ11の出力がHighレベルならSoを、Lowレベ
ルならS?を選択してコンパレータ6に入力する。この
結果、コンパレータ6からは、ブロック内差分値りの値
に応じて閾値がS、、S、のいずれかに自動選択された
値によって2値化された画信号が出力される。しかも白
黒レベルS、、S。
In this case, the output of the memory 11 represents the threshold selection signal of the block to which the image signal belongs, and the selector 13 selects So if the output of the memory 11 is High level, and S? if the output of the memory 11 is Low level. is selected and input to comparator 6. As a result, the comparator 6 outputs an image signal whose threshold value is automatically selected from S, , S, depending on the intra-block difference value. Moreover, the black and white level is S,,S.

が自動検出されるのでコントラストの低い画像の場合に
も最適2値化された画信号が得られる。
is automatically detected, so even in the case of an image with low contrast, an optimally binarized image signal can be obtained.

このように、1ライン目の画信号を逐次処理しながら、
ラインメモリ5には第m+1ライン目の画信号を記憶し
て行く、以下、2,3・・・ライン目の画信号を処理し
ながら第m+2.m+3・・・ライン目の画信号を逐次
ラインメモリ5に記憶し、同時にm+1ライン目以後の
画信号について、So。
In this way, while sequentially processing the image signal of the first line,
The line memory 5 stores the image signal of the (m+1)th line. Hereinafter, while processing the image signal of the 2nd, 3rd, etc. lines, the m+2. The image signals of the m+3th line are sequentially stored in the line memory 5, and at the same time, the image signals of the m+1th line and subsequent lines are stored in So.

S、、T、Dの値を求め前述の処理をくり返す。The values of S, , T, and D are determined and the above-mentioned process is repeated.

〔実施例4〕 第12図は文字、写真の混在画像の識別処理を行いなが
ら同時に本発明の処理を行う場合の実施例であって、1
5はラインメモリ、16.17はそれぞれブロック毎の
最大値、最小値検出回路、18はブロック毎の差分値り
の演算回路、19はブロック毎の中央値の演算回路、2
0は白黒レベル検出回路、21は演算回路、22はコン
パレータ、24は2値化処理のためのコンパレータであ
る。
[Embodiment 4] FIG. 12 shows an embodiment in which the processing of the present invention is performed simultaneously while performing identification processing of an image containing mixed text and photographs.
5 is a line memory, 16.17 is a maximum value and minimum value detection circuit for each block, 18 is a calculation circuit for calculating a difference value for each block, 19 is a calculation circuit for a median value for each block, 2
0 is a black and white level detection circuit, 21 is an arithmetic circuit, 22 is a comparator, and 24 is a comparator for binarization processing.

これを動作するには実施例3と同様にライン順次に入力
され画信号をラインメモリ15に記憶しながら、白黒レ
ベル検出回路20により白レベルSW及び黒レベルS、
を求める。
To operate this, as in the third embodiment, while inputting image signals line sequentially and storing them in the line memory 15, the black and white level detection circuit 20 detects the white level SW, the black level S,
seek.

の値を求める。Find the value of.

最大値検出回路16は順次入力される画信号を比較して
ブロック毎の最大値S□、を検出する。
The maximum value detection circuit 16 compares the sequentially input image signals and detects the maximum value S□ for each block.

同様に最小値検出回路17はブロック毎の最小値Smi
。を検出する。
Similarly, the minimum value detection circuit 17 detects the minimum value Smi for each block.
. Detect.

ブロックサイズをmXmとすれば、mライン目の第m 
k (k=1.2・・・)番目の画信号が入力された時
点で、第に番目のブロックの最大値S□2、最小値Sm
l+xが求まる。このSva*Xs S+mloから直
ちに、演算回路18によりD =S+++a!  S+
alaを求め、演算回路21より出力される信号Sユと
ともにコンパレータ22に入力する。コンパレータ22
はDの値が大きいと文字領域の高分解能を必要とする領
域として、Dの値が小さいと写真等の濃淡表現を必要と
する領域として判定するためのものである。そのためD
≧Siならばコンパレータ22の出力S2は直ちに、メ
モリ23に各ブロック毎に記憶される。
If the block size is mXm, then the mth line
At the time when the k (k=1.2...)th image signal is input, the maximum value S□2 and the minimum value Sm of the th block
l+x is found. Immediately from this Sva*Xs S+mlo, the arithmetic circuit 18 calculates D=S+++a! S+
ala is determined and inputted to the comparator 22 together with the signal Syu output from the arithmetic circuit 21. Comparator 22
If the value of D is large, the area is determined to be a character area requiring high resolution, and if the value of D is small, it is determined to be an area that requires shading expression such as a photograph. Therefore D
If ≧Si, the output S2 of the comparator 22 is immediately stored in the memory 23 for each block.

し、これを2値化の閾値として使用するため、各ブロッ
ク毎にメモリ27に記憶させる。
Since this is used as a threshold for binarization, it is stored in the memory 27 for each block.

コンパレータ24は、第11図のコンパレータ6と同様
に、第m+i2ライン目の画信号が入力される時に、ラ
インメモリ15より出力される第Qライン目の画信号a
をコンパレータ24に入力し、セレクタ26の出力すと
比較して2値化出力する。
Similar to the comparator 6 in FIG.
is input to the comparator 24, compared with the output of the selector 26, and output as a binary value.

この場合、セレクタ26はメモリ23より出力される信
号S、によって、ROM25より出力される閾値信号S
4とメモリ27より出力される閾値信号S0の一方を選
択してコンパレータ24へ信号すとして入力する。すな
わち、S3がHighレベルなら高い分解能が得られる
ようにブロック内の各画素に同一の閾値S0を与えるよ
うに選択する。
In this case, the selector 26 receives the threshold signal S output from the ROM 25 by the signal S output from the memory 23.
4 and the threshold signal S0 outputted from the memory 27 is selected and inputted to the comparator 24 as a signal. That is, if S3 is at a high level, the same threshold value S0 is selected to be given to each pixel in the block so that high resolution can be obtained.

一方、S、がLot+レベルなら、濃淡表現が可能とな
るようにROM25に記憶されているディザ閾値S4を
与えるように選択する。ディザ閾値S4は画素位置によ
って閾値の値が周期的に変わるように値が設定されてい
るため、画信号レベルaの値に応じて黒画素の密度が変
わり濃淡表現が可能となる。このようにして、端子Aに
ライン順次に入力される画信号は、最適に2値化された
上で端子Bより4ライン遅延して出力される。
On the other hand, if S is at Lot+ level, the dither threshold value S4 stored in the ROM 25 is selected so as to enable gradation expression. Since the dither threshold value S4 is set so that the threshold value changes periodically depending on the pixel position, the density of black pixels changes depending on the value of the image signal level a, making it possible to express light and shade. In this way, the image signals that are line-sequentially input to terminal A are optimally binarized and then output from terminal B with a delay of 4 lines.

で与えたが、必ずしもこの値である必要はなく、S□、
と5slnの間で適当に述べればよい。
However, it does not necessarily have to be this value, and S□,
and 5sln.

例えば、濃く表現したい場合は少し太き目に、淡くした
い場合は少し小さ目に選べばよい、演算は必ずしも必要
なく、出力画像の要求条件に応じてこの近傍で値を変え
てもよい。
For example, if you want to express it darkly, you can choose a slightly thicker one, and if you want to make it lighter, you can choose a slightly smaller one; calculation is not necessarily necessary, and you may change the value in this vicinity depending on the requirements of the output image.

第13図は本発明の白黒レベル検出回路の構成を示す一
実施例のブロック図であり、前走査線の画信号によって
新しい走査線のパラメータを決定するものであって、2
8.29はコンパレータ、30.31は、カウンタ、3
2はコントラストを求める演算回路、33.34はそれ
ぞれ白レベル、黒レベルを出力するラッチ回路、35は
ゲート回路である。
FIG. 13 is a block diagram of an embodiment showing the configuration of the black and white level detection circuit of the present invention, which determines the parameters of a new scanning line based on the image signal of the previous scanning line.
8.29 is a comparator, 30.31 is a counter, 3
2 is an arithmetic circuit for calculating contrast, 33 and 34 are latch circuits that output a white level and a black level, respectively, and 35 is a gate circuit.

ここで、ラッチ回路の一画面の最初は適当な初期値に設
定されている。
Here, the beginning of one screen of the latch circuit is set to an appropriate initial value.

なお、以下の説明では、白レベルを大きい値、黒レベル
を小さい値で表すこととする。
In the following description, the white level will be expressed as a large value, and the black level will be expressed as a small value.

画信号はコンパレータ28及び29に入力される。The image signal is input to comparators 28 and 29.

コンパレータ28はカウンタ30と共に一走査線上の画
信号の中から白と期待させる濃度レベルを検出するもの
である。
The comparator 28, together with the counter 30, detects the density level expected to be white from among the image signals on one scanning line.

即ち、コンパレータ28には各画素信号入力と同期して
画信号とカウンタ30の出力が入力され、これらの大小
が比較される。
That is, the image signal and the output of the counter 30 are input to the comparator 28 in synchronization with each pixel signal input, and their magnitudes are compared.

もし画信号の方が大きければ、コンパレータ28よりの
出力がHighとなるので、カウンタ30にカウントパ
ルスが入力されることとなり、カウンタ3゜のカンウド
値がアップする。
If the image signal is larger, the output from the comparator 28 becomes High, so a count pulse is input to the counter 30, and the count value of the counter 3° increases.

画信号の方が小さい場合は、コンパレータ28の出力は
Lowであるのでカウンタ値は変化しない。
If the image signal is smaller, the output of the comparator 28 is Low, so the counter value does not change.

各画信号毎にこの動作を行うと、カウンタ30のカウン
ト値は画信号レベルより小さい間はカウントアツプが継
続する。
When this operation is performed for each image signal, the count value of the counter 30 continues to count up as long as it is smaller than the image signal level.

従って、各走査線毎にカウントのリセットを行えば、各
走査線毎に白と期待されるレベルをカウンタ30の出力
信号又として出力できる。
Therefore, by resetting the count for each scanning line, the level expected for white can be output as the output signal of the counter 30 for each scanning line.

同様に、コンパレータ29とカウンタ31は各走査線毎
に黒と期待されるレベルを検出し、カウンタ31の出力
Yとして出力する。
Similarly, the comparator 29 and the counter 31 detect the level expected to be black for each scanning line, and output it as the output Y of the counter 31.

例えば、画信号レベル0の考えられる最も黒いレベル(
31)を、考えられる最も白いレベルと定義すると、各
走査線の最初にカウンタ31をレベル(31)にプリセ
ットし、以後、各画信号に同期してコンパレータ29の
出力がLowになる毎にカウンタ31のカウント値を1
だけ減じる。
For example, the blackest possible level of image signal level 0 (
31) is defined as the whitest possible level, the counter 31 is preset to level (31) at the beginning of each scanning line, and thereafter, the counter 31 is preset to level (31) in synchronization with each image signal, and every time the output of the comparator 29 becomes Low, the counter 31 is preset to level (31). 31 count value to 1
decreases by

コンパレータ29では画信号とカウンタ31の出力が比
較され、画信号の方が大きいと出力が)Iigh、小さ
いとLOνになるように設定されている。
The comparator 29 compares the image signal with the output of the counter 31, and is set so that if the image signal is larger, the output is )Ihigh, and if it is smaller, the output is LOν.

この結果、カウンタ31の出力が画信号より大きい間は
カウント数が減じられるため、各ラインの最後には黒と
期待されるレベルをカウンタ31より信号Yとして出力
する。
As a result, as long as the output of the counter 31 is greater than the image signal, the count is decremented, so that at the end of each line, the counter 31 outputs a level expected to be black as a signal Y.

一走査線の画信号入力が終了すると、カウンタ30.3
1の出力X、Yはそれぞれ、当該走査線の。
When the image signal input for one scanning line is completed, the counter 30.3
The outputs X and Y of 1 are respectively for the scanning line.

白と期待されるレベル及び黒と期待されるレベルを表し
ている。信号Xは新しい白レベルの候補、信号Yは新し
い黒レベルの候補となる。
White represents the expected level and black represents the expected level. Signal X becomes a new white level candidate, and signal Y becomes a new black level candidate.

これらの信号a、bを新しいパラメータとして決定する
に当っては、次のことを考慮しなければならない。
In determining these signals a and b as new parameters, the following must be considered.

それは、文書原稿等において、行間等では黒い部分が全
く存在しない場合があることである。
That is, in a document or the like, there are cases where there are no black parts at all between lines.

この場合、前記カウンタ31の出力YはXに等しいかあ
るいは近い値になるが、これは原稿の白い部分のうち最
もレベルの低い(黒に近い)レベル値であって黒レベル
ではない。
In this case, the output Y of the counter 31 is equal to or close to X, but this is the lowest level value (closer to black) among the white parts of the document and is not the black level.

そのため、演算回路32により、信号XとYの差を求め
る。この差の値は白黒のコントラストを表しており、こ
のコントラストが所定値以上のときは演算回路32の出
力は)lighとなる。
Therefore, the arithmetic circuit 32 calculates the difference between the signals X and Y. The value of this difference represents the contrast between black and white, and when this contrast is greater than a predetermined value, the output of the arithmetic circuit 32 becomes ``light''.

このときゲート回路35の出力はHighとなり、信号
X、Yの値がそれぞれ新しい白レベル、黒レベル、とし
てそれぞれラッチ回路33.34にラッチされる。
At this time, the output of the gate circuit 35 becomes High, and the values of the signals X and Y are latched into the latch circuits 33 and 34 as new white and black levels, respectively.

もし、信号XとYの差が所定値以下のとき、原稿面には
有意のコントラストはなく、全部白(あるいは全部具)
と推定されるので演算回路32の出力2はLowとなり
ゲート回路35の出力にはラッチ信号は出力されない、
この結果、信号X、Yは新しい値としては再生されず、
ラッチ回路33.34には以前の値がそのまま出力され
ることになる。
If the difference between signals
Therefore, the output 2 of the arithmetic circuit 32 becomes Low, and no latch signal is output to the output of the gate circuit 35.
As a result, the signals X, Y are not reproduced as new values,
The previous value will be output as is to the latch circuits 33 and 34.

このようして、順次、現走査線の画信号内容によって次
走査線を処理するためのパラメータを決定することがで
きる。
In this way, parameters for processing the next scan line can be determined sequentially based on the image signal content of the current scan line.

勿論、1ラインのメモリを保有すれば、現走査線の画信
号より白、黒レベルを決定する間、画信号を一時メモリ
しておき、現走査線画信号より決定した白、黒レベルを
使って現走査線を処理することもできる。
Of course, if you have one line of memory, you can temporarily store the image signal in memory while determining the white and black levels from the image signal of the current scanning line, and use the white and black levels determined from the current scanning line image signal. It is also possible to process the current scan line.

また、第13図の説明で、ゲート回路35の出力がHi
ghの場合のみ白レベルを新しい値Xで置き換えるよう
にラッチ回路33を動作させる場合を示しているが、白
レベルについては、この条件は必ずしも必要でなく、常
に新しい値aに置き換えるようにしても良い。
In addition, in the explanation of FIG. 13, the output of the gate circuit 35 is High.
Although the case is shown in which the latch circuit 33 is operated to replace the white level with a new value X only in the case of gh, this condition is not necessarily necessary for the white level, and even if it is always replaced with a new value a. good.

前記説明では、各走査線毎の白レベル、黒レベルを求め
るためにカウンタを使用したが、ここで注意すべきこと
は、カウンタ30及び31の出力が必ずしも厳密に最も
白いレベル、最も黒いレベルを表してはいないことであ
る。
In the above explanation, counters were used to determine the white level and black level for each scanning line, but it should be noted here that the outputs of the counters 30 and 31 do not necessarily strictly correspond to the whitest level and blackest level. It is not expressed.

すなわち、特に黒い画素あるいは特に白い画素が1画素
のみ存在してもカウンタ値は1だけしか変化しないので
、ゴミや雑音による異常信号により影響を受けにくい。
That is, even if there is only one particularly black pixel or one particularly white pixel, the counter value changes only by 1, so it is hardly affected by abnormal signals due to dust or noise.

以上の実施例では、ブロック単位に閾値を説明する場合
を示したが、第8図、第9図で説明したような、画素単
位に閾値を選択する場合についても同様の回路は容易に
実現できる。
In the above embodiment, the case where the threshold value is explained for each block is shown, but a similar circuit can be easily realized for the case where the threshold value is selected for each pixel as explained in FIGS. 8 and 9. .

(発明の効果) 以上説明したように、本発明装置は、背景部あるいは写
真領域等と区別して文字等のように高分解能を要求され
る領域のみを抽出して、小領域毎に画信号に応じた閾値
を設定するので高品質の2値化画像が得られる。
(Effects of the Invention) As explained above, the device of the present invention extracts only areas that require high resolution, such as characters, by distinguishing them from background areas, photographic areas, etc., and converts image signals into image signals for each small area. Since the threshold value is set accordingly, a high quality binarized image can be obtained.

また、原稿中より黒レベル、白レベルを自動的に識別し
てこれをもとにパラメータを決定することにより、コン
トラストの低い画像も良好に2値化できる。
Furthermore, by automatically identifying the black level and white level in the document and determining parameters based on this, even images with low contrast can be binarized with good results.

従って、本装置をファクシミリ等の画像入力装置に適用
すれば分解能の良い2値化画像を得ることができる。
Therefore, if this device is applied to an image input device such as a facsimile, a binarized image with good resolution can be obtained.

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

第1図、第2図は本発明装置の機能説明のための画信号
例及び処理画像。 第3図、第4図は本発明装置の機能説明のための他の画
信号例及び処理画像。 第5図、第6図は本発明装置の機能説明のためのさらに
他の画信号例及び処理画像、 第7図は従来装置による処理画例、 第8図、第9図は画素単位に処理する場合の画信号例と
処理画例、 第10図は画素単位に処理する場合の他の構成例、第1
1図は本発明装置の実施例。 第12図は白黒レベルを自動検出する機能ならびに文字
、写真等の領域識別機能を有し、1淡表現をも可能とす
る場合の実施例、 第13図は白黒レベルを自動検出する機能を有する実施
例である。 P、Q・・・着目画素、 5 ・・・ラインメモリ、6,10・・・コンパレータ
、7 ・・・白黒レベル検出回路、 8 ・・・ブロック平均算出回路、 9 ・・・ブロック内差分値検出回路、11.12,2
3,27・・・メモリ。 13.26・・・セレクタ、15・・・ラインメモリ、
16・・・最大値検出回路。 17・・・最小値検出回路、 18・・・差分値演算回路、 19・・・中央値の演算回路、 20・・・白黒レベル検出回路、 21.32・・・演算回路、25・・・ROM、22.
24,28.29・・・ コンパレータ、30.31・
・・カウンタ、33.34・・・ラッチ回路、35・・
・ゲート回路。 第1図 第2図 第3図 ¥、5図 第6図 y?;7図 第8図 第9図 第11図
FIGS. 1 and 2 show examples of image signals and processed images for explaining the functions of the apparatus of the present invention. FIGS. 3 and 4 show other examples of image signals and processed images for explaining the functions of the apparatus of the present invention. Figures 5 and 6 are further examples of image signals and processed images for explaining the functions of the device of the present invention, Figure 7 is an example of images processed by the conventional device, and Figures 8 and 9 are processed pixel by pixel. An example of an image signal and an example of a processed image when
Figure 1 shows an embodiment of the device of the present invention. Figure 12 shows an example of a case that has a function to automatically detect the black and white level and a function to identify areas such as text and photographs, and also allows for 1-tone expression. Figure 13 has a function to automatically detect the black and white level. This is an example. P, Q...Pixel of interest, 5...Line memory, 6,10...Comparator, 7...Black and white level detection circuit, 8...Block average calculation circuit, 9...Intra-block difference value Detection circuit, 11.12,2
3,27...Memory. 13.26...Selector, 15...Line memory,
16... Maximum value detection circuit. 17... Minimum value detection circuit, 18... Difference value arithmetic circuit, 19... Median value arithmetic circuit, 20... Black and white level detection circuit, 21.32... Arithmetic circuit, 25... ROM, 22.
24, 28.29... Comparator, 30.31.
...Counter, 33.34...Latch circuit, 35...
・Gate circuit. Figure 1 Figure 2 Figure 3 ¥, Figure 5 Figure 6 y? ;7 Figure 8 Figure 9 Figure 11

Claims (6)

【特許請求の範囲】[Claims] (1)画像中の複数の画素よりなる各ブロック毎に画信
号レベルの最大値及び最小値を求める手段と、 前記画信号レベルの最大値及び最小値より、当該ブロッ
クの画信号を2値化するための第1の閾値を算出する手
段と、 前記第1の閾値と、前記画信号レベルの最大値及び最小
値とは独立に与えられる第2の閾値のいずれかを各ブロ
ック毎に選択する手段と、 少なくとも1つ以上のブロックについて前記選択された
第1の閾値あるいは第2の閾値のいずれかを用いて当該
ブロックの画信号を2値化する手段と、 を有することを特徴とする画像処理装置。
(1) Means for determining the maximum and minimum values of the image signal level for each block consisting of a plurality of pixels in the image, and binarizing the image signal of the block from the maximum and minimum values of the image signal level. means for calculating a first threshold value for each block; selecting either the first threshold value or a second threshold value given independently of the maximum value and minimum value of the image signal level for each block; and means for binarizing the image signal of at least one block using either the selected first threshold value or the second threshold value. Processing equipment.
(2)各画素毎に近傍画素との画信号レベルの変化の大
きさを求める手段と、 各画素毎に当該画素及び近傍画素の画信号レベルより当
該画素の画信号を2値化するための第1の閾値を算出す
る手段と、 前記第1の閾値と、当該画素及び近傍画素の画信号レベ
ルとは独立に与えられる第2の閾値のいずれかを、各画
素毎に選択する手段と、 少なくとも1画素以上について前記選択された第1の閾
値あるいは第2の閾値いずれかを用いて当該画素の画信
号を2値化する手段と、 を有することを特徴とする画像処理装置。
(2) A means for determining the magnitude of change in the pixel signal level from neighboring pixels for each pixel, and a means for binarizing the pixel signal of the pixel from the pixel signal level of the pixel and neighboring pixels for each pixel means for calculating a first threshold; means for selecting for each pixel either the first threshold or a second threshold that is given independently of the pixel signal level of the pixel and neighboring pixels; An image processing apparatus comprising: means for binarizing a pixel signal of at least one pixel using either the selected first threshold value or the second threshold value.
(3)原画像より、黒レベルと白レベルを自動検出し、
前記自動検出した黒レベルと白レベルの差分値S_1及
び各ブロック毎の画信号レベルの最大値と最小値の差分
値Dを求め前記差分値S_1と差分値Dを比較し、この
結果に基づいて、第1の閾値、あるいは第2の閾値いず
れかを選択することを特徴とする特許請求の範囲第(1
)項記載の画像処理装置。
(3) Automatically detects the black level and white level from the original image,
The automatically detected difference value S_1 between the black level and white level and the difference value D between the maximum and minimum values of the image signal level for each block are determined, and the difference value S_1 and the difference value D are compared, and based on this result, , the first threshold value, or the second threshold value is selected.
).
(4)原画像より黒レベルと白レベルを自動検出し、前
記自動検出した黒レベルと白レベルの差分値S_1を求
め、前記差分値S_1と、近傍画素との画信号レベルの
変化の大きさCを比較し、この結果に基づいて、第1の
閾値あるいは第2の閾値のいずれかを選択することを特
徴とする特許請求の範囲第(2)項記載の画像処理装置
(4) Automatically detect the black level and white level from the original image, calculate the difference value S_1 between the automatically detected black level and white level, and calculate the magnitude of the change in image signal level between the difference value S_1 and the neighboring pixel. The image processing apparatus according to claim 2, wherein the image processing apparatus compares C and selects either the first threshold value or the second threshold value based on the result.
(5)所定数の走査線毎に、黒レベル、白レベルを求め
、逐次更新する手段を有することを特徴とする特許請求
の範囲第(3)項記載の画像処理装置。
(5) The image processing apparatus according to claim (3), further comprising means for determining and sequentially updating the black level and white level for each predetermined number of scanning lines.
(6)所定の走査線毎に黒レベル、白レベルを求め、逐
次更新する手段を有することを特徴とする特許請求の範
囲第(4)項記載の画像処理装置。
(6) The image processing apparatus according to claim (4), further comprising means for determining and sequentially updating the black level and white level for each predetermined scanning line.
JP61201813A 1986-08-29 1986-08-29 Picture processor Pending JPS6359272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61201813A JPS6359272A (en) 1986-08-29 1986-08-29 Picture processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61201813A JPS6359272A (en) 1986-08-29 1986-08-29 Picture processor

Publications (1)

Publication Number Publication Date
JPS6359272A true JPS6359272A (en) 1988-03-15

Family

ID=16447334

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61201813A Pending JPS6359272A (en) 1986-08-29 1986-08-29 Picture processor

Country Status (1)

Country Link
JP (1) JPS6359272A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02140887A (en) * 1988-11-22 1990-05-30 Ricoh Co Ltd Dot area separating system
WO1993017518A1 (en) * 1992-02-25 1993-09-02 Pfu Limited Image scanner
US5625718A (en) * 1992-02-25 1997-04-29 Pfu Limited White level setting system for an image scanner
US5915049A (en) * 1992-02-25 1999-06-22 Pfu Limited Binarization system for an image scanner
JP2010086324A (en) * 2008-09-30 2010-04-15 Fujitsu Ltd Binarization processing apparatus, information processing apparatus, binarization processing method, and binarization processing program
JP2010231644A (en) * 2009-03-27 2010-10-14 Optoelectronics Co Ltd Optical information reading device and optical information reading method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60236582A (en) * 1984-05-10 1985-11-25 Fuji Xerox Co Ltd Picture signal quantizing system
JPS6143078A (en) * 1984-08-07 1986-03-01 Fuji Xerox Co Ltd Processing system of original picture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60236582A (en) * 1984-05-10 1985-11-25 Fuji Xerox Co Ltd Picture signal quantizing system
JPS6143078A (en) * 1984-08-07 1986-03-01 Fuji Xerox Co Ltd Processing system of original picture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02140887A (en) * 1988-11-22 1990-05-30 Ricoh Co Ltd Dot area separating system
WO1993017518A1 (en) * 1992-02-25 1993-09-02 Pfu Limited Image scanner
US5625718A (en) * 1992-02-25 1997-04-29 Pfu Limited White level setting system for an image scanner
US5915049A (en) * 1992-02-25 1999-06-22 Pfu Limited Binarization system for an image scanner
JP2010086324A (en) * 2008-09-30 2010-04-15 Fujitsu Ltd Binarization processing apparatus, information processing apparatus, binarization processing method, and binarization processing program
JP2010231644A (en) * 2009-03-27 2010-10-14 Optoelectronics Co Ltd Optical information reading device and optical information reading method

Similar Documents

Publication Publication Date Title
JP3276985B2 (en) Image pixel processing method
US5572603A (en) Image processing method and device using such method
JP3636332B2 (en) Image processing method and image processing apparatus
JPH03208467A (en) Picture area identification system for picture processing unit
JPH1084475A (en) Image area discrimination method and image-processing unit
US5278919A (en) Image area determining apparatus
JP3772262B2 (en) How to identify the type of an image
JPS6359272A (en) Picture processor
JP3073837B2 (en) Image region separation device and image region separation method
JPH0775395B2 (en) Image processing device
JPS60136478A (en) Picture processor
KR940010474B1 (en) Picture improvement for fax
JPS6180964A (en) Picture signal processing method
JPS63288566A (en) Image processor
JP3996564B2 (en) Background detection method, image processing method, program, recording medium, image processing apparatus, and image forming apparatus
JP2777380B2 (en) Halftone area detection method
JPH0357083A (en) Image area separating method for binary picture
JPH01173973A (en) Gradation correcting device
JPS6180960A (en) Picture signal processing method
JPH0736607B2 (en) Image signal processing method
JP2005094796A (en) Image processing method and image processing system
JPH08223421A (en) Image processor
JPH02112077A (en) Dot area separating system
JPS6395779A (en) Picture device
JPH10243225A (en) Dot area detecting method