JPH03111982A - Character segmenting method - Google Patents

Character segmenting method

Info

Publication number
JPH03111982A
JPH03111982A JP1250092A JP25009289A JPH03111982A JP H03111982 A JPH03111982 A JP H03111982A JP 1250092 A JP1250092 A JP 1250092A JP 25009289 A JP25009289 A JP 25009289A JP H03111982 A JPH03111982 A JP H03111982A
Authority
JP
Japan
Prior art keywords
frame
character
characters
frame line
cut out
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
JP1250092A
Other languages
Japanese (ja)
Inventor
Takeshi Kamei
亀井 剛
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 JP1250092A priority Critical patent/JPH03111982A/en
Publication of JPH03111982A publication Critical patent/JPH03111982A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は文字認識装置(OCR)において、任意の枠内
に書かれた文字画像からの文字切出し方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for cutting out characters from a character image written in an arbitrary frame in a character recognition device (OCR).

[従来の技術〕 枠内から文字を切出すこれまでの方法としては、規定の
帳票上の枠の位置をあらかじめ与えておく方法や1画像
入力の際の帳票の傾きや位置ずれを検出するためのマー
クを設け、このマークの位置により帳票上の枠の位置を
補正し、文字を切出す方法、あるいは、特開昭60−4
5884号公報などに見られるように、枠内に文字が書
かれた画像に対し、直交する2方向に射影をとって文字
枠を抽出し、文字枠を除去する方法などが知られている
[Prior art] Conventional methods for cutting out characters from within a frame include a method in which the position of the frame on a specified form is given in advance, and a method to detect the inclination or positional shift of the form when inputting a single image. A method of setting a mark, correcting the position of the frame on the form according to the position of this mark, and cutting out the characters, or Japanese Patent Application Laid-Open No. 60-4
As seen in Japanese Patent No. 5884, a method is known in which a character frame is extracted by projecting an image in which characters are written in a frame in two orthogonal directions, and then the character frame is removed.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来技術において、枠の位置をあらかじめ与えておく方
法は、枠が特定のものに限定され、他の枠を使用する場
合には新たに枠の位置を与えるという汎用性に欠ける欠
点があった。また、帳票上にマークを設ける方法は、画
像入力の際のスキャナ等によるノイズの発生や画像の不
鮮明さにより。
In the prior art, the method of assigning the frame position in advance has the disadvantage that the frame is limited to a specific frame, and when a different frame is used, a new frame position must be assigned, resulting in a lack of versatility. In addition, the method of placing marks on forms is based on the noise generated by scanners, etc. when inputting images and the blurring of images.

傾きや位置ずれ検出のマーク自体や枠そのものがぼやけ
てしまうことがあり、正確な補正が行われず、文字の切
出しがうまくいかないという欠点があった。さらに、従
来の射影により文字枠を除去する方法は、枠線への接触
文字があったり、帳票が傾いていたりした場合、射影に
より文字枠を除去する際1文字が切り落される欠点があ
った。
This has the disadvantage that the marks and frames used to detect inclination and positional deviations may become blurred, and accurate correction cannot be performed, making it difficult to cut out characters. Furthermore, the conventional method of removing character frames by projection has the disadvantage that if there are characters touching the frame line or the form is tilted, one character will be cut off when removing the character frame by projection. Ta.

本発明の目的は、任意の枠内に書かれた文字画像から、
文字を正確・確実に切出すことにある。
The purpose of the present invention is to
The goal is to accurately and reliably cut out characters.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するために、請求項(1)では、枠内に
文字が書かれた帳票類の入力画像について。
In order to achieve the above object, claim (1) relates to an input image of a form in which characters are written in a frame.

枠線認識により枠座標を求め、該枠座標から得られる個
々の枠に対して上下左右の枠線を含む外接矩形を切出し
た後、垂直及び水平方向の射影をもとに文字を切出すこ
とを特徴とする。
Obtain frame coordinates by frame line recognition, cut out a circumscribed rectangle including the top, bottom, left, and right frame lines for each frame obtained from the frame coordinates, and then cut out characters based on vertical and horizontal projections. It is characterized by

また、請求項(2)では、上下左右の枠線を含む外接矩
形での枠線の存在範囲を求め、この範囲内で外接矩形か
ら枠線の除去を行うことを特徴とする。
Further, in claim (2), the present invention is characterized in that the range in which the frame line exists in the circumscribed rectangle including the upper, lower, left, and right frame lines is determined, and the frame line is removed from the circumscribed rectangle within this range.

さらに、請求項(3)では、上記外接矩形からの枠線の
除去を行った後に得られる上下左右に余白を含む画像に
対し、水平または垂直方向の射影を求め、端から中心方
向へ向って、文字を切出す位置を決定することを特徴と
する。
Furthermore, in claim (3), a horizontal or vertical projection is obtained for an image including margins on the top, bottom, left, and right sides obtained after removing the frame line from the circumscribed rectangle, and the projection is performed from the edge toward the center. , is characterized by determining the position from which characters are cut out.

〔作 用〕[For production]

請求項(1)では、枠線認識により得られた枠座標をも
とに文字切出しを行うため任意の枠に対応し、個々の枠
に対して上下左右の枠線を含む外接矩形で切出した後、
垂直及び水平方向の射影をもとに文字を切出すことによ
り、正確に切出すことができる。
In claim (1), in order to extract characters based on the frame coordinates obtained by frame line recognition, each frame is cut out using a circumscribed rectangle that includes the upper, lower, left, and right frame lines. rear,
By cutting out characters based on vertical and horizontal projections, accurate cutting is possible.

請求項(2)では、上下左右の枠線探索範囲を求め、こ
の範囲内で枠線の除去を行うことにより、枠線への接触
文字に対しての射影による切出しの際の文字の切落しを
、最小限にとどめることができる。
In claim (2), by determining the upper, lower, left, and right frame line search ranges and removing the frame lines within this range, it is possible to cut out characters when cutting out characters that touch the frame lines by projection. can be kept to a minimum.

請求項(3)では、枠線の除去を行った後に得られる上
下左右に余白を含む画像から文字を切出す際に、一定斌
未満の画素はノイズと判断することにより、目的とする
文字を確実に切出すことができる。
In claim (3), when cutting out a character from an image that includes margins on the top, bottom, left, and right sides obtained after removing the frame line, the target character can be extracted by determining that pixels smaller than a certain distance are noise. It can be cut out reliably.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の文字切出し方法を実現する処理装置の
概略ブロック図である。画像入力装置11はスキャナな
どからなり、枠内に文字の書かれた帳票類を読み取る。
FIG. 1 is a schematic block diagram of a processing device that implements the character segmentation method of the present invention. The image input device 11 is composed of a scanner or the like, and reads forms with characters written in frames.

該画像入力装置11で読み取られたディジタル画像情報
は入力画像メモリ13に格納される。CPU (中央処
理装置)12は。
Digital image information read by the image input device 11 is stored in an input image memory 13. The CPU (central processing unit) 12 is.

入力画像メモリ13の画像情報について枠線認識を行い
、枠線を含む文字画像を切出してワーキングメモリ14
に格納し、枠線や余白部を除去して文字を切出す。
Frame line recognition is performed on the image information in the input image memory 13, character images including the frame lines are cut out and stored in the working memory 14.
, remove frames and margins, and cut out the characters.

第2図はCPU12での文字切出し処理のフローチャー
トを示したもので、以下、これに沿って本発明の文字切
出し方法の一実施例について詳述する。
FIG. 2 shows a flowchart of character extraction processing performed by the CPU 12, and an embodiment of the character extraction method of the present invention will be described in detail below along this flowchart.

入力画像メモリ13に格納された帳票類の入力画像情報
に対し、文字切出しの前処理として枠線認識を行って個
々の枠座標を求める(ステップ10f)。枠線の認識に
は種々の方法が提案されており、そのいずれの方法を用
いてもよい。この枠線認識により得られた枠座標から、
上下左右の枠線を含む一つの外接矩形を切出してワーキ
ングメモリ14に格納し、以下の順序で文字を切出す。
Frame line recognition is performed on the input image information of forms stored in the input image memory 13 as preprocessing for character extraction to determine the coordinates of each frame (step 10f). Various methods have been proposed for recognizing frame lines, and any of these methods may be used. From the frame coordinates obtained by this frame line recognition,
One circumscribed rectangle including the upper, lower, left, and right frame lines is cut out and stored in the working memory 14, and characters are cut out in the following order.

まず、切出された外接矩形について枠線探索範囲を求め
る(ステップ102)。第3図は枠線認識によって得ら
れた外接矩形と枠線探索範囲の関係を示したものである
。枠線探索範囲とは枠線の存在する範囲であり、次の枠
線除去位置を決定するのに用いられるもので、第3図に
示すように、上部、下部、左側、右側の4つからなる。
First, a frame line search range is determined for the cut out circumscribed rectangle (step 102). FIG. 3 shows the relationship between the circumscribed rectangle obtained by frame line recognition and the frame line search range. The frame line search range is the range where the frame line exists, and is used to determine the next frame line removal position.As shown in Figure 3, the frame line search range is the range where the frame line exists. Become.

これらの範囲は、枠金体に対しての個々の枠の位置によ
り、幾何学的な計算式によって決定される。
These ranges are determined by geometric formulas depending on the position of each frame relative to the frame body.

次に、切出された外接矩形から、あらかじめ定めた枠線
除去位置の決定条件により、上部・下部枠線除去位置を
決定し、上下の枠線を除去する(ステップ103)。そ
の後、同じく枠線除去位置の決定条件により、左側・右
側枠線除去位置を決定し、左右の枠線を除去する(ステ
ップ104)。
Next, upper and lower frame line removal positions are determined from the cut out circumscribed rectangle according to predetermined frame line removal position determination conditions, and the upper and lower frame lines are removed (step 103). Thereafter, the left and right side frame line removal positions are determined based on the same frame line removal position determination conditions, and the left and right frame lines are removed (step 104).

この枠線除去位置の決定では、ステップ102で得た枠
線探索範囲内で射影最大値を求めた後。
In determining this frame line removal position, the maximum projection value is determined within the frame line search range obtained in step 102.

その位置から枠線の中心方向へ向って同範囲内で枠線除
去位置決定のため探索を開始する。この場合、次の2つ
の条件を満すことが必要である。
A search is started from that position toward the center of the frame line within the same range to determine the frame line removal position. In this case, it is necessary to satisfy the following two conditions.

(1)現在の射影値が射影最大値を基準としたある一定
値未満 (2)次の射影値が現在の射影値以上 現在位置がこの条件を満たすとき、現在位置を枠線除去
位置とする。
(1) The current projection value is less than a certain value based on the maximum projection value. (2) The next projection value is greater than or equal to the current projection value. When the current position satisfies this condition, the current position is set as the frame line removal position. .

もし、上記の2つの条件を満たさない場合は、枠線探索
範囲の最も内側の位置を枠線除去位置とする。
If the above two conditions are not satisfied, the innermost position of the frame line search range is set as the frame line removal position.

上記枠線除去位置の決定条件を図示すると第4図のよう
になる。ここで、(a)は(])の場合。
The conditions for determining the frame line removal position are illustrated in FIG. 4. Here, (a) is (]).

即ち、現在の射影〈射影最大値を基準とした一定値の場
合、(b)は(2)の場合、即ち、次の射影≧現在の射
影の場合であり、これらを満足すれば、現在の射影を枠
線除去位置とする。(Q)は、(1)および(2)のい
ずれの条件も満たさない場合であり、この場合は枠線探
索範囲の最も内側の位置を枠線除去位置とする。
That is, if the current projection is a constant value based on the maximum projection value, (b) is the case of (2), that is, the next projection ≧ the current projection, and if these are satisfied, the current projection Set the projection as the frame line removal position. (Q) is a case where neither conditions (1) nor (2) are satisfied, and in this case, the innermost position of the frame line search range is set as the frame line removal position.

第3図の例について、上下の枠線を除去した後の画像を
示すと第5図のようになり、左右の枠線を除去した後の
画像を示すと第6図のようになる。
Regarding the example of FIG. 3, the image after removing the upper and lower frame lines is shown in FIG. 5, and the image after removing the left and right frame lines is shown in FIG. 6.

次に、上下左右の枠線を除去して得られた、上下左右に
余白を含む画像に対し、あらかじめ定めた文字切出し位
置の決定条件により、左右の余白を除去し、文字のX方
向(水平方向)の開始位置・終了位置を決定する(ステ
ップ105)。その後、同じく文字切出し位置の決定条
件により、上下の余白を除去し、Y方向(垂直方向)開
始位置・終了位置を決定しくステップ106)、1文字
の切出しを終了する。
Next, for the image that includes margins on the top, bottom, left, and right, which was obtained by removing the top, bottom, left, and right frame lines, the left and right margins are removed according to the predetermined conditions for determining the character extraction position, and the characters are removed in the X direction (horizontal). (step 105). Thereafter, the upper and lower margins are removed and the start and end positions in the Y direction (vertical direction) are determined according to the same character cutout position determination conditions (step 106), and the cutout of one character is completed.

上下左右に余白を含む画像から、画像の端から中心方向
へ向って文字を切出す位置の決定を行う際、その判定条
件としては、次の(1)を必要条件とし、(2) (3
)のいずれかを満たすものとする。
When determining the position to cut out characters from the edges of the image toward the center from an image that includes margins on the top, bottom, left, and right, the following (1) is the necessary condition, and (2) (3)
).

(1)現在位置以降の連続射影の面積が最小射影面積以
上 (2)現在位置以降、最小射影長以上の射影が最小射影
長以上連続して存在 (3)現在位置以降のある特定位置の射影が最小射影長
以上 現在位置が、これらの条件を満たすとき、現在位置を文
字切出し位置とする。第7図は上記文字切出し位置の決
定条件を図示したもので、(a)は(1)の場合、(b
)は(2)の場合、(c)は(3)の場合にそれぞれ対
応する。
(1) The area of continuous projections after the current position is greater than or equal to the minimum projected area (2) After the current position, projections with a minimum projection length or longer exist continuously for a minimum projection length or more (3) Projections at a certain specific position after the current position When the current position satisfies these conditions, the current position is set as the character cutting position. FIG. 7 illustrates the conditions for determining the character cutting position described above, where (a) is (1), (b) is
) corresponds to case (2), and (c) corresponds to case (3).

第6図の枠線の除去後の画像について、左右の余白部を
除去すると第8図のようになり、これの上下の余白部を
除去すると第9図のようになり、1文字の切出しが終了
する。
If the left and right margins are removed from the image after removing the frame lines in Figure 6, it will look like Figure 8, and if the top and bottom margins are removed, it will look like Figure 9, where one character can be cut out. finish.

〔発明の効果〕〔Effect of the invention〕

以上の説明から明らかな如く、本発明によれば、任意の
枠に対して枠線認識により得られた枠座標をもとに、個
々の枠に対して上下左右の枠線を含む外接矩形を切出し
た後、垂直及び水平方向の射影をもとに文字を切出すこ
とにより、汎用性に優れた、より正確な文字切出しを行
うことができる。
As is clear from the above description, according to the present invention, a circumscribing rectangle including the upper, lower, left, and right frame lines is calculated for each frame based on the frame coordinates obtained by frame line recognition for an arbitrary frame. After cutting out characters, characters are cut out based on vertical and horizontal projections, thereby making it possible to perform more accurate character cutting with excellent versatility.

また、切出された外接矩形について、上下左右の枠線探
索範囲を求め、この範囲内で枠線の除去を行うことによ
り、文字の切落しを最小限にとどめることができ、さら
には、枠線の除去を行った後に得られる上下左右の余白
を除去することにより、ノイズの除かれた目的とする文
字を確実に切出すことが可能になる。
Furthermore, by determining the top, bottom, left, and right frame line search ranges for the cut out circumscribed rectangle and removing the frame lines within this range, it is possible to minimize the cutting off of characters. By removing the upper, lower, left, and right margins obtained after removing lines, it is possible to reliably cut out the desired character from which noise has been removed.

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

第1図は本発明の文字切出し方法を実施する処理装置の
概略ブロック図、第2図は本発明による文字切出し方法
の一実施例のフローチャート、第3図は外接矩形と枠線
探索範囲の関係を示す図、第4図は枠線除去位置の決定
条件を示す図、第5図及び第6図は枠線除去後の画像を
示す図、第7図は文字切出し位置の決定条件を示す図、
第8図及び第9図は余白除去後の画像を示す図である。 11・・・画像入力装置、 12・・・CPU。 13・・・入力画像メモリ、 14・・・ワーキングメモリ。 第8区 第9図
FIG. 1 is a schematic block diagram of a processing device that implements the character segmentation method of the present invention, FIG. 2 is a flowchart of an embodiment of the character segmentation method of the present invention, and FIG. 3 is the relationship between the circumscribed rectangle and the frame line search range. Figure 4 is a diagram showing the conditions for determining the frame line removal position, Figures 5 and 6 are diagrams showing the image after frame line removal, and Figure 7 is a diagram showing the conditions for determining the character cutting position. ,
FIGS. 8 and 9 are diagrams showing images after margin removal. 11... Image input device, 12... CPU. 13... Input image memory, 14... Working memory. Ward 8, Figure 9

Claims (3)

【特許請求の範囲】[Claims] (1)任意の枠の中に文字が書かれた画像から文字を切
り出す方法において、枠線認識により枠座標を求め、該
枠座標から得られる個々の枠に対して上下左右の枠線を
含む外接矩形を切出した後、垂直及び水平方向の射影を
もとに文字を切出すことを特徴とする文字切出し方法。
(1) In a method of cutting out characters from an image in which characters are written in an arbitrary frame, the frame coordinates are obtained by frame line recognition, and the upper, lower, left, and right frame lines are included for each frame obtained from the frame coordinates. A character cutting method characterized in that after cutting out a circumscribed rectangle, characters are cut out based on vertical and horizontal projections.
(2)上下左右の枠線を含む外接矩形での枠線の存在範
囲を求め、この範囲内で外接矩形から枠線の除去を行う
ことを特徴とする請求項(1)記載の文字切出し方法。
(2) The character cutting method according to claim (1), characterized in that the range in which the frame line exists in the circumscribed rectangle including the upper, lower, left, and right frame lines is determined, and the frame line is removed from the circumscribed rectangle within this range. .
(3)上記外接矩形からの枠線の除去を行った後に得ら
れる上下左右に余白を含む画像に対し、水平または垂直
方向の射影を求め、端から中心方向へ向って、文字を切
出す位置を決定することを特徴とする請求項(2)記載
の文字切出し方法。
(3) Find the horizontal or vertical projection of the image obtained after removing the frame line from the circumscribed rectangle, which includes margins on the top, bottom, left, and right sides, and position to cut out characters from the edge toward the center. 3. The character cutting method according to claim 2, further comprising determining the character segmentation method.
JP1250092A 1989-09-26 1989-09-26 Character segmenting method Pending JPH03111982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1250092A JPH03111982A (en) 1989-09-26 1989-09-26 Character segmenting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1250092A JPH03111982A (en) 1989-09-26 1989-09-26 Character segmenting method

Publications (1)

Publication Number Publication Date
JPH03111982A true JPH03111982A (en) 1991-05-13

Family

ID=17202698

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1250092A Pending JPH03111982A (en) 1989-09-26 1989-09-26 Character segmenting method

Country Status (1)

Country Link
JP (1) JPH03111982A (en)

Similar Documents

Publication Publication Date Title
JP3580670B2 (en) Method for associating input image with reference image, apparatus therefor, and storage medium storing program for implementing the method
JP2812982B2 (en) Table recognition method
JP2761467B2 (en) Image segmentation device and character recognition device
JP3378439B2 (en) Form image creation device
JP2868134B2 (en) Image processing method and apparatus
JPH03111982A (en) Character segmenting method
JP3311551B2 (en) Image data input processing method and apparatus
JP3095470B2 (en) Character recognition device
JP2003069807A (en) Image distortion correction device, image reading device, image forming device, and program
JPH03160582A (en) Method for separating ruled line and character in document picture data
JP4439054B2 (en) Character recognition device and character frame line detection method
JP7310151B2 (en) Mark selection device and image processing device
JPH05128305A (en) Area division method
JP2004088499A (en) Image distortion correction device, image reading device, image forming device, and program
JPH06215181A (en) Character/character string segmenting method and character recognizing device
JPH07120392B2 (en) Character pattern cutting device
JPH05303625A (en) Device for extracting white lines on road
JP3220481B2 (en) Manuscript blank area extraction method
JP2954218B2 (en) Image processing method and apparatus
US20050254728A1 (en) Automatic cutting method for digital images
JP3381803B2 (en) Tilt angle detector
JP2931041B2 (en) Character recognition method in table
CN120932244A (en) Image correction method and device
JPH04154368A (en) Area dividing system for document image
JP2004274704A (en) Image distortion correction device, image reading device, image forming device, and program