[go: up one dir, main page]

JPH07212591A - Image binarizer - Google Patents

Image binarizer

Info

Publication number
JPH07212591A
JPH07212591A JP6050397A JP5039794A JPH07212591A JP H07212591 A JPH07212591 A JP H07212591A JP 6050397 A JP6050397 A JP 6050397A JP 5039794 A JP5039794 A JP 5039794A JP H07212591 A JPH07212591 A JP H07212591A
Authority
JP
Japan
Prior art keywords
block
value
pixel
threshold
representative
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
JP6050397A
Other languages
Japanese (ja)
Inventor
Masashi Hirozawa
昌司 広沢
Masako Nakanishi
雅子 仲西
Tetsuya Taki
哲也 滝
Sadahiko Higami
貞彦 樋上
Hiroyoshi Toda
浩義 戸田
Toyoji Horikawa
豊史 堀川
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP6050397A priority Critical patent/JPH07212591A/en
Publication of JPH07212591A publication Critical patent/JPH07212591A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Input (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

(57)【要約】 【目的】 画像の輝度値のヒストグラムを作成して白、
黒の代表画素値を得、その平均より、高速に二値化閾値
を求める。 【構成】 元画像のビデオ信号を信号処理部1で信号処
理し、A/D変換部2でA/D変換され、多階調の輝度
をもつ画素値aとなる。A/D変換された画素値aは、
ヒストグラム作成部3に出力され、該ヒストグラム作成
部3により画素の輝度値のヒストグラム6が作成され
る。代表画素値検出部4は、ヒストグラム6より黒画素
代表値c、白画素代表値dを検出する。黒画素代表値
c、白画素代表値dは、閾値決定部5に渡され、二値化
閾値が決定される。決定の仕方は、黒画素代表値と白画
素代表値の平均を二値化閾値とする。
(57) [Summary] [Purpose] Create a histogram of the brightness value of the image,
The black representative pixel value is obtained, and the binarization threshold value is obtained at high speed from the average thereof. A video signal of an original image is processed by a signal processing unit 1 and A / D converted by an A / D conversion unit 2 to obtain a pixel value a having multi-level luminance. The A / D converted pixel value a is
It is output to the histogram creation unit 3, and the histogram creation unit 3 creates a histogram 6 of the brightness values of the pixels. The representative pixel value detection unit 4 detects a black pixel representative value c and a white pixel representative value d from the histogram 6. The black pixel representative value c and the white pixel representative value d are passed to the threshold value determining unit 5, and the binarization threshold value is determined. The method of determination is to use the average of the black pixel representative value and the white pixel representative value as the binarization threshold.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像二値化装置に関
し、より詳細には、多値画像上の影やむらを取り除いて
二値化する閾値を求める画像二値化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image binarization device, and more particularly to an image binarization device for removing a shadow or unevenness on a multivalued image to obtain a threshold value for binarization.

【0002】[0002]

【従来の技術】従来、二値化の閾値を求める方法として
は、仮の閾値を決め、ヒストグラムなどから二値化の品
質の評価関数値を求め、仮の閾値を変化させて評価関数
値が極大値,極小値をとる時を閾値とする方法や、固定
値を使う方法,画素値の最大値,最小値から閾値を求め
る方法,ヒストグラムのメディアン値などをとる方法な
ど、様々な方法があった。
2. Description of the Related Art Conventionally, as a method of obtaining a threshold value for binarization, a temporary threshold value is determined, an evaluation function value of the binarization quality is obtained from a histogram, and the temporary threshold value is changed to obtain an evaluation function value. There are various methods, such as a method that uses a threshold when the maximum and minimum values are taken, a method that uses a fixed value, a method that obtains a threshold from the maximum and minimum pixel values, and a method that takes the median value of a histogram. It was

【0003】また、従来、複写機・スキャナ・ファック
スなどの文書を読みとる機械は、光源を機器内に持ち、
光源から出した光を文書に当て、反射光をCCD(Char
ge Coupled Device:電荷結合素子)などで読みとって
いた。光源が一定なので、影や明るさむらが発生しにく
く、また、発生したとしても機器内の環境はほぼ一定な
ので、影や明るさむらの発生のしかたも一定であり、補
正は容易であった。一方、ビデオカメラや電子スチルカ
メラなどで取り込んだ画像は、光源の数,位置,強さな
どが様々であり、影や明るさむらが発生し易く、その発
生のしかたも一定していないので、補正することは難し
かった。
Conventionally, a machine for reading a document, such as a copying machine, a scanner, or a fax, has a light source inside the device,
The light emitted from the light source is applied to the document, and the reflected light is reflected by the CCD (Char
ge Coupled Device: Charge coupled device). Since the light source is constant, shadows and uneven brightness are unlikely to occur, and even if they occur, the environment inside the device is almost constant, so the way shadows and uneven brightness occur is constant, and correction is easy. . On the other hand, images captured by video cameras, electronic still cameras, etc. have various numbers of light sources, positions, and intensities, and shadows and brightness unevenness are likely to occur, and the way in which they occur is not constant. It was difficult to correct.

【0004】従来の画像二値化装置について記載した公
知文献としては、例えば、特開昭63−95779号公
報がある。この公報のものは、原稿上の背景部の白レベ
ルや文字図形部の黒レベルを自動検出するために、画像
中より所定の画像内容の領域を判定する判定手段と、該
判定手段により判定された画像領域の所定数の走査線毎
に原画像上の黒と期待されるレベルを求める手段と、前
記所定数の走査線毎に求めた黒と期待されるレベルが原
稿上の黒い部分の濃度を反映していることを検証する検
証手段と、該検証手段による検証結果に基づき、前記画
像上の所定領域の黒レベルが、以前に求めた値のままと
するか、前記新しく求めた黒と期待されるレベルに置き
換えられるかを選択する選択手段とを有するものであ
る。
A known document describing a conventional image binarization device is, for example, Japanese Patent Laid-Open No. 63-95779. In this publication, in order to automatically detect the white level of the background portion and the black level of the character / graphic portion on the document, the determination means for determining the area of a predetermined image content in the image, and the determination means Means for obtaining a level expected to be black on the original image for each predetermined number of scanning lines in the image area, and the level expected to be black obtained for each of the predetermined number of scanning lines is the density of the black portion on the document. Based on the verification result by the verification means and the verification result by the verification means, the black level of the predetermined area on the image is either the value previously obtained, or the newly obtained black And a selecting means for selecting whether or not the level is replaced with an expected level.

【0005】また、特開平3−237571号公報のも
のは、濃淡画像や距離画像などの多値画像を2値化処理
する際、最良の2値画像を得るためのしきい値を算出す
るために、ウィンドウ内の各画素につき、それぞれの明
さると特定画素の明るさとの差と、着目した画像部分の
コントラストに比例するパラメータとを比較して、ウィ
ンドウ内の画像を2値化処理し、ひとつの画像内にコン
トラストが異なる複数の画像部分が存在するような場合
に、ターゲットとなる画像部分のコントラストに応じて
前記パラメータを選択することにより、その画像部分に
ついて最適な2値化しきい値を算出し得るようにしたも
のである。さらに、特開平4−92982号公報のもの
は、画像の明るさのヒストグラムにおいて、文字・図形
部のピークが存在せず、または文字・図形部と背景部と
の間に谷部が存在しなくても、適当な2値化閾値を自動
的に求めて画像を2値化するものである。
Further, in Japanese Patent Laid-Open No. 3-237571, for binarizing multivalued images such as grayscale images and range images, a threshold value for obtaining the best binary image is calculated. Then, for each pixel in the window, the difference between the brightness and the brightness of the specific pixel is compared with a parameter proportional to the contrast of the image portion of interest, and the image in the window is binarized. In the case where a plurality of image parts having different contrasts exist in one image, by selecting the parameter according to the contrast of the target image part, an optimum binarization threshold value for the image part can be obtained. It can be calculated. Further, according to Japanese Patent Laid-Open No. 4-92982, the peak of the character / figure portion does not exist in the histogram of the brightness of the image, or the valley portion does not exist between the character / figure portion and the background portion. However, the image is binarized by automatically obtaining an appropriate binarization threshold value.

【0006】[0006]

【発明が解決しようとする課題】前述のように、従来の
画像二値化装置において、評価関数を使う方法は、閾値
を変えるごとに評価関数値を求めねばならず、処理時間
がかかる欠点があり、固定値や最大値,最小値,メディ
アン値を使う方法は二値画像の品質が劣っているなどの
欠点があった。また、複写機・スキャナ・ファックスな
どは、文書などを確実に読みとることができるので、二
値化して出力するのは容易であるが、機器の大きさ,重
さ,携帯性,電力などの点でビデオカメラに劣る。一
方、ビデオカメラや電子スチルカメラは、機器の大き
さ,重さ,携帯性,電力などの点で勝るが、文書などを
撮り込んでも影や明るさむらが出やすく、二値化して出
力することが難しいという欠点があった。
As described above, in the conventional image binarization method, the method of using the evaluation function has to have a drawback that it takes a long processing time because the evaluation function value must be obtained every time the threshold value is changed. However, the method of using the fixed value, the maximum value, the minimum value, and the median value has drawbacks such as poor quality of the binary image. In addition, since copiers, scanners, fax machines, etc. can reliably read documents, etc., it is easy to binarize and output them, but in terms of size, weight, portability, power, etc. of the device. It is inferior to a video camera. On the other hand, video cameras and electronic still cameras are superior in terms of size, weight, portability, power consumption, etc., but even if a document or the like is photographed, shadows and uneven brightness are likely to occur, and the image is binarized and output. It had the drawback of being difficult.

【0007】本発明は、このような実情に鑑みてなされ
たもので、画像の輝度値のヒストグラムを作り、ヒスト
グラムの明るい方または暗い方から何番目かの輝度値を
白,黒の代表画素値とし、その平均を二値化の閾値とす
ることで高速かつ高品位の二値化を行うこと、また、画
像をブロックに分割し、ブロック毎の二値化閾値又は白
/黒画素代表値を求め、文字のないブロックは周囲から
補間し、ブロックの閾値を画素毎の閾値にすることで、
画像中の影や明るさむらを取り除くようにした画像二値
化装置を提供することを目的としている。
The present invention has been made in view of the above situation, and a histogram of the brightness values of an image is created, and the brightness value of the histogram from the brighter side to the darker side of the histogram is represented by white and black representative pixel values. And perform high-speed and high-quality binarization by using the average as the binarization threshold, and divide the image into blocks and set the binarization threshold or the white / black pixel representative value for each block. The block without characters is interpolated from the surroundings, and the threshold of the block is set to the threshold for each pixel.
It is an object of the present invention to provide an image binarization device that removes shadows and uneven brightness in an image.

【0008】[0008]

【課題を解決するための手段】本発明は、上記目的を達
成するために、(1)多値画像より輝度値のヒストグラ
ムを求めるヒストグラム作成手段と、該ヒストグラム作
成手段により求められたヒストグラムより画像中の白画
素値、黒画素値を代表する値を求める代表画素値検出手
段と、該代表画素値検出手段により求められた白画素代
表値、黒画素代表値より二値化のための閾値を求める閾
値決定手段とを有すること、或いは、(2)ブロックに
分割した多値画像のブロック毎に二値化の閾値を求める
ブロック閾値検出手段と、ブロック中に、文字や図形が
含まれるかどうかを検出する文字図形ブロック検出手段
と、該文字図形ブロック検出手段により文字や図形が含
まれないと判断されたブロックの二値化の閾値を、周囲
のブロックの閾値から算出する非文字図形ブロック閾値
算出手段と、ブロック毎に求められた二値化の閾値から
1画素毎の閾値に変換する画素閾値算出手段と、該画素
閾値算出手段で求められた1画素毎の二値化閾値を用い
て元の多値画像を二値化する二値化手段とを有するこ
と、更には、(3)前記(2)において、前記ブロック
閾値検出手段により求められた閾値のうち、周囲のブロ
ックと比較して値の突出しているブロックの閾値を、周
囲のブロックの閾値から算出される値に置き換える閾値
突出ブロック除去手段を有すること、更には、(4)前
記(2)又は(3)において、前記非文字図形ブロック
閾値検出手段により得たブロック毎の閾値に対して、あ
るブロックの閾値と周囲のブロックの閾値との差を小さ
くするようにするブロック閾値平滑化手段を有するこ
と、更には、(5)前記(2),(3)又は(4)にお
いて、前記二値化手段で閾値と比較される多値画像にエ
ッジ強調をかけておくエッジ強調手段、もしくは元の多
値画像にあらかじめエッジ強調をかけておくエッジ強調
手段を有すること、或いは、(6)ブロックに分割した
多値画像のブロック毎に白画素の代表値と黒画素の代表
値を求めるブロック白黒代表画素値検出手段と、ブロッ
ク中に、文字や図形が含まれるかどうかを検出する文字
図形ブロック検出手段と、該文字図形ブロック検出手段
により文字や図形が含まれないと判断されたブロックの
代表画素値を、周囲のブロックの代表画素値から算出す
る非文字図形ブロック代表値算出手段と、該非文字図形
ブロック代表値算出手段で求められた白画素、黒画素の
代表画素値から当該ブロックの二値化の閾値を求めるブ
ロック閾値算出手段と、ブロック毎に求められた二値化
の閾値から1画素毎の閾値に変換する画素閾値算出手段
と、該画素閾値算出手段で求められた1画素毎の二値化
閾値を用いて元の多値画像を二値化する二値化手段とを
有すること、更には、(7)前記(6)において、前記
ブロック白黒代表画素値検出手段により求められた白画
素と黒画素の代表値のうち、周囲のブロックと比較して
値の突出しているブロックの代表画素値を、周囲のブロ
ックの代表画素値から算出される値に置き換える代表画
素値突出ブロック除去手段を有すること、更には、
(8)前記(6)又は(7)において、前記文字図形ブ
ロック検出手段により文字や図形が含まれないと判断さ
れたブロックに対し、当該ブロックの白画素代表値か黒
画素代表値のどちらが信頼できるかを選択するブロック
白黒代表画素値選択手段と、該ブロック白黒代表画素値
選択手段によって選択されなかった代表画素値を、周囲
のブロックの代表画素値から算出する非文字図形ブロッ
ク代表値算出手段とを有すること、更には、(9)前記
(6),(7)又は(8)において、前記非文字図形ブ
ロック代表値算出手段により得たブロック毎の白画素,
黒画素の代表値に対して、あるブロックの代表値と周囲
のブロックの代表値との差を小さくするようにするブロ
ック白黒代表画素値平滑化手段を有すること、更には、
(10)前記(6),(7)又は(8)において、前記
ブロック閾値算出手段により得たブロック毎の二値化閾
値に対して、あるブロックの閾値と周囲のブロックの閾
値との差を小さくするようにするブロック閾値平滑化手
段を有すること、更には、(11)前記(6)〜(1
0)のいずれかにおいて、前記二値化手段で閾値と比較
される多値画像にエッジ強調をかけておくエッジ強調手
段、もしくは元の多値画像にあらかじめエッジ強調をか
けておくエッジ強調手段を有することを特徴としたもの
である。
In order to achieve the above object, the present invention provides (1) a histogram creating means for finding a histogram of luminance values from a multivalued image, and an image from the histogram found by the histogram creating means. A representative pixel value detecting means for obtaining a value representative of the white pixel value and the black pixel value, and a threshold value for binarization from the white pixel representative value and the black pixel representative value obtained by the representative pixel value detecting means. Or (2) block threshold detection means for obtaining a binarization threshold value for each block of the multi-valued image divided into blocks, and whether or not the block contains characters or figures And a threshold for binarizing a block that is determined by the character / graphic block detection unit not to include a character or graphic as a threshold for surrounding blocks. A non-character figure block threshold calculation means for calculating the threshold value, a pixel threshold calculation means for converting the binarization threshold value calculated for each block into a threshold value for each pixel, and each pixel calculated by the pixel threshold value calculation means. And binarizing means for binarizing the original multi-valued image using the binarizing threshold value, and (3) in (2), the threshold value obtained by the block threshold value detecting means. Among them, a threshold protruding block removing unit that replaces the threshold value of the block having a protruding value compared with the surrounding block with a value calculated from the threshold value of the surrounding block is further provided, and further, (4) above (2) Alternatively, in (3), with respect to the threshold for each block obtained by the non-character figure block threshold detecting means, block threshold smoothing for reducing a difference between a threshold of a certain block and a threshold of surrounding blocks And (5) in (2), (3) or (4), an edge enhancing means for applying edge enhancement to a multi-valued image to be compared with a threshold value by the binarizing means, Alternatively, it has an edge enhancing means for applying edge enhancement to the original multi-valued image in advance, or (6) obtains a representative value of white pixels and a representative value of black pixels for each block of the multi-valued image divided into blocks. Block black-and-white representative pixel value detecting means, character / graphic block detecting means for detecting whether or not a character or graphic is included in the block, and block determined by the character / graphic block detecting means to not include a character or graphic Non-character figure block representative value calculation means for calculating the representative pixel value of the non-character figure block representative value from the representative pixel values of the surrounding blocks, and a representative of white pixels and black pixels obtained by the non-character figure block representative value calculation means. Block threshold calculation means for obtaining a binarization threshold value of the block from the prime value, pixel threshold value calculation means for converting the binarization threshold value obtained for each block into a threshold value for each pixel, and the pixel threshold value calculation means Binarizing means for binarizing the original multi-valued image by using the binarization threshold value for each pixel obtained in (1), and (7) in (6), the block monochrome representative Of the representative values of the white pixel and the black pixel obtained by the pixel value detecting means, the representative pixel value of the block whose value is higher than that of the surrounding block is calculated from the representative pixel value of the surrounding block. Having a representative pixel value protruding block removing means for replacing
(8) In (6) or (7), with respect to the block determined by the character / graphic block detecting means to include no character or graphic, which of the white pixel representative value and the black pixel representative value of the block is reliable. Block black and white representative pixel value selecting means for selecting whether or not possible, and non-character graphic block representative value calculating means for calculating the representative pixel value not selected by the block black and white representative pixel value selecting means from the representative pixel values of surrounding blocks And (9) in (6), (7) or (8), white pixels for each block obtained by the non-character graphic block representative value calculating means,
A block black-and-white representative pixel value smoothing unit for reducing a difference between a representative value of a block and a representative value of surrounding blocks with respect to a representative value of black pixels;
(10) In (6), (7) or (8) above, the difference between the threshold of a certain block and the threshold of the surrounding blocks is calculated with respect to the binarization threshold for each block obtained by the block threshold calculation means. Block threshold smoothing means for reducing the size is provided, and further, (11) above (6) to (1)
In any one of 0), an edge enhancing means for applying edge enhancement to the multivalued image to be compared with the threshold value by the binarizing means, or an edge enhancing means for applying edge enhancement to the original multivalued image in advance. It is characterized by having.

【0009】[0009]

【作用】ヒストグラム作成手段によってヒストグラムが
求められ、該ヒストグラムを用いて代表画素値検出手段
より高速に白画素,黒画素の代表値を求め、閾値決定手
段により二値化の閾値を求める。文字画像などのヒスト
グラムは、黒画素の山と白画素の山が出現するが、黒画
素の山と白画素の山の間の谷の部分を二値化の閾値に選
べは良好な二値化結果が得られる。従って、白画素,黒
画素の代表値をヒストグラム上の山に対応するように選
び、閾値をその間から選べば、良好な二値化結果が得ら
れる。また、細い線のみの画像の場合、黒画素の山か白
画素の山のいずれか一方しか明確な山を作らず、他方は
広く薄く分散することがあるが、分散した部分の山から
遠い部分の値を代表値にとることにより、二値化の閾値
は山の部分にかかる可能性が低くなるため、良好な二値
化結果が得られる。また、評価関数を使わずに、ヒスト
グラムから直接二値化の閾値を求めるため、高速に閾値
を求めることができる。
The histogram is obtained by the histogram creating means, the representative values of the white pixels and the black pixels are obtained at a higher speed than the representative pixel value detecting means using the histogram, and the binarization threshold is obtained by the threshold determining means. In a histogram such as a character image, black pixel peaks and white pixel peaks appear, but it is good to select the valley between the black pixel peaks and white pixel peaks as the binarization threshold. The result is obtained. Therefore, if the representative values of the white pixels and the black pixels are selected so as to correspond to the peaks on the histogram and the threshold value is selected from between them, a good binarization result can be obtained. Also, in the case of an image with only thin lines, only one of the black pixel peaks or the white pixel peaks produces a clear peak, and the other may be widely and thinly dispersed, but the part far from the dispersed part By taking the value of as a representative value, the threshold of binarization is less likely to be applied to the mountain portion, so that a good binarization result can be obtained. Further, since the threshold for binarization is directly obtained from the histogram without using the evaluation function, the threshold can be obtained at high speed.

【0010】また、ブロック閾値検出手段によって全て
のブロックの二値化閾値が得られるが、文字や図形の含
まれない白紙や無地の部分は、この閾値は意味を持たな
い。文字図形ブロック検出手段,非文字図形ブロック閾
値算出手段によって、文字,図形のあるブロックも、な
いブロックも、全てのブロックにおいて適切な閾値が得
られる。画像全体に影や明るさむらなどがあっても、ブ
ロックの大きさが影や明るさむらの大きさに比べて充分
小さければ、当該ブロック内のみをみれば影や明るさむ
らが存在しないので、この閾値は適切な閾値である。照
明の映り込みなどがあって、ブロックの大きさに比べて
小さい明るさむらがある場合は、適切なブロック閾値あ
るいは白/黒代表画素値が得られないが、このようなブ
ロックは、閾値や白/黒代表画素値が周囲のブロックと
比較して突出しているため、閾値突出ブロック除去手段
または代表画素値突出ブロック除去手段によって、取り
除くことができる。
Further, although the block threshold detection means can obtain the binarization thresholds of all the blocks, this threshold has no meaning for a blank sheet or a plain portion that does not include characters or figures. By the character / graphic block detection means and the non-character / graphic block threshold calculation means, appropriate threshold values can be obtained for all blocks, whether or not there are blocks with or without characters and graphics. Even if there are shadows and brightness unevenness in the entire image, if the size of the block is sufficiently smaller than the size of the shadows and brightness unevenness, there will be no shadows or brightness unevenness only by looking inside the block. , This threshold is an appropriate threshold. If there is unevenness in brightness that is smaller than the size of the block due to reflection of illumination, etc., an appropriate block threshold value or white / black representative pixel value cannot be obtained. Since the white / black representative pixel value is projected as compared with the surrounding blocks, it can be removed by the threshold protruding block removing means or the representative pixel value protruding block removing means.

【0011】非文字図形ブロックでは一般に無地が多い
ので、一面白あるいは一面黒とすべき場合が多い。従っ
て、閾値を得るために白/黒代表画素値を使う場合は、
どちらか一方の代表画素値を捨てずに残すことで、明る
さむらなどにも追従しやすくなる。各ブロックで得た閾
値とブロック内の画素をそのまま比較して二値化する
と、閾値の異なるブロック間の境界が目立ってしまう。
画素閾値算出手段によって、各画素毎に周囲のブロック
の閾値を補間して閾値を算出し、ブロック境界も目立た
ず、滑らかで自然な二値化画像が得られる。また、エッ
ジ強調を行うことによって細い字や薄い字が二値化によ
って潰れたりせず、さらに閾値の変動にも強い二値化が
行える。これらによって、影や明るさむらのある画像で
も、文字などを認識できるような二値化が可能となる。
Since a non-character graphic block generally has a solid color, it is often necessary to make it black or white. Therefore, when using the white / black representative pixel value to obtain the threshold value,
If one of the representative pixel values is left without being discarded, it becomes easy to follow uneven brightness. If the threshold value obtained in each block and the pixel in the block are directly compared and binarized, the boundary between blocks having different threshold values becomes conspicuous.
The pixel threshold calculation means interpolates the thresholds of the surrounding blocks for each pixel to calculate the thresholds, so that a smooth and natural binarized image can be obtained without making the block boundaries noticeable. In addition, by performing edge emphasis, thin characters and thin characters are not crushed by binarization, and binarization that is strong against threshold fluctuation can be performed. As a result, it is possible to perform binarization so that a character or the like can be recognized even in an image having a shadow or uneven brightness.

【0012】[0012]

【実施例】実施例について、図面を参照して以下に説明
する。図1は、本発明による画像二値化装置の一実施例
(請求項1)を説明するための構成図で、図中、1は信
号処理部、2はA/D変換部、3はヒストグラム作成
部、4は代表画素値検出部、5は閾値決定部である。
Embodiments will be described below with reference to the drawings. FIG. 1 is a configuration diagram for explaining an embodiment (claim 1) of an image binarization device according to the present invention. In the figure, 1 is a signal processing unit, 2 is an A / D conversion unit, and 3 is a histogram. The creating unit 4, the representative pixel value detecting unit 5 and the threshold value determining unit 5.

【0013】元画像のビデオ信号を信号処理部1で信号
処理し、A/D変換部2でA/D変換され、多階調の輝
度をもつ画素値aとなる。本発明の実施例では、以降、
256階調の画素値として説明する。A/D変換された画
素値aは、ヒストグラム作成部3に出力され、該ヒスト
グラム作成部3により画素の輝度値のヒストグラムbが
作成される。代表画素値検出部4は、ヒストグラムbよ
り黒画素代表値c,白画素代表値dを検出する。黒画素
代表値c及び白画素代表値dは、閾値決定部5に渡さ
れ、二値化閾値が決定される。決定の仕方は、一番簡単
な方法としては、黒画素代表値cと白画素代表値dの平
均を二値化閾値とする方法がある。
The video signal of the original image is subjected to signal processing by the signal processing unit 1 and A / D converted by the A / D conversion unit 2 to obtain a pixel value a having multi-tone brightness. In the embodiment of the present invention,
A pixel value of 256 gradations will be described. The A / D-converted pixel value a is output to the histogram creation unit 3, and the histogram creation unit 3 creates a histogram b of the brightness values of the pixels. The representative pixel value detector 4 detects a black pixel representative value c and a white pixel representative value d from the histogram b. The black pixel representative value c and the white pixel representative value d are passed to the threshold value determining unit 5, and the binarization threshold value is determined. The simplest method of determination is to use the average of the black pixel representative value c and the white pixel representative value d as the binarization threshold.

【0014】図2及び図3は、図1における代表画素値
検出部の構成図で、図2は白画素の代表画素値検出部
で、図3は黒画素の代表画素値検出部を示している。図
中、11は白レジスタ、12はデコーダ、13-1〜13
-nはレジスタ、14はコンパレータ、15はインバー
タ、16は白レベルカウンタ、17はコンパレータであ
る。
2 and 3 are block diagrams of the representative pixel value detecting unit in FIG. 1, FIG. 2 shows a representative pixel value detecting unit for white pixels, and FIG. 3 shows a representative pixel value detecting unit for black pixels. There is. In the figure, 11 is a white register, 12 is a decoder, and 13-1 to 13
-n is a register, 14 is a comparator, 15 is an inverter, 16 is a white level counter, and 17 is a comparator.

【0015】図2において、図1のヒストグラム作成部
3によって作成されたヒストグラムのデータbがレジス
タ0(13-1)からレジスタ255(13-n)に収められ
ている。白レジスタ11の初期値は最大輝度値(この場
合255)であり、以降説明するループ処理が開始される
前に与えられる。ループ処理終了後の値が白画素の代表
値eとなる。
In FIG. 2, the data b of the histogram created by the histogram creating unit 3 of FIG. 1 is stored in the registers 0 (13-1) to 255 (13-n). The initial value of the white register 11 is the maximum brightness value (255 in this case), and is given before the loop processing described below is started. The value after the loop processing is the representative value e of the white pixels.

【0016】ループ処理の最初は、白レジスタ11の値
のデコードから始まる。白レジスタ11の値は、デコー
ダ12によってデコードされ、白レジスタ11の輝度値
のヒストグラム値が収められているレジスタ13-1〜1
3-nのいずれか一つが選択されるように制御信号fが決
まる。該制御信号fによって唯一選択されたレジスタか
ら読み出されたヒストグラム値gは、コンパレータ14
に送られ、0と比較される。ヒストグラム値gが0と等
しいならば、コンパレータ14によりデクリメント信号
hが有効になり、白レジスタ11の値が1減る。0でな
いならば、コンパレータ14とインバータ15によって
デクリメント信号iが有効になり、ヒストグラムレジス
タ13a〜13nと白レベルカウンタ16に送られる。
The beginning of the loop processing starts with the decoding of the value of the white register 11. The value of the white register 11 is decoded by the decoder 12, and registers 13-1 to 13 in which the histogram value of the brightness value of the white register 11 is stored.
The control signal f is determined so that any one of 3-n is selected. The histogram value g read out from the register selected only by the control signal f is stored in the comparator 14
Sent to and compared with 0. If the histogram value g is equal to 0, the decrement signal h becomes valid by the comparator 14 and the value of the white register 11 is decremented by 1. If it is not 0, the decrement signal i is validated by the comparator 14 and the inverter 15 and sent to the histogram registers 13a to 13n and the white level counter 16.

【0017】ヒストグラムレジスタに送られたデクリメ
ント信号iは、制御信号fによって唯一選択されたレジ
スタにのみ有効となり、選択されたレジスタの値が1減
る。白レベルカウンタ16の値は、コンパレータ17に
送られ、0と比較される。白レベルカウンタの値が0と
等しいならば、白画素の代表値が求まることになり、白
レジスタ11の値eが白画素の代表値として出力され
る。白レベルカウンタの値が0でないならば、再び最初
に戻り、白レジスタ11の値がデコーダ12によってデ
コードされることから始まるループ処理が繰り返され
る。白レベルカウンタの初期値はパラメータであり、画
素を輝度順に並べた時に、明るい方から何番目の画素の
輝度値を白画素の代表輝度値にするかを表している。通
常は、全画素数の数パーセント程度の値でよい。
The decrement signal i sent to the histogram register is valid only for the register selected by the control signal f, and the value of the selected register is decremented by one. The value of the white level counter 16 is sent to the comparator 17 and compared with 0. If the value of the white level counter is equal to 0, the representative value of the white pixel is obtained, and the value e of the white register 11 is output as the representative value of the white pixel. If the value of the white level counter is not 0, the process returns to the beginning again, and the loop process starting from the value of the white register 11 being decoded by the decoder 12 is repeated. The initial value of the white level counter is a parameter, and when the pixels are arranged in the order of brightness, it represents which number of pixels from the brighter one is the representative brightness value of the white pixel. Generally, the value may be about several percent of the total number of pixels.

【0018】図3は、黒画素の代表画素値検出部の構成
図で、図中、21は黒レジスタ、22はデコーダ、23
-1〜23-nはレジスタ、24はコンパレータ、25はイ
ンバータ、26は黒レベルカウンタ、27はコンパレー
タである。ヒストグラム作成部によって作成されたヒス
トグラムのデータがレジスタ0(23-1)からレジスタ
255(23-n)に収められている。このレジスタは、図
2のヒストグラムレジスタと同じものか、あるいはデー
タをコピーした別のレジスタである。同じヒストグラム
レジスタを使用する場合は、同時にヒストグラムレジス
タにアクセスにいかないようにする必要がある。黒レジ
スタ21の初期値は最小輝度値(この場合0)であり、
以降説明するループ処理が開始される前に与えられる。
ループ処理終了後の値が黒画素の代表値e′となる。
FIG. 3 is a block diagram of a representative pixel value detecting section for black pixels. In the figure, 21 is a black register, 22 is a decoder, and 23.
-1 to 23-n are registers, 24 is a comparator, 25 is an inverter, 26 is a black level counter, and 27 is a comparator. The data of the histogram created by the histogram creation unit is registered from register 0 (23-1)
It is stored in 255 (23-n). This register is the same as the histogram register of FIG. 2 or is another register to which data is copied. When using the same histogram register, it is necessary to prevent access to the histogram register at the same time. The initial value of the black register 21 is the minimum brightness value (0 in this case),
It is given before the loop processing described below is started.
The value after the loop processing is the representative value e ′ of the black pixel.

【0019】ループ処理の最初は、黒レジスタ21の値
のデコードから始まる。黒レジスタ21の値は、デコー
ダ22によってデコードされ、黒レジスタ21の輝度値
のヒストグラム値が収められているレジスタ23-1〜2
3-nのいずれか一つが選択されるように制御信号f′が
決まる。該制御信号f′によって唯一選択されたレジス
タから読み出されたヒストグラム値g′は、コンパレー
タ24に送られ、0と比較される。ヒストグラム値g′
が0と等しいならば、コンパレータ24によりデクリメ
ント信号h′が有効になり、黒レジスタ21の値が1減
る。0でないならば、コンパレータ24とインバータ2
5によってデクリメント信号i′が有効になり、ヒスト
グラムレジスタ23-1〜23-nと黒レベルカウンタ26
に送られる。
The beginning of the loop processing starts with the decoding of the value of the black register 21. The value of the black register 21 is decoded by the decoder 22, and the registers 23-1 to 2-2 in which the histogram value of the brightness value of the black register 21 is stored.
The control signal f'is determined so that any one of 3-n is selected. The histogram value g'read from the register selected only by the control signal f'is sent to the comparator 24 and compared with 0. Histogram value g '
Is equal to 0, the decrement signal h'is enabled by the comparator 24 and the value of the black register 21 is decremented by 1. If not 0, comparator 24 and inverter 2
5, the decrement signal i'becomes valid, and the histogram registers 23-1 to 23-n and the black level counter 26 are activated.
Sent to.

【0020】ヒストグラムレジスタに送られたデクリメ
ント信号i′は、制御信号f′によって唯一選択された
レジスタにのみ有効となり、選択されたレジスタの値が
1減る。黒レベルカウンタ26の値は、コンパレータ2
7に送られ、0と比較される。黒レベルカウンタの値が
0と等しいならば、黒画素の代表値が求まったことにな
り、黒レジスタ21の値e′が黒画素の代表値として出
力される。黒レベルカウンタの値が0でないならば、再
び最初に戻り、黒レジスタ21の値がデコーダ22によ
ってデコードされることから始まるループ処理が繰り返
される。黒レベルカウンタの初期値はパラメータであ
り、画素を輝度順に並べた時に、暗い方から何番目の画
素の輝度値を黒画素の代表輝度値にするかを表してい
る。通常は、全画素数の数パーセント程度の値でよい。
The decrement signal i'transmitted to the histogram register is effective only in the register selected by the control signal f ', and the value of the selected register is decreased by one. The value of the black level counter 26 is the comparator 2
Sent to 7 and compared to 0. If the value of the black level counter is equal to 0, it means that the representative value of the black pixel has been obtained, and the value e ′ of the black register 21 is output as the representative value of the black pixel. If the value of the black level counter is not 0, the process returns to the beginning again, and the loop process starting from the value of the black register 21 being decoded by the decoder 22 is repeated. The initial value of the black level counter is a parameter, and when the pixels are arranged in the order of brightness, it represents which number of pixels from the darker one is the representative brightness value of the black pixel. Generally, the value may be about several percent of the total number of pixels.

【0021】図4は、本発明による画像二値化装置の他
の実施例(請求項2)を示す図で、図中、31はブロッ
ク閾値検出部、32は文字図形ブロック検出部、33は
非文字図形ブロック閾値検出部、34は画素閾値算出
部、35は二値化部である。元の多値画像よりブロック
内の画素値jを読む。ブロック内の画素値jは、ブロッ
ク閾値検出部31によって二値化の閾値を検出する。閾
値を検出するには、例えば、ブロック内の画素の輝度値
のヒストグラムをとり、判別分析法で二値化の閾値を得
る。
FIG. 4 is a diagram showing another embodiment (claim 2) of the image binarizing apparatus according to the present invention. In the figure, 31 is a block threshold detecting unit, 32 is a character / graphic block detecting unit, and 33 is a block. A non-character / graphic block threshold detection unit, 34 is a pixel threshold calculation unit, and 35 is a binarization unit. The pixel value j in the block is read from the original multivalued image. The pixel value j in the block is detected by the block threshold detection unit 31 as a binarization threshold. In order to detect the threshold value, for example, a histogram of the brightness values of the pixels in the block is taken, and the threshold value for binarization is obtained by the discriminant analysis method.

【0022】また、ブロック内の画素値jは、文字図形
ブロック検出部32にも送られ、当該ブロックに文字や
図形などが含まれるか、無地かを検出する。その方法
は、例えば、ある画素と隣の画素との差分の絶対値をと
ることでエッジを検出し、その差分絶対値のブロック内
での最大値がある閾値を越えれば、文字や図形がブロッ
ク内に存在すると判定する。以降、説明のため、文字や
図形があると判断されたブロックを文字図形ブロック、
文字や図形がないと判断されたブロックを非文字図形ブ
ロックと呼ぶ。
The pixel value j in the block is also sent to the character / graphic block detection unit 32 to detect whether the block contains a character, a graphic, or the like, or whether the block is plain. The method is to detect an edge by taking the absolute value of the difference between a certain pixel and the adjacent pixel, and if the maximum value of the difference absolute value in the block exceeds a certain threshold, the character or figure is blocked. It is determined to exist inside. Hereafter, for the sake of explanation, the block that is determined to have characters and figures will be
A block determined to have no character or graphic is called a non-character graphic block.

【0023】非文字図形ブロックでは、ブロック閾値検
出部31から得た二値化閾値kは無視され、非文字図形
ブロック閾値検出部33によって新たな二値化の閾値が
得られる。非文字図形ブロック閾値算出部22での閾値
の算出のしかたは、例えば、非文字図形ブロックの周囲
上下左右のブロックに文字図形ブロックがあるかどうか
をみる。もしあれば、周囲の文字図形ブロックの閾値の
平均値を計算し、これを当該ブロックの新たな二値化の
閾値とする。この一連の処理を繰り返すことで、全ての
非文字図形ブロックは新たな二値化閾値を得ることがで
きる。非文字図形ブロック閾値検出部33によって全て
のブロックの二値化閾値nが得られたので、画素閾値算
出部34によって、ブロックの二値化閾値から画素単位
の二値化閾値を算出する。
In the non-character / graphic block, the binarization threshold value k obtained from the block threshold detection unit 31 is ignored, and the non-character / graphic block threshold detection unit 33 obtains a new binarization threshold value. The method of calculating the threshold value in the non-character / graphic block threshold calculation unit 22 is, for example, whether or not there are character / graphic blocks in the upper, lower, left, and right blocks around the non-character / graphic block. If there is, the average value of the thresholds of the surrounding character / graphic blocks is calculated, and this is used as a new threshold value for binarization of the block. By repeating this series of processing, a new binarization threshold value can be obtained for all non-character graphic blocks. Since the non-character figure block threshold detection unit 33 has obtained the binarization threshold values n of all blocks, the pixel threshold value calculation unit 34 calculates the pixel-unit binarization threshold value from the block binarization threshold value.

【0024】図14は、図1における画素閾値算出部の
算出方法の一例を説明するための図で、二値化閾値を求
めたい画素62の周囲のブロックが50,51,52,
53,各ブロックの中心点を54,55,56,57と
し、中心点54,55,56,57で囲む領域に当該画
素62が収まるように周囲のブロック50,51,5
2,53を選ぶ。
FIG. 14 is a diagram for explaining an example of the calculation method of the pixel threshold value calculation unit in FIG. 1, in which blocks around the pixel 62 for which the binarization threshold value is desired are 50, 51, 52,
53, the central points of the blocks are 54, 55, 56 and 57, and the surrounding blocks 50, 51 and 5 are arranged so that the pixel 62 is contained in the area surrounded by the central points 54, 55, 56 and 57.
Choose 2,53.

【0025】ブロックは、長方形であるとする。このと
き、当該画素62の位置の中心点54,55,56,5
7で囲む長方形63の内部での比率を、上下方向で
1:b1、左右方向でc1:d1(a1+b1=1,c1
1=1)とする。各ブロックの閾値を長方形63の頂
点に対応させ、比率に従って直線補間して該当画素62
の閾値を求める。中心点(頂点)の閾値を<54>,<
55>,<56>,<57>とすると、計算式は、<54
>*b1*d1+<55>*b1*c1+<56>*a1
1+<57>*a1*c1となる。画素閾値算出部34
によって得られた各画素の二値化閾値pは、二値化部3
5に送られ、当該画素の画素値jと比較され、二値化さ
れ、二値化画像ができる。
The blocks are assumed to be rectangular. At this time, the center points 54, 55, 56, 5 of the position of the pixel 62 concerned
The ratio inside the rectangle 63 surrounded by 7 is a 1 : b 1 in the vertical direction and c 1 : d 1 (a 1 + b 1 = 1, c 1 + in the horizontal direction).
Let d 1 = 1). The threshold of each block is made to correspond to the apex of the rectangle 63, and linear interpolation is performed according to the ratio to obtain the corresponding pixel 62.
The threshold value of is calculated. Set the threshold of the center point (vertex) to <54>, <
55>, <56>, <57>, the calculation formula is <54
> * B 1 * d 1 + <55> * b 1 * c 1 + <56> * a 1 *
It becomes d 1 + <57> * a 1 * c 1 . Pixel threshold calculation unit 34
The binarization threshold value p of each pixel obtained by
5 and compared with the pixel value j of the pixel concerned and binarized to form a binarized image.

【0026】図5は、本発明による画像二値化装置の実
施例(請求項3)を示す図で、図中、44は閾値突出ブ
ロック除去部で、その他、図4と同じ作用をする部分は
同一の符号を付してある。図4に閾値突出ブロック除去
部44が加えられている。該閾値突出ブロック除去部4
4は、ブロック閾値検出部31によって得られた閾値の
うち、周囲のブロックと比較して値の突出したものを検
出し、その値を周囲のブロックの閾値から算出した値に
置き換える。
FIG. 5 is a diagram showing an embodiment (Claim 3) of the image binarization device according to the present invention. In the figure, 44 is a threshold protruding block removing portion, and other portions which have the same function as FIG. Are given the same reference numerals. A threshold protruding block removing unit 44 is added to FIG. The threshold protruding block removing unit 4
4 detects, from among the threshold values obtained by the block threshold value detection unit 31, a value having a protruding value as compared with the surrounding blocks, and replaces the value with a value calculated from the threshold values of the surrounding blocks.

【0027】閾値の突出したブロックを検出する一方法
は、例えば、当該ブロックの閾値を、周囲4近傍(また
は8近傍)のブロックの閾値と比較し、当該ブロックの
閾値が最大値または最小値であり、かつ、当該ブロック
の閾値と周囲4近傍(または8近傍)のブロックの閾値
との差の絶対値の最大値(または最小値、あるいは差の
絶対値の総和など)が、あらかじめ設定した値より大き
いときに、突出していると判断する。比較する近傍は、
4近傍又は8近傍のほかに、上下左右の4近傍のブロッ
クと比較して前述のような処理を行った後、斜めの4近
傍のブロックと比較して同様の処理を行うのでもよい。
また、周囲のブロックから突出した閾値を、周囲のブロ
ックの閾値から算出した値に置き換える一方法は、例え
ば、周囲4近傍(または8近傍)のブロックの閾値の平
均値で置き換える。前述のような処理を2〜3回行って
もよい。
One method of detecting a block with a protruding threshold value is, for example, comparing the threshold value of the block with the threshold values of blocks in the neighborhood of 4 (or 8 neighborhoods), and determining whether the threshold of the block is the maximum value or the minimum value. Yes, and the maximum value (or minimum value, or the sum of the absolute values of the differences, etc.) of the difference between the threshold value of the block and the threshold values of the blocks in the surrounding 4 neighborhoods (or 8 neighborhoods) is a preset value. When it is larger, it is judged to be protruding. The neighborhood to compare is
In addition to the 4 or 8 neighborhoods, the above-described processing may be performed by comparing with the 4 neighborhoods of up, down, left and right, and then the same processing may be performed by comparing with the diagonal 4 neighborhoods.
In addition, one method of replacing the threshold value protruding from the surrounding blocks with a value calculated from the threshold values of the surrounding blocks is, for example, replacing with the average value of the threshold values of the blocks in the four neighboring areas (or eight neighboring areas). You may perform the process as mentioned above 2-3 times.

【0028】図15及び図16に、閾値突出ブロック除
去部の処理を示すフローチャートを示す。図15及び図
16は、周囲4近傍のブロックと閾値を比較して、当該
ブロックの閾値が最大又は最小であり、かつ周囲4近傍
のブロックの閾値との差の絶対値の最大値があらかじめ
設定した値よりも大きいとき閾値突出ブロックと判断
し、周囲4近傍のブロックの閾値の平均値を当該ブロッ
クの閾値とする方法のフローチャートである。
15 and 16 are flow charts showing the processing of the threshold protruding block removing unit. FIGS. 15 and 16 compare the threshold value with the blocks in the vicinity of four surroundings, and the threshold value of the block is the maximum or minimum, and the maximum absolute value of the difference from the threshold values of the blocks in the surrounding vicinity 4 is set in advance. 9 is a flowchart of a method of determining that the block is a threshold protrusion block when the value is larger than the threshold value, and setting the average value of the threshold values of blocks in the vicinity of four surroundings as the threshold value of the block.

【0029】図15及び図16において、mは水平方向
のブロックの数、nは垂直方向のブロックの数である。
iは水平方向のブロックの位置を示すインデックスであ
り、0からm−1までの整数値をとる。また、jは垂直
方向のブロックの位置を示すインデックスであり、0か
らn−1までの整数値をとる。th0(i,j)は、ブ
ロック閾値検出部31で求められた(i,j)で示され
る位置のブロックの閾値であり、th1(i,j)は、
閾値突出ブロック除去後の同じ位置のブロックの閾値で
ある。
In FIGS. 15 and 16, m is the number of blocks in the horizontal direction, and n is the number of blocks in the vertical direction.
i is an index indicating the position of the block in the horizontal direction, and takes an integer value from 0 to m-1. Further, j is an index indicating the position of the block in the vertical direction, and takes an integer value from 0 to n-1. th0 (i, j) is the threshold of the block at the position indicated by (i, j) obtained by the block threshold detection unit 31, and th1 (i, j) is
The threshold is the threshold of the block at the same position after the protruding block is removed.

【0030】ステップ60〜67により、当該ブロック
の閾値が周囲4近傍のブロックの閾値と比較して最大又
は最小であるかどうかを判定し、当該ブロックの閾値が
最大又は最小であれば、ステップ68〜71により、当
該ブロックの閾値と周囲4近傍のブロックの閾値との差
の絶対値があらかじめ設定した値よりも大きいかどうか
を判断する。当該ブロックの閾値が最大又は最小であ
り、かつ周囲4近傍のブロックの閾値との差の絶対値が
あらかじめ設定した値よりも大きければ、当該ブロック
は閾値突出ブロックであると判断し、ステップ72によ
り、周囲4近傍のブロックの閾値の平均値を計算し、こ
れを当該ブロックの閾値とする。
In steps 60 to 67, it is judged whether the threshold value of the block is the maximum or minimum value by comparing with the threshold values of the blocks in the four surroundings. If the threshold value of the block is the maximum or minimum value, step 68 is executed. Through 71, it is determined whether the absolute value of the difference between the threshold value of the block and the threshold values of the blocks in the vicinity of the surrounding four is larger than a preset value. If the threshold value of the block is maximum or minimum and the absolute value of the difference from the threshold values of the blocks in the vicinity of the four surroundings is larger than a preset value, it is determined that the block is a threshold protruding block, and step 72 , The average value of the threshold values of the blocks in the vicinity of the four surroundings is calculated and used as the threshold value of the block.

【0031】図には描くのを省略したが、i=0のとき
は、ステップ60,64,68の処理をスキップし、j
=0のときは、ステップ61,65,69の処理をスキ
ップし、i=m−1のときは、ステップ62,66,7
0の処理をスキップし、j=n−1のときは、ステップ
63,67,71の処理をスキップする。また、iまた
はjが前述のような値域の両端の値をとるときは、ステ
ップ72で示す近傍ブロックの閾値の平均を求める計算
における分母は、2または3となる。
Although not shown in the figure, when i = 0, the steps 60, 64 and 68 are skipped and j
= 0, the processing of steps 61, 65, and 69 is skipped, and when i = m-1, steps 62, 66, and 7 are skipped.
The process of 0 is skipped, and when j = n−1, the processes of steps 63, 67 and 71 are skipped. When i or j takes the values at both ends of the range as described above, the denominator in the calculation for obtaining the average of the threshold values of the neighboring blocks shown in step 72 is 2 or 3.

【0032】図6は、本発明による画像二値化装置の更
に他の実施例(請求項4)を示す図で、図中、36はブ
ロック閾値平滑化部で、その他、図4と同じ作用をする
部分は、同一の符号を付してある。図4にブロック閾値
平滑化部36が加えられている。該ブロック閾値平滑化
部36を実現する一方法としては、あるブロック上下左
右のブロックの閾値と当該ブロックの閾値とを足し、ブ
ロック数で割って平均化した値を当該ブロックの新たな
閾値とする。端以外のブロックならば、ブロック数は5
であり、端にブロックの場合は、ブロック数は2または
4となる。この処理を全ブロックに行うことで、ブロッ
ク間の閾値の平滑化が可能となる。
FIG. 6 is a diagram showing still another embodiment (claim 4) of the image binarizing apparatus according to the present invention. In the figure, 36 is a block threshold smoothing unit, and other than that, the same operation as in FIG. The same reference numerals are given to the parts that perform. A block threshold smoothing unit 36 is added to FIG. As one method for realizing the block threshold smoothing unit 36, a threshold value of a certain block up, down, left and right is added to the threshold value of the block, and the average value obtained by dividing by the number of blocks is set as a new threshold value of the block. . If the block is not the end, the number of blocks is 5.
If there are blocks at the end, the number of blocks is 2 or 4. By performing this process on all blocks, it becomes possible to smooth the threshold value between blocks.

【0033】図7は、本発明による画像二値化装置の更
に他の実施例(請求項5)を示す図で、図中、37はエ
ッジ強調部で、その他、図6と同じ作用をする部分は同
一の符号を付してある。図6に加え、エッジ強調部37
が加えられている。図7は二値化部で参照する元画像の
みにエッジ強調をかける場合の図であり、元画像にあら
かじめエッジ強調をかけた場合は、元画像にエッジ強調
をかけた画像を新たな元画像とすれば、図6と同じ構成
となるので省いている。該エッジ強調部37を実現する
一方法は、当該画素の画素値を5倍した値から、上下左
右4画素の画素値の和を引いた値を当該画素の新たな画
素値とし、計算結果がオーバーフロー,アンダーフロー
の時は、最大輝度値,最小輝度値を当該画素の新たな画
素値とする方法である。これによってエッジが強調され
る。エッジ強調された画像は、図7のように二値化部3
5のみにおいて使う以外にも、ブロック閾値検出部3
1,文字図形ブロック検出部32の入力にしてもよい。
FIG. 7 is a diagram showing still another embodiment (Claim 5) of the image binarizing apparatus according to the present invention. In the figure, 37 is an edge emphasizing section, and other functions are the same as those in FIG. The parts are given the same reference numerals. In addition to FIG. 6, the edge enhancement unit 37
Has been added. FIG. 7 is a diagram when edge enhancement is applied only to the original image referred to by the binarization unit. When edge enhancement is applied to the original image in advance, the image obtained by applying edge enhancement to the original image is changed to a new original image. If so, the configuration is the same as in FIG. 6 and is omitted. One method for realizing the edge enhancement unit 37 is to subtract a sum of pixel values of four pixels in the upper, lower, left, and right directions from a value obtained by multiplying the pixel value of the pixel by 5 to obtain a new pixel value of the pixel, and calculate the result. In the case of overflow or underflow, the maximum luminance value and the minimum luminance value are used as new pixel values for the pixel. This emphasizes the edges. The edge-enhanced image is processed by the binarization unit 3 as shown in FIG.
5, the block threshold detection unit 3
1, it may be input to the character / graphic block detection unit 32.

【0034】このように、図4〜図7に示す実施例(請
求項2〜5)において、ブロック閾値検出部31によっ
て全てのブロックの二値化閾値が得られるが、文字や図
形の含まれない白紙や無地の部分は、この閾値は意味を
持たない。文字図形ブロック検出部32,非文字図形ブ
ロック閾値検出部33によって、文字,図形のあるブロ
ックも無いブロックも全てのブロックにおいて適切な閾
値が得られる。画像全体に影や明るさむらなどがあって
も、ブロックの大きさが影や明るさむらの大きさに比べ
て充分小さければ、当該ブロック内のみをみれば影や明
るさむらが存在しないので、この閾値は適切な閾値であ
る。
As described above, in the embodiment shown in FIGS. 4 to 7 (claims 2 to 5), the binarization threshold values of all blocks can be obtained by the block threshold value detection unit 31. For blank or blank areas, this threshold has no meaning. By the character / graphic block detection unit 32 and the non-character / graphic block threshold detection unit 33, appropriate threshold values can be obtained for all blocks, both blocks with and without characters and graphics. Even if there are shadows and brightness unevenness in the entire image, if the size of the block is sufficiently smaller than the size of the shadows and brightness unevenness, there will be no shadows or brightness unevenness only by looking inside the block. , This threshold is an appropriate threshold.

【0035】しかし、ホワイトボードなどに照明の映り
込みがあるような画像では、映り込みによる明るさむら
は、ブロックの大きさより小さい場合もあり、映り込み
を含まないブロックでは、適切な閾値が求まっているの
に対し、映り込みを含むブロックは、適切な閾値が求ま
っていない。また、映り込みを含むブロックは、文字図
形ブロック検出部32により、文字や図形のない無地の
部分でも、映り込みの影響で文字図形ブロックと判断さ
れる可能性もある。このため、非文字図形ブロック閾値
検出部33により、映り込みを含むブロックの適切でな
い閾値が、隣接する非文字図形ブロックに伝播する場合
がある。このような適切でない閾値は、周囲のブロック
の閾値に比べ値が突出しているという特徴があるので、
閾値突出ブロック除去部44により、このような適切で
ない閾値が除去され、隣接するブロックに伝播するのを
防ぐことができる。
However, in an image in which illumination is reflected on a whiteboard or the like, the brightness unevenness due to the reflection may be smaller than the size of the block, and an appropriate threshold value can be obtained for a block that does not include reflection. On the other hand, an appropriate threshold value has not been obtained for the block including the reflection. In addition, a block including a glare may be determined by the character / graphic block detection unit 32 to be a character / graphic block due to the influence of the glare even on a plain portion where no characters or figures are present. Therefore, the non-character / graphic block threshold detection unit 33 may propagate an inappropriate threshold of a block including a glare to an adjacent non-character / graphic block. Such an inappropriate threshold has a characteristic that the value is more prominent than the thresholds of the surrounding blocks.
The threshold protruding block removing unit 44 can prevent such an inappropriate threshold value from being removed and propagating to an adjacent block.

【0036】各ブロックで得た閾値とブロック内の画素
をそのまま比較して二値化すると、閾値の異なるブロッ
ク間の境界が目立ってしまう。画素閾値算出部34によ
って、各画素毎に周囲のブロックの閾値を補間して閾値
を算出し、ブロック境界も目立たず、滑らかで自然な二
値化画像が得られる。これらによって、影や明るさむら
のある画像でも文字などを認識できるような二値化が可
能となる。
When the threshold value obtained in each block and the pixel in the block are directly compared and binarized, the boundary between blocks having different threshold values becomes conspicuous. The pixel threshold calculation unit 34 calculates the threshold by interpolating the thresholds of the surrounding blocks for each pixel, and a smooth and natural binarized image can be obtained with no noticeable block boundaries. These enable binarization so that characters and the like can be recognized even in images with shadows and uneven brightness.

【0037】また、各ブロックで求めた閾値は、当該ブ
ロックのみから求めているため、各ブロックの中では適
切な閾値だが、画像全体でみると周囲から突出した値と
なったり、隣接するブロックの閾値との差が大きい時は
画像全体の二値化結果が不安定となることがある。ブロ
ック閾値平滑化部36によって、ブロック間で閾値を平
滑化することによって、より適切な閾値が得られる。
Further, since the threshold value obtained in each block is obtained only from the block concerned, it is an appropriate threshold value in each block, but it is a value protruding from the surroundings in the whole image, When the difference from the threshold is large, the binarization result of the entire image may become unstable. A more appropriate threshold value is obtained by smoothing the threshold value between blocks by the block threshold value smoothing unit 36.

【0038】また、ブロック内の画素数が少ない時は、
ブロック内で得る二値化の閾値は最適でないこともあり
え、細い線が最適でない二値化閾値によって二値化画像
がさらに細くなったり潰れたりすることがある。元の多
値画像をエッジ強調し、エッジ強調した画素と閾値を比
較して二値化することで、こういった細部の構造を二値
化後も保存することができる。
When the number of pixels in the block is small,
The binarization threshold obtained in the block may not be optimal, and a thin line may cause the binarized image to become even thinner or crushed due to the non-optimal binarization threshold. By edge-enhancing the original multi-valued image and comparing the edge-enhanced pixel with a threshold value to perform binarization, such a detailed structure can be preserved even after binarization.

【0039】図8は、本発明による画像二値化装置の更
に他の実施例(請求項6)を示す図で、図中、38はブ
ロック白黒代表画素値検出部、39は文字図形ブロック
検出部、40は非文字図形ブロック代表値算出部、41
はブロック閾値算出部で、その他、図4と同じ作用をす
る部分は同一の符号を付してある。
FIG. 8 is a diagram showing still another embodiment (Claim 6) of the image binarization apparatus according to the present invention, in which 38 is a block black and white representative pixel value detection unit and 39 is a character / graphic block detection. Part, 40 is a non-character figure block representative value calculation part, 41
Is a block threshold calculation unit, and the other parts that have the same functions as those in FIG. 4 are denoted by the same reference numerals.

【0040】元の多値画像よりブロック内の画素値jを
読む。ブロック内の画素値は、ブロック白黒代表画素値
検出部38によって、白画素の代表値sと黒画素の代表
値tを検出する。ブロック白黒代表画素値検出部38に
よって得られた白画素の代表値sと黒画素の代表値t
は、文字図形ブロック検出部39によって当該ブロック
に文字や図形などが含まれるか、無地かを検出する。そ
の方法は、例えば、白画素代表値sと黒画素代表値tの
差をとり、その絶対値がある閾値を越えれば、文字や図
形がブロック内に存在すると判定する。
The pixel value j in the block is read from the original multi-valued image. With respect to the pixel value in the block, the block monochrome representative pixel value detection unit 38 detects the representative value s of the white pixel and the representative value t of the black pixel. The representative value s of white pixels and the representative value t of black pixels obtained by the block monochrome representative pixel value detection unit 38.
The character / graphic block detection unit 39 detects whether the block includes a character, a graphic, or the like, or is solid. In this method, for example, the difference between the white pixel representative value s and the black pixel representative value t is calculated, and if the absolute value exceeds a certain threshold value, it is determined that a character or a figure exists in the block.

【0041】非文字図形ブロックでは、ブロック白黒代
表画素値検出部38から得た代表画素値s,tは無視さ
れ、非文字図形ブロック代表値算出部40によって、新
たな代表画素値が得られる。この処理は、白画素代表値
と黒画素代表値それぞれ別に行う。非文字図形ブロック
代表値算出部40での代表画素値の算出のしかたは、例
えば、非文字図形ブロックの周囲上下左右のブロックに
文字図形ブロックがあるかどうかをみる。もしあれば、
周囲の文字図形ブロックの代表画素値の平均値を計算
し、これを当該ブロックの新たな代表画素値とする。こ
の一連の処理を繰り返すことで、全ての非文字図形ブロ
ックは新たな代表画素値を得ることができる。
In the non-character graphic block, the representative pixel values s and t obtained from the block monochrome representative pixel value detection unit 38 are ignored, and the non-character graphic block representative value calculation unit 40 obtains a new representative pixel value. This processing is performed separately for the white pixel representative value and the black pixel representative value. The method of calculating the representative pixel value in the non-character / graphic block representative value calculation unit 40 is, for example, whether or not there are character / graphic blocks in the upper, lower, left and right blocks around the non-character / graphic block. If any,
The average value of the representative pixel values of the surrounding character / graphic blocks is calculated, and this is set as a new representative pixel value of the block. By repeating this series of processing, a new representative pixel value can be obtained for all non-character graphic blocks.

【0042】非文字図形ブロック代表画素値算出部40
によって全てのブロックの白画素代表画素値v,黒画素
代表画素値wが得られたので、ブロック閾値算出部41
によって各ブロックの二値化閾値xを算出する。ブロッ
クの二値化閾値を求める方法は、例えば、白画素代表値
と黒画素代表値の平均をとればよい。全てのブロックの
二値化閾値が求まったので、画素単位の二値化閾値を画
素閾値算出部34により求める。
Non-character graphic block representative pixel value calculation unit 40
Since the white pixel representative pixel value v and the black pixel representative pixel value w of all blocks are obtained by the above, the block threshold value calculation unit 41
Then, the binarization threshold value x of each block is calculated. As a method of obtaining the binarization threshold value of the block, for example, the average of the white pixel representative value and the black pixel representative value may be calculated. Since the binarization thresholds of all blocks have been obtained, the pixel threshold calculation unit 34 obtains the binarization threshold for each pixel.

【0043】図14において、二値化閾値を求めたい画
素62の周囲のブロックが50,51,52,53,各
ブロックの中心点を54,55,56,57とし、中心
点54,55,56,57で囲む領域に当該画素62が
収まるように周囲のブロック50,51,52,53を
選ぶ。ブロックは、長方形であるとする。このとき、当
該画素62の位置の中心点54,55,56,57で囲
む長方形63の内部での比率を上下方向でa1:b1、左
右方向でc1:d1(a1+b1=1,c1+d1=1)とす
る。各ブロックの閾値を長方形63の頂点に対応させ、
比率に従って補間して該当画素62の閾値を求める。中
心点(頂点)の閾値を<54>,<55>,<56>,<
57>とすると、計算式は、<54>*b1*d1+<5
5>*b1*c1+<56>*a1*d1+<57>*a1
*c1となる。画素閾値算出部34によって得られた各
画素の二値化閾値pは、二値化部35に送られ、当該画
素の画素値jと比較され、二値化され、二値化画像がで
きる。
In FIG. 14, the blocks around the pixel 62 for which the binarization threshold is to be obtained are 50, 51, 52, 53, the center points of the blocks are 54, 55, 56, 57, and the center points 54, 55, The surrounding blocks 50, 51, 52, and 53 are selected so that the pixel 62 fits in the area surrounded by 56 and 57. The blocks are assumed to be rectangular. At this time, the ratio inside the rectangle 63 surrounded by the center points 54, 55, 56, 57 of the position of the pixel 62 is a 1 : b 1 in the vertical direction and c 1 : d 1 (a 1 + b 1 in the horizontal direction. = 1 and c 1 + d 1 = 1). The threshold of each block is made to correspond to the vertex of the rectangle 63,
Interpolation is performed according to the ratio to obtain the threshold value of the corresponding pixel 62. The threshold value of the center point (vertex) is set to <54>, <55>, <56>, <
57>, the calculation formula is <54> * b 1 * d 1 + <5
5> * b 1 * c 1 + <56> * a 1 * d 1 + <57> * a 1
* C 1 The binarization threshold value p of each pixel obtained by the pixel threshold value calculation unit 34 is sent to the binarization unit 35, is compared with the pixel value j of the pixel, and is binarized to form a binarized image.

【0044】図9は、本発明による画像二値化装置の実
施例(請求項7)を示す図で、図中、45は代表画素値
突出ブロック除去部で、その他、図8と同じ作用をする
部分は同一の符号を付してある。図8に代表画素値突出
ブロック除去部45が加えられている。該代表画素値突
出ブロック除去部45は、ブロック白黒代表画素値検出
部38によって得られた白画素の代表値sと黒画素の代
表値tのうち、周囲のブロックと比較して値の突出した
ものを検出し、その値を周囲のブロックの白画素代表値
または黒画素代表値から算出した値に置き換える。
FIG. 9 is a diagram showing an embodiment (Claim 7) of the image binarizing apparatus according to the present invention. In the figure, reference numeral 45 is a representative pixel value protruding block removing section, which has the same function as that of FIG. The same reference numerals are given to the parts to be performed. A representative pixel value protruding block removing unit 45 is added to FIG. The representative pixel value protruding block removing unit 45 protrudes the value of the representative value s of the white pixels and the representative value t of the black pixels obtained by the block monochrome representative pixel value detecting unit 38 as compared with the surrounding blocks. An object is detected and its value is replaced with a value calculated from the white pixel representative value or the black pixel representative value of the surrounding blocks.

【0045】白黒代表画素値の突出したブロックを検出
する一方法は、例えば、当該ブロックの白(黒)画素代
表値を、周囲4近傍(または8近傍)のブロックの白
(黒)画素代表値と比較し、当該ブロックの白(黒)画
素代表値が最大値または最小値であり、かつ当該ブロッ
クの白(黒)画素代表値と周囲4近傍(または8近傍)
のブロックの白(黒)画素代表値との差の絶対値の最大
値(または最小値、あるいは差の絶対値の総和など)
が、あらかじめ設定した値より大きいときに、突出して
いると判断する。比較する近傍は、4近傍又は8近傍の
ほかに、上下左右の4近傍のブロックと比較して前述の
ような処理を行った後、斜めの4近傍のブロックと比較
して同様の処理を行うものでもよい。また、周囲のブロ
ックから突出した白(黒)画素代表値を、周囲のブロッ
クの白(黒)画素代表値から算出した値に置き換える一
方法は、例えば、周囲4近傍(または8近傍)のブロッ
クの白(黒)画素代表値の平均値で置き換える。前述の
ような処理を、2〜3回行ってもよい。
One method of detecting a block in which the black-and-white representative pixel value is prominent is, for example, that the white (black) pixel representative value of the block is changed to the white (black) pixel representative value of blocks in the neighborhood of four (or eight) neighborhoods. And the white (black) pixel representative value of the block is the maximum value or the minimum value, and the white (black) pixel representative value of the block and the surrounding 4 neighborhoods (or 8 neighborhoods)
Maximum absolute value of the difference from the white (black) pixel representative value of the block (or the minimum value, or the sum of absolute differences)
Is larger than a preset value, it is determined to be protruding. In addition to 4 neighborhoods or 8 neighborhoods, the neighborhoods to be compared are compared with the 4 neighborhoods in the upper, lower, left, and right directions, and the above-described processing is performed, and then the similar processings are performed in comparison with the blocks in the 4 diagonal neighborhoods. It may be one. Further, one method of replacing the white (black) pixel representative value protruding from the surrounding block with the value calculated from the white (black) pixel representative value of the surrounding block is, for example, a block in the neighborhood of 4 (or 8) in the neighborhood. Replace with the average value of the white (black) pixel representative values. You may perform the process as mentioned above 2-3 times.

【0046】具体的な処理のフローチャートは、図15
及び図16で示した閾値突出ブロック除去部のフローチ
ャートと全く同じであり、図15及び図16において、
th0(i,j)を、ブロック白黒代表画素値検出部3
8で求められた、(i,j)で示される位置のブロック
の白黒代表画素値、th1(i,j)を、代表画素値突
出ブロック除去後の同じ位置のブロックの白黒代表画素
値と読み替えればよい。
A flow chart of the concrete processing is shown in FIG.
16 and FIG. 16 is exactly the same as the flowchart of the threshold protruding block removing unit shown in FIG.
th0 (i, j) is represented by the block monochrome representative pixel value detection unit 3
The black-and-white representative pixel value of the block at the position indicated by (i, j), th1 (i, j), obtained in step 8, is replaced with the black-and-white representative pixel value of the block at the same position after the removal of the representative pixel value protruding block. Just do it.

【0047】図10は、本発明による画像二値化装置の
更に他の実施例(請求項8)を示す図で、図中、42は
ブロック白黒代表画素値選択部で、その他、図8と同じ
作用をする部分は同一の符号を付してある。図8にブロ
ック白黒代表画素値選択部42が加えられている。該ブ
ロック白黒代表画素値選択部42は、文字図形ブロック
検出部39によって非文字図形ブロックと判断されたブ
ロックの白画素代表値sと黒画素代表値tのどちらが信
頼できるかを選択する。
FIG. 10 is a diagram showing still another embodiment (claim 8) of the image binarizing apparatus according to the present invention, in which 42 is a block black-and-white representative pixel value selecting section, and FIG. Portions having the same function are designated by the same reference numerals. A block monochrome representative pixel value selection unit 42 is added to FIG. The block black-and-white representative pixel value selection unit 42 selects which of the white pixel representative value s and the black pixel representative value t of the block determined to be a non-character / graphic block by the character / graphic block detection unit 39 is reliable.

【0048】選択の方法としては、例えば、当該非文字
図形ブロックの周囲のブロックに文字図形ブロックが存
在すれば、文字図形ブロックの白画素代表値と非文字図
形ブロックの白画素代表値の差と、文字図形ブロックの
黒画素代表値と非文字図形ブロックの黒画素代表値の差
を比較し、差の小さい方を信頼がおけるとすればよい。
信頼がおけないと判定された方の当該非文字図形ブロッ
クの画素代表値は、周囲の文字図形ブロックの画素代表
値の平均を新たな値とする。白も黒も画素代表値が求ま
ったら、当該ブロックを文字図形ブロックとすること
で、すべての非文字図形ブロックが文字図形ブロックと
なる。
As a selection method, for example, if a character / graphic block exists in a block around the non-character / graphic block, the difference between the white pixel representative value of the character / graphic block and the white pixel representative value of the non-character / graphic block is calculated. The difference between the black pixel representative value of the character / graphic block and the black pixel representative value of the non-character / graphic block may be compared, and the smaller difference may be regarded as more reliable.
For the pixel representative value of the non-character figure block determined to be unreliable, the average of the pixel representative values of the surrounding character figure blocks is used as a new value. When the pixel representative values for both white and black are obtained, the block is set as a character / graphic block, and all non-character / graphic blocks become character / graphic blocks.

【0049】図11は、本発明による画像二値化装置の
更に他の実施例(請求項9)を示す図で、図中、43は
ブロック白黒代表画素値平滑化部で、その他、図10と
同じ作用をする部分は同一の符号を付してある。図10
に、ブロック白黒代表画素値平滑化部43が加えられて
いる。該ブロック白黒代表画素値平滑化部43を実現す
る一方法としては、あるブロックの上下左右のブロック
の代表画素値と、当該ブロックの代表画素値とを足し、
ブロック数で割って平均化した値を当該ブロックの新た
な代表画素値とする。端以外のブロックならば、ブロッ
ク数は5であり、端のブロックの場合は、ブロック数は
3または4となる。この処理を全ブロックに行うこと
で、ブロック間の代表画素値の平滑化が可能となる。
FIG. 11 is a diagram showing still another embodiment (claim 9) of the image binarization apparatus according to the present invention, in which 43 is a block black-and-white representative pixel value smoothing unit, and FIG. The same reference numerals are attached to the parts having the same functions as. Figure 10
In addition, a block monochrome representative pixel value smoothing unit 43 is added. As one method of realizing the block black-and-white representative pixel value smoothing unit 43, the representative pixel values of the upper, lower, left, and right blocks of a certain block are added to the representative pixel values of the block,
The value averaged by dividing by the number of blocks is set as a new representative pixel value of the block. The number of blocks is 5 for blocks other than the ends, and the number of blocks is 3 or 4 for blocks at the ends. By performing this process for all blocks, it becomes possible to smooth representative pixel values between blocks.

【0050】図12は、本発明による画像二値化装置の
更に他の実施例(請求項10)を示す図で、図中の参照
番号は、図7及び図10と同一である。図10にブロッ
ク閾値平滑化部36が加えられている。該ブロック閾値
平滑化部36を実現する一方法としては、あるブロック
の上下左右のブロックの閾値と、当該ブロックの閾値と
を足し、ブロック数で割って平均化した値を当該ブロッ
クの新たな閾値とする。端以外のブロックならば、ブロ
ック数は5であり、端のブロックの場合は、ブロック数
は3または4となる。この処理を全ブロックに行うこと
で、ブロック間の閾値の平滑化が可能となる。
FIG. 12 is a view showing still another embodiment (claim 10) of the image binarizing apparatus according to the present invention, and the reference numerals in the drawing are the same as those in FIGS. 7 and 10. A block threshold smoothing unit 36 is added to FIG. As a method of realizing the block threshold smoothing unit 36, a threshold value of blocks above and below and to the left and right of a block and a threshold value of the block are added, and a value averaged by dividing by the number of blocks is a new threshold value of the block. And The number of blocks is 5 for blocks other than the ends, and the number of blocks is 3 or 4 for blocks at the ends. By performing this process on all blocks, it becomes possible to smooth the threshold value between blocks.

【0051】図13は、本発明による画像二値化装置の
更に他の実施例(請求項11)を示す図で、図中の参照
番号は図7及び図11と同一である。図11に加え、エ
ッジ強調部37が加えられている。図13は二値化部で
参照する元画像のみにエッジ強調をかける場合の図であ
り、元画像にあらかじめエッジ強調をかけた場合は、元
画像にエッジ強調をかけた画像を新たな元画像とすれ
ば、図12と同じ構成となるので省いている。該エッジ
強調部37を実現する一方法は、当該画素の画素値を5
倍した値から、上下左右4画素の画素値の和を引いた値
を当該画素の新たな画素値とし、計算結果がオーバーフ
ロー,アンダーフローの時は最大輝度値,最小輝度値を
当該画素の新たな画素値とする方法である。これによっ
てエッジが強調される。エッジ強調された画像は、図1
3のように二値化部35のみにおいて使う以外にも、ブ
ロック白黒代表画素値検出部38の入力にしてもよい。
FIG. 13 is a view showing still another embodiment (claim 11) of the image binarization apparatus according to the present invention, and the reference numerals in the drawing are the same as those in FIGS. 7 and 11. In addition to FIG. 11, an edge emphasis section 37 is added. FIG. 13 is a diagram when edge enhancement is applied only to the original image referred to by the binarization unit. When edge enhancement is applied to the original image in advance, the image obtained by applying edge enhancement to the original image is changed to a new original image. If so, the configuration is the same as that in FIG. 12, and is omitted. One method of realizing the edge enhancement unit 37 is to set the pixel value of the pixel to 5
A value obtained by subtracting the sum of the pixel values of four pixels in the upper, lower, left, and right directions from the multiplied value is set as a new pixel value of the pixel. When the calculation result overflows or underflows, the maximum brightness value and the minimum brightness value are set as the new pixel value of the pixel. This is a method of setting different pixel values. This emphasizes the edges. The edge-enhanced image is shown in FIG.
In addition to being used only by the binarizing unit 35 as in 3, the input may be made to the block monochrome representative pixel value detecting unit 38.

【0052】このように、図8〜図13の実施例(請求
項6〜11)において、ブロック白黒代表画素値検出部
38によって全てのブロックの白画素,黒画素の代表値
が得られる。画像全体に影や明るさむらなどがあって
も、ブロックの大きさが影や明るさむらの大きさに比べ
て充分小さければ、当該ブロック内のみをみれば影や明
るさむらが存在しないので、この代表画素値は適切な代
表画素値である。
As described above, in the embodiments shown in FIGS. 8 to 13 (claims 6 to 11), the block black-and-white representative pixel value detection unit 38 obtains the representative values of the white pixels and the black pixels of all the blocks. Even if there are shadows and brightness unevenness in the entire image, if the size of the block is sufficiently smaller than the size of the shadows and brightness unevenness, there will be no shadows or brightness unevenness only by looking inside the block. , The representative pixel value is an appropriate representative pixel value.

【0053】しかし、ホワイドボードなどに照明の映り
込みがあるような画像では、映り込みによる明るさむら
は、ブロックの大きさより小さい場合もあり、映り込み
を含まないブロックでは、適切な代表画素値が求まって
いるのに対し、映り込みを含むブロックでは、適切な代
表画素値が求まっていない。また、映り込みを含むブロ
ックは、文字図形ブロック検出部39により、文字や図
形のない無地の部分でも、映り込みの影響で文字図形ブ
ロックと判断される場合もある。
However, in an image in which the illumination is reflected on the wide board, the brightness unevenness due to the reflection may be smaller than the size of the block. In a block that does not include the reflection, an appropriate representative pixel is included. While the value is obtained, an appropriate representative pixel value is not obtained in the block including the reflection. In addition, a block including glare may be determined by the character / graphic block detection unit 39 to be a character / figure block due to the effect of glare, even in a plain portion without characters or figures.

【0054】このため、非文字図形ブロック代表値算出
部40により、映り込みを含むブロックの適切でない代
表値が、隣接する非文字図形ブロックに伝播する場合が
ある。このような適切でない代表画素値は、周囲のブロ
ックの代表画素値に比べ値が突出しているという特徴が
あるので、代表画素値突出ブロック除去部45により、
このような適切でない代表画素値が除去され、隣接する
ブロックに伝播するのを防ぐことができる。文字,図形
のあるブロックでは、白黒両方の代表値とも信頼でき、
文字や図形の含まれない白紙や無地の部分では、ブロッ
ク白黒代表画素値選択部42によって選択された白か黒
のどちらか一方の代表値が信頼できることになる。
Therefore, the non-character graphic block representative value calculation unit 40 may propagate an inappropriate representative value of a block including a glare to an adjacent non-character graphic block. Since such an inappropriate representative pixel value has a feature that the value is more prominent than the representative pixel values of the surrounding blocks, the representative pixel value protruding block removing unit 45
It is possible to prevent such inappropriate representative pixel values from being removed and propagating to adjacent blocks. For blocks with letters and figures, both black and white representative values are reliable,
In a blank or plain area that does not include characters or figures, either the white or black representative value selected by the block black-and-white representative pixel value selection unit 42 becomes reliable.

【0055】各ブロックで閾値を求める場合は、文字や
図形の含まれない白紙や無地の部分の閾値は意味を持た
ないため、非文字図形ブロック代表値算出部40によっ
て周囲から補間するしかないので、無地の部分が広い面
積を占めるような場合は、影や明るさむらなどの変化に
充分追従することができないこともある。白黒の代表画
素値を求める場合は、白か黒かどちらかの一方の代表値
は使うことができ、その値は影や明るさむらなどの変化
を反映しているはずなので、無地の部分が広い面積を占
めるような場合でも、非文字図形ブロック代表値算出部
40で他方の値を補間しても、影や明るさむらなどの変
化に充分追従することができる。
When the threshold value is obtained for each block, the threshold value of a blank or plain portion that does not include characters or figures has no meaning, and the non-character figure block representative value calculation unit 40 must interpolate from the surroundings. However, when a plain area occupies a large area, it may not be able to sufficiently follow changes such as shadows and uneven brightness. When calculating the black and white representative pixel value, either the white or black representative value can be used, and that value should reflect changes such as shadows and brightness unevenness, so the solid part Even in the case of occupying a large area, even if the other value is interpolated by the non-character figure block representative value calculation unit 40, it is possible to sufficiently follow changes such as shadows and uneven brightness.

【0056】文字図形ブロック検出部39,非文字図形
ブロック代表値算出部40,ブロック白黒代表画素値選
択部42によって、文字,図形のあるブロックも、ない
ブロックも、全てのブロックにおいて適切な閾値が得ら
れる。各ブロックの二値化閾値は、当該ブロックの白画
素代表値と黒画素代表値からブロック閾値算出部によっ
て算出される。各ブロックで得た閾値とブロック内の画
素をそのまま比較して二値化すると、閾値の異なるブロ
ック間の境界が目立ってしまう。画素閾値算出部34に
よって、各画素毎に周囲のブロックの閾値を補間して閾
値を算出し、ブロック境界も目立たず、滑らかで自然な
二値化画像が得られる。これらによって、影や明るさむ
らのある画像でも文字などを認識できるような二値化が
可能となる。
By the character / graphic block detection unit 39, the non-character / graphic block representative value calculation unit 40, and the block black-and-white representative pixel value selection unit 42, appropriate threshold values are set for all blocks, both with and without characters and graphics. can get. The binarization threshold value of each block is calculated by the block threshold value calculation unit from the white pixel representative value and the black pixel representative value of the block. If the threshold value obtained in each block and the pixel in the block are directly compared and binarized, the boundary between blocks having different threshold values becomes conspicuous. The pixel threshold calculation unit 34 calculates the threshold by interpolating the thresholds of the surrounding blocks for each pixel, and a smooth and natural binarized image can be obtained with no noticeable block boundaries. These enable binarization so that characters and the like can be recognized even in images with shadows and uneven brightness.

【0057】また、各ブロックで求めた代表値は、当該
ブロックのみから求めているため、各ブロックの中では
適切な代表値だが、画像全体でみると、周囲から突出し
た値となったり、隣接するブロックの代表値との差が大
きい時は、画像全体の二値化結果が不安定となることが
ある。ブロック白黒代表画素値平滑化部43によって、
ブロック間で代表値を平滑化することによって、より適
切な代表値が得られる。代表値でなく、閾値でも同様
に、各ブロックで求めた閾値は当該ブロックのみから求
めているため、各ブロックの中では適切な閾値だが、画
像全体でみると周囲から突出した値となったり、隣接す
るブロックの閾値との差が大きい時は、画像全体の二値
化結果が不安定となることがある。ブロック閾値平滑化
部36によって、ブロック間での閾値を平滑化すること
により、より適切な閾値が得られる。
Further, since the representative value obtained in each block is obtained only from the block concerned, it is an appropriate representative value in each block, but when viewed from the whole image, it becomes a value protruding from the surroundings or is adjacent. When the difference from the representative value of the block to be processed is large, the binarization result of the entire image may become unstable. By the block monochrome representative pixel value smoothing unit 43,
By smoothing the representative value between blocks, a more appropriate representative value can be obtained. Similarly, the threshold value obtained in each block is not only the representative value, but the threshold value obtained in each block is obtained only from the block, so it is an appropriate threshold value in each block, but when viewed from the entire image, it becomes a value protruding from the surroundings, When the difference between the thresholds of adjacent blocks is large, the binarization result of the entire image may become unstable. The block threshold smoothing unit 36 smoothes the thresholds between blocks to obtain a more appropriate threshold.

【0058】また、ブロック内の画素数が少ない時は、
ブロック内で得る二値化の閾値は最適でないこともあり
え、細い線が最適でない二値化閾値によって、二値化画
像がさらに細くなったり、潰れすることがある。元の多
値画像をエッジ強調し、エッジ強調した画素と閾値を比
較して二値化することで、こういった細部の構造を二値
化後も保存することができる。
When the number of pixels in the block is small,
The binarization threshold obtained in the block may not be optimum, and the thin line may cause the binarized image to become thinner or crushed due to the non-optimal binarization threshold. By edge-enhancing the original multi-valued image and comparing the edge-enhanced pixel with a threshold value to perform binarization, such a detailed structure can be preserved even after binarization.

【0059】[0059]

【発明の効果】以上の説明から明らかなように、本発明
によると、以下のような効果がある。 (1)ヒストグラムを用いて、画素を輝度順に並べた時
に、明るい方から何番目かの輝度値を白画素代表値、暗
い方から何番目かの輝度値を黒画素代表値とし、二値化
閾値を白画素代表値,黒画素代表値の平均とすること
で、高速に二値化閾値が求められる。また、特に、文字
画像においては、ヒストグラムにおける黒画素の山と白
画素の山の間の谷の部分に二値化閾値を決めることがで
きるため、二値化画像も良好な結果を与える。細い線の
みの画像の場合、黒画素の山か白画素の山のいずれか一
方しか明確な山を作らず、他方は広く薄く分散すること
があるが、分散した部分の山から遠い部分の値を代表値
にとることにより、白画素代表値,黒画素代表値の平均
は山にかかる可能性が低くなるため、適切な二値化閾値
となる。さらに、評価関数を使わずにヒストグラムから
直接二値化の閾値を求めるため、高速に閾値を求めるこ
とができる。 (2)ブロック閾値検出手段によって全てのブロックの
二値化閾値が得られるが、文字や図形の含まれない白紙
や無地の部分はこの閾値は意味を持たない。そこで、文
字図形ブロック検出手段,非文字図形ブロック閾値算出
手段によって、文字,図形のあるブロックも無いブロッ
クも全てのブロックにおいて適切な閾値が得られる。ま
た、画像全体に影や明るさむらなどがあっても、ブロッ
クの大きさが影や明るさむらの大きさに比べて充分小さ
ければ、当該ブロック内のみをみれば影や明るさむらが
存在しないので、この閾値は適切な閾値となる。 (3)照明の映り込みなどがあって、ブロックの大きさ
に比べて小さい明るさとむらがある場合は、適切なブロ
ック閾値あるいは白/黒代表画素値が得られないが、こ
のようなブロックは、閾値や白/黒代表画素値が周囲の
ブロックと比較して突出しているため、閾値突出ブロッ
ク除去手段または代表画素値突出ブロック除去手段によ
って取り除くことができ、白地の部分であるにもかかわ
らず、映り込みの影響で、映り込みの部分が白に、地の
部分が黒に2値化されるというような障害も防ぐことが
できる。 (4)各ブロックで得た閾値とブロック内の画素をその
まま比較して二値化すると、閾値の異なるブロック間の
境界が目立ってしまう。そこで、画像閾値算出手段によ
って、各画素毎に周囲のブロックの閾値を補間して閾値
を算出し、ブロック境界も目立たず、滑らかで自然な二
値化画像が得られる。これらによって、影や明るさむら
のある画像でも文字などを認識できるような二値化が可
能となる。 (5)また、各ブロックで求めた閾値は、当該ブロック
のみから求めているため、各ブロックの中では適切な閾
値だが、画像全体でみると周囲から突出した値となった
り、隣接するブロックの閾値との差が大きい時は画像全
体の二値化結果が不安定になることがある。そこで、ブ
ロック閾値平滑化手段によって、ブロック間で閾値を平
滑化することによって、より適切な閾値が得られる。 (6)また、ブロック内の画素数が少ない時は、ブロッ
ク内で得る二値化の閾値は最適でないこともありえ、細
い線が最適でない二値化閾値によって二値化画像がさら
に細くなったり潰れたりすることがある。そこで、元の
多値画像をエッジ強調し、エッジ強調した画素と閾値を
比較して二値化することで、こういった細部の構造を二
値化後も保存することができる。
As is apparent from the above description, the present invention has the following effects. (1) When the pixels are arranged in the order of brightness using a histogram, the brightness value of which number from the lightest one is the white pixel representative value, and the value of which brightness value from the darkest one is the black pixel representative value are binarized. The binarization threshold value can be obtained at high speed by setting the threshold value to the average of the white pixel representative value and the black pixel representative value. Further, particularly in a character image, the binarization threshold can be determined in the valley portion between the peaks of black pixels and the peaks of white pixels in the histogram, so that the binarized image also gives good results. In the case of an image with only thin lines, only one of the black pixel peaks or the white pixel peaks produces a clear peak, and the other may be widely and thinly dispersed, but the value of the portion far from the dispersed portion By taking as the representative value, the average of the white pixel representative value and the black pixel representative value is less likely to be overlaid on the mountain, so that it becomes an appropriate binarization threshold value. Further, since the threshold for binarization is directly obtained from the histogram without using the evaluation function, the threshold can be obtained at high speed. (2) The binarization thresholds of all blocks can be obtained by the block threshold detection means, but this threshold has no meaning for a blank sheet or a plain portion that does not include characters or figures. Therefore, the character / graphic block detection means and the non-character / graphic block threshold calculation means can obtain appropriate threshold values for all blocks, whether or not there are blocks with characters and graphics. Even if there are shadows and brightness irregularities in the entire image, if the size of the block is sufficiently smaller than the size of the shadows and brightness irregularities, there will be shadows and brightness irregularities only in the block. Therefore, this threshold is an appropriate threshold. (3) If there is a small amount of brightness and unevenness compared to the size of the block due to the reflection of illumination, etc., an appropriate block threshold value or white / black representative pixel value cannot be obtained. Since the threshold value and the white / black representative pixel value are projected as compared with the surrounding blocks, they can be removed by the threshold projecting block removing means or the representative pixel value protruding block removing means, even though it is a white background portion. It is also possible to prevent an obstacle that the reflection part is binarized to white and the ground part is binarized to black due to the influence of the reflection. (4) When the threshold value obtained in each block and the pixel in the block are directly compared and binarized, the boundary between blocks having different threshold values becomes conspicuous. Therefore, the image threshold calculation unit interpolates the thresholds of the surrounding blocks for each pixel to calculate the thresholds, and a smooth and natural binarized image can be obtained with no noticeable block boundaries. These enable binarization so that characters and the like can be recognized even in images with shadows and uneven brightness. (5) Further, the threshold value obtained in each block is an appropriate threshold value in each block because it is obtained only from the relevant block, but it is a value protruding from the surroundings in the whole image, When the difference from the threshold is large, the binarization result of the entire image may become unstable. Therefore, a more appropriate threshold value can be obtained by smoothing the threshold value between blocks by the block threshold value smoothing means. (6) Further, when the number of pixels in the block is small, the binarization threshold obtained in the block may not be optimal, and a thin line may make the binarized image thinner due to the non-optimal binarization threshold. May be crushed. Therefore, the original multi-valued image is edge-emphasized, and the edge-enhanced pixel is compared with a threshold value to be binarized, whereby such a detailed structure can be preserved even after binarization.

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

【図1】本発明による画像二値化装置の一実施例(請求
項1)を説明するための構成図である。
FIG. 1 is a configuration diagram for explaining an embodiment (claim 1) of an image binarization apparatus according to the present invention.

【図2】図1における代表画素値検出部(白画素)の構
成図である。
FIG. 2 is a configuration diagram of a representative pixel value detection unit (white pixel) in FIG.

【図3】図1における代表画素値検出部(黒画素)の構
成図である。
FIG. 3 is a configuration diagram of a representative pixel value detection unit (black pixel) in FIG.

【図4】本発明による画像二値化装置の他の実施例(請
求項2)を示す図である。
FIG. 4 is a diagram showing another embodiment (claim 2) of the image binarizing apparatus according to the present invention.

【図5】本発明による画像二値化装置の更に他の実施例
(請求項3)を示す図である。
FIG. 5 is a diagram showing still another embodiment (Claim 3) of the image binarization apparatus according to the present invention.

【図6】本発明による画像二値化装置の更に他の実施例
(請求項4)を示す図である。
FIG. 6 is a diagram showing still another embodiment (claim 4) of the image binarizing apparatus according to the present invention.

【図7】本発明による画像二値化装置の更に他の実施例
(請求項5)を示す図である。
FIG. 7 is a diagram showing still another embodiment (Claim 5) of the image binarizing apparatus according to the present invention.

【図8】本発明による画像二値化装置の更に他の実施例
(請求項6)を示す図である。
FIG. 8 is a diagram showing still another embodiment (Claim 6) of the image binarization apparatus according to the present invention.

【図9】本発明による画像二値化装置の更に他の実施例
(請求項7)を示す図である。
FIG. 9 is a diagram showing still another embodiment (Claim 7) of the image binarization apparatus according to the present invention.

【図10】本発明による画像二値化装置の更に他の実施
例(請求項8)を示す図である。
FIG. 10 is a diagram showing still another embodiment (Claim 8) of the image binarization apparatus according to the present invention.

【図11】本発明による画像二値化装置の更に他の実施
例(請求項9)を示す図である。
FIG. 11 is a diagram showing still another embodiment (Claim 9) of the image binarizing apparatus according to the present invention.

【図12】本発明による画像二値化装置の更に他の実施
例(請求項10)を示す図である。
FIG. 12 is a diagram showing still another embodiment (Claim 10) of the image binarization apparatus according to the present invention.

【図13】本発明による画像二値化装置の更に他の実施
例(請求項11)を示す図である。
FIG. 13 is a diagram showing still another embodiment (Claim 11) of the image binarizing apparatus according to the present invention.

【図14】本発明における画像閾値算出部の構成図であ
る。
FIG. 14 is a configuration diagram of an image threshold calculation unit in the present invention.

【図15】図5における閾値突出ブロック除去部の処理
を示すフローチャート(その1)である。
FIG. 15 is a flowchart (part 1) showing the processing of the threshold protrusion block removal unit in FIG. 5;

【図16】図5における閾値突出ブロック除去部の処理
を示すフローチャート(その2)である。
16 is a flowchart (No. 2) showing the processing of the threshold protruding block removal unit in FIG.

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

1…信号処理部、2…A/D変換部、3…ヒストグラム
作成部、4…代表画素値検出部、5…閾値決定部、31
…ブロック閾値検出部、32…文字図形ブロック検出
部、33…非文字図形ブロック閾値検出部、34…画素
閾値算出部、35…二値化部、36…ブロック閾値平滑
化部、37…エッジ強調部、38…ブロック白黒代表画
素値検出部、39…文字図形ブロック検出部、40…非
文字図形ブロック代表値算出部、41…ブロック閾値算
出部、42…ブロック白黒代表画素値選択部、43…ブ
ロック白黒代表画素値平滑化部、44…閾値突出ブロッ
ク除去部、45…代表画素値突出ブロック除去部。
DESCRIPTION OF SYMBOLS 1 ... Signal processing part, 2 ... A / D conversion part, 3 ... Histogram creation part, 4 ... Representative pixel value detection part, 5 ... Threshold value determination part, 31
... block threshold detection unit, 32 ... character / graphic block detection unit, 33 ... non-character / graphic block threshold detection unit, 34 ... pixel threshold calculation unit, 35 ... binarization unit, 36 ... block threshold smoothing unit, 37 ... edge enhancement Part 38 ... Block black-and-white representative pixel value detection unit 39 ... Character / graphic block detection unit 40 ... Non-character / graphic block representative value calculation unit 41 ... Block threshold value calculation unit 42 ... Block black / white representative pixel value selection unit 43 ... Block monochrome representative pixel value smoothing unit, 44 ... Threshold protruding block removing unit, 45 ... Representative pixel value protruding block removing unit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06K 9/38 A (72)発明者 樋上 貞彦 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内 (72)発明者 戸田 浩義 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内 (72)発明者 堀川 豊史 大阪府大阪市阿倍野区長池町22番22号 シ ャープ株式会社内─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Internal reference number FI Technical indication location G06K 9/38 A (72) Inventor Sadahiko Higami 22-22 Nagaikecho, Abeno-ku, Osaka-shi, Osaka Prefecture Co., Ltd. (72) Inventor Hiroyoshi Toda 22-22 Nagaike-cho, Abeno-ku, Osaka-shi, Osaka Prefecture Sharp Corporation (72) Inventor Toshifumi Horikawa 22-22 Nagaike-cho, Abeno-ku, Osaka City, Osaka Prefecture

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 多値画像より輝度値のヒストグラムを求
めるヒストグラム作成手段と、該ヒストグラム作成手段
により求められたヒストグラムより画像中の白画素値、
黒画素値を代表する値を求める代表画素値検出手段と、
該代表画素値検出手段により求められた白画素代表値、
黒画素代表値より二値化のための閾値を求める閾値決定
手段とを有することを特徴とする画像二値化装置。
1. Histogram creating means for finding a histogram of brightness values from a multi-valued image, and white pixel values in the image from the histogram found by the histogram creating means,
Representative pixel value detection means for obtaining a value representative of the black pixel value,
A white pixel representative value obtained by the representative pixel value detecting means,
An image binarization device, comprising: a threshold value determining unit that obtains a threshold value for binarization from a black pixel representative value.
【請求項2】 ブロックに分割した多値画像のブロック
毎に二値化の閾値を求めるブロック閾値検出手段と、ブ
ロック中に、文字や図形が含まれるかどうかを検出する
文字図形ブロック検出手段と、該文字図形ブロック検出
手段により文字や図形が含まれないと判断されたブロッ
クの二値化の閾値を、周囲のブロックの閾値から算出す
る非文字図形ブロック閾値算出手段と、ブロック毎に求
められた二値化の閾値から1画素毎の閾値に変換する画
素閾値算出手段と、該画素閾値算出手段で求められた1
画素毎の二値化閾値を用いて元の多値画像を二値化する
二値化手段とを有することを特徴とする画像二値化装
置。
2. A block threshold value detecting means for obtaining a threshold value for binarization for each block of a multi-valued image divided into blocks, and a character / graphic block detecting means for detecting whether a character or a figure is included in the block. , A non-character / graphic block threshold calculation means for calculating a binarization threshold of a block determined by the character / graphic block detection means that does not include a character or graphic, from the thresholds of surrounding blocks, and A pixel threshold value calculating means for converting the binarization threshold value into a threshold value for each pixel, and 1 obtained by the pixel threshold value calculating means.
An image binarization device, comprising: a binarization unit that binarizes an original multi-valued image using a binarization threshold value for each pixel.
【請求項3】 前記ブロック閾値検出手段により求めら
れた閾値のうち、周囲のブロックと比較して値の突出し
ているブロックの閾値を、周囲のブロックの閾値から算
出される値に置き換える閾値突出ブロック除去手段を有
することを特徴とする請求項2記載の画像二値化装置。
3. A threshold protruding block for replacing a threshold value of a block having a value that is higher than that of a surrounding block among the threshold values obtained by the block threshold value detecting means, with a value calculated from the threshold values of the surrounding blocks. The image binarization apparatus according to claim 2, further comprising a removing unit.
【請求項4】 前記非文字図形ブロック閾値検出手段に
より得たブロック毎の閾値に対して、あるブロックの閾
値と周囲のブロックの閾値との差を小さくするようにす
るブロック閾値平滑化手段を有することを特徴とする請
求項2又は3記載の画像二値化装置。
4. A block threshold smoothing means for reducing a difference between a threshold of a certain block and a threshold of a surrounding block with respect to a threshold for each block obtained by the non-character figure block threshold detecting means. The image binarization apparatus according to claim 2 or 3, characterized in that.
【請求項5】 前記二値化手段で閾値と比較される多値
画像にエッジ強調をかけておくエッジ強調手段、もしく
は元の多値画像にあらかじめエッジ強調をかけておくエ
ッジ強調手段を有することを特徴とする請求項2,3又
は4記載の画像二値化装置。
5. An edge enhancing means for applying edge enhancement to a multi-valued image to be compared with a threshold value by the binarizing means, or an edge enhancing means for applying edge enhancement to an original multi-valued image in advance. The image binarization device according to claim 2, 3 or 4.
【請求項6】 ブロックに分割した多値画像のブロック
毎に白画素の代表値と黒画素の代表値を求めるブロック
白黒代表画素値検出手段と、ブロック中に、文字や図形
が含まれるかどうかを検出する文字図形ブロック検出手
段と、該文字図形ブロック検出手段により文字や図形が
含まれないと判断されたブロックの代表画素値を、周囲
のブロックの代表画素値から算出する非文字図形ブロッ
ク代表値算出手段と、該非文字図形ブロック代表値算出
手段で求められた白画素、黒画素の代表画素値から当該
ブロックの二値化の閾値を求めるブロック閾値算出手段
と、ブロック毎に求められた二値化の閾値から1画素毎
の閾値に変換する画素閾値算出手段と、該画素閾値算出
手段で求められた1画素毎の二値化閾値を用いて元の多
値画像を二値化する二値化手段とを有することを特徴と
する画像二値化装置。
6. A block black and white representative pixel value detecting means for obtaining a representative value of white pixels and a representative value of black pixels for each block of a multi-valued image divided into blocks, and whether or not a character or figure is included in the block. And a non-character graphic block representative for calculating a representative pixel value of a block determined by the character / graphic block detection unit that does not include a character or a graphic from the representative pixel values of surrounding blocks. Value calculation means, block threshold calculation means for calculating the binarization threshold of the block from the representative pixel values of the white pixels and black pixels calculated by the non-character figure block representative value calculation means, and two calculated for each block. An original multi-valued image is binarized by using a pixel threshold value calculation means for converting the threshold value for binarization into a threshold value for each pixel and a binarization threshold value for each pixel obtained by the pixel threshold value calculation means. An image binarization apparatus comprising: a binarization unit.
【請求項7】 前記ブロック白黒代表画素値検出手段に
より求められた白画素と黒画素の代表値のうち、周囲の
ブロックと比較して値の突出しているブロックの代表画
素値を、周囲のブロックの代表画素値から算出される値
に置き換える代表画素値突出ブロック除去手段を有する
ことを特徴とする請求項6記載の画像二値化装置。
7. Among the representative values of the white pixels and the black pixels obtained by the block black and white representative pixel value detecting means, the representative pixel value of the block whose value is higher than that of the surrounding block is set to the surrounding block. 7. The image binarization apparatus according to claim 6, further comprising: representative pixel value protruding block removing means for replacing the representative pixel value with a value calculated from the representative pixel value.
【請求項8】 前記文字図形ブロック検出手段により文
字や図形が含まれないと判断されたブロックに対し、当
該ブロックの白画素代表値か黒画素代表値のどちらが信
頼できるかを選択するブロック白黒代表画素値選択手段
と、該ブロック白黒代表画素値選択手段によって選択さ
れなかった代表画素値を、周囲のブロックの代表画素値
から算出する非文字図形ブロック代表値算出手段とを有
することを特徴とする請求項6又は7記載の画像二値化
装置。
8. A block black-and-white representative for selecting which of a white pixel representative value and a black pixel representative value of the block is reliable for a block determined by the character / graphic block detecting means to include no characters or figures. It is characterized by comprising pixel value selecting means and non-character graphic block representative value calculating means for calculating the representative pixel values not selected by the block monochrome representative pixel value selecting means from the representative pixel values of surrounding blocks. The image binarization device according to claim 6.
【請求項9】 前記非文字図形ブロック代表値算出手段
により得たブロック毎の白画素,黒画素の代表値に対し
て、あるブロックの代表値と周囲のブロックの代表値と
の差を小さくするようにするブロック白黒代表画素値平
滑化手段を有することを特徴とする請求項6,7又は8
記載の画像二値化装置。
9. A difference between a representative value of a certain block and a representative value of surrounding blocks is reduced with respect to the representative value of the white pixel and the black pixel for each block obtained by the non-character figure block representative value calculating means. 9. A block black-and-white representative pixel value smoothing means for performing the above is provided.
The image binarization apparatus described.
【請求項10】 前記ブロック閾値算出手段により得た
ブロック毎の二値化閾値に対して、あるブロックの閾値
と周囲のブロックの閾値との差を小さくするようにする
ブロック閾値平滑化手段を有することを特徴とする請求
項6,7又は8記載の画像二値化装置。
10. The block threshold smoothing unit is configured to reduce a difference between a threshold of a certain block and a threshold of a surrounding block with respect to the binarization threshold for each block obtained by the block threshold calculation unit. 9. The image binarization device according to claim 6, 7 or 8.
【請求項11】 前記二値化手段で閾値と比較される多
値画像にエッジ強調をかけておくエッジ強調手段、もし
くは元の多値画像にあらかじめエッジ強調をかけておく
エッジ強調手段を有することを特徴とする請求項6〜1
0いずれか1項に記載の画像二値化装置。
11. An edge enhancing means for applying edge enhancement to a multi-valued image to be compared with a threshold value by the binarizing means, or an edge enhancing means for applying edge enhancement to an original multi-valued image in advance. 6. The method according to claim 6, wherein
0. The image binarization apparatus according to any one of items.
JP6050397A 1993-11-30 1994-03-22 Image binarizer Pending JPH07212591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6050397A JPH07212591A (en) 1993-11-30 1994-03-22 Image binarizer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP29960993 1993-11-30
JP5-299609 1993-11-30
JP6050397A JPH07212591A (en) 1993-11-30 1994-03-22 Image binarizer

Publications (1)

Publication Number Publication Date
JPH07212591A true JPH07212591A (en) 1995-08-11

Family

ID=26390871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6050397A Pending JPH07212591A (en) 1993-11-30 1994-03-22 Image binarizer

Country Status (1)

Country Link
JP (1) JPH07212591A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10020178B4 (en) * 1999-04-21 2005-01-13 Ricoh Co., Ltd. Apparatus and method for image binarization and apparatus and method for image acquisition
DE10066045B4 (en) * 1999-04-21 2006-05-18 Ricoh Co., Ltd. Image generation unit for document processing has block division unit, luminance value output section, adjustment units, digitization section, object block selection unit, ranging section and calculation unit.
US7623727B2 (en) 1999-04-21 2009-11-24 Ricoh Company, Ltd. Image binarization apparatus, image binarization method, image pickup apparatus, image pickup method, and a computer product
CN101764922B (en) 2009-08-03 2012-01-25 北京智安邦科技有限公司 Method and device for adaptive generation of luminance threshold

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10020178B4 (en) * 1999-04-21 2005-01-13 Ricoh Co., Ltd. Apparatus and method for image binarization and apparatus and method for image acquisition
DE10066045B4 (en) * 1999-04-21 2006-05-18 Ricoh Co., Ltd. Image generation unit for document processing has block division unit, luminance value output section, adjustment units, digitization section, object block selection unit, ranging section and calculation unit.
US7623727B2 (en) 1999-04-21 2009-11-24 Ricoh Company, Ltd. Image binarization apparatus, image binarization method, image pickup apparatus, image pickup method, and a computer product
CN101764922B (en) 2009-08-03 2012-01-25 北京智安邦科技有限公司 Method and device for adaptive generation of luminance threshold

Similar Documents

Publication Publication Date Title
JP4112362B2 (en) System and method for enhancing scanned document images for color printing
US7899248B2 (en) Fast segmentation of images
JP4423298B2 (en) Text-like edge enhancement in digital images
JP3768052B2 (en) Color image processing method, color image processing apparatus, and recording medium therefor
US6766053B2 (en) Method and apparatus for classifying images and/or image regions based on texture information
JP3585703B2 (en) Image processing device
US6839151B1 (en) System and method for color copy image processing
US8351720B2 (en) Method and system providing edge enhanced image binarization
JP2003058894A (en) Method and apparatus for segmenting a pixelated image
JP2001320584A (en) Image processing apparatus and image forming apparatus
WO1999067943A1 (en) Image processor, image processing method, and medium on which image processing program is recorded
JPH0766977A (en) Picture processing unit
JPH1070650A (en) Copying method for synthesis document image
JP2002084420A (en) Image processing unit, image processing method and recording medium with stored image processing program
JP2005519406A (en) User-selectable background denoising of scanned document images
JP3040896B2 (en) Image processing device
JP4502001B2 (en) Image processing apparatus and image processing method
JP3989341B2 (en) Image processing device
JPH07212591A (en) Image binarizer
US7636492B2 (en) Selective smoothing including bleed-through reduction
JP3142279B2 (en) Halftone dot area separation device
JP3100383B2 (en) Character region separation method and apparatus
JP2851724B2 (en) Image processing device
KR100537827B1 (en) Method for the Separation of text and Image in Scanned Documents using the Distribution of Edges
Kwon et al. Text-enhanced error diffusion using multiplicative parameters and error scaling factor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090328

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090328

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100328

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110328

Year of fee payment: 8

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

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20110328

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

Free format text: PAYMENT UNTIL: 20120328

Year of fee payment: 9

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20130328

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

Free format text: PAYMENT UNTIL: 20130328

Year of fee payment: 10

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20140328