[go: up one dir, main page]

JP2000020714A - Image processing method, apparatus and recording medium storing image processing function - Google Patents

Image processing method, apparatus and recording medium storing image processing function

Info

Publication number
JP2000020714A
JP2000020714A JP10205909A JP20590998A JP2000020714A JP 2000020714 A JP2000020714 A JP 2000020714A JP 10205909 A JP10205909 A JP 10205909A JP 20590998 A JP20590998 A JP 20590998A JP 2000020714 A JP2000020714 A JP 2000020714A
Authority
JP
Japan
Prior art keywords
pixel
edge
determined
binarization
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10205909A
Other languages
Japanese (ja)
Inventor
Fumihiro Hasegawa
史裕 長谷川
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP10205909A priority Critical patent/JP2000020714A/en
Publication of JP2000020714A publication Critical patent/JP2000020714A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

(57)【要約】 【課題】 背景画像にも認識の妨げとなるノイズのない
二値画像を提供する。 【解決手段】 二値化したい原稿の濃淡画像を入力し
(S1)、格納する(S2)。次に、ある1画素につい
て注目し、文字や罫線のエッジにあたるかどうかを判定
する(S3)。エッジと判定された画素について、二値
画像における画素値を決定し(S4)、格納する。これ
らの操作を原画像上のすべての画素について行い(S
5)、エッジでない画素の連結成分をすべて求める(S
6)。ある連結成分の周辺に接触している、既に画素値
の決定した画素に注目し、それらのうち黒画素と白画素
が何画素あるのかを数える(S7)。これらを比較し
(S8)、黒画素の方が多い場合は、連結成分全体を黒
画素とし登録する(S10)。そうでない場合は白画素
として登録する(S9)。この作業をすべての連結成分
について行い(S11)、最後に、二値画像を生成し
(S12)、出力する(S13)。
(57) [Summary] [Problem] To provide a binary image free of noise that hinders recognition of a background image. A grayscale image of a document to be binarized is input (S1) and stored (S2). Next, attention is paid to one pixel, and it is determined whether or not the pixel corresponds to an edge of a character or a ruled line (S3). For the pixel determined to be an edge, the pixel value in the binary image is determined (S4) and stored. These operations are performed for all pixels on the original image (S
5) Find all connected components of non-edge pixels (S
6). Attention is paid to the pixels which are in contact with the periphery of a certain connected component and for which the pixel value has already been determined, and the number of black pixels and white pixels among them is counted (S7). These are compared (S8), and if there are more black pixels, the entire connected component is registered as a black pixel (S10). Otherwise, it is registered as a white pixel (S9). This operation is performed for all connected components (S11), and finally, a binary image is generated (S12) and output (S13).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理方法,装
置および画像処理機能を格納した記録媒体、より詳細に
は、紙面に記入された文字を光学的に認識する方法に関
し、濃淡画像から文字認識およびその前処理のために好
適な二値画像を生成する画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method, an apparatus, and a recording medium storing an image processing function, and more particularly, to a method for optically recognizing characters written on a sheet of paper. The present invention relates to an image processing method for generating a binary image suitable for recognition and preprocessing thereof.

【0002】[0002]

【従来の技術】現在の光学的文字認識技術のほとんど
は、二値画像が認識対象であり、またその画質によって
精度が大きく左右されるため、適切な二値画像を得るこ
とは認識にとって必要不可欠なことである。従来より、
濃淡画像から適切な二値画像を得るための方法は数多く
考案されている。例えば、特公平6−18439号公報
に開示されたものは、画像信号からエッジ成分を取り出
し、その強度によって文字領域,階調領域、及び、その
中間的な性質の領域を識別し、階調領域のみにディザ方
式を用いて二値化することにより、質の良い二値画像を
得るというものである。
2. Description of the Related Art Most of the current optical character recognition technologies recognize binary images, and the accuracy is greatly affected by the image quality. Therefore, obtaining an appropriate binary image is indispensable for recognition. That is what. Conventionally,
Many methods have been devised for obtaining an appropriate binary image from a grayscale image. For example, Japanese Unexamined Patent Publication No. Hei 6-18439 discloses an edge component extracted from an image signal, and identifies a character area, a gradation area, and an area having intermediate properties based on the strength of the edge component. By binarizing only the image using the dither method, a high-quality binary image is obtained.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記特
公平6−18439号公報に開示された方法は、文字認
識を対象としたものではないので、相応の欠点を有して
いる。例えば、本来、背景は文字認識の対象ではない
が、背景として中間色が用いられた場合、この領域は階
調処理されてディザ表現され、この場合は、黒画素が多
数存在するので、文字領域との区別がつかず、無理に認
識処理が掛かってしまう恐れがある。文字認識を対象と
する場合には、原画像上で中間色である背景は、二値画
像上では中間色を表現しないほうが望ましく、無理に表
現することは、認識の妨げとなるノイズを発生させるこ
とにしかならない。
However, the method disclosed in Japanese Patent Publication No. 6-18439 does not aim at character recognition, and thus has a corresponding drawback. For example, the background is not originally a target of character recognition, but if an intermediate color is used as the background, this area is subjected to gradation processing and is expressed in dither. In this case, since there are many black pixels, the area is a character area. May not be distinguished, and the recognition process may be forcibly applied. In the case of character recognition, it is desirable that the background, which is an intermediate color on the original image, does not express the intermediate color on the binary image, and forcibly expressing it will generate noise that hinders recognition. I can only do that.

【0004】本発明は、上述のような実情を考慮してな
されたもので、罫線や文字は近傍の背景色とは異なった
濃度であることを利用し、背景に中間色が使用されてい
ても文字や罫線を鮮明に表現することにより、背景に
も、認識の妨げとなるノイズのない二値画像を提供する
ことが可能な画像処理方法,装置および画像処理機能を
格納した記録媒体を提供することを目的としてなされた
ものである。
The present invention has been made in consideration of the above-described circumstances, and utilizes the fact that the ruled lines and characters have different densities from the background color in the vicinity. Provided is an image processing method and apparatus capable of providing a binary image free from noise that hinders recognition in the background by clearly expressing characters and ruled lines, and a recording medium storing the image processing function. It is done for the purpose of.

【0005】[0005]

【課題を解決するための手段】請求項1の発明は、入力
された濃淡画像内の各画素がエッジであるか否かを判定
し、エッジと判定された画素については二値化を行い、
エッジと判定されなかった画素については、エッジと判
定されなかった画素の連結成分と前記エッジと判定され
た画素との接触部分を調べて二値化を行うことにより、
入力された濃淡画像から二値画像を生成することを特徴
としたものである。
According to the first aspect of the present invention, it is determined whether or not each pixel in an input grayscale image is an edge, and the pixels determined as edges are binarized.
For pixels not determined as edges, by performing a binarization by examining a contact portion between the connected components of the pixels not determined as edges and the pixels determined as the edges,
It is characterized in that a binary image is generated from an input grayscale image.

【0006】請求項2の発明は、請求項1の発明におい
て、前記エッジと判定されなかった画素については、前
記エッジと判定された画素の連結成分を抽出し、該抽出
された連結成分の外接矩形内の画素のうち、エッジと判
定されなかった画素の二値化を行い、以上の処理で二値
化されなかった画素の連結成分と既に二値化されている
画素との接触部分を調べることにより、前記二値化され
なかった画素の二値化を行うことを特徴としたものであ
る。
According to a second aspect of the present invention, in the first aspect of the present invention, for a pixel not determined as the edge, a connected component of the pixel determined as the edge is extracted, and a circumscribing of the extracted connected component is performed. Among the pixels in the rectangle, binarization is performed on pixels that are not determined to be edges, and a contact portion between a connected component of a pixel that has not been binarized in the above processing and a pixel that has already been binarized is examined. In this way, binarization of the pixels that have not been binarized is performed.

【0007】請求項3の発明は、入力された濃淡画像内
の各画素がエッジであるか否かを判定するエッジ判定手
段と、該エッジ判定手段によりエッジと判定された画素
の二値化を行う第1の二値化手段と、前記エッジ判定手
段によりエッジと判定されなかった画素の連結成分と前
記エッジと判定された画素との接触部分を調べることに
より前記エッジと判定されなかった画素の二値化を行う
第2の二値化手段とを有し、入力された濃淡画像から二
値画像を生成することを特徴としたものである。
According to a third aspect of the present invention, there is provided an edge determining means for determining whether or not each pixel in an input grayscale image is an edge, and binarization of the pixel determined as an edge by the edge determining means. First binarizing means for performing, and examining a contact portion between a connected component of a pixel not determined as an edge by the edge determining means and a pixel determined as the edge, a pixel of the pixel not determined as the edge. And a second binarizing means for performing binarization, wherein a binary image is generated from the input grayscale image.

【0008】請求項4の発明は、請求項3の発明におい
て、前記エッジと判定された画素の連結成分を抽出する
連結成分抽出手段と、該抽出された連結成分の外接矩形
内の画素のうち、エッジと判定されなかった画素の二値
化を行う第3の二値化手段とを有し、前記第2の二値化
手段が、第1および第3の二値化手段により二値化され
なかった画素の連結成分と既に二値化されている画素と
の接触部分を調べることにより前記二値化されなかった
画素の二値化を行うことを特徴としたものである。
According to a fourth aspect of the present invention, in the third aspect of the present invention, there is provided a connected component extracting means for extracting a connected component of the pixel determined to be the edge, and A third binarization unit for binarizing a pixel not determined as an edge, wherein the second binarization unit performs binarization by the first and third binarization units. The non-binarized pixel is binarized by examining a contact portion between a connected component of a pixel that has not been binarized and a pixel that has already been binarized.

【0009】請求項5の発明は、入力された濃淡画像内
の各画素がエッジであるか否かを判定するエッジ判定機
能と、エッジと判定された画素について二値化を行う第
1の二値化機能と、エッジと判定されなかった画素につ
いては、前記エッジと判定されなかった画素の連結成分
とエッジと判定された画素との接触部分を調べて二値化
を行う第2の二値化機能とにより、入力された濃淡画像
から二値画像を生成する機能をコンピューターに実現さ
せるためのプログラムを記録媒体に記録したことを特徴
としたものである。
According to a fifth aspect of the present invention, there is provided an edge determining function for determining whether each pixel in an input grayscale image is an edge, and a first binary function for performing binarization on a pixel determined as an edge. A binarization function, and for a pixel not determined as an edge, a second binary value for performing binarization by examining a contact portion between a connected component of the pixel not determined as the edge and the pixel determined as an edge And a computer program for realizing a function of generating a binary image from an input grayscale image by a computerization function.

【0010】請求項6の発明は、請求項5の発明におい
て、前記エッジと判定された画素の連結成分を抽出する
連結成分抽出機能と、該抽出された連結成分の外接矩形
内の画素のうち、エッジと判定されなかった画素の二値
化を行う第3の二値化機能とを有し、前記第2の二値化
機能が、前記第1および第3の二値化機能により二値化
されなかった画素の連結成分と既に二値化されている画
素との接触部分を調べることにより前記二値化されなか
った画素の二値化を行うことを特徴としたものである。
According to a sixth aspect of the present invention, in the fifth aspect of the present invention, a connected component extracting function for extracting a connected component of the pixel determined to be the edge, and And a third binarizing function for binarizing a pixel that is not determined to be an edge, wherein the second binarizing function is performed by the first and third binarizing functions. The non-binarized pixel is binarized by examining a contact portion between a connected component of the non-binarized pixel and a pixel that has already been binarized.

【0011】[0011]

【発明の実施の形態】図1は、本発明による画像処理方
法,装置および画像処理機能を格納した記録媒体の一実
施例を説明するための構成図で、図中、1は処理対象の
濃淡画像を得る処理対象濃淡画像入力手段、2は濃淡画
像を格納しておく処理対象濃淡画像格納手段、3は格納
された濃淡画像から各画素が文字や罫線のエッジである
か否かを判定する文字エッジ識別手段、4は文字エッジ
と判定された画素の二値化画素値を決定するエッジ画素
二値化手段、5は二値化の結果を一時的に格納しておく
二値化結果格納手段、6はエッジと判定されなかった画
素の連結性を調べ、連結しているものを抽出する非エッ
ジ画素連結成分抽出手段、7は非エッジ画素連結成分の
周辺の、既に二値化された画素の数を白/黒ごとに数え
る周辺画素計数手段、8は二値化結果格納手段に格納さ
れている情報をもとに二値画像を生成する二値画像生成
手段、9は得られた二値画像を出力する二値画像出力手
段である。
FIG. 1 is a block diagram for explaining an embodiment of a recording medium storing an image processing method, an apparatus and an image processing function according to the present invention. Processing target gray image input means for obtaining an image, reference numeral 2 denotes a processing target gray image storage means for storing a gray image, and reference numeral 3 denotes whether or not each pixel is an edge of a character or a ruled line from the stored gray image. A character edge discriminating means, 4 is an edge pixel binarizing means for determining a binarized pixel value of a pixel determined as a character edge, and 5 is a binarization result storage for temporarily storing a binarization result. Means 6 is a non-edge pixel connected component extracting means for examining connectivity of pixels not determined to be edges and extracting connected ones, and 7 is already binarized around the non-edge pixel connected components. A peripheral pixel counter that counts the number of pixels for each black / white , 8 binary image generating means for generating a binary image on the basis of the information stored in the binarization result storage means, 9 is a binary image output means for outputting the binary image obtained.

【0012】図2は、図1に示した実施例の処理のフロ
ーチャートで、図3は、図2に示した実施例によって処
理された画像を説明するための図である。以下、図2に
示したフローチャートを参照しながら処理動作を説明す
る。スキャナ等の処理対象濃淡画像入力手段1によっ
て、二値化したい原稿の濃淡画像を入力し(S1)、処
理対象濃淡画像格納手段2に格納する(S2)。次に、
文字エッジ識別手段3により、ある1画素について注目
し、この画素が文字や罫線のエッジにあたるかどうかを
判定する(S3)。エッジにあたるか否かの判定方法と
しては、注目画素を中心とする数画素四方の範囲の画素
値を調べ、画素値の最大値と最小値の差がある閾値以上
の場合をエッジとする方法等がある。
FIG. 2 is a flowchart of the processing of the embodiment shown in FIG. 1, and FIG. 3 is a diagram for explaining an image processed by the embodiment shown in FIG. Hereinafter, the processing operation will be described with reference to the flowchart shown in FIG. A gray-scale image of a document to be binarized is input by the gray-scale image input means 1 such as a scanner (S1), and stored in the gray-scale image storage means 2 (S2). next,
The character edge discriminating means 3 pays attention to a certain pixel and determines whether this pixel corresponds to the edge of a character or a ruled line (S3). As a method of determining whether or not an edge is an edge, a method of examining pixel values in a range of several pixels square around the target pixel, and determining an edge when a difference between the maximum value and the minimum value of the pixel value is equal to or greater than a certain threshold is used There is.

【0013】エッジと判定された画素について、エッジ
画素二値化手段4によって、二値画像における画素値を
決定し(S4)、二値化結果格納手段5に格納する。方
法としては、注目画素を中心とする数画素四方の範囲の
画素値の最大値と最小値の平均値を閾値として、この閾
値より白に近ければ白画素、そうでなければ黒画素と判
定する方法等がある。
For the pixel determined as an edge, the pixel value in the binary image is determined by the edge pixel binarizing means 4 (S4) and stored in the binarization result storing means 5. As a method, the average value of the maximum value and the minimum value of the pixel values in a range of several pixels around the target pixel is set as a threshold, and if it is closer to white than this threshold, it is determined as a white pixel, otherwise it is determined as a black pixel There are methods.

【0014】図3(A)に示した濃淡画像に、上述の操
作を施したものが図3(B)に示した画像である。エッ
ジのうち、濃度の濃い領域に近い部分が黒、濃度の淡い
領域に近い部分が白画素になる。なお、図3(B)に示
した例では、エッジと判定された画素のうち、黒/白画
素と判定された画素をそれぞれ黒/白で表現し、エッジ
と判定されず、まだ画素値が決まっていない画素を灰色
で表現してある。
The image shown in FIG. 3B is obtained by performing the above-described operation on the grayscale image shown in FIG. 3A. Of the edges, a portion close to a high-density region is black, and a portion close to a low-density region is a white pixel. In the example shown in FIG. 3B, among the pixels determined to be edges, the pixels determined to be black / white pixels are represented by black / white, respectively. Undetermined pixels are shown in gray.

【0015】これらの操作を原画像上のすべての画素に
ついて行い(S5)、次に、二値化結果格納手段5を参
照し、非エッジ画素連結成分抽出手段6により、エッジ
でない画素の連結成分をすべて求める(S6)。図3
(B)に示した例においては、灰色の画素の連結成分を
求めることになる。そして、ある連結成分の周辺に接触
している、既に画素値の決定した画素に注目し、それら
のうち黒画素と白画素が何画素あるのかを周辺画素計数
手段7で数える(S7)。
These operations are performed for all the pixels on the original image (S5). Next, referring to the binarization result storage means 5, the non-edge pixel connected component extracting means 6 connects the non-edge pixel connected components. (S6). FIG.
In the example shown in (B), a connected component of gray pixels is obtained. Then, attention is paid to the pixels which have already determined the pixel value and which are in contact with the periphery of a certain connected component, and the peripheral pixel counting means 7 counts how many black pixels and white pixels are present among them (S7).

【0016】これらを比較し(S8)、黒画素の方が多
い場合は、連結成分全体を黒画素として二値化結果格納
手段5に登録する(S10)。そうでない場合は白画素
として登録する(S9)。この作業をすべての連結成分
について行う(S11)。最後に、二値化結果格納手段
5の内容をもとに、二値画像生成手段8により二値画像
を生成し(S12)、二値画像出力手段9により出力す
る(S13)。
These are compared (S8). If there are more black pixels, the entire connected component is registered as a black pixel in the binarization result storage means 5 (S10). Otherwise, it is registered as a white pixel (S9). This operation is performed for all connected components (S11). Finally, a binary image is generated by the binary image generation means 8 based on the contents of the binarization result storage means 5 (S12), and output by the binary image output means 9 (S13).

【0017】図1,図2に示した実施例では、サイズの
小さい文字などの場合、文字の内部のエッジを十分に抽
出することができず、文字の内部を二値画像上でうまく
表現できないことがある。そこで、エッジ抽出が終わっ
た段階で、エッジ画素の連結成分を抽出し、文字単位に
さらに再現性の良い二値化を行ったあとで、残りの部分
を、図1,図2に示した実施例のように、非エッジ画素
の二値化を行えば、小さな文字の内部も表現が可能とな
る。
In the embodiment shown in FIGS. 1 and 2, in the case of a character having a small size, the edge inside the character cannot be sufficiently extracted, and the inside of the character cannot be well represented on a binary image. Sometimes. Therefore, at the stage when the edge extraction is completed, the connected components of the edge pixels are extracted, and binarization with higher reproducibility is performed for each character. By binarizing non-edge pixels as in the example, the inside of a small character can be expressed.

【0018】図4は、本発明による画像処理方法,装置
および画像処理機能を格納した記録媒体の他の実施例を
説明するための構成図で、図中、11は黒画素連結成分
抽出手段、12は連結成分外接矩形決定手段、13は矩
形内未決定画素二値化手段で、その他、図1と同じ作用
をする部分には図1に示した実施例と同じ符号が付して
ある。
FIG. 4 is a block diagram for explaining another embodiment of a recording medium storing an image processing method and apparatus and an image processing function according to the present invention. In FIG. 12 is a connected component circumscribed rectangle determining means, 13 is an undecided in-rectangle pixel binarizing means, and the other parts having the same operation as in FIG. 1 are denoted by the same reference numerals as those in the embodiment shown in FIG.

【0019】図5は、図4に示した実施例の処理のフロ
ーチャートである。図4に示した実施例の構成は、図1
に示した実施例に図4に示したAの部分を付け加えたも
ので、同様に、図5に示した実施例は、図2に示した実
施例に図5に示したBの部分を付け加えたものである。
以下、図5に示したフローチャートを参照しながら処理
動作を説明する。
FIG. 5 is a flowchart of the processing of the embodiment shown in FIG. The configuration of the embodiment shown in FIG.
4 is added to the embodiment shown in FIG. 4. Similarly, the embodiment shown in FIG. 5 is obtained by adding the portion B shown in FIG. 5 to the embodiment shown in FIG. It is a thing.
Hereinafter, the processing operation will be described with reference to the flowchart shown in FIG.

【0020】ステップS5でエッジ部分の二値化が終了
したあと、ステップS21では黒画素連結成分抽出手段
11で、黒画素部分の連結成分の抽出を行い、次に、連
結成分外接矩形決定手段12でその外接矩形の範囲を求
める(S22)。この矩形が文字を構成するものである
ならば、文字内に細かい構造が含まれている可能性があ
り、エッジ抽出がそこまでできていない恐れがある。た
だ、文字であるかどうかを判定するのは難しいので、こ
こではあらかじめ文字のサイズを決めておき、それに合
わせた矩形の大きさ範囲の規定値により、文字を構成す
ると思われる矩形を決定する(S23)。
After the binarization of the edge portion is completed in step S5, in step S21, the connected component of the black pixel portion is extracted by the black pixel connected component extracting means 11, and then the connected component circumscribed rectangle determining means 12 is extracted. To determine the range of the circumscribed rectangle (S22). If this rectangle constitutes a character, there is a possibility that a fine structure is included in the character, and there is a possibility that edge extraction has not been completed to that extent. However, since it is difficult to determine whether a character is a character, here, the size of the character is determined in advance, and a rectangle that is supposed to constitute the character is determined based on the specified value of the rectangle size range according to that ( S23).

【0021】ここで、文字でないものを文字と判定して
も特に悪影響はない。逆に、文字であるべきものを文字
でないと判定してしまった場合には、文字内部の構造を
再現できない可能性が出るが、多くの場合、文字が大き
過ぎる場合にこのようなことが発生する。この場合は、
内部でのエッジ抽出ができていることが多いので、これ
も問題にはならない。
Here, there is no adverse effect even if a non-character is determined to be a character. Conversely, if it is determined that what should be a character is not a character, there is a possibility that the internal structure of the character can not be reproduced, but this often occurs when the character is too large I do. in this case,
This is not a problem since the edge extraction is often performed inside.

【0022】さて、文字であると判定された矩形は、そ
の矩形内の未決定画素に限って、矩形内未決定画素二値
化手段13により二値化が行われる(S24)。この二
値化手法は色々あるが、矩形内の画素の原画像での画素
値を調べ、最大値と最小値の平均値を閾値として求め、
この閾値より白に近ければ白画素、そうでなければ黒画
素と判定する方法等がある。ここまでのステップをすべ
ての連結成分について行い(S25)、処理を終えたな
らば、ステップS6の処理へ進む。
The rectangle determined to be a character is binarized by the undecided pixel binarizing means 13 only for undecided pixels within the rectangle (S24). There are various methods of this binarization, but the pixel value of the pixel in the rectangle in the original image is checked, and the average value of the maximum value and the minimum value is obtained as a threshold,
There is a method of determining a white pixel if the pixel is closer to white than this threshold, and a black pixel otherwise if the pixel is closer to white. The steps up to this point are performed for all connected components (S25), and when the processing is completed, the flow proceeds to the processing of step S6.

【0023】図6は、図4,図5に示した実施例による
処理を行った例を説明するための図で、図6(A)は、
文字単位の二値化までを行った結果の例で、図6(B)
は、二値化を行った最終結果の例である。
FIG. 6 is a diagram for explaining an example in which the processing according to the embodiment shown in FIGS. 4 and 5 has been performed. FIG.
FIG. 6B is an example of a result of performing up to binarization in character units.
Is an example of the final result of binarization.

【0024】図7は、本発明による画像処理方法,装置
および画像処理機能を格納した記録媒体の他の実施例を
説明するための構成図で、図中、21はCPU、22は
メモリ、23はハードディスク、24は入力装置、25
はCD−ROMドライブ、26はディスプレイ、27は
記録媒体である。
FIG. 7 is a block diagram for explaining another embodiment of a recording medium storing an image processing method and apparatus and an image processing function according to the present invention. In FIG. 7, reference numeral 21 denotes a CPU; Is a hard disk, 24 is an input device, 25
Is a CD-ROM drive, 26 is a display, and 27 is a recording medium.

【0025】図7に示した実施例は、上記の構成要素に
加え、マウス(図示せず)などからなる汎用の処理装置
で、CD−ROMなどの記録媒体27には、本発明の帳
票種識別の処理機能や処理手順を実現させるためのプロ
グラムが記録されており、また、登録・処理対象の帳票
の原稿画像は、例えば、ハードディスク23などに格納
され、CPU21は、記録媒体27から上述の処理機能
や手順を実現するプログラムを読み出して実行し、二値
化の結果をディスプレイ26などに出力するようにした
ものである。
The embodiment shown in FIG. 7 is a general-purpose processing device comprising a mouse (not shown) and the like in addition to the above-described components. A program for realizing an identification processing function and a processing procedure is recorded. A document image of a form to be registered / processed is stored, for example, on a hard disk 23 or the like. A program for implementing a processing function or procedure is read and executed, and the binarized result is output to the display 26 or the like.

【0026】[0026]

【発明の効果】以上の説明から明らかなように、本発明
によれば、罫線や文字は近傍の背景色とは異なった濃度
であることを利用して、背景に中間色が使用されていて
も文字や罫線を鮮明に表現するので、背景にも認識の妨
げとなるノイズのない二値画像を提供することができ
る。
As is apparent from the above description, according to the present invention, by utilizing the fact that the ruled lines and characters have different densities from the neighboring background colors, even if an intermediate color is used for the background. Since the characters and the ruled lines are clearly expressed, it is possible to provide a binary image free of noise which also hinders the recognition of the background.

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

【図1】 本発明による画像処理方法,装置および画像
処理機能を格納した記録媒体の一実施例を説明するため
の構成図である。
FIG. 1 is a configuration diagram illustrating an embodiment of a recording medium storing an image processing method, an apparatus, and an image processing function according to the present invention.

【図2】 図1に示した実施例の処理のフローチャート
である。
FIG. 2 is a flowchart of a process of the embodiment shown in FIG. 1;

【図3】 図2に示した実施例によって処理された画像
を説明するための図である。
FIG. 3 is a diagram for explaining an image processed by the embodiment shown in FIG. 2;

【図4】 本発明による画像処理方法,装置および画像
処理機能を格納した記録媒体の他の実施例を説明するた
めの構成図である。
FIG. 4 is a configuration diagram for explaining another embodiment of a recording medium storing an image processing method and apparatus and an image processing function according to the present invention.

【図5】 図4に示した実施例の処理のフローチャート
である。
FIG. 5 is a flowchart of a process of the embodiment shown in FIG. 4;

【図6】 図4,図5に示した実施例によって処理され
た画像を説明するための図である。
FIG. 6 is a diagram for explaining an image processed by the embodiment shown in FIGS. 4 and 5;

【図7】 本発明による画像処理方法,装置および画像
処理機能を格納した記録媒体の他の実施例を説明するた
めの構成図である。
FIG. 7 is a configuration diagram for explaining another embodiment of a recording medium storing an image processing method and apparatus and an image processing function according to the present invention.

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

1…処理対象濃淡画像入力手段、2…処理対象濃淡画像
格納手段、3…文字エッジ識別手段、4…エッジ画素二
値化手段、5…二値化結果格納手段、6…非エッジ画素
連結成分抽出手段、7…周辺画素計数手段、8…二値画
像生成手段、9…二値画像出力手段、11…黒画素連結
成分抽出手段、12…連結成分外接矩形決定手段、13
…矩形内未決定画素二値化手段、21…CPU、22…
メモリ、23…ハードディスク、24…入力装置、25
…CD−ROMドライブ、26…ディスプレイ、27…
記録媒体。
DESCRIPTION OF SYMBOLS 1 ... Gray-scale image input means for processing, 2 ... Gray-scale image storage means for processing, 3 ... Character edge discriminating means, 4 ... Edge pixel binarization means, 5 ... Binarization result storage means, 6 ... Non-edge pixel connection component Extraction means 7, peripheral pixel counting means 8, binary image generation means 9, binary image output means 11, black pixel connected component extracting means 12, connected component circumscribed rectangle determining means 13,
... Undecided pixel binarization means in a rectangle, 21 ... CPU, 22 ...
Memory 23 hard disk 24 input device 25
... CD-ROM drive, 26 ... Display, 27 ...
recoding media.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 入力された濃淡画像内の各画素がエッジ
であるか否かを判定し、エッジと判定された画素につい
ては二値化を行い、エッジと判定されなかった画素につ
いては、エッジと判定されなかった画素の連結成分と前
記エッジと判定された画素との接触部分を調べて二値化
を行うことにより、入力された濃淡画像から二値画像を
生成することを特徴とする画像処理方法。
1. A method for determining whether each pixel in an input grayscale image is an edge, performing binarization on a pixel determined as an edge, and performing edge conversion on a pixel not determined as an edge. An image characterized by generating a binary image from an input grayscale image by performing a binarization by examining a contact portion between a connected component of a pixel not determined as the pixel and the pixel determined as the edge. Processing method.
【請求項2】 請求項1に記載の画像処理方法おいて、
前記エッジと判定されなかった画素については、前記エ
ッジと判定された画素の連結成分を抽出し、該抽出され
た連結成分の外接矩形内の画素のうち、エッジと判定さ
れなかった画素の二値化を行い、以上の処理で二値化さ
れなかった画素の連結成分と既に二値化されている画素
との接触部分を調べることにより、前記二値化されなか
った画素の二値化を行うことを特徴とする画像処理方
法。
2. The image processing method according to claim 1, wherein
For the pixels not determined as the edges, the connected components of the pixels determined as the edges are extracted, and among the pixels in the circumscribed rectangle of the extracted connected components, the binary values of the pixels not determined as the edges are extracted. The binarization of the non-binarized pixel is performed by examining the contact portion between the connected component of the pixel that has not been binarized in the above process and the pixel that has already been binarized. An image processing method comprising:
【請求項3】 入力された濃淡画像内の各画素がエッジ
であるか否かを判定するエッジ判定手段と、該エッジ判
定手段によりエッジと判定された画素の二値化を行う第
1の二値化手段と、前記エッジ判定手段によりエッジと
判定されなかった画素の連結成分と前記エッジと判定さ
れた画素との接触部分を調べることにより前記エッジと
判定されなかった画素の二値化を行う第2の二値化手段
とを有し、入力された濃淡画像から二値画像を生成する
ことを特徴とする画像処理装置。
3. An edge determining means for determining whether each pixel in the input grayscale image is an edge, and a first binarizing means for binarizing the pixel determined as an edge by the edge determining means. A binarizing unit that binarizes the pixel that is not determined as the edge by examining a contact part between the connected component of the pixel that is not determined as the edge and the pixel that is determined as the edge by the edge determining unit; An image processing apparatus, comprising: a second binarization unit, which generates a binary image from an input grayscale image.
【請求項4】 請求項3に記載の画像処理装置におい
て、前記エッジと判定された画素の連結成分を抽出する
連結成分抽出手段と、該抽出された連結成分の外接矩形
内の画素のうち、エッジと判定されなかった画素の二値
化を行う第3の二値化手段とを有し、前記第2の二値化
手段が、第1および第3の二値化手段により二値化され
なかった画素の連結成分と既に二値化されている画素と
の接触部分を調べることにより前記二値化されなかった
画素の二値化を行うことを特徴とする画像処理装置。
4. The image processing apparatus according to claim 3, wherein: a connected component extracting unit that extracts a connected component of the pixel determined to be the edge; and a pixel within a circumscribed rectangle of the extracted connected component. A third binarization unit for performing binarization of a pixel not determined as an edge, wherein the second binarization unit is binarized by the first and third binarization units. An image processing apparatus for performing binarization of a pixel that has not been binarized by checking a contact portion between a connected component of a pixel that has not been binarized and a pixel that has already been binarized.
【請求項5】 入力された濃淡画像内の各画素がエッジ
であるか否かを判定するエッジ判定機能と、エッジと判
定された画素について二値化を行う第1の二値化機能
と、エッジと判定されなかった画素については、前記エ
ッジと判定されなかった画素の連結成分とエッジと判定
された画素との接触部分を調べて二値化を行う第2の二
値化機能とにより、入力された濃淡画像から二値画像を
生成する機能をコンピューターに実現させるためのプロ
グラムを記録したことを特徴とする画像処理機能を格納
した記録媒体。
5. An edge determination function for determining whether each pixel in an input gray-scale image is an edge, a first binarization function for performing binarization on a pixel determined to be an edge, For a pixel not determined as an edge, a second binarization function of performing a binarization by examining a contact portion between a connected component of the pixel not determined as the edge and the pixel determined as an edge, A recording medium storing an image processing function characterized by recording a program for causing a computer to realize a function of generating a binary image from an input grayscale image.
【請求項6】 請求項5に記載の画像処理機能を格納し
た記録媒体において、前記エッジと判定された画素の連
結成分を抽出する連結成分抽出機能と、該抽出された連
結成分の外接矩形内の画素のうち、エッジと判定されな
かった画素の二値化を行う第3の二値化機能とを有し、
前記第2の二値化機能が、前記第1および第3の二値化
機能により二値化されなかった画素の連結成分と既に二
値化されている画素との接触部分を調べることにより前
記二値化されなかった画素の二値化を行うことを特徴と
する画像処理機能を格納した記録媒体。
6. A recording medium storing the image processing function according to claim 5, wherein a connected component extracting function for extracting a connected component of the pixel determined to be the edge, and a circumscribing rectangle of the extracted connected component. A third binarization function of performing binarization of pixels that are not determined to be edges among pixels of
The second binarization function checks the contact portion between a connected component of a pixel that has not been binarized by the first and third binarization functions and a pixel that has already been binarized. A recording medium storing an image processing function characterized by performing binarization of a pixel that has not been binarized.
JP10205909A 1998-07-06 1998-07-06 Image processing method, apparatus and recording medium storing image processing function Pending JP2000020714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10205909A JP2000020714A (en) 1998-07-06 1998-07-06 Image processing method, apparatus and recording medium storing image processing function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10205909A JP2000020714A (en) 1998-07-06 1998-07-06 Image processing method, apparatus and recording medium storing image processing function

Publications (1)

Publication Number Publication Date
JP2000020714A true JP2000020714A (en) 2000-01-21

Family

ID=16514770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10205909A Pending JP2000020714A (en) 1998-07-06 1998-07-06 Image processing method, apparatus and recording medium storing image processing function

Country Status (1)

Country Link
JP (1) JP2000020714A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037596A (en) * 2007-07-12 2009-02-19 Ricoh Co Ltd Image processing apparatus and program
CN100517374C (en) * 2005-12-29 2009-07-22 佳能株式会社 Device and method for extracting text from document image having complex background

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100517374C (en) * 2005-12-29 2009-07-22 佳能株式会社 Device and method for extracting text from document image having complex background
US7813554B2 (en) 2005-12-29 2010-10-12 Canon Kabushiki Kaisha Method and apparatus of extracting text from document image with complex background, computer program and storage medium thereof
JP2009037596A (en) * 2007-07-12 2009-02-19 Ricoh Co Ltd Image processing apparatus and program

Similar Documents

Publication Publication Date Title
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
US7411699B2 (en) Method and apparatus to enhance digital image quality
JP2001297303A (en) Document image recognition method and apparatus, and computer-readable recording medium
JP5337563B2 (en) Form recognition method and apparatus
CN113688838B (en) Red handwriting extraction method and system, readable storage medium and computer equipment
US6269186B1 (en) Image processing apparatus and method
JPH11213090A (en) Character / graphic / background area identification method and apparatus and recording medium recording the method
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
JP2003087562A (en) Image processing apparatus and image processing method
JPH10294862A (en) Image processing device
US11570331B2 (en) Image processing apparatus, image processing method, and storage medium
US6983071B2 (en) Character segmentation device, character segmentation method used thereby, and program therefor
JP3073837B2 (en) Image region separation device and image region separation method
JP2004104635A (en) Image processing device
JP2000020714A (en) Image processing method, apparatus and recording medium storing image processing function
US8542931B2 (en) Ruled line extraction technique based on comparision results and indentifying noise based on line thickness
JPH10108012A (en) Image area separation device
JP3966448B2 (en) Image processing apparatus, image processing method, program for executing the method, and recording medium storing the program
JPH08237404A (en) Selection of optical character recognition mode
JP2001291056A (en) Document image recognition device and recording medium
JPH10233930A (en) Image processor
JPH11136505A (en) Image processing apparatus and method
JP3756660B2 (en) Image recognition method, apparatus and recording medium
JP2853141B2 (en) Image area identification device
JP4248700B2 (en) Ruled line identification method, ruled line identification apparatus and recording medium