[go: up one dir, main page]

JP2002074264A - Image processing apparatus, image processing method, and recording medium - Google Patents

Image processing apparatus, image processing method, and recording medium

Info

Publication number
JP2002074264A
JP2002074264A JP2000265831A JP2000265831A JP2002074264A JP 2002074264 A JP2002074264 A JP 2002074264A JP 2000265831 A JP2000265831 A JP 2000265831A JP 2000265831 A JP2000265831 A JP 2000265831A JP 2002074264 A JP2002074264 A JP 2002074264A
Authority
JP
Japan
Prior art keywords
run
function
image
maximum value
distance
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.)
Granted
Application number
JP2000265831A
Other languages
Japanese (ja)
Other versions
JP4108910B2 (en
Inventor
Fumihiro Hasegawa
史裕 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2000265831A priority Critical patent/JP4108910B2/en
Publication of JP2002074264A publication Critical patent/JP2002074264A/en
Application granted granted Critical
Publication of JP4108910B2 publication Critical patent/JP4108910B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)

Abstract

(57)【要約】 【課題】 文字認識の妨げになる罫線を、罫線と文字が
交差していても誤って文字を消すようなことがなく、罫
線にかすれがあった場合や、点線罫線の場合でも確実に
消去することが可能な画像処理装置の実現を課題とす
る。 【解決手段】 画像入力手段1で処理対象の画像を取り
込み、取り込んだ画像データ中の罫線の位置を罫線位置
推定手段3で推定し、推定位置付近で罫線と垂直な方向
の黒ランを垂直方向ラン抽出手段4で抽出し、抽出され
たランデータの中心を通る回帰直線を回帰直線算出手段
6で求め、さらに回帰直線とランデータの距離をラン直
線間距離算出手段8で求め、回帰直線との距離距離の最
大値と閾値とを距離最大値吟味手段10で比較し、最大
値が閾値以上である場合にこの最大値を与えるランデー
タをランデータ編集手段9で除外し、ラン消去手段7で
最大値が閾値未満であるランデータの位置に相当する画
像上の位置を白画素に置き換える。
(57) [Summary] [Problem] A ruled line that hinders character recognition is not erased by mistake even if the ruled line intersects with a character. It is an object of the present invention to realize an image processing apparatus capable of securely erasing even in a case. SOLUTION: An image to be processed is fetched by an image input means 1, a position of a ruled line in the fetched image data is estimated by a ruled line position estimating means 3, and a black run in a direction perpendicular to the ruled line is estimated in the vicinity of the estimated position. The regression line passing through the center of the extracted run data extracted by the run extraction means 4 is determined by the regression line calculation means 6, and the distance between the regression line and the run data is determined by the distance calculation means 8. The maximum value of the distance and the threshold value are compared by the maximum distance value examination means 10, and when the maximum value is equal to or larger than the threshold value, the run data giving this maximum value is excluded by the run data editing means 9, and the run erasing means 7 is deleted. Then, the position on the image corresponding to the position of the run data whose maximum value is less than the threshold value is replaced with a white pixel.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、紙面に記入された
文字を光学的に認識する装置、方法およびこの方法をコ
ンピュータに実行させるプログラムを格納した記憶媒体
に関し、ことに認識の妨げとなる罫線を精度良く消去す
ることが可能な画像処理装置および画像処理方法および
そのプログラムを格納した記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and a method for optically recognizing characters written on a sheet of paper, and a storage medium storing a program for causing a computer to execute the method. TECHNICAL FIELD The present invention relates to an image processing apparatus and an image processing method capable of accurately deleting an image, and a storage medium storing the program.

【0002】[0002]

【従来の技術】従来、認識の妨げとなる罫線を消去する
方法には、罫線を構成する長い黒ラン(連続して存在す
る黒画素列)を手がかりにするものが主であった。特開
平10−171922号公報でも、罫線方向(長手方
向)のある程度以上長い黒ランを抽出することをまず行
い、抽出されたランの長さの総和を黒ランの方向に対し
垂直な方向の座標毎に求め、これらの和を複数のブロッ
クに分け、ブロックが1つであればそれらを罫線として
認めて消去し、2つ以上ある場合には、複数のブロック
のうちで最も大きな黒ラン長の総和値を持つブロックを
罫線を構成する黒ラン群と認め、これらを消去するとい
うもので、罫線と紛らわしい文字の誤消去を防ぐ工夫が
なされている。しかしながら、この方法では罫線に接触
していない文字の誤消去を防ぐことはできるが、文字と
罫線が交差している場合には、交差部分が文字の構成要
素であっても罫線とともに消去されてしまう。また、画
像の状態が悪く、罫線がかすれている場合には、罫線方
向の黒ランが短く切れてしまい、長い黒ランの抽出が難
しくなるため、罫線の消え残りが多くなる。さらに、長
い黒ランが必要なため、点線罫線の消去も難しい。
2. Description of the Related Art Hitherto, the main method of erasing a ruled line which hinders recognition is based on a long black run (a continuous black pixel row) constituting a ruled line. JP-A-10-171922 also first extracts a black run longer than a certain length in the ruled line direction (longitudinal direction), and calculates the sum of the lengths of the extracted runs in the direction perpendicular to the direction of the black run. For each block, the sum is divided into a plurality of blocks. If there is one block, it is recognized and deleted as a ruled line. If there are two or more blocks, the largest black run length of the plurality of blocks is used. Blocks having a total value are recognized as a group of black runs constituting a ruled line, and these are erased, so that a scheme is devised to prevent erroneous erasure of characters confused with the ruled line. However, this method can prevent erroneous erasure of a character that does not touch the ruled line, but when the character and the ruled line intersect, even if the intersection is a component of the character, it is erased together with the ruled line. I will. Further, when the image state is poor and the ruled lines are blurred, the black run in the ruled line direction is cut short, and it becomes difficult to extract a long black run. Further, since a long black run is required, it is difficult to erase dotted ruled lines.

【0003】[0003]

【発明が解決しようとする課題】上述のごとく、従来の
文字認識の妨げとなる罫線除去の画像処理方法およびそ
のような装置では、黒ランの線長によって罫線を認識し
ているため、罫線がかすれている場合や点線罫線の場合
は消去が難しかった。また、文字と罫線が交差している
場合には、文字の構成要素を罫線とともに消去してしま
うという問題があった。本発明は、比較的簡単な方法で
この問題を解決して、罫線と文字とが交差している場合
でも誤って文字を消すようなことがなく、罫線にかすれ
があった場合や、点線罫線の場合でも精度良く罫線消去
が可能な画像処理装置および画像処理方法および画像処
理方法をコンピュータに実行させるプログラムを記憶す
る記憶媒体の実現を課題とする。
As described above, in the conventional image processing method for removing ruled lines which hinders character recognition and such an apparatus, ruled lines are recognized based on the line length of a black run. In the case of fading or dotted ruled lines, erasing was difficult. Further, when the character and the ruled line intersect, there is a problem that the constituent elements of the character are erased together with the ruled line. The present invention solves this problem in a relatively simple manner so that even if the ruled line intersects with the character, the character is not erased by mistake and the ruled line is blurred, It is another object of the present invention to realize an image processing apparatus, an image processing method, and a storage medium that stores a program for causing a computer to execute the image processing method, in which the ruled line can be accurately erased even in the case of (1).

【0004】[0004]

【課題を解決するための手段】上記課題を達成するた
め、本発明は、光学的文字認識を実行する画像処理装置
において、処理対象の画像を取り込む画像入力手段と、
この画像入力手段が取り込んだ画像データを格納する画
像データ格納手段と、この画像データ格納手段に格納さ
れた前記画像データ中の罫線の位置を推定する罫線位置
推定手段と、この罫線位置推定手段で推定された罫線の
推定位置付近で前記罫線と垂直な方向の黒ランを抽出す
る垂直方向ラン抽出手段と、この垂直方向ラン抽出手段
で抽出されたランを格納しておくランデータ格納手段
と、前記垂直方向ラン抽出手段で抽出されたランデータ
の中心を通る回帰直線を求める回帰直線算出手段と、こ
の回帰直線算出手段で算出された回帰直線と前記ランデ
ータの距離を求めるラン直線間距離算出手段と、このラ
ン直線間距離算出手段で算出された距離の最大値とあら
かじめ定めておいた閾値とを比較する距離最大値吟味手
段と、この距離最大値吟味手段での比較によって前記最
大値があらかじめ定めておいた前記閾値以上である場合
にこの最大値を与えるランデータを除外するランデータ
編集手段と、前記最大値があらかじめ定めておいた閾値
未満である場合に前記ランデータ格納手段に格納されて
いるランデータの位置に相当する部分を画像上で白画素
に置き換えるラン消去手段とを具備することを特徴とす
る。
According to the present invention, there is provided an image processing apparatus for performing optical character recognition, comprising: an image input unit for capturing an image to be processed;
Image data storing means for storing the image data captured by the image input means; ruled line position estimating means for estimating the position of ruled lines in the image data stored in the image data storing means; and ruled line position estimating means. Vertical run extracting means for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line; run data storing means for storing the run extracted by the vertical run extracting means; Regression line calculation means for obtaining a regression line passing through the center of the run data extracted by the vertical direction run extraction means; and run straight line distance calculation for obtaining a distance between the regression line calculated by the regression line calculation means and the run data Means, distance maximum value examination means for comparing the maximum value of the distance calculated by the run straight line distance calculation means with a predetermined threshold value, and this distance maximum Run data editing means for excluding run data that gives this maximum value when the maximum value is equal to or greater than the predetermined threshold value by comparison in the examination means, and the maximum value is less than a predetermined threshold value. A run erasing unit that replaces a portion corresponding to the position of the run data stored in the run data storage unit with a white pixel on an image in some cases.

【0005】また、光学的文字認識を実行する画像処理
装置において、処理対象の画像を取り込む画像入力手段
と、この画像入力手段が取り込んだ画像データを格納す
る画像データ格納手段と、この画像データ格納手段に格
納された前記画像データ中の罫線の位置を推定する罫線
位置推定手段と、この罫線位置推定手段で推定された罫
線の推定位置付近で前記罫線と垂直な方向の黒ランを抽
出する垂直方向ラン抽出手段と、この垂直方向ラン抽出
手段で抽出されたランを格納しておくランデータ格納手
段と、前記垂直方向ラン抽出手段で抽出されたランデー
タの長さの分布を示すヒストグラムを求めるラン長ヒス
トグラム算出手段と、このラン長ヒストグラム算出手段
が求めたヒストグラムの中から長さの最頻値を求めるラ
ン長最頻値算出手段と、このラン長最頻値算出手段が求
めた長さの最頻値と大きく異なる長さを持つランをデー
タから除外する異長ランデータ除外手段と、この異長ラ
ンデータ除外手段で除外されなかった前記画像データ格
納手段に格納されている前記ランデータの中心を通る回
帰直線を求める回帰直線算出手段と、この回帰直線算出
手段で算出された回帰直線と前記ランデータの距離を求
めるラン直線間距離算出手段と、このラン直線間距離算
出手段で算出された距離の最大値とあらかじめ定めてお
いた閾値とを比較する距離最大値吟味手段と、この距離
最大値吟味手段での比較によって前記最大値があらかじ
め定めておいた前記閾値以上である場合にこの最大値を
与えるランデータを除外するランデータ編集手段と、前
記最大値があらかじめ定めておいた閾値未満である場合
に前記ランデータ格納手段に格納されているランデータ
の位置に相当する部分を画像上で白画素に置き換えるラ
ン消去手段とを具備することを特徴とする。これらによ
り、文字認識の妨げとなる罫線を、罫線と文字とが交差
している場合でも誤って文字を消すようなことがなく、
罫線にかすれがあった場合や、点線罫線の場合でも精度
良く消去することが可能な画像処理装置を実現すること
ができる。
In an image processing apparatus for performing optical character recognition, image input means for capturing an image to be processed, image data storage means for storing image data captured by the image input means, and image data storage means A ruled line position estimating means for estimating the position of a ruled line in the image data stored in the means; and a vertical line for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated by the ruled line position estimating means. Direction run extraction means, run data storage means for storing the runs extracted by the vertical direction run extraction means, and a histogram indicating the distribution of the length of the run data extracted by the vertical direction run extraction means. A run length histogram calculating means, and a run length mode value calculating means for obtaining a mode value of the length from the histogram obtained by the run length histogram calculating means. A run length data exclusion unit that excludes a run having a length significantly different from the mode value of the length obtained by the run length mode value calculation unit from the data; Regression line calculation means for obtaining a regression line passing through the center of the run data stored in the image data storage means, and a run line for obtaining a distance between the regression line calculated by the regression line calculation means and the run data The distance distance calculating means, the distance maximum value examining means for comparing the maximum value of the distance calculated by the run straight line distance calculating means with a predetermined threshold, and the distance maximum value examining means, Run data editing means for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value, and the maximum value is predetermined Characterized by comprising a run-erasing means for replacing a portion corresponding to the position of the run data stored in the case is less than the value in the run-data storage means to a white pixel in the image. As a result, a ruled line that hinders character recognition is not accidentally erased even when the ruled line and the character intersect,
It is possible to realize an image processing apparatus capable of accurately deleting even when a ruled line is blurred or a dotted ruled line.

【0006】さらに、光学的文字認識を実行する画像処
理方法において、処理対象の画像を取り込む画像入力過
程と、この画像入力過程で取り込んだ画像データを格納
する画像データ格納過程と、この画像データ格納過程で
格納された前記画像データ中の罫線の位置を推定する罫
線位置推定過程と、この罫線位置推定過程で推定された
罫線の推定位置付近で前記罫線と垂直な方向の黒ランを
抽出する垂直方向ラン抽出過程と、この垂直方向ラン抽
出過程で抽出されたランを格納しておくランデータ格納
過程と、前記垂直方向ラン抽出過程で抽出されたランデ
ータの中心を通る回帰直線を求める回帰直線算出過程
と、この回帰直線算出過程で算出された回帰直線と前記
ランデータの距離を求めるラン直線間距離算出過程と、
このラン直線間距離算出過程で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味過程と、この距離最大値吟味過程での比較によって
前記最大値があらかじめ定めておいた前記閾値以上であ
る場合にこの最大値を与えるランデータを除外するラン
データ編集過程と、前記最大値があらかじめ定めておい
た閾値未満である場合に前記ランデータ格納過程に格納
されているランデータの位置に相当する部分を画像上で
白画素に置き換えるラン消去過程とを具備することを特
徴とする。
Further, in an image processing method for performing optical character recognition, an image inputting step of capturing an image to be processed, an image data storing step of storing image data captured in the image inputting step, and an image data storing step of storing the image data A ruled line position estimating step of estimating a position of a ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process A direction run extraction process, a run data storage process for storing the runs extracted in the vertical run extraction process, and a regression line for finding a regression line passing through the center of the run data extracted in the vertical run extraction process. A calculating step, a run straight line distance calculating step of finding a distance between the regression line calculated in the regression straight line calculating step and the run data,
A distance maximum value examining process for comparing the maximum value of the distance calculated in the run straight line distance calculating process with a predetermined threshold, and the maximum value is determined in advance by comparison in the distance maximum value examining process. The run data editing step of excluding the run data giving the maximum value when the maximum value is equal to or more than the set threshold value is stored in the run data storage step when the maximum value is less than a predetermined threshold value. A run erasing step of replacing a portion corresponding to the position of the run data with a white pixel on the image.

【0007】また、光学的文字認識を実行する画像処理
方法において、処理対象の画像を取り込む画像入力過程
と、この画像入力過程で取り込んだ画像データを格納す
る画像データ格納過程と、この画像データ格納過程で格
納された前記画像データ中の罫線の位置を推定する罫線
位置推定過程と、この罫線位置推定過程で推定された罫
線の推定位置付近で前記罫線と垂直な方向の黒ランを抽
出する垂直方向ラン抽出過程と、この垂直方向ラン抽出
過程で抽出されたランを格納しておくランデータ格納過
程と、前記垂直方向ラン抽出過程で抽出されたランデー
タの長さの分布を示すヒストグラムを求めるラン長ヒス
トグラム算出過程と、このラン長ヒストグラム算出過程
が求めたヒストグラムの中から長さの最頻値を求めるラ
ン長最頻値算出過程と、このラン長最頻値算出過程が求
めた長さの最頻値と大きく異なる長さを持つランをデー
タから除外する異長ランデータ除外過程と、この異長ラ
ンデータ除外過程で除外されなかった前記画像データ格
納過程に格納されている前記ランデータの中心を通る回
帰直線を求める回帰直線算出過程と、この回帰直線算出
過程で算出された回帰直線と前記ランデータの距離を求
めるラン直線間距離算出過程と、このラン直線間距離算
出過程で算出された距離の最大値とあらかじめ定めてお
いた閾値とを比較する距離最大値吟味過程と、この距離
最大値吟味過程での比較によって前記最大値があらかじ
め定めておいた前記閾値以上である場合にこの最大値を
与えるランデータを除外するランデータ編集過程と、前
記最大値があらかじめ定めておいた閾値未満である場合
に前記ランデータ格納過程に格納されているランデータ
の位置に相当する部分を画像上で白画素に置き換えるラ
ン消去過程とを具備することを特徴とする。これらによ
り、文字認識の妨げとなる罫線を、罫線と文字とが交差
している場合でも誤って文字を消すようなことがなく、
罫線にかすれがあった場合や、点線罫線の場合でも精度
良く消去することが可能な画像処理方法を実現すること
ができる。
In an image processing method for performing optical character recognition, an image inputting step of capturing an image to be processed, an image data storing step of storing image data captured in the image inputting step, and an image data storing step A ruled line position estimating step of estimating a position of a ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process A direction run extraction process, a run data storage process for storing the runs extracted in the vertical run extraction process, and a histogram showing the distribution of the length of the run data extracted in the vertical run extraction process are obtained. A run length histogram calculation process, and a run length mode calculation process for obtaining a mode value of the length from the histogram obtained by the run length histogram calculation process. And a run length data exclusion process in which runs having a length significantly different from the mode of the length obtained in the run length mode calculation process are excluded from the data. A regression line calculation step for obtaining a regression line passing through the center of the run data stored in the image data storage step, and a run line for obtaining a distance between the regression line calculated in the regression line calculation step and the run data. The distance calculation step, a distance maximum value examination step of comparing the maximum value of the distance calculated in the run straight line distance calculation step with a predetermined threshold value, and the comparison in the distance maximum value examination step, A run data editing process for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value, and the maximum value is predetermined. Characterized by comprising a run erasing process of replacing a portion corresponding to the position of the run data stored in the case it is less than the value in the run-data storage process to a white pixel in the image. As a result, a ruled line that hinders character recognition is not accidentally erased even when the ruled line and the character intersect,
It is possible to realize an image processing method capable of accurately deleting even when a ruled line is blurred or a dotted ruled line.

【0008】さらに、光学的文字認識を実行する処理方
法をコンピュータに実現させるプログラムを格納しコン
ピュータから読み取り可能な記録媒体において、処理対
象の画像を取り込む画像入力機能と、この画像入力機能
で取り込んだ画像データを格納する画像データ格納機能
と、この画像データ格納機能で格納された前記画像デー
タ中の罫線の位置を推定する罫線位置推定機能と、この
罫線位置推定機能で推定された罫線の推定位置付近で前
記罫線と垂直な方向の黒ランを抽出する垂直方向ラン抽
出機能と、この垂直方向ラン抽出機能で抽出されたラン
を格納しておくランデータ格納機能と、前記垂直方向ラ
ン抽出機能で抽出されたランデータの中心を通る回帰直
線を求める回帰直線算出機能と、この回帰直線算出機能
で算出された回帰直線と前記ランデータの距離を求める
ラン直線間距離算出機能と、このラン直線間距離算出機
能で算出された距離の最大値とあらかじめ定めておいた
閾値とを比較する距離最大値吟味機能と、この距離最大
値吟味機能での比較によって前記最大値があらかじめ定
めておいた前記閾値以上である場合にこの最大値を与え
るランデータを除外するランデータ編集機能と、前記最
大値があらかじめ定めておいた閾値未満である場合に前
記ランデータ格納機能に格納されているランデータの位
置に相当する部分を画像上で白画素に置き換えるラン消
去機能とを具備することを特徴とする。
Further, an image input function for capturing an image to be processed on a recording medium readable by the computer in which a program for realizing a processing method for performing optical character recognition is stored and read by the computer, and an image captured by the image input function. An image data storage function for storing image data, a ruled line position estimating function for estimating a position of a ruled line in the image data stored by the image data storing function, and a ruled line estimated position estimated by the ruled line position estimating function A vertical run extraction function for extracting a black run in a direction perpendicular to the ruled line in the vicinity, a run data storage function for storing runs extracted by the vertical run extraction function, and a vertical run extraction function. A regression line calculation function to find a regression line passing through the center of the extracted run data, and a regression line calculated by this regression line calculation function A line-to-run-line distance calculating function for determining the distance between a line and the run data, and a distance-maximum-value examining function for comparing a maximum value of the distance calculated by the run-line-to-run distance calculating function with a predetermined threshold value, A run data editing function for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value by comparison with the distance maximum value examination function, and the maximum value is determined in advance. A run erasing function for replacing a portion corresponding to the position of the run data stored in the run data storage function with a white pixel on an image when the value is smaller than the threshold value.

【0009】また、光学的文字認識を実行する処理方法
をコンピュータに実現させるプログラムを格納しコンピ
ュータから読み取り可能な記録媒体において、処理対象
の画像を取り込む画像入力機能と、この画像入力機能で
取り込んだ画像データを格納する画像データ格納機能
と、この画像データ格納機能で格納された前記画像デー
タ中の罫線の位置を推定する罫線位置推定機能と、この
罫線位置推定機能で推定された罫線の推定位置付近で前
記罫線と垂直な方向の黒ランを抽出する垂直方向ラン抽
出機能と、この垂直方向ラン抽出機能で抽出されたラン
を格納しておくランデータ格納機能と、前記垂直方向ラ
ン抽出機能で抽出されたランデータの長さの分布を示す
ヒストグラムを求めるラン長ヒストグラム算出機能と、
このラン長ヒストグラム算出機能で求めたヒストグラム
の中から長さの最頻値を求めるラン長最頻値算出機能
と、このラン長最頻値算出機能で求めた長さの最頻値と
大きく異なる長さを持つランをデータから除外する異長
ランデータ除外機能と、この異長ランデータ除外機能で
除外されなかった前記画像データ格納機能に格納されて
いる前記ランデータの中心を通る回帰直線を求める回帰
直線算出機能と、この回帰直線算出機能で算出された回
帰直線と前記ランデータの距離を求めるラン直線間距離
算出機能と、このラン直線間距離算出機能で算出された
距離の最大値とあらかじめ定めておいた閾値とを比較す
る距離最大値吟味機能と、この距離最大値吟味機能での
比較によって前記最大値があらかじめ定めておいた前記
閾値以上である場合にこの最大値を与えるランデータを
除外するランデータ編集機能と、前記最大値があらかじ
め定めておいた閾値未満である場合に前記ランデータ格
納機能に格納されているランデータの位置に相当する部
分を画像上で白画素に置き換えるラン消去機能とを具備
することを特徴とする。これらにより、文字認識の妨げ
となる罫線を、罫線と文字とが交差している場合でも誤
って文字を消すようなことがなく、罫線にかすれがあっ
た場合や、点線罫線の場合でも精度良く消去することが
可能な画像処理方法をコンピュータに実現させるプログ
ラムを格納したコンピュータから読み取り可能な記録媒
体を実現することができる。
Further, an image input function for capturing an image to be processed on a recording medium storing a program for causing a computer to execute a processing method for performing optical character recognition on a recording medium readable from the computer, and the image input function for capturing the image to be processed. An image data storage function for storing image data, a ruled line position estimating function for estimating a position of a ruled line in the image data stored by the image data storing function, and a ruled line estimated position estimated by the ruled line position estimating function A vertical run extraction function for extracting a black run in a direction perpendicular to the ruled line in the vicinity, a run data storage function for storing runs extracted by the vertical run extraction function, and a vertical run extraction function. A run length histogram calculation function for obtaining a histogram indicating the distribution of the length of the extracted run data,
A run length mode calculation function for obtaining a mode of length from the histogram obtained by the run length histogram calculation function is significantly different from a mode of length obtained by the run length mode calculation function. A different-length run data exclusion function for excluding a run having a length from data, and a regression line passing through the center of the run data stored in the image data storage function that has not been excluded by the different-length run data exclusion function. The regression line calculation function to be obtained, the regression line calculated by the regression line calculation function, the inter-run line distance calculation function to obtain the distance between the run data, and the maximum value of the distance calculated by the inter-run line distance calculation function A case where the maximum value is equal to or greater than the predetermined threshold value by comparing the distance maximum value inspection function with a predetermined threshold value and the distance maximum value inspection function. A run data editing function for excluding the run data giving the maximum value, and a portion corresponding to the position of the run data stored in the run data storage function when the maximum value is less than a predetermined threshold. A run erasing function for replacing white pixels on an image. As a result, the ruled line that hinders character recognition is not erased accidentally even when the ruled line intersects with the character. A computer-readable recording medium that stores a program that causes a computer to execute the erasable image processing method can be realized.

【0010】[0010]

【発明の実施の形態】以下、本発明にかかる画像処理方
法、画像処理装置を添付図面を参照にして詳細に説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image processing method and an image processing apparatus according to the present invention will be described in detail with reference to the accompanying drawings.

【0011】図1は本発明の画像処理装置の第1の実施
の形態の構成を示すブロック図である。図1において、
符号1は処理対象の画像を取り込むスキャナ等の画像入
力手段、符号2は入ってきた画像を格納する画像格納手
段、符号3は画像中の消去すべき罫線の位置をおおよそ
に定める罫線位置推定手段、符号4は罫線付近の罫線と
は垂直な方向の黒ランを抽出する垂直方向ラン抽出手
段、符号5は抽出されたランデータを格納するランデー
タ格納手段、符号6はランの中心を通る回帰直線を求め
る回帰直線算出手段、符号7はランデータに基づいて画
像上からランを消去するラン消去手段、符号8は各ラン
データと回帰直線の距離を求めるラン直線間距離算出手
段、符号9は格納されているランデータの削除を行うラ
ンデータ編集手段、符号10はランと回帰直線の距離の
最大値を吟味し、後段の処理を決定する距離最大値吟味
手段である。
FIG. 1 is a block diagram showing the configuration of the first embodiment of the image processing apparatus of the present invention. In FIG.
Reference numeral 1 denotes an image input unit such as a scanner that takes in an image to be processed, reference numeral 2 denotes an image storage unit that stores an incoming image, and reference numeral 3 denotes a ruled line position estimating unit that roughly determines the position of a ruled line to be erased in the image. Reference numeral 4 denotes a vertical run extracting means for extracting a black run in a direction perpendicular to the ruled line near the ruled line, reference numeral 5 denotes a run data storage means for storing the extracted run data, and reference numeral 6 denotes a regression passing through the center of the run. Regression line calculating means for obtaining a straight line, reference numeral 7 denotes a run erasing means for deleting a run from an image based on the run data, reference numeral 8 denotes a run straight line distance calculating means for obtaining the distance between each run data and the regression line, and reference numeral 9 denotes Reference numeral 10 denotes run data editing means for deleting stored run data, which is a distance maximum value examining means for examining the maximum value of the distance between the run and the regression line and determining the subsequent processing.

【0012】図2に、本実施の形態の処理動作を示すフ
ローチャートである。処理対象の二値画像を画像入力手
段1により取り込み、画像データ格納手段2に格納する
(ステツプ101)。次に消去すべき罫線の位置の推定
を罫線位置推定手段3によって行う(ステップ10
2)。罫線位置推定には様々な方法が考えられるが、例
えば、特開平10−91783号公報にあるように、未
記入の同一フォーマットの帳票画像との位置あわせを行
い、この画像上の位置座標値で定義された文字記入欄か
ら処理対象の画像上の文字記入欄の位置を推定し、その
周囲を罫線の存在する範囲とする方法などを用いる。罫
線の存在する範囲が求められたら罫線の向きとは垂直な
方向の黒ランを垂直方向ラン抽出手段4により求め(ス
テップ103)、ランデータ格納手段5にランデータを
格納する。
FIG. 2 is a flowchart showing the processing operation of this embodiment. The binary image to be processed is captured by the image input means 1 and stored in the image data storage means 2 (step 101). Next, the position of the ruled line to be erased is estimated by the ruled line position estimating means 3 (step 10).
2). Various methods are conceivable for estimating the ruled line position. For example, as described in Japanese Patent Application Laid-Open No. Hei 10-91783, registration is performed with a blank form image of the same format, and position coordinates on this image are used. A method of estimating the position of the character entry column on the image to be processed from the defined character entry column and setting the surrounding area as a range where ruled lines exist is used. When the range in which the ruled line exists is obtained, a black run in the direction perpendicular to the direction of the ruled line is obtained by the vertical direction run extracting means 4 (step 103), and the run data is stored in the run data storing means 5.

【0013】この場合、図3に示すようにラン抽出は罫
線があると推定された位置より少し広い範囲で行い、抽
出漏れがないようにするが、もしここで抽出されたラン
をすべて消去した場合には、文字の一部も消去されてし
まい、後段の文字認識処理に悪影響を及ぼす。図4に示
すように、罫線から独立している部分や、文字が交差し
ている部分は、ランの中心が回帰直線から離れている傾
向がある。そこで、回帰直線から遠いランを除外し、残
ったランデータ部分を用いて罫線消去すれば良いのだ
が、罫線でないランデータも回帰直線の計算に使用して
いるので、一度に複数のランを除外すると、本来罫線で
あるべきランまで除外してしまう恐れがある。そこで、
回帰直線から最も遠いランをひとつだけ除外し、改めて
回帰直線を求めて再び各ランとの距離を計算すること
で、罫線を通る回帰直線の精度を高めることができる。
これを繰り返せば、罫線を構成するランだけがデータに
残ることになり、精度良く罫線の消去が行えることにな
る。
In this case, as shown in FIG. 3, run extraction is performed in a slightly wider range than the position where it is estimated that there is a ruled line so that there is no omission of extraction. In such a case, some of the characters are also erased, which adversely affects the subsequent character recognition processing. As shown in FIG. 4, the center of the run tends to be away from the regression line in a portion independent of the ruled line or in a portion where characters intersect. Therefore, it is only necessary to exclude runs that are far from the regression line and erase the ruled line using the remaining run data portion.However, since run data that is not a ruled line is also used for calculating the regression line, multiple runs are excluded at once. Then, there is a possibility that a run that should be a ruled line may be excluded. Therefore,
By excluding only one run farthest from the regression line, calculating the regression line again, and calculating the distance to each run again, the accuracy of the regression line passing through the ruled line can be improved.
By repeating this, only the runs that make up the ruled line remain in the data, and the ruled line can be erased with high accuracy.

【0014】このために、つぎの段階として、回帰直線
算出手段6でランの中心を通る回帰直線を求める(ステ
ップ104)。回帰直線は次のように求める。主走査方
向、副走査方向をそれぞれX方向、Y方向とすれば、主
走査方向罫線の場合、回帰直線の式を
For this purpose, as a next step, a regression line passing through the center of the run is determined by the regression line calculation means 6 (step 104). The regression line is obtained as follows. Assuming that the main scanning direction and the sub scanning direction are the X direction and the Y direction, respectively, in the case of the ruled line in the main scanning direction, the equation of the regression line is

【0015】y=a+bx とし、ランの中心座標をLet y = a + bx, and let the center coordinates of the run be

【0016】 (Xi,Yi) (i=1,2,3,…N)(Nはランの総数) とおくと、省略記号(Xi, Yi) (i = 1, 2, 3,... N) (N is the total number of runs)

【0017】[0017]

【数1】 (Equation 1)

【0018】を用いて、係数a、bはThe coefficients a and b are calculated using

【0019】[0019]

【数2】 (Equation 2)

【0020】と書くことができる。副走査方向にも同様
にして、回帰曲線
Can be written as Similarly, in the sub-scanning direction,

【0021】x=c+dy の係数c、dはThe coefficients c and d of x = c + dy are

【0022】[0022]

【数3】 (Equation 3)

【0023】で求められる。[0023]

【0024】次にラン直線間距離算出手段8で、各ラン
と回帰直線との間の距離の最大値を求め(ステップ10
5)、距離最大値吟味手段10におくる。ここでは、あ
らかじめ定めておいた値と、最大値との比較を行い(ス
テツプ106)、最大値の方が大きかったら、最大値を
与えるランをランデータ編集手段9で除外し(ステップ
107)、残ったランで再び回帰直線を求めるステップ
104に戻る。もし最大値のほうが小さければ、格納さ
れているランデータの情報をもとに、ラン消去手段7で
画面上のランデータの部分を白画素で置き換える(ステ
ップ108)。この操作をすべての処理対象罫線につい
て行い(ステップ109)、終了したなら結果画像を出
力して(ステップ110)処理を終える。
Next, the maximum value of the distance between each run and the regression line is obtained by the run straight line distance calculating means 8 (step 10).
5), to reach the maximum distance examination means 10; Here, the predetermined value is compared with the maximum value (step 106). If the maximum value is larger, the run giving the maximum value is excluded by the run data editing means 9 (step 107). The process returns to step 104 for obtaining a regression line again with the remaining runs. If the maximum value is smaller, the run erasing means 7 replaces the run data portion on the screen with white pixels based on the stored run data information (step 108). This operation is performed for all the ruled lines to be processed (step 109). When the operation is completed, a result image is output (step 110), and the processing is terminated.

【0025】なお、図では消去対象の罫線は実線である
が、点線でも全く同じ方法で罫線消去を行うことができ
る。また、この方法では罫線方向のラン情報を用いてい
ないことから、罫線がかすれて短く切れていても消去の
精度低下が罫線方向のラン情報を用いる場合に比べて少
ない。
Although the ruled line to be erased is a solid line in the figure, the ruled line can be erased in exactly the same manner as a dotted line. Further, since run information in the ruled line direction is not used in this method, even if the ruled line is blurred and short, the accuracy of erasure is less reduced than in the case of using run information in the ruled line direction.

【0026】図5のように、文字が交差している場合で
も、罫線の探索範囲の幅を超えているランがあった場
合、ランの中心が偶然回帰直線付近に来てしまい、文字
の一部であるにも関わらず、誤って消去対象になってし
まう場合がある。これを避けるためには、探索範囲の幅
を広げ、ランがこの幅を超えないようにすれば良いが、
幅が広がるとラン抽出や距離計算などに時間がかかって
しまう。そこで、以下に示すようにまずランのヒストグ
ラムの最頻値から罫線の幅を推定し、そこからある程度
離れた長さを持つランを、回帰曲線の計算の前にあらか
じめ除外しておけば、処理時間をさほど増大させること
なく、誤消去を防ぐことができる。
As shown in FIG. 5, even when characters intersect, if a run exceeds the width of the ruled line search range, the center of the run accidentally comes near the regression line, and Despite being a copy, it may be erroneously targeted for erasure. To avoid this, you can increase the width of the search range so that runs do not exceed this width,
If the width is widened, it will take time for run extraction and distance calculation. Therefore, as shown below, the width of the ruled line is first estimated from the mode value of the run histogram, and runs with a certain distance from them are excluded before calculating the regression curve. Erroneous erasure can be prevented without significantly increasing the time.

【0027】図6は本発明の第2の実施の形態の構成を
示すブロック図である。基本的には第1の実施の形態と
同一であるが、図の左側の部分が本実施の形態で加わっ
た部分である。図6において、符号1から符号10まで
の部分は図1と同一である。符号21は、ランデータを
もとに、ランの長さのヒストグラムを求めるラン長ヒス
トグラム算出手段、符号22はヒストグラムの最頻値を
求めるラン長最頻値算出手段、符号23は最頻のラン長
から大きく異なったランデータを選び、ランデータから
削除する異長ランデータ除外手段である。
FIG. 6 is a block diagram showing the configuration of the second embodiment of the present invention. Basically, it is the same as the first embodiment, but the portion on the left side of the figure is a portion added in the present embodiment. In FIG. 6, the portions denoted by reference numerals 1 to 10 are the same as those in FIG. Reference numeral 21 denotes a run length histogram calculating unit that obtains a histogram of the run length based on the run data, reference numeral 22 denotes a run length mode calculating unit that obtains a mode of the histogram, and reference numeral 23 denotes a most frequent run. This is a different-length run data exclusion means for selecting run data greatly different from the length and deleting the run data from the run data.

【0028】図7は、本実施の形態の処理動作を示すフ
ローチャートである。これも、大きな流れは図2のフロ
ーチャートと同一であり、ステップ103とステップ1
04の間に新たなステップが加わる形であるので、追加
部分だけを記してある。まず、ステップ103で、罫線
と垂直方向のランを抽出した後、ラン長ヒストグラム算
出手段21でランの長さのヒストグラムを求める(ステ
ップ201)。次に、求めたヒストグラムをもとに、ラ
ン長最頻値算出手段22でランの長さの最頻値を求める
(ステップ202)。これは罫線の幅を代表する値であ
ると考えられるので、ランの長さがこの幅と掛け離れた
ものは罫線では無いと考え、異長ランデータ除外手段2
3で、あらかじめ定めておいた値以上の長さ差があるラ
ンを、以降の処理には用いないようにランデータから除
外することにする(ステップ203)。図7に示した以
上の処理を加えることによって、図8に示すように、長
さのことなるランは、回帰直線の計算に初めから含まれ
ないため、誤って消去されることがなくなる。
FIG. 7 is a flowchart showing the processing operation of this embodiment. Also in this case, the major flow is the same as the flowchart of FIG.
Since a new step is added during the step 04, only the added part is shown. First, in step 103, a run in the direction perpendicular to the ruled line is extracted, and a run length histogram is obtained by the run length histogram calculating means 21 (step 201). Next, the mode value of the run length is obtained by the run length mode value calculating means 22 based on the obtained histogram (step 202). Since this is considered to be a value representative of the width of the ruled line, it is considered that the length of the run is far from the width is not a ruled line.
In step 3, a run having a length difference equal to or larger than a predetermined value is excluded from the run data so as not to be used in the subsequent processing (step 203). By adding the processing shown in FIG. 7, the runs having different lengths are not included in the calculation of the regression line from the beginning as shown in FIG.

【0029】図9に、本発明の第3の実施の形態の構成
を表すブロック図を示す。この構成は、本発明をソフト
ウェアで実現する場合の構成である。図9において、符
号31はCPU、符号32はメモリ、符号33はハード
ディスク、符号34は入力装置、符号35はCD−RO
Mドライブ、符号36はディスプレイ、符号37はCD
−ROMなどの記録媒体である。この構成では、汎用の
処理装置を用い、記録媒体37には、本発明の罫線消去
の処理機能や処理手順を実現させるためのプログラムが
記憶されている。処理対象の原稿画像は、例えば、ハー
ドディスク33などに格納されている。CPU31は、
記録媒体37から罫線消去の処理機能や処理手順を実現
させるプログラムを読み出して実行し、罫線消去をおこ
なった結果をディスプレイ36などに出力する。
FIG. 9 is a block diagram showing the configuration of the third embodiment of the present invention. This configuration is a configuration when the present invention is realized by software. 9, reference numeral 31 denotes a CPU, reference numeral 32 denotes a memory, reference numeral 33 denotes a hard disk, reference numeral 34 denotes an input device, and reference numeral 35 denotes a CD-RO.
M drive, 36 is a display, 37 is a CD
-A recording medium such as a ROM. In this configuration, a general-purpose processing device is used, and the recording medium 37 stores a program for realizing the processing function and processing procedure of ruled line erasing of the present invention. The document image to be processed is stored in, for example, the hard disk 33 or the like. The CPU 31
A program for realizing the processing function and processing procedure of ruled line erasure is read out from the recording medium 37 and executed, and the result of ruled line erasure is output to the display 36 or the like.

【0030】[0030]

【発明の効果】以上説明したように本発明の請求項1の
発明は、光学的文字認識を実行する画像処理装置におい
て、処理対象の画像を取り込む画像入力手段と、この画
像入力手段が取り込んだ画像データを格納する画像デー
タ格納手段と、この画像データ格納手段に格納された画
像データ中の罫線の位置を推定する罫線位置推定手段
と、この罫線位置推定手段で推定された罫線の推定位置
付近で罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出手段と、この垂直方向ラン抽出手段で抽出された
ランを格納しておくランデータ格納手段と、垂直方向ラ
ン抽出手段で抽出されたランデータの中心を通る回帰直
線を求める回帰直線算出手段と、この回帰直線算出手段
で算出された回帰直線とランデータの距離を求めるラン
直線間距離算出手段と、このラン直線間距離算出手段で
算出された距離の最大値とあらかじめ定めておいた閾値
とを比較する距離最大値吟味手段と、この距離最大値吟
味手段での比較によって最大値があらかじめ定めておい
た閾値以上である場合にこの最大値を与えるランデータ
を除外するランデータ編集手段と、最大値があらかじめ
定めておいた閾値未満である場合にランデータ格納手段
に格納されているランデータの位置に相当する部分を画
像上で白画素に置き換えるラン消去手段とを設けること
を特徴とする。これにより、文字認識の妨げとなる罫線
を、回帰直線とランとの距離が大きい物を残し、それ以
外の回帰直線付近のランを消去することで、罫線に文字
が接触していても、高い精度で罫線を構成する画素を同
定することができるので、誤って文字を消すようなこと
がなく、罫線にかすれがあった場合や、点線罫線の場合
でも精度良く消去することが可能な画像処理装置を実現
することができる。
As described above, according to the first aspect of the present invention, in an image processing apparatus for performing optical character recognition, image input means for capturing an image to be processed and the image input means for capturing the image to be processed. Image data storage means for storing image data; ruled line position estimating means for estimating ruled line positions in the image data stored in the image data storing means; and ruled line estimated position estimated by the ruled line position estimating means A vertical run extracting means for extracting a black run in a direction perpendicular to the ruled line, a run data storing means for storing runs extracted by the vertical run extracting means, and a vertical run extracting means. Regression line calculation means for obtaining a regression line passing through the center of the run data, and run line distance calculation means for obtaining the distance between the regression line calculated by the regression line calculation means and the run data A distance maximum value examining means for comparing the maximum value of the distance calculated by the run straight line distance calculating means with a predetermined threshold, and a maximum value determined in advance by comparison with the distance maximum value examining means. A run data editing unit that excludes run data that gives this maximum value when the maximum value is equal to or greater than a set threshold value; and a run data editing unit that stores run data stored in the run data storage unit when the maximum value is less than a predetermined threshold value. A run erasing means for replacing a portion corresponding to a position with a white pixel on an image is provided. As a result, a ruled line that hinders character recognition is removed even if a character is in contact with the ruled line by leaving a large distance between the regression line and the run and deleting runs near the other regression line. Image processing that can identify the pixels that make up the ruled line with high accuracy, so that characters are not erased accidentally, and even if the ruled lines are blurred or dotted ruled lines can be erased with high accuracy The device can be realized.

【0031】また、光学的文字認識を実行する画像処理
装置において、処理対象の画像を取り込む画像入力手段
と、この画像入力手段が取り込んだ画像データを格納す
る画像データ格納手段と、この画像データ格納手段に格
納された画像データ中の罫線の位置を推定する罫線位置
推定手段と、この罫線位置推定手段で推定された罫線の
推定位置付近で罫線と垂直な方向の黒ランを抽出する垂
直方向ラン抽出手段と、この垂直方向ラン抽出手段で抽
出されたランを格納しておくランデータ格納手段と、垂
直方向ラン抽出手段で抽出されたランデータの長さの分
布を示すヒストグラムを求めるラン長ヒストグラム算出
手段と、このラン長ヒストグラム算出手段が求めたヒス
トグラムの中から長さの最頻値を求めるラン長最頻値算
出手段と、このラン長最頻値算出手段が求めた長さの最
頻値と大きく異なる長さを持つランをデータから除外す
る異長ランデータ除外手段と、この異長ランデータ除外
手段で除外されなかった画像データ格納手段に格納され
ているランデータの中心を通る回帰直線を求める回帰直
線算出手段と、この回帰直線算出手段で算出された回帰
直線とランデータの距離を求めるラン直線間距離算出手
段と、このラン直線間距離算出手段で算出された距離の
最大値とあらかじめ定めておいた閾値とを比較する距離
最大値吟味手段と、この距離最大値吟味手段での比較に
よって最大値があらかじめ定めておいた閾値以上である
場合にこの最大値を与えるランデータを除外するランデ
ータ編集手段と、最大値があらかじめ定めておいた閾値
未満である場合にランデータ格納手段に格納されている
ランデータの位置に相当する部分を画像上で白画素に置
き換えるラン消去手段とを設けることを特徴とする。こ
れにより、文字認識の妨げとなる罫線を、ランのうち、
ラン長が最頻値から大きく異なるもの、回帰直線とラン
との距離が大きい物を消去対象から外し、それ以外の回
帰直線付近のランを消去することで、罫線に文字が接触
していても、高い精度で罫線を構成する画素を同定する
ことができるので、誤って文字を消すようなことがな
く、罫線にかすれがあった場合や、点線罫線の場合でも
精度良く消去することが可能な画像処理装置を実現する
ことができる。
In an image processing apparatus for performing optical character recognition, image input means for capturing an image to be processed, image data storage means for storing image data captured by the image input means, and image data storage means Ruled line position estimating means for estimating the position of a ruled line in the image data stored in the means; and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated by the ruled line position estimating means. Extraction means, run data storage means for storing the runs extracted by the vertical run extraction means, and run length histogram for obtaining a histogram indicating the distribution of the length of the run data extracted by the vertical run extraction means Calculation means; run length mode value calculation means for obtaining a mode value of the length from the histogram obtained by the run length histogram calculation means; Different-length run data exclusion means for excluding runs having a length significantly different from the mode of the length determined by the long mode calculation means from data, and image data not excluded by the different-length run data exclusion means Regression line calculation means for obtaining a regression line passing through the center of the run data stored in the storage means; and run line distance calculation means for obtaining a distance between the regression line calculated by the regression line calculation means and the run data; Distance maximum value examination means for comparing the maximum value of the distance calculated by the run straight line distance calculation means with a predetermined threshold, and the maximum value was previously determined by comparison with this distance maximum value examination means. A run data editing unit for excluding run data that gives the maximum value when the maximum value is equal to or more than the threshold value; and a run data storage unit when the maximum value is less than a predetermined threshold value. And characterized by providing a run-erasing means for replacing the white pixels to a portion corresponding to the position of the run data stored in the image to. As a result, ruled lines that hinder character recognition
If the run length is significantly different from the mode value, objects with a large distance between the regression line and the run are excluded from the deletion target, and runs near the other regression lines are deleted, so that even if characters touch the ruled line, Since the pixels that make up the ruled line can be identified with high precision, characters can be erased with accuracy, even if the ruled line is blurred or a dotted ruled line is not erased by mistake. An image processing device can be realized.

【0032】さらに、光学的文字認識を実行する画像処
理方法において、処理対象の画像を取り込む画像入力過
程と、この画像入力過程で取り込んだ画像データを格納
する画像データ格納過程と、この画像データ格納過程で
格納された画像データ中の罫線の位置を推定する罫線位
置推定過程と、この罫線位置推定過程で推定された罫線
の推定位置付近で罫線と垂直な方向の黒ランを抽出する
垂直方向ラン抽出過程と、この垂直方向ラン抽出過程で
抽出されたランを格納しておくランデータ格納過程と、
垂直方向ラン抽出過程で抽出されたランデータの中心を
通る回帰直線を求める回帰直線算出過程と、この回帰直
線算出過程で算出された回帰直線とランデータの距離を
求めるラン直線間距離算出過程と、このラン直線間距離
算出過程で算出された距離の最大値とあらかじめ定めて
おいた閾値とを比較する距離最大値吟味過程と、この距
離最大値吟味過程での比較によって最大値があらかじめ
定めておいた閾値以上である場合にこの最大値を与える
ランデータを除外するランデータ編集過程と、最大値が
あらかじめ定めておいた閾値未満である場合にランデー
タ格納過程に格納されているランデータの位置に相当す
る部分を画像上で白画素に置き換えるラン消去過程とを
具備することを特徴とする。これにより、文字認識の妨
げとなる罫線を、回帰直線とランとの距離が大きい物を
残し、それ以外の回帰直線付近のランを消去すること
で、罫線に文字が接触していても、高い精度で罫線を構
成する画素を同定することができるので、誤って文字を
消すようなことがなく、罫線にかすれがあった場合や、
点線罫線の場合でも精度良く消去することが可能な画像
処理方法を実現することができる。
Further, in an image processing method for performing optical character recognition, an image inputting step of capturing an image to be processed, an image data storing step of storing image data captured in the image inputting step, and an image data storing step of storing the image data A ruled line position estimating process for estimating the position of the ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process An extraction process, a run data storage process for storing the runs extracted in the vertical run extraction process,
A regression line calculation process for obtaining a regression line passing through the center of the run data extracted in the vertical direction run extraction process, a run line distance calculation process for obtaining a distance between the regression line calculated in the regression line calculation process and the run data, The maximum value of the distance calculated in the run straight line distance calculation process is compared with a predetermined threshold value, and the maximum value is determined in advance by comparison in the distance maximum value inspection process. A run data editing process that excludes run data that gives the maximum value when the maximum value is equal to or greater than the set threshold value, and a run data storage process that stores the run data stored in the run data storage process when the maximum value is less than a predetermined threshold value. A run erasing step of replacing a portion corresponding to the position with a white pixel on the image. As a result, a ruled line that hinders character recognition is removed even if a character is in contact with the ruled line by leaving a large distance between the regression line and the run and deleting runs near the other regression line. Since the pixels that make up the ruled line can be identified with high accuracy, characters are not accidentally erased.
It is possible to realize an image processing method capable of accurately deleting even a dotted ruled line.

【0033】また、光学的文字認識を実行する画像処理
方法において、処理対象の画像を取り込む画像入力過程
と、この画像入力過程で取り込んだ画像データを格納す
る画像データ格納過程と、この画像データ格納過程で格
納された画像データ中の罫線の位置を推定する罫線位置
推定過程と、この罫線位置推定過程で推定された罫線の
推定位置付近で罫線と垂直な方向の黒ランを抽出する垂
直方向ラン抽出過程と、この垂直方向ラン抽出過程で抽
出されたランを格納しておくランデータ格納過程と、垂
直方向ラン抽出過程で抽出されたランデータの長さの分
布を示すヒストグラムを求めるラン長ヒストグラム算出
過程と、このラン長ヒストグラム算出過程が求めたヒス
トグラムの中から長さの最頻値を求めるラン長最頻値算
出過程と、このラン長最頻値算出過程が求めた長さの最
頻値と大きく異なる長さを持つランをデータから除外す
る異長ランデータ除外過程と、この異長ランデータ除外
過程で除外されなかった画像データ格納過程に格納され
ているランデータの中心を通る回帰直線を求める回帰直
線算出過程と、この回帰直線算出過程で算出された回帰
直線とランデータの距離を求めるラン直線間距離算出過
程と、このラン直線間距離算出過程で算出された距離の
最大値とあらかじめ定めておいた閾値とを比較する距離
最大値吟味過程と、この距離最大値吟味過程での比較に
よって最大値があらかじめ定めておいた閾値以上である
場合にこの最大値を与えるランデータを除外するランデ
ータ編集過程と、最大値があらかじめ定めておいた閾値
未満である場合にランデータ格納過程に格納されている
ランデータの位置に相当する部分を画像上で白画素に置
き換えるラン消去過程とを具備することを特徴とする。
これにより、文字認識の妨げとなる罫線を、ランのう
ち、ラン長が最頻値から大きく異なるもの、回帰直線と
ランとの距離が大きい物を消去対象から外し、それ以外
の回帰直線付近のランを消去することで、罫線に文字が
接触していても、高い精度で罫線を構成する画素を同定
することができるので、誤って文字を消すようなことが
なく、罫線にかすれがあった場合や、点線罫線の場合で
も精度良く消去することが可能な画像処理方法を実現す
ることができる。
In an image processing method for performing optical character recognition, an image inputting step of capturing an image to be processed, an image data storing step of storing image data captured in the image inputting step, and an image data storing step A ruled line position estimating process for estimating the position of the ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process An extraction process, a run data storage process for storing the runs extracted in the vertical run extraction process, and a run length histogram for obtaining a histogram indicating the distribution of the length of the run data extracted in the vertical run extraction process Calculating a run length mode from the histogram obtained by the run length histogram calculating process. A different-length run data exclusion process for excluding runs having a length significantly different from the mode of the length determined by the long mode calculation process, and image data not excluded in the different-length run data exclusion process A regression line calculation process for obtaining a regression line passing through the center of the run data stored in the storage process, a run line distance calculation process for obtaining a distance between the regression line calculated in the regression line calculation process and the run data, A maximum distance value examination process in which the maximum value of the distance calculated in the run straight line distance calculation process is compared with a predetermined threshold value, and a maximum value is determined in advance by comparison in the distance maximum value examination process. A run data editing process for excluding the run data that gives the maximum value when the maximum value is equal to or more than the threshold value, and a run data storage error when the maximum value is less than the predetermined threshold value. Characterized by comprising a run erasing process to replace the white pixel portion corresponding to the position of the run data stored in the image to.
As a result, ruled lines that hinder character recognition are excluded from runs that have run lengths that are significantly different from the mode, and that have a large distance between the regression line and the run. By erasing the run, even if a character is in contact with the ruled line, it is possible to identify the pixels constituting the ruled line with high accuracy, so that the character is not erased by mistake and the ruled line is blurred. It is possible to realize an image processing method capable of accurately deleting even a case or a dotted ruled line.

【0034】さらに、光学的文字認識を実行する処理方
法をコンピュータに実現させるプログラムを格納しコン
ピュータから読み取り可能な記録媒体において、処理対
象の画像を取り込む画像入力機能と、この画像入力機能
で取り込んだ画像データを格納する画像データ格納機能
と、この画像データ格納機能で格納された画像データ中
の罫線の位置を推定する罫線位置推定機能と、この罫線
位置推定機能で推定された罫線の推定位置付近で罫線と
垂直な方向の黒ランを抽出する垂直方向ラン抽出機能
と、この垂直方向ラン抽出機能で抽出されたランを格納
しておくランデータ格納機能と、垂直方向ラン抽出機能
で抽出されたランデータの中心を通る回帰直線を求める
回帰直線算出機能と、この回帰直線算出機能で算出され
た回帰直線とランデータの距離を求めるラン直線間距離
算出機能と、このラン直線間距離算出機能で算出された
距離の最大値とあらかじめ定めておいた閾値とを比較す
る距離最大値吟味機能と、この距離最大値吟味機能での
比較によって最大値があらかじめ定めておいた閾値以上
である場合にこの最大値を与えるランデータを除外する
ランデータ編集機能と、最大値があらかじめ定めておい
た閾値未満である場合にランデータ格納機能に格納され
ているランデータの位置に相当する部分を画像上で白画
素に置き換えるラン消去機能とを具備することを特徴と
する。これにより、文字認識の妨げとなる罫線を、回帰
直線とランとの距離が大きい物を残し、それ以外の回帰
直線付近のランを消去することで、罫線に文字が接触し
ていても、高い精度で罫線を構成する画素を同定するこ
とができるので、誤って文字を消すようなことがなく、
罫線にかすれがあった場合や、点線罫線の場合でも精度
良く消去することが可能な画像処理方法をコンピュータ
に実現させるプログラムを格納したコンピュータから読
み取り可能な記録媒体を実現することができる。
Further, an image input function for taking in an image to be processed in a recording medium which stores a program for realizing a processing method for performing optical character recognition in a computer and which is readable by the computer, An image data storage function for storing image data; a ruled line position estimating function for estimating a ruled line position in the image data stored by the image data storing function; and a ruled line estimated position estimated by the ruled line position estimating function The vertical run extraction function that extracts black runs in the direction perpendicular to the ruled line, the run data storage function that stores the runs extracted by this vertical run extraction function, and the vertical run extraction function A regression line calculation function for finding a regression line that passes through the center of the run data, and the regression line Distance-to-run-line distance calculation function to find the distance of the data, a distance-maximum value examination function to compare the maximum value of the distance calculated by the run-line-to-line distance calculation function with a predetermined threshold value, and this distance maximum value A run data editing function that excludes run data that gives this maximum value when the maximum value is equal to or greater than a predetermined threshold value by comparison with the examination function, and a case where the maximum value is less than the predetermined threshold value A run erasing function for replacing a portion corresponding to the position of the run data stored in the run data storage function with a white pixel on an image. As a result, a ruled line that hinders character recognition is removed even if a character is in contact with the ruled line by leaving a large distance between the regression line and the run and deleting runs near the other regression line. Since the pixels that make up the ruled line can be identified with high accuracy, characters are not accidentally erased,
It is possible to realize a computer-readable recording medium that stores a program for causing a computer to implement an image processing method capable of accurately deleting even a ruled line that is blurred or a dotted ruled line.

【0035】また、光学的文字認識を実行する処理方法
をコンピュータに実現させるプログラムを格納しコンピ
ュータから読み取り可能な記録媒体において、処理対象
の画像を取り込む画像入力機能と、この画像入力機能で
取り込んだ画像データを格納する画像データ格納機能
と、この画像データ格納機能で格納された画像データ中
の罫線の位置を推定する罫線位置推定機能と、この罫線
位置推定機能で推定された罫線の推定位置付近で罫線と
垂直な方向の黒ランを抽出する垂直方向ラン抽出機能
と、この垂直方向ラン抽出機能で抽出されたランを格納
しておくランデータ格納機能と、垂直方向ラン抽出機能
で抽出されたランデータの長さの分布を示すヒストグラ
ムを求めるラン長ヒストグラム算出機能と、このラン長
ヒストグラム算出機能で求めたヒストグラムの中から長
さの最頻値を求めるラン長最頻値算出機能と、このラン
長最頻値算出機能で求めた長さの最頻値と大きく異なる
長さを持つランをデータから除外する異長ランデータ除
外機能と、この異長ランデータ除外機能で除外されなか
った画像データ格納機能に格納されているランデータの
中心を通る回帰直線を求める回帰直線算出機能と、この
回帰直線算出機能で算出された回帰直線とランデータの
距離を求めるラン直線間距離算出機能と、このラン直線
間距離算出機能で算出された距離の最大値とあらかじめ
定めておいた閾値とを比較する距離最大値吟味機能と、
この距離最大値吟味機能での比較によって最大値があら
かじめ定めておいた閾値以上である場合にこの最大値を
与えるランデータを除外するランデータ編集機能と、最
大値があらかじめ定めておいた閾値未満である場合にラ
ンデータ格納機能に格納されているランデータの位置に
相当する部分を画像上で白画素に置き換えるラン消去機
能とを具備することを特徴とする。これにより、文字認
識の妨げとなる罫線を、ランのうち、ラン長が最頻値か
ら大きく異なるもの、回帰直線とランとの距離が大きい
物を消去対象から外し、それ以外の回帰直線付近のラン
を消去することで、罫線に文字が接触していても、高い
精度で罫線を構成する画素を同定することができるの
で、誤って文字を消すようなことがなく、罫線にかすれ
があった場合や、点線罫線の場合でも精度良く消去する
ことが可能な画像処理方法をコンピュータに実現させる
プログラムを格納したコンピュータから読み取り可能な
記録媒体を実現することができる。
Further, an image input function for capturing an image to be processed on a recording medium which stores a program for causing a computer to execute a processing method for performing optical character recognition and which is readable from the computer, and an image input function for capturing the image to be processed. An image data storage function for storing image data; a ruled line position estimating function for estimating a ruled line position in the image data stored by the image data storing function; and a ruled line estimated position estimated by the ruled line position estimating function The vertical run extraction function that extracts black runs in the direction perpendicular to the ruled line, the run data storage function that stores the runs extracted by this vertical run extraction function, and the vertical run extraction function Run length histogram calculation function for obtaining a histogram indicating the distribution of run data lengths, and run length histogram calculation function A run length mode value calculation function for finding the mode value of the length from the obtained histogram, and a run having a length significantly different from the mode value of the length obtained by this run length mode value calculation function A regression line calculation function for finding a regression line that passes through the center of the run data stored in the image data storage function that has not been excluded by the different-length run data removal function. A run straight line distance calculating function for calculating a distance between the regression line calculated by the straight line calculating function and the run data is compared with a predetermined threshold value and a maximum value of the distance calculated by the run straight line distance calculating function. Distance maximum value examination function,
A run data editing function that excludes run data that gives this maximum value when the maximum value is greater than or equal to a predetermined threshold by comparison with this distance maximum value examination function, and a maximum value that is less than a predetermined threshold And a run erasing function for replacing a portion corresponding to the position of the run data stored in the run data storage function with a white pixel on the image. As a result, ruled lines that hinder character recognition are excluded from runs that have run lengths that differ significantly from the mode, and that have a large distance between the regression line and the run. By erasing the run, even if a character is in contact with the ruled line, the pixels constituting the ruled line can be identified with high accuracy, so that the character was not erased accidentally and the ruled line was blurred. It is possible to realize a computer-readable recording medium that stores a program for causing a computer to implement an image processing method capable of accurately deleting even a dotted line or a ruled line.

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

【図1】本発明の画像処理装置の一実施の形態の構成を
示すブロック図。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention.

【図2】図1の実施の形態の処理動作を示すフローチャ
ート。
FIG. 2 is a flowchart showing a processing operation of the embodiment of FIG. 1;

【図3】図1の実施の形態の罫線消去動作を示す説明
図。
FIG. 3 is an explanatory diagram showing a ruled line erasing operation according to the embodiment of FIG. 1;

【図4】図1の実施の形態の罫線消去動作を示す説明
図。
FIG. 4 is an explanatory diagram showing a ruled line erasing operation according to the embodiment of FIG. 1;

【図5】図1の実施の形態の罫線消去動作を示す説明
図。
FIG. 5 is an explanatory diagram showing a ruled line erasing operation according to the embodiment of FIG. 1;

【図6】本発明の画像処理装置の他の実施の形態の構成
を示すブロック図。
FIG. 6 is a block diagram showing a configuration of another embodiment of the image processing apparatus of the present invention.

【図7】図6の実施の形態の処理動作の図2に対する追
加分を示すフローチャート。
FIG. 7 is a flowchart showing an addition of the processing operation of the embodiment in FIG. 6 to FIG. 2;

【図8】図6の実施の形態の罫線消去動作を示す説明
図。
FIG. 8 is an explanatory diagram showing a ruled line erasing operation according to the embodiment of FIG. 6;

【図9】本発明のさらに他の実施の形態の構成を表すブ
ロック図。
FIG. 9 is a block diagram showing a configuration of still another embodiment of the present invention.

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

1 画像入力手段 2 画像格納手段 3 罫線位置推定手段 4 垂直方向ラン抽出手段 5 ランデータ格納手段 6 回帰直線算出手段 7 ラン消去手段 8 ラン直線間距離算出手段 9 ランデータ編集手段 10 距離最大値吟味手段 21 ラン長ヒストグラム算出手段 22 ラン長最頻値算出手段 23 異長ランデータ除外手段 31 CPU 32 メモリ 33 ハードディスク 34 入力装置 35 CD−ROMドライブ 36 ディスプレイ 37 記録媒体 DESCRIPTION OF SYMBOLS 1 Image input means 2 Image storage means 3 Ruled line position estimation means 4 Vertical direction run extraction means 5 Run data storage means 6 Regression line calculation means 7 Run elimination means 8 Run straight line distance calculation means 9 Run data editing means 10 Distance maximum value examination Means 21 Run length histogram calculating means 22 Run length mode value calculating means 23 Different length run data excluding means 31 CPU 32 Memory 33 Hard disk 34 Input device 35 CD-ROM drive 36 Display 37 Recording medium

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 光学的文字認識を実行する画像処理装置
において、 処理対象の画像を取り込む画像入力手段と、 この画像入力手段が取り込んだ画像データを格納する画
像データ格納手段と、 この画像データ格納手段に格納された前記画像データ中
の罫線の位置を推定する罫線位置推定手段と、 この罫線位置推定手段で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出手段と、 この垂直方向ラン抽出手段で抽出されたランを格納して
おくランデータ格納手段と、 前記垂直方向ラン抽出手段で抽出されたランデータの中
心を通る回帰直線を求める回帰直線算出手段と、 この回帰直線算出手段で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出手段と、 このラン直線間距離算出手段で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味手段と、 この距離最大値吟味手段での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集手
段と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納手段に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去手段とを具備することを特徴とする画像処理装
置。
1. An image processing apparatus for performing optical character recognition, comprising: image input means for capturing an image to be processed; image data storage means for storing image data captured by the image input means; Ruled line position estimating means for estimating the position of the ruled line in the image data stored in the means; and a vertical line for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated by the ruled line position estimating means. Direction run extraction means, run data storage means for storing runs extracted by the vertical direction run extraction means, regression line for finding a regression line passing through the center of the run data extracted by the vertical direction run extraction means Calculating means; run straight line distance calculating means for calculating the distance between the regression line calculated by the regression straight line calculating means and the run data; Means for examining the maximum value of the distance calculated by the means and a predetermined threshold, and a means for examining the maximum value, wherein the maximum value is greater than or equal to the predetermined threshold by comparison with the means for examining the maximum distance. A run data editing unit that excludes run data that gives the maximum value in a certain case; and a position corresponding to the position of the run data stored in the run data storage unit when the maximum value is less than a predetermined threshold. An image processing apparatus comprising: run erasing means for replacing a portion to be replaced with a white pixel on an image.
【請求項2】 光学的文字認識を実行する画像処理装置
において、 処理対象の画像を取り込む画像入力手段と、 この画像入力手段が取り込んだ画像データを格納する画
像データ格納手段と、 この画像データ格納手段に格納された前記画像データ中
の罫線の位置を推定する罫線位置推定手段と、 この罫線位置推定手段で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出手段と、 この垂直方向ラン抽出手段で抽出されたランを格納して
おくランデータ格納手段と、 前記垂直方向ラン抽出手段で抽出されたランデータの長
さの分布を示すヒストグラムを求めるラン長ヒストグラ
ム算出手段と、 このラン長ヒストグラム算出手段が求めたヒストグラム
の中から長さの最頻値を求めるラン長最頻値算出手段
と、 このラン長最頻値算出手段が求めた長さの最頻値と大き
く異なる長さを持つランをデータから除外する異長ラン
データ除外手段と、 この異長ランデータ除外手段で除外されなかった前記画
像データ格納手段に格納されている前記ランデータの中
心を通る回帰直線を求める回帰直線算出手段と、 この回帰直線算出手段で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出手段と、 このラン直線間距離算出手段で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味手段と、 この距離最大値吟味手段での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集手
段と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納手段に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去手段とを具備することを特徴とする画像処理装
置。
2. An image processing apparatus for performing optical character recognition, comprising: image input means for capturing an image to be processed; image data storage means for storing image data captured by the image input means; Ruled line position estimating means for estimating the position of the ruled line in the image data stored in the means; and a vertical line for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated by the ruled line position estimating means. Direction run extraction means, run data storage means for storing runs extracted by the vertical direction run extraction means, and a histogram showing the distribution of the length of the run data extracted by the vertical direction run extraction means A run length histogram calculating means, and a run length mode value calculating means for obtaining a mode value of the length from the histogram obtained by the run length histogram calculating means. A run length data exclusion unit for excluding a run having a length significantly different from the mode value of the length obtained by the run length mode calculation unit from the data; Regression line calculation means for obtaining a regression line passing through the center of the run data stored in the image data storage means, and a run line for obtaining a distance between the regression line calculated by the regression line calculation means and the run data Distance distance calculating means, distance maximum value examining means for comparing the maximum value of the distance calculated by the run straight line distance calculating means with a predetermined threshold, and said distance maximum value examining means Run data editing means for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value; and the maximum value is predetermined. And a run erasing unit for replacing a portion corresponding to the position of the run data stored in the run data storage unit with a white pixel on the image when the value is smaller than the threshold value.
【請求項3】 光学的文字認識を実行する画像処理方法
において、 処理対象の画像を取り込む画像入力過程と、 この画像入力過程で取り込んだ画像データを格納する画
像データ格納過程と、 この画像データ格納過程で格納された前記画像データ中
の罫線の位置を推定する罫線位置推定過程と、 この罫線位置推定過程で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出過程と、 この垂直方向ラン抽出過程で抽出されたランを格納して
おくランデータ格納過程と、 前記垂直方向ラン抽出過程で抽出されたランデータの中
心を通る回帰直線を求める回帰直線算出過程と、 この回帰直線算出過程で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出過程と、 このラン直線間距離算出過程で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味過程と、 この距離最大値吟味過程での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集過
程と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納過程に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去過程とを具備することを特徴とする画像処理方
法。
3. An image processing method for performing optical character recognition, comprising: an image inputting step of capturing an image to be processed; an image data storing step of storing image data captured in the image inputting step; A ruled line position estimating step of estimating a position of a ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process A direction run extraction process, a run data storage process for storing runs extracted in the vertical run extraction process, and a regression line for finding a regression line passing through the center of the run data extracted in the vertical run extraction process. A calculation step; a run-to-run-line distance calculating step for obtaining a distance between the regression line calculated in the regression-line calculation step and the run data; A distance maximum value examination process for comparing the maximum value of the distance calculated in the process with a predetermined threshold value, and the maximum value is equal to or greater than the predetermined threshold value by comparison in the distance maximum value examination process. A run data editing process for excluding run data that gives the maximum value in some cases; and a run data editing process corresponding to the position of the run data stored in the run data storage process when the maximum value is less than a predetermined threshold. A run erasing step of replacing a portion to be replaced with a white pixel on an image.
【請求項4】 光学的文字認識を実行する画像処理方法
において、 処理対象の画像を取り込む画像入力過程と、 この画像入力過程で取り込んだ画像データを格納する画
像データ格納過程と、 この画像データ格納過程で格納された前記画像データ中
の罫線の位置を推定する罫線位置推定過程と、 この罫線位置推定過程で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出過程と、 この垂直方向ラン抽出過程で抽出されたランを格納して
おくランデータ格納過程と、 前記垂直方向ラン抽出過程で抽出されたランデータの長
さの分布を示すヒストグラムを求めるラン長ヒストグラ
ム算出過程と、 このラン長ヒストグラム算出過程が求めたヒストグラム
の中から長さの最頻値を求めるラン長最頻値算出過程
と、 このラン長最頻値算出過程が求めた長さの最頻値と大き
く異なる長さを持つランをデータから除外する異長ラン
データ除外過程と、 この異長ランデータ除外過程で除外されなかった前記画
像データ格納過程に格納されている前記ランデータの中
心を通る回帰直線を求める回帰直線算出過程と、 この回帰直線算出過程で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出過程と、 このラン直線間距離算出過程で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味過程と、 この距離最大値吟味過程での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集過
程と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納過程に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去過程とを具備することを特徴とする画像処理方
法。
4. An image processing method for performing optical character recognition, comprising: an image inputting step of capturing an image to be processed; an image data storing step of storing image data captured in the image inputting step; A ruled line position estimating step of estimating a position of a ruled line in the image data stored in the process, and a vertical run for extracting a black run in a direction perpendicular to the ruled line near the estimated position of the ruled line estimated in the ruled line position estimating process A direction run extraction process, a run data storage process for storing the runs extracted in the vertical run extraction process, and a histogram showing the distribution of the length of the run data extracted in the vertical run extraction process. A run length histogram calculation process, and a run length mode value calculation process for obtaining a mode value of the length from the histogram obtained by the run length histogram calculation process. The run length mode calculation step excludes runs having a length significantly different from the mode of the length obtained by the run length mode calculation process from the data. A regression line calculation step for obtaining a regression line passing through the center of the run data stored in the image data storage step, and a run line for obtaining a distance between the regression line calculated in the regression line calculation step and the run data. A distance maximum value examining process for comparing the maximum value of the distance calculated in the run straight line distance calculating process with a predetermined threshold value; and a comparison in the distance maximum value examining process. A run data editing process for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value; and wherein the maximum value is predetermined. A run erasing step of replacing a portion corresponding to the position of the run data stored in the run data storing step with a white pixel on the image when the difference is less than the threshold value.
【請求項5】 光学的文字認識を実行する処理方法をコ
ンピュータに実現させるプログラムを格納した記録媒体
において、 処理対象の画像を取り込む画像入力機能と、 この画像入力機能で取り込んだ画像データを格納する画
像データ格納機能と、 この画像データ格納機能で格納された前記画像データ中
の罫線の位置を推定する罫線位置推定機能と、 この罫線位置推定機能で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出機能と、 この垂直方向ラン抽出機能で抽出されたランを格納して
おくランデータ格納機能と、 前記垂直方向ラン抽出機能で抽出されたランデータの中
心を通る回帰直線を求める回帰直線算出機能と、 この回帰直線算出機能で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出機能と、 このラン直線間距離算出機能で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味機能と、 この距離最大値吟味機能での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集機
能と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納機能に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去機能とを具備することを特徴とする画像処理方
法のプログラムを格納したコンピュータから読み取り可
能な記録媒体。
5. A recording medium storing a program for causing a computer to implement a processing method for performing optical character recognition, comprising: an image input function for capturing an image to be processed; and image data captured by the image input function. An image data storage function; a ruled line position estimating function for estimating a position of a ruled line in the image data stored by the image data storing function; and a ruled line near the estimated position of the ruled line estimated by the ruled line position estimating function. A vertical run extraction function for extracting a vertical black run; a run data storage function for storing runs extracted by the vertical run extraction function; and run data extracted by the vertical run extraction function. A regression line calculation function for obtaining a regression line passing through the center of the line, and a distance between the regression line calculated by the regression line calculation function and the run data. A function for calculating the distance between run straight lines, a function for examining the maximum value of the distance calculated by the function for calculating distance between run straight lines and a predetermined threshold value, and a function for examining the maximum distance value. A run data editing function for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value by comparison; and when the maximum value is less than a predetermined threshold value, A run erasing function for replacing a portion corresponding to the position of the run data stored in the run data storage function with a white pixel on an image. recoding media.
【請求項6】 光学的文字認識を実行する処理方法をコ
ンピュータに実現させるプログラムを格納した記録媒体
において、 処理対象の画像を取り込む画像入力機能と、 この画像入力機能で取り込んだ画像データを格納する画
像データ格納機能と、 この画像データ格納機能で格納された前記画像データ中
の罫線の位置を推定する罫線位置推定機能と、 この罫線位置推定機能で推定された罫線の推定位置付近
で前記罫線と垂直な方向の黒ランを抽出する垂直方向ラ
ン抽出機能と、 この垂直方向ラン抽出機能で抽出されたランを格納して
おくランデータ格納機能と、 前記垂直方向ラン抽出機能で抽出されたランデータの長
さの分布を示すヒストグラムを求めるラン長ヒストグラ
ム算出機能と、 このラン長ヒストグラム算出機能で求めたヒストグラム
の中から長さの最頻値を求めるラン長最頻値算出機能
と、 このラン長最頻値算出機能で求めた長さの最頻値と大き
く異なる長さを持つランをデータから除外する異長ラン
データ除外機能と、 この異長ランデータ除外機能で除外されなかった前記画
像データ格納機能に格納されている前記ランデータの中
心を通る回帰直線を求める回帰直線算出機能と、 この回帰直線算出機能で算出された回帰直線と前記ラン
データの距離を求めるラン直線間距離算出機能と、 このラン直線間距離算出機能で算出された距離の最大値
とあらかじめ定めておいた閾値とを比較する距離最大値
吟味機能と、 この距離最大値吟味機能での比較によって前記最大値が
あらかじめ定めておいた前記閾値以上である場合にこの
最大値を与えるランデータを除外するランデータ編集機
能と、 前記最大値があらかじめ定めておいた閾値未満である場
合に前記ランデータ格納機能に格納されているランデー
タの位置に相当する部分を画像上で白画素に置き換える
ラン消去機能とを具備することを特徴とする画像処理方
法のプログラムを格納したコンピュータから読み取り可
能な記録媒体。
6. A recording medium storing a program for causing a computer to execute a processing method for performing optical character recognition, an image input function for capturing an image to be processed, and image data captured by the image input function. An image data storage function; a ruled line position estimating function for estimating a position of a ruled line in the image data stored by the image data storing function; and a ruled line near the estimated position of the ruled line estimated by the ruled line position estimating function. A vertical run extraction function for extracting a vertical black run; a run data storage function for storing runs extracted by the vertical run extraction function; and run data extracted by the vertical run extraction function. Run length histogram calculation function to obtain a histogram indicating the distribution of the length of the histogram, and the histogram obtained by the run length histogram calculation function Run length mode value calculation function to find the mode value of the length from the system, and runs with lengths significantly different from the mode value of the length obtained by this run length mode value calculation function are excluded from the data. A regression line calculation function for obtaining a regression line passing through the center of the run data stored in the image data storage function that has not been excluded by the different-length run data removal function; A run straight line distance calculating function for finding the distance between the regression straight line calculated by the straight line calculating function and the run data, and comparing the maximum value of the distance calculated by the run straight line distance calculating function with a predetermined threshold value And a run for excluding run data that gives the maximum value when the maximum value is equal to or greater than the predetermined threshold value by comparison between the distance maximum value examination function and the distance maximum value examination function. A data editing function, and a run erasing function for replacing a portion corresponding to the position of the run data stored in the run data storage function with a white pixel on an image when the maximum value is less than a predetermined threshold value. And a computer-readable recording medium storing a program for an image processing method.
JP2000265831A 2000-09-01 2000-09-01 Image processing apparatus, image processing method, and recording medium Expired - Fee Related JP4108910B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000265831A JP4108910B2 (en) 2000-09-01 2000-09-01 Image processing apparatus, image processing method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000265831A JP4108910B2 (en) 2000-09-01 2000-09-01 Image processing apparatus, image processing method, and recording medium

Publications (2)

Publication Number Publication Date
JP2002074264A true JP2002074264A (en) 2002-03-15
JP4108910B2 JP4108910B2 (en) 2008-06-25

Family

ID=18753034

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000265831A Expired - Fee Related JP4108910B2 (en) 2000-09-01 2000-09-01 Image processing apparatus, image processing method, and recording medium

Country Status (1)

Country Link
JP (1) JP4108910B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8854691B2 (en) 2011-02-25 2014-10-07 Murata Machinery Ltd. Image processing apparatus and image processing method for extracting a line segment
JP2015036992A (en) * 2013-08-15 2015-02-23 コニカ ミノルタ ラボラトリー ユー.エス.エー.,インコーポレイテッド Method of removal of underlines and table lines in document images while preserving character strokes
JP2015172979A (en) * 2015-07-08 2015-10-01 株式会社東芝 Handwritten document processing device, method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8854691B2 (en) 2011-02-25 2014-10-07 Murata Machinery Ltd. Image processing apparatus and image processing method for extracting a line segment
JP2015036992A (en) * 2013-08-15 2015-02-23 コニカ ミノルタ ラボラトリー ユー.エス.エー.,インコーポレイテッド Method of removal of underlines and table lines in document images while preserving character strokes
JP2015172979A (en) * 2015-07-08 2015-10-01 株式会社東芝 Handwritten document processing device, method, and program

Also Published As

Publication number Publication date
JP4108910B2 (en) 2008-06-25

Similar Documents

Publication Publication Date Title
US10740899B2 (en) Image processing apparatus for identifying region within image, information processing method, and storage medium
JP2001092919A (en) Method for determining torsion angle of two-dimensional barcode
JP3615333B2 (en) Ruled line eraser
JPH10307889A (en) Character recognition method, its device and recording medium recording character recognition program
JP2002074264A (en) Image processing apparatus, image processing method, and recording medium
JP4420440B2 (en) Image processing apparatus, image processing method, character recognition apparatus, program, and recording medium
JP2008011484A (en) CHARACTER / GRAPHIC STRING EXTRACTION DEVICE, CHARACTER / GRAPHIC STRING EXTRACTION METHOD, PROGRAM FOR EXECUTING THE METHOD, RECORDING MEDIUM CONTAINING THE PROGRAM
JP4070486B2 (en) Image processing apparatus, image processing method, and program used to execute the method
JP2009193170A (en) Character recognition device and character recognition method
JP4162195B2 (en) Image processing apparatus and image processing program
JP2006072839A (en) Image processing method, image processing apparatus, image processing program, and recording medium
JP4878057B2 (en) Character recognition method, program, and recording medium
JP4040231B2 (en) Character extraction method and apparatus, and storage medium
JP2000082110A (en) Ruled line erasing device, character image extracting device, ruled line erasing method, character image extracting method, and recording medium
JP3343305B2 (en) Character extraction device and character extraction method
JPH10154191A (en) Business form identification method and device, and medium recording business form identification program
CN114240890B (en) A method, device, equipment and storage medium for removing blank space from text image
JP4580520B2 (en) Character recognition method and character recognition apparatus
JP2001236464A (en) Character extraction method, character extraction device, and storage medium
JP2010258627A (en) Image processing apparatus, image processing method, program, and storage medium
JP2008234223A (en) Image processing apparatus, image processing method, program, and recording medium
JP4571447B2 (en) Character image extraction program, character image extraction method, and character image extraction apparatus
JPH11242716A (en) Image processing method and recording medium
JP4810995B2 (en) Image processing apparatus, method, and program
JP2017111720A (en) Image processing device and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041221

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070814

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080204

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080401

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080403

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120411

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130411

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140411

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees