JP2000222524A - Method and device for removing ruled line, and recording medium - Google Patents

Method and device for removing ruled line, and recording medium

Info

Publication number
JP2000222524A
JP2000222524A JP11024622A JP2462299A JP2000222524A JP 2000222524 A JP2000222524 A JP 2000222524A JP 11024622 A JP11024622 A JP 11024622A JP 2462299 A JP2462299 A JP 2462299A JP 2000222524 A JP2000222524 A JP 2000222524A
Authority
JP
Japan
Prior art keywords
ruled line
line
pixel
character
ruled
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
JP11024622A
Other languages
Japanese (ja)
Inventor
Yuji Yonekura
雄司 米倉
Takashi Okamoto
隆史 岡本
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.)
NTT Data Group Corp
Original Assignee
NTT Data 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 NTT Data Corp filed Critical NTT Data Corp
Priority to JP11024622A priority Critical patent/JP2000222524A/en
Publication of JP2000222524A publication Critical patent/JP2000222524A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To remove only a ruled line part while correctly leaving only a character part as it is in the case of overlap of rules lines and characters in a form image. SOLUTION: The form image is inputted in an image input part 1 by an image input means like a scanner, and the coordinates of ruled lines such as solid lines and broken lines in the form inputted in this image input part 1 are specified by a ruled line specifying part 2. Concretely, a long continuity of black pixels in one direction is regarded as a ruled line. If ruled lines specified by the ruled line specifying part 2 come into contact with or cross characters, ruled lines are removed while leaving the character part by a ruled line removing part 3, and the form image after removal of ruled lines is sent to an output. The form image after removal of ruled lines sent from the ruled line removing part 3 is inputted to a character recognition part 4. This character recognition part 4 segments characters from the inputted form image to perform character recognition and word collation and outputs the recognition result and the collation result.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、紙面に記入された
文字を光学的に読み取る光学式文字認識装置(Optical
Character Recognition:OCR装置)において、光学
的には識別できない色で印刷されたOCR専用帳票では
なく、一般の黒色罫線で作成された帳票に記入された同
色文字の認識技術に係り、より詳細には、罫線と接触ま
たは交差した文字ストロークを残しながら罫線部分を除
去するための技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optical character recognition device (Optical character recognition device) for optically reading characters written on paper.
(Character Recognition: OCR device), not related to OCR-only forms printed in colors that cannot be optically identified, but to the recognition technology of the same color characters written on forms made with general black ruled lines. And a technique for removing a ruled line portion while leaving a character stroke in contact with or intersecting the ruled line.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】紙面に
記入された文字を光学的に読み取る光学式文字認識装置
(Optical Character Recognition:以下、「OCR装
置」)では、スキャナやカメラなどのイメージ入力手段
によって取り込まれた帳票イメージから文字部分を切り
出し、この切り出した文字部分を認識することが行われ
ている。文字部分の切り出しには、例えば特開平7−5
7047号公報に記載された「文字切出し方式」を用い
ることができる。
2. Description of the Related Art An optical character recognition device (hereinafter, referred to as an "OCR device") for optically reading characters written on a paper is an image input device such as a scanner or a camera. A character portion is cut out from the form image captured by the means, and the cut out character portion is recognized. For example, Japanese Patent Application Laid-Open No. 7-5
The “character extraction method” described in Japanese Patent No. 7047 can be used.

【0003】OCR装置では、通常、光学的には識別で
きない色で印刷された専用帳票が使用されているが、こ
のような専用帳票ではない帳票、例えばコピーして使用
する黒色罫線で作成された帳票等に記入された文字を認
識しなければならない場合がある。このような場合、罫
線と文字のストロークとが一部重なっていると文字認識
の精度を高めることができない。上記「文字切出し方
式」は、このような場合に罫線のみを除去する処理に応
用することが可能である。すなわち、罫線の外接多角形
の外縁に存在する画素の状態をチェックすることにより
文字ストロークと罫線との重なり合いを検出し、罫線の
みを切り出して除去する。
In the OCR apparatus, a dedicated form printed in a color which cannot be optically distinguished is usually used, but a form other than such a dedicated form, for example, a black ruled line used for copying is used. In some cases, it is necessary to recognize characters written on a form or the like. In such a case, if the ruled line and the character stroke partially overlap, the accuracy of character recognition cannot be improved. The "character extraction method" can be applied to a process of removing only ruled lines in such a case. That is, by checking the state of the pixels existing on the outer edge of the circumscribed polygon of the ruled line, the overlap between the character stroke and the ruled line is detected, and only the ruled line is cut out and removed.

【0004】しかし、実際に帳票イメージを取り込む際
に、帳票の配置、イメージ入力手段の機械的特性や光学
的特性、量子化誤差などの要因によって、帳票イメージ
中の罫線に傾きが生じたり、罫線の輪郭が雑音によって
凹凸になったり、罫線に歪みやたわみが生じたり、罫線
の太さが途中で変化したりすることがある。これらの場
合、上記文字切出し方式では、罫線の外接多角形と罫線
の輪郭線が一致せず、外接多角形を太めに切り出してし
まい、その結果、罫線と一緒に罫線付近の文字ストロー
クをも誤って除去してしまう場合がある。
However, when an image of a form is actually taken in, a ruled line in the form image may be inclined or may be inclined due to factors such as the layout of the form, mechanical and optical characteristics of the image input means, and quantization error. May become uneven due to noise, distortion or deflection may occur in the ruled line, or the thickness of the ruled line may change in the middle. In these cases, in the above character extraction method, the circumscribed polygon of the ruled line does not match the contour of the ruled line, and the circumscribed polygon is cut out thicker. As a result, the character stroke near the ruled line is also incorrectly cut along with the ruled line. May be removed.

【0005】例えば図12(a)に示す帳票イメージの
ように、罫線11の外接多角形12と罫線11の輪郭と
が一致しないと、外接多角形12を太めに切り出され
る。その結果、図12(b)に示すように、罫線11と
一緒に罫線付近の文字ストロークも除去されてしまう。
このように、雑音や、罫線に重なる文字ストロークの一
部が影響することにより、罫線の傾きを正確に求めるこ
とができないという問題があった。
If the circumscribed polygon 12 of the ruled line 11 does not match the contour of the ruled line 11, as in the form image shown in FIG. 12 (a), the circumscribed polygon 12 is cut out thicker. As a result, as shown in FIG. 12B, the character stroke near the ruled line is also removed together with the ruled line 11.
As described above, there is a problem that the inclination of the ruled line cannot be accurately obtained due to the influence of noise or a part of the character stroke overlapping the ruled line.

【0006】また、図13(a)の線分の外接多角形の
外縁に存在する画素の白黒の状態をチェックするとき
に、図13(b)の部分拡大図のように、線分の外接多
角形の外縁付近に雑音13が存在すると、この雑音13
を文字の一部と判断してしまい、図13(c)のよう
に、誤ったイメージとして認識されてしまうという問題
もあった。
Further, when checking the black and white state of the pixels existing at the outer edge of the circumscribed polygon of the line segment shown in FIG. 13A, the circumscribed line segment shown in FIG. If the noise 13 exists near the outer edge of the polygon, the noise 13
Is determined as a part of the character, and there is a problem that the image is recognized as an erroneous image as shown in FIG.

【0007】さらに、図14(a)に示すように罫線1
1に対して文字ストロークが浅い角度で交差する場合に
おいて、交差の中心部付近では、図14(b)に示すよ
うに罫線の外接多角形の外縁が白画素になり、交差のな
い部分として誤って判定してしまうために、文字部分を
図14(c)に示すように誤って除去してしまうおそれ
があった。
Further, as shown in FIG.
In the case where the character stroke intersects at a shallow angle with respect to 1, the outer edge of the circumscribed polygon of the ruled line becomes a white pixel near the center of the intersection as shown in FIG. Therefore, the character portion may be erroneously removed as shown in FIG.

【0008】そこで、本発明は、文字を構成する画素を
確実に残しながら罫線部分の画素のみを効果的に除去す
ることができる罫線除去方法を提供することを課題とす
る。本発明の他の課題は、この罫線除去方法の実施に適
した罫線除去装置及び記録媒体を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a ruled line removing method capable of effectively removing only pixels in a ruled line portion while reliably retaining pixels constituting a character. Another object of the present invention is to provide a ruled line removing apparatus and a recording medium suitable for implementing the ruled line removing method.

【0009】[0009]

【課題を解決するための手段】上記の課題を解決する本
発明の罫線除去方法は、罫線と文字とが同一色の画素で
構成される画像データから前記文字を残しながら前記罫
線を除去する方法であって、画素色の配列を検出するこ
とで罫線両サイドの輪郭線の位置を推定する過程と、推
定された輪郭線の外側の画素の色をチェックすることで
当該罫線と文字ストロークとの接触の有無を判定する過
程と、前記罫線と接触している文字ストロークがあると
きに当該罫線を構成する画素の色を、空白を表す色に変
換する過程とを含む。これらの過程を経ることにより、
文字と罫線とが接触している場合であっても、文字部分
の画像データを正しく切り出すことができる。
According to the present invention, there is provided a ruled line removing method for removing a ruled line from image data in which a ruled line and a character are composed of pixels of the same color while leaving the character. The process of estimating the position of the outline on both sides of the ruled line by detecting the arrangement of the pixel colors, and the process of estimating the position of the outline and the character stroke by checking the color of the pixels outside the estimated outline. The method includes a step of determining the presence or absence of a contact and a step of converting the color of a pixel forming the ruled line to a color representing a blank when there is a character stroke in contact with the ruled line. Through these processes,
Even when the character and the ruled line are in contact, the image data of the character portion can be correctly cut out.

【0010】前記接触の有無を判定する過程では、例え
ば、前記推定された輪郭線の両外側の隣接画素の色を当
該罫線の線分方向に1画素ずつずらしながらチェックし
ていく。そして、当該輪郭線の両外側において共に線分
方向に隣接する画素同士が同一色となる領域(一方が黒
の連続、他方が白の連続となる場合を含む)をそれぞれ
判断領域として、個々の判断領域における画素色の組み
合わせから罫線と文字との接触の有無を判定する。前記
文字の接触が有るときは、前記推定された輪郭線の両外
側における複数の前記判断領域の画素色の組み合わせに
応じてその接触の態様を特定することになる。この場
合、精度を上げるためには、個々の判断領域において、
前記輪郭線に対して外側方向に隣接する画素の色と、そ
の画素からさらに1又は複数画素分外側方向に離れた画
素の色との組み合わせ条件を判定することで当該判断領
域の画素色を決定する。あるいは、前記輪郭線に最も近
いラインの個々の画素について、当該画素の色と、その
外側方向に離れる画素及び線分方向に隣接する画素の色
との組み合わせ条件を判定することで当該判断領域の画
素色を決定するようにする。
In the process of judging the presence or absence of the contact, for example, the colors of adjacent pixels on both sides of the estimated contour are checked while being shifted one pixel at a time in the line segment direction of the ruled line. Then, on both outer sides of the contour line, regions where pixels adjacent to each other in the line segment direction have the same color (including a case where one is a continuous black and the other is a continuous white) are each determined as a determination region. The presence or absence of contact between the ruled line and the character is determined from the combination of the pixel colors in the determination area. When there is a contact with the character, the form of the contact is specified according to a combination of the pixel colors of the plurality of determination regions on both outer sides of the estimated contour line. In this case, in order to increase the accuracy, in each judgment area,
The pixel color of the determination area is determined by determining a combination condition of a color of a pixel outwardly adjacent to the contour and a color of one or more pixels further outward from the pixel. I do. Alternatively, for each pixel of the line closest to the contour line, the combination condition of the color of the pixel and the color of the pixel that is separated in the outer direction and the color of the pixel that is adjacent in the line segment direction is determined. The pixel color is determined.

【0011】前記輪郭線の位置を推定する過程では、例
えば、前記罫線の画素領域を線分方向に対して垂直とな
る方向に細分割するとともに複数の細分割領域の分割方
向の長さの統計値から当該罫線の太さを推定し、その分
割方向の長さと前記推定した罫線の太さとの差が一定閾
値以内となる複数の細分割領域の代表座標値の変化を直
線近似して前記罫線の傾きを検出し、検出した傾きに基
づいて当該罫線の輪郭線の位置を推定するようにする。
あるいは、分割方向の長さと前記推定した罫線の太さと
の差が一定閾値以内となる複数の細分割領域の端部輪郭
を順次繋ぎ合わせることで前記罫線の輪郭線を推定す
る。あるいは、分割方向の長さと前記推定した罫線の太
さとが等しい複数の細分割領域の端部輪郭を順次繋ぎ合
わせることで前記罫線の輪郭線を推定する。
In the step of estimating the position of the contour, for example, the pixel area of the ruled line is subdivided in a direction perpendicular to the direction of the line segment, and the statistics of the length of the plurality of subdivided areas in the direction of division are obtained. The thickness of the ruled line is estimated from the value, and the change in the representative coordinate values of the plurality of subdivided regions in which the difference between the length in the dividing direction and the estimated thickness of the ruled line is within a certain threshold value is linearly approximated. Is detected, and the position of the contour of the ruled line is estimated based on the detected inclination.
Alternatively, the contour of the ruled line is estimated by sequentially joining the end contours of a plurality of subdivided regions in which the difference between the length in the dividing direction and the estimated ruled line thickness is within a certain threshold value. Alternatively, the contour of the ruled line is estimated by sequentially joining the end contours of a plurality of subdivided regions having the same length in the dividing direction and the estimated ruled line thickness.

【0012】上記他の課題を解決する本発明の罫線除去
装置は、罫線と文字とが同一色の画素で構成される画像
データを入力する画像データ入力手段と、入力された前
記画像データに含まれる画素色の配列を検出することで
罫線及びその位置を特定する罫線特定手段と、特定され
た罫線の輪郭線を推定するとともに当該輪郭線の外側の
画素の色をチェックすることで当該罫線と文字との接触
の有無を判定し、前記罫線と接触している文字があると
きに当該罫線を構成する画素を空白を表す画素に変換す
る罫線除去手段とを有し、文字部分の画素データのみを
切り出し可能に構成されたものである。
According to another aspect of the present invention, there is provided a ruled line removing apparatus for inputting image data in which a ruled line and a character are constituted by pixels of the same color; Ruled line identifying means for identifying the ruled line and its position by detecting the arrangement of the pixel colors to be detected, and estimating the contour of the identified ruled line and checking the color of the pixels outside the contoured line to determine the ruled line. Ruled line removing means for determining the presence / absence of contact with a character, and converting a pixel constituting the ruled line into a pixel representing a space when there is a character in contact with the ruled line; Can be cut out.

【0013】上記他の課題を解決する本発明の記録媒体
は、下記の処理をコンピュータ装置に実行させるための
プログラムコードが記録された、コンピュータ読取可能
な記録媒体である。 (1)罫線と文字とが同一色の画素で構成される画像デ
ータを入力する処理、(2)入力された前記画像データ
に含まれる画素色の配列を検出することで罫線及びその
位置を特定する処理、(3)特定された罫線の輪郭線を
推定するとともに当該輪郭線の外側の画素の色をチェッ
クすることで当該罫線と文字との接触の有無を判定する
処理、(4)前記罫線と接触している文字があるときに
当該罫線を構成する画素を空白を表す色に変換する処
理。
A recording medium according to the present invention for solving the above-mentioned other problems is a computer-readable recording medium in which a program code for causing a computer device to execute the following processing is recorded. (1) processing of inputting image data in which ruled lines and characters are composed of pixels of the same color; (2) specifying ruled lines and their positions by detecting an array of pixel colors included in the input image data (3) Estimating the contour of the specified ruled line and checking the color of the pixels outside the contoured line to determine whether or not the ruled line has touched a character, and (4) the ruled line When there is a character that is in contact with, a process of converting pixels constituting the ruled line into a color representing a blank.

【0014】[0014]

【発明の実施の形態】以下、本発明をOCR装置に適用
した場合の実施の形態を、図面に基づいて説明する。図
1は、本実施形態に係るOCR装置の機能構成図であ
る。このOCR装置は、例えば、スキャナ等の画像取込
装置、ディスプレイ装置、キーボード等のデータ入力装
置、外部記憶装置を有するコンピュータ装置によって実
現される。具体的には、このコンピュータ装置が所定の
プログラムコードを読み込んで実行することにより形成
される、イメージ入力部1、罫線特定部2、罫線除去部
3及び文字認識部4の機能ブロックを具備して構成され
る。このOCR装置のうち、文字認識部4を除いた部分
が罫線除去装置として機能する部分である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to an OCR device will be described below with reference to the drawings. FIG. 1 is a functional configuration diagram of the OCR device according to the present embodiment. The OCR device is realized by, for example, an image capturing device such as a scanner, a display device, a data input device such as a keyboard, and a computer device having an external storage device. More specifically, the computer includes functional blocks of an image input unit 1, a ruled line specifying unit 2, a ruled line removing unit 3, and a character recognizing unit 4 formed by reading and executing a predetermined program code. Be composed. The portion of the OCR device except for the character recognition unit 4 functions as a ruled line removing device.

【0015】上記プログラムコードは、通常、コンピュ
ータ装置の内部或いは外部記憶装置に格納され、随時読
み取られて実行されるようになっているが、上記機能ブ
ロック1〜4が形成されれば本発明を実施することがで
きるので、その記録形態は任意であってよい。例えば、
コンピュータ装置とは分離可能なCD−ROM、DV
D、FD等の可搬性の記録媒体、或いは構内ネットワー
クに接続されたプログラムサーバ等に記録され、使用時
に読み込まれて上記コンピュータ装置の内部或いは外部
記憶装置にインストールされて随時実行に供されるもの
であってもよい。
The program code is normally stored in a computer device or in an external storage device, and is read and executed as needed. However, if the functional blocks 1 to 4 are formed, the present invention is implemented. Since it can be implemented, the recording form may be arbitrary. For example,
CD-ROM, DV separable from the computer device
D, FD, or other portable recording media, or recorded on a program server or the like connected to the local network, read at the time of use, installed in the computer device or in an external storage device, and provided for execution at any time It may be.

【0016】なお、上記機能ブロック1〜4は、上記プ
ログラムコード単独によって形成されるほか、コンピュ
ータ装置に搭載されたオペレーティングシステム又は他
のアプリケーションプログラムとの協働により適宜形成
されるものであってもよい。
The function blocks 1 to 4 may be formed by the program code alone, or may be formed appropriately in cooperation with an operating system or another application program mounted on a computer device. Good.

【0017】各機能ブロック1〜4は、以下のような機
能を実行するものである。イメージ入力部1は、画像取
込装置によって取り込まれた画像(イメージ)データを
後続処理用に入力する。本実施形態では、画像データの
例として、一般の黒色罫線で作成された帳票に文字が記
入された帳票イメージを用いるものとする。
The function blocks 1 to 4 execute the following functions. The image input unit 1 inputs image (image) data captured by the image capturing device for subsequent processing. In the present embodiment, as an example of image data, a form image in which characters are written in a form created with a general black ruled line is used.

【0018】罫線特定部2は、入力された帳票イメージ
中の実線、破線などの罫線及びその位置(座標値)を特
定する。この場合の座標値の特定手法としては、例え
ば、黒画素がある一方向に長く連続するものを罫線と
し、この罫線の始終点及びその輪郭の座標値を特定する
手法、黒画素を水平方向及び垂直方向に投影し、投影さ
れたヒストグラムのピークとなる位置の座標値を罫線の
座標値とする手法等を用いることができる。これらの手
法は、いずれも公知のものである。
The ruled line specifying unit 2 specifies ruled lines such as solid lines and broken lines in the input form image and their positions (coordinate values). As a method of specifying the coordinate values in this case, for example, a method in which a black pixel that is long and continuous in one direction is set as a ruled line, and the starting and ending points of the ruled line and the coordinate values of the contour thereof are specified. A method of projecting in the vertical direction and using the coordinate value of the peak position of the projected histogram as the coordinate value of the ruled line can be used. All of these techniques are known.

【0019】罫線除去部3は、罫線特定部2で特定され
た罫線に文字ストロークの接触や交差(以下、両者を区
別する必要がある場合を除き、「接触」と表現する)が
あるかどうかを検出し、接触がある場合は、文字ストロ
ークを残しながら罫線部分のみを除去するものである。
この罫線除去処理の詳細内容については、後述する。
The ruled line removing unit 3 determines whether the ruled line specified by the ruled line specifying unit 2 has a contact or an intersection of character strokes (hereinafter, referred to as “contact” unless it is necessary to distinguish the two). Is detected, and if there is a contact, only the ruled line portion is removed while leaving the character stroke.
The details of the ruled line removal processing will be described later.

【0020】文字認識部4は、罫線除去部3で罫線除去
された帳票イメージから文字の部分を切り出し、切り出
した部分の文字認識及び単語照合等を行うものである。
The character recognition section 4 cuts out a character portion from the form image from which the ruled line has been removed by the ruled line removing section 3 and performs character recognition and word collation of the cut out portion.

【0021】次に、罫線除去部3の詳細機能ブロックに
ついて、図2を参照して説明する。罫線除去部3では、
帳票イメージと、罫線特定部2で抽出した罫線の座標値
が罫線輪郭推定部31に入力されるようになっている。
罫線輪郭推定部31は、罫線の両サイドの輪郭線を推定
し、推定結果を文字接触/交差判定部32に入力させる
ものである。文字接触/交差判定部32は、推定された
輪郭線をもとに、その輪郭線の外側の画素の色、モノク
ロ画像の場合は白か黒かをチェックしながら、罫線と文
字ストロークの接触の有無を判定する。除去イメージ作
成部33は、文字接触/交差判定部32による判定結果
に従い、文字部分を残しながら、罫線部分の黒画素を白
画素に変換して罫線除去イメージを作成する。
Next, detailed functional blocks of the ruled line removing section 3 will be described with reference to FIG. In the ruled line removing unit 3,
The form image and the coordinate values of the ruled lines extracted by the ruled line specifying unit 2 are input to the ruled line contour estimating unit 31.
The ruled line contour estimating unit 31 estimates the contours on both sides of the ruled line, and causes the character contact / intersection determining unit 32 to input the estimation result. The character contact / intersection determination unit 32 checks the color of the pixel outside the outline, whether it is white or black in the case of a monochrome image, based on the estimated outline, and determines the contact between the ruled line and the character stroke. Determine the presence or absence. The removal image creation unit 33 creates a ruled line removal image by converting the black pixels in the ruled line portion into white pixels while leaving the character portion in accordance with the determination result by the character contact / intersection determination unit 32.

【0022】ここで、一例として、帳票イメージから水
平罫線を除去する場合の罫線除去部3の具体的な処理内
容、つまり罫線除去方法を具体的に説明する。垂直罫線
の場合は、帳票イメージの座標値を水平用から垂直用に
置き換えることで、同様に処理することができる。
Here, as an example, a specific processing content of the ruled line removing unit 3 for removing a horizontal ruled line from a form image, that is, a ruled line removing method will be specifically described. In the case of a vertical ruled line, the same processing can be performed by replacing the coordinate values of the form image from horizontal to vertical.

【0023】<接触の有無判定>図3は、文字接触/交
差判定部32における文字の接触の有無判定手法の説明
図である。ここでは、罫線輪郭推定部31で推定された
罫線34の輪郭線35の上・下外側の画素を判断ポイン
ト36a,36bとし、その判断ポイント36a,36
bを罫線方向(図示の右方向)に1画素ずつずらしなが
ら、判断ポイント36a,36bが白画素か黒画素かを
チェックする。また、上・下の判断ポイント36a,3
6bの組み合わせが、左右に隣接する判断ポイント間で
同じなものを含む領域をそれぞれ判断領域37とする
と、個々の判断領域37における判断ポイント36a,
36bの組み合わせは、それぞれ、白・白、白・黒、黒
・白、黒・黒の4通りとなる。
<Judgment of Contact Existence> FIG. 3 is an explanatory diagram of a method of judging the presence or absence of character contact in the character contact / intersection judgment unit 32. Here, pixels on the upper and lower sides of the contour 35 of the ruled line 34 estimated by the ruled line contour estimating unit 31 are determined as decision points 36a and 36b, and the decision points 36a and 36b are determined.
While shifting b one pixel at a time in the ruled line direction (right direction in the figure), it is checked whether the judgment points 36a and 36b are white pixels or black pixels. In addition, the upper and lower decision points 36a, 3
Assuming that areas including the same combination between the right and left adjacent judgment points are the judgment areas 37, the judgment points 36a, 36a,
There are four combinations of 36b: white / white, white / black, black / white, and black / black.

【0024】また、着目する判断領域37の左右に隣接
した他の判断領域を参照し、その組合わせをみると、例
えば図4のように分類される。図4(a)は罫線への文
字ストロークの接触がない領域、図4(b)は罫線に文
字ストロークが接触している領域、図4(c)は罫線へ
文字ストロークが交差し且つ罫線の上・下ともに文字ス
トロークの一部がある領域、図4(d)は罫線へ文字ス
トロークが交差し且つ罫線の上・下の一方にのみ文字ス
トロークがある領域である。
Referring to the other judgment areas adjacent to the left and right of the judgment area 37 of interest and looking at their combinations, they are classified as shown in FIG. 4, for example. 4A is a region where the character stroke does not touch the ruled line, FIG. 4B is a region where the character stroke is in contact with the ruled line, and FIG. FIG. 4D shows a region where a character stroke crosses a ruled line and a character stroke is present only on one of the upper and lower sides of the ruled line.

【0025】<罫線除去>図4の各領域における罫線除
去の要領は、以下のとおりである。なお、図中、判断領
域37において、ハーフトーンで示した領域は、黒また
は白の領域、白で示した領域は白のみの領域、黒で示し
た領域は黒のみの領域である。また、罫線34における
ハッチング部分は画素が除去される前の部位、空白部分
は画素が除去された部位、黒部分は残すべき画素の部位
である。
<Removal of Ruled Line> The procedure for removing the ruled line in each area shown in FIG. 4 is as follows. In the drawing, in the determination area 37, the area indicated by halftone is a black or white area, the area indicated by white is an area only white, and the area indicated by black is an area only black. A hatched portion of the ruled line 34 is a portion before the pixel is removed, a blank portion is a portion from which the pixel is removed, and a black portion is a portion of a pixel to be left.

【0026】図4(a)の場合:判断領域37に対応す
る罫線34の黒画素部分をすべて白画素に変換する。 図4(b)の場合:接触した文字部分として、底辺の長
さを判断領域37の黒画素の部分の長さに等しく、高さ
が罫線34の太さの半分の長さに等しい2等辺三角形が
残るように、罫線34の黒画素を白画素に変換する。但
しこの処理は例示であり、この他にも、判断領域37内
を全て除去したり、罫線34の太さの半分の幅のみを除
去したり、逆に全て残すなどの方法を用いることができ
る。 図4(c)の場合:罫線34へ文字部分が交差してお
り、罫線34の上・下ともに文字部分がみられる領域部
分の罫線34の黒画素をそのまま残す。 図4(d)交差した文字部分の罫線34の黒画素をその
まま残しながら、文字部分が交差していない部分のみ黒
画素を白画素に変換する。
In the case of FIG. 4A: all the black pixel portions of the ruled line 34 corresponding to the judgment area 37 are converted into white pixels. In the case of FIG. 4B, as the touched character portion, the length of the base is equal to the length of the black pixel portion of the determination area 37, and the height is equal to half the thickness of the ruled line 34. The black pixels of the ruled line 34 are converted to white pixels so that the triangle remains. However, this process is only an example, and other methods such as removing the entirety of the inside of the determination area 37, removing only half the width of the ruled line 34, or leaving all the other way around can be used. . In the case of FIG. 4C, the character part intersects the ruled line 34, and the black pixels of the ruled line 34 in the area where the character part is seen both above and below the ruled line 34 are left as they are. In FIG. 4D, the black pixels of the ruled lines 34 of the intersecting character portions are left as they are, and the black pixels are converted into white pixels only in the portions where the character portions do not intersect.

【0027】<罫線が傾いている場合の輪郭推定>罫線
が傾いている場合において、罫線の輪郭を推定する場合
は、まず、罫線の太さを推定する。罫線の太さを推定す
る場合は、例えば罫線の一部または全部を、黒画素が罫
線と垂直な方向に連結した2連結成分に分割する。分割
された2連結成分は、罫線方向の座標値が、同じ値をも
つ黒画素の集合となる。これらの2連結成分の長さの統
計をとり、その平均値を罫線の太さとして推定する。な
お、平均値の代わりに、最頻値、中央値などを用いても
良い。
<Estimation of outline when ruled line is inclined> When the outline of the ruled line is estimated when the ruled line is inclined, first, the thickness of the ruled line is estimated. When estimating the thickness of a ruled line, for example, part or all of the ruled line is divided into two connected components in which black pixels are connected in a direction perpendicular to the ruled line. The divided two connected components form a set of black pixels having the same coordinate value in the ruled line direction. Statistics of the lengths of these two connected components are obtained, and the average value is estimated as the ruled line thickness. Note that a mode, a median, or the like may be used instead of the average.

【0028】罫線の太さがわかると、次に、以下のよう
にして、罫線の傾きを検出する。まず、図5に示すよう
に、罫線の一部または全部を、黒画素が罫線と垂直な方
向に連結した2連結成分に分割する。そして、分割した
2連結成分の中で、その2連結成分の長さが、推定した
罫線の太さと一致するもののみを抽出する。その後、抽
出した2連結成分の中心座標値を例えば最小2乗法で直
線近似し、その傾きを求める。なお、中心座標値の代わ
りに、2連結成分の特定位置を一意に定める代表座標
値、例えばいずれか一方の端点の座標値を用いても良
い。図5において、ハーフトーンで示した部分は、推定
した罫線の太さと同じ長さをもつ2連結成分であり、白
で示した部分は、推定した罫線の太さと長さが異なる2
連結成分である。
When the thickness of the ruled line is known, the inclination of the ruled line is detected as follows. First, as shown in FIG. 5, part or all of the ruled line is divided into two connected components in which black pixels are connected in a direction perpendicular to the ruled line. Then, of the divided two connected components, only those whose length of the two connected components matches the estimated rule line thickness are extracted. Thereafter, the center coordinate values of the extracted two connected components are linearly approximated by, for example, the least squares method, and the inclination thereof is obtained. Instead of the center coordinate value, a representative coordinate value uniquely defining a specific position of the two connected components, for example, a coordinate value of one of the end points may be used. In FIG. 5, a portion indicated by halftone is a two-connected component having the same length as the estimated ruled line thickness, and a portion indicated by white is a two-component whose estimated ruled line thickness and length are different.
It is a connected component.

【0029】傾いた罫線の輪郭は、図6に示すように、
罫線の外接多角形、罫線特定部2で得られた罫線の座標
値、推定した罫線の太さおよび傾きにより推定する。
The outline of the inclined ruled line is as shown in FIG.
Estimation is performed based on the circumscribed polygon of the ruled line, the coordinate value of the ruled line obtained by the ruled line specifying unit 2, the estimated thickness and inclination of the ruled line.

【0030】図7は、推定した罫線の太さをもとに罫線
の輪郭をより正確に推定する場合の処理の概要を示した
図である。ここでは、罫線の一部または全部を、黒画素
が罫線と垂直方向に連結した2連結成分に分割するとと
もに、分割された2連結成分の中で、2連結成分の長さ
が、推定した罫線の太さと一致するもののみを抽出す
る。そして、抽出したすべての2連結成分の端点を順次
結んだ線を罫線の輪郭線として推定する。なお、図7に
おいて、ハーフトーンで示した部分及び白で示した部分
は、図5の場合と同様な意味である。
FIG. 7 is a diagram showing an outline of processing for more accurately estimating the outline of a ruled line based on the estimated thickness of the ruled line. Here, a part or all of the ruled line is divided into two connected components in which black pixels are connected to the ruled line in the vertical direction, and the length of the two connected components in the divided two connected components is the estimated ruled line. Only those that match the thickness of are extracted. Then, a line connecting the end points of all the extracted two connected components in sequence is estimated as the outline of the ruled line. Note that, in FIG. 7, the portions indicated by halftones and the portions indicated by white have the same meaning as in FIG.

【0031】<罫線の太さが変化している場合>図8
(a),(b)は、罫線34の太さが途中で変化する場
合の対応処理を示すための図である。この場合には、罫
線34の太さを動的に求め、輪郭を推定することにな
る。具体的には、罫線34の一部または全部を、黒画素
が罫線34と垂直方向に連結した2連結成分に分割す
る。図8(a)に示すように、ある2連結成分に着目し
たときに、2連結成分を中心とする一定範囲で罫線34
の太さを推定する。次に、推定した罫線34の太さと、
着目した2連結成分の長さが等しい2連結成分を抽出す
る。図8(b)に示すように、着目する2連結成分を罫
線方向に1画素ずつ移動させながら、罫線34を構成す
るすべての2連結成分について、抽出するか、しないか
を判定する。そして、抽出されたすべての2連結成分の
端点を順次結ぶことで、罫線34の輪郭を推定する。
<Case where Rule Line Thickness Changes> FIG. 8
(A), (b) is a figure for showing the corresponding processing when the thickness of the ruled line 34 changes in the middle. In this case, the thickness of the ruled line 34 is dynamically determined, and the contour is estimated. Specifically, part or all of the ruled line 34 is divided into two connected components in which black pixels are connected to the ruled line 34 in the vertical direction. As shown in FIG. 8A, when attention is paid to a certain two connected components, the ruled lines 34 within a certain range centered on the two connected components.
Estimate the thickness of. Next, the estimated thickness of the ruled line 34 and
Two connected components having the same length are extracted. As shown in FIG. 8B, while moving the two connected components of interest one pixel at a time in the ruled line direction, it is determined whether to extract or not to extract all the two connected components constituting the ruled line 34. Then, the outline of the ruled line 34 is estimated by sequentially connecting the end points of all the extracted two connected components.

【0032】<雑音が混入している場合>雑音が混入し
たことに起因して罫線の輪郭が凹凸する場合も、文字の
接触部分を精度良く判定するために、推定した輪郭の外
側複数ラインの画素を参照して罫線と文字部分の接触ま
たは交差を判定する。この場合の処理を、水平罫線の場
合を例に挙げ、図9および図10を参照して説明する。
<Case where noise is mixed> Even when the contour of the ruled line is uneven due to the mixed noise, in order to accurately determine the contact portion of the character, a plurality of lines outside the estimated contour are determined. The contact or intersection between the ruled line and the character portion is determined with reference to the pixel. The processing in this case will be described with reference to FIG. 9 and FIG. 10 taking the case of a horizontal ruled line as an example.

【0033】図9および図10は、罫線の上・下の判断
ポイントのそれぞれについて、2ラインずつの画素を参
照した例が示されている。罫線に近い方を内側判断ポイ
ント、遠い方を外側判断ポイントとする。図9の例にお
いて、内側判断ポイント、外側判断ポイントのそれぞれ
の画素が、両方とも黒の場合、その判断ポイントを黒と
判断する。一方、内側判断ポイント、外側判断ポイント
の画素のいずれか一方または両方が白の場合、その判断
ポイントを白とみなす。このように、図9では、内側1
つ、外側1つの判断ポイントで判定する場合を示したも
のである。一方、図10の場合は、罫線方向の各座標値
に着目したときに、1つの内側判断ポイントにつき、外
側判断ポイントは、着目座標値およびその前後の座標値
の3点を外側判断ポイントとする。
FIG. 9 and FIG. 10 show examples in which two lines of pixels are referred to for each of the judgment points above and below the ruled line. The one closer to the ruled line is an inner judgment point, and the one farther from the ruled line is an outer judgment point. In the example of FIG. 9, when both the inner determination point and the outer determination point are black, the determination point is determined to be black. On the other hand, when one or both of the pixels at the inner judgment point and the outer judgment point are white, the judgment point is regarded as white. Thus, in FIG.
FIG. 3 shows a case where a determination is made using one outer determination point. On the other hand, in the case of FIG. 10, when attention is paid to each coordinate value in the ruled line direction, for one inside judgment point, three outside judgment points, the coordinate value of interest and the coordinate values before and after it, are regarded as outside judgment points. .

【0034】例えば、内側判断ポイントが黒で、且つ3
つの外側判断ポイントの少なくとも1つが黒である場
合、着目する座標値の判断ポイントを黒とする。内側判
断ポイントが白または3つの外側判断ポイントがすべて
白の場合は、着目する判断ポイントを白と判断する。こ
のようにして、推定した輪郭の外側複数ラインから判断
ポイントの白黒を判断し、上述の文字部分の接触または
交差の判定手法と同様に、罫線への文字の接触または交
差の有無を判定する。なお、図9及び図10は、2ライ
ンの画素の色の組み合わせに基づく場合の例であるが、
3ライン、あるいはそれ以上のラインの画素の色の組み
合わせに応じて判断ポイントの画素色を判定するように
することもできる。この場合の画素色の判定基準として
は、上記のような論理条件を用いても良く、あるいは多
数決論理その他の組み合わせ条件を用いても良い。この
ようにすれば、罫線への文字の接触または交差の有無の
判定精度をより高めることができる。
For example, the inner judgment point is black and 3
When at least one of the outer determination points is black, the determination point of the target coordinate value is set to black. When the inner judgment point is white or when all three outer judgment points are white, the target judgment point is judged to be white. In this way, the black and white of the determination point is determined from a plurality of lines outside the estimated contour, and the presence or absence of the contact or intersection of the character with the ruled line is determined in the same manner as the above-described method of determining the contact or intersection of the character portion. 9 and 10 are examples based on the combination of the colors of the pixels on two lines.
The pixel color of the determination point may be determined according to a combination of the colors of the pixels on three or more lines. In this case, as the criterion of the pixel color, the above-described logical condition may be used, or a majority decision logic or other combination condition may be used. In this way, it is possible to further improve the accuracy of determining whether a character touches or intersects a ruled line.

【0035】<文字のストロークが浅い角度で罫線に交
差する場合>罫線の両側が白の状態が連続する長さを考
慮することで、文字のストロークが罫線に対して浅い角
度で交差する場合であっても、文字部分の罫線への接触
または交差を精度良く判定することができる。以下、こ
の場合の処理内容を、水平罫線の場合を例に挙げて説明
する。
<Case where character stroke intersects ruled line at a shallow angle> Considering the length of continuous white state on both sides of the ruled line, character strokes intersect the ruled line at a shallow angle. Even if there is, contact or intersection of the character portion with the ruled line can be accurately determined. Hereinafter, the processing content in this case will be described by taking a case of a horizontal ruled line as an example.

【0036】ある判断領域37の白黒状態(上・下)が
白・黒または黒・白で、その前後少なくとも一方の判断
領域37の白黒状態(上・下)が白・白であり、且つそ
の長さがある閾値以下の場合、文字ストロークが罫線に
対し浅く交差しているものと判断する。この場合の例を
示したのが図11(a)〜(j)である。罫線除去の方
法は、上記白黒状態(上・下)が白・白で、且つその長
さが閾値以下の判断領域のさらにその隣の判断領域を参
照して、例えば図11の除去後のように、文字部分を残
しながら罫線を除去する。なお、図11において、判断
領域部分で黒状態の場合は黒、白状態の場合は白長さが
閾値以上、ハーフトーン状態は黒また白、白丸状態は白
長さが閾値未満を示す。また、罫線部分において、ハー
フトーン状態は除去前、空白部状態は除去部分、黒状態
は罫線を残す部分を示している。
The black-and-white state (upper / lower) of a certain judgment area 37 is white / black or black / white, and the black-and-white state (upper / lower) of at least one of the judgment areas 37 is white / white. If the length is less than a certain threshold, it is determined that the character stroke intersects the ruled line shallowly. FIGS. 11A to 11J show examples of this case. The ruled line removal method is described by referring to a determination area next to a determination area whose white / white state (upper / lower) is white / white and whose length is equal to or less than a threshold value, for example, as shown in FIG. Then, the ruled line is removed while leaving the character portion. In FIG. 11, in the judgment area, the black state indicates black, the white state indicates white length greater than or equal to the threshold, the halftone state indicates black or white, and the white circle indicates white length less than the threshold. In the ruled line portion, the halftone state indicates a state before removal, the blank state indicates a removed part, and the black state indicates a part where a ruled line is left.

【0037】このように、本実施形態のOCR装置によ
れば、罫線に傾きがある場合、罫線の輪郭が雑音により
凹凸している場合、罫線が歪んだり、撓んだりしている
場合、あるいは、罫線の太さが途中で変化している場合
であっても、罫線と文字ストロークの接触の有無を判定
することができる。また、罫線に交差する文字ストロー
クの角度が浅い場合であっても、罫線と文字ストローク
の交差を精度良く判定することができる。これにより、
文字切り出しの精度が高まり、文字認識部4における認
識精度を従来手法よりも著しく向上させることができ
る。
As described above, according to the OCR apparatus of the present embodiment, when the ruled line is inclined, when the contour of the ruled line is uneven due to noise, when the ruled line is distorted or bent, or Even if the thickness of the ruled line changes in the middle, the presence or absence of contact between the ruled line and the character stroke can be determined. Further, even when the angle of the character stroke that intersects the ruled line is small, the intersection between the ruled line and the character stroke can be accurately determined. This allows
The accuracy of character segmentation is increased, and the recognition accuracy of the character recognition unit 4 can be significantly improved as compared with the conventional method.

【0038】なお、本実施形態では、説明の便宜上、白
画素と黒画素との組み合わせで構成される画像データを
対象にした場合の例を挙げたが、罫線及び文字ストロー
クを形成する画素色と、空白色を表現できる画素色との
組み合わせで構成される画像データ全般について、共通
に適用が可能なものである。
In this embodiment, for convenience of explanation, an example is described in which image data composed of a combination of white pixels and black pixels is used. In addition, the present invention can be applied to all image data composed of a combination of pixel colors capable of expressing a blank color.

【0039】[0039]

【発明の効果】以上の説明から明らかなように、本発明
によれば、文字部分を確実に残しながら罫線部分のみを
効果的に除去することができるという、特有の効果が得
られる。
As is apparent from the above description, according to the present invention, a unique effect is obtained in that only the ruled line portion can be effectively removed while the character portion is securely left.

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

【図1】本発明の実施の第1形態を示すブロック構成
図。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】罫線除去部の詳細を示すブロック構成図。FIG. 2 is a block diagram showing details of a ruled line removing unit.

【図3】文字接触または交差の有無を判定する要領を示
した説明図。
FIG. 3 is an explanatory diagram showing a procedure for determining whether a character touches or intersects;

【図4】(a)は罫線への文字の接触または交差がない
領域、(b)は罫線に文字が接触している領域、(c)
は罫線へ文字が交差し且つ罫線の上・下ともに文字部分
がある領域、(d)は罫線へ文字が交差し且つ罫線の上
・下一方にのみ文字部分がある領域における除去前後の
帳票イメージの説明図。
4A is an area where a character does not touch or cross a ruled line, FIG. 4B is an area where a character is touching a ruled line, and FIG.
Is an area where characters intersect the ruled line and there is a character portion both above and below the ruled line, and (d) is an image of a form before and after removal in an area where a character intersects the ruled line and there is only a character portion above and below the ruled line. FIG.

【図5】罫線の傾きを検出する要領を示した説明図。FIG. 5 is an explanatory diagram showing a procedure for detecting the inclination of a ruled line.

【図6】傾いた罫線の輪郭線を推定する要領を示した説
明図。
FIG. 6 is an explanatory diagram showing a point of estimating a contour of an inclined ruled line.

【図7】罫線の輪郭を推定する要領を示した説明図。FIG. 7 is an explanatory diagram showing a point of estimating a contour of a ruled line;

【図8】(a),(b)は、罫線34の太さが途中で変
化する場合に動的にその太さを検出する要領を示した説
明図。
FIGS. 8A and 8B are explanatory diagrams showing a procedure for dynamically detecting the thickness of a ruled line when the thickness of the ruled line changes on the way; FIGS.

【図9】輪郭の外側複数ラインの画素を参照して罫線と
文字の接触または交差の有無を判定する要領を示した説
明図。
FIG. 9 is an explanatory diagram showing a procedure for determining whether a ruled line touches or intersects a character with reference to pixels on a plurality of lines outside the contour;

【図10】輪郭の外側複数ラインの画素を参照して罫線
と文字の接触または交差の有無を判定する要領を示した
説明図。
FIG. 10 is an explanatory diagram showing a procedure for determining whether a ruled line touches or intersects with a character by referring to pixels on a plurality of lines outside a contour;

【図11】(a)〜(j)は、いずれも文字ストローク
が罫線に対し浅く交差している場合の罫線除去前と除去
後の様子を示した説明図。
FIGS. 11A to 11J are explanatory diagrams showing states before and after ruled line removal when a character stroke intersects a ruled line shallowly;

【図12】(a),(b)は、雑音や、罫線に重なる文
字がある場合に、罫線の傾きが正確に求めることができ
ない状態を説明した図。
FIGS. 12A and 12B are diagrams illustrating a state in which the inclination of a ruled line cannot be accurately obtained when there is noise or a character overlapping the ruled line;

【図13】(a)は雑音が混入している罫線、(b)は
その部分拡大図、(c)は雑音成分を文字と誤認した状
態を示した説明図。
13A is a ruled line containing noise, FIG. 13B is a partially enlarged view of the ruled line, and FIG. 13C is an explanatory diagram showing a state where a noise component is erroneously recognized as a character.

【図14】(a)は文字ストロークが浅い角度で罫線に
交差している状態を示した図、(b)はその部分拡大
図、(c)はこの場合に文字部分を誤って除去してしま
う状態を示した図。
14A is a diagram showing a state in which a character stroke intersects a ruled line at a shallow angle, FIG. 14B is a partially enlarged view thereof, and FIG. 14C is a diagram in which a character portion is erroneously removed in this case. FIG.

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

1 イメージ入力部 2 罫線特定部 3 罫線除去部 4 文字認識部 31 罫線輪郭推定部 32 文字接触/交差判定部 33 除去イメージ作成部 1 image input unit 2 ruled line specifying unit 3 ruled line removing unit 4 character recognizing unit 31 ruled line contour estimating unit 32 character contact / intersection determining unit 33 removed image creating unit

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 罫線と文字とが同一色の画素で構成され
る画像データから前記文字を残しながら前記罫線を除去
する方法であって、 画素色の配列を検出することで罫線両サイドの輪郭線の
位置を推定する過程と、 推定された輪郭線の外側の画素の色をチェックすること
で当該罫線と文字ストロークとの接触の有無を判定する
過程と、 前記罫線と接触している文字ストロークがあるときに当
該罫線を構成する画素の色を、空白を表す色に変換する
過程とを含む、 罫線除去方法。
1. A method for removing a ruled line while leaving the character from image data in which the ruled line and the character are composed of pixels of the same color, wherein the contour of both sides of the ruled line is detected by detecting an array of pixel colors. Estimating the position of the line, determining the presence or absence of contact between the ruled line and the character stroke by checking the color of the pixel outside the estimated contour line, and determining the character stroke in contact with the ruled line Converting the color of the pixels forming the ruled line to a color representing a blank when there is a ruled line.
【請求項2】 前記接触の有無を判定する過程は、前記
推定された輪郭線の両外側の隣接画素の色を当該罫線の
線分方向に1画素ずつずらしながらチェックしていき、
当該輪郭線の両外側において共に線分方向に隣接する画
素同士が同一色となる領域をそれぞれ判断領域として、
個々の判断領域における画素色の組み合わせから罫線と
文字との接触の有無を判定することを特徴とする、 請求項1記載の罫線除去方法。
2. The step of judging the presence / absence of contact includes checking the color of adjacent pixels on both sides of the estimated contour line while shifting the color by one pixel in the direction of the line segment of the ruled line.
Areas in which pixels adjacent to each other in the line segment direction on both outer sides of the contour line have the same color are determined areas, respectively.
2. The ruled line removal method according to claim 1, wherein the presence / absence of contact between the ruled line and the character is determined based on a combination of pixel colors in each determination region.
【請求項3】 前記文字の接触が有るときに、前記推定
された輪郭線の両外側における複数の前記判断領域の画
素色の組み合わせに応じてその接触の態様を特定するこ
とを特徴とする、 請求項3記載の罫線除去方法。
3. When there is a contact of the character, a contact mode is specified according to a combination of pixel colors of a plurality of the determination areas on both outer sides of the estimated contour line. The ruled line removing method according to claim 3.
【請求項4】 個々の判断領域において、前記輪郭線に
対して外側方向に隣接する画素の色と、その画素からさ
らに1又は複数画素分外側方向に離れた画素の色との組
み合わせ条件を判定することで当該判断領域の画素色を
決定することを特徴とする、 請求項2又は3記載の罫線除去方法。
4. In each determination area, a combination condition of a color of a pixel outwardly adjacent to the contour line and a color of a pixel further outward by one or more pixels from the pixel is determined. 4. The ruled line removing method according to claim 2, wherein a pixel color of the determination area is determined by performing the determination.
【請求項5】 前記輪郭線に最も近いラインの個々の画
素について、当該画素の色と、その外側方向に離れる画
素及び線分方向に隣接する画素の色との組み合わせ条件
を判定することで当該判断領域の画素色を決定すること
を特徴とする、 請求項4記載の罫線除去方法。
5. For each pixel of a line closest to the contour line, a combination condition of a color of the pixel and a color of a pixel which is separated in an outward direction and a pixel which is adjacent in a line segment direction is determined. 5. The ruled line removal method according to claim 4, wherein a pixel color of the determination area is determined.
【請求項6】 前記輪郭線の位置を推定する過程は、前
記罫線の画素領域を線分方向に対して垂直となる方向に
細分割するとともに複数の細分割領域の分割方向の長さ
の統計値から当該罫線の太さを推定し、その分割方向の
長さと前記推定した罫線の太さとの差が一定閾値以内と
なる複数の細分割領域の代表座標値の変化を直線近似し
て前記罫線の傾きを検出し、検出した傾きに基づいて当
該罫線の輪郭線の位置を推定することを特徴とする、 請求項1乃至5のいずれかの項記載の罫線除去方法。
6. The step of estimating the position of the contour line includes subdividing a pixel region of the ruled line in a direction perpendicular to a line segment direction and calculating a length of a plurality of subdivided regions in a dividing direction. The thickness of the ruled line is estimated from the value, and the change in the representative coordinate values of the plurality of subdivided regions in which the difference between the length in the dividing direction and the estimated thickness of the ruled line is within a certain threshold value is linearly approximated. The ruled line removing method according to any one of claims 1 to 5, wherein a slope of the ruled line is detected, and a position of an outline of the ruled line is estimated based on the detected slope.
【請求項7】 前記輪郭線の位置を推定する過程は、前
記罫線の画素領域を線分方向に対して垂直となる方向に
細分割するとともに複数の細分割領域の分割方向の長さ
の統計値から当該罫線の太さを推定し、その分割方向の
長さと前記推定した罫線の太さとの差が一定閾値以内と
なる複数の細分割領域の端部輪郭を順次繋ぎ合わせるこ
とで前記罫線の輪郭線を推定することを特徴とする、 請求項1乃至5のいずれかの項記載の罫線除去方法。
7. The step of estimating the position of the contour line includes subdividing a pixel region of the ruled line in a direction perpendicular to a line segment direction and calculating a length of a plurality of subdivided regions in a dividing direction. The thickness of the ruled line is estimated from the value, and the end contours of a plurality of subdivided regions in which the difference between the length of the ruled line and the estimated ruled line thickness is within a certain threshold value are sequentially joined to form the ruled line. The ruled line removal method according to any one of claims 1 to 5, wherein the contour is estimated.
【請求項8】 前記輪郭線の位置を推定する過程は、前
記罫線の画素領域を線分方向に対して垂直となる方向に
細分割するとともに複数の細分割領域の分割方向の長さ
の統計値から当該罫線の太さを推定し、その分割方向の
長さと前記推定した罫線の太さとが等しい複数の細分割
領域の端部輪郭を順次繋ぎ合わせることで前記罫線の輪
郭線を推定することを特徴とする、 請求項1乃至5のいずれかの項記載の罫線除去方法。
8. The step of estimating the position of the contour line includes subdividing a pixel region of the ruled line in a direction perpendicular to a line segment direction and calculating a length of a plurality of subdivided regions in a dividing direction. Estimating the thickness of the ruled line from the values, and estimating the outline of the ruled line by sequentially joining the end contours of a plurality of subdivided regions in which the length in the dividing direction is equal to the estimated ruled line thickness. The ruled line removal method according to any one of claims 1 to 5, characterized in that:
【請求項9】 罫線と文字とが同一色の画素で構成され
る画像データを入力する画像データ入力手段と、 入力された前記画像データに含まれる画素色の配列を検
出することで罫線及びその位置を特定する罫線特定手段
と、 特定された罫線の輪郭線を推定するとともに当該輪郭線
の外側の画素の色をチェックすることで当該罫線と文字
との接触の有無を判定し、前記罫線と接触している文字
があるときに当該罫線を構成する画素を空白を表す画素
に変換する罫線除去手段とを有し、 文字部分の画素データのみを切り出し可能に構成された
罫線除去装置。
9. An image data input means for inputting image data in which a ruled line and a character are composed of pixels of the same color, and a ruled line and its image data are detected by detecting an array of pixel colors contained in the input image data. Ruled line specifying means for specifying a position; estimating a contour of the specified ruled line; checking colors of pixels outside the contoured line to determine whether or not the ruled line is in contact with a character; A ruled line removing device for converting a pixel forming the ruled line into a pixel representing a blank when there is a touching character, and wherein only the pixel data of the character portion can be cut out;
【請求項10】 罫線と文字とが同一色の画素で構成さ
れる画像データを入力する処理、 入力された前記画像データに含まれる画素色の配列を検
出することで罫線及びその位置を特定する処理、 特定された罫線の輪郭線を推定するとともに当該輪郭線
の外側の画素の色をチェックすることで当該罫線と文字
との接触の有無を判定する処理、 前記罫線と接触している文字があるときに当該罫線を構
成する画素を空白を表す画素に変換する処理、 をコンピュータ装置に実行させるためのプログラムコー
ドが記録された、コンピュータ読取可能な記録媒体。
10. A process of inputting image data in which a ruled line and a character are composed of pixels of the same color, and specifying a ruled line and its position by detecting an array of pixel colors included in the input image data. Processing, estimating the outline of the identified ruled line and checking the color of pixels outside the outline to determine whether or not the ruled line is in contact with the character; A computer-readable recording medium in which a program code for causing a computer device to execute a process of converting a pixel constituting the ruled line into a pixel representing a blank at a certain time is recorded.
JP11024622A 1999-02-02 1999-02-02 Method and device for removing ruled line, and recording medium Pending JP2000222524A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11024622A JP2000222524A (en) 1999-02-02 1999-02-02 Method and device for removing ruled line, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11024622A JP2000222524A (en) 1999-02-02 1999-02-02 Method and device for removing ruled line, and recording medium

Publications (1)

Publication Number Publication Date
JP2000222524A true JP2000222524A (en) 2000-08-11

Family

ID=12143255

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11024622A Pending JP2000222524A (en) 1999-02-02 1999-02-02 Method and device for removing ruled line, and recording medium

Country Status (1)

Country Link
JP (1) JP2000222524A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9355326B2 (en) 2013-04-25 2016-05-31 Kyocera Document Solutions Inc. Image processing apparatus, ruled line determination method, and storage medium having ruled line determination program stored therein

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9355326B2 (en) 2013-04-25 2016-05-31 Kyocera Document Solutions Inc. Image processing apparatus, ruled line determination method, and storage medium having ruled line determination program stored therein

Similar Documents

Publication Publication Date Title
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
US11935314B2 (en) Apparatus for generating a binary image into a white pixel, storage medium, and method
JPH09185676A (en) Ruled line elimination method
JP2000207489A (en) Character extracting method and device and record medium
JP3615333B2 (en) Ruled line eraser
JP4011646B2 (en) Line detection method and character recognition device
JP4565396B2 (en) Image processing apparatus and image processing program
EP1156444A1 (en) Detection of circular pattern in digital image
JP6883199B2 (en) Image processor, image reader, and program
JP2000222524A (en) Method and device for removing ruled line, and recording medium
JP3130869B2 (en) Fingerprint image processing device, fingerprint image processing method, and recording medium
JP7406884B2 (en) Information processing device, program and control method
JP4078045B2 (en) Image processing apparatus, method, program, and storage medium
JP7341758B2 (en) Image processing device, image processing method, and program
JP4867894B2 (en) Image recognition apparatus, image recognition method, and program
JPH11232382A (en) Ruled line extraction method and ruled line elimination method
JP4731748B2 (en) Image processing apparatus, method, program, and storage medium
JP4159071B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing program for realizing the processing method
JP4738645B2 (en) SHADED AREA DETECTING DEVICE, SHATTERED AREA DETECTING METHOD, PROGRAM, AND STORAGE MEDIUM
JP2002366900A (en) Optical character reader
JP3113217B2 (en) Dashed line recognition method
JPH11203405A (en) Character recognition device, its method and program recording medium
JP2002074264A (en) Picture processor, its processing method and recording medium
JP3756660B2 (en) Image recognition method, apparatus and recording medium
JPH05128308A (en) Character recognition device