JPH0668294A - Scanning direction detecting method for bar code label - Google Patents

Scanning direction detecting method for bar code label

Info

Publication number
JPH0668294A
JPH0668294A JP4244189A JP24418992A JPH0668294A JP H0668294 A JPH0668294 A JP H0668294A JP 4244189 A JP4244189 A JP 4244189A JP 24418992 A JP24418992 A JP 24418992A JP H0668294 A JPH0668294 A JP H0668294A
Authority
JP
Japan
Prior art keywords
bar code
scanning direction
code label
closed loop
detected
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.)
Pending
Application number
JP4244189A
Other languages
Japanese (ja)
Inventor
Shinichi Kato
真一 加藤
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.)
Nippon Electric Industry Co Ltd
Original Assignee
Nippon Electric Industry 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 Nippon Electric Industry Co Ltd filed Critical Nippon Electric Industry Co Ltd
Priority to JP4244189A priority Critical patent/JPH0668294A/en
Publication of JPH0668294A publication Critical patent/JPH0668294A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To detect a scanning direction along the arranging direction of a bar code appropriately even when a bar code label is shifted obliquely. CONSTITUTION:Black picture elements S1-S8 on the reference line 10A of a screen 10 are detected, and closed loop L1, L2,...L7 length for each picture element are found. Also, edge coordinates A, B, C, and D, etc., on those closed loops are detected. Thence, inspection scanning lines alpha, beta' parallel-displaced from two kinds of straight lines intersecting orthogonally to each other passing the edge coordinates are found, and also, the maximum bar intervals K1, K2 are found from respective inspection scan operation, and the inclination of the straight line which supplies a smaller interval is recognized as the scanning direction.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、多段バーコードラベ
ルの読取方法に係り、特に読取ろうとするバーコードラ
ベルが傾いているときにバーの配列方向を自動的に検出
するバーコードラベルの配列方向検出方法に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of reading a multi-stage bar code label, and more particularly to a bar code label array direction for automatically detecting the bar array direction when the bar code label to be read is tilted. It relates to a detection method.

【0002】[0002]

【従来の技術】一般に使用されるバーコードラベルは、
通常、全体の大きさが一定の長さ及び幅に規格化されて
おり、そのラベル上に黒色等のバーが各種幅及び間隔を
保持して一列に配列した状態で記録されている。また、
この一段一列のものからなるバーコードラベルでは、記
録する情報量がそれ程多くないので、そのバーコードを
何段か積み重ねた多段のものも開発されており、これに
よって多数の情報を記録することができるようになって
いる。一方これらのバーコードラベルを読取るバーコー
ドリーダには、片手で把持して使用できるハンディタイ
プのものの他に、所定の位置に固定した据置タイプのも
のも開発されている。ところで、この据置タイプのバー
コードリーダにあっては、一般にそのリーダ本体から射
出される読取光が一定範囲に制限して投光・走査されて
いるので、梱包箱等のバーコードラベルの被貼付物にお
いてバーコードラベルの貼付位置が所定位置に予め定め
られている場合が多い。
2. Description of the Related Art Commonly used bar code labels are
Usually, the entire size is standardized to have a fixed length and width, and black bars and the like are recorded on the label in a state in which they are arranged in a line with various widths and intervals. Also,
Since the amount of information to be recorded is not so large in this barcode label consisting of one row and one line, a multi-layered barcode in which the barcodes are stacked in several rows has also been developed, and it is possible to record many pieces of information. You can do it. On the other hand, as bar code readers for reading these bar code labels, in addition to the handy type that can be used by grasping with one hand, a stationary type that is fixed at a predetermined position has been developed. By the way, in this stationary bar code reader, the reading light emitted from the reader body is generally projected and scanned while being limited to a certain range. In many cases, the sticking position of the bar code label is preset to a predetermined position on the object.

【0003】[0003]

【発明が解決しようとする課題】ところが、このような
バーコードリーダでは、そのバーコードラベルの貼付位
置が一定であっても、その取付状態が傾いていたり、ま
た梱包箱等が変形していたりすると、バーコードラベル
を正確に読取ることができなかったり、読取不能となっ
てしまうことがある。そこで、この発明は、上記した従
来の欠点に鑑み、バーコードラベルの貼付位置がずれて
いたり、ばらばらであっても、確実にバーコードを読取
ることができるバーコードラベルの配列方向検出方法を
提供することを目的とするものである。
However, in such a bar code reader, even if the bar code label is stuck at a fixed position, the mounting state of the bar code reader is inclined or the packaging box or the like is deformed. Then, the barcode label may not be read accurately or may not be read. Therefore, in view of the above-mentioned conventional drawbacks, the present invention provides a barcode label arrangement direction detecting method capable of reliably reading barcodes even if the barcode label sticking positions are displaced or dislocated. The purpose is to do.

【0004】[0004]

【課題を解決するための手段】即ち、この発明は、多段
バーコードラベルの走査方向を検出するバーコードラベ
ルの走査方向検出方法であって、前記多段バーコードラ
ベルの画像を撮像し、前記画面の基準線上に位置する基
準黒画素毎に、各黒画素をつなぎ前記基準黒画素迄戻る
ように形成した閉ループの長さを検出すると共に、この
閉ループ上の互いに最も離れた黒画素位置を示す4個の
端部座標を検出し、前記閉ループ長のうち最大となる閉
ループ上の前記4端部座標のうちの隣合う2点を通り互
いに直交する2種の直線を算出し、これらの各直線を一
定方向に微小量平行移動させたときの直線を算出して検
査走査線として設定し、これらの各検査走査でそれぞれ
最大バー間隔を検出し、その最大バー間隔のうち小さい
方を与える直線の傾きを多段バーコードラベルの走査方
向として認識するものである。
That is, the present invention is a method for detecting a scanning direction of a bar code label for detecting the scanning direction of a multi-level bar code label, wherein an image of the multi-level bar code label is picked up and the screen is displayed. For each reference black pixel located on the reference line, the length of a closed loop formed by connecting the black pixels to return to the reference black pixel is detected, and the positions of the farthest black pixels on the closed loop are indicated. End coordinates are detected, two kinds of straight lines which pass through adjacent two points of the four end coordinates on the closed loop which are the maximum in the closed loop length and are orthogonal to each other are calculated, and each of these straight lines is calculated. Calculate a straight line when a small amount is translated in a certain direction and set it as an inspection scan line.The maximum bar interval is detected for each of these inspection scans, and the smaller of the maximum bar intervals is given. The can is intended to recognize as a scanning direction of a multi-stage bar code label.

【0005】[0005]

【作用】この発明では、各バー又はバーの外枠に相当す
る経路をたどる閉ループを検出すると共に、この閉ルー
プ上の4個の端部座標のうちの隣合う2点を通り互いに
直交する2種の直線を算出し、これらの直線をバーコー
ドの存在する方向に微小量平行移動させたときの直線を
検査走査線として設定し、この2方向の検査走査により
それぞれ最大バー間隔を検出し、このうち最大バー間隔
の小さい方を与える直線の傾きを多段バーコードラベル
での走査方向として認識する。
According to the present invention, a closed loop that follows a path corresponding to each bar or the outer frame of the bar is detected, and two kinds of four end coordinates on the closed loop, which are adjacent to each other and are orthogonal to each other, are detected. Are calculated and the straight lines obtained by parallel translation of these straight lines in the direction in which the bar code exists are set as inspection scanning lines, and the maximum bar interval is detected by the inspection scanning in these two directions. The inclination of the straight line that gives the smaller maximum bar interval is recognized as the scanning direction in the multi-stage bar code label.

【0006】[0006]

【実施例】以下この発明の一実施例について添付図面を
参照しながら説明する。図1はこの発明に係るバーコー
ドラベルの走査方向検出方法を示すフローチャートであ
り、この走査方向検出方法は、第1ステップ1〜第6ス
テップ6から構成されている。第1ステップ1では、多
段バーコードラベルの全体像が図2に示す画面1内にお
さまるように、所定の撮像手段、例えばCCDカメラ
(エリアセンサ)で撮像する。そして、このバーコード
ラベルは、画面10の中央線10Aで2等分された上下
の各分割域SI,SIIに共に属するような状態で撮像す
る。なお、ここでこの画面10の左上隅を原点0とし、
かつこの原点0を通る水平,垂直方向の各辺をx,yの
各軸として直交座標を設定しておく。第2ステップ2で
は、図3に示す画面10上において、中央線10A上に
ある黒画素であってその直前の画素が白画素であるもの
(以下これを基準黒画素とよぶ)S1 〜S8 を検出し、
各基準黒画素S1 〜S8 について閉ループL1 ,l2
6 ,L7 の長さ及び各4個の端部座標を検出する。こ
こで閉ループとは、例えば第1基準黒画素S1 について
は、この点S1 を始点としてこれに隣接し連続して連な
る多数の黒画素をつなぐ略矩形状の図形(これが多段バ
ーコードの外枠に相当する)の外周を形成するものであ
る。そして、この第1基準黒画素S1 についての閉ルー
プL1 の長さは、画面10上半分を占める分割域SIに
おいて、例えば第1閉ループL1 では始点S1 からスタ
ートして左手に白画素を臨みながら時計回りに隣の黒画
素に向って移動するのと同時に、画面10下半分を占め
る分割域SIIにおいて右手に白画素を臨みながら反時計
回りに隣の黒画素に向って移動し、これら2者が同一終
点S7 に辿り着くときの双方の経路長の合算値をいう。
また、各閉ループにつき検出する端部座標とは、例えば
第1閉ループL1 については、その閉ループL1 上にお
いてx,y各軸方向での最も離れた四地点A,B,C,
Dを意味するものである。第3ステップ3では、第2ス
テップ2にて得られた各閉ループ長のうち最大となる閉
ループ(この実施例では第1,第7閉ループ)を捜し出
し、この閉ループ上の4個の端部座標A,B,C,Dを
検出する。ただし、ここでA(Ax ,Ay),B
(Bx ,By ),C(Cx ,Cy ),D(Dx ,Dy
とする。また、この第3ステップ3では、これらの端部
座標のうち隣合う2座標、例えば図4に示すようにA
B,ADを通り、互いに直交する2種の直線α,β、つ
まり α:(Ax −Bx )・(y−Ay )=(Ay −By )・(x−Ax ) β:(Ax −Dx )・(y−Ay )=(Ay −Dy )・(x−Ax ) を求める。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a flow chart showing a scanning direction detecting method of a barcode label according to the present invention, and this scanning direction detecting method is composed of first step to sixth step 6. In the first step 1, a predetermined image pickup means, for example, a CCD camera (area sensor) picks up an image so that the entire image of the multi-stage bar code label fits within the screen 1 shown in FIG. Then, the bar code label is imaged in such a state that it both belongs to the upper and lower divided areas SI and SII that are bisected by the center line 10A of the screen 10. In addition, here, the origin 0 is set at the upper left corner of the screen 10,
In addition, the orthogonal coordinates are set with the horizontal and vertical sides passing through the origin 0 as the x and y axes. In a second step 2, on the screen 10 shown in FIG. 3, (called hereinafter this with reference black pixels) a black pixel that is on the center line 10A as a pixel immediately before is a white pixel S 1 to S 8 detected,
Closed loop L 1 , l 2 ~ for each reference black pixel S 1 ~ S 8
l 6, to detect the length and the four end coordinates of the L 7. Here, the closed loop means, for example, with respect to the first reference black pixel S 1 , a substantially rectangular figure that connects a number of black pixels that are adjacent to this point S 1 and are continuous in succession (this is outside the multistage bar code). (Corresponding to a frame). The length of the closed loop L 1 with respect to the first reference black pixel S 1 is, for example, in the divided area SI occupying the upper half of the screen 10, for example, in the first closed loop L 1 , starting from the starting point S 1 and providing a white pixel on the left hand. At the same time as it moves clockwise toward the adjacent black pixel, at the same time, it moves counterclockwise toward the adjacent black pixel while facing the white pixel in the right hand in the divided area SII occupying the lower half of the screen 10. It is the total value of the two route lengths when the two arrive at the same end point S 7 .
The end coordinates detected for each closed loop are, for example, for the first closed loop L 1 , the four most distant points A, B, C on the closed loop L 1 in the x and y axial directions.
It means D. In the third step 3, the maximum closed loop (first and seventh closed loops in this embodiment) among the closed loop lengths obtained in the second step 2 is searched for, and the four end coordinates A on this closed loop are searched. , B, C, D are detected. However, here A (A x , A y ), B
(B x, B y), C (C x, C y), D (D x, D y)
And In addition, in the third step 3, two adjacent coordinates among these end coordinates, for example, A as shown in FIG.
Two kinds of straight lines α and β that pass through B and AD and are orthogonal to each other, that is, α: (A x −B x ) · (y−A y ) = (A y −B y ) · (x−A x ) β : (a x -D x) · (y-a y) = Request (a y -D y) · ( x-a x).

【0007】第4ステップ4では、第3ステップ3にて
求めた2種の直線α,βをバーコードが存在する方向に
微小量平行移動させる。例えば直線αについては、y軸
方向に−Δyだけ移動させて次に示す直線α′を求め、
これを検査走査線とする。 α′:y=〔(Ay −By )/(Ax −Bx )〕(x−Ax )+Ay +Δy また、同様に直線βについては、y軸方向に+Δyだけ
移動させて次に示す直線β′を求め、これも検査走査線
とする。 β′:y=〔(Ay −Dy )/(Ax −Dx )〕(x−Ax )+Ay −Δy 第5ステップ5では、第4ステップ4にて得られた直線
α′,β′にもとづいて検査走査を行い、この両走査に
より夫々得られた最大バー間隔K1とK2とを決定す
る。そして、これら双方の最大バー間隔K1,K2のう
ち小さい方を与える直線(この実施例ではβ′)の傾き
(この実施例では〔(Ay −Dy )/(Ax −Dx )〕
を、多段バーコードラベルの走査方向として認識するこ
とができる。従って、この実施例によれば、2分割され
た画面10の上下両面において夫々独立別個に経路長を
測定するようになっており、かつ同一点に辿り着いたこ
とが同時に確認できるので、正確な経路長の測定が行え
る。
In the fourth step 4, the two types of straight lines α and β obtained in the third step 3 are translated by a small amount in the direction in which the bar code exists. For example, with respect to the straight line α, the following straight line α ′ is obtained by moving −Δy in the y-axis direction,
This is an inspection scan line. α ′: y = [(A y −B y ) / (A x −B x )] (x−A x ) + A y + Δy Similarly, for the straight line β, move + Δy in the y-axis direction to The straight line β'shown in (1) is obtained and this is also used as the inspection scanning line. β ′: y = [(A y −D y ) / (A x −D x )] (x−A x ) + A y −Δy In the fifth step 5, the straight line α ′ obtained in the fourth step 4 is obtained. , Β ′, and the maximum bar intervals K1 and K2 respectively obtained by these scannings are determined. Then, a straight line which gives the smaller of the maximum bar spacing K1, K2 of both the inclination of the (beta 'in this example) (in this example [(A y -D y) / ( A x -D x) ]
Can be recognized as the scanning direction of the multi-stage barcode label. Therefore, according to this embodiment, the path length is independently measured separately on the upper and lower surfaces of the screen 10 divided into two, and it is possible to confirm that the same point has been reached at the same time. The path length can be measured.

【0008】[0008]

【発明の効果】以上説明してきたように、この発明に係
るバーコードラベルの走査方向検出方法によれば、画面
基準線上の黒画素に着目し、この各画素を基準としてバ
ー又はバーコードの外枠に沿った閉ループの長さを検出
すると共に、この閉ループ上の4端部座標を検出し、こ
れらの座標を通り各検査走査を行うときの基準となる直
線を設定し、この設定された直線に沿う各検査走査によ
りそれぞれ得られた最大バー間隔のうち、小さい方を与
える直線の傾きを多段バーコードラベルの走査方向とし
て自動的に認識できるようになっているので、斜めにず
れて貼付された多段バーコードラベルについても自動読
取りを行うことが可能になる。
As described above, according to the method for detecting the scanning direction of the bar code label according to the present invention, attention is paid to the black pixels on the screen reference line, and the black pixel on the screen reference line is used as a reference to detect the outside of the bar or the bar code. The length of the closed loop along the frame is detected, the coordinates of the four ends on the closed loop are detected, and a straight line that serves as a reference when performing each inspection scan through these coordinates is set, and the set straight line is set. Of the maximum bar spacings obtained by each inspection scan along, the inclination of the straight line that gives the smaller one can be automatically recognized as the scanning direction of the multi-stage bar code label, so it is affixed with a skew. It is also possible to automatically read multi-stage bar code labels.

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

【図1】この発明に係るバーコードラベルの走査方向検
出方法を示すフローチャート。
FIG. 1 is a flowchart showing a scanning direction detecting method for a barcode label according to the present invention.

【図2】図1に示す検出方法に用いる画面における設定
座標等を示す説明図。
FIG. 2 is an explanatory diagram showing setting coordinates and the like on a screen used in the detection method shown in FIG.

【図3】図1に示す検出方法に用いる撮像画面上の閉ル
ープを示す説明図。
FIG. 3 is an explanatory diagram showing a closed loop on an imaging screen used in the detection method shown in FIG. 1.

【図4】図1に示す検出方法に用いる検査走査線を示す
説明図。
FIG. 4 is an explanatory diagram showing inspection scanning lines used in the detection method shown in FIG.

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

10 画面 α′,β′ 検査走査線 S1 〜S8 基準黒画素 A〜D 端部座標 K1,K2 最大バー間隔10 screen α ', β'inspection scanning line S 1 to S 8 reference black pixel A to D edge coordinates K1, K2 maximum bar interval

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 多段バーコードラベルの走査方向を検出
するバーコードラベルの走査方向検出方法であって、 前記多段バーコードラベルの画像を撮像し、 前記画面の基準線上に位置する基準黒画素毎に閉ループ
の長さを検出すると共に、この閉ループ上の互いに最も
離れた黒画素位置を示す4個の端部座標を検出し、 前記閉ループ長のうち最大となる閉ループ上の前記4端
部座標のうちの隣合う2点を通り互いに直交する2種の
直線を算出し、 これらの各直線を一定方向に微小量平行移動させたとき
の直線を算出して検査走査線として設定し、 これらの各検査走査でそれぞれ最大バー間隔を検出し、 その最大バー間隔のうち小さい方を与える直線の傾きを
多段バーコードラベルの走査方向として認識することを
特徴とするバーコードラベルの走査方向検出方法。
1. A method for detecting a scanning direction of a bar code label for detecting a scanning direction of a multi-level bar code label, wherein an image of the multi-level bar code label is picked up, and each reference black pixel located on a reference line of the screen. In addition to detecting the length of the closed loop, the four edge coordinates indicating the farthest black pixel positions on the closed loop are detected, and the four edge coordinates of the closed loop having the maximum length of the closed loop are detected. Two kinds of straight lines that pass through two adjacent points among them and are orthogonal to each other are calculated, and the straight lines when the respective straight lines are moved in parallel in a certain direction by a small amount are calculated and set as inspection scanning lines. A bar code label characterized by detecting the maximum bar interval in each inspection scan and recognizing the inclination of the straight line that gives the smaller of the maximum bar intervals as the scanning direction of the multi-stage bar code label. Scanning direction detection method.
JP4244189A 1992-08-20 1992-08-20 Scanning direction detecting method for bar code label Pending JPH0668294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4244189A JPH0668294A (en) 1992-08-20 1992-08-20 Scanning direction detecting method for bar code label

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4244189A JPH0668294A (en) 1992-08-20 1992-08-20 Scanning direction detecting method for bar code label

Publications (1)

Publication Number Publication Date
JPH0668294A true JPH0668294A (en) 1994-03-11

Family

ID=17115100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4244189A Pending JPH0668294A (en) 1992-08-20 1992-08-20 Scanning direction detecting method for bar code label

Country Status (1)

Country Link
JP (1) JPH0668294A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882205A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Bar code image scanning method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882205A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Bar code image scanning method

Similar Documents

Publication Publication Date Title
KR100271245B1 (en) Bar code reading apparatus
US7380718B2 (en) Method for reading out symbol information and device for reading out symbol information
EP0669593B1 (en) Two-dimensional code recognition method
US5635697A (en) Method and apparatus for decoding two-dimensional bar code
US5446271A (en) Omnidirectional scanning method and apparatus
EP0894311B1 (en) Omnidirectional barcode locator
JP3187936B2 (en) Barcode reader
KR100263734B1 (en) Two-dimensional code symbol mark decoding method
US5504319A (en) Method and system for bar code acquisition
US5296690A (en) System for locating and determining the orientation of bar codes in a two-dimensional image
JP3233981B2 (en) Symbol information reader
EP1100038A2 (en) CCD-based bar code scanner
EP0449634A2 (en) Omnidirectional bar code reader
JP5140820B2 (en) Symbol information reading apparatus and symbol information reading method
US5854478A (en) Method and apparatus for reading machine-readable symbols having surface or optical distortions
JPH0157394B2 (en)
EP1189017B1 (en) Displacement sensor
JPH06309485A (en) Optical information reader
US4817185A (en) Optical character reader
JP3064632B2 (en) Barcode reader
JPH0668294A (en) Scanning direction detecting method for bar code label
JP2000105795A (en) Omnidirectional-dimensional bar code reader
JPH0469788A (en) Optical information reader
US20240177130A1 (en) Bi-Optic Indicia Reader with Improved Weigh Platter
JP2826229B2 (en) Barcode label scanning position detection method