JP2843638B2 - Character image alignment method - Google Patents

Character image alignment method

Info

Publication number
JP2843638B2
JP2843638B2 JP7823190A JP7823190A JP2843638B2 JP 2843638 B2 JP2843638 B2 JP 2843638B2 JP 7823190 A JP7823190 A JP 7823190A JP 7823190 A JP7823190 A JP 7823190A JP 2843638 B2 JP2843638 B2 JP 2843638B2
Authority
JP
Japan
Prior art keywords
character image
character
output
line
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.)
Expired - Fee Related
Application number
JP7823190A
Other languages
Japanese (ja)
Other versions
JPH03278186A (en
Inventor
秀明 山形
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 JP7823190A priority Critical patent/JP2843638B2/en
Publication of JPH03278186A publication Critical patent/JPH03278186A/en
Application granted granted Critical
Publication of JP2843638B2 publication Critical patent/JP2843638B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は文字画像整列方法に係り、詳しくは、原稿上
の文字画像をスキャナにより読み取り、各文字画像を整
列して出力する装置において、各々の文字画像の出力位
置を可変とする方法に関する。
Description: TECHNICAL FIELD The present invention relates to a character image alignment method, and more particularly, to an apparatus for reading a character image on a document by a scanner and aligning and outputting each character image. A variable output position of the character image.

〔従来の技術〕[Conventional technology]

一般に画像処理では、スキャナにより読み込んだ文字
画像に対して、その傾きや大きさ等を整えて出力する方
法がとられる。この場合、従来はスキャナによって読み
取った文字画像の最下座標をベースラインに揃えるか、
あるいは中心線に揃えるかしていた。第6図(a)は、
第2図の原稿の2行目の文字列にについて、文字切出し
後、文字画像の最下座標をベースラインに揃えた場合の
出力文字列を示し、第6図(b)は同じく中心座標を揃
えた場合の出力文字列を示している。
Generally, in image processing, a method is employed in which a character image read by a scanner is output with its inclination, size, etc. adjusted. In this case, conventionally, the bottom coordinate of the character image read by the scanner is aligned with the baseline,
Or they were aligned with the center line. FIG. 6 (a)
FIG. 6B shows an output character string in the case where the bottom coordinate of the character image is aligned with the base line after extracting the character from the character string on the second line of the original in FIG. 2, and FIG. This shows the output character string when aligned.

なお、読み込んだ文字画像に対して、傾きや大きさ等
を整えて出力する場合の基本的な考え方は例えば特開昭
54−67425号公報に記載されている。
Note that the basic concept of outputting a read character image with the inclination, size, etc. adjusted is described in, for example,
No. 54-67425.

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

上記従来のスキャナによって読み取った文字画像の最
下座標をベースラインに揃えるか、あるいは中心線を揃
えるのみでは、拗音の“ゃ",“ょ",句読点
の“。",“、”、カギカッコの“「",“」”のように、
本来偏った位置(上,下)に印刷される文字、記号等が
極めて不自然に出力されてしまう問題があった。
Just aligning the bottom coordinate of the character image read by the above-mentioned conventional scanner with the base line or aligning the center line only requires the repetition of “ょ”, “ょ”, punctuation “.”, “,” And square brackets. ""","""like,
There is a problem that characters, symbols, and the like that are originally printed at skewed positions (upper and lower) are output very unnaturally.

本発明の目的は、文字画像を整列して出力する際に、
特定の文字(記号も含む)が不自然な位置に出力される
ことのない文字画像整列方法を提供することにある。
An object of the present invention is to arrange and output character images,
An object of the present invention is to provide a character image alignment method in which a specific character (including a symbol) is not output at an unnatural position.

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

上記目的を達成するために、本発明では、原稿上の文
字画像を読み取り、各文字画像を整列して出力する際、
各々の文字画像の出力位置を、当該文字画像の大きさお
よび原稿上での位置に基づいて決定することを基本とす
る。
To achieve the above object, according to the present invention, when reading a character image on a document and aligning and outputting each character image,
The output position of each character image is basically determined based on the size of the character image and the position on the document.

そして、請求項(1)は、文字中心線を基準として出
力位置を決定し、文字画像の小さいものほど基準中心線
から原画像での位置方向へのオフセットが大きくなるよ
うに当該文字画像の出力位置を定めることを特徴とす
る。
Claim 1 determines the output position based on the character center line, and outputs the character image such that the smaller the character image, the larger the offset from the reference center line to the position direction in the original image. It is characterized by determining the position.

また、請求項(2)は、行画像の上下の基準線を用
い、文字画像の大きさがある一定値より大きいものはそ
の最下座標が下基準線に接するように文字画像を出力
し、それ以外の文字画像については、原稿上での位置か
ら、文字画像上端が上基準線に接するように出力する、
文字画像中心が上下基準線の中心に一致するように出力
する、あるいは文字画像下端が下基準線に接するように
出力する、のいずれかを選択することを特徴とする。
Further, claim (2) uses the upper and lower reference lines of the line image, and outputs a character image such that the size of the character image is larger than a certain value so that its lowermost coordinate is in contact with the lower reference line; For other character images, output from the position on the document so that the upper end of the character image is in contact with the upper reference line.
It is characterized in that either output is performed so that the center of the character image matches the center of the upper and lower reference lines, or output is performed so that the lower end of the character image is in contact with the lower reference line.

〔作 用〕(Operation)

一般に小さい文字は、拗音の“ゃ",“ょ",“っ”句読
点の“。",“、”、カギカッコの“「",“」”などのよ
うに、偏った位置(上,下)に印字されることが多い。
また、それ以外の文字については、出来る限り原画像の
乱れを整列し、スキューや文字画像の上下への変動がな
いように出力することが好ましい。そこで、本発明にお
いては、出力位置を決定する際に、文字画像の大きさを
考慮に入れる。これにより、出来る限り原画像の乱れを
整列しつつ、“。”や“' "のように、本来偏った位置
に出力される文字が不自然な位置に出力されることを防
ぐことができる。
Generally, small characters are skewed (up, down), such as “拗”, ““ ”,“ tsu ”,“. ”,“, ”In punctuation, and“ ”,“ ”in square brackets. Often printed on
For other characters, it is preferable to arrange the disturbances of the original image as much as possible and output the characters without skew or vertical fluctuation of the character image. Thus, in the present invention, when determining the output position, the size of the character image is taken into consideration. This makes it possible to prevent characters that are originally output at skewed positions, such as “.” And “′”, from being output at unnatural positions, while aligning disturbances in the original image as much as possible.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面により説明す
る。第1図は本発明の一実施例の構成図を示す。スキャ
ナ11は原稿をスキャンし、電気信号として文字画像を読
み取る。行切出し部12は、スキャナ11によって読み取ら
れた文字画像を1行分ずつ切り出し、整列の際に基準と
なる座標を決定する。文字切出し部13は、1行分の文字
画像について、順次、1文字分の文字画像を切り出す。
文字画像サイズ検出部14は、切り出された文字画像の大
きさを検出する。文字画像配列決定部15は、切り出され
た文字画像の出力位置を、該文字画像の大きさおよび原
稿上の位置に基づいて決定する。整列画像出力部16は、
文字画像配列部15で決定された位置に、正規化された文
字画像を配置し出力する。文字画像サイズ検出部14、文
字画像配列決定部15及び整列画像出力部16での処理は、
行切出し部12、文字切出し部13で切出された原稿の各
行、各行内の文字数分繰返される。以下に、請求項
(1)及び(2)に対応する各実施例について、具体例
で詳述する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration diagram of an embodiment of the present invention. The scanner 11 scans a document and reads a character image as an electric signal. The line cutout unit 12 cuts out the character image read by the scanner 11 one line at a time, and determines coordinates serving as a reference at the time of alignment. The character extracting unit 13 sequentially extracts one character image from one line of character image.
The character image size detection unit 14 detects the size of the cut-out character image. The character image arrangement determining unit 15 determines the output position of the cut-out character image based on the size of the character image and the position on the document. The aligned image output unit 16
The normalized character image is arranged and output at the position determined by the character image array unit 15. The processing in the character image size detection unit 14, the character image arrangement determination unit 15, and the aligned image output unit 16,
Each line of the original document extracted by the line extracting unit 12 and the character extracting unit 13 is repeated by the number of characters in each line. Hereinafter, each embodiment corresponding to claims (1) and (2) will be described in detail with specific examples.

実施例1 原稿としては第2図に示すものを想定する。本実施例
では文字中心線を基準として文字出力位置を決定するた
め、行切出し部12では、1行の画像を切り出し、該切り
出した行画像の上端と下端の中心を基準線として文字切
出し部13に送る。行切出しには一般的にX方向の射影を
用いるが、切出し方法としてはいかなる方法を用いても
かまわない。また、基準となる中心線も、例えば行内で
最も高い文字の中心座標を用いるなど、他の適当な方法
を用いてもかまわない。第2図に示した原稿の2行目に
ついて行切出しされた文字画像列を第3図に示す。第3
図中、30は文字“1"の高さ、−13は句点“。”の基準線
(中心線)からのオフセット、+11は記号“「”の同じ
くオフセットを表わしている。
Example 1 A document shown in FIG. 2 is assumed. In the present embodiment, in order to determine the character output position based on the character center line, the line cutout unit 12 cuts out one line of the image, and the character cutout unit 13 with the center of the upper end and the lower end of the cut out line image as the reference line. Send to In general, projection in the X direction is used for line extraction, but any method may be used as an extraction method. Further, as the reference center line, another appropriate method may be used, for example, using the center coordinates of the highest character in the line. FIG. 3 shows a character image string extracted from the second line of the original shown in FIG. Third
In the figure, 30 is the height of the character "1", -13 is the offset of the period "." From the reference line (center line), and +11 is the same offset of the symbol "".

文字切出し部13では、行切出しされた文字画像列から
1文字分の文字画像を切出し、文字画像サイズ検出部14
に送る。文字切出し方法としては、行内でY軸方向の射
影を用いて切り出す方法が一般的であるが、他のいかな
る方法を用いてもかわない。
The character extracting unit 13 extracts a character image for one character from the character image string extracted from the line, and outputs a character image size detecting unit 14.
Send to As a method of extracting characters, a method of extracting characters using projection in the Y-axis direction in a line is generally used, but any other method may be used.

文字画像サイズ検出部14では、切出された文字画像の
高さHを求め、該文字画像高さHを文字サイズSとして
文字画像配列決定部15に送る。本実施例においては、文
字画像高さを文字サイズとして用いたが、これは、例え
ば文字画像外接矩形の面積など他の適当なパラメータを
用いても構わない。
The character image size detection unit 14 calculates the height H of the extracted character image, and sends the character image height H to the character image arrangement determination unit 15 as the character size S. In the present embodiment, the character image height is used as the character size. However, other appropriate parameters such as the area of the circumscribed rectangle of the character image may be used.

文字画像配列決定部15においては、原稿中での基準線
(中心線)からのオフセットをfとする時、例えば以下
の式によって出力位置の基準線からのオフセットFを求
める。
When the offset from the reference line (center line) in the document is f, the character image arrangement determining unit 15 obtains the offset F of the output position from the reference line by the following formula, for example.

F=(f・α)/S (1) 上記式(1)はFを求める方法の一例であり、他に小
さい文字ほどFが大きくなるような適当な変換式を用い
ても構わない。第2図の原稿の2行目に関して式(1)
を用いた場合の各文字画像の出力位置を示すと、第1表
のようになる。なお、第1表では後編の“方法につい
て。”は省略してある。
F = (f · α) / S (1) The above equation (1) is an example of a method for obtaining F, and an appropriate conversion equation may be used such that F becomes larger as the character becomes smaller. Equation (1) for the second line of the original in FIG.
Table 1 shows the output position of each character image in the case of using. In Table 1, "Method" in the latter part is omitted.

整列画像出力部16では、文字画像配列決定部15で決定
された位置に文字画像を配置して出力する。第2図の2
行目の各切出し文字について、第1表のオフセットFに
従って整列させると、第4図のようになる。
The aligned image output unit 16 arranges and outputs the character images at the positions determined by the character image arrangement determining unit 15. 2 in FIG.
FIG. 4 shows the arrangement of the cut-out characters on the line according to the offset F in Table 1.

実施例2 ここでも原稿としては第2図に示すものを想定し、実
施例1と異なる部分のみについて説明する。本実施例で
は行ごとに上下基準線を用いるため、行切出し部12で
は、1行の画像を切り出し、該切り出した行画像の上端
と下端の座標をそれぞれ上下基準線として文字切出し部
13に送る。上下基準線は、例えば行内で最も高い文字の
上下座標を用いるなど、他の適当な方法を用いて設定し
てもよい。
Embodiment 2 Here, as shown in FIG. 2, the manuscript is assumed to be a manuscript, and only portions different from those in Embodiment 1 will be described. In the present embodiment, since the upper and lower reference lines are used for each line, the line cutout unit 12 cuts out an image of one line and sets the coordinates of the upper end and the lower end of the cut line image as the upper and lower reference lines, respectively.
Send to 13. The upper and lower reference lines may be set using other suitable methods, such as using the upper and lower coordinates of the highest character in the line.

文字画像サイズ検出部14では、切出された文字画像の
高さHを求め、該文字画像高さHを文字サイズとして文
字画像配列決定部15に送る。本実施例においては、文字
画像高さを文字サイズとして用いているが、これは例え
ば文字画像外接矩形の面積など他の適当なパラメータを
用いても構わない。
The character image size detection unit 14 obtains the height H of the cut-out character image, and sends the character image height H to the character image arrangement determination unit 15 as a character size. In this embodiment, the character image height is used as the character size, but other appropriate parameters such as the area of the circumscribed rectangle of the character image may be used.

文字画像配列決定部15においては、次の処理により、
文字画像の出力位置を決定する。
In the character image arrangement determining unit 15, by the following processing,
Determine the output position of the character image.

文字画像の高さがしきい値Tよりも大きい場合に
は、文字画像の下端を、下基準線に揃えるように出力す
る。
If the height of the character image is larger than the threshold value T, the output is performed so that the lower end of the character image is aligned with the lower reference line.

文字画像の高さがしきい値Tよりも小さく、文字画
像のオフセットが+tよりも大きい場合には、文字画像
の上端を上基準線に揃える。
If the height of the character image is smaller than the threshold value T and the offset of the character image is larger than + t, the upper end of the character image is aligned with the upper reference line.

文字画像の高さがしきい値Tよりも小さく、文字画
像のオフセットが−tよりも小さい場合には、文字画像
の下端を下基準線に揃える。
If the height of the character image is smaller than the threshold value T and the offset of the character image is smaller than -t, the lower end of the character image is aligned with the lower reference line.

〜以外の場合には、文字画像の中心を、上基準
線とした基準線の中心に合わせる。
In other cases, the center of the character image is aligned with the center of the upper reference line.

第2図に示した原稿の2行目に関して本実施例を用い
た場合の各文字画像の出力位置決定例を示すと、第2表
のようになる。
Table 2 shows an example of determining the output position of each character image when the present embodiment is used for the second line of the original shown in FIG.

整列画像出力部16では、文字画像配列決定部15で決定
された位置〜のいずれかに文字画像を配置して出力
する。第2図の2行目の各切出し文字について、第2表
に従って整列させると、第5図のようになる。
The aligned image output unit 16 arranges and outputs the character images at any of the positions to determined by the character image arrangement determining unit 15. If each cut-out character on the second line in FIG. 2 is aligned according to Table 2, the result is as shown in FIG.

〔発明の効果〕〔The invention's effect〕

以上の説明から明らかなように、本発明によれば、原
稿上の文字画像をスキャナにより読み取り、行切出し、
文字切出しなどを行い、各文字画像を整列して出力する
際、原画像の乱れを整列しつつ、本来偏った位置にある
特定の文字が不自然な位置に出力されるのを防止するこ
とができる。
As is apparent from the above description, according to the present invention, a character image on a document is read by a scanner, line cutout,
When performing character segmentation and arranging each character image for output, it is possible to prevent specific characters that are originally skewed from being output to unnatural positions while aligning the disorder of the original image. it can.

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

第1図は本発明方法を達成する一実施例の構成図、第2
図は原稿の一例を示す図、第3図は切り出された行画像
を示す図、第4図及び第5図は本発明による出力画像例
を示す図、第6図は従来の出力画像例を示す図である。 11……スキャナ、12……行切出し部、 13……文字切出し部、 14……文字画像サイズ検出部、 15……文字画像配列決定部、 16……文字画像出力部。
FIG. 1 is a block diagram of an embodiment for achieving the method of the present invention, and FIG.
FIG. 3 shows an example of a document, FIG. 3 shows a cut-out line image, FIGS. 4 and 5 show examples of an output image according to the present invention, and FIG. 6 shows an example of a conventional output image. FIG. 11 ... scanner, 12 ... line cutout section, 13 ... character cutout section, 14 ... character image size detection section, 15 ... character image arrangement determination section, 16 ... character image output section.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】原稿上の文字画像を読み取り、各文字画像
を整列して出力する装置において、各々の文字画像の出
力位置を、当該文字画像の大きさおよび原稿上での位置
に基づいて決定する文字画像整列方法であって、 文字中心線を基準として出力位置を決定し、文字画像の
小さいものほど基準中心線から原画像での位置方向への
オフセットが大きくなるように当該文字画像の出力位置
を定めることを特徴とする文字画像整列方法。
An apparatus for reading a character image on a document and arranging and outputting each character image determines an output position of each character image based on a size of the character image and a position on the document. A character image alignment method that determines an output position based on a character center line, and outputs the character image such that a smaller character image has a greater offset from the reference center line in the position direction in the original image. A character image alignment method characterized by determining a position.
【請求項2】原稿上の文字画像を読み取り、各文字画像
を整列して出力する装置において、各々の文字画像の出
力位置を、当該文字画像の大きさおよび原稿上での位置
に基づいて決定する文字画像整列方法であって、 行画像の上下の基準線を用い、文字画像の大きさがある
一定値より大きいものはその最下座標が下基準線に接す
るように文字画像を出力し、それ以外の文字画像につい
ては、原稿上での位置から、文字画像上端が上基準線に
接するように出力する、文字画像中心が上下基準線の中
心に一致するように出力する、あるいは文字画像下端が
下基準線に接するように出力する、のいずれかを選択す
ることを特徴とする文字画像整列方法。
2. An apparatus for reading a character image on a document and arranging and outputting each character image, wherein an output position of each character image is determined based on a size of the character image and a position on the document. Character image alignment method, using the upper and lower reference lines of the line image, if the size of the character image is larger than a certain value, output the character image so that the bottom coordinate is in contact with the lower reference line, For other character images, output from the position on the document so that the upper end of the character image is in contact with the upper reference line, output so that the center of the character image matches the center of the upper and lower reference lines, or output the lower end of the character image. Is output so as to be in contact with the lower reference line.
JP7823190A 1990-03-27 1990-03-27 Character image alignment method Expired - Fee Related JP2843638B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7823190A JP2843638B2 (en) 1990-03-27 1990-03-27 Character image alignment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7823190A JP2843638B2 (en) 1990-03-27 1990-03-27 Character image alignment method

Publications (2)

Publication Number Publication Date
JPH03278186A JPH03278186A (en) 1991-12-09
JP2843638B2 true JP2843638B2 (en) 1999-01-06

Family

ID=13656273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7823190A Expired - Fee Related JP2843638B2 (en) 1990-03-27 1990-03-27 Character image alignment method

Country Status (1)

Country Link
JP (1) JP2843638B2 (en)

Also Published As

Publication number Publication date
JPH03278186A (en) 1991-12-09

Similar Documents

Publication Publication Date Title
US7697776B2 (en) Model-based dewarping method and apparatus
JP2812982B2 (en) Table recognition method
JP6200040B1 (en) Image processing apparatus, image processing method, and program
US7965293B2 (en) Image processing device, image processing method, and image processing program for reconstructing data
JP2843638B2 (en) Character image alignment method
Lehal et al. A range free skew detection technique for digitized Gurmukhi script documents
US8533590B2 (en) Information processing apparatus and layout processing method
JP2005354654A (en) Photographic image area extraction apparatus and copying machine
JP4281236B2 (en) Image recognition apparatus, image recognition method, and computer-readable recording medium storing image recognition program
JPS6325391B2 (en)
JP3604909B2 (en) Image registration method
JPH0373915B2 (en)
JP2000113106A (en) Document image processor
JPH04352295A (en) System and device for identifing character string direction
JPS61175875A (en) Document reading device
JP3122476B2 (en) Automatic document copy machine
JPH05151388A (en) Designating system for processing area and processing condition
JPS6254380A (en) Character recognizing device
JPS6327751B2 (en)
JP2007280346A (en) Image processor, image direction determining method, and image direction determining program
JPH0250513B2 (en)
JP3400154B2 (en) Document image area extraction method and apparatus
JPS62200486A (en) Character reader
JPH103517A (en) Device for detecting tilt angle of document picture
JPS60254284A (en) Character recognizer

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees