JP2002150213A - Bar code reader - Google Patents

Bar code reader

Info

Publication number
JP2002150213A
JP2002150213A JP2000346517A JP2000346517A JP2002150213A JP 2002150213 A JP2002150213 A JP 2002150213A JP 2000346517 A JP2000346517 A JP 2000346517A JP 2000346517 A JP2000346517 A JP 2000346517A JP 2002150213 A JP2002150213 A JP 2002150213A
Authority
JP
Japan
Prior art keywords
image
barcode
area
bar code
label
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.)
Withdrawn
Application number
JP2000346517A
Other languages
Japanese (ja)
Inventor
Atsuharu Yamamoto
淳晴 山本
Mikio Fujita
幹男 藤田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2000346517A priority Critical patent/JP2002150213A/en
Publication of JP2002150213A publication Critical patent/JP2002150213A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a bar code reader having high reliability for accurately detecting and decoding a bar code located at an optional position in a document image having various background patterns at a high speed. SOLUTION: An object is read by an image pickup means 1, and an image binarized by a binarization means 2 is stored in an image storage means 3. A bar code candidate region on the binarized image is detected by a region extracting means 4, the binarized image is scanned by a scanning means 5 along a plurality of scanning lines parallel with the reading axis, with the regression straight line of the pattern included in the candidate region used as the reading axis, and the bar code is decoded by a decoding means 6 from a data train of bars and spaces obtained by scanning.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、郵便物のような文
字、図形、模様及びバーコードを含む文書画像におい
て、バーコードの位置、方向を特定し、バーコードを読
み取り、復号化するためのバーコード読み取り装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for specifying the position and direction of a bar code, reading and decoding the bar code in a document image including characters, figures, patterns, and bar codes such as postal matter. The present invention relates to a bar code reader.

【0002】[0002]

【従来の技術】バーコードは商品販売、物流、生産工程
等における物品の管理情報を表記する手段として、幅広
い分野で活用されている。このようなバーコードを読み
取る方法として、ハンドスキャナーやペン入力スキャナ
ーのように作業者がバーコード面を直接指示してバーコ
ードを読み取るものや、定置型スキャナーにおいて複数
方向にビームを走査させ、少なくとも1本のビームはバ
ーコード面を正しく走査してバーコードを読み取るもの
が知られている。また、対象物を2次元の画像データと
して入力し、画像に含まれるバーコード領域を画像処理
により抽出し、読み取り復号化する方式がある。これ
は、富永,他,”文書画像中のバーコード読み取りに関
する一方式”,電子情報通信学会春季全国大会,1991,
D-558に記載されているように、画像中の輪郭ベクトル
の長さ、方向、隣接する距離の揃っている領域をバーコ
ード領域として抽出し読み取るもので、バーコードの位
置、方向に限定受けることなく、また対象物に複数のバ
ーコードが存在しても全てのバーコードの復号化が可能
である。
2. Description of the Related Art Barcodes are used in a wide range of fields as a means for displaying management information of articles in product sales, distribution, production processes and the like. As a method of reading such a barcode, a method in which an operator directly instructs a barcode surface to read a barcode, such as a hand scanner or a pen input scanner, or a fixed scanner, in which a beam is scanned in a plurality of directions, at least, It is known that one beam reads a barcode by scanning the barcode surface correctly. There is also a method of inputting an object as two-dimensional image data, extracting a barcode area included in the image by image processing, and reading and decoding the barcode area. This is Tominaga, et al., "A Method for Reading Barcodes in Document Images", IEICE Spring Convention, 1991,
As described in D-558, a region where the length, direction, and adjacent distance of an outline vector in an image are uniform is extracted and read as a barcode region, and is limited to the position and direction of the barcode. Also, even if a plurality of barcodes exist in the object, all barcodes can be decoded.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記の
従来の方式では、予め2値画像の全画面を走査し、全て
の輪郭を追跡してベクトルデータに変換する必要があ
り、背景領域の複雑化に伴い処理時間が飛躍的に増大
し、また濃度むらのある対象物に対しては2値化閾値の
選定が難しく、読み取り精度を維持するのが困難になる
という課題があった。
However, in the above-mentioned conventional method, it is necessary to scan the entire screen of the binary image in advance, track all the contours and convert them to vector data, and the background area becomes complicated. Accordingly, there has been a problem that the processing time increases drastically, and it is difficult to select a binarization threshold value for an object having uneven density, and it becomes difficult to maintain reading accuracy.

【0004】本発明は、上記従来技術の課題を解決する
もので、任意位置に存在するバーコードの背景領域に多
様な文字紋様が存在しても、高速に処理できるバーコー
ド読み取り装置を提供することを目的とする。また、バ
ーコードに濃度むらがある場合でも、正確に復号化する
ことのできる信頼性の高いバーコード読み取り装置を提
供することを目的とする。
The present invention solves the above-mentioned problems of the prior art, and provides a bar code reading apparatus capable of processing at high speed even if various character patterns exist in a background area of a bar code existing at an arbitrary position. The purpose is to: It is another object of the present invention to provide a highly reliable barcode reading device capable of correctly decoding even if the barcode has uneven density.

【0005】[0005]

【課題を解決するための手段】上記課題を解決するため
に、本発明のバーコード読み取り装置は、バーコードを
含む文書を走査分解して濃淡画像に変換する撮像手段
と、前記濃淡画像を2値画像に変換する2値化手段と、
前記2値画像を記憶する画像記憶手段と、バーコード候
補領域の外接矩形情報を検出する領域抽出手段と、前記
外接矩形内に含まれるバーコードの読み取り軸を算出
し、前記読み取り軸に平行な複数の走査線に沿って2値
画像を走査する走査手段と、前記走査で得られたバーと
スペースのデータ列からバーコードをデコードする復号
化手段とを具備するものであり、画像全体からバーコー
ドの矩形特徴を基に候補領域を絞り込み、各候補領域に
対しデータ走査、復号化することにより、任意位置に存
在するバーコードの背景領域に多様な文字紋様が存在し
ても、高速に処理することができ、またバーコードに濃
度むらがある場合でも、正確に復号化できるという作用
を有する。
In order to solve the above-mentioned problems, a bar code reading apparatus according to the present invention comprises: an image pickup means for scanning and decomposing a document including a bar code to convert the document into a gray image; A binarizing means for converting into a value image;
Image storing means for storing the binary image, area extracting means for detecting circumscribed rectangle information of a barcode candidate area, and calculating a reading axis of a barcode included in the circumscribed rectangle; Scanning means for scanning a binary image along a plurality of scanning lines; and decoding means for decoding a bar code from a data string of bars and spaces obtained by the scanning, and a bar code from the entire image. By narrowing down the candidate areas based on the rectangular features of the code and scanning and decoding the data for each candidate area, even if various character patterns exist in the background area of the barcode at an arbitrary position, it can be processed at high speed In addition, even if the bar code has uneven density, the bar code can be decoded correctly.

【0006】また、本発明のバーコード読み取り装置
は、前記2値化手段が、濃淡画像をm×m窓で走査し、
注目画素を含む窓内画素の平均値を算出し、前記平均値
に所定のオフセット値を加算した値と比較して2値化す
ることを特徴とするものであり、局所的な濃度変動があ
る場合でも、それに応じて閾値が変化するため、潰れや
掠れが生じることなく、バーコードを正確に2値化でき
るという作用を有する。
In the bar code reading apparatus of the present invention, the binarizing means scans the grayscale image with an m × m window,
An average value of pixels in a window including a pixel of interest is calculated, and compared with a value obtained by adding a predetermined offset value to the average value, thereby performing binarization. Even in this case, since the threshold value changes in accordance with this, the bar code can be accurately binarized without crushing or blurring.

【0007】また、本発明のバーコード読み取り装置
は、前記領域抽出手段が、2値画像をx及びy方向に1
/kの縮小画像に変換するブロック化手段と、2値画像
上の個々のパターンにユニークなラベル番号を付与する
ラベル化手段と、x方向及びy方向に隣接する複数のラ
ベルを統合してラベルグループを生成するラベル統合手
段と、前記グループの特徴情報からバーコード領域を検
出する領域判定手段とを具備することを特徴とするもの
であり、バーコードの背景が複雑化しても縮小画像に対
しラベリングと判定処理を行うことにより、高速にバー
コード領域を検出できるという作用を有する。
Further, in the bar code reading apparatus according to the present invention, the area extracting means converts the binary image into one in the x and y directions.
/ K, a labeling means for converting each image on the binary image into a unique label number, and a plurality of labels adjacent in the x and y directions. Label integration means for generating a group, and area determination means for detecting a barcode area from the characteristic information of the group, characterized in that even if the background of the barcode becomes complicated, By performing the labeling and the determination processing, the bar code area can be detected at high speed.

【0008】また、本発明のバーコード読み取り装置
は、前記ブロック化手段が、2値画像をk×k画素を単
位とするメッシュ領域に分割し、前記メッシュ領域内の
2値データの総和を前記縮小画像上の該当位置の画素値
とし、前記縮小画像において0でない画素の平均値に所
定のオフセット値を加算した値と比較して2値化するこ
とを特徴とするものであり、対象物の輝度が変化しても
正確な縮小画像が得られ、確実にバーコード候補領域を
検出できるという作用を有する。
In the bar code reading apparatus of the present invention, the blocking means divides the binary image into mesh regions each having k × k pixels, and calculates the sum of the binary data in the mesh regions. A pixel value at a corresponding position on the reduced image is compared with a value obtained by adding a predetermined offset value to an average value of non-zero pixels in the reduced image, and is binarized. Even if the luminance changes, an accurate reduced image can be obtained, and the barcode candidate region can be reliably detected.

【0009】また、本発明のバーコード読み取り装置
は、前記領域判定手段が、前記ラベルグループの外接矩
形のサイズと構成ラベルの面積総和からバーコード候補
領域を選定することを特徴とするものであり、簡易な判
定処理で、漏れなく候補領域を検出できるという作用を
有する。
In the bar code reading apparatus according to the present invention, the area determining means selects a bar code candidate area from a size of a circumscribed rectangle of the label group and a total area of constituent labels. This has the effect that the candidate area can be detected without omission by simple determination processing.

【0010】また、本発明のバーコード読み取り装置
は、前記走査手段が、バーコード候補領域の外接矩形内
のパターンに対しラベル化を行い、一定距離内で隣接す
るラベルのうち、ラベルを統合する方向と直交する方向
に外接矩形の辺どうしが重なるラベルを収集し、収集し
たラベルに対しバーコード読み取り軸を設定することを
特徴とするものであり、バーコードの近傍にノイズが存
在しても、正確に復号化できるという作用を有する。
In the bar code reading apparatus of the present invention, the scanning means labels the pattern in a circumscribed rectangle of the bar code candidate area, and integrates labels among labels adjacent within a predetermined distance. A label in which sides of a circumscribed rectangle overlap in a direction orthogonal to the direction is collected, and a barcode reading axis is set for the collected label, and even if noise exists near the barcode, Has the effect that decoding can be performed accurately.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を用いて説明する。図1は本発明の実施の形態に
おけるバーコード読み取り装置のブロック結線図を示
す。本実施の形態におけるバーコード読み取り装置は、
バーコードを含む文書を撮像して濃淡画像に変換する撮
像手段1と、得られた濃淡画像を2値画像に変換する2
値化手段2と、得られた2値画像を記憶する画像記憶手
段3と、バーコード候補領域の矩形情報を検出する領域
抽出手段4と、バーコードの読み取り軸を算出し、読み
取り軸に平行な複数の走査線に沿って2値画像を走査す
る走査手段5と、走査により得られたバーとスペースの
データ列からバーコードをデコードする復号化手段6と
を備えている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a block connection diagram of a bar code reader according to an embodiment of the present invention. The barcode reading device according to the present embodiment includes:
An imaging unit 1 for imaging a document including a barcode and converting the image into a gray image; and converting the obtained gray image into a binary image 2
Value converting means 2, image storing means 3 for storing the obtained binary image, area extracting means 4 for detecting rectangular information of the bar code candidate area, and a bar code reading axis is calculated and parallel to the reading axis. Scanning means 5 for scanning a binary image along a plurality of scanning lines, and decoding means 6 for decoding a bar code from a data string of bars and spaces obtained by scanning.

【0012】以上のように構成されたバーコード読み取
り装置について、以下その動作を具体的に説明する。バ
ーコードを含む文書は、撮像手段1により読み取られ、
量子化された多階調画像に変換される。本実施の形態で
は、CCDラインセンサによるイメージスキャナを使用
し、量子化ビット数8、スキャン密度8本/mmとす
る。例えば図2に示すカスタマーバーコードが印字され
た郵便物を読み取るとき、標準的なバーコードは、バー
全長W=640画素、ロングバー高さh1=29画素、セミロ
ングバー高さh2=19画素、タイミングバー高さh3=10画
素、バー幅w1=スペースw2=5画素、バーピッチp=10画
素、で撮像されることになる。
The operation of the bar code reading apparatus configured as described above will be specifically described below. The document including the barcode is read by the imaging unit 1,
It is converted to a quantized multi-tone image. In this embodiment, an image scanner using a CCD line sensor is used, the number of quantization bits is 8, and the scan density is 8 lines / mm. For example, when reading a postal matter on which the customer barcode shown in FIG. 2 is printed, the standard barcode is a bar length W = 640 pixels, a long bar height h1 = 29 pixels, a semi-long bar height h2 = 19 pixels, The image is captured with the timing bar height h3 = 10 pixels, the bar width w1 = the space w2 = 5 pixels, and the bar pitch p = 10 pixels.

【0013】撮像手段1により得られた濃淡画像は、2
値化手段2により2値画像に変換される。図3は2値化
手段2における閾値処理を行う走査窓を示すもので、注
目画素を中心とするm×m画素で構成される。この走査
窓により入力された濃淡画像をラスタ走査し、(数1)
の条件で注目画素を2値化する。図3の○印の注目画素
の値をTinとし、窓内の画素値をdij(i,j=1〜m)、オ
フセット値gとすると、注目画素の2値出力Toutは(数
1)のようになる。
The grayscale image obtained by the imaging means 1 is 2
The image is converted into a binary image by the binarizing unit 2. FIG. 3 shows a scanning window for performing threshold processing in the binarizing means 2, which is composed of m × m pixels centered on the pixel of interest. The grayscale image input through this scanning window is raster-scanned, and (Equation 1)
The target pixel is binarized under the following condition. Assuming that the value of the target pixel indicated by a circle in FIG. 3 is Tin, the pixel value in the window is dij (i, j = 1 to m), and the offset value is g, the binary output Tout of the target pixel becomes Become like

【数1】 (Equation 1)

【0014】上記の処理は、スキャナのライン同期と画
素クロックに同期してハードウェアで行うことにより、
濃淡画像の取り込みに同期して2値画像が生成され、画
像記憶手段3に記憶される。このように注目画素とm×
m近傍領域の平均値を比較して2値化するのは、バーコ
ードの印字に濃度むらがあるとき、固定の閾値ではバー
の掠れやスペースの潰れが発生するためで、局所的にバ
ーとスペースの輝度の振幅に変動があっても、その平均
値を求めることにより、周囲の輝度分布に応じて適した
閾値が設定され、復号化に必要なバーとスペースの関係
が維持されて2値化される。本実施の形態では、走査窓
サイズは、窓内にバー1本とスペース1本が被覆される
幅としm=11とする。オフセット値gは撮像対象の輝度
分布に応じて経験的に決まる値で、対象物の地の輝度の
1/10程度の値を目安として設定する。
The above processing is performed by hardware in synchronization with the line synchronization of the scanner and the pixel clock, so that
A binary image is generated in synchronization with the capture of the grayscale image, and stored in the image storage unit 3. Thus, the target pixel and mx
The reason why the binarization is performed by comparing the average value in the vicinity of m is that, when there is density unevenness in the printing of the barcode, barring or space collapse occurs at a fixed threshold value. Even if the amplitude of the luminance of the space fluctuates, a threshold value suitable for the surrounding luminance distribution is set by calculating the average value, and the relationship between the bar and the space required for decoding is maintained, and the binary value is obtained. Be transformed into In this embodiment, the scanning window size is a width that covers one bar and one space in the window, and m = 11. The offset value g is a value that is empirically determined according to the luminance distribution of the imaging target, and is set to a value that is about 1/10 of the luminance of the ground of the target object as a guide.

【0015】次に領域抽出手段4について、図4から図
11を用いて説明する。図4は領域抽出手段4の処理ブ
ロック構成を示すもので、2値画像をx及びy方向に1
/kの縮小画像に変換するブロック化手段41と、2値
画像上の個々のパターンに個別のラベル番号を付与する
ラベル化手段42と、x及びy方向に隣接する複数のラ
ベルを統合しラベルグループを生成するラベル統合手段
43と、ラベルグループの特徴情報からバーコード領域
を検出する領域判定手段44とから構成される。
Next, the area extracting means 4 will be described with reference to FIGS. FIG. 4 shows a processing block configuration of the area extracting means 4, in which a binary image is converted by one in the x and y directions.
/ K, a blocking means 41 for converting the image into a reduced image, a labeling means 42 for assigning an individual label number to each pattern on the binary image, and a plurality of labels adjacent in the x and y directions. It comprises a label integrating means 43 for generating a group and an area determining means 44 for detecting a barcode area from the characteristic information of the label group.

【0016】ブロック化手段41は、先ず2値化手段2
からの2値画像をk×k画素を単位とするメッシュ領域に
分割し、メッシュ領域内の2値データの総和をそのメッ
シュの代表値とした階調画像を中間画像として生成す
る。すなわちx及びy方向に1/kに縮小された画像
(階調数k×k)が形成される。次に、この中間画像にお
いて0でない画素の平均値Cvを算出し、Cvに適当なオ
フセット値fを減算した値を閾値として2値化する。す
なわち(数2)の条件で多値の縮小画像から2値の縮小
画像に変換する。
The blocking means 41 first includes the binarizing means 2
Is divided into mesh regions in units of k × k pixels, and a gradation image in which the sum of the binary data in the mesh region is a representative value of the mesh is generated as an intermediate image. That is, an image (gradation number k × k) reduced to 1 / k in the x and y directions is formed. Next, an average value Cv of non-zero pixels in the intermediate image is calculated, and a value obtained by subtracting an appropriate offset value f from Cv is binarized as a threshold value. That is, the multivalued reduced image is converted into the binary reduced image under the condition of (Equation 2).

【数2】 本実施の形態ではk=8としており、図5に示すように
ブロック化手段41により、2値化手段2の出力画像5
1が縮小画像52に変換される。多階調の縮小画像を2
値化するときに縮小画像全体の平均輝度値を基に閾値を
設定するのは、固定の閾値により、対象物上のバーコー
ドや文字シンボルが消失したり繋がったりすることを防
ぐためである。
(Equation 2) In the present embodiment, k = 8. As shown in FIG. 5, the output image 5
1 is converted to a reduced image 52. 2 multi-tone reduced images
The reason why the threshold value is set based on the average luminance value of the entire reduced image when the value is converted is to prevent the barcode or the character symbol on the object from disappearing or being connected with the fixed threshold value.

【0017】次にラベル化手段42において、2値化さ
れた縮小画像上の個々のパターンに対し、個別のラベル
を付ける。以下図6から図8を用いてラベル付けの処理
手順について説明する。図6はラベル付けの処理手順を
示すフロー図であり、図7はラベル領域のデータを登録
する構造体テーブル、図8はランデータの接続関係を説
明する図である。図6において、ステップ601で副走
査方向のラインカウンタy=1にセットし、ステップ6
02において画像メモリからyライン目のランデータを
取得する。2値化画像はパターン部が値”1”、背景部
が”0”であるとし、値”1”の連続する始点のx座標
Rsと終点のx座標Reが取り込まれ、ステップ603
以下の判定にかけられる。ステップ603の判定では、
図7(a)に示す構成要素をもつラベルテーブルを検索
し、既に登録されているラベルのうち、有効フラグflag
が1、かつそのラベルに属する最新ランのy座標LastY
が現ラインyに対し1つ前のラインであるラベル領域を
ピックアップし、ステップ605へ進む。ステップ60
5は、注目しているランはそのラベル領域と連結してい
るかどうかを判定するステップで、そのラベル領域に所
属する最新ラインのラン(Xs[0],Xe[0])、(Xs[1],Xe
[1])・・・に対し、(数3)の比較処理で連結をチェ
ックする。
Next, in the labeling means 42, individual labels are attached to individual patterns on the binarized reduced image. The labeling processing procedure will be described below with reference to FIGS. FIG. 6 is a flowchart showing a labeling processing procedure, FIG. 7 is a structure table for registering data of a label area, and FIG. 8 is a view for explaining a connection relationship of run data. In FIG. 6, a line counter y = 1 in the sub-scanning direction is set in step 601.
At 02, run data of the y-th line is obtained from the image memory. In the binarized image, it is assumed that the pattern portion has the value “1” and the background portion has the value “0”, and the x coordinate Rs of the start point and the x coordinate Re of the end point where the value “1” continues are taken in.
The following judgments are made. In the determination of step 603,
A label table having the components shown in FIG. 7A is searched, and among the already registered labels, the valid flag flag is searched.
Is 1, and the y coordinate LastY of the latest run belonging to the label
Picks up the label area that is the line immediately before the current line y, and proceeds to step 605. Step 60
5 is a step of determining whether or not the run of interest is connected to the label area. The run of the latest line belonging to the label area (Xs [0], Xe [0]), (Xs [1 ], Xe
[1])... Are checked by the comparison processing of (Equation 3).

【0018】図8(a)は注目ラン802と前ライン80
1のランが連結する関係を示すもので、
FIG. 8A shows a target run 802 and a front line 80.
It shows the relationship that one run is connected,

【数3】 を満たすとき、注目ランとそのラベル領域は連結してい
るとしてステップ606へ進みデータを更新する。ステ
ップ606では、ラベル領域の面積sに注目ランのラン
長を加算し、外接矩形座標を更新する。図7(b)は外接
矩形の座標を示しており、ラベル領域のx座標の最大値
Xmax及びx座標の最小値Xminと、注目ランの始点Rs及
び終点Reとを大小比較し座標値を更新する。またラベ
ル領域のy座標の最大値Ymax及びy座標の最小値Ymin
と、注目ランの座標yを大小比較し座標値を更新する。
そして更新された外接矩形座標を用いてラベル領域の中
心座標CxとCyを更新する。CxはXmaxとXminの加算平均
値、CyはYmaxとYminの加算平均値とする。
(Equation 3) When satisfies, it is determined that the target run and its label area are connected, and the process proceeds to step 606 to update the data. In step 606, the circumscribed rectangular coordinates are updated by adding the run length of the target run to the area s of the label area. FIG. 7B shows the coordinates of the circumscribed rectangle, and the maximum value of the x coordinate of the label area.
Xmax and the minimum value Xmin of the x-coordinate are compared with the start point Rs and the end point Re of the target run, and the coordinate values are updated. Also, the maximum value Ymax of the y coordinate and the minimum value Ymin of the y coordinate of the label area
Then, the coordinate y of the target run is compared in magnitude and the coordinate value is updated.
Then, the center coordinates Cx and Cy of the label area are updated using the updated circumscribed rectangular coordinates. Cx is the average of Xmax and Xmin, and Cy is the average of Ymax and Ymin.

【0019】図8(b)に示すように注目ラン804が、
1つのラベル領域803ともう1つのラベル領域805
の両方に連結している場合は、ラベル領域803にラベ
ル領域805を統合し、ラベル領域805の有効フラグ
flagを0とし無効ラベルとする。ステップ607は注目
ランが全ての登録されているラベル領域に対して連結チ
ェックを行ったかどうかを判定するステップで、行った
場合はステップ608へ進み、行っていない場合は、次
のラベル領域に対して同様の連結判定処理を行う。ステ
ップ608は注目ランが既存のいずれかのラベル領域に
連結しているかどうかを判定するステップで、連結して
いる場合にはステップ610へ進み、連結していない場
合にはステップ609へ進み、注目ランを新たなラベル
領域として登録し、フラグflagを有効にする。ステップ
610で現ラインの全てのランについて連結判定が終了
したかどうかを判定し、終了していない場合にはステッ
プ602から繰り返し、終了した場合には、現ラインy
上のランに連結していた全てのラベル領域の最新ランの
y座標LastYをyに更新し、各ラベル領域のラン数RunCn
tとランの座標Xs、Xeを更新し、ステップ611へ進
む。ステップ611では画像の全ラインについて処理が
終了したかどうか判定し、終了していない場合にはステ
ップ612でラインカウンタを更新しステップ602か
ら繰り返し、終了した場合には領域分離の全処理を終了
する。このようにしてラベルテーブルにおいて、有効フ
ラグflagが1の領域が、2値画像52に含まれる独立し
たパターンとして検出される。
As shown in FIG. 8B, the noticeable run 804 is
One label area 803 and another label area 805
Are linked to both the label area 805 and the label area 805, the validity flag of the label area 805 is
The flag is set to 0 and the label is invalid. Step 607 is a step of judging whether or not the connection check has been performed for all the registered label areas of the target run. If so, the process proceeds to step 608. If not, the process proceeds to the next label area. A similar connection determination process is performed. Step 608 is a step for determining whether or not the target run is connected to any of the existing label areas. If the target run is connected, the process proceeds to step 610. If not, the process proceeds to step 609. The run is registered as a new label area, and the flag is made valid. In step 610, it is determined whether or not the connection determination has been completed for all runs of the current line. If not completed, the process is repeated from step 602. If completed, the current line y
Update the y-coordinate LastY of the latest run of all the label areas connected to the upper run to y, and run RunCn of each label area.
The t and the coordinates Xs and Xe of the run are updated, and the process proceeds to step 611. In step 611, it is determined whether or not the processing has been completed for all the lines of the image. If not, the line counter is updated in step 612 and the processing is repeated from step 602. . In this way, in the label table, the area where the valid flag flag is 1 is detected as an independent pattern included in the binary image 52.

【0020】次にラベル統合手段43について、図9か
ら図11を用いて説明する。図9はラベル統合手段43
の処理手順を示すフロー図、図10はラベルグループを
登録する構造体テーブルを示す図である。ラベル統合手
段43は、縮小画像上の個々のラベルに対し、x方向、
及びy方向に隣接するものどうしを統合し、ラベルグル
ープを生成する。まずラベル情報を参照しながらx方向
にラベルを統合する手順について説明する。図9におい
て、ステップ901でラベルテーブルからラベル情報を
1つ取得し、以下の処理でそのラベルがどのグループに
属するかを判定する。902においてラベルの有効フラ
グflagをチェックし、有効である場合はステップ903
へ進み、無効な場合はステップ901へ戻り、次IDのラ
ベル情報を取得する。ステップ903はSmin未満の小面
積のラベルはノイズとして統合処理の対象から除外する
もので、面積の条件を満たすときステップ904へ進
み、満たさないときはステップ901へ戻り、次IDのラ
ベル情報を取得する。本実施の形態ではSmin=2画素と
している。ステップ904は注目ラベルが既存のグルー
プに対しx方向に隣接しているかどうかを判定するステ
ップで、図10のグループ構造体のmem個のラベル情報
を参照し、LID[0]〜LID[mem-1]の指し示す全ラベルとの
位置関係をみる。注目ラベルの外接座標を、始点(Tsx,
Tsy)、終点(Tex,Tey)既存グループの相手となるラベ
ルの外接座標を、始点(sx,sy)、終点(ex,ey)とする
と、まず(数4)で統合しようとするラベルどうしの辺
の長さが、同程度であることを判定する。ラベルのy辺
の許容差をDIFFとすると、
Next, the label integrating means 43 will be described with reference to FIGS. FIG. 9 shows the label integrating means 43.
And FIG. 10 is a diagram showing a structure table for registering a label group. The label integrating means 43 applies an x direction to each label on the reduced image,
And a group adjacent to each other in the y direction are integrated to generate a label group. First, a procedure for integrating labels in the x direction while referring to label information will be described. In FIG. 9, one piece of label information is acquired from a label table in step 901 and it is determined to which group the label belongs by the following processing. In step 902, the valid flag flag of the label is checked.
The process proceeds to step 901 if invalid, and returns to step 901 to acquire label information of the next ID. In step 903, labels with a small area less than Smin are excluded from the integration processing as noise. If the area condition is satisfied, the process proceeds to step 904. If not, the process returns to step 901 to acquire the next ID label information. I do. In the present embodiment, Smin = 2 pixels. Step 904 is a step of determining whether or not the label of interest is adjacent to the existing group in the x direction. Referring to mem label information of the group structure in FIG. 10, LID [0] to LID [mem- Look at the positional relationship with all the labels indicated by [1]. Set the circumscribed coordinates of the label of interest to the starting point (Tsx,
Tsy), end point (Tex, Tey) If the circumscribed coordinates of the labels that are the partners of the existing group are the start point (sx, sy) and the end point (ex, ey), first, the labels to be integrated by (Equation 4) It is determined that the lengths of the sides are substantially the same. If the tolerance on the y side of the label is DIFF,

【数4】 となり、上記(数4)の関係を満たす下で、下記(数
5)を満たすとき、互いのラベルがx方向に1列に並ん
でいると判定する。統合する距離をDISTとすると、
(Equation 4) When satisfying the following (Equation 5) under the above-described (Equation 4), it is determined that the labels are arranged in a line in the x direction. If the distance to be integrated is DIST,

【数5】 となる。本実施例ではラベルの辺の許容差DIFFを6画素
以内、ラベル統合の距離DISTは6画素以内としている。
LID[0]〜LID[mem-1]のいずれかのラベルに対し、上記統
合条件に合致するとき、注目ラベルそのグループに含ま
れることになる。
(Equation 5) Becomes In this embodiment, the tolerance DIFF of the side of the label is within 6 pixels, and the distance DIST of label integration is within 6 pixels.
When any of the labels from LID [0] to LID [mem-1] meets the above integration condition, the label of interest is included in the group.

【0021】次にステップ905において、注目ラベル
の属する全てのグループを統合し、1つのグループとし
て生成する。このとき図10のグループ構造体のグルー
プの面積SGと、外接座標、メンバー数mem、メンバーの
ラベルIDを更新追加する。ステップ906において、既
存の全てのグループに関して終了していない場合、次の
グループデータを取得してステップ904及び905の
処理を行い、終了した場合ステップ908へ進む。ステ
ップ908の判定において、注目ラベルがどのグループ
にも統合されない場合にステップ909へ進み、注目ラ
ベルを新たなラベルグループとして新たなGIDを割り当
ててグループ構造体に登録し、グループ種別typeを0、
グループ方向xを設定する。ステップ910ではラベル
テーブル上の全ての有効なラベルに対し処理が終了した
かどうか判定し、終了していない場合にはステップ90
1から繰り返し、終了した場合には、x方向のラベル統
合処理を終了する。上記x方向のラベル統合処理をy方
向に関しても実施する。この場合、(数4)と(数5)
のサフィックスxとyを交換する。以上の結果、x方向
とy方向のラベルグループが得られ、例えば図5の52
の対象物の場合、x方向のラベル統合の結果、図11の
(a)の破線で示す領域がx方向のグループ、同図(b)の破
線で示す領域がy方向のグループとして得られる。
Next, in step 905, all groups to which the label of interest belongs are integrated to generate one group. At this time, the area SG of the group of the group structure in FIG. 10, the circumscribed coordinates, the number of members mem, and the label ID of the member are updated and added. If it is determined in step 906 that the processing has not been completed for all existing groups, the next group data is obtained, and the processing in steps 904 and 905 is performed. If it is determined in step 908 that the label of interest is not integrated with any group, the process proceeds to step 909, where the label of interest is assigned to a new GID as a new label group, registered in the group structure, and the group type is set to 0,
Set the group direction x. In step 910, it is determined whether or not the processing has been completed for all valid labels on the label table.
The process is repeated from 1 and when completed, the label integration process in the x direction is completed. The label integration process in the x direction is also performed for the y direction. In this case, (Equation 4) and (Equation 5)
Exchange the suffixes x and y of As a result, label groups in the x and y directions are obtained.
In the case of the object of FIG.
The area indicated by the broken line in (a) is obtained as a group in the x direction, and the area indicated by a broken line in FIG.

【0022】次に領域判定手段44について、図10及
び図11を参照しながら説明する。図10のグループ構
造体テーブルを参照し、ラベル統合手段で得られた全て
のグループに対し、(数6)または(数7)の条件でカ
スタマーバーコード領域を選択する。バーコード領域の
幅Wに対しマージンをΔw、バーコード領域の高さh1に
対しマージンをΔhとすると、
Next, the area determining means 44 will be described with reference to FIGS. With reference to the group structure table of FIG. 10, a customer barcode area is selected for all the groups obtained by the label integrating means under the condition of (Formula 6) or (Formula 7). If the margin is Δw for the width W of the barcode area and Δh is the margin for the height h1 of the barcode area,

【数6】 または、(Equation 6) Or

【数7】 となる。本実施の形態では、W=640画素、h1=29画
素、Δw=10画素、Δh=5画素とする結果、図11の破
線で示すラベルグループのうち、111及び112のラ
ベルグループが、カスタマーバーコード候補領域として
抽出される。
(Equation 7) Becomes In this embodiment, W = 640 pixels, h1 = 29 pixels, Δw = 10 pixels, and Δh = 5 pixels. As a result, of the label groups indicated by broken lines in FIG. It is extracted as a code candidate area.

【0023】次に走査手段5及び復号化手段6につい
て、図12及び図13を参照しながら説明する。図12
は走査手段と復号化手段の処理手順を示すフロー図を示
し、図13はラベルの統合関係を示す図である。図12
において、ステップ121で、領域判定手段44でバー
コード候補と判定された矩形領域の始点(GXmin,GYmi
n)及び終点(GXmax,GYmax)に対し、図13の点線枠1
31に示すように原寸の画像上のバーコード候補領域の
始点132(x1,y1)と終点133(x2,y2)を(数8)
により求める。
Next, the scanning means 5 and the decoding means 6 will be described with reference to FIGS. FIG.
FIG. 13 is a flowchart showing the processing procedure of the scanning unit and the decoding unit, and FIG. 13 is a diagram showing the integration relationship of labels. FIG.
In step 121, the starting point (GXmin, GYmi) of the rectangular area determined as a barcode candidate by the area determining means 44 in step 121
n) and the end points (GXmax, GYmax),
As shown in FIG. 31, the start point 132 (x1, y1) and the end point 133 (x2, y2) of the barcode candidate area on the original image are defined by (Equation 8).
Ask by

【数8】 (Equation 8)

【0024】次にステップ122で、領域131内のパ
ターンに対しラベル化を行い、個々のラベルの重心座標
と外接矩形座標を求める。このラベル化の処理は、ラベ
ル化手段42と同じであり説明は省略する。次にステッ
プ123において注目している領域の方向属性がX方向
かY方向かを判定し、X方向の場合は124へ進みX方
向にラベルを統合し、Y方向の場合は125へ進みY方
向にラベルを統合する。例えば図13において、X方向
にラベルを統合するとき、ラベルの外接矩形の始点(s
x,sy)終点(ex,ey)とすると、(数9)に示すよう
に、ラベルどうしが所定のピッチp画素内にあり、
Next, in step 122, the pattern in the area 131 is labeled, and the barycentric coordinates and the circumscribed rectangular coordinates of each label are obtained. The labeling process is the same as that of the labeling means 42, and the description is omitted. Next, in step 123, it is determined whether the direction attribute of the region of interest is the X direction or the Y direction. If the direction is the X direction, the process proceeds to 124, and the labels are integrated in the X direction. Integrate labels into. For example, in FIG. 13, when the labels are integrated in the X direction, the starting point (s
x, sy) If the end point is (ex, ey), as shown in (Equation 9), the labels are within a predetermined pitch p pixels, and

【数9】 かつ(数10)に示すように各ラベルのY方向の始点と
終点が互いに重なりあうことを条件とする。
(Equation 9) In addition, as shown in (Equation 10), the condition is that the start point and the end point of each label in the Y direction overlap each other.

【数10】 図13の場合、ラベル11と12が統合された後、ラベ
ル13と14が(数9)を満たし候補としてあがるが、
(数10)によりラベル12に対しY方向の始点と終点
が重なり合うラベル13が統合の対象として選択され
る。以降同様にラベル15と17が同一グループとな
り、ラベル14→16→18が別のグループとして統合
される。この結果、バーコード候補領域131内のバー
コード領域134が、その他の領域135から分離抽出
される。次にステップ126において、各バーコード領
域134のn個のラベルの重心座標(x,y)を用いて(数
11)の最小自乗法に従って読み取り軸Y=aX+bの係
数a及びbを求める。
(Equation 10) In the case of FIG. 13, after the labels 11 and 12 are integrated, the labels 13 and 14 satisfy (Equation 9) and rise as candidates.
According to (Equation 10), the label 13 in which the start point and the end point in the Y direction overlap the label 12 is selected as an integration target. Thereafter, similarly, labels 15 and 17 belong to the same group, and labels 14 → 16 → 18 are integrated as another group. As a result, the barcode area 134 in the barcode candidate area 131 is separated and extracted from the other area 135. Next, in step 126, using the barycentric coordinates (x, y) of the n labels in each barcode area 134, the coefficients a and b of the reading axis Y = aX + b are obtained according to the least square method of (Equation 11).

【数11】 [Equation 11]

【0025】ステップ123において、ラベル統合の方
向がY方向と判定された場合は、読み取り軸X=aY+b
の係数a,bは(数12)に従って求める。
If it is determined in step 123 that the direction of label integration is the Y direction, the read axis X = aY + b
Are obtained according to (Equation 12).

【数12】 このように求まった読み取り軸に沿って複数の走査線を
引き、走査線上の2値データを順にピックアップし、バ
ーとスペースのデータ列を生成する。ステップ127
は、バーとスペースのデータ列を、予め規定の変換ルー
ルに従ってキャラクタに変換し、バーコードを復号す
る。ステップ128において全てのバーコード候補領域
に対しデコードトライが済んだかどうかを確認し、まだ
候補領域がある場合はステップ121からの処理を繰り
返す。以上の処理によりバーコードが文書画像中の任意
位置に複数存在しても全て正確に復号化することができ
る。
(Equation 12) A plurality of scanning lines are drawn along the read axis thus determined, and binary data on the scanning lines are sequentially picked up to generate a bar and space data string. Step 127
Converts a bar and space data string into characters according to a predetermined conversion rule, and decodes a barcode. At step 128, it is checked whether or not decoding attempts have been completed for all barcode candidate areas, and if there are still candidate areas, the processing from step 121 is repeated. With the above processing, even if a plurality of barcodes exist at an arbitrary position in the document image, all the barcodes can be correctly decoded.

【0026】以上のように、本実施の形態によれば、第
1に、濃淡画像を2値化して記憶し、2値画像全体から
バーコードの矩形特徴を基に候補領域を絞り込み、矩形
内に含まれるバー群を検出して読み取り軸を求め、軸に
沿って平行に走査して得られるデータ列からバーコード
を復号化することにより、任意位置に存在する複数のバ
ーコードを復号化できるという効果が得られる。
As described above, according to the present embodiment, first, the grayscale image is binarized and stored, and the candidate area is narrowed down from the entire binary image based on the rectangular feature of the barcode. By detecting a group of bars included in the data, determining a reading axis, and decoding a bar code from a data string obtained by scanning in parallel along the axis, a plurality of bar codes existing at arbitrary positions can be decoded. The effect is obtained.

【0027】第2に、候補領域を抽出するため2値画像
をx及びy方向に1/kに縮小し、縮小された2値画像
上の個々のパターンに対しラベリング処理を行い、x及
びy方向に隣接するラベルを統合してグループを生成
し、このグループの特徴情報からバーコード領域を検出
することにより、バーコードの背景が複雑化しても、高
速にバーコード領域を検出できるという効果が得られ
る。
Second, in order to extract a candidate area, the binary image is reduced to 1 / k in the x and y directions, labeling processing is performed on each pattern on the reduced binary image, and x and y By generating labels by integrating labels adjacent to each other in the direction and detecting the barcode area from the feature information of this group, the barcode area can be detected at high speed even if the background of the barcode is complicated. can get.

【0028】第3に、入力の濃淡画像に対しm×m窓で
走査し、走査窓内の画素の平均値に所定のオフセット値
を加算した値を閾値として2値化することにより、局所
的な濃度変動がある場合でも、それに応じて閾値が変化
するため、潰れや掠れが生じることなくバーコードを正
確に2値化できるという効果が得られる。
Third, the input gray-scale image is scanned in an m × m window, and a binary value is obtained by adding a predetermined offset value to the average value of the pixels in the scanning window as a threshold, thereby performing localization. Even if there is a large density fluctuation, the threshold value changes in accordance with the fluctuation, so that an effect is obtained that the barcode can be accurately binarized without crushing or blurring.

【0029】第4に、2値画像をk×k領域を単位とす
るメッシュに分割し、メッシュ領域内の2値データの総
和をそのメッシュの代表画素値とし、1/k縮小画像に
おいて0でない画素の平均値に所定のオフセット値を加
算した値で縮小画像全体を2値化することにより、対象
物の輝度が変化しても確実にバーコード候補領域を検出
できるという効果が得られる。
Fourth, the binary image is divided into meshes in units of k × k regions, and the sum of the binary data in the mesh regions is used as the representative pixel value of the mesh. By binarizing the entire reduced image with a value obtained by adding a predetermined offset value to the average value of the pixels, the bar code candidate area can be reliably detected even if the luminance of the object changes.

【0030】第5に、縮小画像上のラベルグループの外
接矩形のサイズと構成ラベルの面積総和からバーコード
候補領域を選別することにより、もれなく候補領域を検
出できるという効果が得られる。
Fifth, by selecting a barcode candidate area from the size of the circumscribed rectangle of the label group on the reduced image and the total area of the constituent labels, an effect is obtained that the candidate area can be detected without fail.

【0031】第6に、バーコード候補領域内のパターン
に対しラベル化を行い、一定距離内で隣接するラベルの
うち、ラベルを統合する方向と直交する方向に外接矩形
の辺どうしが重なるラベルを収集し、収集したラベルに
対し読み取り軸を求めることにより、バーコードの近傍
にノイズが存在しても正確に復号化できるという効果が
得られる。
Sixth, labeling is performed on the pattern in the bar code candidate area, and among labels adjacent to each other within a certain distance, a label whose sides of the circumscribed rectangle overlap in a direction orthogonal to the direction in which the labels are integrated is determined. By collecting the labels and determining the read axis for the collected labels, an effect is obtained in that even if noise exists near the barcode, decoding can be performed accurately.

【0032】[0032]

【発明の効果】以上のように、本発明のバーコード読み
取り装置によれば、入力画像に対し局所的な濃度分布に
応じた閾値で2値化し、2値画像を縦、横1/kに縮小
した画像上でラベリングを行い、各ラベルグループの特
徴からバーコード候補領域を絞り込み、このバーコード
候補領域に対して、原サイズの2値画像を参照し、隣接
するバーラベルのみを再統合して読み取り軸を求め、読
み取り軸に沿って2値画像をトレースし、復号化するこ
とにより、文書画像中の任意位置のバーコード領域の背
景が複雑な場合でも、文書中の任意位置、任意方向のバ
ーコード領域を高速に検出でき、濃度むらや近傍パター
ンの影響を受けずに正確に復号化できる信頼性の高いバ
ーコード読み取り装置が実現できる。
As described above, according to the bar code reading apparatus of the present invention, the input image is binarized by the threshold value according to the local density distribution, and the binary image is reduced to 1 / k vertically and horizontally. Labeling is performed on the reduced image, barcode candidate areas are narrowed down from the characteristics of each label group, and for this barcode candidate area, only the adjacent bar labels are re-integrated by referring to the original size binary image. By obtaining the reading axis, tracing the binary image along the reading axis, and decoding the binary image, even if the background of the barcode area at an arbitrary position in the document image is complicated, A highly reliable barcode reading device capable of detecting a barcode region at high speed and accurately decoding without being affected by density unevenness or a nearby pattern can be realized.

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

【図1】本発明の実施の形態におけるバーコード読み取
り装置のブロック結線図
FIG. 1 is a block diagram of a barcode reading device according to an embodiment of the present invention.

【図2】同実施の形態のバーコード読み取り装置におけ
る読み取り対象のバーコードを示す図
FIG. 2 is a diagram showing a barcode to be read by the barcode reader according to the embodiment;

【図3】同実施の形態のバーコード読み取り装置におけ
る2値化手段の走査窓を示す図
FIG. 3 is a diagram showing a scanning window of a binarizing unit in the barcode reading apparatus according to the embodiment;

【図4】同実施の形態のバーコード読み取り装置におけ
る領域抽出手段のブロック構成図
FIG. 4 is a block configuration diagram of an area extracting unit in the barcode reading apparatus according to the embodiment;

【図5】同実施の形態のバーコード読み取り装置におけ
るブロック化手段の処理結果を示す図
FIG. 5 is an exemplary view showing a processing result of a blocking unit in the barcode reader according to the embodiment;

【図6】同実施の形態のバーコード読み取り装置におけ
るラベル化手段の処理手順を示すフロー図
FIG. 6 is a flowchart showing a processing procedure of a labeling unit in the barcode reader according to the embodiment;

【図7】同実施の形態のバーコード読み取り装置におけ
るラベル化手段のラベル情報を登録する構造体テーブル
を示す図
FIG. 7 is a view showing a structure table for registering label information of a labeling unit in the barcode reading apparatus according to the embodiment;

【図8】同実施の形態のバーコード読み取り装置におけ
るラベル化手段のランデータの連結判定を説明する図
FIG. 8 is an exemplary view for explaining connection determination of run data by a labeling unit in the barcode reading apparatus according to the embodiment;

【図9】同実施の形態のバーコード読み取り装置におけ
るラベル統合手段の処理手順を示すフロー図
FIG. 9 is a flowchart showing a processing procedure of a label integrating means in the barcode reading apparatus of the embodiment.

【図10】同実施の形態のバーコード読み取り装置にお
けるラベル統合化手段のグループ情報を登録する構造体
テーブルを示す図
FIG. 10 is a view showing a structure table for registering group information of a label integrating means in the barcode reading apparatus according to the embodiment;

【図11】同実施の形態のバーコード読み取り装置にお
けるラベル統合手段の処理結果を示す図
FIG. 11 is a view showing a processing result of the label integrating means in the barcode reading apparatus of the embodiment.

【図12】同実施の形態のバーコード読み取り装置にお
ける走査手段及び復号化手段の処理手順を示すフロー図
FIG. 12 is a flowchart showing a processing procedure of a scanning unit and a decoding unit in the barcode reading apparatus of the embodiment.

【図13】同実施の形態のバーコード読み取り装置にお
ける走査手段のラベル統合関係を説明する図
FIG. 13 is a view for explaining a label integration relationship of scanning means in the barcode reading device of the embodiment.

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

1 撮像手段 2 2値化手段 3 画像記憶手段 4 領域抽出手段 5 走査手段 6 復号化手段 41 ブロック化手段 42 ラベル化手段 43 ラベル統合手段 44 領域判定手段 51 2値化手段による2値化画像 52 ブロック化手段による縮小画像 111 バーコード候補領域 112 バーコード候補領域 DESCRIPTION OF SYMBOLS 1 Imaging means 2 Binarization means 3 Image storage means 4 Area extraction means 5 Scanning means 6 Decoding means 41 Blocking means 42 Labeling means 43 Label integration means 44 Area judgment means 51 Binarized image by binarization means 52 Reduced image by blocking means 111 Barcode candidate area 112 Barcode candidate area

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 3F079 AA01 CA06 CB28 CB35 5B072 AA01 AA02 BB00 CC02 CC24 DD02 DD15 DD23 FF02 FF03 FF04 LL19  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 3F079 AA01 CA06 CB28 CB35 5B072 AA01 AA02 BB00 CC02 CC24 DD02 DD15 DD23 FF02 FF03 FF04 LL19

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 バーコードを含む文書を走査分解して濃
淡画像に変換する撮像手段と、前記濃淡画像を2値画像
に変換する2値化手段と、前記2値画像を記憶する画像
記憶手段と、バーコード候補領域の外接矩形情報を検出
する領域抽出手段と、前記外接矩形内に含まれるバーコ
ードの読み取り軸を算出し、前記読み取り軸に平行な複
数の走査線に沿って2値画像を走査する走査手段と、前
記走査で得られたバーとスペースのデータ列からバーコ
ードをデコードする復号化手段とを具備するバーコード
読み取り装置。
1. An image pickup means for scanning and decomposing a document including a barcode into a grayscale image, a binarizing means for converting the grayscale image into a binary image, and an image storing means for storing the binary image. Area extracting means for detecting circumscribed rectangle information of a barcode candidate area; calculating a reading axis of a barcode included in the circumscribed rectangle; and forming a binary image along a plurality of scanning lines parallel to the reading axis. A bar code reading device comprising: scanning means for scanning a bar code; and decoding means for decoding a bar code from a data string of bars and spaces obtained by the scanning.
【請求項2】 前記2値化手段は、濃淡画像をm×m窓
で走査し、注目画素を含む窓内画素の平均値を算出し、
前記平均値に所定のオフセット値を加算した値と比較し
て2値化することを特徴とする請求項1記載のバーコー
ド読み取り装置。
2. The binarizing means scans a grayscale image with an m × m window, and calculates an average value of pixels in a window including a pixel of interest.
2. The barcode reading device according to claim 1, wherein the binarization is performed by comparing a value obtained by adding a predetermined offset value to the average value.
【請求項3】 前記領域抽出手段は、2値画像をx及び
y方向に1/kの縮小画像に変換するブロック化手段
と、2値画像上の個々のパターンにユニークなラベル番
号を付与するラベル化手段と、x方向及びy方向に隣接
する複数のラベルを統合してラベルグループを生成する
ラベル統合手段と、前記グループの特徴情報からバーコ
ード領域を検出する領域判定手段とを具備することを特
徴とする請求項1乃至2記載のバーコード読み取り装
置。
3. An area extracting means for converting a binary image into a reduced image of 1 / k in x and y directions, and assigning a unique label number to each pattern on the binary image. Labeling means, label integrating means for integrating a plurality of labels adjacent in the x direction and y direction to generate a label group, and area determining means for detecting a barcode area from characteristic information of the group The bar code reader according to claim 1 or 2, wherein:
【請求項4】 前記ブロック化手段は、2値画像をk×
k画素を単位とするメッシュ領域に分割し、前記メッシ
ュ領域内の2値データの総和を前記縮小画像上の該当位
置の画素値とし、前記縮小画像において0でない画素の
平均値に所定のオフセット値を加算した値と比較して2
値化することを特徴とする請求項3記載のバーコード読
み取り装置。
4. The blocking means converts the binary image to k ×
k is divided into mesh regions in units of k pixels, the sum of the binary data in the mesh region is defined as a pixel value at a corresponding position on the reduced image, and a predetermined offset value is added to an average value of non-zero pixels in the reduced image. Is compared with the value obtained by adding
4. The bar code reader according to claim 3, wherein the bar code is converted into a value.
【請求項5】 前記領域判定手段は、前記ラベルグルー
プの外接矩形のサイズと構成ラベルの面積総和からバー
コード候補領域を選定することを特徴とする請求項3記
載のバーコード読み取り装置。
5. The barcode reading device according to claim 3, wherein the area determination means selects a barcode candidate area from a size of a circumscribed rectangle of the label group and a total area of constituent labels.
【請求項6】 前記走査手段は、バーコード候補領域の
外接矩形内のパターンに対しラベル化を行い、一定距離
内で隣接するラベルのうち、ラベルを統合する方向と直
交する方向に外接矩形の辺どうしが重なるラベルを収集
し、収集したラベルに対しバーコード読み取り軸を設定
することを特徴とする請求項1乃至2記載のバーコード
読み取り装置。
6. The scanning means performs labeling on a pattern in a circumscribed rectangle of a barcode candidate area, and forms a circumscribed rectangle in a direction orthogonal to a direction in which labels are integrated among labels adjacent within a predetermined distance. 3. The barcode reading apparatus according to claim 1, wherein labels whose sides overlap each other are collected, and a barcode reading axis is set for the collected labels.
JP2000346517A 2000-11-14 2000-11-14 Bar code reader Withdrawn JP2002150213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000346517A JP2002150213A (en) 2000-11-14 2000-11-14 Bar code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000346517A JP2002150213A (en) 2000-11-14 2000-11-14 Bar code reader

Publications (1)

Publication Number Publication Date
JP2002150213A true JP2002150213A (en) 2002-05-24

Family

ID=18820373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000346517A Withdrawn JP2002150213A (en) 2000-11-14 2000-11-14 Bar code reader

Country Status (1)

Country Link
JP (1) JP2002150213A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266190A (en) * 2008-03-31 2009-11-12 Nidec Sankyo Corp Symbol information reading apparatus and symbol information reading method
JP2010147524A (en) * 2008-12-16 2010-07-01 Fuji Xerox Co Ltd Image processing apparatus, position code image compositing apparatus, image forming apparatus, image processing method, position code image compositing method and program
JP2014533398A (en) * 2011-11-15 2014-12-11 シクパ ホルディング ソシエテ アノニムSicpa Holding Sa Pattern for encoding numerical information items on the surface, marking method and reading method
US9158956B2 (en) 2011-11-08 2015-10-13 Kabushiki Kaisha Toshiba Reader, reading method and computer program product
JP2017169135A (en) * 2016-03-17 2017-09-21 京セラドキュメントソリューションズ株式会社 Image reader and image forming apparatus
CN111222356A (en) * 2020-01-14 2020-06-02 河北省烟草公司沧州市公司 Image recognition method, code scanning terminal and commodity sales management system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266190A (en) * 2008-03-31 2009-11-12 Nidec Sankyo Corp Symbol information reading apparatus and symbol information reading method
JP2010147524A (en) * 2008-12-16 2010-07-01 Fuji Xerox Co Ltd Image processing apparatus, position code image compositing apparatus, image forming apparatus, image processing method, position code image compositing method and program
US9158956B2 (en) 2011-11-08 2015-10-13 Kabushiki Kaisha Toshiba Reader, reading method and computer program product
JP2014533398A (en) * 2011-11-15 2014-12-11 シクパ ホルディング ソシエテ アノニムSicpa Holding Sa Pattern for encoding numerical information items on the surface, marking method and reading method
JP2017169135A (en) * 2016-03-17 2017-09-21 京セラドキュメントソリューションズ株式会社 Image reader and image forming apparatus
CN111222356A (en) * 2020-01-14 2020-06-02 河北省烟草公司沧州市公司 Image recognition method, code scanning terminal and commodity sales management system

Similar Documents

Publication Publication Date Title
JP4323328B2 (en) System and method for identifying and extracting character string from captured image data
Lee et al. Automatic extraction of characters in complex scene images
US20150302236A1 (en) Method and device for identifying a two-dimensional barcode
CA2401065C (en) Document matching and annotation lifting
JPH10171916A (en) Bar code reader
US9652652B2 (en) Method and device for identifying a two-dimensional barcode
JP3591184B2 (en) Barcode reader
EP0866415A2 (en) Method of locating a machine-readable marker within an image
US6367698B1 (en) Bar code reader for decoding a four state bar code
JPH06215293A (en) Device for recognizing vehicle number
JP2002150213A (en) Bar code reader
IL98293A (en) Method of discriminating between text and graphics
KR100503724B1 (en) Finding objects in an image
JP2002133424A (en) Detecting method of inclination angle and boundary of document
JP2010140310A (en) Bar code reading apparatus, bar code reading program, and bar code reading method
CN115272143A (en) Visual enhancement method, device and equipment for bar code and storage medium
JP2007094584A (en) Method for detecting two dimensional code, detecting device, and detecting program
JP2001229339A (en) Barcode reader
JP4116597B2 (en) Bar code recognition apparatus, bar code recognition method, and bar code recognition program.
JP3253201B2 (en) Image processing device and image type determination method
KR102502523B1 (en) Apparatus and method for extracting barcode
JP2798013B2 (en) Two-dimensional code reading method and apparatus
JP2002269574A (en) Run length based connected component and contour tracking for enhancing performance of circled area extracting algorithm
JP3580115B2 (en) Customer barcode reading mail sorting equipment
JP2019113477A (en) Defect inspection equipment and defect inspection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060913

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20080820