JP2963465B2 - Space detection method - Google Patents

Space detection method

Info

Publication number
JP2963465B2
JP2963465B2 JP1161176A JP16117689A JP2963465B2 JP 2963465 B2 JP2963465 B2 JP 2963465B2 JP 1161176 A JP1161176 A JP 1161176A JP 16117689 A JP16117689 A JP 16117689A JP 2963465 B2 JP2963465 B2 JP 2963465B2
Authority
JP
Japan
Prior art keywords
pitch
character
space
document
characters
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
JP1161176A
Other languages
Japanese (ja)
Other versions
JPH0325693A (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 JP1161176A priority Critical patent/JP2963465B2/en
Publication of JPH0325693A publication Critical patent/JPH0325693A/en
Application granted granted Critical
Publication of JP2963465B2 publication Critical patent/JP2963465B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Character Discrimination (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、文字認識装置において文字行上のスペース
(文字間余白ではなく、スペースコードを割り当てるべ
きスペース文字のこと。以下同様)の検出方法に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a method of detecting a space on a character line (not a space between characters but a space character to which a space code is to be assigned. The same applies hereinafter) in a character recognition device. About.

〔従来の技術〕[Conventional technology]

従来、文字認識装置におけるスペース検出方式として
は次の方式がある。
2. Description of the Related Art Conventionally, there is the following method as a space detection method in a character recognition device.

一つは、原稿の印字ピッチを予め定数として、あるい
は文字高さに対する比等として与えておき、この与えら
れたピッチと、スペース検出の対象となっている文字間
のピッチを比較することによって、文字間にスペースが
存在するか否かを判断する方式である。
One is that the printing pitch of the document is given in advance as a constant or as a ratio to the character height, and by comparing the given pitch with the pitch between characters that are subject to space detection, This method determines whether there is a space between characters.

もう一つは、行内の文字間余白幅のヒストグラムをと
り、その谷となる部分を閾値とし、文字間余白幅がこの
閾値より広いときにスペースを設定する方式である。
The other is a method of taking a histogram of the margin width between characters in a line, setting a valley portion as a threshold, and setting a space when the margin width between characters is wider than this threshold.

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

前の方式では、文字の幅によってピッチが変化するプ
ロポーショナルピッチ印字(以下ではプロポーショナル
印字と略称する)原稿の場合にスペースを検出できない
ことがある。例えばプロポーショナル印字原稿では、文
字幅の狭い文字間のスペースは、それが存在しても存在
しないときのピッチに比べそれほど広くならないので、
検出を失敗することが多い。
In the former method, a space may not be detected in the case of a proportional pitch printing (hereinafter, abbreviated as proportional printing) document in which the pitch changes depending on the character width. For example, in a proportional print manuscript, the space between characters with narrow character widths is not so large compared to the pitch when they do not exist,
Detection often fails.

後の方式は、定ピッチ印字原稿に対してうまく動作し
ない。
The latter scheme does not work well for fixed pitch printed originals.

よって本発明の目的は、原稿の印字モード(定ピッチ
印字/プロポーショナル印字)の別を予め指定せずに、
いずれの印字モードの原稿の対しても正確なスペース検
出が可能なスペース検出方法を提供することにある。
Therefore, an object of the present invention is to specify a printing mode (fixed pitch printing / proportional printing) of a document without specifying in advance.
An object of the present invention is to provide a space detection method capable of accurately detecting a space for a document in any print mode.

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

本発明は、原稿より測定したピッチの分布から、ピッ
チの最大値と最小値の比または差をとり、この比または
差により原稿モード(定ピッチ印字/プロポーショナル
印字)を判定し、定ピッチ印字と判定した場合は、P
(注目する現在文字と前の文字とのピッチ)とSW(標準
文字幅)の比によりスペースを検出し、プロポーショナ
ル印字と判定した場合は、MS(注目する現在文字とその
前の文字との間の文字間余白幅)とSWの比によりスペー
スを検出することを特徴とする。なお、SWはMP(1行内
の垂直射影の最大値)×α(所定の定数)で定義され
る。
The present invention takes the ratio or difference between the maximum value and the minimum value of the pitch from the pitch distribution measured from the document, determines the document mode (constant pitch printing / proportional printing) based on the ratio or difference, If judged, P
Space is detected based on the ratio of (the pitch between the current character of interest and the previous character) and SW (standard character width). If proportional printing is determined, MS (between the current character of interest and the previous character) The space is detected based on the ratio between the width of the character and the SW. SW is defined by MP (maximum value of vertical projection in one row) × α (predetermined constant).

定ピッチ印字かプロポーショナル印字かのモード判定
は、ピッチの分布から、ピッチの最大値と最小値の比ま
たは差が小の場合、定ピッチ印字と判定し、大の場合、
プロポーショナル印字と判定する。
The mode determination of constant pitch printing or proportional printing is based on the distribution of pitches.If the ratio or difference between the maximum value and the minimum value of the pitch is small, it is determined to be constant pitch printing.
Judge as proportional printing.

〔作 用〕(Operation)

一般的に、定ピッチ印字原稿とプロポーショナル印字
原稿について、それぞれ第2図と第3図に示すようなモ
デルを設定することができる。すなわち、第2図に示す
ように、定ピッチ印字原稿ではピッチは一定であるが、
文字間余白幅はその前後の文字の幅によって変化する。
他方、第3図に示すように、プロポーショナル印字原稿
では文字間余白幅は一定であるが、ピッチは前後の文字
の幅によって変化する。
Generally, models such as those shown in FIGS. 2 and 3 can be set for a fixed-pitch print original and a proportional print original, respectively. That is, as shown in FIG. 2, the pitch is constant in a fixed-pitch printing document,
The margin width between characters changes depending on the width of characters before and after the margin.
On the other hand, as shown in FIG. 3, in a proportionally printed original, the margin between characters is constant, but the pitch varies depending on the width of the preceding and following characters.

したがって、原稿の印字モードに不適当な方法でスペ
ース検出を行うと、第4図と第5図に例を示すように、
検出誤りが起こってしまうことは明らかである。すなわ
ち、第4図に示すように、定ピッチ原稿において、幅の
狭い文字の間の余白部分は広くなっているので、プロポ
ーショナル印字の原稿として扱うと、その文字間余白の
部分を誤ってスペースとして検出してしまう。逆に第5
図に示すように、プロポーショナル印字原稿において、
幅の狭い文字に挟まれたスペースは、その前後の文字間
ピッチが間にスペースが存在しない場合とあまり変わら
ないため、定ピッチ印字の原稿として扱うと検出できな
い。
Therefore, if space detection is performed by a method that is inappropriate for the original print mode, as shown in FIGS. 4 and 5,
Obviously, a detection error will occur. That is, as shown in FIG. 4, in a fixed-pitch document, the margin between narrow characters is widened. Therefore, when the document is treated as a proportional print document, the margin between characters is erroneously regarded as a space. Will be detected. Conversely the fifth
As shown in the figure, in a proportionally printed original,
A space between characters having a small width cannot be detected when handled as a fixed-pitch printing document because the pitch between the characters before and after the space is not much different from the case where there is no space between the characters.

このように、原稿の印字モードによってスペース検出
の方法を適切に切り替える必要があることが分かる。
As described above, it is understood that it is necessary to appropriately switch the space detection method depending on the document print mode.

本発明によれば前述の如く、定ピッチ印字原稿と判定
した場合にピッチを利用したスペース検出方法とし、他
方、プロポーショナル印字原稿と判定した場合に文字間
余白幅を利用したスペース検出方法とするが、これらの
スペース検出方法はそれぞれの印字モードに適した方法
であることはここまでの説明から明らかである。
According to the present invention, as described above, a space detection method using a pitch when a document is determined to be a fixed-pitch print document, and a space detection method using a margin between characters when a document is determined to be a proportional print document. It is apparent from the above description that these space detection methods are methods suitable for each print mode.

ここで、定ピッチ印字原稿とプロポーショナル印字原
稿について、ピッチと文字間余白幅の分布を考える。
Here, the distribution of the pitch and the margin width between characters will be considered for a fixed-pitch print original and a proportional print original.

定ピッチ印字の原稿の場合、第2図からも明らかなよ
うにピッチは一定であるので、ピッチのヒストグラムは
第6図のようになる。最初のピークが本来のピッチに対
応し、2番目のピークは間にスペース1文字がある文字
間のピッチに対応し、3番目のピークは間にスペース2
文字がある文字間のピッチに対応する。文字間余白幅は
前後の文字の幅によって変動するので、そのヒストグラ
ムは第7図のようになる。
In the case of a document printed at a constant pitch, the pitch is constant as is clear from FIG. 2, and the pitch histogram is as shown in FIG. The first peak corresponds to the original pitch, the second peak corresponds to the pitch between characters with one space between them, and the third peak corresponds to the space between two characters.
Letters correspond to the pitch between letters. Since the margin width between characters varies depending on the width of the characters before and after, the histogram is as shown in FIG.

プロポーショナル印字の原稿の場合、第3図からも明
らかなように、ピッチは文字の幅によってかなり変動す
るので、ピッチのヒストグラムは第8図のようになる。
文字間余白幅は、間にスペースがあるときと無いときで
2極化するので、文字間余白幅のヒストグラムは第9図
のようになる。
In the case of a proportionally printed original, as is clear from FIG. 3, since the pitch varies considerably depending on the width of the character, the pitch histogram is as shown in FIG.
Since the inter-character margin width is polarized when there is a space between the characters and when there is no space therebetween, the histogram of the inter-character margin width is as shown in FIG.

さて、本発明は前述のようにピッチの分布から原稿の
印字モードを判定する。ここで定ピッチ印字原稿で文字
間にスペースが存在しない場合にとり得るピッチ範囲だ
けを考えると、定ピッチ印字原稿のピッチのヒストグラ
ムは第10図のように表され、プロポーショナル印字原稿
のピッチのヒストグラムは第11図のように表され、それ
ぞれの分布が大きく異なることが分かる。したがって、
本発明によれば、原稿の印字モードを確実に判定するこ
とができる。具体的な判定方法としては、両ヒストグラ
ムを比較すれば明らかなように、ピッチ検索範囲内につ
いてピッチを測定すると、ピッチの最大値と最小値の比
または差は、定ピッチ印字原稿では小さいが、プロポー
ショナル印字原稿では大きいので、その比または差を所
定の閾値値と比較する方法が可能である。
According to the present invention, the print mode of the document is determined from the pitch distribution as described above. Considering only the possible pitch range when there is no space between characters in a fixed-pitch printed document, the pitch histogram of the fixed-pitch printed document is shown in FIG. 10, and the pitch histogram of the proportional-printed document is As shown in FIG. 11, it can be seen that the respective distributions are significantly different. Therefore,
According to the present invention, it is possible to reliably determine the print mode of a document. As a specific determination method, as is clear from comparison between the two histograms, when the pitch is measured within the pitch search range, the ratio or difference between the maximum value and the minimum value of the pitch is small in a fixed-pitch print document, Since a proportionally printed original is large, a method of comparing the ratio or difference with a predetermined threshold value is possible.

かくして、本発明によれば、原稿の印字モードを予め
指定しなくとも、原稿の印字モードに適したスペース検
出方法により正確なスペース検出を行うことができる。
また定ピッチ印字原稿の場合、測定したピッチを利用し
てスペース検出を行うので、異なったピッチの原稿に自
動的に対応して適切なスペース検出が可能である。
Thus, according to the present invention, accurate space detection can be performed by a space detection method suitable for the print mode of the document without previously specifying the print mode of the document.
In the case of a fixed-pitch print document, space detection is performed using the measured pitch, so that appropriate space detection can be automatically performed for documents of different pitches.

〔実施例〕〔Example〕

以下、図面を用い本発明の実施例について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

実施例1 処理全体のフローを第12図に示す。まず注目する一つ
の行における垂直射影の最大値MPが求められる(処理10
0)。このMPは行内の文字高さの目安となる。
Example 1 FIG. 12 shows a flow of the entire processing. First, the maximum value MP of the vertical projection in one line of interest is obtained (Process 10
0). This MP is a measure of the character height in a line.

スペース計算における文字幅の目安となる標準文字幅
SWが、MPと所定の定数αを用い(1)式により計算され
る(処理102)。
Standard character width as a guide for character width in space calculation
SW is calculated by equation (1) using MP and a predetermined constant α (process 102).

SW=α×MP (1) 変数の初期設定(処理104)の後、定ピッチ印字原稿
ではスペースが存在しないと考えられるピッチ検索範囲
(ここでは2×SWを越えない範囲)においてピッチのデ
ータが順次とられる(処理106から処理114)。
SW = α × MP (1) After the initial setting of the variable (process 104), the pitch data in the pitch search range (in this case, the range not exceeding 2 × SW) is considered to have no space in the fixed-pitch print document. The processing is sequentially performed (processing 106 to processing 114).

現在注目している一つの文字についてのピッチPの測
定の処理106の詳細フローを第13図に示す。ピッチは次
式 P=(CME+CMS−OME−OMS)/2 (2) により計算されるが、CMSとCMEはそれぞれ第14図に示す
ように現在文字の開始位置(左端)と終了位置(右端)
であり、これは垂直射影のデータより検出される。ま
た、OMSとOMEは第14図に示すように現在文字の前の文字
の開始位置と終了位置で、実際には第13図から明らかな
ように、一つ前の文字について得られたCMSとCMEの値が
用いられる。
FIG. 13 shows a detailed flow of the processing 106 for measuring the pitch P of one character of current interest. The pitch is calculated by the following equation: P = (CME + CMS-OME-OMS) / 2 (2), where CMS and CME are the start position (left end) and end position (right end) of the current character, respectively, as shown in FIG.
Which is detected from the data of the vertical projection. Also, OMS and OME are the start position and end position of the character before the current character as shown in FIG. 14, and in fact, as is clear from FIG. 13, the CMS obtained for the immediately preceding character is The value of CME is used.

このようにして測定されたピッチPが標準文字幅SWの
2倍を越えたときは(ピッチ検索範囲を越えたとき)
は、そのピッチPは無効とされる(処理108)。2×SW
未満のピッチPは有効とされ、これを用いて行内のピッ
チの最大値PMAXまたは最小値PMINの必要な更新が行われ
る(処理110から処理116)。なお、PMAX,PMINはそれぞ
れ第10図および第11図に示したピッチの最大値、最小値
に対応することは明らかである。
When the pitch P measured in this way exceeds twice the standard character width SW (when it exceeds the pitch search range)
, The pitch P is invalidated (process 108). 2 x SW
A pitch P less than is considered valid and is used to perform the necessary update of the maximum value PMAX or the minimum value PMIN of the pitch in the row (steps 110 to 116). It is clear that PMAX and PMIN correspond to the maximum value and the minimum value of the pitch shown in FIGS. 10 and 11, respectively.

処理106から処理116の処理が注目行内の最後の文字ま
で実行されると、PMAXとPMINの比を所定の閾値TH1と比
較することにより、注目行の印字モードを判定する(処
理118)。第10図、10に関連した説明から明らかなよう
に、この印字モード判定結果は、比が小さいときに定ピ
ッチ印字、比が大きいときにプロポーショナル印字とな
る。なお、PMAXとPMINの比の代わりに差を用いて同様の
判定が可能であることは前述の通りである。
When the processes 106 to 116 are executed up to the last character in the line of interest, the print mode of the line of interest is determined by comparing the ratio between PMAX and PMIN with a predetermined threshold TH1 (process 118). As is clear from the description related to FIGS. 10 and 10, the print mode determination result is constant pitch printing when the ratio is small and proportional printing when the ratio is large. Note that the same determination can be made using a difference instead of the ratio between PMAX and PMIN, as described above.

印字モードが定ピッチ印字と判定されたときはピッチ
を利用したスペース検出が行われ(処理120)、プロポ
ーショナル印字と判定されたときは文字間余白幅を利用
したカペース検出が行われる(処理122)。
When the printing mode is determined to be constant pitch printing, space detection using the pitch is performed (process 120), and when the printing mode is determined to be proportional printing, the space detection using the margin between characters is performed (process 122). .

定ピッチ印字のスペース検出の処理120の詳細フロー
を第15図に示す。この処理においては、 TP=(PMAX+PMIN)/2 (3) β=TP/SW (4) を計算する。
FIG. 15 shows a detailed flow of the processing 120 for space detection for constant pitch printing. In this processing, TP = (PMAX + PMIN) / 2 (3) β = TP / SW (4) is calculated.

次に、注目する現在文字についてのピッチPを測定
し、 S=β×(P/TP)−1 (5) を計算する。そして、現在文字の前にS個のスペースコ
ードを設定する。すなわち、現在文字とその前の文字の
間にS個(S文字分)のスペースを検出する。これを行
内の最後の文字まで1文字ずつ繰り返す。
Next, the pitch P of the current character of interest is measured, and S = β × (P / TP) −1 (5) is calculated. Then, S space codes are set before the current character. That is, S (S characters) spaces are detected between the current character and the preceding character. This is repeated one character at a time until the last character in the line.

なお、ここでのピッチPの測定処理の内容は第13図に
示す通りである。
The details of the pitch P measurement process here are as shown in FIG.

プロポーショナル印字のスペース検出の処理122の詳
細フローを第16図に示す。この処理においては、注目す
る現在文字とその前の文字との間の文字間余白幅 MS=CMS−OME (6) を計算し、スペース数 S=MS/SW (7) を計算する。CMS,OMEは第14図に示す位置であり、SWは
標準文字幅である。
FIG. 16 shows a detailed flow of the process 122 for space detection of proportional printing. In this process, the inter-character space width MS = CMS-OME (6) between the current character of interest and the preceding character is calculated, and the number of spaces S = MS / SW (7) is calculated. CMS and OME are the positions shown in FIG. 14, and SW is the standard character width.

そして、現在文字の前にS個のスペースコードを設定
する。
Then, S space codes are set before the current character.

同様の処理を行内の最後の文字まで1文字ずつ繰り返
す。
The same processing is repeated one character at a time until the last character in the line.

実施例2 処理全体のフローは実施例1と同様であり、第12図で
示すことができる。
Embodiment 2 The flow of the entire process is the same as that of Embodiment 1, and can be shown in FIG.

本実施例と実施例1との違いは、印字モード判定のた
めのピッチ測定処理(第12図の処理106)において、現
在文字またはその前の文字の文字幅がある閾値よりも大
きいときに(このように幅が広い文字は2以上の文字が
接続したものである可能性が高い)、そのピッチ測定を
行わないことである(実際には処理108で排除されるよ
うなピッチのデータを測定する)。
The difference between the present embodiment and the first embodiment is that when the character width of the current character or the character before it is larger than a certain threshold in the pitch measurement process for determining the print mode (process 106 in FIG. 12). Such a wide character is likely to be a combination of two or more characters. That is, the pitch measurement is not performed (actually, pitch data that is excluded in the process 108 is measured). Do).

このピッチ測定処理の詳細フローを第17図に示す。こ
の図より明らかなように、文字の接続の可能性を判定す
るための閾値として標準文字幅SWの2倍の値を用い、文
字幅が2×SWを越えたときにピッチP=2×SWに設定す
るので、PMAX,PMINの更新に利用されない。
FIG. 17 shows a detailed flow of the pitch measurement processing. As is apparent from this figure, a value twice as large as the standard character width SW is used as a threshold for determining the possibility of character connection, and the pitch P = 2 × SW when the character width exceeds 2 × SW. Is not used for updating PMAX and PMIN.

このような文字幅のチェックの導入により、接続文字
が存在する行における文字モード判定の安定性が向上す
る。
By introducing such a character width check, the stability of character mode determination in a line where a connected character exists is improved.

他の処理の内容は実施例1と同一である。 The other processing contents are the same as in the first embodiment.

実施例3 処理全体のフローは実施例2に同様であり、第12図の
ように示すことができる。
Embodiment 3 The flow of the entire process is the same as that of Embodiment 2, and can be shown as in FIG.

本実施例と実施例2との違いは、定ピッチのスペース
検出処理(第12図の処理120)におけるピッチ測定の際
に、現在文字またはその前の文字の文字幅がある閾値よ
り広い場合に、文字幅を適当な値に変更し、その後にピ
ッチ測定を行うことにより、接続文字の部分でのピッチ
測定の正確度を上げることである。
The difference between the present embodiment and the second embodiment is that when the pitch measurement is performed in the constant pitch space detection process (process 120 in FIG. 12), the character width of the current character or the preceding character is wider than a certain threshold. By changing the character width to an appropriate value and then performing pitch measurement, the accuracy of the pitch measurement at the connected character portion is increased.

このスペース検出処理の全体フローは第15図のように
示されるが、この処理中のピッチ測定の詳細フローは第
18図に示す如くである。このフローチャートから明らか
なように、ここでは、文字幅チェックの閾値として標準
文字幅の2倍値を用い、文字幅が該閾値を越えたときに
は、その文字幅をSWに設定してピッチを計算する。
The overall flow of this space detection process is shown in FIG. 15, but the detailed flow of pitch measurement during this process is shown in FIG.
As shown in FIG. As is apparent from this flowchart, here, a double value of the standard character width is used as a threshold for character width check, and when the character width exceeds the threshold, the character width is set to SW and the pitch is calculated. .

この文字幅修正の様子を第19図に示す。他の処理の内
容は実施例2と同一である。
This character width correction is shown in FIG. The other processing contents are the same as in the second embodiment.

実施例4 処理全体のフローは実施例3と同様で、第12図のよう
に示すことができる。
Embodiment 4 The flow of the entire process is the same as that of Embodiment 3, and can be shown as in FIG.

本実施例と実施例3との違いは、印字モード判定のた
めのピッチ測定(第12図の処理106)において測定した
ピッチを保存し、定ピッチ印字と判定された場合に、ス
ペース検出(第12図の処理120)の際に保存されている
ピッチを利用することである。
The difference between the present embodiment and the third embodiment is that the pitch measured in the pitch measurement for the print mode determination (process 106 in FIG. 12) is stored, and when it is determined that the printing is at the constant pitch, the space detection (the That is, the pitch stored in the process 120) in FIG. 12 is used.

印字モード判定のためのピッチ測定の詳細フローは第
20図のように示される。ここで、MP[I]が保存された
ピッチである。また、実施例3で説明したと同様の文字
幅の修正も行われる。なお、この文字幅修正が必要とな
った部分のピッチPのデータにはCH=2×SWを加えるこ
とにより、PMAX,PMINの更新に利用されないようにして
いる。
The detailed flow of pitch measurement for print mode determination
It is shown as in Figure 20. Here, MP [I] is the stored pitch. In addition, the same correction of the character width as described in the third embodiment is performed. It should be noted that CH = 2 × SW is added to the data of the pitch P of the portion where the character width correction is required, so that the data is not used for updating PMAX and PMIN.

定ピッチ印字のスペース検出処理の詳細フローは第21
図のように示される。他の処理の内容は実施例3と同様
である。
The detailed flow of space detection processing for constant pitch printing is
It is shown as shown. Other processing contents are the same as those in the third embodiment.

実施例5 処理全体のフローは第22図に示す通りである。旨12図
と同じ番号の処理は、実施例4における対応処理と同一
内容である。実施例4との違いは、印字モード判定のた
めのピッチ測定の処理106Aと、測定ピッチを利用するか
否かの判定処理108Aの内容のみである。
Example 5 The flow of the entire process is as shown in FIG. The processes with the same numbers as in FIG. 12 have the same contents as the corresponding processes in the fourth embodiment. The difference from the fourth embodiment is only the contents of a pitch measurement process 106A for print mode determination and a determination process 108A of whether to use the measured pitch.

ピッチ測定処理106Aの詳細フローは第23図に示す通り
である。すなわち、第20図と比較すれば明らかなよう
に、実施例4と同様に文字幅を必要に応じて修正してか
らピッチPを測定しMP[I]として保存するが、実施例
4と違って文字間余白幅 WG=CMS−OME+CH (7) を計算する。
The detailed flow of the pitch measurement processing 106A is as shown in FIG. That is, as is clear from comparison with FIG. 20, the pitch P is measured and stored as MP [I] after correcting the character width as necessary as in the fourth embodiment. WG = CMS-OME + CH (7).

そして、処理108Aにおいて、この文字間余白幅WGとSW
との比較判定を行うことにより、2×SWを越える文字幅
の部分のピッチデータをPMAX,PMINの更新のためのデー
タから排除する。
Then, in process 108A, the inter-character margin width WG and SW
The pitch data of the character width exceeding 2 × SW is excluded from the data for updating PMAX and PMIN.

実施例6 処理全体のフローは第22図に示す通りである。実施例
5との違いは、印字モード判定のためのピッチ測定(第
22図の処理108A)の内容と、プロポーショナル印字のス
ペース検出(第22図の処理122)の内容である。
Embodiment 6 The flow of the entire process is as shown in FIG. The difference from the fifth embodiment is that the pitch measurement (the
This is the content of the process 108A) in FIG. 22 and the content of the space detection of the proportional printing (the process 122 in FIG. 22).

印字モード判定のためのピッチ測定の詳細フローは第
24図に示す通りである。第24図と第23図を比較すれば明
らかなように、本実施例においては、文字間余白幅のデ
ータをWG[I]として保存することが実施例5における
処理内容と異なる。
The detailed flow of pitch measurement for print mode determination
As shown in FIG. As is apparent from a comparison between FIG. 24 and FIG. 23, in the present embodiment, the data of the margin width between characters is stored as WG [I], which is different from the processing content in the fifth embodiment.

プロポーショナル印字のスペース検出の詳細フローは
第25図に示す通りである。第25図と第16図を比較すれば
明らかなように、本実施例では文字間余白としてピッチ
測定時に保存されたWG[J]を用いて、スペース数を計
算する。他の処理の内容は実施例5と同一である。
The detailed flow of space detection for proportional printing is as shown in FIG. As is apparent from a comparison between FIG. 25 and FIG. 16, in the present embodiment, the number of spaces is calculated using WG [J] stored as a margin between characters at the time of pitch measurement. The other processing contents are the same as in the fifth embodiment.

以上説明した各実施例は、例えば第1図に示すような
ハードウェア構成によって実現することができる原稿画
像はスキャナ等によって入力され、画像メモリ1に蓄積
される。CPU2の処理によって、原稿画像に対する行切出
しと文字切出し、および本発明に係るスペース検出等が
実行されるが、この文字切出しの際に抽出された垂直射
影等のデータはデータメモリ3に格納される。次に、前
記各実施例において詳細に説明したスペース検出が実行
され、この処理に関連したデータおよび処理結果データ
もデータメモリ3に格納される。このようなCPU2の処理
のためのプログラムはプログラムメモリ4に格納されて
いる。
In each of the embodiments described above, for example, a document image that can be realized by a hardware configuration as shown in FIG. 1 is input by a scanner or the like, and is stored in the image memory 1. The CPU 2 executes line segmentation and character segmentation for the document image, space detection according to the present invention, and the like, and data such as vertical projection extracted at the time of character segmentation is stored in the data memory 3. . Next, space detection described in detail in each of the above embodiments is performed, and data related to this processing and processing result data are also stored in the data memory 3. A program for such processing of the CPU 2 is stored in the program memory 4.

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

以上詳しく説明した如く、本発明によれば、印字モー
ドを予め指定しなくとも、定ピッチ印字原稿とプロポー
ショナル印字原稿のいずれについても、適切な方法を自
動的に選択してスペースを確実に検出することができ、
また定ピッチ印字原稿の場合に測定したピッチを利用し
てスペース検出を行うので、ピッチの違いに自動的に対
応して適切なスペース検出が可能である。
As described above in detail, according to the present invention, an appropriate method is automatically selected for both fixed-pitch printing originals and proportional printing originals without any need to specify a printing mode in advance, and a space is reliably detected. It is possible,
In addition, since the space detection is performed using the measured pitch in the case of a fixed-pitch print original, appropriate space detection can be automatically performed in response to the difference in pitch.

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

第1図は本発明の各実施例に係るハードウェア構成の一
例を示すブロック図、第2図は定ピッチ印字原稿モデル
を示す図、第3図はプロポーショナル印字原稿モデルを
示す図、第4図および第5図はそれぞれ原稿の印字モー
ドとスペース検出との関係を説明するための図、第6図
および第7図はそれぞれ定ピッチ印字原稿のピッチおよ
び文字間余白幅のヒストグラムを示す図、第8図および
第9図はそれぞれプロポーショナル印字原稿のピッチお
よび文字間余白幅のヒストグラムを示す図、第10図およ
び第11図はそれぞれピッチ検索範囲を限定した場合の定
ピッチ印字原稿およびプロポーショナル印字原稿のピッ
チのヒストグラムを示す図、第12図は処理全体の概略フ
ローチャート、第13図は印字モード判定のためのピッチ
測定のフローチャート、第14図は文字位置の説明図、第
15図は定ピッチ印字原稿に対するスペース検出のフロー
チャート、第16図はプロポーショナル印字原稿に対する
スペース検出のフローチャート、第17図は印字モード判
定のためのピッチ測定のフローチャート、第18図は定ピ
ッチ印字原稿のスペース検出のためのピッチ測定のフロ
ーチャート、第19図は文字幅修正の説明図、第20図は印
字モード判定のためのピッチ測定のフローチャート、第
21図は定ピッチ印字原稿のスペース検出のフローチャー
ト、第22図は処理全体の概略フローチャート、第23図は
印字モード判定のためのピッチ測定のフローチャート、
第24図は印字モード判定のためのピッチ測定のフローチ
ャート、第25図はプロポーショナル印字原稿のスペース
検出のフローチャートである。 1……画像メモリ、2……CPU、 3……データメモリ、 4……プロポーショナルメモリ。
FIG. 1 is a block diagram showing an example of a hardware configuration according to each embodiment of the present invention, FIG. 2 is a diagram showing a fixed-pitch printing original model, FIG. 3 is a diagram showing a proportional-printing original model, FIG. And FIG. 5 are diagrams for explaining the relationship between the print mode and space detection of the document, respectively. FIGS. 6 and 7 are diagrams respectively showing the histogram of the pitch and the margin between characters of a fixed-pitch print document. 8 and 9 show histograms of the pitch and the margin between characters of the proportionally printed original, respectively. FIGS. 10 and 11 show the fixed and proportionally printed originals when the pitch search range is limited, respectively. FIG. 12 is a diagram showing a pitch histogram, FIG. 12 is a schematic flowchart of the entire process, and FIG. 13 is a flowchart of pitch measurement for print mode determination. , FIG. 14 is a schematic view for illustrating a character position, the
FIG. 15 is a flowchart of space detection for a fixed-pitch printed document, FIG. 16 is a flowchart of space detection for a proportional-printed document, FIG. 17 is a flowchart of pitch measurement for print mode determination, and FIG. Flowchart of pitch measurement for space detection, FIG. 19 is an explanatory diagram of character width correction, FIG. 20 is a flowchart of pitch measurement for print mode determination, FIG.
FIG. 21 is a flowchart of space detection of a fixed-pitch print original, FIG. 22 is a schematic flowchart of the entire process, FIG. 23 is a flowchart of pitch measurement for print mode determination,
FIG. 24 is a flowchart of pitch measurement for determining a print mode, and FIG. 25 is a flowchart of space detection of a proportionally printed original. 1 ... Image memory, 2 ... CPU, 3 ... Data memory, 4 ... Proportional memory.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06K 9/34 G06K 9/62 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06K 9/34 G06K 9/62

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】原稿より測定したピッチの分布から、ピッ
チの最大値と最小値の比または差をとり、前記比または
差により原稿モードを判定し、 定ピッチ印字と判定した場合は、PとSWの比によりスペ
ースを検出し、 プロポーショナルピッチ印字と判定した場合は、MSとSW
の比によりスペースを検出する、 ただし、P=注目する現在文字と前の文字とのピッチ、 SW=MP(1行内の垂直射影の最大値)×α(所定の定
数) MS=注目する現在文字とその前の文字との間の文字間余
白幅 ことを特徴とするスペース検出方法。
1. A ratio or a difference between a maximum value and a minimum value of a pitch is determined from a distribution of pitches measured from a document, and a document mode is determined based on the ratio or the difference. If space is detected by the ratio of SW and proportional pitch printing is determined, MS and SW
Where P = pitch between the current character of interest and the previous character, SW = MP (maximum value of vertical projection in one line) x α (predetermined constant) MS = current character of interest A space detection method, characterized by a space between characters between a character and a character preceding the character.
JP1161176A 1989-06-23 1989-06-23 Space detection method Expired - Fee Related JP2963465B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1161176A JP2963465B2 (en) 1989-06-23 1989-06-23 Space detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1161176A JP2963465B2 (en) 1989-06-23 1989-06-23 Space detection method

Publications (2)

Publication Number Publication Date
JPH0325693A JPH0325693A (en) 1991-02-04
JP2963465B2 true JP2963465B2 (en) 1999-10-18

Family

ID=15730030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1161176A Expired - Fee Related JP2963465B2 (en) 1989-06-23 1989-06-23 Space detection method

Country Status (1)

Country Link
JP (1) JP2963465B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5508359B2 (en) * 2011-08-03 2014-05-28 シャープ株式会社 Character recognition device, character recognition method and program
JP5857634B2 (en) * 2011-10-31 2016-02-10 富士通株式会社 Word space detection device, word space detection method, and computer program for word space detection

Also Published As

Publication number Publication date
JPH0325693A (en) 1991-02-04

Similar Documents

Publication Publication Date Title
JP2940960B2 (en) Image tilt detection method and correction method, and image information processing apparatus
US4941189A (en) Optical character reader with skew recognition
US10289905B2 (en) Automating creation of accurate OCR training data using specialized UI application
US5835634A (en) Bitmap comparison apparatus and method using an outline mask and differently weighted bits
JPH096914A (en) Method and processor for image processing
JP2963465B2 (en) Space detection method
US4876730A (en) Optical character reader with skew recognition
JP3031579B2 (en) How to specify the character recognition area of a form
JP3574562B2 (en) Method for recognizing and detecting deformation of a series of patterns in an image and recording medium storing the program
JP3537570B2 (en) Space detection method for Japanese-English mixed documents, pitch format determination method, and space detection method for fixed-pitch alphanumeric character strings
JPH07220023A (en) Method and device for table recognition
JP3000480B2 (en) Character area break detection method
CN111161247B (en) Detection method for variable code reading character quality verification
CN108205810A (en) Image comparison means and method, electronic equipment
JP3037727B2 (en) OCR system
JPH02125389A (en) Space detecting method
JP2005165383A (en) Seal verification device, seal verification method, and seal verification program
JP2982221B2 (en) Character reader
JP3356819B2 (en) Mark recognition device
JPH05233874A (en) Optical character reader
CN113420762A (en) Image processing method, system, electronic equipment and storage medium
JPS63101983A (en) Character string extracting system
JP3919390B2 (en) Character recognition device
JP2658153B2 (en) Character identification method
JPH09319830A (en) Font discrimination method

Legal Events

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