JPH0916701A - Bar code extracting device - Google Patents

Bar code extracting device

Info

Publication number
JPH0916701A
JPH0916701A JP7163376A JP16337695A JPH0916701A JP H0916701 A JPH0916701 A JP H0916701A JP 7163376 A JP7163376 A JP 7163376A JP 16337695 A JP16337695 A JP 16337695A JP H0916701 A JPH0916701 A JP H0916701A
Authority
JP
Japan
Prior art keywords
bar code
barcode
area
extracted
bar
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
JP7163376A
Other languages
Japanese (ja)
Other versions
JP3335265B2 (en
Inventor
Kazuhide Ushida
和秀 牛田
Hideo Kamata
英夫 鎌田
Tomohiro Matsuhashi
智浩 松橋
Hideyuki Inaoka
秀行 稲岡
Hidekazu Watabe
英一 渡部
Shunji Sakane
俊司 坂根
Satoshi Naoi
聡 直井
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16337695A priority Critical patent/JP3335265B2/en
Publication of JPH0916701A publication Critical patent/JPH0916701A/en
Application granted granted Critical
Publication of JP3335265B2 publication Critical patent/JP3335265B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE: To automatically extract a rectangular bar code area from inputted image data. CONSTITUTION: This device is provided with an image memory 21A, black/white pattern extracting part 25 for successively scanning all the areas of image data in the image memory 21A and extracting the area, where black/white patterns alternately appear in an extraction area, as a temporary bar code area, bar code discriminating part 26 for discriminating whether a left guard bar, center bar and right guard bar exist in the temporary bar code area or not and extracting the true bar code area, rectangular bar code range search part 27 for searching the rectangular range of the true bar code area, deciding the position of the rectangular area surrounding a bar code and extracting it as the rectangular bar code area, and bar code area comparator part 31 for comparing the extracted rectangular bar code area with an already extracted rectangular bar code area and registering the rectangular bar code area only when both the areas are not overlapped.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像データからバーコ
ード領域を自動的に抽出するバーコード抽出装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bar code extracting device for automatically extracting a bar code area from image data.

【0002】近年では、中小スーパーマーケットや、コ
ンビニエンスストアでもPOS端末装置の導入が進み、
バーコードによる金額精算、商品管理が主流となった。
そこで、電話料金、電気料金、ガス料金といった公共料
金の振込用紙にもバーコード(JANコード)を印刷す
ることで、従来、銀行か郵便局でしか支払いができなか
った前記公共料金も、今では中小スーパーマーケット
や、コンビニエンスストアでも支払いできるようになっ
た。
In recent years, POS terminal devices have been introduced in small and medium supermarkets and convenience stores,
The mainstream method is payment by bar code and product management.
Therefore, by printing a bar code (JAN code) on a transfer sheet for public charges such as telephone charges, electricity charges, and gas charges, the public charges that could only be paid by banks or post offices are now available. You can now pay at small and medium supermarkets and convenience stores.

【0003】しかし、バーコードが印刷された公共料金
の振込用紙を、使用者が銀行に持ち込んだ場合、銀行で
は前記振込用紙上のバーコードを読み取って自動的に処
理する手段が無いため、手作業で金額集計を行う必要が
あり、行員への負担が増加しているのが現状である。
However, when a user brings in a utility bill transfer paper on which a bar code is printed, the bank has no means for automatically processing by reading the bar code on the transfer paper. At present, it is necessary to collect the amount of money in the work, and the burden on the bank staff is increasing.

【0004】特に、法人企業の場合は一度に多量(例え
ば、100枚/1顧客)の振込用紙を持ち込むことが多
く、また、持ち込み時期も集中(例えば、毎月25日が
ピーク)する場合が多いため、銀行における公共料金等
の自動処理装置の開発が要求されている(例えば、或る
銀行では、公共料金だけで、40万枚/月処理してい
る)。
In particular, corporate companies often bring in a large amount of transfer paper (for example, 100 sheets / customer) at a time, and the time of carrying-in is often concentrated (for example, the 25th day of every month peaks). Therefore, there is a demand for the development of an automatic processing device for public utility charges in a bank (for example, a certain bank processes 400,000 public money per month).

【0005】このため、公共料金の振込用紙の多くはバ
ーコードが印刷されていることに注目し、例えば、帳票
類の読み取りを一度に大量処理できる一括読み取り型O
CR装置を利用してこのバーコードを認識することも考
えられている。しかし、バーコードが帳票イメージデー
タの何処の場所にあるのか不明であるため、バーコード
認識の前にバーコードの存在する領域を抽出する必要が
あるが、この技術は未だに開発されていないのが現状で
ある。
Therefore, paying attention to the fact that most of the bills for public utility bills are printed with a bar code, for example, a batch-reading type O which can process a large amount of reading of documents at one time.
It is also considered to recognize this barcode using a CR device. However, since it is unknown where the barcode is located in the form image data, it is necessary to extract the area where the barcode exists before the barcode is recognized, but this technology has not yet been developed. The current situation.

【0006】従って、前記バーコードの存在する領域を
抽出する技術が開発されないと、OCR装置にバーコー
ドの読み取り位置等を指示するための定義体を、帳票毎
に作成してOCR装置に入力する必要があり、極めて手
間と時間のかかる作業が必要になる。このため、前記O
CR装置をそのまま使用することはできず、この点の改
善が要望されていた。
Therefore, unless a technique for extracting the area in which the barcode exists is developed, a definition body for instructing the OCR device to read the barcode and the like is created for each form and input to the OCR device. It is necessary and requires extremely laborious and time-consuming work. Therefore, the O
The CR device cannot be used as it is, and improvement of this point has been demanded.

【0007】[0007]

【従来の技術】以下、図10、図11に基づいて従来例
を説明する。 §1:従来例1の説明・・・図10参照 図10は従来のPOS端末装置によるバーコード認識処
理の説明図であり、A図はPOS端末装置の説明図、B
図はバーコードの読み取り方法説明図である。なお、B
図の、、はレーザー光によるスキャン方向を示
す。
2. Description of the Related Art A conventional example will be described below with reference to FIGS. §1: Description of Conventional Example 1 ... See FIG. 10 FIG. 10 is an explanatory diagram of a barcode recognition process by a conventional POS terminal device, FIG. A is an explanatory diagram of the POS terminal device, and FIG.
The figure is an illustration of a method for reading a barcode. Note that B
In the figure, and indicate the scanning direction by the laser beam.

【0008】従来例1は、POS端末装置によりバーコ
ードの認識処理を行う例である。従来、バーコードを認
識処理する装置として、POS端末装置が知られてい
た。POS端末装置1は、バーコードリーダ2を備えて
おり、このバーコードリーダ2により商品3に貼られた
バーコードラベルのバーコード4を読み取るものであ
る。
Conventional example 1 is an example in which a POS terminal device performs a barcode recognition process. Conventionally, a POS terminal device has been known as a device for recognizing and processing a barcode. The POS terminal device 1 is equipped with a bar code reader 2, and the bar code reader 2 reads the bar code 4 of the bar code label attached to the product 3.

【0009】この場合、バーコードリーダ2からのレー
ザー光を商品3に貼られたバーコードラベルに照射して
スキャンし、その反射光を受光して電気信号に変換した
後、バーコードの認識処理が行われていた。前記のよう
にしてバーコードを読み取る際、B図の、、のよ
うにバーコードラベル上を色々な角度からスキャンする
ことによりバーコードの読み取りを行っていた。
In this case, laser light from the bar code reader 2 is applied to a bar code label attached to the product 3 for scanning, the reflected light is received and converted into an electric signal, and then bar code recognition processing is performed. Was being done. When the bar code is read as described above, the bar code is read by scanning the bar code label from various angles as shown by and in FIG.

【0010】また、前記バーコードリーダ2が、ハンド
スキャン型バーコードリーダの場合には、このハンドス
キャン型バーコードリーダを手に持ってバーコードラベ
ル上をなぞることでバーコードの読み取り、その後、バ
ーコードの認識処理を行っていた。
When the bar code reader 2 is a hand scan type bar code reader, the bar code is read by holding the hand scan type bar code reader in the hand and tracing over the bar code label, and thereafter, The barcode was being recognized.

【0011】§2:従来例2の説明・・・図11参照 図11は従来のOCR装置によるバーコード認識処理の
説明図である。従来例2は、OCR装置を使用してバー
コードの認識処理を行う例である。
§2: Description of Conventional Example 2 ... See FIG. 11 FIG. 11 is an explanatory diagram of a bar code recognition process by a conventional OCR device. Conventional example 2 is an example of performing a barcode recognition process using an OCR device.

【0012】従来、OCR装置を使用してバーコードの
認識処理を行うことが知られていた。前記OCR装置は
イメージスキャナで帳票等から情報を読み取り、そのイ
メージデータを取り込んで文字認識処理等を行う装置で
ある。前記OCR装置のように、イメージデータ処理の
世界では、ソフト的に文字等を認識しており、バーコー
ドも同様に認識している。
Conventionally, it has been known to perform bar code recognition processing using an OCR device. The OCR device is a device that reads information from a form or the like with an image scanner, captures the image data, and performs character recognition processing and the like. Like the OCR device, in the world of image data processing, characters and the like are recognized by software, and barcodes are recognized similarly.

【0013】しかし、従来の技術では、認識処理速度を
向上させる必要から、事前にバーコードの存在する領域
を、定義体により上位システムから指示していた。例え
ば、図示のように、OCR装置7に上位システム8を接
続した状態で、帳票9上のバーコードの認識処理を行う
場合、次のようにしていた。
However, in the conventional technique, the area in which the bar code is present is instructed from the host system by the definition body in advance in order to improve the recognition processing speed. For example, as shown in the figure, in the case where the barcode recognition process on the form 9 is performed in a state where the host system 8 is connected to the OCR device 7, the following is performed.

【0014】先ず、帳票9(読み取り対象の帳票を帳票
Aとする)の各種情報を定義体10で指定し、この定義
体10を上位システム8に入力した後、上位システム8
からOCR装置7に、前記定義体10の内容をダウンロ
ードする。そして、OCR装置7では、前記定義体10
の情報に従って、帳票上からバーコードの読み取りを行
い、バーコード認識処理を行う。なお、前記定義体は、
帳票上にあるバーコードの種類や位置情報(座標)等を
指定するものであり、各帳票毎に作成する。
First, various information of the form 9 (the form to be read is form A) is specified by the definition body 10, and this definition body 10 is input to the host system 8 and then the host system 8
The contents of the definition body 10 are downloaded to the OCR device 7 from. Then, in the OCR device 7, the definition body 10
According to the information of 1., the barcode is read from the form and the barcode recognition processing is performed. In addition, the definition is
It is used to specify the type of bar code on the form, position information (coordinates), etc., and is created for each form.

【0015】[0015]

【発明が解決しようとする課題】前記のような従来のも
のにおいては、次のような課題があった。 (1) :前記従来例1の場合、バーコードラベルをレーザ
ー光でスキャンすることでバーコードの読み取りを行う
ので、イメージデータからバーコードを抽出するといっ
た必要がなかった。
The above-mentioned prior art has the following problems. (1): In the case of the prior art example 1, the barcode is read by scanning the barcode label with a laser beam, so there is no need to extract the barcode from the image data.

【0016】しかし、このようなバーコード認識処理で
は、バーコードリーダにより、1つ1つの商品等に貼ら
れたバーコードラベルを手作業でスキャンする必要があ
り手間と時間がかかっていた。
However, in such a bar code recognition process, it is necessary to manually scan the bar code label attached to each product etc. by the bar code reader, which takes time and effort.

【0017】(2) :従来例2の場合、読み取り対象の帳
票毎に定義体を作成する必要があり、作成した定義体を
上位システムに入力し、上位システムからOCR装置へ
定義体をダウンロードする必要があった。すなわち、帳
票の種類が変わる都度、オペレータ等はその帳票に合っ
た定義体を作成し、上位システムからOCR装置へダウ
ンロードする必要があった。
(2): In the case of the conventional example 2, it is necessary to create a definition structure for each form to be read, the created definition structure is input to the host system, and the definition system is downloaded from the host system to the OCR device. There was a need. That is, every time the type of form changes, the operator or the like needs to create a definition structure suitable for the form and download it from the host system to the OCR device.

【0018】従って、手間と時間がかかりバーコード認
識処理の作業効率が低かった。特に、帳票の種類が多
く、大量の帳票をあつかう場合には、定義体を作成して
OCR装置へダウンロードする手間と時間が膨大なもの
になってしまい、実用的な方法ではない。
Therefore, it takes time and labor and the work efficiency of the barcode recognition processing is low. In particular, when there are many types of forms and a large amount of forms are to be handled, the time and effort required to create the definition program and download it to the OCR device become enormous, which is not a practical method.

【0019】本発明は、このような従来の課題を解決
し、従来のような定義体等を作成することなく、かつ手
作業を必要とすることなく、入力した画像データから、
バーコード矩形領域を自動的に抽出できるようにするこ
とを目的とする。
The present invention solves the conventional problems as described above, and from the input image data, without the need to create a conventional definition or the like and without the need for manual work.
The purpose is to be able to automatically extract a rectangular area of a barcode.

【0020】[0020]

【課題を解決するための手段】図1は本発明の原理説明
図である。本発明は前記の目的を達成するため、次のよ
うに構成した。
FIG. 1 is a diagram illustrating the principle of the present invention. The present invention is configured as follows to achieve the above object.

【0021】(1) :図1に示したように、バーコード抽
出装置に、画像データを格納するための画像メモリ21
Aと、画像メモリ21Aに格納された画像データからバ
ーコードを抽出するバーコード抽出部22と、予めバー
コードのパターン辞書を格納したパターン辞書格納部2
3と、新規に抽出されたバーコード矩形領域の位置座標
を格納する(登録する)バーコード位置座標格納部24
を設けた。
(1): As shown in FIG. 1, an image memory 21 for storing image data in the bar code extracting device.
A, a barcode extraction unit 22 that extracts a barcode from the image data stored in the image memory 21A, and a pattern dictionary storage unit 2 that stores a barcode pattern dictionary in advance.
3 and the barcode position coordinate storage unit 24 that stores (registers) the position coordinates of the newly extracted barcode rectangular area.
Was provided.

【0022】そして、前記バーコード抽出部22には、
黒/白パターン抽出部25と、バーコード判定部26
と、バーコード矩形範囲探索部27と、レフトガードバ
ー比較部28と、センターバー比較部29と、ライトガ
ードバー比較部30と、バーコード領域比較部31を設
けた。
Then, the bar code extracting section 22 has
Black / white pattern extraction unit 25 and barcode determination unit 26
A barcode rectangular range searching unit 27, a left guard bar comparing unit 28, a center bar comparing unit 29, a right guard bar comparing unit 30, and a barcode area comparing unit 31 are provided.

【0023】また、バーコード抽出装置を次のように構
成した。 (2) :バーコード抽出装置は、画像データを格納する画
像メモリ21Aと、画像メモリ21Aに格納された画像
データの全領域を順次走査して抽出ウインドゥ内に黒パ
ターンと白パターンが予め設定された閾値以内の間隔で
交互に出現する領域を仮バーコード領域として抽出し、
前記抽出した仮バーコード領域に対しバーコード特有の
情報が存在するか否かを判定して、真のバーコード領域
のみを抽出するバーコード抽出部22を備えている。
The bar code extracting device is constructed as follows. (2): The barcode extraction device sequentially scans the image memory 21A for storing the image data and the entire area of the image data stored in the image memory 21A to preset the black pattern and the white pattern in the extraction window. Areas that appear alternately at intervals within the specified threshold are extracted as temporary barcode areas,
The barcode extraction unit 22 is provided for determining whether or not information unique to the barcode exists in the extracted temporary barcode area and extracting only the true barcode area.

【0024】(3) :前記バーコード抽出装置において、
バーコード抽出部22は、抽出した仮バーコード領域に
バーコード特有の情報としてレフトガードバー、センタ
ーバー、ライトガードバーの各情報が存在するか否かを
判定し、前記各バーの情報が存在する場合にのみ、前記
仮バーコード領域を真のバーコード領域として抽出する
ように構成した。
(3): In the bar code extracting device,
The bar code extraction unit 22 determines whether or not each of the left guard bar, center bar, and right guard bar information exists as bar code-specific information in the extracted temporary bar code area, and when the information of each bar exists. Only, the temporary barcode area is extracted as a true barcode area.

【0025】(4) :前記バーコード抽出装置において、
バーコード抽出部22は、抽出した真のバーコード領域
の矩形範囲を探索してバーコードを囲む矩形領域の位置
を決定することにより、真のバーコード領域をバーコー
ド矩形領域として抽出するように構成した。
(4): In the bar code extracting device,
The barcode extraction unit 22 searches the rectangular range of the extracted true barcode area and determines the position of the rectangular area surrounding the barcode, so that the true barcode area is extracted as the barcode rectangular area. Configured.

【0026】(5) :前記バーコード抽出装置において、
バーコード抽出部22は、同一バーコードを二重に登録
しないために、新たに抽出したバーコード矩形領域を既
抽出済みのバーコード矩形領域と比較し、両者がオーバ
ーラップしていない場合にのみ、新たに抽出したバーコ
ード矩形領域を新規のバーコード矩形領域として登録す
るように構成した。
(5): In the bar code extracting device,
In order not to register the same barcode twice, the barcode extraction unit 22 compares the newly extracted barcode rectangular area with the already extracted barcode rectangular area, and only when the two do not overlap. The newly extracted barcode rectangular area is registered as a new barcode rectangular area.

【0027】(6) :バーコード抽出装置は、画像データ
を格納する画像メモリ21Aと、画像メモリ21Aに格
納された画像データの全領域を順次走査して、抽出ウイ
ンドゥ内に黒パターンと白パターンが交互に出現する領
域を仮バーコード領域として抽出する黒/白パターン抽
出部25と、黒/白パターン抽出部25が抽出した仮バ
ーコード領域にバーコード特有のレフトガードバー、セ
ンターバー、ライトガードバーが存在するか否かを判定
し、前記各バーが存在する場合にのみ、その領域を真の
バーコード領域として抽出するバーコード判定部26
と、バーコード判定部26が抽出した真のバーコード領
域の矩形範囲を探索してバーコードを囲む矩形領域の位
置を決定することにより、真のバーコード領域をバーコ
ード矩形領域として抽出するバーコード矩形範囲探索部
27と、バーコード矩形範囲探索部27が新たに抽出し
たバーコード矩形領域を既抽出済みのバーコード矩形領
域と比較し、両者がオーバーラップしていない場合にの
み、新たに抽出したバーコード矩形領域を新規のバーコ
ード矩形領域として登録するバーコード領域比較部31
を備えている。
(6): The bar code extracting device sequentially scans the image memory 21A for storing the image data and the entire area of the image data stored in the image memory 21A to obtain a black pattern and a white pattern in the extraction window. And the black / white pattern extraction unit 25 that extracts a region in which the characters alternately appear as a temporary barcode region, and a left guard bar, a center bar, and a right guard bar unique to the barcode in the temporary barcode region extracted by the black / white pattern extraction unit 25. A bar code determination unit 26 that determines whether or not each bar exists and extracts the area as a true bar code area only when each bar exists.
A bar for extracting the true barcode area as a barcode rectangular area by searching the rectangular area of the true barcode area extracted by the barcode determining unit 26 and determining the position of the rectangular area surrounding the barcode. The code rectangle range searching unit 27 and the barcode rectangle region newly extracted by the barcode rectangle range searching unit 27 are compared with the already extracted barcode rectangle regions, and a new barcode rectangle region is newly added only when they do not overlap each other. The barcode area comparison unit 31 that registers the extracted barcode rectangular area as a new barcode rectangular area
It has.

【0028】(7) :前記バーコード抽出装置において、
画像メモリ21Aは、帳票のイメージデータを2値のデ
ータに変換した2値の画像データを格納するメモリとし
て構成した。
(7): In the bar code extracting device,
The image memory 21A is configured as a memory for storing binary image data obtained by converting image data of a form into binary data.

【0029】[0029]

【作用】前記構成に基づく本発明の作用を、図1に基づ
いて説明する。図1において、入力された画像データが
画像メモリ21Aに格納されているとする。この状態
で、黒/白パターン抽出部25は、画像メモリ21Aに
格納されている画像データ(2値の画像データ)を主走
査方向に走査(スキャン)し、抽出ウインドゥ内に黒パ
ターンと白パターンが予め設定された閾値以内の間隔で
交互に出現する領域を仮バーコード領域として抽出す
る。
The operation of the present invention based on the above configuration will be described with reference to FIG. In FIG. 1, it is assumed that the input image data is stored in the image memory 21A. In this state, the black / white pattern extraction unit 25 scans (scans) the image data (binary image data) stored in the image memory 21A in the main scanning direction, and the black and white patterns are extracted in the extraction window. Areas that appear alternately at intervals within a preset threshold are extracted as temporary barcode areas.

【0030】次にバーコード判定部26は、前記抽出し
た仮バーコード領域が、本当にバーコードなのかどうか
を見極めるために、前記仮バーコード領域にバーコード
特有のレフトガードバー、センターバー、ライトガード
バーが存在するか否かを判定する。
Next, the bar code determining section 26 determines whether the extracted temporary bar code area is really a bar code, in order to determine whether the temporary bar code area is a bar code-specific left guard bar, center bar, or right guard bar. Is present.

【0031】この場合、バーコード判定部26は、レフ
トガードバー比較部28、センターバー比較部29、及
びライトガードバー比較部30に対し、前記抽出した仮
バーコード領域の情報と、パターン辞書格納部23に格
納されているパターン辞書内の情報との比較処理を依頼
する。
In this case, the bar code judging section 26 instructs the left guard bar comparing section 28, the center bar comparing section 29, and the right guard bar comparing section 30 to extract the information on the temporary bar code area and the pattern dictionary storing section 23. Request comparison processing with the information in the pattern dictionary stored in.

【0032】そして、バーコード判定部26は、レフト
ガードバー比較部28、センターバー比較部29、及び
ライトガードバー比較部30からの比較結果の情報を基
に、前記抽出した仮バーコード領域に、バーコード特有
のレフトガードバー、センターバー、ライトガードバー
が存在するか否かを判定する。
Then, the bar code judging section 26, based on the information of the comparison result from the left guard bar comparing section 28, the center bar comparing section 29, and the right guard bar comparing section 30, sets the bar code in the extracted temporary bar code area. It is determined whether or not the code-specific left guard bar, center bar, and right guard bar are present.

【0033】その結果、前記抽出した仮バーコード領域
にレフトガードバー、センターバー、ライトガードバー
が存在していたらその領域は真のバーコード領域である
と判定し、その領域を抽出する。しかし、前記抽出した
仮バーコード領域にレフトガードバー、センターバー、
ライトガードバーが存在していなかったらその領域はバ
ーコードではないと判定し破棄する。
As a result, if a left guard bar, a center bar and a right guard bar are present in the extracted temporary bar code area, it is determined that the area is a true bar code area and the area is extracted. However, in the extracted temporary barcode area, the left guard bar, the center bar,
If the light guard bar does not exist, it is determined that the area is not a barcode and is discarded.

【0034】次にバーコード矩形範囲探索部27は、前
記抽出した真のバーコード領域の範囲を探索し、バーコ
ードを囲む矩形領域(バーコード矩形領域)の位置(座
標)を決定し、そのバーコード矩形領域を抽出する。
Next, the barcode rectangular range searching unit 27 searches the range of the extracted true barcode area, determines the position (coordinates) of the rectangular area (barcode rectangular area) surrounding the barcode, and Extract the barcode rectangular area.

【0035】その後、帳票全面のイメージデータ上を細
かくスキャンして行くため、同じバーコードが何度も抽
出されることが考えられる。これを防止するため、バー
コード領域比較部31は、新規に抽出されたバーコード
矩形領域を、バーコード位置座標格納部24の既登録済
みバーコード矩形領域の位置情報(座標情報)と比較す
ることにより、今回新たに抽出されたバーコード矩形領
域が既に抽出されたバーコードとオーバーラップしてい
るか否かを判定する。
After that, since the image data on the entire surface of the form is scanned in detail, the same bar code may be extracted many times. To prevent this, the barcode area comparison unit 31 compares the newly extracted barcode rectangular area with the position information (coordinate information) of the registered barcode rectangular area of the barcode position coordinate storage unit 24. As a result, it is determined whether the newly extracted barcode rectangular area overlaps with the already extracted barcode.

【0036】その結果、オーバーラップしてなく、新規
に抽出されたものであれば、バーコード領域比較部31
は、新たに抽出されたバーコード矩形領域の位置情報
(座標情報)をバーコード位置座標格納部24に新規に
登録する。しかし、既に抽出されたバーコード矩形領域
とオーバーラップしていれば、既に抽出されたバーコー
ド領域を残し、新たに抽出されたバーコード領域を破棄
する。
As a result, if it is not overlapped and is newly extracted, the barcode area comparison unit 31
Newly registers the position information (coordinate information) of the newly extracted barcode rectangular area in the barcode position coordinate storage unit 24. However, if it overlaps the already-extracted barcode rectangular area, the already-extracted barcode area is left and the newly-extracted barcode area is discarded.

【0037】前記のようにして、帳票全面をサーチする
まで、副走査方向にサーチするラインを進めて、前記の
処理を繰り返して行う。そして、帳票全面をサーチした
ら、処理を終了する。
As described above, the search line is advanced in the sub-scanning direction until the entire surface of the form is searched, and the above-described processing is repeated. Then, when the entire surface of the form is searched, the processing ends.

【0038】以上のようにして、従来のような定義体等
を作成することなく、かつ手作業を必要とすることな
く、入力した画像データから、バーコード矩形領域を自
動的に抽出することが可能になる。
As described above, it is possible to automatically extract a barcode rectangular area from input image data without creating a conventional definition body and the like and requiring no manual work. It will be possible.

【0039】[0039]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。以下に説明する実施例は、本発明のバーコード抽
出装置を、一括読み取り型のOCR装置により実現した
例である。なお、図2〜図9中、図10、図11と同じ
ものは、同一符号で示してある。
Embodiments of the present invention will be described below with reference to the drawings. The embodiment described below is an example in which the bar code extracting device of the present invention is realized by a batch reading type OCR device. 2 to 9, the same parts as those in FIGS. 10 and 11 are designated by the same reference numerals.

【0040】§1:実施例装置の構成の説明・・・図2
参照 図2は実施例の装置構成図である。図2に示したよう
に、OCR装置7には、イメージ読取部20、イメージ
メモリ21、バーコード抽出部22、パターン辞書格納
部23、バーコード位置座標格納部24、RAM32等
が設けてある。
§1: Description of the configuration of the embodiment apparatus ... FIG. 2
Reference FIG. 2 is a device configuration diagram of the embodiment. As shown in FIG. 2, the OCR device 7 is provided with an image reading unit 20, an image memory 21, a barcode extraction unit 22, a pattern dictionary storage unit 23, a barcode position coordinate storage unit 24, a RAM 32, and the like.

【0041】また、前記バーコード抽出部22には、黒
/白パターン抽出部25、バーコード判定部26、バー
コード矩形範囲探索部27、レフトガードバー比較部2
8、センターバー比較部29、ライトガードバー比較部
30、バーコード領域比較部31等が設けてある。前記
各部の機能等は次の通りである。
The bar code extracting section 22 includes a black / white pattern extracting section 25, a bar code determining section 26, a bar code rectangular range searching section 27, and a left guard bar comparing section 2.
8, a center bar comparison unit 29, a light guard bar comparison unit 30, a bar code area comparison unit 31 and the like are provided. The functions and the like of the respective units are as follows.

【0042】(1) :イメージ読取部20は、イメージス
キャナ等を備えており、帳票を装置内部に取り込んでそ
の情報を読み込むことにより、イメージデータ(多値の
画像データ)を入力するものである。また、イメージ読
取部20は、入力したイメージデータ(多値の画像デー
タ)を2値のイメージデータ(2値の画像データ)に変
換してイメージメモリ21に格納する処理を行うもので
ある。
(1): The image reading section 20 is equipped with an image scanner or the like, and inputs image data (multi-valued image data) by loading a form into the apparatus and reading the information. . The image reading unit 20 also performs processing of converting input image data (multivalued image data) into binary image data (binary image data) and storing the image data in the image memory 21.

【0043】(2) :イメージメモリ21は、イメージ読
取部20が入力したイメージデータ(2値の画像デー
タ)を格納するものである。 (3) :バーコード抽出部22は、イメージメモリ21に
格納されているイメージデータからバーコード情報(バ
ーコード矩形領域)を抽出するものである。
(2): The image memory 21 stores the image data (binary image data) input by the image reading section 20. (3): The barcode extraction unit 22 extracts barcode information (barcode rectangular area) from the image data stored in the image memory 21.

【0044】(4) :パターン辞書格納部23は、バーコ
ードの各種パターンを予め登録したパターン辞書を格納
したもの(メモリ)である。このパターン辞書には、例
えば、バーコードの種類毎に、バーコードを構成するレ
フトガードバー(スタートバー)のパターン、センター
バーのパターン、ライトガードバーのパターン情報等を
登録しておく。
(4): The pattern dictionary storage unit 23 is a memory (memory) that stores a pattern dictionary in which various patterns of barcodes are registered in advance. In this pattern dictionary, for example, the pattern of the left guard bar (start bar), the pattern of the center bar, the pattern information of the right guard bar, and the like which form the barcode are registered for each type of barcode.

【0045】(5) :バーコード位置座標格納部24は、
バーコード抽出部22が抽出したバーコード矩形領域の
位置座標等を格納しておくもの(メモリ)である。 (6) :RAM32はバーコード抽出部22内の各部がア
クセスするメモリであり、バーコード抽出処理を行う
際、ワーク用に使用するものである。
(5): The bar code position coordinate storage unit 24 is
This is a memory (memory) for storing the position coordinates and the like of the barcode rectangular area extracted by the barcode extraction unit 22. (6): The RAM 32 is a memory accessed by each unit in the barcode extraction unit 22, and is used for work when performing the barcode extraction processing.

【0046】(7) :黒/白パターン抽出部25は、イメ
ージメモリ21内のイメージデータ(2値の画像デー
タ)をスキャン(走査)することにより、抽出ウインド
ゥ内に黒パターンと白パターンが交互に現れる領域を抽
出するものである。
(7): The black / white pattern extraction unit 25 scans the image data (binary image data) in the image memory 21 to alternate between the black pattern and the white pattern in the extraction window. The area that appears in is extracted.

【0047】(8) :バーコード判定部26は、黒/白パ
ターン抽出部25が抽出した黒パターンと白パターンが
交互に現れる領域が本当にバーコード領域であるか否か
を判定するものである。
(8): The bar code judging section 26 judges whether or not the area where the black pattern and the white pattern alternately appearing by the black / white pattern extracting section 25 are the bar code areas. .

【0048】この場合、バーコード判定部26は、レフ
トガードバー比較部28、センターバー比較部29、ラ
イトガードバー比較部30に対し、前記黒パターンと白
パターンが交互に現れる領域に、レフトガードバー、セ
ンターバー、ライトガードバーが存在するか否かを確認
するためのパターンの比較(抽出したパターンと辞書に
登録されているパターンとの比較)を依頼し、その比較
結果により真のバーコードか否かの判定を行うものであ
る。
In this case, the bar code determining section 26 instructs the left guard bar comparing section 28, the center bar comparing section 29, and the right guard bar comparing section 30 to place the left guard bar and the center in the areas where the black pattern and the white pattern alternate. Request a pattern comparison (comparison between the extracted pattern and the pattern registered in the dictionary) to confirm whether or not there is a bar or light guard bar, and check whether the bar code is a true bar code or not based on the comparison result. The judgment is made.

【0049】(9) :バーコード矩形範囲探索部27は、
バーコード判定部26が真のバーコード領域と判定した
範囲を探索し、バーコードを囲む矩形領域を抽出するも
のである。
(9): The barcode rectangular range searching unit 27
The barcode determination unit 26 searches a range determined to be a true barcode area and extracts a rectangular area surrounding the barcode.

【0050】(10):レフトガードバー比較部28は、バ
ーコード判定部26の依頼により、前記黒パターンと白
パターンが交互に現れる領域のパターンと、パターン辞
書格納部23のパターン辞書に登録されているレフトガ
ードバーのパターンとを比較するものである。
(10): The left guard bar comparison unit 28 is registered in the pattern dictionary of the pattern dictionary storage unit 23 and the pattern of the area in which the black pattern and the white pattern alternately appear at the request of the bar code determination unit 26. It is to compare with the pattern of the left guard bar.

【0051】(11):センターバー比較部29は、バーコ
ード判定部26の依頼により、前記黒パターンと白パタ
ーンが交互に現れる領域のパターンと、パターン辞書格
納部23のパターン辞書に登録されているセンターバー
のパターンとを比較するものである。
(11): The center bar comparison unit 29 is requested by the bar code determination unit 26 to register the pattern of the area where the black pattern and the white pattern appear alternately and the pattern dictionary of the pattern dictionary storage unit 23. It is to compare with the pattern of the center bar.

【0052】(12):ライトガードバー比較部30は、バ
ーコード判定部26の依頼により、前記黒パターンと白
パターンが交互に現れる領域のパターンと、パターン辞
書格納部23のパターン辞書に登録されているライトガ
ードバーのパターンとを比較するものである。
(12): The light guard bar comparison unit 30 is registered in the pattern dictionary of the pattern dictionary storage unit 23 and the pattern of the area in which the black pattern and the white pattern alternately appear at the request of the bar code determination unit 26. This is to compare with the pattern of the light guard bar that is present.

【0053】(13):バーコード領域比較部31は、バー
コード矩形範囲探索部27が抽出したバーコード矩形領
域と、バーコード位置座標格納部24の位置情報を比較
することにより、バーコード矩形範囲探索部27が抽出
したバーコード矩形領域が既に抽出されたものか、新規
に抽出されたものかを判定するものである。
(13): The barcode area comparison unit 31 compares the barcode rectangular area extracted by the barcode rectangular area search unit 27 with the position information in the barcode position coordinate storage unit 24 to obtain a barcode rectangular area. This is to determine whether the barcode rectangular area extracted by the range searching unit 27 has already been extracted or has been newly extracted.

【0054】このバーコード領域比較部31では、前記
バーコード矩形領域が既に抽出されたものであると判定
した場合には、バーコード矩形範囲探索部27が抽出し
たバーコード矩形領域を破棄し、前記バーコード矩形領
域が新規に抽出したものと判定した場合には、新規のバ
ーコード矩形領域として登録する処理を行うものであ
る。
If the barcode area comparison unit 31 determines that the barcode rectangular area has already been extracted, the barcode rectangular area search unit 27 discards the barcode rectangular area, When it is determined that the barcode rectangular area is newly extracted, a process of registering as a new barcode rectangular area is performed.

【0055】§2:処理概要の説明・・・図3参照 図3は実施例の処理概要フローチャートである。以下、
図3に基づいて実施例の処理概要を説明する。なお、S
1〜S8は各処理ステップを示す。
§2: Description of Process Outline--See FIG. 3 FIG. 3 is a process outline flowchart of the embodiment. Less than,
The processing outline of the embodiment will be described with reference to FIG. Note that S
1 to S8 indicate processing steps.

【0056】先ず、イメージ読取部20により読み取ら
れた帳票イメージデータ(2値のイメージデータ)がイ
メージメモリ21に格納されているとする。この状態
で、黒/白パターン抽出部25は、イメージメモリ21
に格納されている帳票イメージデータを主走査方向(横
方向)にスキャンし、抽出ウインドゥ内に黒パターン
(例えば、1情報)と白パターン(例えば、0情報)が
予め設定された閾値以内の間隔で交互に現れる範囲をバ
ーコード領域と仮定して(仮バーコード領域として)抽
出しRAM32に格納する(S1)。
First, it is assumed that the form image data (binary image data) read by the image reading unit 20 is stored in the image memory 21. In this state, the black / white pattern extraction unit 25 sets the image memory 21
Scans the form image data stored in the main scanning direction (horizontal direction), and the black pattern (for example, 1 information) and the white pattern (for example, 0 information) in the extraction window are spaced within a preset threshold value. It is assumed that a range that appears alternately at (1) is a barcode area (as a temporary barcode area) and is extracted and stored in RAM 32 (S1).

【0057】次にバーコード判定部26は、前記抽出し
たRAM32内の仮バーコード領域が、本当にバーコー
ドなのかどうかを見極めるために、前記仮バーコード領
域にバーコード特有のレフトガードバー、センターバ
ー、ライトガードバーが存在するか否かを判定する(S
2)。
Next, in order to determine whether the extracted temporary bar code area in the RAM 32 is really a bar code, the bar code determining section 26 adds a bar code-specific left guard bar and center bar to the temporary bar code area. , It is determined whether a light guard bar exists (S
2).

【0058】この場合、バーコード判定部26は、レフ
トガードバー比較部28、センターバー比較部29、及
びライトガードバー比較部30に対し、前記抽出した仮
バーコード領域のパターン情報と、パターン辞書格納部
23に格納されているパターン辞書内のパターン情報と
の比較処理を依頼する。
In this case, the bar code judging section 26 instructs the left guard bar comparing section 28, the center bar comparing section 29 and the right guard bar comparing section 30 to extract the pattern information of the temporary bar code area and the pattern dictionary storing section. The comparison request with the pattern information in the pattern dictionary stored in 23 is requested.

【0059】そして、バーコード判定部26は、レフト
ガードバー比較部28、センターバー比較部29、及び
ライトガードバー比較部30からの比較結果の情報を基
に、前記抽出した仮バーコード領域に、バーコード特有
のレフトガードバー、センターバー、ライトガードバー
が存在するか否かを判定する。
Then, the bar code judging section 26, based on the information of the comparison result from the left guard bar comparing section 28, the center bar comparing section 29, and the right guard bar comparing section 30, sets the bar code in the extracted temporary bar code area. It is determined whether or not the code-specific left guard bar, center bar, and right guard bar are present.

【0060】その結果、前記抽出した仮バーコード領域
にレフトガードバー、センターバー、ライトガードバー
が存在していたら、その領域は真のバーコード領域であ
ると判定しその領域を抽出する。しかし、前記抽出した
仮バーコード領域にレフトガードバー、センターバー、
ライトガードバーが存在していなかったら、その領域は
バーコードではないと判定し、その領域は破棄する。
As a result, if a left guard bar, a center bar and a right guard bar exist in the extracted temporary bar code area, it is determined that the area is a true bar code area and the area is extracted. However, in the extracted temporary barcode area, the left guard bar, the center bar,
If the light guard bar does not exist, it is determined that the area is not a barcode and the area is discarded.

【0061】次に前記S2の処理で、仮バーコード領域
が真のバーコード領域であると判定した場合、バーコー
ド矩形範囲探索部27は、そのバーコードの範囲を探索
してバーコードを囲む矩形領域(バーコード矩形領域)
の位置(座標)を決定し、そのバーコード矩形領域を抽
出しRAM32に格納する(S3)。
Next, in the processing of S2, when it is determined that the temporary barcode area is the true barcode area, the barcode rectangular range searching unit 27 searches the range of the barcode and encloses the barcode. Rectangular area (bar code rectangular area)
Position (coordinates) is determined, the barcode rectangular area is extracted and stored in the RAM 32 (S3).

【0062】この場合、真のバーコード領域であれば、
副走査方向(縦方向)に黒バーが延びているため、前記
バーコードと判定した領域の中央を上下方向にスキャン
(サーチ)しバーコードの縦バーが途切れる位置を副走
査方向の範囲とし、バーコード矩形領域(矩形位置の座
標)を決定する。
In this case, if it is a true barcode area,
Since the black bar extends in the sub-scanning direction (longitudinal direction), the center of the area determined to be the bar code is vertically scanned (searched) and the position where the vertical bar of the bar code is interrupted is defined as the range in the sub-scanning direction. Determine the barcode rectangular area (coordinates of the rectangular position).

【0063】その後、帳票全面のイメージデータ上を細
かくスキャンして行くため、同じバーコードが何度も抽
出されることが考えられる。これを防止するため、バー
コード領域比較部31は、前記RAM32内のバーコー
ド矩形領域の位置情報と、バーコード位置座標格納部2
4内の位置情報(座標情報)を比較することにより、今
回新たに抽出されたバーコード矩形領域が既に抽出され
たバーコードとオーバーラップしているか否かを判定す
る(S4)。
After that, since the image data on the entire surface of the form is scanned in detail, the same bar code may be extracted many times. In order to prevent this, the bar code area comparison unit 31 uses the bar code rectangular area position information in the RAM 32 and the bar code position coordinate storage unit 2.
By comparing the position information (coordinate information) within 4, it is determined whether the newly extracted barcode rectangular area overlaps the already extracted barcode (S4).

【0064】その結果、オーバーラップしてなく、新規
に抽出されたものであれば、バーコード領域比較部31
は、前記新たに抽出されたバーコード矩形領域の位置情
報(座標情報)をバーコード位置座標格納部24に新規
に登録する(S5)。しかし、既に抽出されたバーコー
ド矩形領域とオーバーラップしていれば、既に抽出され
たバーコード領域を残し、新たに抽出されたバーコード
領域は破棄する(S6)。
As a result, if they are not overlapped and are newly extracted, the barcode area comparison unit 31
Newly registers the position information (coordinate information) of the newly extracted barcode rectangular area in the barcode position coordinate storage unit 24 (S5). However, if it overlaps with the already-extracted barcode rectangular area, the already-extracted barcode area is left and the newly-extracted barcode area is discarded (S6).

【0065】前記のようにして、帳票全面をサーチする
まで(S7)、副走査方向にサーチするラインを進めて
(S8)、前記S1の処理から繰り返して行う。そし
て、帳票全面をサーチしたら、処理を終了する。以上の
ようにして、帳票のイメージデータからバーコード矩形
領域を自動的に抽出することができる。
As described above, the search line is advanced in the sub-scanning direction (S8) until the entire surface of the form is searched (S7), and the process from S1 is repeated. Then, when the entire surface of the form is searched, the processing ends. As described above, the barcode rectangular area can be automatically extracted from the image data of the form.

【0066】なお、前記のようにして抽出されたバーコ
ード矩形領域は、その後、既存のバーコード認識装置に
より認識処理(バーコード情報の認識)が行われる。 §3:具体例によるバーコード抽出処理の説明・・・図
4、図5、図6参照 図4は帳票例を示した図、図5は実施例の処理説明図
(その1)、図6は実施例の処理説明図(その2)であ
る。以下、図4〜図6に基づいて、具体例による実施例
の処理を説明する。
The barcode rectangular area extracted as described above is then subjected to recognition processing (recognition of barcode information) by an existing barcode recognition device. §3: Description of bar code extraction processing by specific example ... See FIGS. 4, 5, and 6. FIG. 4 is a diagram showing an example of a form, and FIG. 5 is a process explanatory diagram (part 1) of the embodiment, FIG. [FIG. 6] is a process explanatory diagram (2) of the embodiment. The processing of the embodiment according to the concrete example will be described below with reference to FIGS.

【0067】前記イメージ読取部20で読み取る帳票の
1例として、図4に示したような帳票例がある。この帳
票例は、公共料金の内、電気料金の払込に使用する帳票
であり、バーコード34が複数箇所に設けてある。
As an example of the form read by the image reading section 20, there is a form example as shown in FIG. This form example is a form used for payment of electric charges out of public charges, and bar codes 34 are provided at a plurality of places.

【0068】このような帳票を、イメージ読取部20に
より読み取り、その時入力したイメージデータを2値の
イメージデータ(2値の画像データ)に変換してイメー
ジメモリ21に格納した後、前記イメージメモリ21内
のイメージデータをスキャンしてバーコードの抽出を行
う。
Such a form is read by the image reading unit 20, the image data input at that time is converted into binary image data (binary image data) and stored in the image memory 21, and then the image memory 21. Scan the image data in and extract the barcode.

【0069】この場合、イメージメモリ21内のイメー
ジデータ格納領域の最初の位置(格納開始アドレス)で
あるP点をX−Y座標の原点(X,Y=0,0)に設定
する。そして、X−Y座標のX軸方向(横方向)を主走
査方向とし、Y軸方向(縦方向)を副走査方向としてス
キャンを行う。
In this case, the point P, which is the first position (storage start address) of the image data storage area in the image memory 21, is set to the origin (X, Y = 0, 0) of the XY coordinates. Then, scanning is performed with the X-axis direction (horizontal direction) of the XY coordinates as the main scanning direction and the Y-axis direction (vertical direction) as the sub-scanning direction.

【0070】前記スキャンを行う場合、図示のY1 ライ
ンから主走査方向(X軸方向)のスキャンを開始し、そ
の後、副走査方向(Y軸方向)へスキャンするラインを
進めながら順次スキャンを行い、以降、Ye ラインを通
り、更にYh ラインへ移動し、最後はYn ラインのスキ
ャンを行って全てのスキャンを終了する。なお、主走査
方向のスキャン開始点はX0 であり、スキャン終了点は
m である。
In the case of performing the scan, the scan in the main scanning direction (X-axis direction) is started from the illustrated Y 1 line, and then the scan is performed sequentially while advancing the scanning line in the sub-scanning direction (Y-axis direction). After that, it moves through the Y e line and further to the Y h line, and finally scans the Y n line and finishes all the scans. The scan start point in the main scanning direction is X 0 , and the scan end point is X m .

【0071】以下、具体的な処理について説明する。先
ず、OCR装置7では、イメージ読取部20が前記帳票
を読み取り、その帳票イメージデータを入力して2値の
イメージデータに変換した後、前記イメージデータ(2
値の画像データ)をイメージメモリ21に展開する。
Specific processing will be described below. First, in the OCR device 7, the image reading unit 20 reads the form, inputs the form image data and converts it to binary image data, and then the image data (2
(Value image data) is expanded in the image memory 21.

【0072】次に、黒/白パターン抽出部25は、図5
に示したような抽出ウインドゥWD(例えば、縦1×横
24画素)を設定し、この抽出ウインドゥWDを図4の
1ラインの主走査方向(X軸方向)に対してスキャン
して行き、黒(1情報)と白(0情報)が交互に現れる
パターン(複雑パターン領域)をサーチする。
Next, the black / white pattern extraction section 25 is operated as shown in FIG.
An extraction window WD (for example, vertical 1 × horizontal 24 pixels) as shown in FIG. 4 is set, and the extraction window WD is scanned in the main scanning direction (X axis direction) of the Y 1 line in FIG. A pattern (complex pattern area) in which black (1 information) and white (0 information) appear alternately is searched.

【0073】前記帳票の例では、Y1 ラインには、前記
のようなパターンが存在しないので、次のラインの先頭
に抽出ウインドゥWDを設定して同様にスキャンする。
このようにして例えば、Ye ラインをスキャンした場合
を説明する。
In the example of the above-mentioned form, since the above-mentioned pattern does not exist in the Y 1 line, the extraction window WD is set at the beginning of the next line and scanning is similarly performed.
In this way, for example, the case where the Y e line is scanned will be described.

【0074】図5に示したように、黒/白パターンが交
互に現れる点をバーコード開始点SPとし、抽出ウイン
ドゥWDに黒/白パターンが無くなる点をバーコード終
了点EPとして、この範囲をバーコード領域の候補(仮
バーコード領域)として各々のX座標を抽出する。
As shown in FIG. 5, the point where the black / white pattern appears alternately is the bar code start point SP, and the point where the black / white pattern disappears in the extraction window WD is the bar code end point EP. Each X coordinate is extracted as a barcode area candidate (temporary barcode area).

【0075】ここで、前記抽出した仮バーコード領域
(黒/白パターンが交互に出現する領域)が本当にバー
コード領域か否かを確認するために、バーコード判定部
26は前記抽出した仮バーコード領域にバーコード特有
のレフトガードバー(図6のようなバーコードの開始情
報=101)と、ライトガードバー(図6のようなバー
コードの終了情報=101)、及びセンターバー(図6
のようなバーコードの中心情報=01010)が存在す
るか否かを判定する。
Here, in order to confirm whether or not the extracted temporary bar code area (area in which black / white patterns alternately appear) is really a bar code area, the bar code determination unit 26 uses the extracted temporary bar code. A left guard bar peculiar to a bar code (bar code start information = 101 as in FIG. 6), a right guard bar (bar code end information = 101 as in FIG. 6), and a center bar (FIG. 6) are unique in the code area.
It is determined whether or not there is the central information of the bar code = 01010).

【0076】ところで、前記レフトガードバー、センタ
ーバー、ライトガードバーは、図6に示したような構成
となっている。すなわち、レフトガードバー(又は、ス
タートバー)は、バーコード開始点SP側(左側)に設
けてあり、黒バーと白バーが交互に並んだパターンで構
成され、バーコードの開始情報として「101」の情報
を設定したパターンである。
By the way, the left guard bar, the center bar, and the right guard bar are constructed as shown in FIG. That is, the left guard bar (or the start bar) is provided on the side of the bar code start point SP (on the left side) and is composed of a pattern in which black bars and white bars are alternately arranged, and the bar code start information is "101". It is a pattern in which information of is set.

【0077】前記センターバーは、バーコードの中央位
置に設けてあり、黒バーと白バーが交互に並んだパター
ンで構成され、バーコードの中心情報として「0101
0」の情報を設定したパターンである。前記ライトガー
ドバー(又は、エンドバー)は、バーコード終了点EP
側(右側)に設けてあり、黒バーと白バーが交互に並ん
だパターンで構成され、バーコードの終了位置情報とし
て「101」を設定したパターンである。
The center bar is provided at the center position of the bar code, and is composed of a pattern in which black bars and white bars are alternately arranged.
This is a pattern in which information "0" is set. The light guard bar (or end bar) is a bar code end point EP.
The pattern is provided on the side (right side), and is configured by a pattern in which black bars and white bars are alternately arranged, and "101" is set as the end position information of the barcode.

【0078】前記のように、抽出した仮バーコード領域
にレフトガードバー(101の情報)と、ライトガード
バー(101の情報)、及びセンターバー(01010
の情報)が存在するか否かを判定した結果、存在しなけ
れば、抽出した仮バーコード領域はバーコード領域では
なかったと判定する。
As described above, the left guard bar (information of 101), the right guard bar (information of 101), and the center bar (01010) are included in the extracted temporary bar code area.
If it does not exist, it is judged that the extracted temporary barcode area is not the barcode area.

【0079】この場合は、抽出ウインドゥWDを更に主
走査方向(X軸方向)に進めて行き、次の黒パターンと
白パターンが交互に出現する領域の抽出を行う。このよ
うに処理を行い、主走査方向がX座標の終了点となった
場合は、次の副走査方向(Y軸方向)の先頭に抽出ウイ
ンドゥWDを設定して同様にサーチして行く。
In this case, the extraction window WD is further advanced in the main scanning direction (X-axis direction) to extract an area where the next black pattern and white pattern appear alternately. When the main scanning direction is the end point of the X coordinate by performing the processing as described above, the extraction window WD is set at the beginning in the next sub scanning direction (Y axis direction) and the search is performed in the same manner.

【0080】同様に、Yh ラインをスキャンした場合は
次のようになる。図6に示したように、黒/白パターン
が交互に現れ始める点をバーコード開始点SPとし、抽
出ウインドゥWDに黒/白パターンが無くなる点をバー
コード終了点EPとして、この範囲を仮バーコード領域
(バーコード領域の候補)として各々のX座標を抽出す
る。
Similarly, when the Y h line is scanned, it becomes as follows. As shown in FIG. 6, the point at which black / white patterns start to appear alternately is the bar code start point SP, and the point at which the black / white pattern disappears in the extraction window WD is the bar code end point EP. Each X coordinate is extracted as a code area (bar code area candidate).

【0081】前記のように、バーコード判定部26は抽
出した仮バーコード領域が本当にバーコード情報か否か
を判定する。その結果、バーコード領域であると判定出
来れば、このレフトガードバーより以前にあるゴミ情
報、及びライトガードバーより以降にあるゴミ情報等が
あった場合でも、バーコードの開始点SPをレフトガー
ドバーの座標とし、バーコード終了点EPをライトガー
ドバーの座標にすることにより、前記ゴミ情報を取り除
くことが可能になる。
As described above, the bar code determining section 26 determines whether the extracted temporary bar code area is really bar code information. As a result, if it can be determined that it is the barcode area, even if there is dust information before this left guard bar and dust information after this right guard bar, the start point SP of the barcode will be the coordinates of the left guard bar. Then, the dust information can be removed by setting the bar code end point EP to the coordinates of the light guard bar.

【0082】次に、バーコード開始点SPとバーコード
終了点EPの中点に抽出ウインドゥWDを設定し、上部
側副走査方向UDに抽出ウインドゥWDを移動し、バー
コードの縦バーが途切れる位置UEをバーコード矩形領
域の上端とする。次に、下部側副走査方向LDに抽出ウ
インドゥWDを移動し、同様にバーコードの縦バーが途
切れる位置LEをバーコード矩形領域の下端とする。
Next, the extraction window WD is set at the midpoint between the bar code start point SP and the bar code end point EP, and the extraction window WD is moved in the upper sub-scanning direction UD, and the vertical bar of the bar code is cut off. The UE is the upper end of the barcode rectangular area. Next, the extraction window WD is moved in the lower sub-scanning direction LD, and similarly, the position LE at which the vertical bar of the barcode is interrupted is set as the lower end of the barcode rectangular area.

【0083】以上の処理により、第1番目のバーコード
が存在する位置情報がX座標の開始点、終了点、Y座標
の開始点、終了点の矩形領域として抽出できたことにな
り、このバーコード矩形位置情報(バーコード矩形領
域)を一旦RAM32に格納しておく。
By the above processing, the position information in which the first bar code exists can be extracted as the rectangular area of the start point, the end point of the X coordinate, the start point of the Y coordinate, and the end point. The code rectangle position information (bar code rectangle area) is temporarily stored in the RAM 32.

【0084】続いて、前記処理で抽出した位置から抽出
ウインドゥWDを更に主走査方向(X軸方向)に進めて
行き、次のバーコード情報を同様に抽出して行く。ここ
で、副走査方向(Y軸方向)に順次スキャンして行くた
め、同じバーコード情報を2重に抽出することが考えら
れる。
Subsequently, the extraction window WD is further advanced in the main scanning direction (X-axis direction) from the position extracted in the above processing, and the next bar code information is similarly extracted. Here, since the scanning is sequentially performed in the sub-scanning direction (Y-axis direction), it is conceivable that the same bar code information is extracted twice.

【0085】これを防止するため、新規に抽出したRA
M32内のバーコード矩形領域(位置情報)を、バーコ
ード位置座標格納部24の情報と比較する。この処理に
より、新たに抽出されたバーコード矩形領域が既に抽出
済みのバーコード矩形領域とオーバーラップしていれ
ば、新規に抽出したバーコード矩形領域を破棄し、オー
バーラップしていなければ、別のバーコード情報である
と判断して新規にバーコード矩形領域(バーコード位置
情報)をバーコード位置座標格納部24に登録する。
In order to prevent this, newly extracted RA
The barcode rectangular area (position information) in M32 is compared with the information in the barcode position coordinate storage unit 24. By this process, if the newly extracted barcode rectangular area overlaps with the already extracted barcode rectangular area, the newly extracted barcode rectangular area is discarded. The barcode rectangular area (barcode position information) is newly registered in the barcode position coordinate storage unit 24.

【0086】このようにして、帳票イメージの最終ライ
ン(Yn ライン)まで順次スキャンして行き、全てのバ
ーコード矩形領域(バーコード位置情報)を抽出する。
以上のようにして、入力した画像データ(2値情報)を
走査することにより、画像データの中から真のバーコー
ドのみを自動的に抽出することができる。従って、例え
ば、バーコードが印刷された電気料金、電話料金等の公
共料金の払込み用帳票を銀行等に持ち込んだ場合、その
帳票をイメージスキャナで読み込めば、バーコード抽出
装置により前記帳票のバーコードを自動的に抽出するこ
とができる。
In this way, all the barcode rectangular areas (barcode position information) are extracted by sequentially scanning to the last line (Y n line) of the form image.
As described above, by scanning the input image data (binary information), only the true barcode can be automatically extracted from the image data. Therefore, for example, if you bring a bill for printing utility bills such as electricity bills, telephone bills, etc., on which a barcode has been printed, to a bank, etc. Can be automatically extracted.

【0087】このため、前記バーコード抽出装置で抽出
したバーコード矩形領域の情報を基に、既存のバーコー
ド認識装置でバーコードの認識を行えば、バーコードを
利用した公共料金等の払込みが自動的に、かつ簡単にで
きる。
Therefore, if the existing bar code recognition device recognizes the bar code based on the information of the rectangular area of the bar code extracted by the bar code extraction device, payment of public utility charges using the bar code is possible. It can be done automatically and easily.

【0088】§4:フローチャートによるバーコード抽
出処理の詳細な説明・・・図7〜図9参照 図7は実施例の処理フローチャート(その1)、図8は
実施例の処理フローチャート(その2)、図9は実施例
の処理フローチャート(その3)である。以下、図7〜
図9のフローチャートに基づいて実施例の処理を説明す
る。なお、S11〜S34は各処理ステップを示す。
§4: Detailed Explanation of Bar Code Extraction Processing by Flowchart--Refer to FIGS. 7 to 9 FIG. 7 is a processing flowchart (part 1) of the embodiment, and FIG. 8 is a processing flowchart (part 2) of the embodiment. 9 is a processing flowchart (part 3) of the embodiment. Below, FIG.
The processing of the embodiment will be described based on the flowchart of FIG. Note that S11 to S34 indicate processing steps.

【0089】先ず、OCR装置7では、イメージ読取部
20が帳票(図4参照)をスキャナで読み取り(S1
1)、その帳票イメージデータを2値のイメージデータ
(2値の画像データ)に変換した後、イメージメモリ2
1に格納する(S12)。
First, in the OCR device 7, the image reading unit 20 reads a form (see FIG. 4) with a scanner (S1).
1) After converting the form image data into binary image data (binary image data), the image memory 2
It is stored in 1 (S12).

【0090】その後、黒/白パターン抽出部25は、イ
メージメモリ21内のイメージデータ(2値の画像デー
タ)をスキャンして黒/白パターンの抽出を行う。この
処理では、抽出ウインドゥWD(図5参照)を用意し、
イメージメモリ21の主走査方向(X軸方向)にスキャ
ンして行き、黒パターン(1情報)と白パターン(0情
報)とが交互に現れる領域をサーチする。
Thereafter, the black / white pattern extracting section 25 scans the image data (binary image data) in the image memory 21 to extract the black / white pattern. In this process, an extraction window WD (see FIG. 5) is prepared,
The image memory 21 is scanned in the main scanning direction (X-axis direction) to search for an area in which black patterns (1 information) and white patterns (0 information) appear alternately.

【0091】先ず、黒/白パターン抽出部25は、抽出
ウインドゥ(抽出window)WDを主走査方向(X軸方
向)に1つ進める(S13)。そして、主走査方向に全
て走査したか否かを判断し(S14)、全て走査してい
ない場合は、抽出ウインドゥWD内に黒パターン(1情
報)と白パターン(0情報)が有るか否かを判断する
(S15)。
First, the black / white pattern extraction unit 25 advances the extraction window (extraction window) WD by one in the main scanning direction (X-axis direction) (S13). Then, it is determined whether or not all the scanning has been performed in the main scanning direction (S14), and if all have not been scanned, whether or not there is a black pattern (1 information) and a white pattern (0 information) in the extraction window WD. Is determined (S15).

【0092】その結果、黒パターンと白パターン情報が
なければ、前記S13の処理から繰り返して行う。しか
し、前記S15の処理で、黒パターンと白パターンの情
報が有った場合には、仮にバーコード領域の開始点とし
てその位置をRAM32に格納しておく(S16)。
As a result, if there is no black pattern and white pattern information, the process is repeated from S13. However, if there is information on the black pattern and the white pattern in the processing of S15, the position is temporarily stored in the RAM 32 as the start point of the barcode area (S16).

【0093】そして、前記抽出ウインドゥWDを、イメ
ージメモリ21の主走査方向(X軸方向)に1つ進め
(S17)、抽出ウインドゥWD内に黒パターン(1情
報)と白パターン情報(0情報)が有るか否かを判断す
る(S18)。
Then, the extraction window WD is advanced by one in the main scanning direction (X-axis direction) of the image memory 21 (S17), and the black pattern (1 information) and the white pattern information (0 information) in the extraction window WD. It is determined whether or not there is (S18).

【0094】その結果、黒パターン(1情報)と白パタ
ーン情報(0情報)が有れば、前記S17の処理から繰
り返して行う。また、黒パターン(1情報)と白パター
ン情報(0情報)が無ければ、仮にバーコード領域の終
了点としてその位置をRAM32に格納する(S1
9)。
As a result, if there is a black pattern (1 information) and white pattern information (0 information), the process is repeated from S17. If there is no black pattern (1 information) and white pattern information (0 information), the position is stored in the RAM 32 as the end point of the barcode area (S1).
9).

【0095】一方、前記S14の処理で、主走査方向に
全て走査した場合、黒/白パターン抽出部25は、副走
査方向(Y軸方向)に、サーチするラインを進める主走
査方向のサーチ位置を開始点X0 に戻す(S20)。そ
して、帳票全面をサーチしたか否かを判断し(S2
1)、帳票全面をサーチしたら処理を終了する。しか
し、帳票全面をサーチしてない場合は、前記S13の処
理から繰り返して行う。
On the other hand, in the process of S14, when all scanning is performed in the main scanning direction, the black / white pattern extraction unit 25 advances the line to be searched in the sub-scanning direction (Y-axis direction) to the search position in the main scanning direction. Is returned to the starting point X 0 (S20). Then, it is determined whether or not the entire surface of the form has been searched (S2
1) After searching the entire surface of the form, the process ends. However, if the entire surface of the form has not been searched, the process is repeated from S13.

【0096】前記のようにして帳票をサーチし、黒/白
パターン抽出部25が黒パターンと白パターンが交互に
出現する仮バーコード領域を抽出すると、その仮バーコ
ード領域をRAM32に格納する。そして、バーコード
判定部26は、前記抽出した仮バーコード領域が真のバ
ーコード領域であるか否かの判定を行う。
As described above, when the form is searched and the black / white pattern extraction unit 25 extracts the temporary barcode area in which the black pattern and the white pattern appear alternately, the temporary barcode area is stored in the RAM 32. Then, the barcode determination unit 26 determines whether the extracted temporary barcode area is a true barcode area.

【0097】この処理では、バーコード判定部26は、
レフトガードバー比較部28にレフトガードバーの比較
を依頼し、センターバー比較部29にセンターバーの比
較を依頼し、ライトガードバー比較部30にライトガー
ドバーの比較を依頼する。そして、前記各比較部の比較
結果を基に、抽出した仮バーコード領域が真のバーコー
ド領域か否かを判定する。
In this processing, the bar code judging section 26
The left guard bar comparison unit 28 is requested to compare the left guard bars, the center bar comparison unit 29 is requested to compare the center bars, and the right guard bar comparison unit 30 is requested to compare the right guard bars. Then, it is determined whether or not the extracted temporary barcode area is a true barcode area based on the comparison result of each comparison unit.

【0098】この場合、バーコード判定部26は、先
ず、抽出した仮バーコード領域にレフトガードバーが有
るか否かを判断し(S22)、もしレフトガードバーが
無ければ、前記仮バーコード領域は真のバーコード領域
ではないので、RAM32に格納した仮バーコードの開
始点、終了点の情報(座標)をクリアして前記S13の
処理から繰り返す。
In this case, the bar code judging section 26 first judges whether or not the extracted temporary bar code area has a left guard bar (S22), and if there is no left guard bar, the temporary bar code area becomes true. Since it is not in the barcode area of No. 3, the information (coordinates) of the start point and the end point of the temporary barcode stored in the RAM 32 is cleared and the process is repeated from S13.

【0099】また、前記S22の処理で、レフトガード
バーが有ると判定した場合は、バーコードの可能性があ
るので、抽出した仮バーコード領域にセンターバーが有
るか否かを判定する(S23)。その結果、センターバ
ーが無ければ、前記仮バーコード領域は真のバーコード
領域ではないので、RAM32に格納した仮バーコード
領域の開始点、終了点の情報(座標)をクリアして前記
S13の処理から繰り返す。
If it is determined in the processing of S22 that there is a left guard bar, there is a possibility of a barcode, so it is determined whether or not there is a center bar in the extracted temporary barcode area (S23). . As a result, if there is no center bar, the temporary bar code area is not a true bar code area. Therefore, the information (coordinates) of the start point and the end point of the temporary bar code area stored in the RAM 32 is cleared and the step S13 is performed. Repeat from processing.

【0100】更に、前記S23の処理で抽出した仮バー
コード領域にセンターバーが有れば、バーコードの可能
性があるので、抽出した仮バーコード領域にライトガー
ドバーが有るか否かを判定する(S24)。その結果、
抽出した仮バーコード領域にライトガードバーが無けれ
ば、前記仮バーコード領域は真のバーコード領域ではな
いので、RAM32に格納した仮バーコード領域の開始
点、終了点の情報(座標)をクリアして前記S13の処
理から繰り返す。
Further, if there is a center bar in the temporary bar code area extracted in the process of S23, there is a possibility of a bar code, so it is determined whether or not there is a light guard bar in the extracted temporary bar code area. (S24). as a result,
If there is no light guard bar in the extracted temporary barcode area, the temporary barcode area is not a true barcode area, so the information (coordinates) of the start and end points of the temporary barcode area stored in the RAM 32 is cleared. The process is repeated from S13.

【0101】しかし、前記S24の処理で、ライトガー
ドバーが有れば、前記仮バーコード領域は真のバーコー
ド領域であると判定できるので、バーコード矩形範囲探
索部27によるバーコード矩形範囲の探索を行う。
However, in the processing of S24, if there is a light guard bar, it can be determined that the temporary barcode area is a true barcode area. Therefore, the barcode rectangular area search unit 27 searches the barcode rectangular area. I do.

【0102】この処理では、前記のようにしてバーコー
ド判定部26が真のバーコード領域と判定したものにつ
いて、バーコード矩形範囲探索部27は、先ず、バーコ
ードの開始点SPと終了点EPの中央付近に抽出ウイン
ドゥWDを置き、上方向(副走査方向でバーコードの上
方向)にサーチする(S26)。
In this process, the barcode rectangular range searching unit 27 first determines the barcode start point SP and the end point EP of the barcode determined by the barcode determination unit 26 as described above. The extraction window WD is placed in the vicinity of the center of and the search is performed in the upward direction (the upward direction of the barcode in the sub-scanning direction) (S26).

【0103】そして、縦バーの黒ドットが途切れたか否
かを判断し(S27)、途切れるまで、バーコードの開
始点SPと終了点EPの中央付近に抽出ウインドゥWD
を置き、上方向(副走査方向でバーコードの上方向)に
サーチする(S26)。前記のようにして縦バーの黒ド
ットが途切れたら、バーコード領域の上端位置を確定す
る(S28)。
Then, it is judged whether or not the black dot of the vertical bar is interrupted (S27), and the extraction window WD near the center of the start point SP and the end point EP of the bar code until it is interrupted.
Is placed and a search is performed in the upward direction (upward direction of the barcode in the sub-scanning direction) (S26). When the black dots on the vertical bar are interrupted as described above, the upper end position of the bar code area is determined (S28).

【0104】次に、バーコード矩形範囲探索部27は、
バーコード開始点と終了点の中央付近に抽出ウインドゥ
WDを置き、下方向(副走査方向の下側方向)にサーチ
する(S29)。
Next, the barcode rectangular range searching unit 27
An extraction window WD is placed near the center of the bar code start point and end point, and a search is performed downward (downward in the sub-scanning direction) (S29).

【0105】そして、縦バーの黒ドットが途切れたか否
かを判断し(S30)、途切れるまで、バーコードの開
始点と終了点の中央付近に抽出ウインドゥWDを置き、
下方向(副走査方向でバーコードの下方向)にサーチす
る(S29)。前記のようにして縦バーの黒ドットが途
切れたら、バーコード領域の下端位置を確定する(S3
1)。
Then, it is judged whether or not the black dots on the vertical bar are interrupted (S30), and the extraction window WD is placed near the center of the start point and the end point of the bar code until the black dots are interrupted.
A search is performed in the downward direction (downward in the barcode in the sub-scanning direction) (S29). When the black dots on the vertical bar are interrupted as described above, the lower end position of the barcode area is determined (S3).
1).

【0106】その後、バーコード領域比較部31は、バ
ーコード位置座標格納部24の位置情報を基に、前記抽
出したバーコード矩形領域と、既抽出済みのバーコード
矩形領域がオーバーラップしているか否かを判断する
(S32)。その結果、オーバーラップしていれば、既
に抽出されたバーコード領域を残し、新たに抽出したバ
ーコード領域は破棄する(S34)。そして、前記S1
3の処理から繰り返して行う。
Thereafter, the barcode area comparison unit 31 determines whether the extracted barcode rectangular area and the already extracted barcode rectangular area overlap based on the position information of the barcode position coordinate storage unit 24. It is determined whether or not (S32). As a result, if they overlap, the already extracted barcode area remains and the newly extracted barcode area is discarded (S34). And the S1
The process from step 3 is repeated.

【0107】しかし、前記S32の処理で、オーバーラ
ップしていないと判定した場合は、始めて抽出されたバ
ーコード領域のため、新たに抽出したバーコード領域を
バーコード位置座標格納部24に新規に登録する(S3
3)。そして、前記S13の処理から繰り返して行う。
However, if it is determined in the process of S32 that the barcode areas are not overlapped, the newly extracted barcode area is newly stored in the barcode position coordinate storage unit 24. Register (S3
3). Then, the process is repeated from S13.

【0108】なお、前記処理で抽出したバーコード矩形
領域(位置座標情報)は、バーコード位置座標格納部2
4に格納しておき、その後の処理で前記バーコード矩形
領域(位置座標情報)を読み出し、バーコードの認識処
理を行う。
The barcode rectangular area (position coordinate information) extracted in the above processing is stored in the barcode position coordinate storage unit 2.
4, the barcode rectangular area (position coordinate information) is read in the subsequent processing, and the barcode recognition processing is performed.

【0109】(他の実施例)以上実施例について説明し
たが、本発明は次のようにしても実施可能である。 (1) :前記実施例では、副走査方向(Y軸方向)のスキ
ャンを1ライン毎で説明したが、バーコード情報の縦バ
ーが長い(最低でも50ライン)という特徴を利用し
て、例えば、20ライン毎にサーチしても良い。この場
合、スキャンする回数が少なくなり、より高速にバーコ
ードの抽出が可能になる。
(Other Embodiments) The embodiments have been described above, but the present invention can be implemented as follows. (1): In the above-described embodiment, the scanning in the sub-scanning direction (Y-axis direction) has been described line by line, but using the characteristic that the vertical bar of the bar code information is long (at least 50 lines), for example, , Every 20 lines may be searched. In this case, the number of times of scanning is reduced, and the barcode can be extracted at higher speed.

【0110】(2) :前記実施例では、副走査方向(Y軸
方向)のスキャン開始ラインを帳票の最初から最後まで
全てサーチしたが、帳票上に印刷されているバーコード
の位置は、或る程度規則性(最上端/最下端にはない)
があるため、スキャンをする副走査方向の幅を狭くする
ことで、スキャンする回数が少なくて済むため、より高
速にバーコードの抽出を行うことが可能になる。
(2): In the above embodiment, the scan start line in the sub-scanning direction (Y-axis direction) is searched from the beginning to the end of the form, but the position of the bar code printed on the form is Regularity (not at the top / bottom)
Therefore, the number of times of scanning can be reduced by narrowing the width in the sub-scanning direction for scanning, so that the barcode can be extracted at a higher speed.

【0111】(3) :前記実施例では、抽出ウインドゥの
縦画素を1画素としたが、バーコード情報は縦方向に黒
バーが長いという特徴を利用して、抽出ウインドゥの縦
画素を複数画素とし、抽出ウインドゥ内の縦画素間のA
NDをとることで、バーコードの抽出を行うことも可能
である。この場合には、バーコードの特徴以外のパター
ンは抽出しないような処理が可能になる。
(3): In the above embodiment, the vertical pixel of the extracted window is one pixel, but the bar code information has a plurality of vertical pixels of the extracted window by utilizing the feature that the black bar is long in the vertical direction. And A between vertical pixels in the extraction window
It is also possible to extract the barcode by taking the ND. In this case, it is possible to perform processing such that patterns other than the barcode characteristics are not extracted.

【0112】(4) :バーコード抽出装置は、OCR装置
により実現しても良いが、他の同様な任意の装置でも実
現可能である。例えば、パーソナルコンピュータ、ワー
クステーション等のコンピュータにイメージスキャナを
接続し、このイメージスキャナで帳票の情報を読み込ん
だ帳票イメージデータを2値のデータに変換した後、イ
メージメモリに格納する。そして、前記実施例と同様
に、イメージメモリの帳票イメージデータからバーコー
ドの抽出を行うようにしても良い。
(4): The bar code extracting device may be realized by an OCR device, but may be realized by any other similar device. For example, an image scanner is connected to a computer such as a personal computer or a workstation, the form image data in which the form information is read by the image scanner is converted into binary data, and then stored in the image memory. Then, as in the above-described embodiment, the barcode may be extracted from the form image data in the image memory.

【0113】また、前記イメージデータは、例えば、フ
ァクシミリ装置等から入力したイメージデータでも同様
に実施可能である。
Further, as the image data, for example, image data input from a facsimile machine or the like can be similarly implemented.

【0114】[0114]

【発明の効果】以上説明したように、本発明によれば次
のような効果がある。 (1) :入力した画像データ(2値情報)を走査すること
により、画像データの中から真のバーコードのみを自動
的に抽出することができる。
As described above, the present invention has the following effects. (1): Only the true barcode can be automatically extracted from the image data by scanning the input image data (binary information).

【0115】従って、例えば、バーコードが印刷された
電気料金、電話料金等の公共料金の払込み用帳票を銀行
等に持ち込んだ場合、その帳票をイメージスキャナで読
み込めば、バーコード抽出装置で前記帳票のバーコード
を自動的に抽出することができる。
Therefore, for example, when a bill for printing utility bills such as electricity bills and telephone bills on which a barcode is printed is brought into a bank or the like, if the bills are read by an image scanner, the above-mentioned bills are read by the barcode extraction device. The barcode of can be automatically extracted.

【0116】このため、前記バーコード抽出装置で抽出
したバーコード矩形領域の情報を基に、既存のバーコー
ド認識装置でバーコードの認識を行えば、バーコードを
利用した公共料金等の払込みが自動的に、かつ簡単にで
きる。
Therefore, if the existing bar code recognition device recognizes the bar code based on the information of the bar code rectangular area extracted by the bar code extraction device, payment of public utility charges or the like using the bar code can be made. It can be done automatically and easily.

【0117】(2) :画像データからバーコードの抽出が
自動的にできるので、従来のような定義体等を作成する
ことなく、かつ手作業を必要とすることなくバーコード
の抽出を行うことができ、オペレータの操作が容易にな
る。
(2): Since the bar code can be automatically extracted from the image data, the bar code can be extracted without the need to create a conventional definition structure or the like and without requiring manual work. This makes it easier for the operator to operate.

【0118】(3) :画像データより真のバーコード矩形
領域を抽出した後、抽出されたバーコード矩形領域から
バーコードの認識を行うため、バーコードでない領域に
ついてバーコードの認識処理をしなくて済むから、画像
データ全面より一度にバーコードの認識を行う場合に比
べて、高速処理が可能になる。
(3): Since the true barcode rectangular area is extracted from the image data and the barcode is recognized from the extracted barcode rectangular area, the barcode recognition processing is not performed for the area that is not the barcode. Therefore, high-speed processing becomes possible compared with the case where the barcode is recognized at once from the entire surface of the image data.

【0119】前記の効果の外、各請求項に対応して次の
ような効果がある。 (4) :請求項1では、画像メモリに格納された画像デー
タの全領域を順次走査して黒パターンと白パターンが交
互に出現する領域を仮バーコード領域として抽出し、前
記抽出した仮バーコード領域に対しバーコード特有の情
報が存在するか否かを判定して、真のバーコード領域の
みを抽出するバーコード抽出部を備えている。
In addition to the above effects, the following effects are obtained corresponding to each claim. (4): In claim 1, the entire area of the image data stored in the image memory is sequentially scanned to extract an area in which a black pattern and a white pattern appear alternately as a temporary barcode area, and the extracted temporary bar is extracted. It is provided with a barcode extraction unit that determines whether or not information unique to the barcode exists in the code area and extracts only the true barcode area.

【0120】従って、画像データ(2値情報)を走査す
ることにより、画像データの中から真のバーコードを自
動的に抽出することができる。このため、従来のような
定義体を作成することなく、かつ手作業を必要とするこ
となくバーコードの抽出を自動的に行うことができ、オ
ペレータの操作が容易になる。
Therefore, the true bar code can be automatically extracted from the image data by scanning the image data (binary information). For this reason, the barcode can be automatically extracted without creating a conventional definition body and requiring manual work, and the operator's operation becomes easy.

【0121】(5) :請求項2では、バーコード抽出部
は、抽出した仮バーコード領域にバーコード特有の情報
としてレフトガードバー、センターバー、ライトガード
バーの各情報が存在するか否かを判定し、前記各バーの
情報が存在する場合にのみ、仮バーコード領域を真のバ
ーコード領域として抽出する。従って、仮バーコード領
域の内、真のバーコード領域のみを確実に抽出すること
ができる。
(5): In claim 2, the bar code extraction unit determines whether or not each information of the left guard bar, the center bar, and the right guard bar exists as information unique to the bar code in the extracted temporary bar code area. Then, only when the information of each bar is present, the temporary barcode area is extracted as the true barcode area. Therefore, only the true barcode area can be surely extracted from the temporary barcode area.

【0122】(6) :請求項3では、バーコード抽出部
は、抽出した真のバーコード領域の矩形範囲を探索して
バーコードを囲む矩形領域の位置を決定することによ
り、真のバーコード領域をバーコード矩形領域として抽
出する。
(6): In claim 3, the barcode extraction unit searches the rectangular range of the extracted true barcode area and determines the position of the rectangular area surrounding the barcode to determine the true barcode. The area is extracted as a barcode rectangular area.

【0123】従って、バーコードを囲む矩形領域の位置
により、バーコード情報を全て確実に抽出することがで
きるから、その後のバーコード認識処理が確実にでき
る。 (7) :請求項4では、バーコード抽出部は、同一バーコ
ードを二重に登録しないために、新たに抽出したバーコ
ード矩形領域を既抽出済みのバーコード矩形領域と比較
し、両者がオーバーラップしていない場合にのみ、新た
に抽出したバーコード矩形領域を新規のバーコード矩形
領域として登録する。
Therefore, all the bar code information can be surely extracted by the position of the rectangular area surrounding the bar code, so that the subsequent bar code recognition processing can be surely performed. (7): In claim 4, the barcode extraction unit compares the newly extracted barcode rectangular area with the already extracted barcode rectangular area so that the same barcode is not registered twice, and both Only when they do not overlap, the newly extracted barcode rectangular area is registered as a new barcode rectangular area.

【0124】従って、同一バーコードの二重登録を確実
に防止できる。そのため、その後に行うバーコードの認
識処理において、無駄なバーコードの認識処理をしなく
て済むから処理効率が向上する。
Therefore, double registration of the same bar code can be reliably prevented. Therefore, in the subsequent barcode recognition processing, it is not necessary to perform unnecessary barcode recognition processing, so that processing efficiency is improved.

【0125】(8) :請求項5では、画像メモリと、黒/
白パターン抽出部と、バーコード判定部と、バーコード
矩形範囲探索部と、バーコード領域比較部を備えてい
る。従って、画像データ(2値情報)を走査することに
より、画像データの中から真のバーコードを自動的に抽
出することができる。このため、従来のような定義体を
作成することなく、かつ手作業を必要とすることなくバ
ーコードの抽出を自動的に行うことができ、オペレータ
の操作が容易になる。
(8): In claim 5, the image memory and the black / black
A white pattern extraction unit, a barcode determination unit, a barcode rectangular range search unit, and a barcode area comparison unit are provided. Therefore, a true barcode can be automatically extracted from the image data by scanning the image data (binary information). For this reason, the barcode can be automatically extracted without creating a conventional definition body and requiring manual work, and the operator's operation becomes easy.

【0126】(9) :請求項6では、画像メモリは、帳票
のイメージデータを2値のデータに変換した2値の画像
データを格納するメモリとした。従って、帳票イメージ
データ(2値情報)を走査することにより、帳票イメー
ジデータの中から真のバーコードを自動的に抽出するこ
とができる。このため、従来のような定義体を作成する
ことなく、かつ手作業を必要とすることなくバーコード
の抽出を自動的に行うことができ、オペレータの操作が
容易になる。
(9): In claim 6, the image memory is a memory for storing binary image data obtained by converting image data of a form into binary data. Therefore, the true barcode can be automatically extracted from the form image data by scanning the form image data (binary information). For this reason, the barcode can be automatically extracted without creating a conventional definition body and requiring manual work, and the operator's operation becomes easy.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】実施例の装置構成図である。FIG. 2 is a device configuration diagram of an embodiment.

【図3】実施例の処理概要フローチャートである。FIG. 3 is a flowchart of a processing outline of an embodiment.

【図4】実施例における帳票例を示した図である。FIG. 4 is a diagram showing an example of a form in the embodiment.

【図5】実施例の処理説明図(その1)である。FIG. 5 is a process explanatory diagram (1) of the embodiment.

【図6】実施例の処理説明図(その2)である。FIG. 6 is a process explanatory diagram (2) of the embodiment.

【図7】実施例の処理フローチャート(その1)であ
る。
FIG. 7 is a processing flowchart (part 1) of the embodiment.

【図8】実施例の処理フローチャート(その2)であ
る。
FIG. 8 is a processing flowchart (2) of the embodiment.

【図9】実施例の処理フローチャート(その3)であ
る。
FIG. 9 is a processing flowchart (part 3) of the embodiment.

【図10】従来のPOS端末装置によるバーコード認識
処理の説明図である。
FIG. 10 is an explanatory diagram of a barcode recognition process by a conventional POS terminal device.

【図11】従来のOCR装置によるバーコード認識処理
の説明図である。
FIG. 11 is an explanatory diagram of barcode recognition processing by a conventional OCR device.

【符号の説明】 20 イメージ読取部 21 イメージメモリ 22 バーコード抽出部 23 パターン辞書格納部 24 バーコード位置座標格納部 25 黒/白パターン抽出部 26 バーコード判定部 27 バーコード矩形範囲探索部 28 レフトガードバー比較部 29 センターバー比較部 30 ライトガードバー比較部 31 バーコード領域比較部[Explanation of Codes] 20 Image Reading Section 21 Image Memory 22 Bar Code Extraction Section 23 Pattern Dictionary Storage Section 24 Bar Code Position Coordinate Storage Section 25 Black / White Pattern Extraction Section 26 Bar Code Judgment Section 27 Bar Code Rectangle Range Search Section 28 Left Guard bar comparison unit 29 Center bar comparison unit 30 Light guard bar comparison unit 31 Bar code area comparison unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 松橋 智浩 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 稲岡 秀行 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 渡部 英一 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 坂根 俊司 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 直井 聡 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Tomohiro Matsuhashi 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture, Fujitsu Limited (72) Inventor Hideyuki Inaoka 1015, Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture, Fujitsu Limited ( 72) Inventor Eiichi Watanabe 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture, Fujitsu Limited (72) Inventor Shunji Sakane, 1015, Uedotachu, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Fujitsu Limited (72) Inventor, Satoshi Naoi Kanagawa 1015 Kamiodanaka, Nakahara-ku, Kawasaki Prefecture, Japan Within Fujitsu Limited

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 画像データを格納する画像メモリと、 前記画像メモリに格納された画像データの全領域を順次
走査して黒パターンと白パターンが予め設定された閾値
以内の間隔で交互に出現する領域を仮バーコード領域と
して抽出し、前記抽出した仮バーコード領域に対しバー
コード特有の情報が存在するか否かを判定して、真のバ
ーコード領域のみを抽出するバーコード抽出部を備えて
いることを特徴としたバーコード抽出装置。
1. An image memory for storing image data, and a black pattern and a white pattern alternately appear at intervals within a preset threshold value by sequentially scanning the entire area of the image data stored in the image memory. An area is extracted as a temporary bar code area, a bar code extraction unit is provided for extracting only a true bar code area by determining whether or not information unique to the bar code exists in the extracted temporary bar code area. A bar code extraction device characterized in that
【請求項2】 前記バーコード抽出部は、抽出した仮バ
ーコード領域にバーコード特有の情報としてレフトガー
ドバー、センターバー、ライトガードバーの各情報が存
在するか否かを判定し、前記各バーの情報が存在する場
合にのみ、前記仮バーコード領域を真のバーコード領域
として抽出することを特徴とした請求項1記載のバーコ
ード抽出装置。
2. The bar code extraction unit determines whether or not each information of a left guard bar, a center bar, and a right guard bar exists as bar code-specific information in the extracted temporary bar code area, The bar code extracting device according to claim 1, wherein the temporary bar code area is extracted as a true bar code area only when information is present.
【請求項3】 前記バーコード抽出部は、抽出した真の
バーコード領域の矩形範囲を探索してバーコードを囲む
矩形領域の位置を決定することにより、真のバーコード
領域をバーコード矩形領域として抽出することを特徴と
した請求項1記載のバーコード抽出装置。
3. The barcode extraction unit searches the rectangular range of the extracted true barcode area and determines the position of the rectangular area surrounding the barcode to determine the true barcode area as a barcode rectangular area. The bar code extracting device according to claim 1, wherein the bar code extracting device is a bar code extracting device.
【請求項4】 前記バーコード抽出部は、同一バーコー
ドを二重に登録しないために、新たに抽出したバーコー
ド矩形領域を既抽出済みのバーコード矩形領域と比較
し、両者がオーバーラップしていない場合にのみ、新た
に抽出したバーコード矩形領域を新規のバーコード矩形
領域として登録することを特徴とした請求項3記載のバ
ーコード抽出装置。
4. The bar code extraction unit compares the newly extracted bar code rectangular area with an already extracted bar code rectangular area so that the same bar code is not registered twice, and the two are overlapped. 4. The bar code extracting device according to claim 3, wherein the newly extracted bar code rectangular area is registered as a new bar code rectangular area only when not.
【請求項5】 画像データを格納する画像メモリと、 前記画像メモリに格納された画像データの全領域を順次
走査して、黒パターンと白パターンが交互に出現する領
域を仮バーコード領域として抽出する黒/白パターン抽
出部と、 前記黒/白パターン抽出部が抽出した仮バーコード領域
にバーコード特有のレフトガードバー、センターバー、
ライトガードバーが存在するか否かを判定し、前記各バ
ーが存在する場合にのみ、その領域を真のバーコード領
域として抽出するバーコード判定部と、 前記バーコード判定部が抽出した真のバーコード領域の
矩形範囲を探索してバーコードを囲む矩形領域の位置を
決定することにより、真のバーコード領域をバーコード
矩形領域として抽出するバーコード矩形範囲探索部と、 前記バーコード矩形範囲探索部が新たに抽出したバーコ
ード矩形領域を既抽出済みのバーコード矩形領域と比較
し、両者がオーバーラップしていない場合にのみ、新た
に抽出したバーコード矩形領域を新規のバーコード矩形
領域として登録するバーコード領域比較部を備えている
ことを特徴としたバーコード抽出装置。
5. An image memory for storing image data, and an entire area of the image data stored in the image memory is sequentially scanned to extract an area where a black pattern and a white pattern appear alternately as a temporary barcode area. A black / white pattern extracting unit, and a left guard bar, a center bar peculiar to the barcode in the temporary barcode area extracted by the black / white pattern extracting unit,
A bar code determination unit that determines whether or not a light guard bar exists, and extracts the area as a true bar code area only when each bar exists, and a true bar extracted by the bar code determination unit. A barcode rectangular range search unit for extracting a true barcode area as a barcode rectangular area by determining the position of the rectangular area surrounding the barcode by searching the rectangular area of the code area, and the barcode rectangular range search Section compares the newly extracted barcode rectangular area with the already extracted barcode rectangular area, and only when the two do not overlap, the newly extracted barcode rectangular area is set as the new barcode rectangular area. A bar code extraction device characterized by comprising a bar code area comparison unit for registration.
【請求項6】 前記画像メモリは、帳票のイメージデー
タを2値のデータに変換した2値の画像データを格納す
るメモリであることを特徴とした請求項1、又は5記載
のバーコード抽出装置。
6. The bar code extracting device according to claim 1, wherein the image memory is a memory for storing binary image data obtained by converting image data of a form into binary data. .
JP16337695A 1995-06-29 1995-06-29 Barcode extraction device Expired - Lifetime JP3335265B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16337695A JP3335265B2 (en) 1995-06-29 1995-06-29 Barcode extraction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16337695A JP3335265B2 (en) 1995-06-29 1995-06-29 Barcode extraction device

Publications (2)

Publication Number Publication Date
JPH0916701A true JPH0916701A (en) 1997-01-17
JP3335265B2 JP3335265B2 (en) 2002-10-15

Family

ID=15772713

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16337695A Expired - Lifetime JP3335265B2 (en) 1995-06-29 1995-06-29 Barcode extraction device

Country Status (1)

Country Link
JP (1) JP3335265B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009032236A (en) * 2007-06-28 2009-02-12 Fuji Xerox Co Ltd Image processor and image processing program
US7562820B2 (en) 2002-12-17 2009-07-21 Sharp Kabushiki Kaisha Barcode recognition apparatus
US8196836B2 (en) 2007-06-28 2012-06-12 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
US10032059B2 (en) 2016-03-30 2018-07-24 Brother Kogyo Kabushiki Kaisha Image analyzing apparatus that identifies barcode image in target image

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562820B2 (en) 2002-12-17 2009-07-21 Sharp Kabushiki Kaisha Barcode recognition apparatus
JP2009032236A (en) * 2007-06-28 2009-02-12 Fuji Xerox Co Ltd Image processor and image processing program
US8196836B2 (en) 2007-06-28 2012-06-12 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
US10032059B2 (en) 2016-03-30 2018-07-24 Brother Kogyo Kabushiki Kaisha Image analyzing apparatus that identifies barcode image in target image

Also Published As

Publication number Publication date
JP3335265B2 (en) 2002-10-15

Similar Documents

Publication Publication Date Title
US7099508B2 (en) Document identification device, document definition method and document identification method
Gatos et al. Automatic table detection in document images
US20020037097A1 (en) Coupon recognition system
US6327388B1 (en) Identification of logos from document images
JP2001043310A (en) Device and method for correcting document picture
JP3602596B2 (en) Document filing apparatus and method
US4891750A (en) Optical character recognition by forming and detecting matrices of geo features
US5164996A (en) Optical character recognition by detecting geo features
CA2401065C (en) Document matching and annotation lifting
Tang et al. Financial document processing based on staff line and description language
JP3411472B2 (en) Pattern extraction device
US6694065B2 (en) Image collating apparatus and image collating method
WO1992006449A1 (en) Character recognition methods and apparatus for locating and extracting predetermined data from a document
JP3376175B2 (en) Barcode recognition device
JPH0916701A (en) Bar code extracting device
JP3573945B2 (en) Format recognition device and character reading device
JPH09319824A (en) Document recognizing method
JP3276555B2 (en) Format recognition device and character reader
JP4853313B2 (en) Character recognition device
JP4412525B2 (en) Form recognition device and form recognition method
JP2917427B2 (en) Drawing reader
JP3022459B2 (en) Form identification registration device
JP3437296B2 (en) High-speed character string extraction device
Hu et al. Automatic reading of the white pages in a telephone directory
JP3276554B2 (en) Format recognition device and character reader

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020716

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

Free format text: PAYMENT UNTIL: 20080802

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090802

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090802

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100802

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110802

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120802

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120802

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130802

Year of fee payment: 11

EXPY Cancellation because of completion of term