JP2002016801A - Digital Image Threshold Selection Method - Google Patents
Digital Image Threshold Selection MethodInfo
- Publication number
- JP2002016801A JP2002016801A JP2000197691A JP2000197691A JP2002016801A JP 2002016801 A JP2002016801 A JP 2002016801A JP 2000197691 A JP2000197691 A JP 2000197691A JP 2000197691 A JP2000197691 A JP 2000197691A JP 2002016801 A JP2002016801 A JP 2002016801A
- Authority
- JP
- Japan
- Prior art keywords
- value
- digital image
- binarization
- threshold value
- threshold
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000010187 selection method Methods 0.000 title claims abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 30
- 230000001186 cumulative effect Effects 0.000 claims abstract description 9
- 239000011521 glass Substances 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 4
- NIXOWILDQLNWCW-UHFFFAOYSA-N acrylic acid group Chemical group C(C=C)(=O)O NIXOWILDQLNWCW-UHFFFAOYSA-N 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
Landscapes
- Image Input (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
(57)【要約】
【課題】 原稿の余白領域に対応する背景と、デバイス
自体の色彩に対応する背景とをデジタル画像から切り出
す二値化処理に最適なしきい値を選択するデジタル画像
の二値化しきい値選択方法及び二値化しきい値選択プロ
グラムを記録した記録媒体を提供する。
【解決手段】 デジタル画像の輝度値の度数分布を求
め、輝度値が0〜200の第一区間の累積度数をXと
し、輝度値が160〜200の第二区間の累積度数をY
とするとき、Y/Xが0.4より大きいか否かを判別す
ることにより、原稿の余白領域の色彩に応じたしきい値
の選択が必要か否かを判別する。Y/Xが0.4より大
きい場合、第二区間の最頻値から所定値を減じた値を二
値化しきい値として選択することにより、原稿の余白領
域に対応する背景とデバイス自体の色彩に対応する背景
とをデジタル画像から切り出す二値化処理に最適なしき
い値を選択することができる。
(57) [Problem] To select a threshold value optimal for a binarization process of cutting out a background corresponding to a blank area of a document and a background corresponding to a color of a device itself from a digital image. Provided is a recording medium that records a binarization threshold selection method and a binarization threshold selection program. A frequency distribution of luminance values of a digital image is obtained, a cumulative frequency of a first section having a luminance value of 0 to 200 is represented by X, and a cumulative frequency of a second section having a luminance value of 160 to 200 is represented by Y.
Then, by determining whether or not Y / X is greater than 0.4, it is determined whether or not it is necessary to select a threshold value according to the color of the blank area of the document. When Y / X is greater than 0.4, a value obtained by subtracting a predetermined value from the mode value of the second section is selected as the binarization threshold value, so that the background corresponding to the blank area of the document and the color of the device itself are selected. It is possible to select an optimal threshold value for the binarization process of cutting out the background corresponding to the digital image from the digital image.
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、デジタル画像の二
値化しきい値選択方法に関する。[0001] 1. Field of the Invention [0002] The present invention relates to a method for selecting a binarization threshold value of a digital image.
【0002】[0002]
【従来の技術】スキャナ等の画像読み取り装置により入
力されるデジタル画像には、原稿の余白領域に対応する
背景及びデバイス自体の色彩に対応する背景の2種類の
背景並びに文字、図形及び写真の対象領域が含まれてい
る。後者の背景は、デバイスの読み取り領域に対して原
稿が小さい場合に生じ、フラットベッド型スキャナを例
にとると、原稿カバーの原稿台ガラス対向面に対応する
画像領域である。通常、原稿カバーの原稿台ガラス対向
面は、これに対応する画像領域の濃度が最も淡くなるよ
うにほぼ純白になっているのに対し、原稿の余白領域、
すなわち紙等の素地は多少色づいている。デジタル画像
から背景を切り出し、紙面上の文字、図形及び写真の対
象領域を抽出するには二値化処理を行う。このような二
値化処理では、前述の2種類の背景をともに背景として
切り出すことができる二値化しきい値の選択が必要とな
る。2. Description of the Related Art A digital image input by an image reading apparatus such as a scanner includes two types of backgrounds, a background corresponding to a blank area of a document and a background corresponding to the color of the device itself, and objects of characters, figures and photographs. Region is included. The latter background occurs when the document is smaller than the reading area of the device. In the case of a flatbed scanner, for example, the background is an image area corresponding to the surface of the document cover facing the platen glass. Normally, the surface of the document cover facing the platen glass is almost pure white so that the density of the corresponding image area is lightest, while the margin area of the document is
That is, the base such as paper is slightly colored. Binary processing is performed to cut out the background from the digital image and extract the target area of characters, graphics, and photographs on paper. In such binarization processing, it is necessary to select a binarization threshold capable of cutting out both of the two types of backgrounds as backgrounds.
【0003】従来、二値化処理に用いる固定しきい値の
選択方法として、p−タイル法、判別分析法等が知られ
ている。p−タイル法は入力画像の濃淡分布が既知であ
る場合に適した固定しきい値の選択方法である。判別分
析法は濃度値のヒストグラムの谷間を検出し、その谷間
の濃度値を二値化しきい値として用い、入力画像の濃淡
分布が未知である場合にも適用できる固定しきい値の選
択方法である。Conventionally, a p-tile method, a discriminant analysis method, and the like have been known as methods for selecting a fixed threshold value used in the binarization processing. The p-tile method is a method of selecting a fixed threshold suitable for a case where the grayscale distribution of an input image is known. The discriminant analysis method detects a valley of a histogram of density values, uses the density value of the valley as a binarization threshold, and selects a fixed threshold that can be applied even when the grayscale distribution of an input image is unknown. is there.
【0004】[0004]
【発明が解決しようとする課題】しかし、p−タイル法
は、入力画像の濃淡分布に共通の特徴がない場合、有効
な二値化しきい値を選択することができない。また、判
別分析法によると、濃度値のヒストグラムに互いに判別
することが困難な複数の谷間がある場合、有効な二値化
しきい値を選択することができない。したがって、p−
タイル法及び判別分析法によると、前述の2種類の背景
が存在するデジタル画像の二値化処理に用いる適切なし
きい値を選択することができない場合があった。特に新
聞紙や淡色の色紙に文字、図形及び写真が記載された原
稿については、多くの場合、原稿余白部分が読み取り対
象領域として抽出されていた。また、場所によってしき
い値を変える動的しきい値処理によると、処理時間が長
くなり、また二値画像にノイズを含みやすいという問題
があった。However, the p-tile method cannot select an effective binarization threshold value if the grayscale distribution of the input image does not have a common feature. Further, according to the discriminant analysis method, when a histogram of density values has a plurality of valleys that are difficult to distinguish from each other, it is not possible to select an effective binarization threshold. Therefore, p-
According to the tile method and the discriminant analysis method, an appropriate threshold value used for the binarization processing of a digital image having the two types of backgrounds described above may not be able to be selected. Particularly, in the case of a document in which characters, figures, and photographs are written on newspaper or light-colored paper, a blank portion of the document is often extracted as a reading target area. Further, according to the dynamic threshold processing in which the threshold is changed depending on the location, there is a problem that the processing time is long and the binary image is likely to include noise.
【0005】本発明は、これらの問題を解決するために
なされたものであって、原稿の余白領域に対応する背景
と、デバイス自体の色彩に対応する背景とをデジタル画
像から切り出す二値化処理に最適なしきい値を選択する
デジタル画像の二値化しきい値選択方法及び二値化しき
い値選択プログラムを記録した記録媒体を提供すること
を目的とする。The present invention has been made in order to solve these problems, and has been made in consideration of a binarization process for cutting out, from a digital image, a background corresponding to a blank area of a document and a background corresponding to the color of the device itself. It is an object of the present invention to provide a binarization threshold value selection method of a digital image for selecting an optimal threshold value and a recording medium in which a binarization threshold value selection program is recorded.
【0006】[0006]
【課題を解決するための手段】本発明の請求項1記載の
デジタル画像の二値化しきい値選択方法及び請求項4記
載の二値化しきい値選択プログラムによると、デジタル
画像の輝度値の度数分布を求め、輝度値が0以上かつ第
一固定しきい値以下の第一区間の累積度数をXとし、輝
度値が第二固定しきい値以上かつ第一固定しきい値以下
の第二区間の累積度数をYとするとき、Y/Xが第三固
定しきい値より大きいか否かを判別することにより、原
稿の余白領域の色彩に応じたしきい値の選択が必要か否
かを判別する。適切な第一、第二及び第三固定値を設定
することにより、Y/Xが第三固定しきい値より大きい
場合、前記第二区間の最頻値近傍の輝度値を有する画像
領域を原稿の余白領域として判別することができる。し
たがって、第二区間の最頻値から所定値を減じた値を二
値化しきい値として選択することにより、原稿の余白領
域に対応する背景とデバイス自体の色彩に対応する背景
とをデジタル画像から切り出す二値化処理に最適なしき
い値を選択することができる。尚、第二区間の最頻値か
ら固定値を減じた値を二値化しきい値として選択するこ
とにより、処理時間を短縮し、また、輝度値の複雑な度
数多角形を形成する画像に対しても常に最適なしきい値
を選択することができる。尚、本明細書において輝度値
とは画素の濃淡を表すスカラー量である。輝度値は画素
が淡い色であるほどすなわち白色に近づくほど大きな値
となり、画素が濃い色であるほどすなわち黒色に近づく
ほど小さな値となる。According to the binarization threshold value selection method of the digital image according to the first aspect of the present invention and the binarization threshold value selection program according to the fourth aspect, the frequency of the luminance value of the digital image is determined. A distribution is obtained, and the cumulative frequency of the first section in which the luminance value is equal to or more than 0 and equal to or less than the first fixed threshold is set to X, and the second section in which the luminance value is equal to or more than the second fixed threshold and equal to or less than the first fixed threshold Is determined as Y / X, it is determined whether or not Y / X is greater than a third fixed threshold value, thereby determining whether or not it is necessary to select a threshold value according to the color of the blank area of the document. Determine. By setting appropriate first, second, and third fixed values, if Y / X is larger than the third fixed threshold, the image area having a luminance value near the mode of the second section is set to the original document. Can be determined as a blank area. Therefore, by selecting a value obtained by subtracting a predetermined value from the mode of the second section as a binarization threshold value, the background corresponding to the blank area of the document and the background corresponding to the color of the device itself can be converted from the digital image. It is possible to select an optimal threshold value for the binarization processing to be cut out. By selecting a value obtained by subtracting the fixed value from the mode value of the second section as the binarization threshold value, the processing time is reduced, and the image forming the complex frequency polygon of the luminance value is selected. Even so, an optimum threshold value can always be selected. Note that in this specification, the luminance value is a scalar amount representing the density of a pixel. The brightness value increases as the pixel becomes lighter, that is, approaches white, and decreases as the pixel becomes darker, that is, approaches black.
【0007】Y/Xが第三固定しきい値より小さい場
合、第二区間の輝度値を有する画像領域には同等の輝度
値を有する広い画像領域がないことから、第一区間より
輝度値の高い画像領域に原稿の余白領域が存在し、或い
は原稿に余白領域がないことが判別される。したがっ
て、本発明の請求項2記載のデジタル画像の二値化しき
い値選択方法及び請求項5記載の二値化しきい値選択プ
ログラムでは、Y/Xが第三固定しきい値以下である場
合に前記第一固定しきい値を二値化しきい値として選択
し、原稿の余白領域に対応する背景とデバイス自体の色
彩に対応する背景とをデジタル画像から切り出す二値化
処理に実験から得られる経験則によって求められる第一
固定しきい値を用いることとしている。When Y / X is smaller than the third fixed threshold value, since the image area having the luminance value in the second section does not have a wide image area having the same luminance value, the luminance value of the first section is smaller than that of the first section. It is determined that a blank area of the document exists in the high image area, or that there is no blank area in the document. Therefore, according to the binarization threshold value selection method of the digital image according to the second aspect of the present invention and the binarization threshold value selection program according to the fifth aspect, when Y / X is equal to or less than the third fixed threshold value. Experience gained from experiments on binarization processing in which the first fixed threshold is selected as a binarization threshold and a background corresponding to the blank area of the document and a background corresponding to the color of the device itself are cut out from the digital image. The first fixed threshold determined by the rule is used.
【0008】本発明の請求項3記載のデジタル画像の二
値化しきい値選択方法及び請求項7記載の二値化しきい
値選択プログラムによると、256階調のデジタル画像
に対し前記第二固定しきい値を160とする。この値
は、種々の紙を読み取ったデジタル画像の輝度値の度数
分布を解析することにより得た値である。第二固定しき
い値を160とすることにより、読み取り対象となるほ
とんど全ての原稿について適切なしきい値を選択して正
確な二値化処理を実施することができ、例えば比較的素
地の色の濃い新聞等に対しても正確な二値化処理を実施
することができる。According to the method for selecting a binarization threshold value of a digital image according to the third aspect of the present invention and the binarization threshold value selection program according to the seventh aspect, the second fixed value is set for a 256-level digital image. The threshold value is set to 160. This value is obtained by analyzing the frequency distribution of luminance values of digital images obtained by reading various types of paper. By setting the second fixed threshold value to 160, an appropriate threshold value can be selected for almost all originals to be read and accurate binarization processing can be performed. Accurate binarization processing can be performed even for thick newspapers.
【0009】本発明の請求項4記載のデジタル画像の二
値化しきい値選択方法及び請求項8記載の二値化しきい
値選択プログラムによると、256階調のデジタル画像
に対し前記所定値を30とする。この値は、種々の原稿
を読み取ったデジタル画像の輝度値の度数分布を解析す
ることにより得た値である。所定値を30とすることに
より、読み取り対象となるほとんど全ての原稿について
適切なしきい値を選択して正確な二値化処理を実施する
ことができ、例えば素地に色むらのある紙に印刷された
原稿に対しても正確な二値化処理を実施することができ
る。According to the binarization threshold value selection method of the digital image according to the fourth aspect of the present invention and the binarization threshold value selection program according to the eighth aspect, the predetermined value is set to 30 with respect to the digital image of 256 gradations. And This value is obtained by analyzing the frequency distribution of luminance values of digital images obtained by reading various originals. By setting the predetermined value to 30, an appropriate threshold value can be selected for almost all originals to be read, and an accurate binarization process can be performed. The accurate binarization process can be performed even on an original that has been lost.
【0010】[0010]
【発明の実施の形態】以下、本発明の実施の形態を示す
一実施例を図面に基づき説明する。図1に本発明の一実
施例によるデジタル画像の二値化しきい値選択方法のフ
ローチャートを示す。この方法はコンピュータにより二
値化しきい値選択プログラムを実行することによって実
施される。本実施例においてデジタル画像は各画素がR
(赤)、G(緑)、B(青)の各色成分について0〜2
55までの256の階調値を有するものとする。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 1 is a flowchart illustrating a method for selecting a binarization threshold value of a digital image according to an embodiment of the present invention. The method is implemented by executing a binarization threshold selection program by a computer. In this embodiment, each pixel of the digital image is R
(Red), G (green), B (blue) for each color component
It is assumed that there are 256 gradation values up to 55.
【0011】はじめに、二値化処理の対象となるデジタ
ル画像の全画素についてコンピュータを用いた次式の演
算により輝度値Yを求め、輝度値の度数分布を求める。
尚、次式においてR、G、Bは色成分の階調値を表すも
のとする。 Y=0.30R+0.59G+0.11BFirst, a luminance value Y is obtained for all the pixels of the digital image to be subjected to the binarization process by the following calculation using a computer, and a frequency distribution of the luminance values is obtained.
In the following equation, R, G, and B represent gradation values of color components. Y = 0.30R + 0.59G + 0.11B
【0012】次に、処理装置を用いた演算により輝度値
0以上200以下の累積度数F0〜2 00、輝度値160以
上200以下の累積度数F160〜200を求め、次式を満た
すか否かを判別する。 F160〜200/F0〜200>0.4 この段階により、二値化しきい値として予め決められた
固定値を選択するか、或いは演算によって求める固定値
を選択するかを決定する。[0012] Next, the luminance value 0 to 200 of cumulative frequency F 0 to 2 00, the cumulative frequency F 160 to 200 of the following luminance values 160 to 200 obtained by calculation using the processing device, whether or not satisfies the following equation Is determined. F 160−200 / F 0−200 > 0.4 At this stage, it is determined whether a predetermined fixed value is selected as the binarization threshold value or a fixed value obtained by calculation is selected.
【0013】第一固定しきい値としての輝度値200
は、読み取り領域に現れるスキャナ自体の色彩に対応す
る画素の輝度値を解析する実験を種々のスキャナに対し
て実施し、実用上最も正確に二値化処理を行うことがで
きるように定めたものである。尚、実験結果によると、
読み取り領域に現れるスキャナ自体の色彩に対応する画
素の輝度値が200を下回るスキャナは見あたらなかっ
た。第二固定しきい値としての輝度値160は、原稿の
余白領域に対応する画素の輝度値を検査する実験を種々
の原稿に対して実施し、実用上最も正確に二値化処理を
行うことができるように定めたものである。尚、実験結
果によると、原稿の余白領域に対応する画素の輝度値が
160を下回る原稿は見あたらなかった。第三固定しき
い値としての0.4は、余白部分の輝度値が160〜2
00になる種々の原稿を読み取って解析し、実用上最も
正確に二値化処理を行うことができるように定めたもの
である。A luminance value 200 as a first fixed threshold value
Is an experiment conducted on various scanners to analyze the luminance values of pixels corresponding to the color of the scanner itself that appears in the reading area, and is determined so that binarization processing can be performed most accurately in practical use. It is. According to the experimental results,
No scanner has been found in which the luminance value of the pixel corresponding to the color of the scanner itself that appears in the reading area is less than 200. The luminance value 160 as the second fixed threshold value is obtained by performing an experiment for inspecting the luminance value of a pixel corresponding to a blank area of the original for various originals and performing the most accurate binarization process in practical use. It is determined so that it can be done. According to the experimental results, no original was found in which the luminance value of the pixel corresponding to the blank area of the original was lower than 160. 0.4 as the third fixed threshold value indicates that the luminance value of the margin is 160 to 2
It is determined so that various originals which are 00 are read and analyzed, and the binarization processing can be performed most accurately in practical use.
【0014】尚、第一、第二及び第三固定しきい値は本
実施例で定める値に限定されるものではない。例えば、
デジタル画像の階調が2分の1であればしきい値もそれ
ぞれ2分の1に定め、階調が2倍であればしきい値も2
倍にすることにより本実施例と同等の正確さで二値化し
きい値を選択することができる。また、正確な二値化処
理のできる範囲をどの程度に定めるかによって、第一、
第二及び第三固定しきい値として設定すべき値が変動す
る。本実施例で採用した値を第一、第二及び第三固定し
きい値として設定する場合、例えばアメリカ合衆国で発
行されている比較的色の濃い紙に印刷されている新聞を
スキャナで読んだ場合にも正確に背景領域を切り出し、
文字、図形及び写真の対象領域を抽出することができ
る。Incidentally, the first, second and third fixed threshold values are not limited to the values determined in this embodiment. For example,
If the gray level of the digital image is 1/2, the threshold value is also set to 1/2, and if the gray level is 2 times, the threshold value is 2
By doubling, the binarization threshold can be selected with the same accuracy as in the present embodiment. Also, depending on the extent to which the range of accurate binarization can be determined,
Values to be set as the second and third fixed threshold values vary. When the values adopted in the present embodiment are set as the first, second and third fixed threshold values, for example, when reading a newspaper printed on relatively dark paper published in the United States with a scanner Cut out the background area accurately,
It is possible to extract target areas of characters, figures, and photographs.
【0015】(1)F160〜200/F0〜200>0.4であ
る場合 処理装置を用いた演算により輝度値160〜200の区
間における最頻値Yma xを求める。この段階において、
原稿の余白部分の輝度値がYmaxの近傍にあることが検
出される。次に処理装置を用いた次式の演算により選択
すべき二値化しきい値Tを求める。この段階により、二
値化処理で用いるしきい値として原稿の紙の色に応じた
値が原稿ごとに選択される。 T=Ymax−30 所定値としての30は余白部分の輝度値のばらつきを考
慮した値であって、実験により種々の原稿を読み取った
画像データを解析することにより求めた値である。[0015] (1) obtaining a mode value Y ma x in the interval of the luminance values 160-200 by calculation using the processing device if it is F 160~200 / F 0~200> 0.4. At this stage,
It is detected that the luminance value of the margin of the document is near Ymax . Next, a binarization threshold value T to be selected is obtained by the following calculation using a processing device. At this stage, a value corresponding to the paper color of the document is selected for each document as the threshold used in the binarization process. T = Ymax− 30 The predetermined value of 30 is a value in consideration of the variation in the luminance value of the margin, and is a value obtained by analyzing image data obtained by reading various originals through experiments.
【0016】(2)F160〜200/F0〜200≦0.4であ
る場合 二値化しきい値TをT=200とする。この段階によ
り、二値化しきい値として予め決められた固定値が選択
される。(2) When F 160-200 / F 0-200 ≦ 0.4 The binarization threshold T is set to T = 200. At this stage, a predetermined fixed value is selected as the binarization threshold.
【0017】以上、本発明の一実施例によるデジタル画
像の二値化しきい値選択方法を説明した。以下、フラッ
トベッド型スキャナとパーソナルコンピュータ(以下、
PCという。)とを備える画像処理システムにおいて、
上記実施例によるデジタル画像の二値化しきい値選択方
法を用いた対象領域の抽出処理の一例を説明する。The method of selecting a binarization threshold value of a digital image according to one embodiment of the present invention has been described above. Hereafter, flatbed scanners and personal computers (hereinafter,
PC. ), The image processing system comprising:
An example of a target region extraction process using the digital image binarization threshold value selection method according to the above embodiment will be described.
【0018】画像処理システムは図2に示すようにフラ
ットベッド型スキャナ20とPC10とから構成する。
PC10はモニタ11、本体12及びキーボード13か
ら構成されている。本体12には処理装置14、主記憶
装置15、ハードディスク装置16及びフレキシブルデ
ィスク装置17が設けられ互いにバス接続されている。
ハードディスク装置16にはフレキシブルディスク装置
17から転送された二値化しきい値選択プログラム及び
二値化処理プログラムを含むスキャナドライバプログラ
ムが格納されている。フラットベッド型スキャナ20は
透明な原稿台ガラス22が設けられている本体23と原
稿カバー21とからなる。原稿カバー21は本体に揺動
自在に支持されている。原稿カバー21の原稿台ガラス
22対向面は白色のアクリル板で覆われている。The image processing system comprises a flatbed scanner 20 and a PC 10 as shown in FIG.
The PC 10 includes a monitor 11, a main body 12, and a keyboard 13. The main body 12 is provided with a processing device 14, a main storage device 15, a hard disk device 16, and a flexible disk device 17, which are connected to each other by a bus.
The hard disk device 16 stores a scanner driver program including a binarization threshold value selection program and a binarization processing program transferred from the flexible disk device 17. The flatbed scanner 20 includes a main body 23 provided with a transparent platen glass 22 and a document cover 21. The document cover 21 is swingably supported by the main body. The surface of the document cover 21 facing the document table glass 22 is covered with a white acrylic plate.
【0019】原稿台ガラス22に原稿をセットし、スキ
ャナドライバプログラムを実行して原稿を走査すると画
像データがスキャナ20から主記憶装置15に転送され
る。二値化処理にあたっては、処理時間短縮のため、例
えば30dpi(dot per inch)程度で低解像度のプレ
スキャンを行い、プレスキャンの結果得られる画像デー
タを用いて二値化処理を実行することが望ましい。二値
化しきい値選択プログラムが実行されると、主記憶装置
15に格納された画像データに対し、上記実施例による
デジタル画像の二値化しきい値選択方法に基づくアルゴ
リズムに従って二値化しきい値が選択される。二値化し
きい値選択プログラムの実行が終了し、二値化処理プロ
グラムの実行に移行すると、二値化しきい値選択プログ
ラムによって選択された二値化しきい値より輝度値の大
きい画素には値1、輝度値の小さい画素には値0が与え
られ、これらの1、0の値を用いて背景領域と対象領域
との判別が行われる。When an original is set on the original platen glass 22 and the original is scanned by executing a scanner driver program, image data is transferred from the scanner 20 to the main storage device 15. In the binarization processing, in order to shorten the processing time, for example, a low-resolution prescan is performed at about 30 dpi (dot per inch), and the binarization processing is performed using image data obtained as a result of the prescan. desirable. When the binarization threshold selection program is executed, the binarization threshold is applied to the image data stored in the main storage device 15 according to the algorithm based on the digital image binarization threshold selection method according to the above embodiment. Selected. When the execution of the binarization threshold value selection program is completed and the process proceeds to the execution of the binarization threshold value selection program, the value 1 is assigned to a pixel having a luminance value larger than the binarization threshold value selected by the binarization threshold value selection program. , A pixel having a small luminance value is given a value of 0, and the values of 1 and 0 are used to determine the background region and the target region.
【0020】原稿24が新聞紙の切り抜きである場合、
すなわち紙が多少色づいている原稿の場合、主記憶装置
15に格納される画像データはおよそ図3に示すような
輝度値ヒストグラムを形成する。輝度値が200より大
きい区間にある山は、原稿台ガラス22の原稿24に覆
われていない領域を覆っている原稿カバー21の白色の
アクリル板に対応する画素の集合を示している。輝度値
が160〜200の第二区間にある山は、原稿24の余
白に対応している画素の集合を示している。輝度値が1
60未満の区間にある画素の分布は原稿24に記載され
ている文字、図形及び写真に対応している画素の集合を
示している。このヒストグラムを形成する原稿の場合、
第一区間にある画素の総数に対する第二区間にある画素
の総数の割合が40%を超えているため、二値化しきい
値選択プログラムは第二区間の最頻値から二値化しきい
値を求めるサブルーチンに分岐し、第二区間の最頻値か
ら30を減じた値を二値化しきい値として選択する。If the original 24 is a newspaper clipping,
That is, when the paper is a slightly colored original, the image data stored in the main storage device 15 forms a luminance value histogram as shown in FIG. A mountain in a section where the luminance value is larger than 200 indicates a set of pixels corresponding to the white acrylic plate of the document cover 21 that covers an area of the document table glass 22 that is not covered by the document 24. A mountain in a second section having a luminance value of 160 to 200 indicates a set of pixels corresponding to the margin of the document 24. Brightness value is 1
The distribution of pixels in a section less than 60 indicates a set of pixels corresponding to characters, graphics, and photographs described in the document 24. For a document that forms this histogram,
Since the ratio of the total number of pixels in the second section to the total number of pixels in the first section exceeds 40%, the binarization threshold selection program sets the binarization threshold from the mode of the second section. The process branches to a subroutine to be obtained, and a value obtained by subtracting 30 from the mode value of the second section is selected as a binarization threshold.
【0021】原稿24が白色の上質コート紙に印刷され
たパンフレットである場合、すなわち紙がほぼ純白の原
稿である場合、主記憶装置15に格納される画像データ
はおよそ図4に示すような輝度値ヒストグラムを形成す
る。輝度値が200より大きい区間にある山は、原稿台
ガラス22の原稿24に覆われていない領域を覆ってい
る原稿カバー21の白色のアクリル板、または原稿24
の余白に対応している画素の集合を示している。輝度値
が200未満の区間にある画素の分布は原稿24に記載
されている文字、図形及び写真に対応している画素の集
合を示している。このヒストグラムを形成する原稿の場
合、第一区間にある画素の総数に対する第二区間にある
画素の総数の割合が40%以下であるため、二値化しき
い値選択プログラムは第一固定しきい値を二値化しきい
値として選択するサブルーチンに分岐し、第一固定しき
い値である輝度値200を二値化しきい値として選択す
る。When the original 24 is a pamphlet printed on white high-quality coated paper, that is, when the paper is an almost pure white original, the image data stored in the main storage device 15 has a luminance as shown in FIG. Form a value histogram. The mountain in the section where the luminance value is larger than 200 is the white acrylic plate of the original cover 21 covering the area of the original platen glass 22 not covered by the original 24, or the original 24.
Shows a set of pixels corresponding to the margins of FIG. The distribution of pixels in a section where the luminance value is less than 200 indicates a set of pixels corresponding to characters, graphics, and photographs described in the document 24. In the case of a document forming this histogram, the ratio of the total number of pixels in the second section to the total number of pixels in the first section is 40% or less. Is selected as a binarization threshold, and the luminance value 200, which is the first fixed threshold, is selected as the binarization threshold.
【0022】本発明の一実施例によるデジタル画像の二
値化しきい値選択方法によると、新聞紙、再生紙、薄い
色の色紙のように紙が多少色づいた原稿に対して適切な
二値化しきい値を選択することができる。また、白色の
上質コート紙のように紙が純白に近い原稿に対しては予
め決められた固定しきい値を用いることにより二値化し
きい値の選択時間を短縮している。また、原稿に応じて
二値化しきい値を変更する際、最頻値近傍の度数分布の
解析によってヒストグラムの谷を検出する処理によって
二値化しきい値を選択することなしに最頻値から固定値
を減じた値を二値化しきい値として選択しているため、
ヒストグラムが複雑な形状を呈し、ヒストグラムの谷間
が判別しにくい原稿に対しても適切な二値化しきい値を
確実に選択することができる。According to the binarization threshold selection method for digital images according to one embodiment of the present invention, an appropriate binarization threshold is applied to a slightly colored original such as newspaper, recycled paper, or light colored paper. You can choose a value. In addition, for a document whose paper is close to pure white, such as white high-quality coated paper, a predetermined fixed threshold value is used to reduce the time for selecting the binarization threshold value. Also, when changing the binarization threshold according to the document, the process of detecting the valley of the histogram by analyzing the frequency distribution near the mode is fixed from the mode without selecting the binarization threshold. Since the reduced value is selected as the binarization threshold,
It is possible to reliably select an appropriate binarization threshold even for a document in which the histogram has a complicated shape and the valleys of the histogram are difficult to distinguish.
【図1】本発明の一実施例によるデジタル画像の二値化
しきい値選択方法を示すフローチャートである。FIG. 1 is a flowchart illustrating a method for selecting a binarization threshold value of a digital image according to an embodiment of the present invention.
【図2】本発明の一実施例によるデジタル画像の二値化
しきい値選択方法を実施する画像処理システムを示す模
式図である。FIG. 2 is a schematic diagram showing an image processing system for implementing a digital image binarization threshold value selection method according to an embodiment of the present invention.
【図3】新聞紙を走査したときに得られる画像データの
輝度値ヒストグラムである。FIG. 3 is a luminance value histogram of image data obtained when a newspaper is scanned.
【図4】白色の上質コート紙に印刷されたパンフレット
を走査したときに得られる画像データの輝度値ヒストグ
ラムである。FIG. 4 is a luminance value histogram of image data obtained when a pamphlet printed on white high-quality coated paper is scanned.
10 パーソナルコンピュータ 11 モニタ 12 本体 13 キーボード 14 処理装置 15 主記憶装置 16 ハードディスク装置 17 フレキシブルディスク装置 20 フラットベッド型スキャナ 21 原稿カバー 22 原稿台ガラス 23 本体 24 原稿 DESCRIPTION OF SYMBOLS 10 Personal computer 11 Monitor 12 Main body 13 Keyboard 14 Processing device 15 Main storage device 16 Hard disk device 17 Flexible disk device 20 Flatbed scanner 21 Document cover 22 Platen glass 23 Body 24 Document
───────────────────────────────────────────────────── フロントページの続き (72)発明者 水野 鉄也 長野県諏訪市大和3丁目3番5号 セイコ ーエプソン株式会社内 (72)発明者 児島 志保 長野県上田市大字下之郷乙1077番地5 エ プソンコーワ株式会社内 Fターム(参考) 5B047 AA01 AB02 AB04 CB21 DB06 DC04 5C077 MP01 MP08 PP31 PP32 PQ08 PQ12 PQ19 PQ20 RR02 RR14 RR15 RR16 SS01 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Tetsuya Mizuno 3-3-5 Yamato, Suwa-shi, Nagano Seiko Epson Corporation (72) Inventor Shiho Kojima 1077-5, Shimonosato Otsu, Ueda-shi, Nagano Pref. In-house F term (reference) 5B047 AA01 AB02 AB04 CB21 DB06 DC04 5C077 MP01 MP08 PP31 PP32 PQ08 PQ12 PQ19 PQ20 RR02 RR14 RR15 RR16 SS01
Claims (8)
る段階と、 輝度値が0以上かつ第一固定しきい値以下の第一区間の
累積度数をXとし、輝度値が第二固定しきい値以上かつ
第一固定しきい値以下の第二区間の累積度数をYとする
とき、Y/Xが第三固定しきい値より大きいか否かを判
別する段階と、 Y/Xが第三固定しきい値より大きい場合に前記第二区
間の最頻値から所定値を減じた値を二値化しきい値とし
て選択する段階と、 を含むことを特徴とするデジタル画像の二値化しきい値
選択方法。1. A step of obtaining a frequency distribution of luminance values of a digital image, wherein X is a cumulative frequency of a first section in which the luminance value is equal to or more than 0 and equal to or less than a first fixed threshold, and the luminance value is a second fixed threshold. Determining that Y / X is greater than a third fixed threshold, where Y is the cumulative frequency of the second section that is greater than or equal to the value and less than or equal to the first fixed threshold; Selecting a value obtained by subtracting a predetermined value from the mode value of the second section as a binarization threshold when the threshold value is larger than the fixed threshold value, comprising the steps of: Selection method.
合に前記第一固定しきい値を二値化しきい値として選択
する段階をさらに含むことを特徴とする請求項1記載の
デジタル画像の二値化しきい値選択方法。2. The method according to claim 1, further comprising the step of selecting said first fixed threshold value as a binarization threshold value when Y / X is equal to or smaller than a third fixed threshold value. A method for selecting a binarization threshold for a digital image.
二固定しきい値を160とすることを特徴とする請求項
1または2記載のデジタル画像の二値化しきい値選択方
法。3. The method according to claim 1, wherein the second fixed threshold value is set to 160 for a digital image having 256 gradations.
定値を30とすることを特徴とする請求項1、2または
3記載のデジタル画像の二値化しきい値選択方法。4. The method according to claim 1, wherein said predetermined value is set to 30 for a digital image of 256 gradations.
る手順と、 輝度値が0以上かつ第一固定しきい値以下の第一区間の
累積度数をXとし、輝度値が第二固定しきい値以上かつ
第一固定しきい値以下の第二区間の累積度数をYとする
とき、Y/Xが第三固定しきい値より大きいか否かを判
別する手順と、 Y/Xが第三固定しきい値より大きい場合に前記第二区
間の最頻値から所定値を減じた値を二値化しきい値とし
て選択する手順と、 をコンピュータに実行させることを特徴とする二値化し
きい値選択プログラムを記録した記録媒体。5. A procedure for obtaining a frequency distribution of luminance values of a digital image, wherein X is a cumulative frequency of a first section in which the luminance value is equal to or more than 0 and equal to or less than a first fixed threshold, and the luminance value is a second fixed threshold. A procedure for determining whether Y / X is greater than a third fixed threshold value, where Y is the cumulative frequency of the second section that is greater than or equal to the value and less than or equal to the first fixed threshold value; Selecting, as a binarization threshold, a value obtained by subtracting a predetermined value from the mode of the second section when the threshold is larger than the fixed threshold; and causing the computer to execute: A recording medium on which the selected program is recorded.
Y/Xが第三固定しきい値以下である場合に前記第一固
定しきい値を二値化しきい値として選択する手順をコン
ピュータに実行させることを特徴とする請求項5記載の
記録媒体。6. The binarization threshold value selection program,
6. The recording medium according to claim 5, wherein when Y / X is equal to or less than a third fixed threshold, the computer is caused to execute a procedure of selecting the first fixed threshold as a binarized threshold.
256階調のデジタル画像に対し前記第二固定しきい値
を160としていることを特徴とする請求項5または6
記載の記録媒体。7. The binarization threshold value selection program,
7. The digital image of 256 gradations, wherein the second fixed threshold value is set to 160.
The recording medium according to the above.
256階調のデジタル画像に対し前記所定値を30とし
ていることを特徴とする請求項5、6または7記載の記
録媒体。8. The binarization threshold value selection program,
8. The recording medium according to claim 5, wherein said predetermined value is set to 30 for a digital image of 256 gradations.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000197691A JP4057223B2 (en) | 2000-06-30 | 2000-06-30 | Digital image binarization threshold selection method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000197691A JP4057223B2 (en) | 2000-06-30 | 2000-06-30 | Digital image binarization threshold selection method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002016801A true JP2002016801A (en) | 2002-01-18 |
| JP4057223B2 JP4057223B2 (en) | 2008-03-05 |
Family
ID=18695979
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000197691A Expired - Fee Related JP4057223B2 (en) | 2000-06-30 | 2000-06-30 | Digital image binarization threshold selection method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4057223B2 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7426291B2 (en) | 2002-07-29 | 2008-09-16 | Seiko Epson Corporation | Apparatus and method for binarizing images of negotiable instruments using a binarization method chosen based on an image of a partial area |
| US8091092B2 (en) | 2002-05-31 | 2012-01-03 | International Business Machines Corporation | Locally providing globally consistent information to communications layers |
| JP2012029167A (en) * | 2010-07-26 | 2012-02-09 | Seiko I Infotech Inc | Image reading device, and image forming apparatus |
| JP2018050114A (en) * | 2016-09-20 | 2018-03-29 | コニカミノルタ株式会社 | Image forming apparatus and program |
| JP2019016897A (en) * | 2017-07-05 | 2019-01-31 | ブラザー工業株式会社 | Image processing system, and computer program |
-
2000
- 2000-06-30 JP JP2000197691A patent/JP4057223B2/en not_active Expired - Fee Related
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8091092B2 (en) | 2002-05-31 | 2012-01-03 | International Business Machines Corporation | Locally providing globally consistent information to communications layers |
| US7426291B2 (en) | 2002-07-29 | 2008-09-16 | Seiko Epson Corporation | Apparatus and method for binarizing images of negotiable instruments using a binarization method chosen based on an image of a partial area |
| JP2012029167A (en) * | 2010-07-26 | 2012-02-09 | Seiko I Infotech Inc | Image reading device, and image forming apparatus |
| JP2018050114A (en) * | 2016-09-20 | 2018-03-29 | コニカミノルタ株式会社 | Image forming apparatus and program |
| JP2019016897A (en) * | 2017-07-05 | 2019-01-31 | ブラザー工業株式会社 | Image processing system, and computer program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4057223B2 (en) | 2008-03-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6628833B1 (en) | Image processing apparatus, image processing method, and recording medium with image processing program to process image according to input image | |
| US7292375B2 (en) | Method and apparatus for color image processing, and a computer product | |
| US6865290B2 (en) | Method and apparatus for recognizing document image by use of color information | |
| KR100927528B1 (en) | Electronic watermark embedding device and detection device | |
| JP4423298B2 (en) | Text-like edge enhancement in digital images | |
| US8254679B2 (en) | Content-based image harmonization | |
| JP3078844B2 (en) | How to separate foreground information in a document from background information | |
| CN100585621C (en) | Image processing device and image processing method | |
| WO2008134000A1 (en) | Image segmentation and enhancement | |
| JP2008148298A (en) | Method for identifying different content areas in an image, apparatus for identifying different content areas in an image, and computer-readable medium embodying a computer program for identifying different content areas in an image | |
| JP3753357B2 (en) | Character extraction method and recording medium | |
| US8189236B2 (en) | Image processing apparatus, image processing method and computer-readable medium | |
| KR20120132315A (en) | Image processing apparatus, image processing method, and computer readable medium | |
| JP2008187710A (en) | Image characteristic identification method, image characteristic identification system, background color determination method, control program, and recording medium | |
| JP2004336282A (en) | Image processing apparatus, image processing program, and recording medium storing the program | |
| JP3772262B2 (en) | How to identify the type of an image | |
| Shi et al. | Digital enhancement of palm leaf manuscript images using normalization techniques | |
| JP4441300B2 (en) | Image processing apparatus, image processing method, image processing program, and recording medium storing the program | |
| US6985629B2 (en) | Image processing method, relative density detecting method and image processing apparatus | |
| US20040257625A1 (en) | Apparatus for, method of, and system for image processing | |
| JP4057223B2 (en) | Digital image binarization threshold selection method | |
| JP2010074342A (en) | Image processing apparatus, image forming apparatus, and program | |
| JP2004135269A (en) | Electronic color dropout utilizing spatial context to enhance accuracy | |
| JP2009301090A (en) | Image processor and image processing program | |
| JP4189654B2 (en) | Image processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050823 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20061222 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20061226 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20070201 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070702 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20071204 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071213 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101221 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101221 Year of fee payment: 3 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101221 Year of fee payment: 3 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111221 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111221 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121221 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121221 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131221 Year of fee payment: 6 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |