JPH08329185A - Symbol information reader - Google Patents

Symbol information reader

Info

Publication number
JPH08329185A
JPH08329185A JP7135256A JP13525695A JPH08329185A JP H08329185 A JPH08329185 A JP H08329185A JP 7135256 A JP7135256 A JP 7135256A JP 13525695 A JP13525695 A JP 13525695A JP H08329185 A JPH08329185 A JP H08329185A
Authority
JP
Japan
Prior art keywords
label
information
variable
image
barcode
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
JP7135256A
Other languages
Japanese (ja)
Other versions
JP3580901B2 (en
Inventor
Masahiro Takizawa
正浩 滝沢
Masanori Kubo
允則 久保
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.)
Olympus Corp
Original Assignee
Olympus Optical 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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP13525695A priority Critical patent/JP3580901B2/en
Publication of JPH08329185A publication Critical patent/JPH08329185A/en
Application granted granted Critical
Publication of JP3580901B2 publication Critical patent/JP3580901B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE: To provide a symbol information reader capable of quickly and surely reading out bar code symbol information from a moving two-dimensional bar code. CONSTITUTION: The symbol information reader is constituted of a stuck bar code label 2 with a PDF-417 format e.g. stuck to an article 1 or the like moved by a carrying system 3 such as a belt conveyer, an image pickup optical system 4 for optically forming an image of the label 2, a two-dimensional image pickup part 5 for reading out the label 2 formed as the image by a photoelectric conversion face, a frame memory 6 for temporarily storing the read label picture data (video signal), and a data processor 7 for decoding the label picture data into original symbol information and allowed to read out the symbol information of a moving bar code symbol.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、バーコード等のシンボ
ル情報を読み取るシンボル情報読取装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a symbol information reader for reading symbol information such as bar codes.

【0002】[0002]

【従来の技術】従来、物品等に印刷された、若しくは、
貼付けられたタグ等に印刷された、その物品に関する情
報を示すバーコード記号と呼ばれる記号がある。このバ
ーコード記号は、普及しつつある販売時点情報管理(ポ
イント・オブ・セールス:POS)システムに使用さ
れ、広く一般に知られるようになった。
2. Description of the Related Art Conventionally, printed on articles, or
There is a symbol called a barcode symbol, which is printed on the attached tag or the like and indicates information about the article. This bar code symbol is used in a point-of-sale (POS) system which is becoming popular, and has become widely known.

【0003】このバーコード記号とは、幅の異なるバー
とスペースが平行に組合せられ、1つのパターンからな
るバーコードキャラクタを形成する。必要であれば、チ
ェックデジットを含む必要なキャラクタ群を平行に配列
し、例えば前後にスタート/ストップキャラクタのよう
な特徴的な所定パターンを配して構成したシンボルもあ
る。
With this bar code symbol, bars having different widths and spaces are combined in parallel to form a bar code character consisting of one pattern. If necessary, there is also a symbol in which a necessary character group including a check digit is arranged in parallel and a characteristic predetermined pattern such as a start / stop character is arranged at the front and rear.

【0004】一般消費財に使用されているバーコード
は、JAN(Japan Article Numbe
r)として標準化されている。また、バーコードの他の
応用としては、物流シンボルがある。この物流シンボル
は、前記JANコードの前に、1桁又は2桁の物流識別
コードが追加されたものである。
The bar code used for general consumer goods is JAN (Japanese Article Number).
r) is standardized. Another application of barcodes is in logistics symbols. This physical distribution symbol has a 1-digit or 2-digit physical distribution identification code added before the JAN code.

【0005】前述した、いずれのバーコードシンボル
も、1次元バーコードと呼ばれるものであり、これらの
コード体系が持つことができる情報量は、数十バイト程
度であり、実際に使用する場合に不十分なものであっ
た。
Any of the above-mentioned bar code symbols is called a one-dimensional bar code, and the amount of information that these code systems can have is about several tens of bytes, which is not suitable for actual use. It was enough.

【0006】このようなバーコードの情報量に対する要
求に従い、構造が異なる2次元バーコードと呼ばれるシ
ンボル体系が提案されている。それらのシンボル体系に
よれば、いずれも1次元バーコードに比べ格段に多い情
報をコード化できる特徴を持っている。これらの体系
は、スタックドバーコードと称され、1次元のバーコー
ドをバーの方向に積み重ねることによって、情報量を増
加させる方式である。このスタックドバーコードの代表
として、PDF−417と呼ばれるコード体系がある。
In response to the demand for the information amount of such a bar code, a symbol system called a two-dimensional bar code having a different structure has been proposed. Each of these symbol systems has a characteristic that much more information can be encoded than a one-dimensional barcode. These systems are called stacked barcodes and are a method of increasing the amount of information by stacking one-dimensional barcodes in the direction of the bar. A representative of this stacked bar code is a code system called PDF-417.

【0007】従来、前記スタックドバーコードを読み取
るシンボル情報読取り装置としては、例えば、特開平2
−268382号公報に開示されているようなレーザー
走査型の読取り装置が知られている。この読取り装置に
おいては、レーザー光を2次元に投射し、スキャンする
ことで、所定のバーコードを読み取り、シンボル情報を
復号している。
Conventionally, as a symbol information reader for reading the stacked bar code, for example, Japanese Unexamined Patent Publication No. Hei.
There is known a laser scanning type reading device as disclosed in Japanese Patent Publication No.-268382. In this reading device, a predetermined bar code is read and symbol information is decoded by projecting and scanning laser light in two dimensions.

【0008】また、特開平2−268383号公報に
は、2次元撮像装置でバーコードを撮像し、バーコード
の画像をメモリに取り込んで、このデータを元にバーコ
ードシンボル情報を復号する装置が開示されている。
Further, Japanese Laid-Open Patent Publication No. 2-268383 discloses an apparatus for picking up a barcode with a two-dimensional image pickup apparatus, loading the image of the barcode into a memory, and decoding the barcode symbol information based on this data. It is disclosed.

【0009】さらに、このようなバーコードをFA(F
actory Automation)に於けるデータ
キャリアとして使用したいという要求が高まっている。
これは、流通物がベルトコンベアなどの上を移動してい
る最中に、流通物の品名、行き先等を認識するためのも
のである。
Further, such a bar code is converted into FA (F
There is an increasing demand for use as a data carrier in image automation.
This is for recognizing the product name, destination, etc. of the distributed product while the distributed product is moving on a belt conveyor or the like.

【0010】従来では、一般にデータキャリアとしてR
Fタグ等が用いられていたが、タグとしては比較的高価
であり、これがバーコードで代用できれば、低コストの
データキャリアが実現される。
Conventionally, R is generally used as a data carrier.
Although an F tag or the like has been used, it is relatively expensive as a tag, and if this can be replaced with a bar code, a low cost data carrier can be realized.

【0011】また従来の移動する物品の情報読取装置と
しては、特開昭56−118177号公報には、移動す
る物体の像を走査して得られるビデオ信号に基づいて所
定の検査を行なう光学検査装置が記載され、物体が検査
視野内を通過したことをビデオ信号から検出する回路が
開示されている。
As a conventional information reading device for moving articles, Japanese Patent Laid-Open No. 56-118177 discloses an optical inspection for performing a predetermined inspection based on a video signal obtained by scanning an image of a moving object. An apparatus is described and a circuit is disclosed for detecting from an video signal that an object has passed within an examination field of view.

【0012】[0012]

【発明が解決しようとする課題】しかし、前述した特開
昭56−118177号公報の問題点として、ビデオ信
号の幅データからその物体の存在を認識しているため、
前記JAN等の1次元バーコードの認識は可能なもの
の、前記PDF417等の2次元スタックドバーコード
において、バーコードラベルが完全に検査視野内に入っ
ていない場合であっても、不完全なバーコードラベルを
認識し、読取り処理に行く恐れがある。このような場合
には、バーコード情報を読取ることができず、読取りの
信頼性及び読取り速度の低下を招く結果になる。
However, the problem with the above-mentioned Japanese Patent Laid-Open No. 56-118177 is that the existence of the object is recognized from the width data of the video signal.
Although it is possible to recognize a one-dimensional barcode such as JAN, in the two-dimensional stacked barcode such as PDF417, an incomplete barcode cannot be obtained even if the barcode label is not completely within the inspection field of view. There is a risk of recognizing the label and going to the reading process. In such a case, the bar code information cannot be read, resulting in a decrease in reading reliability and reading speed.

【0013】さらに、移動している物品に貼付けられた
2次元スタックドバーコードの情報を読取るには、イン
タレース型撮像素子を用いてフレーム画像により撮像す
ると、最初に読み取った位置から次に読み取る位置まで
移動してしまっているため、2つのフィールド画像を組
み合わせた時にフィールド成分のずれが生じるという問
題が生じる。そこで本発明は、移動している2次元バー
コードのバーコードシンボル情報を高速に確実に読取る
シンボル情報読り取装置を提供することを目的とする。
Further, in order to read the information of the two-dimensional stacked bar code attached to the moving article, a frame image is picked up by using an interlaced image pickup device, and the position read next is read from the position read first. Since it has been moved up to, there is a problem that when two field images are combined, a displacement of field components occurs. Therefore, it is an object of the present invention to provide a symbol information reading device that reliably and quickly reads barcode symbol information of a moving two-dimensional barcode.

【0014】[0014]

【課題を解決するための手段】本発明は上記目的を達成
するために、バーとスペースとからなり任意の情報をパ
ターンとして表すバーコードを2次元像として撮像する
撮像手段と、前記撮像手段により順次得られた2次元像
を一時的に記憶する記憶手段と、前記撮像手段から前記
記憶手段に2次元像を転送する転送手段と、前記記憶手
段に記憶された2次元像を順次読出し、撮像範囲内での
バーコードシンボルの有無を認識する認識手段と、前記
認識手段により認識されたバーコードの前記撮像範囲内
での存在位置及び傾きを検出し、バーコードのスキャン
方向を検出する位置検出手段と、前記位置検出手段によ
り検出されたスキャン方向によりバーコードの2次元像
から該バーコードの情報を順次読み取る読取手段と、前
記読取手段からのバーコードの情報から、前記任意の情
報に復号する復号手段とで構成されるシンボル情報読取
装置を提供する。
In order to achieve the above object, the present invention provides an image pickup means for picking up a two-dimensional image of a bar code which is composed of a bar and a space and which represents arbitrary information as a pattern. Storage means for temporarily storing sequentially obtained two-dimensional images, transfer means for transferring the two-dimensional images from the image pickup means to the storage means, and two-dimensional images stored in the storage means are sequentially read and imaged. Recognition means for recognizing the presence / absence of a barcode symbol within the range, and position detection for detecting the presence position and inclination of the barcode recognized by the recognition means within the imaging range to detect the scanning direction of the barcode. A reading means for sequentially reading information of the barcode from a two-dimensional image of the barcode according to the scanning direction detected by the position detecting means; From information keycode, it provides symbol information reading apparatus constituted by a decoding means for decoding the arbitrary information.

【0015】前記転送手段は、撮像手段により撮像され
た2次元像を圧縮して転送するシンボル情報読取装置を
提供する。さらに、前記転送手段は、撮像手段により撮
像された2次元像のフィールド成分の1スキャンライン
を転送した後、記憶手段の1ラインを空けてまたスキャ
ンラインを転送し、1フィールド分の画像情報を転送す
るまでそれを繰り返し、終了後に空いているラインにそ
のラインの1ライン上または下のラインの画像情報を複
写をする処理操作を含み、転送するシンボル情報読取装
置を提供する。
The transfer means provides a symbol information reader for compressing and transferring the two-dimensional image picked up by the image pickup means. Further, the transfer means transfers one scan line of the field component of the two-dimensional image picked up by the image pickup means, vacates one line of the storage means, and transfers the scan line again to obtain one field of image information. A symbol information reader for transferring is provided, which includes a processing operation of repeating the process until transferring, and copying the image information of a line one line above or below that line to a vacant line after the transfer.

【0016】[0016]

【作用】以上のような構成のシンボル情報読り取装置
は、移動している2次元バーコードを2次元像として撮
像し、得られた2次元像に所定の圧縮等の処理を適宜施
し一時的に記憶させ、撮像画像を記憶手段に転送して、
バーコードシンボルの有無を自動認識した後、バーコー
ドシンボルの位置を認識し、バーコードの情報を順次読
み取り、バーコードの情報から元の情報に復号する。
The symbol information reading apparatus having the above-described structure captures a moving two-dimensional bar code as a two-dimensional image and temporarily performs a predetermined compression process on the obtained two-dimensional image. Memory, transfer the captured image to the storage means,
After automatically recognizing the presence or absence of the barcode symbol, the position of the barcode symbol is recognized, the barcode information is sequentially read, and the barcode information is decoded into the original information.

【0017】[0017]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。図1には、第1実施例としてのシンボル情
報読取り装置の概略的な構成を示し、説明する。このシ
ンボル情報読取り装置は、移動する物品等に貼付された
バーコードシンボルのシンボル情報を読取るための構成
例である。ここで、本実施例においては、シンボル情報
は物品に関する情報を例とし、例えば、物品名、送付先
等であるものとする。勿論、シンボル情報は、使用する
ものによって異なっている。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 shows a schematic configuration of a symbol information reading apparatus as a first embodiment, which will be described. This symbol information reading device is a configuration example for reading the symbol information of a bar code symbol attached to a moving article or the like. Here, in the present embodiment, the symbol information is, for example, information about an article, and is, for example, an article name, a destination, or the like. Of course, the symbol information depends on what is used.

【0018】このシンボル情報読取り装置は、ベルトコ
ンベアー等の搬送系3により移動する物品1等に貼付さ
れた、例えばPDF−417フォーマットのスタックド
バーコードラベル(以下、バーコードラベルと称する)
2と、該バーコードラベル2を光学的に結像する撮像光
学系4と、結像されたバーコードラベル2を光電変換面
で読み取る2次元撮像部5と、読み取ったラベル画像デ
ータ(映像信号)を一時的に記憶するフレームメモリ6
と、ラベル画像データを元のシンボル情報に復号するデ
ータ処理装置7とで構成される。また、外部には、シン
ボル情報を処理するためのマイクロコンピュータ等のホ
スト装置16が設けられている。また、前記2次元撮像
部5で読み取ったラベル画像データ(フレーム画像)
に、画像圧縮等の画像処理を施し、フレームメモリ6に
処理画像データを記憶させる画像転送部17を設けても
良い。
This symbol information reading device is a stacked bar code label (hereinafter referred to as a bar code label) of, for example, PDF-417 format attached to an article 1 or the like which is moved by a conveyor system 3 such as a belt conveyor.
2, an image pickup optical system 4 that optically forms an image of the barcode label 2, a two-dimensional image pickup unit 5 that reads the imaged barcode label 2 on a photoelectric conversion surface, and read label image data (video signal). Frame memory 6 for temporarily storing
And a data processing device 7 for decoding the label image data into the original symbol information. Further, a host device 16 such as a microcomputer for processing symbol information is provided outside. Further, label image data (frame image) read by the two-dimensional image pickup unit 5
In addition, an image transfer unit 17 that performs image processing such as image compression and stores the processed image data in the frame memory 6 may be provided.

【0019】前記データ処理装置7は、前記フレームメ
モリ6に記憶されたラベル画像データが撮像光学系4の
撮影範囲にバーコードラベル2が読取り可能に入ってい
るかを検出するラベル検出部8と、バーコードラベル2
(ラベル画像データ)をスキャンしてラベル情報として
読取る読取り部9と、読取ったラベル情報がデコードで
きるものかを判定するデコード判定部10と、デコード
できると判定されたラベル情報を元のシンボル情報に復
元する復号部11と、メモリ(各種定数及び変数を格納
するための種々のレジスタを含む)12と、これらの各
部位を制御する制御部13とで構成される。
The data processing device 7 includes a label detecting section 8 for detecting whether or not the label image data stored in the frame memory 6 is readable within the photographing range of the image pickup optical system 4. Barcode label 2
A reading unit 9 that scans (label image data) and reads it as label information, a decoding determination unit 10 that determines whether the read label information can be decoded, and the label information that is determined to be decoded is used as the original symbol information. It is composed of a decoding unit 11 for restoration, a memory (including various registers for storing various constants and variables) 12, and a control unit 13 for controlling each of these parts.

【0020】前記撮像光学系4と2次元撮像部5は、例
えば、CCDカメラからなる。また前記ラベル検出部8
は、前記フレームメモリ6に記憶されたラベル画像デー
タが撮像光学系4の撮影範囲に収まっているか、すなわ
ち撮影範囲内で撮像されるバーコードラベル2に欠けが
ない位置を検出する位置検出部14と、そのバーコード
ラベル2の傾き具合を検出する傾き検出部15とで構成
される。
The image pickup optical system 4 and the two-dimensional image pickup section 5 are, for example, CCD cameras. Further, the label detection unit 8
Is a position detecting unit 14 for detecting whether the label image data stored in the frame memory 6 is within the photographing range of the photographing optical system 4, that is, the position where the barcode label 2 photographed within the photographing range is not chipped. And an inclination detecting section 15 for detecting the inclination of the barcode label 2.

【0021】このデータ処理部7は、例えば、CPUと
メモリで構成されるパーソナルコンピュータでも代用す
ることができる。次に、前述したスタックドバーコード
について説明する。
The data processing unit 7 can be replaced with, for example, a personal computer including a CPU and a memory. Next, the stacked bar code described above will be described.

【0022】図2には、スタックドバーコードの例とし
て、PDF−417のラベル構造を示している。このバ
ーコードラベル2は、バーとスペースの組合せでなるバ
ーコードキャラクタ群で構成された復号されるべき情報
成分の領域であるラベル部21と、その前後に配された
スタート/ストップキャラクタであるスタートコード2
2及びストップコード23とを有している。そして、1
コードは、ストップコード23を除いて4つのバーとス
ペースとからなっている。また、スタート及びストップ
コード22,23は、“ビッグバー”と呼ばれる大きな
バー22A,23Aから始まっている。
FIG. 2 shows a label structure of PDF-417 as an example of a stacked bar code. The bar code label 2 is a label portion 21 which is an area of an information component to be decoded which is composed of a bar code character group consisting of a combination of a bar and a space, and a start / stop character which is arranged before and after the label part 21. Code 2
2 and a stop code 23. And 1
The code consists of four bars and a space except for the stop code 23. The start and stop codes 22 and 23 start from large bars 22A and 23A called "big bars".

【0023】このラベル部21は、スタートコード22
及びストップコード23の隣に存在するロウインディケ
ータ21Aと呼ばれるコードと、それらの間に挟まれた
実際のデータが記述されている複数のデータカラム21
Bでなるラベルマトリックス21Cとにより構成され
る。ロウインディケータ21Aには、ラベルのロウ方
向,カラム方向のサイズやセキュリティレベル等が記述
されている。従って、このロウインディケータの情報を
解読すれば、ラベルの情報サイズや修復可能なコード数
等が決定できる。
The label portion 21 has a start code 22.
And a plurality of data columns 21 in which a code called a row indicator 21A existing next to the stop code 23 and the actual data sandwiched between them are described.
And a label matrix 21C of B. The row indicator 21A describes the label size in the row and column directions, the security level, and the like. Therefore, by decoding the information of this row indicator, the information size of the label, the number of recoverable codes, etc. can be determined.

【0024】なお、この図2は、4×2のラベルマトリ
ックス有するバーコードラベルを示している。図4に示
すフローチャートを参照して、データ処理装置7におけ
るラベル検出、ラベル情報読出し及び復号についてを説
明する。図3には、仮想的にフレームメモリ6の画素配
列に前述したようなPDF−417のラベル画像を投影
した模式図を示す。
FIG. 2 shows a bar code label having a 4 × 2 label matrix. Label detection, label information reading, and decoding in the data processing device 7 will be described with reference to the flowchart shown in FIG. FIG. 3 shows a schematic diagram in which the label image of PDF-417 as described above is virtually projected on the pixel array of the frame memory 6.

【0025】まず、フレームメモリ、しきい値、各種グ
ローバル変数等の種々のパラメータを初期設定する(ス
テップS1)。次に、後述する画像取り込みルーチンを
コールしてラベル画像データ(映像信号)をフレームメ
モリ6に取り込む(ステップS2)。次に、後述するラ
ベル検出ルーチンをコールし、この取り込まれたラベル
画像データを用いてバーコードラベルが存在するかをチ
ェックし、さらにはバーコードラベルが存在するならば
ラベル画像データを検出する(ステップS3)。
First, various parameters such as a frame memory, a threshold value and various global variables are initialized (step S1). Next, an image capturing routine, which will be described later, is called to capture the label image data (video signal) into the frame memory 6 (step S2). Next, a label detection routine, which will be described later, is called, it is checked whether a bar code label is present using the captured label image data, and if the bar code label is present, the label image data is detected ( Step S3).

【0026】そして、前記ステップS3に於けるラベル
検出処理の結果を判断し(ステップS4)、ラベルが存
在しない場合には(NO)、再度、前記ステップS1に
移行して、再度、画像取り込み処理を行う。
Then, the result of the label detecting process in the step S3 is judged (step S4), and if there is no label (NO), the process proceeds to the step S1 again, and the image capturing process is executed again. I do.

【0027】次に、ラベルが存在したならば(YE
S)、後述する閾値決定ルーチンをコールし、後述する
ステップS11の埋め込チェック及びステップS12の
最適スキャンルーチン及び、ステップS15のインテリ
ジェントスキャンルーチンに於いて、処理対象となるラ
インデータからエッジ間の幅情報を抽出するための処理
に利用される閾値(変数THRESHOLD)を求める
(ステップS5)。
Next, if the label exists (YE
S), by calling a threshold value determination routine to be described later, in the embedding check in step S11, the optimum scan routine in step S12, and the intelligent scan routine in step S15, the width between the line data to be processed and the edge is processed. A threshold value (variable THRESHOLD) used in the process for extracting information is obtained (step S5).

【0028】次に、インディケータ情報決定ルーチンを
コールし、ラベル2のロウインディケータ21Aを読み
取り、ラベルサイズ等を決定する(ステップS6)。そ
して、前記ステップS6の決定ルーチンに於いてラベル
サイズ等が決定されたか否かを判断し(ステップS
7)、決定されていない場合は(NO)、再度ステップ
S1に移行して、再度、画像取り込み処理を行う。一
方、ラベルサイズ等が決定された場合には(YES)、
後述する傾き再定義ルーチンをコールし、より正確なラ
ベルの傾きを求める(ステップS8)。
Next, the indicator information determining routine is called to read the row indicator 21A of the label 2 to determine the label size and the like (step S6). Then, it is determined whether the label size or the like is determined in the determination routine of step S6 (step S6).
7) If not determined (NO), the process proceeds to step S1 again, and the image capturing process is performed again. On the other hand, when the label size and the like are determined (YES),
A tilt redefinition routine, which will be described later, is called to obtain a more accurate label tilt (step S8).

【0029】次に、後述するスキャン方程式決定ルーチ
ンをコールし、ラベル2を全面走査するための各種変数
を定義する(ステップS9)。次に、後述する埋め込チ
ェックルーチンをコールし、各コードワードの位置の推
定を行い、更に各コードワードの位置が画面内か否かを
チェックしている(ステップS10)。
Next, a scan equation determination routine, which will be described later, is called to define various variables for scanning the entire label 2 (step S9). Next, an embedding check routine, which will be described later, is called to estimate the position of each codeword, and it is further checked whether the position of each codeword is within the screen (step S10).

【0030】そして、前記ステップS10にて、読取り
不能と推定されたコードの数が、修復可能な数を上回っ
たか否かを判断し(ステップS11)、上回った場合に
はデコード不能とし(NO)、再度ステップS1に移行
して、再度、画像取り込み処理を行う。一方、下回った
場合には、デコード可能とし(YES)、後述するよう
な最適スキャンルーチンをコールし、前記ステップS9
で定義された各種変数を用いてラベルを最適な間隔で全
面走査し、ラベル情報を読み取る(ステップS12)。
なおここで、最適スキャンとは、最も計算量が少なくて
ラベル情報を全て確定できるような最適な間隔でのスキ
ャンのことをいうものとする。
Then, in step S10, it is judged whether or not the number of codes estimated to be unreadable exceeds the number that can be repaired (step S11). If the number exceeds the recoverable number, decoding is impossible (NO). Then, the process proceeds to step S1 again, and the image capturing process is performed again. On the other hand, if it is below the threshold, decoding is possible (YES), an optimum scan routine as described later is called, and the above-mentioned step S9 is executed.
The label is scanned over the entire surface at the optimum intervals by using the various variables defined in step S12, and the label information is read (step S12).
Here, the optimum scan refers to a scan at an optimum interval that requires the least amount of calculation and allows all label information to be determined.

【0031】そして、前記ステップS12の最適スキャ
ンで読み取った情報でデコード可能か否かを判断し(ス
テップS13)、デコード可能の場合は(YES)、ス
テップS16に移行してデコード処理を行う。しかし、
デコード不能の場合は(NO)、後述するインテリジェ
ントスキャンルーチンをコールし、前記ステップS10
で定義された各種変数とを用いて、前記ステップS12
で読取れなかったコード位置を走査し、ラベル情報を読
取る(ステップS14)。
Then, it is judged whether or not the information read by the optimum scan in step S12 is decodable (step S13). If it is decodable (YES), the process proceeds to step S16 to perform the decoding process. But,
If decoding is not possible (NO), an intelligent scan routine, which will be described later, is called, and step S10 is executed.
Using the various variables defined in step S12,
The code position that could not be read in is scanned and the label information is read (step S14).

【0032】次に、ステップS14で読取った情報がデ
コード可能か否かを判断し(ステップS15)、デコー
ド可能の場合(YES)、及びステップS12で読取っ
た情報がデコード可能の場合に、デコード処理を行う
(ステップS16)。このデコード処理の終了の後、ス
テップS1に戻り、新たなバーコードラベルを読取りに
いく。
Next, it is judged whether or not the information read in step S14 is decodable (step S15), and if it is decodable (YES) and if the information read in step S12 is decodable, a decoding process is performed. Is performed (step S16). After the completion of this decoding process, the process returns to step S1 to read a new barcode label.

【0033】しかし、ステップS16の判断でデコード
不能の場合は(NO)、再度、前記ステップS1に移行
して、画像取り込みを行う。前記ステップS16のデー
コード処理では、前記最適スキャンルーチンと前記イン
テリジェントスキャンルーチンにより、読取った情報を
復号し、復号したシンボル情報をホスト装置14に出力
する。
However, if the judgment in step S16 indicates that decoding is not possible (NO), the process moves to step S1 again to capture an image. In the day code process of step S16, the read information is decoded by the optimum scan routine and the intelligent scan routine, and the decoded symbol information is output to the host device 14.

【0034】次に図4のフローチャートにおける各種処
理ルーチンを、以下に詳しく説明する。まず、図5に示
すフィールド画面のみを取り込む図及び、図6に示すフ
ローチャートとを参照して、図4に示した前記ステップ
S2でコールされる画像取り込みルーチンについて説明
する。
Next, various processing routines in the flowchart of FIG. 4 will be described in detail below. First, the image capturing routine called in step S2 shown in FIG. 4 will be described with reference to the diagram shown in FIG. 5 for capturing only the field screen and the flowchart shown in FIG.

【0035】この画像取り込みルーチンは、2次元撮像
部5に撮像されたラベル画像データ(映像信号)を転送
し、フレームメモリ6に一時的に記憶させる処理を含ん
でいる。
The image capturing routine includes a process of transferring the label image data (video signal) captured by the two-dimensional image capturing section 5 and temporarily storing it in the frame memory 6.

【0036】移動する物品に貼付されるバーコードラベ
ルの読取りに際して、インターレース方式の2次元撮像
部5を使用した場合、通常、そのフレーム画面からはバ
ーコード情報を読取ることは出来ない。すなわち、従来
技術の課題において説明したように、インターレース方
式の2次元撮像装置5では、1行ずつとばしながら画像
を走査するフィールド画面を2つ(奇数成分と偶数成
分)合成して1つのフレーム画面を構成するが、撮像対
象となるバーコードラベルが常に移動しているため、1
回目のフィールド画像の走査と、2回目のフィールド画
像の走査との間に位置的なずれが生じており、2つのフ
ィールド画像を合成すると、バーコードラベル像にズレ
が生じてしまうからである。
When the interlaced two-dimensional image pickup section 5 is used to read the bar code label attached to the moving article, it is usually impossible to read the bar code information from the frame screen. That is, as described in the problems of the related art, in the interlaced two-dimensional imaging device 5, two field screens (an odd component and an even component) for scanning an image while skipping one line at a time are combined to form one frame screen. However, since the barcode label to be imaged is constantly moving,
This is because there is a positional shift between the scanning of the second field image and the scanning of the second field image, and when the two field images are combined, the barcode label image is misaligned.

【0037】そこで本実施例では、インターレース方式
の2次元撮像装置5を用いて、移動するバーコードラベ
ルを読取るときには、フィールド画面のみの画像情報を
転送して取り込むようにする。
Therefore, in this embodiment, when the moving bar code label is read by using the interlace type two-dimensional image pickup device 5, the image information of only the field screen is transferred and taken in.

【0038】画像取り込みルーチンでは、どちらか(偶
数成分または奇数成分)のフィールド画面を転送し取り
込む(ステップS21)。この場合、フィールド画像を
行を空けずにフレームメモリ6に取り込むので、そのと
きのフレームメモリ6の内容は、図5に示す様になって
いる。図5に於いて、フィールド画像は奇数成分と偶数
成分のどちらでも構わない。この処理終了の後、メイン
フローチャート(図4)にリターンする。
In the image capturing routine, either (even component or odd component) field screen is transferred and captured (step S21). In this case, the field image is fetched in the frame memory 6 without leaving a row, and the contents of the frame memory 6 at that time are as shown in FIG. In FIG. 5, the field image may have either an odd component or an even component. After this processing ends, the process returns to the main flowchart (FIG. 4).

【0039】しかしこの場合、図5に示すように1つの
フィールド画像は、縦方向に圧縮された形になるので、
バーコードラベルの1行当たりの高さが減ってしまい、
読取り条件はフレーム画像よりも厳しくなる。そこで、
この方法を用いることが出来るのは、対象画像に対しバ
ーコードラベル像が占める割合が大きくて、バーコード
ラベルの1行の高さが十分な場合である。
However, in this case, one field image is compressed vertically as shown in FIG.
The height per line of the bar code label is reduced,
The reading conditions are stricter than the frame image. Therefore,
This method can be used when the ratio of the barcode label image to the target image is large and the height of one line of the barcode label is sufficient.

【0040】また、対象画像に対し、バーコードラベル
像が占める割合が小さくバーコードラベルの1行の高さ
が十分でない場合には、種々の方法が考えられる。その
1つとして、まず、2つのフィールド画面(偶数成分と
奇数成分)を両方別々に転送し取り込む。この場合、奇
数成分だけを行を空けずにフレームメモリ6に取り込
み、次に偶数成分だけを行を空けずに取り込む。そのと
きのフレームメモリ6の内容は図7の様になっている。
但し、図7において、奇数成分と偶数成分はどちらが上
になっても構わない。
Further, when the ratio of the barcode label image to the target image is small and the height of one line of the barcode label is not sufficient, various methods can be considered. As one of them, first, two field screens (even component and odd component) are separately transferred and captured. In this case, only the odd components are loaded into the frame memory 6 without leaving any rows, and then only the even components are loaded without leaving any rows. The contents of the frame memory 6 at that time are as shown in FIG.
However, in FIG. 7, it does not matter which of the odd component and the even component is on top.

【0041】ここで奇数成分と偶数成分の両方を転送す
る理由は、元は同じ対象を撮像した2つのフィールド画
像を別の画像と考え、図7の上の画像が読めなければ、
下の画像を読みに行くことで読取の信頼性を上げること
が出来るからである。
The reason why both the odd and even components are transferred here is that the two field images that originally image the same object are considered as different images, and if the image shown in FIG. 7 cannot be read,
This is because reading reliability can be improved by reading the image below.

【0042】この場合、図4のフローチャートはステッ
プS15の1回目の判断が(NO)であれば、図7の下
の画面に対し、再度ステップS12の最適スキャンをト
ライすることになる。ここで、移動するバーコードラベ
ルの速度が既知であれば、ステップS3で求めた図7の
上の画面のバーコードラベルの位置情報A、B、C、D
に、バーコードラベルの移動速度、走査速度を考慮する
ことにより図7の下の画面のバーコードラベルの位置
A′、B′、C′、D′を算出することが出来るので、
再度バーコードラベル検出ルーチンをコールする必要は
ない。
In this case, if the first judgment in step S15 is (NO) in the flow chart of FIG. 4, the optimum scan of step S12 is tried again on the lower screen of FIG. If the speed of the moving barcode label is known, the position information A, B, C, D of the barcode label on the upper screen of FIG. 7 obtained in step S3 is known.
Since the positions A ′, B ′, C ′ and D ′ of the bar code label on the lower screen of FIG. 7 can be calculated by considering the moving speed and scanning speed of the bar code label,
There is no need to call the barcode label detection routine again.

【0043】また、バーコードラベルの移動速度が走査
速度に対し十分無視できる速度であれば、図7の上の画
面のバーコードラベルの位置情報をそのまま使用するこ
とも出来る。
If the moving speed of the bar code label is sufficiently negligible with respect to the scanning speed, the position information of the bar code label on the upper screen of FIG. 7 can be used as it is.

【0044】また、1つのフィールド画像を1行ずつ間
隔を置いてフレームメモリ6に取り込み、空いている行
にその1行上の行のフレームメモリの内容を複写して、
読取の信頼性を上げる方法もある。この方法において、
複写はハードウエアにより簡単に実現できるので、何等
バーコードラベル読取の高速性を失うものではない。
Also, one field image is taken into the frame memory 6 at intervals of one line, and the contents of the frame memory of the line immediately above is copied to the empty line,
There is also a way to increase the read reliability. In this way,
Since copying can be easily realized by hardware, the high speed reading of the bar code label is not lost.

【0045】また、バーコードラベルの1行の高さが十
分な場合には図8に示すように、全ての画素情報に対
し、任意数の画素を加算し1つの画素にして、フレーム
メモリ6に格納する方法がある。これもハードウエアで
簡単に実現可能であり、しかもノイズを抑制する効果も
持っている。図8は、縦2行横2列の計4画素を加算し
1つの画素にする例を示している。
If the height of one line of the bar code label is sufficient, as shown in FIG. 8, an arbitrary number of pixels are added to all pixel information to make one pixel, and the frame memory 6 There is a way to store. This can also be easily realized by hardware, and also has the effect of suppressing noise. FIG. 8 shows an example in which a total of 4 pixels in vertical 2 rows and horizontal 2 columns are added to form one pixel.

【0046】なお、ノンインターレース方式の2次元撮
像装置5を使用した場合には、ステップS21はフレー
ム画像取り込みとなる。次に、図9に示すフローチャー
ト及び図10に示すバーコードラベル投影像の図を参照
して、前記ステップS3でコールされるバーコードラベ
ル検出ルーチンを説明する。このバーコードラベル検出
ルーチンは、バーコードラベルの有無を検出すること
と、バーコードラベルの位置情報を検出すること即ちバ
ーコードラベルに平行に画像データをフレームメモリ6
から抽出するための抽出範囲(変数STARTTOP及
びSTOPBOTTOM)とバーコードラベルの傾き
(変数SLOPE)を求めることとの2種類のバーコー
ドラベル検出処理を含む。ここで、変数STARTTO
Pの値は、バーコードラベルのトップ座標を示し、また
変数STOPBOTTOMの内容はバーコードラベルの
ボトム座標を示す。また変数SLOPEの内容はバーコ
ードラベルの傾きを示す。
When the non-interlaced two-dimensional image pickup device 5 is used, step S21 is a frame image capture. Next, the barcode label detection routine called in step S3 will be described with reference to the flowchart shown in FIG. 9 and the barcode label projection image shown in FIG. This bar code label detection routine detects the presence or absence of a bar code label, and detects the position information of the bar code label, that is, image data in parallel to the bar code label.
It includes two types of bar code label detection processing, namely, an extraction range (variables STARTTOP and STOPBOTTOM) for extracting from the bar code and a slope (variable SLOPE) of the bar code label. Where the variable STARTTO
The value of P indicates the top coordinate of the barcode label, and the content of the variable STOPBOTTOM indicates the bottom coordinate of the barcode label. The content of the variable SLOPE indicates the inclination of the barcode label.

【0047】このバーコードラベル検出ルーチンにおい
ては、まず、後述するバーコードラベル画面内検出ルー
チンをコールし、フレームメモリ6に記憶される画面
(ラベル画像データ)内からバーコードラベルを検出す
る(ステップS31)。検出されたバーコードラベルが
完全に画面内にあるか否かの判断を行ない(ステップS
32)、画面内にない場合には(NO)、バーコードラ
ベル無しの情報を持ってリターンする。しかし画面内に
ある場合には(YES)、後述するスキャン及び検出ル
ーチンをコールし、フレームメモリ6のラベル画像デー
タに、スタートコードが存在するか否かを検出する(ス
テップS33)。つまり、図10に示す座標e、gを検
出する。このルーチンにより、スタートコードが検出さ
れて確定されれば、図11に示すフレームメモリ6上の
座標変数e、gが定義される。ここで、座標変数eはス
タートコード22を検出したいくつかの座標の中で最も
Y座標が小さいものの座標、gはスタートコード22を
検出したいくつかの座標の中で最もY座標が大きいもの
の座標をそれぞれ示している。
In this bar code label detection routine, first, a bar code label screen detection routine, which will be described later, is called to detect a bar code label from the screen (label image data) stored in the frame memory 6 (step). S31). It is judged whether or not the detected bar code label is completely within the screen (step S
32) If it is not in the screen (NO), the process returns with the information without the barcode label. However, if it is within the screen (YES), the scan and detection routine described later is called to detect whether or not the start code exists in the label image data of the frame memory 6 (step S33). That is, the coordinates e and g shown in FIG. 10 are detected. When the start code is detected and confirmed by this routine, the coordinate variables e and g on the frame memory 6 shown in FIG. 11 are defined. Here, the coordinate variable e is the coordinate of the smallest Y coordinate among the coordinates where the start code 22 is detected, and g is the coordinate of the largest Y coordinate among the coordinates where the start code 22 is detected. Are shown respectively.

【0048】次に座標変数e、gの両方が定義されてい
るか否かを判断し(ステップS34)、定義されていな
い場合は(NO)、バーコードラベル無しとして、メイ
ンフローチャートにリターンする。即ち、バーコードラ
ベル無しの情報を持って、リターンする。以上のように
して、バーコードラベルの有無の検出が行われる。
Next, it is judged whether or not both the coordinate variables e and g are defined (step S34). If not defined (NO), the bar code label is absent and the process returns to the main flow chart. That is, the process returns with the information without the bar code label. As described above, the presence or absence of the barcode label is detected.

【0049】次に、バーコードラベルの位置情報の検
出、即ちバーコードラベルに平行に画像データをフレー
ムメモリ6から抽出するための抽出範囲(変数STAR
TTOP及びSTARTBOTTOM)とバーコードラ
ベルの傾き(変数SLOPE)の算出が行われる。
Next, the extraction range (variable STAR) for detecting the position information of the bar code label, that is, for extracting the image data from the frame memory 6 in parallel with the bar code label.
TTOP and STARTBOTTOM) and the slope of the barcode label (variable SLOPE) are calculated.

【0050】即ち、前記ステップS34に於いて、座標
変数e、gの両方が定義されていると判断された場合は
(YES)、バーコードラベルの位置情報の検出、即ち
バーコードラベルに平行に画像データをフレームメモリ
6から抽出するための抽出範囲(変数STARTTOP
及びSTARTBOTTOM)の算出(ステップS3
5)とバーコードラベルの傾き(変数SLOPE)の算
出(ステップS36)が行われる。そして、バーコード
ラベルありの情報を持ってリターンする。
That is, in step S34, if it is determined that both the coordinate variables e and g are defined (YES), the position information of the bar code label is detected, that is, parallel to the bar code label. Extraction range for extracting image data from the frame memory 6 (variable STARTTOP
And STARTBOTTOM) (step S3
5) and the inclination of the barcode label (variable SLOPE) are calculated (step S36). Then, it returns with the information with the barcode label.

【0051】次に、前述したバーコードラベル検出ルー
チン中のステップS31でコールされるバーコードラベ
ル画面内検出ルーチンとステップS32の画面内のバー
コードラベルが完全に入っているか否かの判断につい
て、図12に示すフローチャートと図13に示すバーコ
ードラベル画面内検出を説明する。
Next, regarding the bar code label in-screen detection routine called in step S31 in the above-mentioned bar code label detection routine and the judgment of whether or not the bar code label in the screen in step S32 is completely inserted, The detection in the barcode label screen shown in the flowchart of FIG. 12 and FIG. 13 will be described.

【0052】このバーコードラベル画面内検出ルーチン
は、前述したように、移動しているバーコードラベルが
完全にフレームメモリ6の中に入っているか否かを確認
するものである。仮に、バーコードラベルがフレームメ
モリ6の中に完全に入っていなくても、後述するインテ
リジェントスキャンを用いれば、画面外のコード数によ
っては、その位置を推定してバーコードシンボル情報を
読取ることは可能であるが、その分読取速度が遅くなっ
てしまうので、このようなルーチンを設け移動するバー
コードラベルに対応させる。ここで、バーコードラベル
は画像に対し上下方向に移動しているものとする。
As described above, this bar code label in-screen detection routine confirms whether or not the moving bar code label is completely contained in the frame memory 6. Even if the bar code label is not completely stored in the frame memory 6, it is possible to estimate the position and read the bar code symbol information depending on the number of codes out of the screen by using the intelligent scan described later. Although it is possible, since the reading speed becomes slower by that amount, such a routine is provided to correspond to the moving bar code label. Here, it is assumed that the bar code label moves vertically with respect to the image.

【0053】まず、画像の上端行でスタートコード22
若しくはストップコード23を検出する(ステップS4
1)。この検出法の詳細は後述する。次に検出したか否
かを判断する(ステップS42)。ここで、どちらかが
検出されたと判断した場合(YES)、図13に示すよ
うにバーコードラベルの上部が画像内に入っていないこ
とを意味している。従って、そのような場合には、バー
コードラベルが画面内にないという情報をもってリター
ンする。また、検出されなかった場合は(NO)、画像
の下端行でスタートコード22若しくはストップコード
23を検出する(ステップS43)。
First, in the top line of the image, the start code 22
Alternatively, the stop code 23 is detected (step S4
1). Details of this detection method will be described later. Next, it is determined whether or not it is detected (step S42). Here, if it is determined that either one is detected (YES), it means that the upper portion of the barcode label is not within the image as shown in FIG. Therefore, in such a case, the process returns with the information that the bar code label is not in the screen. If it is not detected (NO), the start code 22 or the stop code 23 is detected in the bottom line of the image (step S43).

【0054】次に検出したか否かを判断する(ステップ
S44)。前述したように、ここでもどちらかが検出さ
れたと判断した場合は(YES)、バーコードラベルの
下部が画像内に入っていないことを意味しており、バー
コードラベルが画面内にないという情報をもってリター
ンする。
Next, it is judged whether or not the detection is made (step S44). As mentioned above, if it is determined that either of them is detected here (YES), it means that the bottom of the barcode label is not in the image, and the information that the barcode label is not in the screen is displayed. To return.

【0055】また、検出されなかった場合は(NO)、
画像の中心行でスタートコード22若しくはストップコ
ード23を検出する(ステップS45)。次に検出した
か否かを判断し(ステップS46)、ここでは検出しな
かった場合に(NO)、バーコードラベルが画面内にな
いという情報をもってリターンする。しかし検出した場
合は(YES)、バーコードラベルが画面内にあるとい
う情報を持ってリターンする。
If it is not detected (NO),
The start code 22 or the stop code 23 is detected in the center line of the image (step S45). Then, it is judged whether or not it has been detected (step S46), and if not detected here (NO), the process returns with the information that the bar code label is not in the screen. However, if detected (YES), the process returns with the information that the barcode label is within the screen.

【0056】次に、前述したバーコードラベル検出ルー
チン中のステップS33でコールされるスキャン及び検
出ルーチンを、図14に示すフローチャートと図15に
示すスキャン方法を説明する図を参照して説明する。
Next, the scanning and detecting routine called in step S33 in the above-mentioned bar code label detecting routine will be described with reference to the flowchart shown in FIG. 14 and the drawing for explaining the scanning method shown in FIG.

【0057】このスキャン及び検出ルーチンは、前述し
たように座標変数e及びgの両方を検出するものであ
る。即ち、まずループ回数のカウントに使用される変数
iと検出したスタートコードの数を格納する変数sta
rt numを初期化する(ステップS51)。次に、
スキャンする行番号nとスキャン間隔nnを決定する
(ステップS52)。ここでrow numは対象にな
る画像の行数である。このサブルーチンでスキャンする
行番号は図15に示すように、検索幅を徐々に狭めてい
く方式をとっている。これは、反復的に方程式の解を求
めるNEWTON法に類似している。
This scanning and detecting routine detects both the coordinate variables e and g as described above. That is, first, a variable i used to count the number of loops and a variable sta that stores the number of detected start codes.
rt num is initialized (step S51). next,
The row number n to be scanned and the scan interval nn are determined (step S52). Row here num is the number of lines of the target image. As shown in FIG. 15, the line numbers scanned by this subroutine are of a system in which the search width is gradually narrowed. This is similar to the NEWTON method that iteratively solves equations.

【0058】このような方法を用いることにより、バー
コードラベル像がフレームメモリ内のどの位置に存在し
ても、スタートコード22を高速に検出することが可能
になる。次に、1つのループiにつき、2のi乗回のス
キャンを行なうため、jを初期化する(ステップS5
3)。そしてjが“0”か否かを判断する(ステップS
54)。ここでjが0でない、即ちステップS54の命
題が真だった場合には(NO)、行番号nにステップS
52で求めたスキャン間隔nnを2倍したものを加える
(ステップS55)。jが“0”である、即ちステップ
S54の命題が偽だった場合には(YEA)、ステップ
S55をスキップして、ステップS56に移行し、n行
目の画像データを取り込む(ステップS56)。
By using such a method, the start code 22 can be detected at high speed regardless of the position of the bar code label image in the frame memory. Next, j is initialized in order to scan 2 i times for each loop i (step S5).
3). Then, it is determined whether j is "0" (step S
54). Here, if j is not 0, that is, if the proposition in step S54 is true (NO), the line number n is changed to step S.
A value obtained by doubling the scan interval nn obtained in 52 is added (step S55). When j is "0", that is, when the proposition in step S54 is false (YEA), step S55 is skipped, the process proceeds to step S56, and the image data of the nth row is fetched (step S56).

【0059】次に、前記取り込んだ画像データに対しス
タートコード22の検出を行なう(ステップS57)。
次に、スタートコード22を検出したか否かを判断し
(ステップS58)、存在しなければ(NO)、ステッ
プS62に移行する。またスタートコード22が存在す
る場合には(YES)、その検出座標を座標配列sta
rt posに格納する(ステップS59)。そして、
前記変数start numに1を加える(ステップS
60)。
Next, the start code 22 is detected in the captured image data (step S57).
Next, it is determined whether or not the start code 22 is detected (step S58), and if it is not present (NO), the process proceeds to step S62. If the start code 22 exists (YES), the detected coordinates are set to the coordinate array sta.
rt It is stored in pos (step S59). And
The variable start Add 1 to num (step S
60).

【0060】次に、前記変数start numが予め
定められている規定個数を越えたか否かを判断する(ス
テップS61)。ここで、越えていた場合は(YE
S)、ステップS66に移行する。しかし、越えていな
かった場合には(NO)、前記変数jをインクリメント
し(ステップS62)、jが2のi乗より小さいか否か
の判断を行なう(ステップS63)。jの方が小さい場
合には(YES)、前記ステップS54に戻る。しかし
jが2のi乗より小さくない場合には(NO)、前記変
数iをインクリメントし(ステップS64)、iが規定
定数Loopより小さいか否かの判断を行なう(ステッ
プS65)。ここで、iが小さかった場合には(YE
S)、前記ステップS52まで戻る。しかしiが規定定
数Loopより小さくない場合には(NO)、バーコー
ドラベル非検出の情報を持って、リターンする。従っ
て、このサブルーチンでは最大(2のLoop乗)−1
回のスキャンが行なわれることになる。
Next, the variable start It is determined whether or not the number of num exceeds the predetermined number (step S61). Here, if it exceeds (YE
S), and then proceeds to step S66. However, if it has not exceeded (NO), the variable j is incremented (step S62), and it is determined whether or not j is smaller than the i-th power of 2 (step S63). If j is smaller (YES), the process returns to step S54. However, if j is not smaller than the i-th power of 2 (NO), the variable i is incremented (step S64), and it is determined whether i is smaller than the specified constant Loop (step S65). Here, if i is small (YE
S), and returns to step S52. However, if i is not smaller than the specified constant Loop (NO), the process returns with the information that the barcode label is not detected. Therefore, in this subroutine, maximum (2 to the power of Loop) -1
It will be scanned twice.

【0061】また前記ステップS61において、sta
rt numが規定個数を越えていた場合は、後述する
Y座標の最大値最小値を求めるルーチンをコールする
(ステップS66)。そして、バーコードラベル検出の
情報を持って、リターンする。このようにスタートコー
ドが規定個数以上検出できた場合に、ループ処理の途中
であっても上位ルーチンに制御を戻すことにより、処理
の高速化を図ることができる。
Further, in step S61,
rt If the number of num exceeds the specified number, a routine for obtaining the maximum and minimum values of the Y coordinate, which will be described later, is called (step S66). Then, it returns with the information of the barcode label detection. In this way, when the start code can be detected by the predetermined number or more, the processing can be speeded up by returning the control to the upper routine even during the loop processing.

【0062】次に、図14におけるスキャン及び検出ル
ーチン中のステップS57でコールされるスタートコー
ド検出ルーチンについて、図16に示すフローチャート
を参照して説明する。
Next, the start code detection routine called in step S57 in the scan and detection routine in FIG. 14 will be described with reference to the flowchart shown in FIG.

【0063】まず、前記取り込んだ画像データを幅情報
に変換する(ステップS71)。次に、変換した幅情報
を正規化し(ステップS72)、マッチングを行なう
(ステップS73)。そして、前記幅情報がスタートコ
ードにマッチしたか否かを判断し(ステップS74)、
スタートコードであると判断した場合には(YES)、
スタートコード有りの情報を持って、リターンする。ス
タートコードでない場合は(NO)、スタートコード無
しの情報を持って、リターンする。
First, the captured image data is converted into width information (step S71). Next, the converted width information is normalized (step S72) and matching is performed (step S73). Then, it is determined whether or not the width information matches the start code (step S74),
If the start code is determined (YES),
Return with the information including the start code. If it is not the start code (NO), return with the information without the start code.

【0064】次に、前記ステップS71でコールされる
幅情報に変換ルーチンを、図17、図18に示す一連の
フローチャートを参照して説明する。本ルーチンは、バ
ーコードラベルのバーとスペースとの幅を求めるもので
あり、微分信号によりバーとスペースとの境界を求め、
このとき2次曲線に近似することによりデータのピーク
を求めているものである。そして、順次ピークを求め
て、その位置の差を求めることにより、幅が求められて
いる。
Next, the width information conversion routine called in step S71 will be described with reference to a series of flow charts shown in FIGS. This routine is to find the width between the bar and the space of the barcode label, and find the boundary between the bar and the space by the differential signal,
At this time, the peak of the data is obtained by approximating a quadratic curve. Then, the width is obtained by sequentially obtaining the peaks and obtaining the difference between the positions.

【0065】まず、上位のルーチンで取り込んだ取り込
みバッファ配列scan lineをラインデータの配
列とし、この取り込まれて変数numにストアされてい
る値をデータ個数と定義する(ステップS81)。次
に、この変数numの値をデクリメントした結果を位置
標識カウンタiに格納し、また変数jを“0”に初期設
定する(ステップS82)。
First, the fetch buffer array scan fetched by the upper routine The line is an array of line data, and the value fetched and stored in the variable num is defined as the number of data (step S81). Next, the result of decrementing the value of this variable num is stored in the position indicator counter i, and the variable j is initialized to "0" (step S82).

【0066】そして、取り込みバッファ配列scan
lineのi番目(位置標識カウンタiにより示され
る)の位置の値から取り込みバッファ配列scan
ineのi−1番目の位置の値を引き、その解を取り込
みバッファ配列scan lineのi番目の位置に再
設定する(ステップS83)。この後、位置標識カウン
タiをデクリメントし(ステップS84)、その結果i
が“0”よりも大きいか否かを判断する(ステップS8
5)。iが0より大きくなければ(NO)、前記ステッ
プS83に戻り、即ち、このステップS81からステッ
プS85で、ラインデータを一次微分する。また結果i
が“0”よりも大きいければ(YES)、位置標識カウ
ンタiを2に初期化する(ステップS86)。
Then, the fetch buffer array scan
Capture buffer array scan from the value of the i-th position of the line (indicated by the position indicator counter i) l
The value at the i-1 position of ine is subtracted, the solution is fetched, and the buffer array scan The line is reset to the i-th position (step S83). Thereafter, the position indicator counter i is decremented (step S84), and the result i
Is determined to be greater than "0" (step S8).
5). If i is not larger than 0 (NO), the process returns to step S83, that is, the line data is first differentiated in steps S81 to S85. Also the result i
If is larger than "0" (YES), the position indicator counter i is initialized to 2 (step S86).

【0067】そして、取り込みバッファ配列scan
lineのi番目の位置の値が、閾値変数THRESH
OLDの値よりも大きく、且つ取り込みバッファ配列s
can lineのi−1番目の位置の値よりも大き
く、且つ取り込みバッファ配列scan lineのi
+1番目の位置の値以上か否かを判断し(ステップS8
7)、そうであれば(YES)、符号指標flagをU
Pとする(ステップS88)。しかし、そうでなければ
(NO)、次のステップS89に移行する。
Then, the fetch buffer array scan
The value of the i-th position of the line is the threshold variable THRESH
It is larger than the value of OLD, and the capture buffer array s
can It is larger than the value at the (i-1) th position of the line, and the capture buffer array scan i of line
It is determined whether or not the value at the + 1st position is greater than or equal to the value (step S8).
7), if so (YES), set the code index flag to U
P (step S88). However, if not (NO), the process proceeds to the next step S89.

【0068】ここで、取り込みバッファ配列scan
lineのi番目の位置の値が、符号を負とした閾値変
数THRESHOLDの値(−THRESHOLD)よ
りも小さく、且つ取り込みバッファ配列scan li
neのi−1番目の位置の値よりも小さく、且つ取り込
みバッファ配列scan lineのi+1番目の位置
の値以下か否かを判断し(ステップS89)、そうであ
れば(YES)、符号指標flagをDOWNとする
(ステップS90)。そうでなければ(NO)、次のス
テップS91に移行する。
Here, the capture buffer array scan
The value at the i-th position of the line is smaller than the value of the threshold variable THRESHOLD (-THRESHOLD) with a negative sign, and the capture buffer array scan li
It is smaller than the value at the (i-1) th position of ne, and the capture buffer array scan It is determined whether or not the value at the (i + 1) th position of the line is less than or equal to the value (step S89), and if so (YES), the code index flag is set to DOWN (step S90). Otherwise (NO), the process moves to the next step S91.

【0069】ここで、位置標識カウンタiをインクリメ
ントする(ステップS91)。iが変数numの値から
1引いた数よりも小さいか判断する(ステップS9
2)。小さければ(YES)、前記ステップS87へ戻
り、小さくなければ(NO)、ステップ72のルーチン
へ戻る。
Here, the position indicator counter i is incremented (step S91). It is determined whether i is smaller than the number obtained by subtracting 1 from the value of the variable num (step S9).
2). If it is smaller (YES), the process returns to step S87, and if it is not smaller (NO), the process returns to the routine of step 72.

【0070】即ち、このステップS87からステップS
92で、閾値変数THRESHOLDの値を越える最初
のピーク、つまり図19の1番目のピークを検出する。
そして、検出されたピークの符号が正の場合は、符号指
標flagをUPとして、次のステップS93に移行
し、検出されたピークの符号が負の場合は、符号指標f
lagをDOWNとし、ステップS94に移行する。ま
た、ラインデータを走査してもピークが検出されない場
合には、上位のルーチンに制御を戻す。
That is, from step S87 to step S
At 92, the first peak that exceeds the value of the threshold variable THRESHOLD, that is, the first peak in FIG. 19, is detected.
Then, when the sign of the detected peak is positive, the code index flag is set to UP, and the process proceeds to the next step S93. When the sign of the detected peak is negative, the code index f
lag is set to DOWN, and the process proceeds to step S94. If no peak is detected even after scanning the line data, the control is returned to the upper routine.

【0071】このようにして、符号指標flagが設定
されたならば、次に、位置標識カウンタiの値をx1と
し、また取り込みバッファ配列scan lineのi
−1番目の位置の値をy1、取り込みバッファ配列sc
an lineのi番目の位置の値をy2、取り込みバ
ッファ配列scan lineのi+1番目の位置の値
をy3とすることにより、検出されたピーク位置とその
両隣データを2次曲線でフィッティングを行う(ステッ
プS93)。そして、−0.5(−y1−2x1y1+
4x1y2+y3−2x1y3)/y1−2y2+y3
なる計算を行って、前記2次曲線のピーク位置を求め、
それを変数lastposに格納する(ステップS9
4)。
If the code index flag is set in this way, then the value of the position indicator counter i is set to x1, and the fetch buffer array scan is set. i of line
-The value at the 1st position is y1, the capture buffer array sc
an The value at the i-th position of the line is y2, the capture buffer array scan By setting the value at the (i + 1) th position of the line to y3, the detected peak position and the data on both sides of the detected peak position are fitted with a quadratic curve (step S93). And -0.5 (-y1-2x1y1 +
4x1y2 + y3-2x1y3) / y1-2y2 + y3
Is calculated to obtain the peak position of the quadratic curve,
It is stored in the variable lastpos (step S9).
4).

【0072】その後、位置標識カウンタiの値が変数n
umの値から2引いた数よりも小さく、且つ前記変数j
がWIDTH NUMより小さいか否か判断する(ステ
ップS95)、前記変数jが小さくなければ(NO)、
上位のルーチンへ戻る。
After that, the value of the position indicator counter i is changed to the variable n.
It is smaller than the number obtained by subtracting 2 from the value of um, and the variable j
Is WIDTH It is determined whether or not it is smaller than NUM (step S95), and if the variable j is not small (NO),
Return to the upper routine.

【0073】ここで変数jがWIDTH NUMより小
さいという命題について説明する。WIDTH NUM
は求めるべき幅数が格納されている定数であり、jは求
めたピークの数が格納されている変数である。ここで、
スタートコード22の位置を検出するために、スタート
コード22が必ず、フレームメモリ6の向かって左側に
位置するという条件と、フレームメモリ6の中にバーコ
ードラベル以外の情報がないという条件があれば、前記
配列scan lineに格納されている微分情報を全
て幅情報に変換する必要はない。
Here, the variable j is WIDTH Explain the proposition that it is smaller than NUM. WIDTH NUM
Is a constant in which the number of widths to be obtained is stored, and j is a variable in which the number of obtained peaks is stored. here,
In order to detect the position of the start code 22, there is a condition that the start code 22 is always located on the left side of the frame memory 6 and that there is no information other than the bar code label in the frame memory 6. , The sequence scan It is not necessary to convert all the differential information stored in line to width information.

【0074】即ち、8個の幅情報を検出する為に最低限
必要なピークの数は9個であるから、定数WIDTH
NUMは、それ以上の数ならばよいということになる。
通常、WIDTH NUMは画像のSN比により決定さ
れる。即ち、フレームメモリ6内にバーコードラベル以
外の情報が全くなければ、WIDTH NUMは“9”
に設定できる。そうでなければ、WIDTH NUMは
“9以上”の数にしなければならない。
That is, since the minimum number of peaks required to detect eight pieces of width information is nine, the constant WIDTH
It means that the number of NUM may be more than that.
Usually WIDTH NUM is determined by the SN ratio of the image. That is, if there is no information other than the barcode label in the frame memory 6, WIDTH NUM is "9"
Can be set to. Otherwise, WIDTH NUM must be a number greater than or equal to "9".

【0075】以上のような理由により、前記の命題がス
テップS95の判断に入っている。この命題が判断に入
ることにより、全ての幅情報を求めることなくルーチン
を終了させられるので、処理の高速化が図れる。後述す
るが、微分情報から全ての幅情報を求めたいときは、も
ちろんこの命題を外せばよい。
For the above reason, the above proposition is included in the judgment of step S95. By entering this judgment into the proposition, the routine can be ended without obtaining all the width information, so that the processing speed can be increased. As will be described later, if you want to obtain all the width information from the differential information, you can of course remove this proposition.

【0076】また、前記ステップS95の命題が成り立
てば(YES)、位置標識カウンタiをインクリメント
する(ステップS96)。そして、符号指標flagが
DOWNであり、且つまた取り込みバッファ配列sca
lineのi番目の位置の値が、閾値変数THRE
SHOLDの値よりも大きく且つ取り込みバッファ配列
scan lineのi−1番目の位置の値よりも大き
く且つ取り込みバッファ配列scan lineのi+
1番目の位置の値以上であるか否かを判断する(ステッ
プS97)。全ての項が成り立てば(YES)、符号指
標flagをUPとする(ステップS98)。
If the proposition of step S95 holds (YES), the position marker counter i is incremented (step S96). Then, the code index flag is DOWN, and also the capture buffer array scal
n The value of the i-th position of the line is the threshold variable THRE.
Greater than the value of SHOLD and the capture buffer array scan It is larger than the value at the (i-1) th position of the line and is the acquisition buffer array scan i + of line
It is determined whether or not the value at the first position is greater than or equal to the value (step S97). If all the terms are satisfied (YES), the code index flag is set to UP (step S98).

【0077】しかし、前記ステップS98で全ての項が
成り立たなければ(NO)、次に、符号指標flagが
UPであり、且つまた取り込みバッファ配列scan
lineのi番目の位置の値が、符号を負とした閾値変
数THRESHOLDの値よりも小さく且つ取り込みバ
ッファ配列scan lineのi−1番目の位置の値
よりも小さく且つ取り込みバッファ配列scan li
neのi+1番目の位置の値以下であるか否かを判断す
る(ステップS99)。全ての項が成り立たなければ
(NO)、前記ステップS95に戻り、全ての項が成り
立てば(YES)、符号指標flagをDOWNとする
(ステップS100)。
However, if all the terms are not satisfied in step S98 (NO), then the code index flag is UP and the fetch buffer array scan is also present.
The value of the i-th position of the line is smaller than the value of the threshold variable THRESHOLD with a negative sign and the fetch buffer array scan It is smaller than the value at the (i-1) th position of the line and is the acquisition buffer array scan li
It is determined whether or not it is less than or equal to the value of the i + 1th position of ne (step S99). If all the terms are not satisfied (NO), the process returns to step S95, and if all the terms are satisfied (YES), the code index flag is set to DOWN (step S100).

【0078】こうして、符号指標flagが再設定され
たならば、次に、位置標識カウンタiの値をx1とし、
また取り込みバッファ配列scan lineのi−1
番目の位置の値をy1、取り込みバッファ配列scan
lineのi番目の位置の値をy2、取り込みバッフ
ァ配列scan lineのi+1番目の位置の値をy
3とすることにより、検出されたピーク位置とその両隣
データを2次曲線でフィッティングを行う(ステップS
101)。
When the code index flag is reset in this way, next, the value of the position indicator counter i is set to x1,
Also capture buffer array scan line i-1
The value at the second position is y1, the capture buffer array scan
The value at the i-th position of the line is y2, the capture buffer array scan The value at the (i + 1) th position of the line is y
By setting 3, the detected peak position and the data on both sides of the detected peak position are fitted with a quadratic curve (step S
101).

【0079】そして、−0.5(−y1−2x1y1+
4x1y2+y3−2x1y3)/y1−2y2+y3
なる計算を行って、前記2次曲線のピーク位置を求め、
それを変数nowposに格納する(ステップS10
2)。
Then, -0.5 (-y1-2x1y1 +
4x1y2 + y3-2x1y3) / y1-2y2 + y3
Is calculated to obtain the peak position of the quadratic curve,
It is stored in the variable nowpos (step S10).
2).

【0080】これにより、図20に示すように、1回前
のピーク位置lastposと今回求めたピーク位置n
owposが得られる。そして、こうして得られた両ピ
ーク位置の差を取ることによりピーク間距離を求め、そ
れを幅情報格納配列変数widthの変数jで示される
位置に格納する(ステップS103)。
As a result, as shown in FIG. 20, the peak position lastpos and the peak position n obtained this time are determined.
owpos is obtained. Then, the peak-to-peak distance is obtained by taking the difference between the two peak positions thus obtained, and stored in the position indicated by the variable j of the width information storage array variable width (step S103).

【0081】その後、ピーク位置変数lastposを
ピーク位置変数nowposの値に更新し(ステップS
104)、また変数jをインクリメントしてから(ステ
ップS105)、前記ステップS95に移行する。
Then, the peak position variable lastpos is updated to the value of the peak position variable nowpos (step S
104) and after incrementing the variable j (step S105), the process proceeds to step S95.

【0082】このように、ステップS95からステップ
S105で、順次ピークを検出し、ピーク間距離を幅情
報格納配列変数widthに格納していく。ここで、前
記ステップS87からステップS92に於ける最初のピ
ーク検出と異なる点は、例えば現在の符号指標flag
がDOWNの場合、次に見つけなくては行けないピーク
は正符号のピークとしている点である。
In this way, in steps S95 to S105, the peaks are sequentially detected, and the peak-to-peak distance is stored in the width information storage array variable width. Here, the point different from the first peak detection in steps S87 to S92 is, for example, the current code index flag.
Is DOWN, the peak that must be found next is the point with a positive sign.

【0083】次に、前述したようなスタートコード検出
ルーチン中のステップS82でコールされる正規化ルー
チンを、図21に示すフローチャートを参照して説明す
る。まず、ループカウント変数iと変数sumに“0”
を代入し、初期化する(ステップS111)。次に、変
数sumに前記幅情報に変換ルーチンで求めた幅情報を
格納した配列width[i]を加算し、再びsumに
格納する(ステップS112)。
Next, the normalization routine called in step S82 in the start code detection routine as described above will be described with reference to the flowchart shown in FIG. First, "0" is set in the loop count variable i and the variable sum.
Is substituted and initialized (step S111). Next, the array width [i] in which the width information obtained by the conversion routine is stored is added to the width sum in the variable sum, and the result is stored again in sum (step S112).

【0084】次に、前記変数iをインクリメントする
(ステップS113)。次に、この変数iが“8”より
小さいか否かを判断し(ステップS114)、この変数
iが“8”より小さければ(YES)、前記ステップS
112に戻る。変数iが“8”より大きければ(N
O)、次のステップS115に移行する。なお、ここで
変数iが“0”から“7”まで変化しているのは、PD
F417のコードワードがバー4本、スペース4本の計
8個の幅情報から構成されており、8個の幅情報全てを
用いてスタートコードの正規化を行なうためである。
Next, the variable i is incremented (step S113). Next, it is determined whether or not this variable i is smaller than "8" (step S114), and if this variable i is smaller than "8" (YES), the above step S
Return to 112. If the variable i is larger than “8” (N
O), and proceeds to the next step S115. The variable i is changing from "0" to "7" in the PD.
This is because the code word of F417 is composed of a total of eight pieces of width information of four bars and four spaces, and the start code is normalized using all eight pieces of width information.

【0085】次に、再度、前記変数iに“0”を代入し
て初期化する(ステップS115)。次に、“17”を
前記変数sumで除算し、前記幅情報配列のi番目wi
dth[i]に格納されている値を乗じたものをその値
に一番近い整数に丸める(ステップS116)。ここで
図21中のroundは、丸めを意味している。そして
前記変数iをインクリメントし(ステップS117)、
変数iが“8”より小さいか否かを判断する(ステップ
S118)。この変数iが“8”より小さければ(YE
S)、前記ステップS116まで戻り、変数iが“8”
より大きければ(NO)、上位のルーチンにリターンす
る。
Then, again, "0" is assigned to the variable i for initialization (step S115). Next, "17" is divided by the variable sum to obtain the i-th wi of the width information array.
The value obtained by multiplying the value stored in dth [i] is rounded to the nearest integer (step S116). Here, round in FIG. 21 means rounding. Then, the variable i is incremented (step S117),
It is determined whether the variable i is smaller than "8" (step S118). If this variable i is smaller than "8" (YE
S), the process returns to step S116, and the variable i is "8".
If it is larger (NO), the process returns to the upper routine.

【0086】次に、前述したような図16に示したスタ
ートコード検出ルーチン中のステップS73のスタート
コードマッチングについて説明する。これは、どのよう
なマッチング方法を用いてもよいが、バーコードラベル
を印刷する際にバー部分が意図した太さよりも太くなっ
てしまうことがよくある。バー部分が太過ぎると、デコ
ード性能は著しく低下する。しかし、このような場合に
は、バーが太くなった分スペース部分が細くなるので、
バーの太さとスペースの太さを加算した幅情報をマッチ
ングの対象にする方式を採用した方がよい。
Next, the start code matching of step S73 in the start code detection routine shown in FIG. 16 as described above will be described. Although any matching method may be used, the bar portion often becomes thicker than intended when printing a barcode label. If the bar portion is too thick, the decoding performance will be significantly reduced. However, in such a case, the space becomes thinner as the bar gets thicker, so
It is better to adopt a method in which the width information obtained by adding the bar thickness and the space thickness is used as a matching target.

【0087】次に、前述した図14の検出ルーチン中の
ステップS66でコールされるY座標の最大値最小値検
出ルーチンについて、図22に示すフローチャートを参
照して説明する。このY座標の最大値最小値検出ルーチ
ンは、規定個数検出したスタートコードの座標の中で、
そのY座標が最大のものと最小のものを求めるルーチン
である。
Next, the routine for detecting the maximum and minimum values of the Y coordinate called in step S66 in the above-mentioned detection routine of FIG. 14 will be described with reference to the flow chart shown in FIG. This Y-coordinate maximum / minimum value detection routine is carried out in the coordinates of the start code detected by the specified number,
This is a routine for obtaining the maximum and minimum Y coordinates.

【0088】まず、座標変数MAXとMINのY座標の
値(MAXyとMINy)に、前記ステップS57(図
14)で検出したスタートコードの検出座標の配列の0
番目に格納されているStart pos[0]のY座
標の値(start pos[0]y)を代入する(ス
テップS121)。次に、データの数だけループするの
に必要な変数iに1を代入する(ステップS122)。
First, in the Y coordinate values (MAXy and MINy) of the coordinate variables MAX and MIN, 0 of the array of detected coordinates of the start code detected in step S57 (FIG. 14) is set.
Start stored in th Value of Y coordinate of pos [0] (start Substitute pos [0] y) (step S121). Next, 1 is substituted into the variable i required for looping by the number of data (step S122).

【0089】次に、前記配列のi番目に格納されている
start pos[i]のY座標の値(start
pos[i]y)がMAXyより大きいか否かを判断す
る(ステップS123)。ここでMAXyより大きい場
合(YES)、即ちステップS123の命題が真の場合
には、前記座標配列のi番目のstart pos
[i]を前記座標変数MAXに代入し(ステップS12
4)、ステップS127に移行する。しかし、MAXy
より小さい場合(NO)、即ちステップS123の命題
が偽の場合には、ステップS125に移行する。
Next, the start stored in the i-th position of the array Y coordinate value of pos [i] (start
It is determined whether pos [i] y) is larger than MAXy (step S123). Here, when it is larger than MAXy (YES), that is, when the proposition of step S123 is true, the i-th start of the coordinate array is set. pos
Substitute [i] into the coordinate variable MAX (step S12
4) and the process proceeds to step S127. However, MAXy
If smaller (NO), that is, if the proposition in step S123 is false, the process proceeds to step S125.

【0090】次に、前記配列のi番目に格納されている
start pos[i]のY座標の値(start
pos[i]y)がMINyより小さいか否かを判断す
る(ステップS125)。ここでMINyより小さい場
合(YES)、即ちステップS125の命題が真の場合
には、前記座標配列のi番目のstart pos
[i]を前記座標変数MINに代入し(ステップS12
6)、ステップS127に移行する。しかしMINyよ
り大きい場合(NO)、即ちステップS125の命題が
偽の場合には、ステップS127に移行する。
Next, the start stored in the i-th position of the array Y coordinate value of pos [i] (start
It is determined whether pos [i] y) is smaller than MINy (step S125). If smaller than MINy (YES), that is, if the proposition of step S125 is true, the i-th start of the coordinate array is set. pos
Substituting [i] into the coordinate variable MIN (step S12
6) and proceeds to step S127. However, when it is larger than MINy (NO), that is, when the proposition in step S125 is false, the process proceeds to step S127.

【0091】次に、前記変数iをインクリメントする
(ステップS127)。次に、変数iが前記ステップS
57で求めたstart numよりも大きいか否かを
判断し(ステップS128)、変数iの方が小さければ
(NO)、即ちステップS128の命題が偽の場合に
は、ステップS123に移行する。しかし変数iの方が
大きい場合には(YES)、即ちステップS128の命
題が真の場合には、座標変数MAXを図10に於ける座
標gに、座標変数MINを座標eに格納した後(ステッ
プS129)、図14の上位のルーチンにリターンす
る。
Next, the variable i is incremented (step S127). Next, the variable i is the value in step S
Start obtained from 57 It is determined whether or not it is larger than num (step S128), and if the variable i is smaller (NO), that is, if the proposition of step S128 is false, the process proceeds to step S123. However, if the variable i is larger (YES), that is, if the proposition of step S128 is true, after storing the coordinate variable MAX in the coordinate g and the coordinate variable MIN in the coordinate e in FIG. Step S129), and the process returns to the upper routine of FIG.

【0092】次に、前述したような図9のラベル検出ル
ーチン中のステップS35でコールされるラベルの範囲
を求めるルーチンについて、図23に示すフローチャー
トを参照して説明する。
Next, a routine for obtaining the label range called in step S35 in the label detecting routine shown in FIG. 9 will be described with reference to the flowchart shown in FIG.

【0093】まず、線分e−gに平行な直線の方程式を
定義、例えば線分e−gの方程式y=ax+bを求める
(ステップS131)。次に、この直線がスタートビッ
クバー22Aをクロスするように、切片bを定義する
(ステップS132)。スタートコード22の構造は、
例えば、8個のバーでなるスタートビックバー22A
と、3対の白バーと黒バーと、3個の白バーの合計17
個のバーで構成されており、これを撮像した結果がN画
素であったとする。また、方程式y=ax+bで表わさ
れる直線は、切片bを変化させることにより並行移動す
ることが知られている。従って、ビックバー22Aをク
ロスする直線を得るためには、前記線分e−gを{(1
7−8/2)/17}×N画素分左に移動させるような
切片bとすれば良いことになる。
First, the equation of a straight line parallel to the line segment e-g is defined, for example, the equation y = ax + b of the line segment e-g is obtained (step S131). Next, the intercept b is defined so that this straight line crosses the start big bar 22A (step S132). The structure of the start code 22 is
For example, start big bar 22A consisting of 8 bars
And 3 pairs of white and black bars, 3 white bars in total 17
It is assumed that each bar is composed of a number of bars, and the result of imaging this is N pixels. It is known that the straight line represented by the equation y = ax + b moves in parallel by changing the intercept b. Therefore, in order to obtain a straight line that crosses the big bar 22A, the line segment eg is set to {(1
7-8 / 2) / 17} × N pixels may be moved to the left by an intercept b.

【0094】このようにして、スタートビッグバー22
Aをクロスする直線が得られたならば、次に、その直線
と画面を定義する方程式との交点をそれぞれA,A′
(図10参照)とする(ステップS133)。
In this way, the start big bar 22
Once a straight line crossing A is obtained, then the intersections of the straight line and the equations defining the screen are A, A ′, respectively.
(See FIG. 10) (step S133).

【0095】そして、このラインA−A′の中点から点
Aに向けてデータを順に見ていき(ステップS13
4)、エッジが存在するか否かをチェックする(ステッ
プS135)。このチェックは、例えば、輝度変化を見
る強度比較、微分法、2次微分法、等により行なうこと
ができる。こうして、エッジが検出されたならば、その
検出座標を座標変数iに格納する(ステップS13
6)。即ち、検出座標を点iとする。
Then, the data is sequentially examined from the midpoint of the line AA 'toward the point A (step S13).
4) Then, it is checked whether or not there is an edge (step S135). This check can be performed by, for example, an intensity comparison for observing a change in luminance, a differential method, a second differential method, or the like. In this way, when the edge is detected, the detected coordinates are stored in the coordinate variable i (step S13).
6). That is, the detected coordinate is set to point i.

【0096】次に、前記ラインA−A′の中点から今度
はA′に向けてデータを準に見ていき(ステップS13
7)、エッジが存在するか否かをチェックする(ステッ
プS138)。こうして、エッジが検出されたならば、
その検出座標を座標変数mに格納する(ステップS13
9)。即ち、検出座標を点mとする。
Next, from the midpoint of the line AA ', the data is quasi-directed to A' (step S13).
7) Then, it is checked whether or not an edge exists (step S138). Thus, if an edge is detected,
The detected coordinates are stored in the coordinate variable m (step S13).
9). That is, the detected coordinate is set to the point m.

【0097】そして、座標変数e、gで示される点e、
gを通る直線に座標変数iで示される点iから垂線を下
ろし、その交点の座標を座標変数aに格納する(ステッ
プS140)。即ち、点iを通るラインA−A′と直交
する直線の方程式を求めて、それと点e、gを通る直線
の交点を求め、その交点を点aとする。
Then, the point e indicated by the coordinate variables e and g,
A perpendicular line is drawn from the point i indicated by the coordinate variable i on a straight line passing through g, and the coordinates of the intersection are stored in the coordinate variable a (step S140). That is, an equation of a straight line orthogonal to the line A-A 'passing through the point i is obtained, an intersection of the straight line passing through the points e and g is obtained, and the intersection is defined as a point a.

【0098】同様に、座標変数e、gで示される点e、
gを通る直線に座標変数mで示される点mから垂線を下
ろし、その交点の座標を座標変数dに格納する(ステッ
プS141)。即ち、点mを通るラインA−A′と直交
する直線の方程式を求めて、それと点e,gを通る直線
の交点を求め、その交点を点dとする。
Similarly, points e and g indicated by coordinate variables e and g
A perpendicular line is drawn from the point m indicated by the coordinate variable m on a straight line passing through g, and the coordinates of the intersection are stored in the coordinate variable d (step S141). That is, the equation of a straight line orthogonal to the line A-A 'passing through the point m is obtained, the intersection of the straight line passing through the points e and g is obtained, and the intersection is defined as the point d.

【0099】このようにして求めた座標変数aの値を座
標変数STARTTOPに、また座標変数dの値を座標
変数STARTBOTTOMにそれぞれ格納した後(ス
テップS142)、上位のルーチンへ制御を戻す。
After storing the value of the coordinate variable a thus obtained in the coordinate variable STARTTOP and the value of the coordinate variable d in the coordinate variable STARTBOTTOM (step S142), the control is returned to the upper routine.

【0100】次に、前述したようなラベル検出ルーチン
中のステップS36でコールされるラベルの傾きを求め
るルーチンを、図24に示すフローチャート及び図11
に示すラベルの傾きを求めるための説明図を参照して説
明する。
Next, a routine for obtaining the label inclination called in step S36 in the above-described label detection routine will be described with reference to the flowchart shown in FIG. 24 and FIG.
It will be described with reference to the explanatory diagram for obtaining the inclination of the label shown in FIG.

【0101】まず、座標変数STARTBOTTOMの
x座標の値を、座標変数STARTBOTTOMのy座
標の値から座標変数STARTTOPのy座標の値を差
し引いた結果の値で割り、また座標変数STARTTO
Pのx座標の値を、座標変数STARTBOTTOMの
y座標の値から座標変数STARTTOPのy座標の値
を差し引いた結果の値で割り、これら2つの商の差を傾
き変数Slopeに格納する(ステップS151)。
First, the value of the x coordinate of the coordinate variable STARTBOTTOM is divided by the value obtained by subtracting the value of the y coordinate of the coordinate variable STARTTOP from the value of the y coordinate of the coordinate variable STARTBOTTOM, and the coordinate variable STARTTO
The value of the x coordinate of P is divided by the value of the result of subtracting the value of the y coordinate of the coordinate variable STARTTOP from the value of the y coordinate of the coordinate variable STARTBOTTOM, and the difference between these two quotients is stored in the slope variable Slope (step S151). ).

【0102】次に、座標変数STARTBOTTOMの
y座標と座標変数STARTTOPのx座標とを乗じた
結果を、座標変数STARTBOTTOMのy座標の値
から座標変数STARTTOPのy座標の値を差し引い
た結果の値で割り、また座標変数STARTBOTTO
Mのx座標と座標変数STARTTOPのy座標とを乗
じた結果を、座標変数STARTBOTTOMのy座標
の値から座標変数STARTTOPのy座標の値を差し
引いた結果の値で割り、これら2つの商の差を切片変数
intersectに格納する(ステップS152)。
なお、図中のアスタリスク*の上付き文字は、乗算記号
×を意味する。
Next, the result of multiplying the y coordinate of the coordinate variable STARTBOTTOM and the x coordinate of the coordinate variable STARTTOP is a value obtained by subtracting the value of the y coordinate of the coordinate variable STARTTOP from the value of the y coordinate of the coordinate variable STARTBOTTOM. Split and coordinate variable STARTBOTTO
The result of multiplying the x coordinate of M by the y coordinate of the coordinate variable STARTTOP is divided by the value of the result of subtracting the value of the y coordinate of the coordinate variable STARTTOP from the value of the y coordinate of the coordinate variable STARTBOTTOM, and the difference between these two quotients. Is stored in the intercept variable intersect (step S152).
The superscript of asterisk * in the figure means the multiplication symbol x.

【0103】次に、図4の前記ステップS5でコールさ
れる閾値決定ルーチンについて、図25に示すフローチ
ャートと図26に示す閾値算出のための説明図を参照し
て説明する。
Next, the threshold value determination routine called in step S5 of FIG. 4 will be described with reference to the flowchart shown in FIG. 25 and the explanatory diagram for calculating the threshold value shown in FIG.

【0104】まず、図10に示す点eに相当する値を点
pに代入する(ステップS161)。次に、座標変数p
のy座標の値で示されるライン、つまり図26(a)に
示すようなデータ取り込みラインのデータをフレームメ
モリ6から取り込み(ステップS162)、スタートコ
ード22の終わりx座標を点qのx座標とする(ステッ
プS163)。
First, a value corresponding to the point e shown in FIG. 10 is substituted for the point p (step S161). Next, coordinate variable p
The line indicated by the y-coordinate value of, that is, the data of the data-acquisition line as shown in FIG. Yes (step S163).

【0105】そして、点pから点qまでのデータを微分
する(ステップS164)。これにより、例えば、図2
6(a)に示すデータ取り込みラインの場合には、図2
6(b)に示すようなスタートコード22の微分波形が
求まる。そして、この微分データの3番目のピークの絶
対値を変数MAXとする(ステップS165)。
Then, the data from the point p to the point q is differentiated (step S164). As a result, for example, in FIG.
In the case of the data acquisition line shown in FIG.
A differential waveform of the start code 22 as shown in 6 (b) is obtained. Then, the absolute value of the third peak of this differential data is set as the variable MAX (step S165).

【0106】ここで、微分データの3番目を見る理由
は、概念的に、バーコード領域内で最もコントラストが
低くなる(即ち、エッジの微分ピークが最も低い)とこ
ろで閾値を決定したいということから、ラベルのバーと
スペースの間隔が最も狭いところであるスタート若しく
は、ストップコードの第3エッジを選択するようにして
いるということによる。これにより、ラベルサイズやラ
ベルの照明条件によらず安定的なデコードが可能とな
る。
Here, the reason for looking at the third differential data is that, conceptually, the threshold is to be decided at the point where the contrast becomes the lowest in the barcode area (that is, the edge differential peak is the lowest). This is because the third edge of the start or stop code, which has the smallest space between the label bar and the space, is selected. This enables stable decoding regardless of label size and label illumination conditions.

【0107】そして、こうして求めた変数MAXの値を
ピークに対する比率の定数THRESHOLD RAT
IOで割り、その結果を閾値変数THRESHOLDに
代入する(ステップS166)。即ち、求められたデー
タから閾値を仮に求める。なお、変数THRESHOL
RATIOとは、ピークの何分の一を閾値に選ぶか
を示す値であり、通常は、“2”あるいは“3”に設定
される。
Then, the value of the variable MAX thus obtained is set to a constant THRESHOLD of the ratio to the peak. RAT
It is divided by IO and the result is substituted for the threshold variable THRESHOLD (step S166). That is, the threshold is tentatively obtained from the obtained data. In addition, the variable THRESHOL
D RATIO is a value indicating which fraction of the peak is selected as the threshold value, and is usually set to "2" or "3".

【0108】次に、仮に求めた閾値THRESHOLD
の値が、最小閾値定数THRESHOLD SMALL
よりも大きく(ステップS167)、且つ、最大閾値定
数THRESHOLD BIGよりも小さいか否かを判
断する(ステップS168)。つまり、仮に求めた閾値
が、閾値の取り得る範囲内に存在するか否かを判断す
る。定数THERESHOLD SMALLで示される
最大値を越える場合には(YES)、定数THRESH
OLD SMALLで示される最大値を閾値変数THE
RESHOLDに代入、つまり閾値を最小値に設定する
(ステップS169)。
Next, the tentatively obtained threshold value THRESHOLD
Is the minimum threshold constant THRESHOLD SMALL
Larger than the maximum threshold value (step S167) and the maximum threshold constant THRESHOLD It is determined whether it is smaller than BIG (step S168). That is, it is determined whether or not the tentatively obtained threshold value is within the range of the threshold value. Constant THERESHOLD If the maximum value indicated by SMALL is exceeded (YES), the constant THRESH
OLD The maximum value indicated by SMALL is the threshold variable THE
Substitute for RESHOLD, that is, set the threshold to the minimum value (step S169).

【0109】また、変数THRESHOLD BIGで
示される最小値未満の場合は(YES)、THERES
HOLD BIGで示される最小値を閾値変数THRE
SHOLDに代入、つまり閾値を最大値に設定する(ス
テップS170)。
In addition, the variable THRESHOLD If less than the minimum value indicated by BIG (YES), THERES
HOLD The minimum value indicated by BIG is the threshold variable THRE.
Substitute in SHOLD, that is, set the threshold value to the maximum value (step S170).

【0110】次に、図4の前記ステップS6でコールさ
れるインディケータ情報決定ルーチンについて、図27
に示すローチャート及び図28に示すフレームメモリへ
の投影像の図を参照して説明する。
Next, the indicator information determination routine called in step S6 of FIG. 4 will be described with reference to FIG.
It will be described with reference to the row chart shown in FIG.

【0111】まず、ロウインディケータ情報を読取るた
めの基準座標の始点として、ラベルのトップ座標TOP
の値を座標変数WORKに格納する(ステップS17
1)。次に、この座標変数WORKを通り、ラベルの傾
き変数Slopeで示される傾きを持つ直線Iを定義し
(ステップS172)、この直線Iが画面枠とクロスす
る点W1,W2を定義する(ステップS173)。
First, as the starting point of the reference coordinates for reading the row indicator information, the top coordinates TOP of the label
Is stored in the coordinate variable WORK (step S17).
1). Next, a straight line I passing through this coordinate variable WORK and having a slope indicated by the slope variable Slope of the label is defined (step S172), and points W1 and W2 at which this straight line I crosses the screen frame are defined (step S173). ).

【0112】そして、線分W1−W2上の画像データを
取り込み(ステップS174)、その中に含まれるロウ
インディケータ情報を読取る(ステップS175)。こ
こで、ロウインディケータ情報の読取りは、例えば次の
ようにして行う。即ち、前記ステップS174で取り込
まれた対象ライン上の画像データつまり白黒の画素値か
らエッジを検出し、幅情報に変換する。そして、この幅
情報からスタートコード22を検出し、そのスタートコ
ード22の次のコードがロウインディケータ21Aであ
ることがわかっているので、それを読み込む。
Then, the image data on the line segment W1-W2 is fetched (step S174), and the row indicator information contained therein is read (step S175). Here, the reading of the row indicator information is performed as follows, for example. That is, an edge is detected from the image data on the target line captured in step S174, that is, a black and white pixel value, and converted into width information. Then, the start code 22 is detected from this width information, and since it is known that the code next to the start code 22 is the row indicator 21A, it is read.

【0113】同様に、ストップコード23を検出し、そ
のストップコード23の直前のコードがロウインディケ
ータ21Aであることもわかっているため、それを読み
込む。こうして、ロウインディケータ21Aが読取れた
ならば、それを不図示のバーコード表と比較し、一致す
る部分をコードに、つまり行数,列数,セキュリティレ
ベル等の情報に変換する。なお、幅情報への変換は、種
々の手法があるが、例えば後述するような幅情報への変
換ルーチンをコールすることにより行うことができる。
Similarly, the stop code 23 is detected, and it is also known that the code immediately before the stop code 23 is the row indicator 21A, so that it is read. In this way, when the row indicator 21A is read, it is compared with a bar code table (not shown), and the matching portion is converted into a code, that is, information such as the number of rows, the number of columns, and the security level. There are various methods for conversion into width information, but the conversion can be performed by calling a width information conversion routine as described later.

【0114】次に、ロウインディケータ情報が確立した
か否かをチェックし(ステップS176)、確定したな
らば(YES)、ステップS180に移行する。確定し
ないならば(NO)、ステップS177に移行する。こ
こで、確定とは、何回かロウインディケータ21Aを読
み込み、情報の信頼度が十分上がった場合のことを意味
する。例えば、ロウインディケータ21Aに書かれてい
る情報(行数,列数,セキュリティレベル)が10回読
んだならば、その10回とも同じ情報が得られた場合、
確定されたとする。
Next, it is checked whether or not the row indicator information has been established (step S176), and if it has been confirmed (YES), the process proceeds to step S180. If not confirmed (NO), the process proceeds to step S177. Here, “determined” means that the row indicator 21A is read several times and the reliability of the information is sufficiently improved. For example, if the information (the number of rows, the number of columns, the security level) written in the row indicator 21A is read 10 times, and if the same information is obtained 10 times,
Suppose it has been confirmed.

【0115】前記ステップS176の判断で、ロウイン
ディケータ情報が確定しない場合は(NO)、座標変数
WORKのy座標の値に所定の増分L INCを加え
て、その結果を新たな座標変数WORKのy座標値とし
て代入する(ステップS177)。また、ラベルの傾き
変数Slopeの値に座標変数WORKのy座標の値を
乗じ、その結果にラベルの切片変数intersect
を加えて、その結果を新たな座標変数WORKのx座標
値として代入する(ステップS178)。こうして新た
にスキャンするための基準座標を座標変数WORKに再
設定する。
If the row indicator information is not confirmed in the determination in step S176 (NO), the y coordinate value of the coordinate variable WORK is incremented by a predetermined increment L. INC is added, and the result is substituted as the y coordinate value of the new coordinate variable WORK (step S177). Further, the value of the label inclination variable Slope is multiplied by the value of the y coordinate of the coordinate variable WORK, and the result is the label intercept variable intersect.
Is added and the result is substituted as the x coordinate value of the new coordinate variable WORK (step S178). In this way, the reference coordinate for newly scanning is reset to the coordinate variable WORK.

【0116】そして、この再設定された座標変数WOR
Kのy座標値がラベルのボトム座標変数BOTTOMの
y座標値を越えているか否か、つまりラベル領域内か否
かを判断し(ステップS179)、ラベル領域内であれ
ば前記ステップS172から繰り返し、ラベル領域外の
場合はマトリックスの未定義の情報を持って上位のルー
チンへリターンする。
Then, this reset coordinate variable WOR
It is determined whether the y coordinate value of K exceeds the y coordinate value of the bottom coordinate variable BOTTOM of the label, that is, whether it is within the label area (step S179), and if it is within the label area, repeat from step S172, If it is outside the label area, it returns to the upper routine with undefined matrix information.

【0117】一方、前記ステップS176で、ロウイン
ディケータ21Aが確定したと判断した場合には(YE
S)、ロウインディケータ情報から得られたセキュリテ
ィレベルから修復可能なデータ数を算出し、REST
NUMに格納される(ステップS180)。さらに、ロ
ウインディケータ情報から得られたラベルの行数が、ラ
ベルのロウ数変数ROW NUMBERに格納される
(ステップS181)。また、ロウインディケータ情報
からラベルの列数が抽出され、ラベルのカラム数変数C
OLUMN NUMBERに格納される(ステップS1
82)。その後、マトリックスが定義されたという情報
を持って上位のルーチンへ制御を戻す。
On the other hand, if it is determined in step S176 that the row indicator 21A has been confirmed (YE
S), the number of recoverable data is calculated from the security level obtained from the raw indicator information, and the REST
It is stored in NUM (step S180). Further, the number of rows of the label obtained from the row indicator information is the row number variable ROW of the label. It is stored in NUMBER (step S181). Further, the number of label columns is extracted from the row indicator information, and the label column number variable C
OLUMN Stored in NUMBER (step S1)
82). After that, control is returned to the upper routine with the information that the matrix is defined.

【0118】次に、図4の前記ステップS8でコールさ
れる傾き再定義ルーチンについて、図29に示すフロー
チャート及び図30に示す傾きを再定義するための説明
図を参照して説明する。ここで、傾きを再定義する理由
を以下に述べる。
Next, the inclination redefinition routine called in step S8 of FIG. 4 will be described with reference to the flow chart shown in FIG. 29 and the explanatory diagram for redefining the inclination shown in FIG. Here, the reason for redefining the slope will be described below.

【0119】図10中のe、gから求めた傾き、即ちス
タートコード22の情報のみから求めた傾きは印字品
質、CCDの精度等の問題により、正確な値ではない。
そこで、前記ステップS8によりインディケータ情報が
決定した後で、ストップコード23に近い位置からスト
ップコード23に検出し、スタートコード22とストッ
プコード23の両方の情報から傾きを求めれば、より正
確な傾きの値が求まる。前記ステップSCの最適スキャ
ンの前に、より正確な傾きの値を求めることはスキャン
の高速化につながる。
The inclination obtained from e and g in FIG. 10, that is, the inclination obtained only from the information of the start code 22 is not an accurate value due to problems such as print quality and CCD accuracy.
Therefore, if the indicator information is determined in step S8, the stop code 23 is detected from a position close to the stop code 23, and the inclination is obtained from the information of both the start code 22 and the stop code 23, a more accurate inclination can be obtained. The value is obtained. Obtaining a more accurate tilt value before the optimum scan in step SC leads to faster scan.

【0120】まず、検出開始点pを決定する(ステップ
S191)。pは、前記インディケータ情報決定ルーチ
ンで求まった、右行インディケータの列の左端の上端の
点uと下端の点vを結ぶ直線Iを4等分し、uからIに
沿って4等分した距離を進んだ点である。次に、p、
p′間のデータを取り込む(ステップS192)。p′
は前記点pからx軸に平行に進みy=列数の直線と交わ
った点である。
First, the detection start point p is determined (step S191). p is a straight line I connecting the left upper end point u and the lower end point v of the column of the right row indicator, which is obtained by the above-mentioned indicator information determination routine, and is divided into four equal parts along the line I from u. This is the point where Then p,
The data between p'is fetched (step S192). p '
Is a point which extends from the point p in parallel with the x-axis and intersects a straight line of y = column number.

【0121】次に後述するストップコード検出ルーチン
をコールする(ステップS193)。そして、ストップ
コードを検出したか否かを判断し(ステップS19
4)、検出しなかった場合には(NO)、傾きの再定義
無しの情報を持って、リターンする。検出した場合は
(YES)、検出点の座標を図10に示すfに格納し、
fを定義する(ステップS195)。
Next, a stop code detection routine, which will be described later, is called (step S193). Then, it is judged whether or not the stop code is detected (step S19
4) If it is not detected (NO), return with the information that the inclination is not redefined. If detected (YES), the coordinates of the detection point are stored in f shown in FIG.
f is defined (step S195).

【0122】次に、検出開始点qを決定する(ステップ
S196)。この点qは前記インディケータ情報決定ル
ーチンで求められた右行インディケータの列の左端の上
端の点uと下端の点vを結ぶ直線Iを4等分し、vから
Iに沿って4等分した距離を進んだ点である。次に、点
q,q′間のデータを取り込む(ステップS197)。
点q′は、前記点qからx軸に平行に進みy=列数の直
線と交わった点である。 次に前記ステップS193に
於けるストップコード検出ルーチンをコールし、ストッ
プコードの検出を行う(ステップS198)する。そし
て、ストップコードを検出したか否かを判断し(ステッ
プS199)、検出しなかった場合には(NO)、傾き
の再定義無しの情報を持って、リターンする。検出した
場合は(YES)、検出点の座標を図10に示すhに格
納し、hを定義する(ステップS200)。
Next, the detection start point q is determined (step S196). This point q is divided into four equal parts of the straight line I connecting the upper end point u of the left end and the lower end point v of the column of the right row indicator obtained by the above-mentioned indicator information determination routine, and divided into four equal parts along v from I. It is a point that has advanced the distance. Next, the data between the points q and q'is fetched (step S197).
A point q ′ is a point which extends from the point q in parallel with the x-axis and intersects a straight line of y = column number. Next, the stop code detection routine in step S193 is called to detect the stop code (step S198). Then, it is judged whether or not the stop code is detected (step S199), and when not detected (NO), the process returns with the information that the inclination is not redefined. If detected (YES), the coordinates of the detection point are stored in h shown in FIG. 10 and h is defined (step S200).

【0123】次に、詳細は後述するラベルの範囲検出の
ルーチンをコールし(ステップS201)、傾きの計算
を行なう(ステップS202)。そして、傾き再定義の
情報を持って、リターンする。
Next, a label range detection routine, which will be described in detail later, is called (step S201), and the inclination is calculated (step S202). Then, it returns with the information of the tilt redefinition.

【0124】前記ステップS193,S198でコール
されるストップコード検出ルーチンを、図31に示すフ
ローチャートを参照して説明する。このルーチンは基本
的に図16に示したスタートコード検出と同じである
が、図16とは、マッチングの部分が異なっている。こ
れは、PDF417のスタートコード22とステップコ
ード23それぞれの持つ幅情報が異なるためである。マ
ッチング法に関しては、前述したようにバーコードラベ
ルの印刷精度に影響されないマッチング方法が望まし
い。
The stop code detection routine called in steps S193 and S198 will be described with reference to the flow chart shown in FIG. This routine is basically the same as the start code detection shown in FIG. 16, but the matching part is different from that in FIG. This is because the start code 22 and the step code 23 of the PDF 417 have different width information. As for the matching method, it is desirable that the matching method is not affected by the printing accuracy of the barcode label as described above.

【0125】次に、図29の前記ステップS201でコ
ールされるラベルの範囲検出ルーチンについて、図32
に示すフローチャートを参照して説明する。まず、線分
f−hに平行な直線の方程式を定義、例えば、線分f−
hの方程式y=ax+bを求める(ステップS22
1)。
Next, the label range detection routine called in step S201 of FIG. 29 will be described with reference to FIG.
This will be described with reference to the flowchart shown in FIG. First, the equation of a straight line parallel to the line segment f-h is defined, for example, the line segment f-
An equation y = ax + b of h is obtained (step S22
1).

【0126】次に、この直線がストップビックバー23
Aをクロスするように、切片bを定義する(ステップS
222)。ストップコード23の構造は、例えば、8個
のバーでなるストップビックバー23Aと、3対の白バ
ーと黒バーと、3個の白バーの合計17個のバーで構成
されており、これを撮像した結果がN画素であったとす
る。また、方程式y=ax+bで表わされる直線は、切
片bを変化させることにより並行移動することが知られ
ている。
Next, this straight line is the stop big bar 23.
The intercept b is defined so as to cross A (step S
222). The structure of the stop code 23 is composed of, for example, a stop big bar 23A composed of eight bars, three pairs of white bars and black bars, and three white bars, for a total of 17 bars. It is assumed that the imaged result is N pixels. It is known that the straight line represented by the equation y = ax + b moves in parallel by changing the intercept b.

【0127】従って、ビックバー23Aをクロスする直
線を得るためには、前記線分f−hを{(17−8/
2)/17}×N画素分左に移動させるような切片bと
すれば良いことになる。
Therefore, in order to obtain a straight line that crosses the big bar 23A, the line segment f-h is set to {(17-8 /
2) / 17} × N pixels may be moved to the left by an intercept b.

【0128】こうしてストップビックバー23Aをクロ
スする直線が得られたならば、次に、その直線と画面を
定義する方程式との交点をそれぞれB,B′(図10参
照)とする(ステップS223)。
When a straight line crossing the stop big bar 23A is obtained in this way, next, the intersections of the straight line and the equations defining the screen are taken as B and B '(see FIG. 10) (step S223). .

【0129】そして、このラインB−B′の中点から点
Bに向けてデータを順に見ていき(ステップS22
4)、エッジが存在するか否かをチェックする(ステッ
プS225)。このチェックは、例えば、輝度変化を見
る強度比較、微分法、2次微分法、等により行なうこと
ができる。こうして、エッジが検出されたならば、その
検出座標を座標変数jに格納する(ステップS22
6)。即ち、検出座標を点jとする。
Then, the data is sequentially examined from the midpoint of this line BB 'toward the point B (step S22).
4) Then, it is checked whether or not there is an edge (step S225). This check can be performed by, for example, an intensity comparison for observing a change in luminance, a differential method, a second differential method, or the like. In this way, when the edge is detected, the detected coordinates are stored in the coordinate variable j (step S22).
6). That is, the detected coordinate is set to point j.

【0130】次に、前記ラインB−B′の中点から今度
は点B′に向けてデータを順に見ていき(ステップS2
27)、エッジが存在するか否かをチェックする(ステ
ップS228)。こうして、エッジが検出されたなら
ば、その検出座標を座標変数kに格納する(ステップS
229)。即ち、検出座標を点kとする。
Next, the data is sequentially examined from the midpoint of the line BB 'to the point B' (step S2).
27), it is checked whether or not an edge exists (step S228). In this way, when the edge is detected, the detected coordinate is stored in the coordinate variable k (step S
229). That is, the detected coordinate is set to the point k.

【0131】そして、座標変数f、hで示される点f、
hを通る直線に座標変数jで示される点jから垂線を下
ろし、その交点の座標を座標変数bに格納する(ステッ
プS230)。即ち、点jを通るラインB−B′と直交
する直線の方程式を求めて、それと点f,hを通る直線
の交点を求め、その交点を点bとする。
Then, the point f indicated by the coordinate variables f and h,
A perpendicular line is drawn from the point j indicated by the coordinate variable j on a straight line passing through h, and the coordinates of the intersection are stored in the coordinate variable b (step S230). That is, the equation of a straight line orthogonal to the line BB ′ passing through the point j is obtained, the intersection of the straight line passing through the points f and h is obtained, and the intersection is defined as the point b.

【0132】同様に、座標変数f,hで示される点f,
hを通る直線に座標変数kで示される点kから垂線を下
ろし、その交点の座標を座標変数cに格納する(ステッ
プS231)。即ち、点kを通るラインB−B′と直交
する直線の方程式を求めて、それと点f,hを通る直線
の交点を求め、その交点を点cとする。
Similarly, the points f, which are indicated by the coordinate variables f, h,
A perpendicular line is drawn from the point k indicated by the coordinate variable k on a straight line passing through h, and the coordinates of the intersection are stored in the coordinate variable c (step S231). That is, the equation of a straight line orthogonal to the line BB ′ passing through the point k is obtained, the intersection of the line passing through the points f and h is obtained, and the intersection is defined as the point c.

【0133】そして、こうして求めた座標変数bの値を
座標変数STOPTOPに、また座標変数cの値を座標
変数STOPBOTTOMにそれぞれ格納した後(ステ
ップS232)、図29の上位のルーチンへ戻る。
After storing the value of the coordinate variable b thus obtained in the coordinate variable STOPTOP and the value of the coordinate variable c in the coordinate variable STOPBOTTOM (step S232), the process returns to the upper routine of FIG.

【0134】次に、図29の前記ステップS202でコ
ールされるラベルの傾き再計算ルーチンについて、図3
3に示すフローチャートを参照して説明する。まず、座
標変数STOPTOPのy座標の値を、座標変数STO
PTOPのx座標の値から座標変数STARTTOPの
x座標の値を差し引いた結果の値で割り、また座標変数
STARTTOPのy座標の値を、座標変数STOPT
OPのx座標の値から座標変数STARTTOPのx座
標の値を差し引いた結果の値で割り、これら2つの商の
差を傾き変数Slope1に格納する(ステップS24
1)。
Next, the label inclination recalculation routine called in step S202 of FIG. 29 will be described with reference to FIG.
This will be described with reference to the flowchart shown in FIG. First, the value of the y coordinate of the coordinate variable STOPTOP is set to the coordinate variable STOP.
The value of the x coordinate of the coordinate variable STARTTOP is subtracted from the value of the x coordinate of PTOP, and the result is divided, and the value of the y coordinate of the coordinate variable STARTTOP is divided by the coordinate variable STOPT.
It is divided by the value of the result of subtracting the value of the x coordinate of the coordinate variable STARTTOP from the value of the x coordinate of OP, and the difference between these two quotients is stored in the slope variable Slope1 (step S24).
1).

【0135】次に、座標変数STOPBOTTOMのy
座標の値を、座標変数STOPBOTTOMのx座標の
値から座標変数STARTBOTTOMのx座標の値を
差し引いた結果の値で割り、また座標変数STARTB
OTTOMのy座標の値を、座標変数STOPBOTT
OMのx座標の値から座標変数STARTBOTTOM
のx座標の値を差し引いた結果の値で割り、これら2つ
の商の差を傾き変数Slope2に格納する(ステップ
S242)。
Next, y of the coordinate variable STOPBOTTOM
The coordinate value is divided by the result of subtracting the x coordinate value of the coordinate variable STARTBOTTOM from the x coordinate value of the coordinate variable STOPBOTTOM, and the coordinate variable STARTB
The y coordinate value of OTTOM is the coordinate variable STOPBOTT
From the value of the x coordinate of OM, the coordinate variable STARTBOTTOM
The value of the x-coordinate is subtracted, and the difference between these two quotients is stored in the slope variable Slope2 (step S242).

【0136】次に、傾き変数Slope1と前記ステッ
プS36で求めた傾き変数Slopeの差の絶対値が閾
値定数SLOPETHRESH1より小さく、且つ傾き
変数Slope2とSlopeの差の絶対値が閾値定数
SLOPETHRESH1より小さいか否かを判断する
(ステップS243)。ここで、図中のabsは絶対値
を意味する。前記ステップS243の命題が偽だった場
合には(NO)、再計算なしの情報をもってリターンす
る。そうでない場合は(YES)、前記変数Slope
1とSlope2の差の絶対値をとり、それが閾値定数
SLOPETHRESH2よりも大きいか否かを判断す
る(ステップS244)。
Next, it is determined whether the absolute value of the difference between the slope variable Slope1 and the slope variable Slope obtained in step S36 is smaller than the threshold constant SLOPETHRESH1, and the absolute value of the difference between the slope variables Slope2 and Slope is smaller than the threshold constant SLOPETHRESH1. It is determined (step S243). Here, abs in the figure means an absolute value. When the proposition in step S243 is false (NO), the information is returned without recalculation. Otherwise (YES), the variable Slope
The absolute value of the difference between 1 and Slope2 is taken, and it is determined whether or not it is larger than the threshold constant SLOPETHRESH2 (step S244).

【0137】このステップS244で絶対値の方が小さ
い場合には(NO)、ステップS250に移行し、大き
い場合には、次のステップS245に移行する。次に、
前記ステップS36で求めた傾き変数Slopeと前記
変数Slope1の差の絶対値を変数aに格納する(ス
テップS245)。次に、前記ステップS36で求めた
傾き変数Slopeと前記変数Slope2の差の絶対
値を変数bに格納する(ステップS246)。
If the absolute value is smaller in step S244 (NO), the process proceeds to step S250, and if the absolute value is larger, the process proceeds to next step S245. next,
The absolute value of the difference between the slope variable Slope calculated in step S36 and the variable Slope1 is stored in the variable a (step S245). Next, the absolute value of the difference between the slope variable Slope obtained in step S36 and the variable Slope2 is stored in the variable b (step S246).

【0138】そして前記変数bが前記変数aより大きい
か否かを判断する(ステップS247)。前記変数bが
大きい場合には(YES)、前記傾き変数Slopeに
Slope1を代入する(ステップS248)。前記変
数bが小さい場合は(NO)、前記傾き変数Slope
にSlope2を代入する(ステップS249)。ま
た、前記ステップS244で傾き変数SlopeとSl
ope2の差の絶対値が閾値定数よりも小さかった場合
には(NO)、傾き変数Slopeに傾き変数Slop
e1とSlope2の和を2で割ったもの、即ちSlo
pe1とSlope2の平均を代入する(ステップS2
50)。そして、再計算ありの情報を持ってリターンす
る。
Then, it is judged whether or not the variable b is larger than the variable a (step S247). When the variable b is large (YES), Slope1 is substituted for the slope variable Slope (step S248). If the variable b is small (NO), the slope variable Slope
Subset2 is substituted for (step S249). Also, in step S244, the slope variables Slope and Sl are
When the absolute value of the difference in ope2 is smaller than the threshold constant (NO), the slope variable Slope is set to the slope variable Slope.
The sum of e1 and Slope2 divided by 2, that is, Slo
Substitute the average of pe1 and Slope2 (step S2
50). And it returns with the information of recalculation.

【0139】以上S244〜S249の一連のステップ
では、図34に示すように、PDF417バーコードラ
ベルのスタートコード22もしくはストップコード23
のどちらか一方に欠損が存在し、ラベルの範囲が正しく
求まっていない場合を考慮している。図34の場合、直
線nの傾きSlope1とn′の傾きSlope2の値
は大きく違う。それを、このルーチンで検出し、図10
中の点e、gから計算したラベルの傾きSlopeに近
い値を新しい傾きとして採用している。このような方法
を用いることにより、スタートコード22もしくはスト
ップコード23のどちらか一方に欠損が存在した場合で
も、より正確なラベルの傾きを求めることができる。
In the series of steps S244 to S249, as shown in FIG. 34, the start code 22 or the stop code 23 of the PDF417 bar code label is displayed.
Considering the case where there is a deficiency in one of the two and the range of the label is not obtained correctly. In the case of FIG. 34, the values of the slope Slope1 of the straight line n and the slope Slope2 of the n'are significantly different. This is detected by this routine, and FIG.
A value close to the slope Slope of the label calculated from the inside points e and g is adopted as a new slope. By using such a method, even if there is a defect in either the start code 22 or the stop code 23, a more accurate label inclination can be obtained.

【0140】なお、前記ステップS243の判断が偽の
場合というのは、スタートコード22もしくはストップ
コード23のどちらか一方の上下に欠損がある場合であ
り、この場合には傾きの再計算は行なわない。
The case where the determination in step S243 is false means that there is a defect in the upper and lower sides of either the start code 22 or the stop code 23. In this case, the inclination is not recalculated. .

【0141】次に、図4の前記ステップS9でコールさ
れるスキャン方程式決定ルーチンについて、図36に示
すフローチャート及び図35に示すフレームメモリへの
投影像の図を参照して説明する。なお、図35は行スキ
ャンでスタートコード22が基準に選択された場合の例
を示している。
Next, the scan equation determination routine called in step S9 of FIG. 4 will be described with reference to the flow chart shown in FIG. 36 and the image projected on the frame memory shown in FIG. Note that FIG. 35 shows an example in which the start code 22 is selected based on the line scan.

【0142】即ち、まず変数counterを“0”に
初期化し(ステップS251)、また基準座標変数WO
RKをラベルのトップ座標変数TOPの値に初期化する
(ステップS252)。
That is, first, the variable counter is initialized to "0" (step S251), and the reference coordinate variable WO
RK is initialized to the value of the top coordinate variable TOP of the label (step S252).

【0143】次に、ラベルのボトム座標変数BOTTO
Mのy座標値とラベルのトップ座標変数TOPのy座標
値との差を、変数count endに代入する(ステ
ップS253)。即ち、決定しなければならないパター
ン数(図36の場合ではラベルの列方向の画素数)を求
め、変数count endに格納する。つまり、パタ
ーン数とは、ラベル全面を走査するための数である。
Next, the bottom coordinate variable BOTTO of the label
The difference between the y coordinate value of M and the y coordinate value of the top coordinate variable TOP of the label is the variable count. Substitute for end (step S253). That is, the number of patterns to be determined (the number of pixels in the label column direction in the case of FIG. 36) is calculated, and the variable count Store in end. That is, the number of patterns is a number for scanning the entire label surface.

【0144】次に、ラベルのトップ座標変数TOPのy
座標値に変数counterの値を加算し、その結果を
基準座標変数WORKのy座標値として代入する(ステ
ップS254)。また、ラベルの傾き変数Slopeの
値に基準座標変数WORKのy座標の値を乗じ、その結
果にラベルの切片変数intersectを加えて、そ
の結果を新たな基準座標変数WORKのx座標値として
代入する(ステップS255)。このように、変数co
unter値の増加にともない基準座標変数WORKを
再設定している。
Next, y of the top coordinate variable TOP of the label
The value of the variable counter is added to the coordinate value, and the result is substituted as the y coordinate value of the reference coordinate variable WORK (step S254). Also, the value of the label tilt variable Slope is multiplied by the value of the y coordinate of the reference coordinate variable WORK, the label intercept variable intersect is added to the result, and the result is substituted as the x coordinate value of the new reference coordinate variable WORK. (Step S255). Thus, the variable co
The reference coordinate variable WORK is reset with an increase in the unter value.

【0145】次に、この再設定された座標変数WORK
を通り、ラベルの傾き変数Slopeで示される傾きを
持つ直線Iを定義し(ステップS256)、この直線I
が画面枠交差する2点を求め、それぞれを座標変数の配
列DIM POINT P及びDIM POINT
のcounter番目(変数counterの値が示す
配列の番号)に格納する(ステップS257)。
Next, this reset coordinate variable WORK
A straight line I having a slope indicated by the slope variable Slope of the label is defined (step S256), and this straight line I
Finds two points that intersect with the screen frame POINT P and DIM POINT Q
(The array number indicated by the value of the variable counter) is stored (step S257).

【0146】その後、変数counter値をインクリ
メントし(ステップS258)、その結果の再設定され
た変数counter値が必要数、即ち変数count
er endに達したか否かをチェックする(ステップS
259)。必要数に達しない場合は(YES)、前記ス
テップS254に戻り、必要数に達した場合は(N
O)、ステップS260に移行する。以上の動作によっ
て、ラベルを順次走査する場合の始点と終点の組み合わ
せが定義される。
Then, the variable counter value is incremented.
(Step S258) and the result is reset.
Number of variable counter values required, that is, variable count
er It is checked whether or not end has been reached (step S
259). If the required number is not reached (YES),
Return to step S254, and if the required number is reached (N
O), the process proceeds to step S260. By the above operation
Combination of start and end points when scanning labels sequentially
The case is defined.

【0147】次に、再度変数counterを“0”に
初期化する(ステップS260)、そして、ラベルの傾
き変数Slopeの値に変数counter値を乗じる
ことにより、計算されているラベルの傾きSlopeの
位置による増加分が計算され、この計算結果を変数の配
列LINE INCの所定の位置(変数counter
で示される位置)に格納する(ステップS261)。
Next, the variable counter is initialized to "0" again (step S260), and the value of the label slope variable Slope is multiplied by the variable counter value to calculate the position of the label slope Slope calculated. Is calculated, and the result of this calculation is the array LINE of variables. Predetermined position of INC (variable counter
(S261).

【0148】その後、変数counterをインクリメ
ントした後(ステップS262)、この再設定された変
数counterが配列の最大サイズ定数MAX NU
Mに達したか否かをチェックする(ステップS26
3)。達していない場合は(YES)、前記ステップS
261に戻り、達した場合には(NO)、図4のルーチ
ンにリターンする。
Then, after incrementing the variable counter (step S262), the reset variable counter is the maximum size constant MAX of the array. NU
It is checked whether M has been reached (step S26).
3). If not reached (YES), the step S
Returning to step 261, and when reaching (NO), the routine returns to the routine of FIG.

【0149】前述したステップS260からステップS
263のループによって、ラベル情報を1ライン取り込
む場合の傾きパターンが得られる。なお、前記配列の最
大サイズ定数MAX NUMは、プログラム作成時に定
める変数のサイズを示すもので、例えば、フレームメモ
リ6のサイズが“640×480画素”であると仮定す
れば、“1000程”とっておけば良い。
From step S260 to step S described above.
By the loop of 263, an inclination pattern when one line of label information is taken in is obtained. The maximum size constant MAX of the array NUM indicates the size of a variable determined when the program is created. For example, assuming that the size of the frame memory 6 is “640 × 480 pixels”, “NUM” may be set.

【0150】次に、図4の前記ステップS10でコール
される埋め込チェックルーチンについて、図37に示す
フローチャート及び図38に示すフレームメモリへの投
影像の図を参照して説明する。なお、図38は、行スキ
ャンでスタートコード22が基準に選択された場合の例
を示している。またラベルサイズは、“4×3”である
ものとする。
Next, the embedding check routine called in step S10 of FIG. 4 will be described with reference to the flow chart shown in FIG. 37 and the image projected onto the frame memory shown in FIG. Note that FIG. 38 shows an example in which the start code 22 is selected as a reference in the line scan. The label size is “4 × 3”.

【0151】まず、後述するROW検出ルーチンをコー
ルし、ラベルをスキャンした場合、最初と最後に見つか
るロウの各種情報(検出ライン番号、コードの長さ、ロ
ウ番号、検出位置等)を検出し(ステップS271)、
それぞれ変数ROW FIRST,ROW LASTに
格納する。
First, when a ROW detection routine, which will be described later, is called to scan the label, various information (detection line number, code length, row number, detection position, etc.) of the row found at the beginning and end is detected ( Step S271),
Variable ROW FIRST, ROW Store in LAST.

【0152】次に、変数ROW FIRSTとROW
LASTとも確定したか否かを判断し(ステップS27
2)、確定したならば(YES)、ステップS273に
移行する。しかし確定しないならば(NO)、デコード
不可能として、図4の上位ルーチンにリターンする。
Next, the variable ROW FIRST and ROW
It is determined whether or not LAST is also confirmed (step S27).
2) If determined (YES), move to step S273. However, if it is not decided (NO), it is determined that decoding is not possible, and the process returns to the upper routine of FIG.

【0153】こうして、前記ステップS272で変数R
OW FIRSTとROW LASTとも確定している
ならば(YES)、コードワードマトリックスの各コー
ドの先頭位置座標を推定し、2次元配列変数CODE
POSのそれぞれのコードのロウ番号,カラム番号番目
に格納する(ステップS273)。ここで、各コードワ
ード先頭座標位置の推定は、図38に示すように、ラベ
ルの傾きと、最初と最後に見つかるロウの検出ライン番
号,コードの長さ,ロウ番号,検出位置、更にマトリッ
クスサイズ(ROW NUMBER×COLUMN
UMBER)などから決めることができる。
Thus, in step S272, the variable R
OW FIRST and ROW If LAST is also determined (YES), the head position coordinates of each code in the codeword matrix are estimated, and the two-dimensional array variable CODE
It is stored in the row number and column number th of each code of the POS (step S273). Here, as shown in FIG. 38, the estimation of the head coordinate position of each codeword is performed by the inclination of the label, the detection line number of the row found at the beginning and the end, the code length, the row number, the detection position, and the matrix size. (ROW NUMBER × COLUMN N
UMBER) and so on.

【0154】次に、前記ステップで推定された座標のう
ち画面外にコードがはみ出してしまう恐れのあるものの
個数を集計し、変数error numに格納する(ス
テップS274)。図38に示す例では、(ロウ番号,
カラム番号)=(0,2)、(1,2)、(2,2)、
(3,1)、(3,2)の5個のコードが読取不能と判
断され、error numに5が格納される。
Next, among the coordinates estimated in the above step, the number of those that may cause the code to spill out of the screen is totaled, and the variable error is stored. It is stored in num (step S274). In the example shown in FIG. 38, (row number,
Column number) = (0,2), (1,2), (2,2),
Five codes of (3, 1) and (3, 2) are determined to be unreadable, and error 5 is stored in num.

【0155】更に、前記error numが図27の
前記ステップS180で求めた修復可能コード数の変数
REST NUMと比較し(ステップS275)、er
ror numがREST NUM以下であれば(YE
S)、デコード可能として図4の上位ルーチンにリター
ンする。一方、error numがREST NUM
を越えている場合は(NO)、デコード不可能として図
4の上位ルーチンにリターンする。
Further, the error num is the variable REST of the repairable code number obtained in step S180 of FIG. Compare with NUM (step S275), er
ror num is REST If NUM or less (YE
S), decoding is possible and the process returns to the upper routine of FIG. On the other hand, error num is REST NUM
If it exceeds (NO), it is determined that decoding is not possible, and the process returns to the upper routine of FIG.

【0156】このようなルーチンにより、各コードの位
置を推定することができ、また画面外と推定されるコー
ド数をカウントできるため、デコード可能か否かをこの
段階で判断することが出来る。これにより、長い時間処
理を行ったにも係わらず、デコードされないという最悪
のパターンは激減する。
With such a routine, the position of each code can be estimated, and the number of codes estimated to be outside the screen can be counted. Therefore, it is possible to determine at this stage whether decoding is possible. This drastically reduces the worst pattern of not being decoded despite having been processed for a long time.

【0157】次に、図37の前記ステップS271でコ
ールされるROW検出ルーチンについて、図39に示す
フローチャート及び図36に示すフレームメモリへの投
影像の図を参照して説明する。
Next, the ROW detection routine called in step S271 of FIG. 37 will be described with reference to the flowchart of FIG. 39 and the diagram of the projected image on the frame memory shown in FIG.

【0158】まず、ラベルのボトム座標変数BOTTO
Mのy座標値とラベルのトップ座標変数TOPのy座標
値との差、つまりラベルのy方向の画素数を計算し、そ
の計算結果を変数pos numに格納する(ステップ
S281)。
First, the bottom coordinate variable BOTTO of the label
The difference between the y coordinate value of M and the y coordinate value of the top coordinate variable TOP of the label, that is, the number of pixels in the y direction of the label is calculated, and the calculation result is the variable pos. It is stored in num (step S281).

【0159】次に、変数incの値を“1”に(ステッ
プS282)、変数counterの値を“0”に(ス
テップS283)、変数endの値を前記ステップS2
82もしくはS283で求めたpos numとする
(ステップS284)。
Next, the value of the variable inc is set to "1" (step S282), the value of the variable counter is set to "0" (step S283), and the value of the variable end is set to the step S2.
82 or pos obtained in S283 num (step S284).

【0160】そして、前記ステップS282からS28
4で求めた各変数(初期値counter,増分in
c,終了位置end)を用いて、後述するROW番号検
出ルーチンをコールする(ステップS285)。正しく
インディケータ情報からロウ番号を検出できた場合は、
変数ROW POSに検出ライン番号,コード長さ,ロ
ウ番号,検出位置などの情報が格納される。
Then, from the steps S282 to S28.
Each variable (initial value counter, increment in
c, end position end), a ROW number detection routine described later is called (step S285). If you can correctly detect the row number from the indicator information,
Variable ROW Information such as the detection line number, code length, row number, and detection position is stored in the POS.

【0161】即ち、前記ルーチンで正しくインディケー
タ情報からロウ番号を検出できたか否かを判断し(ステ
ップS286)、検出された場合は(YES)、ステッ
プS287へ移行し、検出できなかった場合は(N
O)、デコード不可能として上位ルーチンに戻る。
That is, it is determined whether or not the row number can be correctly detected from the indicator information in the above routine (step S286), and if detected (YES), the process proceeds to step S287, and if not detected ( N
O), the decoding is not possible and the process returns to the upper routine.

【0162】次に、前記ステップS285で求められた
データROW POSをROW FIRSTに格納する
(ステップS287)。即ち、前記ステップS282か
らS287でラベルのTOPからBOTTOMに向かっ
てスキャンラインを次々設定し、最初に検出されたイン
ディケータ位置がROW FIRSTに格納される。
Next, the data ROW obtained in the above step S285. POS to ROW It is stored in FIRST (step S287). That is, in steps S282 to S287, scan lines are sequentially set from the TOP of the label toward the BOTTOM, and the first detected indicator position is ROW. Stored in FIRST.

【0163】更に、前記S288からS293までは、
ラベルをBOTTOMからTOPに向かって、スキャン
ラインを次々設定し、最初に検出されたインディケータ
位置がROW LASTに格納される。
Further, from S288 to S293,
The scan line is set one after another from BOTTOM to TOP, and the first detected indicator position is ROW. Stored in LAST.

【0164】このようなルーチンにより、ロウの一部が
処理不能(例えば画面外にとび出しているとか)になっ
ているか否かが分かるわけである。なぜなら、ロウ数4
のラベルで、ROW FIRSTでロウ番号0が検出さ
れ、ROW LASTでロウ番号2が検出された場合、
ロウ番号3は検出不能であるので、処理できないのが分
かる。
By such a routine, it is possible to know whether or not a part of the row cannot be processed (for example, it is projected outside the screen). Because the number of rows is 4
With the label ROW Row number 0 is detected by FIRST, and ROW If row number 2 is detected in LAST,
It can be seen that row number 3 cannot be processed because it cannot be detected.

【0165】次に、図39の前記ステップS285でコ
ールされるROW番号検出ルーチンについて、図40に
示すフローチャートを参照して説明する。まず、現在の
変数counter値に於ける走査始点及び終点を前記
座標変数の配列DIM POINT P,DIM PO
INT Qから求め、x方向増分を“1”且つy方向増
分を前記傾き増分配列LINE INCで、フレームメ
モリ6から画像データを1ライン取出して、取り込みバ
ッファ配列scan lineに格納し、そのデータの
個数を変数numに格納する(ステップS301)。
Next, the ROW number detection routine called in step S285 in FIG. 39 will be described with reference to the flowchart shown in FIG. First, the scanning start point and the end point in the current variable counter value are set to the coordinate variable array DIM. POINT P, DIM PO
INT The increment in the x direction is "1" and the increment in the y direction is obtained from Q. With INC, one line of image data is taken out from the frame memory 6, and the fetch buffer array scan It is stored in the line, and the number of the data is stored in the variable num (step S301).

【0166】そして、後述する幅情報に変換ルーチンを
コールして(ステップS302)、この取り出したデー
タを幅情報に変換する。次に、この幅情報を元に、不図
示バーコード表と一致する部分をコードに変換し、その
情報の中からインディケータ情報を抽出し保存する(ス
テップS303)。ここで、インディケータ情報が読め
たか否かを判断し(ステップS304)、読めなかった
場合は(NO)、その後、変数counterを増分、
即ち前記間隔変数incの値で再設定し(ステップS3
05)、この再設定された変数counter値が、前
記変数end、つまり、ラベル範囲を越えるか否かを判
断する(ステップS306)。ここで越えない場合は
(NO)、前記ステップS301に戻り、越える場合は
(YES)、デコード不能と判断し、図39の上位ルー
チンにリターンする。
Then, a conversion routine for width information, which will be described later, is called (step S302) to convert the fetched data into width information. Next, based on this width information, the part that matches the bar code table (not shown) is converted into a code, and the indicator information is extracted from that information and saved (step S303). Here, it is determined whether or not the indicator information can be read (step S304), and if it cannot be read (NO), the variable counter is incremented,
That is, it is reset with the value of the interval variable inc (step S3
05), it is determined whether or not the reset variable counter value exceeds the variable end, that is, the label range (step S306). If not exceeded (NO), the process returns to step S301, and if exceeded (YES), it is determined that decoding is impossible, and the process returns to the upper routine of FIG.

【0167】一方、前記ステップS304の判断で、読
めたと判断した場合は(YES)、その時の検出ライン
番号とコード長さとロウ番号と検出位置を変数ROW
POSに格納し(ステップS307)、デコード可能と
して、図39の上位ルーチンにレターンする。従って、
このルーチンに入ってから最初に検出されたインディケ
ータの各種情報をROW POSに格納することにな
る。
On the other hand, if it is determined in step S304 that the data can be read (YES), the detection line number, code length, row number, and detection position at that time are set as variables ROW.
It is stored in the POS (step S307), the decoding is possible, and the process returns to the upper routine of FIG. Therefore,
ROW the various information of the indicator detected first after entering this routine It will be stored in the POS.

【0168】次に、図4の前記ステップS13でコール
される最適スキャンルーチンについて、図41に示すフ
ローチャート及び図42に示すフレームメモリへの投影
像の図を参照して説明する。
Next, the optimum scan routine called in step S13 of FIG. 4 will be described with reference to the flow chart shown in FIG. 41 and the image projected on the frame memory shown in FIG.

【0169】まず、ラベルのインディケータ情報変数R
OW LASTの検出位置y座標値とROW FIRS
Tの検出位置y座標値との差、つまりラベルのy方向の
画素数を計算し、その計算結果を変数endに格納する
(ステップS311)。
First, the indicator information variable R of the label
OW LAST detection position y coordinate value and ROW FIRS
The difference between the detected position y coordinate value of T, that is, the number of pixels in the y direction of the label is calculated, and the calculation result is stored in the variable end (step S311).

【0170】次に、この変数endの値をラベルの行数
(変数ROW LASTのロウ番号−変数ROW FI
RSTのロウ番号の絶対値)で割ることにより、図42
に示すように各行の中心を一度だけ走査するための間隔
を計算し、それを変数incに格納する(ステップS3
12)。そして、変数ROW FIRSTの検出ライン
番号を変数counterの初期値とする(ステップS
313)。
Next, the value of this variable end is set to the number of label lines (variable ROW). LAST row number-variable ROW FI
42 by dividing by the absolute value of the RST row number.
As shown in, the interval for scanning the center of each row only once is calculated and stored in the variable inc (step S3
12). And the variable ROW The detection line number of FIRST is set as the initial value of the variable counter (step S
313).

【0171】次に、現在の変数counter値に於け
る走査始点及び終点を前記座標変数の配列DIM PO
INT P,DIM POINT Qから求め、x方向
増分を“1”且つy方向増分を前記傾き増分配列LIN
INCで、フレームメモリ6から画像データを1ラ
イン取出して、それを取り込みバッファ配列scan
ineに格納し、またそのデータの個数を変数numに
格納する(ステップS314)。
Next, in the current variable counter value
An array DIM of the coordinate variables for the scanning start point and the end point PO
INT P, DIM POINT Obtained from Q, x direction
The increment is "1" and the y-direction increment is the gradient increment array LIN.
E With INC, image data from frame memory 6
In take out and take it in buffer array scan l
It is stored in ine, and the number of data is stored in the variable num.
It is stored (step S314).

【0172】そして、後述する前記ステップS302と
同じ、幅情報に変換ルーチンをコールして(ステップS
315)、この取り出したデータを幅情報に変換する。
次に、この幅情報を元に、不図示バーコード表と一致す
る部分をコードに変換し、その情報を保存する(ステッ
プS316)。
Then, the same as in step S302 described later, the conversion routine is called for the width information (step S302).
315), The extracted data is converted into width information.
Next, based on this width information, the part that matches the bar code table (not shown) is converted into a code and the information is saved (step S316).

【0173】その後、変数counterを増分、即ち
前記間隔変数incの値で再設定し(ステップS31
7)、この再設定された変数counter値が、前記
変数endつまりラベル範囲を越えるか否かを判断する
(ステップS318)。この判断で越えない場合は(Y
ES)、前記ステップS314に戻り、越える場合は
(NO)、格納されたコード情報がラベルに記述されて
いる情報が完全に復号可能か否かを判断する(ステップ
S318)。復号可能の場合は(YES)、デコード可
能の情報を持って図4の上位ルーチンへリターンする。
しかし復号不可能の場合は(NO)、デコード不可能の
情報を持って図4の上位ルーチンへリターンする。
Thereafter, the variable counter is incremented, that is, reset with the value of the interval variable inc (step S31).
7) It is determined whether or not the reset variable counter value exceeds the variable end, that is, the label range (step S318). If this judgment does not exceed (Y
ES), the process returns to step S314, and if it exceeds (NO), it is determined whether or not the information described in the label of the stored code information is completely decodable (step S318). If it is decodable (YES), it returns to the higher-level routine of FIG. 4 with the decodable information.
However, if the decoding is not possible (NO), the process returns to the upper routine of FIG. 4 with the information that the decoding is not possible.

【0174】次に、図4の前記ステップS14でコール
されるインテリジェントスキャンルーチンについて、図
43に示すフローチャートを参照して、説明する。この
スキップスキャンルーチンは、前記最適スキャンで取り
こぼしたコード位置のみをスキャンするルーチンであ
る。
Next, the intelligent scan routine called in step S14 of FIG. 4 will be described with reference to the flow chart shown in FIG. This skip scan routine is a routine for scanning only the code positions missed in the optimum scan.

【0175】まず、最適スキャンで埋め込むことの出来
なかったコードワードのうち、画面内と思われるコード
数をiと定義する(ステップS321)。さらに、その
各コードのロウ番号とカラム番号をそれぞれ配列RとC
に格納する(ステップS322)。以上より、最適スキ
ャンで埋め込むことの出来なかったコードワードの個数
とその位置が求められる。この位置は、後述するよう
に、カラム番号とロウ番号が分かれば、前記ステップS
10で求めたCODE POSよりその座標が分かる。
First, of the codewords that could not be embedded in the optimum scan, the number of codes considered to be in the screen is defined as i (step S321). In addition, the row number and column number of each code are assigned to arrays R and C, respectively.
(Step S322). From the above, the number of codewords that could not be embedded in the optimum scan and their positions are obtained. If the column number and the row number are known, this position is set in the step S
CODE obtained in 10 The coordinates can be known from the POS.

【0176】次に、変数counterと傾きパターン
カウンターnを“0”に初期化する(ステップS32
3)。そして、counter番目の未検出場所の座標
CODE POS[[R[counter]][C[c
ounter]]を通り、Slope+dt[n]の傾
きを持つ直線Iを定義する(ステップS324)。この
直線Iが画面枠とクロスする点W3,W4を定義し、線
分W3−W4上の画像データを取り込む(ステップS3
25)。
Next, the variable counter and the inclination pattern counter n are initialized to "0" (step S32).
3). Then, the coordinate CODE of the counterth undetected place POS [[R [counter]] [C [c
a straight line I having a slope of Slope + dt [n] is defined (step S324). Points W3 and W4 at which this straight line I crosses the screen frame are defined, and the image data on the line segment W3-W4 is captured (step S3).
25).

【0177】そして、後述する前記ステップS302と
同じ、幅情報に変換ルーチンをコールして(ステップS
326)、この取り出したデータを幅情報に変換する。
次に、この幅情報を元に、当該バーコードの用途に応じ
て予め決められた不図示バーコード表と一致する部分を
コードに変換し、その情報を保存する(ステップS32
7)。
Then, the same as in step S302 described later, the conversion routine is called for the width information (step S302).
326), and convert the extracted data into width information.
Next, based on this width information, a portion corresponding to a bar code table not shown, which is predetermined according to the intended use of the bar code, is converted into a code and the information is stored (step S32).
7).

【0178】さらに前記ステップS324からステップ
S326で狙った場所のコードが埋めこめたか否かを判
断する(ステップS328)。この判断で埋めこめなか
った場合には(NO)、傾きパターンカウンターnをイ
ンクリメントし(ステップS329)、それが傾きパタ
ーン数N PAT(例えば傾きの種類を10種類予め配
列dtに用意しておく場合は“10”に設定)未満か否
かをチェックし(ステップS330)、未満の場合は前
記ステップS324へ戻り、以上の場合はスップS33
1へ移行する。
Further, it is judged whether or not the code at the target location in steps S324 to S326 has been embedded (step S328). If it is not embedded in this judgment (NO), the inclination pattern counter n is incremented (step S329), and the inclination pattern number N is obtained. It is checked whether or not it is less than PAT (for example, if 10 types of inclination are prepared in the array dt in advance, set to “10”) (step S330). If less, return to step S324, and if it is more than Is S33
Move to 1.

【0179】前記ステップS328で埋めこめたと判断
した場合(YES)、あるいは傾きパターンカウンター
nが傾きパターン数N PAT以上の場合は、変数co
unterをインクリメントし、傾きパターンカウンタ
nを“0”に再設定する(ステップS331)。この再
設定された変数counter値が、前記変数iつまり
最適スキャンで埋め込むことの出来なかったコードワー
ドのうち、画面内と思われるコード数を越えるか否かを
チェックする(ステップS332)。越えない場合は
(YES)、前記ステップS324に戻り、越える場合
は(YES)、格納されたコード情報がラベルに記述さ
れている情報を、完全に復号可能か否かを判断する(ス
テップS333)。
If it is determined that the pattern has been embedded in step S328 (YES), or if the inclination pattern counter n indicates the number of inclination patterns N. If PAT or higher, the variable co
Unter is incremented, and the inclination pattern counter n is reset to "0" (step S331). It is checked whether or not the reset variable counter value exceeds the number of codes considered to be in the screen among the variable i, that is, the code words that cannot be embedded in the optimum scan (step S332). If it does not exceed (YES), the process returns to step S324, and if it exceeds (YES), it is determined whether the information described in the label of the stored code information can be completely decoded (step S333). .

【0180】この判断で、復号可能の場合は(YE
S)、デコード可能の情報を持って図4の上位のルーチ
ンへリターンする。しかし復号不可能の場合は(N
O)、デコード不可能の情報を持って図4の上位ルーチ
ンへリターンする。
If the result of this determination is that decoding is possible (YE
S), and returns to the upper routine of FIG. However, if decryption is not possible (N
O), and returns to the upper routine of FIG. 4 with the information that cannot be decoded.

【0181】従って、ステップS324からステップS
332において、最適スキャンで埋め込むことの出来な
かったコードワードのうち、画面内と思われるコード毎
に、複数種類の傾きで画像データを取り込み、そのコー
ドを確定しようとしている。これにより、必要な部分の
みを取り込む操作となるため、最小のトライ数でコード
ワードマトリクッスが確定される。
Therefore, from step S324 to step S
In 332, of the codewords that could not be embedded in the optimum scan, the image data is taken in at a plurality of types of inclinations for each code that seems to be in the screen, and the code is being decided. As a result, only the necessary part is fetched, and the codeword matrix is determined with the minimum number of tries.

【0182】次に、前記ステップS302若しくはステ
ップS326で、コールされる幅情報に変換ルーチンに
ついて、図44及び図45に一連のフローチャートを参
照して説明する。
Next, the conversion routine to the width information called in step S302 or step S326 will be described with reference to a series of flowcharts in FIGS.

【0183】このルーチンは、基本的に図17及び図1
8で説明したルーチンと同一のものであるが、ステップ
S95とステップS355の部分だけが異なる。即ち、
図17及び図18のルーチンでは、スタートコード22
で検出するのみの目的であったため、幅情報は、WID
TH NUM個求めれば良かったが、図44及び図45
のルーチンでは、ラベルの全ての情報が必要であるか
ら、幅は全て求めなければいけない。そこで、ステップ
S355では、前記ステップS95に見られたjに関す
る判断は取り除くようにする。
This routine is basically the same as that shown in FIGS.
Although it is the same as the routine described in step 8, only steps S95 and S355 are different. That is,
In the routine of FIGS. 17 and 18, the start code 22
The width information is WID
TH It would have been better to obtain NUM pieces, but FIG. 44 and FIG.
In this routine, all the information on the label is needed, so the width must be calculated. Therefore, in step S355, the judgment regarding j found in step S95 is removed.

【0184】なお、本発明の前記実施例に限定されるも
のではなく、種々の変形実施が可能なことは勿論であ
る。例えば、2次元撮像装置5は、2次元CCDや撮像
管に代表されるエリアセンサを用いたものに限定される
ものでなく、1次元撮像素子と1次元スキャン機構の組
み合せや、光電検出器と2次元スキャン機構の組み合せ
でも良い。
It is needless to say that the present invention is not limited to the above-mentioned embodiment and various modifications can be made. For example, the two-dimensional image pickup device 5 is not limited to one using an area sensor represented by a two-dimensional CCD or an image pickup tube, but may be a combination of a one-dimensional image pickup device and a one-dimensional scan mechanism, or a photoelectric detector. A combination of two-dimensional scanning mechanisms may be used.

【0185】また、前記説明に於いては、バーコードラ
ベルにPDF−417フォーマットのラベルを用いた
が、これに限定されるものでなく、Code49等、他
のスタックドバーコードや、JAN等の1次元バーコー
ドでも良い。
Further, in the above description, the label of the PDF-417 format is used as the bar code label, but the bar code label is not limited to this, and other stacked bar codes such as Code 49, JAN, etc. Dimensional barcodes are also acceptable.

【0186】以上の実施例に基づいて説明したが、本明
細書には、以下のような発明も含まれる。 (1) バーとスペースとからなるバーコードを2次元
像として撮像する撮像手段と、前記撮像手段により得ら
れた2次元像を一時的に記憶する記憶手段と、前記撮像
手段から該記憶手段に撮像画像を転送する転送手段と、
前記撮像手段により得られたバーコードの2次元像か
ら、バーコードシンボルの有無を自動認識する認識手段
と、前記撮像手段により得られたバーコードの2次元像
から、バーコードシンボルの位置を認識する位置認識手
段と、前記撮像手段により得られたバーコードの2次元
像から前記バーコードの情報を順次読み取る読取手段
と、前記読取手段からのバーコードの情報から、元の情
報に復号する復号手段と、を具備してなることを特徴と
するシンボル情報読取装置。
Although described based on the above embodiments, the present invention includes the following inventions. (1) Image capturing means for capturing a two-dimensional image of a bar code including a bar and a space, storage means for temporarily storing the two-dimensional image obtained by the image capturing means, and the image capturing means to the storage means. Transfer means for transferring the captured image,
A recognition means for automatically recognizing the presence or absence of a barcode symbol from the two-dimensional image of the barcode obtained by the image pickup means, and a position of the barcode symbol from the two-dimensional image of the barcode obtained by the image pickup means. Position recognizing means, reading means for sequentially reading the barcode information from the two-dimensional image of the barcode obtained by the image pickup means, and decoding for decoding the barcode information from the reading means to the original information. A means for reading symbol information, comprising:

【0187】従って、バーとスペースとからなるバーコ
ードを2次元像として撮像し、得られた2次元像を一時
的に記憶し、撮像画像を記憶手段に転送し、バーコード
シンボルの有無を自動認識し、バーコードシンボルの位
置を認識し、バーコードの情報を順次読み取り、バーコ
ードの情報から、元の情報に復号する。
Therefore, a bar code consisting of a bar and a space is picked up as a two-dimensional image, the obtained two-dimensional image is temporarily stored, the picked-up image is transferred to the storage means, and the presence or absence of the bar code symbol is automatically detected. Recognizing, recognizing the position of the bar code symbol, sequentially reading the bar code information, and decoding the bar code information to the original information.

【0188】(2) 前記第1項において、認識手段
は、移動しているバーコードの2次元像を、撮像手段に
より得られる撮像画面のバーコード情報読み取り可能な
位置で認識するシンボル情報読取装置。
(2) In the first item, the recognition means recognizes the two-dimensional image of the moving barcode at a position where the barcode information can be read on the image pickup screen obtained by the image pickup means. .

【0189】従って、移動しているバーコードの2次元
像を、撮像手段により得られる撮像画面のバーコード情
報読み取り可能な位置で認識する。よって効果は、移動
しているバーコードラベルを読み取る際に、バーコード
ラベルが完全に画像内に入っている場合にのみ読取処理
に進ようにしたので、画像からはみ出しているバーコー
ドを読みに行くようなことはなく、高速に読取が行なえ
て、尚且つ信頼性を上げることができることである。
Therefore, the two-dimensional image of the moving bar code is recognized at the position where the bar code information can be read on the image pickup screen obtained by the image pickup means. Therefore, the effect is that when reading a moving bar code label, it will proceed to the reading process only when the bar code label is completely inside the image, so the bar code protruding from the image will be read. There is no need to go, high-speed reading can be performed, and reliability can be improved.

【0190】(3) 前記第1項において、転送手段
は、撮像手段により撮像された2次元像を圧縮して転送
するシンボル情報読取装置。従って、撮像手段により撮
像された2次元像を圧縮して転送する。
(3) In the first item, the transfer means compresses and transfers the two-dimensional image picked up by the image pickup means. Therefore, the two-dimensional image picked up by the image pickup means is compressed and transferred.

【0191】よって、効果は、対象画像を圧縮してフレ
ームメモリ6に転送するので、処理する画素数が少なく
なり、バーコードシンボル情報を高速に読み取ることが
可能となることである。
Therefore, the effect is that since the target image is compressed and transferred to the frame memory 6, the number of pixels to be processed is reduced and the barcode symbol information can be read at high speed.

【0192】(4) 前記第3項において、転送手段
は、撮像した2次元像の1つのフィールド成分のみを記
憶手段に転送するシンボル情報読取装置。従って、従っ
て撮像した2次元像の1つのフィールド成分のみを記憶
手段に転送する。
(4) In the above-described item 3, the transfer means transfers only one field component of the captured two-dimensional image to the storage means. Therefore, only one field component of the captured two-dimensional image is transferred to the storage means.

【0193】よって、効果は対象画像に対しバーコード
ラベル像が占める割合が大きくて、バーコードラベルの
1行の高さが十分な場合には、フレームメモリにフィー
ルド画像のみを転送し、読取処理を行なうため安価なイ
ンタレース型撮像素子でバーコード情報を読み取ること
ができることである。フィールド画像は偶数成分奇数成
分のどちらでもかまわない。
Therefore, the effect is that the barcode label image occupies a large proportion of the target image, and when the height of one line of the barcode label is sufficient, only the field image is transferred to the frame memory and the reading process is performed. Therefore, the bar code information can be read by an inexpensive interlaced image sensor. The field image may have either an even component or an odd component.

【0194】(5) 前記第2項において、転送手段
は、撮像した2次元像の2つのフィールド成分を別々に
記憶手段に転送するシンボル情報読取装置。従って、撮
像した2次元像の2つのフィールド成分を別々に記憶手
段に転送する。
(5) In the above-described item (2), the transfer means transfers the two field components of the captured two-dimensional image to the storage means separately. Therefore, the two field components of the captured two-dimensional image are separately transferred to the storage means.

【0195】よって、効果は、対象画像に対しバーコー
ドラベル像が占める割合が小さくて、バーコードラベル
の1行の高さが十分でない場合には、2つのフィールド
画像(偶数成分と奇数成分)を1つのフレームメモリに
別々に取り込み、1つのフィールド画像に対し読取処理
を行ない、それが失敗した場合にはもう1つのフィール
ド画像に対し読取処理を行ない、読取の信頼性を上げる
ことができることである。
Therefore, the effect is that when the ratio of the barcode label image to the target image is small and the height of one line of the barcode label is not sufficient, two field images (even component and odd component) are displayed. It is possible to increase the reliability of reading by loading the image data into one frame memory separately, performing the reading process for one field image, and if that fails, performing the reading process for the other field image. is there.

【0196】(6) 前記第2項において、読み取り手
段は、記憶手段により記憶された1つのフィールド成分
に対し読み取り処理を行ない、処理が失敗したときは記
憶手段により記憶された別のフィールド成分に対し再度
読み取り処理に行く処理操作を含み、バーコード情報を
読み取るシンボル情報読取装置。
(6) In the second item, the reading means performs a reading process on one field component stored by the storage means, and when the processing fails, another reading is performed on another field component stored by the storage means. A symbol information reading device for reading barcode information, including a processing operation for going to the reading process again.

【0197】従って、記憶手段により記憶された1つの
フィールド成分に対し読み取り処理を行ない、処理が失
敗したときは記憶手段により記憶された別のフィールド
成分に対し再度読み取り処理に行く処理操作を含み、バ
ーコード情報を読み取る。
Therefore, a reading operation is performed on one field component stored by the storage means, and when the processing fails, another reading operation is performed again on another field component stored by the storage means. Read barcode information.

【0198】よって、(5)項と同様の効果が得られる (7) 前記第2項において、転送手段は、撮像手段に
より撮像された2次元像のフィールド成分の1スキャン
ラインを転送した後、記憶手段の1ラインを空けてまた
スキャンラインを転送し、1フィールド分の画像情報を
転送するまでそれを繰り返し、終了後に空いているライ
ンにそのラインの1ライン上または下のラインの画像情
報を複写をする処理操作を含み、転送するシンボル情報
読取装置。
Therefore, the same effect as the item (5) can be obtained. (7) In the second item, the transfer means transfers one scan line of the field component of the two-dimensional image picked up by the image pickup means, The scan line is transferred again after leaving one line of the storage means, and this is repeated until the image information for one field is transferred, and after the end, the image information of one line above or below that line is added to the vacant line. A symbol information reader including a processing operation for copying and transferring.

【0199】従って、撮像手段により撮像された2次元
像のフィールド成分の1スキャンラインを転送した後、
記憶手段の1ラインを空けてまたスキャンラインを転送
し、1フィールド分の画像情報を転送するまでそれを繰
り返し、終了後に空いているラインにそのラインの1ラ
イン上または下のラインの画像情報を複写をする処理操
作を含み、転送する。
Therefore, after transferring one scan line of the field component of the two-dimensional image picked up by the image pickup means,
The scan line is transferred again after leaving one line of the storage means, and this is repeated until the image information for one field is transferred, and after the end, the image information of one line above or below that line is added to the vacant line. Includes processing operations for copying and transfers.

【0200】よって、効果は、1つのフィールド画像を
1行ずつ間隔を置いてフレームメモリ6に取り込み、空
いている行にその1行のフレームメモリの内容を複写し
て、読取処理を行なうことにより、読取の信頼性を上げ
ることができることである。複写はハードウエアにより
簡単に実現できる。
Therefore, the effect is that one field image is taken into the frame memory 6 at intervals of one line, the contents of the frame memory of the one line are copied to an empty line, and the reading process is performed. That is, the reliability of reading can be improved. Copying can be easily realized by hardware.

【0201】(8) 前記第3項において、転送手段
は、撮像手段により撮像した2次元像の任意数の画素情
報を加算し1つの画素にして、転送するシンボル情報読
取装置。
(8) In the symbol information reading device described in the third item, the transfer means adds the pixel information of an arbitrary number of the two-dimensional image picked up by the image pickup means into one pixel and transfers it.

【0202】従って、前記3項において、転送手段は、
撮像手段により撮像した2次元像の任意数の画素情報を
加算し1つの画素にして、転送する。よって、効果は、
バーコードラベルの1行の高さが十分な場合には、全て
の画素情報に対し、任意の画素数を加算し1の画素にし
てフレームメモリに格納することにより、バーコードシ
ンボル情報を高速に読み取ることが可能となることであ
る。これもハードウエアで簡単に実現可能であり、しか
もノイズを抑制する効果も持っている。
Therefore, in the above item 3, the transfer means is
An arbitrary number of pieces of pixel information of the two-dimensional image picked up by the image pickup means are added to form one pixel and transferred. Therefore, the effect is
When the height of one line of the barcode label is sufficient, the arbitrary number of pixels is added to all the pixel information to make it 1 pixel and stored in the frame memory, so that the barcode symbol information can be processed at high speed. It is possible to read. This can also be easily realized by hardware, and also has the effect of suppressing noise.

【0203】(9) 前記第1項において、位置認識手
段は、記憶装置の1行の画素情報を任意数だけ幅情報に
変換して、当該バーコードの種類によって定められる所
定パターンの位置を認識するシンボル情報読取装置。
(9) In the first item, the position recognizing means converts the pixel information of one row of the storage device into width information by an arbitrary number, and recognizes the position of a predetermined pattern defined by the kind of the barcode. Symbol information reading device.

【0204】従って、記憶装置の1行の画素情報を任意
数だけ幅情報に変換して、当該バーコードの種類によっ
て定められる所定パターンの位置を認識する。よって、
効果は、対象となる画像内にバーコードラベル以外の情
報が存在せず、尚且つPDF417バーコードラベルの
スタートコードが画像の向かって左側に位置した場合、
フレームメモリから行単位で取り込んだ画素情報を全て
幅情報に変換せずに、スタートコードを検出するのに十
分なだけの幅情報だけ求めるので、高速にスタートコー
ドを検出することができることである。
Therefore, the pixel information of one row of the storage device is converted into the width information by an arbitrary number, and the position of the predetermined pattern determined by the type of the barcode is recognized. Therefore,
The effect is that when there is no information other than the barcode label in the target image and the start code of the PDF417 barcode label is located on the left side of the image,
This means that it is possible to detect the start code at a high speed because the width information that is sufficient for detecting the start code is obtained without converting all the pixel information fetched in line units from the frame memory into the width information.

【0205】(10) 前記第1項において、位置認識
手段は、記憶手段から選択的に行を選ぶ処理操作を含
み、当該バーコードの種類によって定められる所定パタ
ーンの位置を認識するシンボル情報読取装置。
(10) In the first item, the position recognizing means includes a processing operation for selectively selecting a row from the storing means, and recognizes the position of a predetermined pattern defined by the type of the bar code concerned. .

【0206】従って、記憶手段から選択的に行を選ぶ処
理操作を含み、当該バーコードの種類によって定められ
る所定パターンの位置を認識する。よって、効果は、画
素を取り込む行の決定法において、方程式の解を反復的
に求めるNEWTON法に類似した方法で、行間を徐々
に狭めていく方法を採用しているので、スタートコード
を大域的にしかも高速に検出することができることであ
る。
Therefore, the position of the predetermined pattern defined by the type of the bar code is recognized, including the processing operation of selectively selecting the line from the storage means. Therefore, the effect is that in the method of determining the row in which the pixels are taken in, a method similar to the NEWTON method for iteratively obtaining the solution of the equation is adopted, and the method of gradually narrowing the space between the rows is adopted. Moreover, it is possible to detect at high speed.

【0207】(11) 前記第1項において、読み取り
手段は、当該バーコードの種類によって定められる所定
パターンを少なくとも2箇所検出し、バーコードラベル
の傾きを求め、既に検出されているパターンとは異なる
当該バーコードの種類によって定められる所定パターン
を検出し、両方のパターンからバーコードラベルの傾き
を再定義する処理操作を含み、バーコード情報を読み取
るシンボル情報読取装置。
(11) In the first item, the reading means detects at least two predetermined patterns defined by the type of the bar code, calculates the inclination of the bar code label, and differs from the pattern already detected. A symbol information reading device, which includes a processing operation of detecting a predetermined pattern defined by the type of the barcode and redefining the inclination of the barcode label from both patterns, and reading the barcode information.

【0208】従って、当該バーコードの種類によって定
められる所定パターンを少なくとも2箇所検出し、バー
コードラベルの傾きを求め、既に検出されているパター
ンとは異なる当該バーコードの種類によって定められる
所定パターンを検出し、両方のパターンからバーコード
ラベルの傾きを再定義する処理操作を含み、バーコード
情報を読み取る。
Therefore, at least two predetermined patterns defined by the type of the bar code are detected, the inclination of the bar code label is obtained, and the predetermined pattern defined by the type of the bar code different from the pattern already detected is determined. The barcode information is read, including the processing operations to detect and redefine the slope of the barcode label from both patterns.

【0209】よって、効果は、スタートコードを検出し
た後にバーコードラベルのインディケータ情報から各コ
ード位置を推定し、ストップコードに近い位置からスト
ップコードを検出して、スタートコードとストップコー
ド両方からバーコードラベルの傾きを再定義しているの
で、より正確な傾きを求めることができ、読み取りの信
頼性を上げることができる。
Therefore, the effect is that after detecting the start code, each code position is estimated from the indicator information of the bar code label, the stop code is detected from the position close to the stop code, and the bar code is detected from both the start code and the stop code. Since the tilt of the label is redefined, a more accurate tilt can be obtained and the reliability of reading can be improved.

【0210】(12) 前記第1項において、読み取り
手段は、バーコードラベルの1隅が欠損していた場合
に、当該バーコードの種類によって定められる所定パタ
ーンの1つのみの情報から求めたバーコードラベルの傾
きを参考に傾きを再定義する処理操作を含み、バーコー
ド情報を読み取るシンボル情報読取装置。
(12) In the first item, the reading means obtains the bar code obtained from only one information of the predetermined pattern determined by the kind of the bar code when one corner of the bar code label is missing. A symbol information reading device for reading barcode information, including a processing operation for redefining the inclination with reference to the inclination of the code label.

【0211】従って、バーコードラベルの1隅が欠損し
ていた場合に、当該バーコードの種類によって定められ
る所定パターンの1つのみの情報から求めたバーコード
ラベルの傾きを参考に傾きを再定義する処理操作を含
み、バーコード情報を読み取る。
Therefore, when one corner of the barcode label is missing, the inclination is redefined with reference to the inclination of the barcode label obtained from the information of only one of the predetermined patterns determined by the type of the barcode. The barcode information is read, including the processing operation to perform.

【0212】前記(12)項と同様の効果が得られる。 (13) 前記第2項において、認識手段は、記憶手段
の2次元像を縦に3等分し、バーコードラベルの大きさ
により決まる一番上のエリアの任意の行と一番下のエリ
アの任意の行で当該バーコードの種類によって定められ
る所定パターンを検出できず、なおかつ中心のエリアの
任意の行で当該バーコードの種類によって定められる所
定パターンを検出した場合にバーコードラベルが読み取
り可能な位置に存在すると判断する処理操作を含み、バ
ーコードラベルの存在の有無を認識するシンボル情報読
取装置。
The same effect as the item (12) can be obtained. (13) In the second item, the recognition means vertically divides the two-dimensional image of the storage means into three equal parts, and an arbitrary row of the top area and a bottom area determined by the size of the barcode label. The bar code label can be read when the predetermined pattern defined by the barcode type cannot be detected in any row of and the predetermined pattern defined by the barcode type is detected in any row of the central area. A symbol information reading device that recognizes the presence or absence of a bar code label, including a processing operation for determining that the bar code label exists.

【0213】従って、記憶手段の2次元像を縦に3等分
し、バーコードラベルの大きさにより決まる一番上のエ
リアの任意の行と一番下のエリアの任意の行で当該バー
コードの種類によって定められる所定パターンを検出で
きず、なおかつ中心のエリアの任意の行で当該バーコー
ドの種類によって定められる所定パターンを検出した場
合にバーコードラベルが読み取り可能な位置に存在する
と判断する処理操作を含み、バーコードラベルの存在の
有無を認識する。
Therefore, the two-dimensional image of the storage means is vertically divided into three equal parts, and the bar code is selected in any row of the top area and any row of the bottom area determined by the size of the bar code label. When the predetermined pattern defined by the type of the barcode cannot be detected and the predetermined pattern defined by the type of the barcode is detected in any row of the central area, the process of determining that the barcode label exists at the readable position Recognizes the presence or absence of barcode labels, including operations.

【0214】よって効果は、移動しているバーコードラ
ベルを読み取る際に、バーコードラベルが完全に画像内
に入っている場合にのみ読取処理に進ようにしたので、
画像からはみ出しているバーコードを読みに行くような
ことはなく、高速に読取が行なえて、尚且つ信頼性を上
げることができることである。
Therefore, the effect is that when the moving bar code label is read, the reading process is performed only when the bar code label is completely within the image.
There is no need to read a bar code that sticks out of the image, the bar code can be read at high speed, and the reliability can be improved.

【0215】(14) 前記第10項において、位置認
識手段は、最初に記憶手段の2次元像の中心の行を選択
し、その次には2次元像の上半分の中心と下半分の中心
の行を選択し、以下同様に分割された画像の中心の行を
順次選択する処理操作を含み、当該バーコードの種類に
よって定められる所定パターンの位置を認識するシンボ
ル情報読取装置。
(14) In the tenth item, the position recognizing means first selects the center row of the two-dimensional image in the storage means, and then the center of the upper half and the center of the lower half of the two-dimensional image. Symbol information reading device that recognizes the position of a predetermined pattern defined by the type of the barcode, including the processing operation of sequentially selecting the central line of the divided image.

【0216】従って、最初に記憶手段の2次元像の中心
の行を選択し、その次には2次元像の上半分の中心と下
半分の中心の行を選択し、以下同様に分割された画像の
中心の行を順次選択する処理操作を含み、当該バーコー
ドの種類によって定められる所定パターンの位置を認識
する。
Therefore, first, the row at the center of the two-dimensional image in the storage means is selected, then the rows at the center of the upper half and the center of the lower half of the two-dimensional image are selected, and so on. It includes a processing operation of sequentially selecting the center line of the image, and recognizes the position of a predetermined pattern determined by the type of the barcode.

【0217】前記(10)項と同様の効果が得られる。 (15) 前記第12項において、読み取り手段は、記
憶手段の2次元バーコードラベル像の4隅の内の上の2
隅からバーコードラベルの傾きを求め、次に4隅の内の
下の2隅からバーコードラベルの傾きを求め、2つの傾
きからバーコードラベルの傾きを求める処理操作を含
み、バーコード情報を読み取るシンボル情報読取装置。
The same effect as the item (10) can be obtained. (15) In the twelfth item, the reading means has a top two of the four corners of the two-dimensional barcode label image of the storage means.
The barcode information inclination is calculated from the corners, then the barcode label inclination is calculated from the lower two corners of the four corners, and the barcode information inclination is calculated from the two inclinations. Symbol information reader to read.

【0218】従って、前記第12項において、読み取り
手段は、記憶手段の2次元バーコードラベル像の4隅の
内の上の2隅からバーコードラベルの傾きを求め、次に
4隅の内の下の2隅からバーコードラベルの傾きを求
め、2つの傾きからバーコードラベルの傾きを求める処
理操作を含み、バーコード情報を読み取る。
Therefore, in the twelfth item, the reading means obtains the inclination of the bar code label from the upper two corners of the two-dimensional bar code label image of the storage means, and then calculates the inclination of the bar code label. The bar code information is read by including the processing operation of obtaining the inclination of the barcode label from the lower two corners and obtaining the inclination of the barcode label from the two inclinations.

【0219】(16) 前記第12項において、読み取
り手段は、記憶手段の2次元バーコードラベル像の4隅
の内の上の2隅からバーコードラベルの傾きを求め、次
に4隅の内の下の2隅からバーコードラベルの傾きを求
め、2つの傾きの差が予め定められているしきい値以上
であれば、当該バーコードの種類によって定められる所
定パターンを少なくとも2箇所検出して求めた傾きに近
い値をバーコードラベルの傾きとする処理操作を含み、
バーコード情報を読み取るシンボル情報読取装置。
(16) In the twelfth item, the reading means obtains the inclination of the bar code label from the upper two corners of the four-dimensional corner of the two-dimensional bar code label image of the memory means, and then calculates the inclination of the bar code label. The inclination of the barcode label is calculated from the two lower corners, and if the difference between the two inclinations is greater than or equal to a predetermined threshold value, at least two predetermined patterns determined by the type of the barcode are detected. Including the processing operation that makes the value close to the calculated slope the slope of the barcode label,
A symbol information reader that reads barcode information.

【0220】従って、記憶手段の2次元バーコードラベ
ル像の4隅の内の上の2隅からバーコードラベルの傾き
を求め、次に4隅の内の下の2隅からバーコードラベル
の傾きを求め、2つの傾きの差が予め定められているし
きい値以上であれば、当該バーコードの種類によって定
められる所定パターンを少なくとも2箇所検出して求め
た傾きに近い値をバーコードの傾きとする処理操作を含
み、バーコード情報を読み取る。
Therefore, the inclination of the barcode label is calculated from the upper two corners of the four corners of the two-dimensional barcode label image of the storage means, and then the inclination of the barcode label is calculated from the lower two corners of the four corners. If the difference between the two slopes is greater than or equal to a predetermined threshold value, a value close to the slope obtained by detecting at least two predetermined patterns defined by the type of the barcode is the slope of the barcode. Read the barcode information including the processing operation.

【0221】前記(10)項と同様の効果が得られる。 (17) 前記第12項において、読み取り手段は、記
憶手段の2次元バーコードラベル像の4隅の内の上の2
隅からバーコードラベルの傾きを求め、次に4隅の内の
下の2隅からバーコードラベルの傾きを求め、2つの傾
きの差が予め定められているしきい値未満であれば、2
つの傾きの平均値をバーコードラベルの傾きとする処理
操作を含み、バーコード情報を読み取るシンボル情報読
取装置。
The same effect as the item (10) can be obtained. (17) In the twelfth item, the reading means is the top two of the four corners of the two-dimensional barcode label image of the storage means.
The inclination of the barcode label is obtained from the corner, then the inclination of the barcode label is obtained from the lower two corners of the four corners, and if the difference between the two inclinations is less than a predetermined threshold value, then 2
A symbol information reading device for reading barcode information, which includes a processing operation for determining the average value of two inclinations as the inclination of the barcode label.

【0222】従って、記憶手段の2次元バーコードラベ
ル像の4隅の内の上の2隅からバーコードラベルの傾き
を求め、次に4隅の内の下の2隅からバーコードラベル
の傾きを求め、2つの傾きの差が予め定められているし
きい値未満であれば、2つの傾きの平均値をバーコード
ラベルの傾きとする処理操作を含み、バーコード情報を
読み取る。
Therefore, the inclination of the bar code label is calculated from the upper two corners of the four corners of the two-dimensional bar code label image of the storage means, and then the inclination of the bar code label is calculated from the lower two corners of the four corners. If the difference between the two slopes is less than a predetermined threshold value, the bar code information is read, including the processing operation of setting the average value of the two slopes as the slope of the barcode label.

【0223】(18) 前記第6項において、読み取り
手段は、再度読取処理に行くときに前フィールド画面の
バーコードラベルの位置情報を用いる処理操作を含み、
バーコード情報を読み取るシンボル情報読取装置。
(18) In the sixth item, the reading means includes a processing operation of using the position information of the bar code label of the previous field screen when going to the reading processing again.
A symbol information reader that reads barcode information.

【0224】従って、再度読取処理に行くときに前フィ
ールド画面のバーコードラベルの位置情報を用いる処理
操作を含み、バーコード情報を読み取る。よって、効果
は、再度読取処理に行くときに前フィールド画面のバー
コードラベルの位置情報を用いることが出来るので、再
度ラベル検出をする必要はなく、バーコード情報の高速
な読み取りが実現できることである。新たなバーコード
ラベル位置はラベルの速度と撮像装置の走査速度から計
算することが出来る。また、バーコードラベルの速度が
撮像装置の走査速度に比べ、十分無視できる場合にはそ
のまま前フィールド画面のバーコードラベルの位置情報
を用いることができる。
Therefore, the bar code information is read by including the processing operation using the position information of the bar code label on the previous field screen when going to the reading process again. Therefore, the effect is that since the position information of the bar code label on the previous field screen can be used when the reading process is performed again, it is not necessary to detect the label again, and high-speed reading of the bar code information can be realized. . The new bar code label position can be calculated from the label speed and the scanning speed of the imager. Further, when the speed of the barcode label is sufficiently negligible as compared with the scanning speed of the image pickup apparatus, the position information of the barcode label on the previous field screen can be used as it is.

【0225】[0225]

【発明の効果】以上詳述したように本発明によれば、移
動している2次元バーコードのバーコードシンボル情報
を高速に確実に読取るシンボル情報読り取装置を提供す
ることができる。
As described in detail above, according to the present invention, it is possible to provide a symbol information reading device which can reliably read barcode symbol information of a moving two-dimensional barcode at high speed.

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

【図1】第1実施例としてのシンボル情報読取り装置の
概略的な構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of a symbol information reading device as a first embodiment.

【図2】スタックドバーコードの一例として、PDF−
417のラベル構造を示す図である。
FIG. 2 shows a PDF-
It is a figure which shows the label structure of 417.

【図3】仮想的にフレームメモリの画素配列にPDF−
417のラベル画像を投影した模式図を示す図である。
FIG. 3 is a view showing a PDF-pixel arrangement in a pixel array of a frame memory.
It is a figure which shows the schematic diagram which projected the label image of 417.

【図4】データ処理装置におけるラベル検出、ラベル情
報読出し及び復号について説明するためのフローチャー
トである。
FIG. 4 is a flowchart for explaining label detection, label information reading, and decoding in the data processing device.

【図5】フィールド画面のみを取り込むことを説明する
ための図である。
FIG. 5 is a diagram for explaining that only a field screen is captured.

【図6】画像取り込みルーチンについて説明するための
フローチャートである。
FIG. 6 is a flowchart illustrating an image capturing routine.

【図7】2つのフィールド画面(偶数成分と奇数成分)
を取り込むことを説明するための図である。
[Fig. 7] Two field screens (even component and odd component)
FIG. 6 is a diagram for explaining that the capture of

【図8】4画素を加算し1つの画素にすることを説明す
るための図である。
FIG. 8 is a diagram for explaining that four pixels are added to form one pixel.

【図9】バーコードラベル検出を説明するためのフロー
チャートである。
FIG. 9 is a flowchart for explaining barcode label detection.

【図10】バーコードラベル検出を説明するための投影
像を示す図である。
FIG. 10 is a diagram showing a projected image for explaining barcode label detection.

【図11】フレームメモリ上に定義されるバーコードラ
ベルの傾きを説明するための図である。
FIG. 11 is a diagram for explaining the inclination of the barcode label defined on the frame memory.

【図12】バーコードラベル画面内検出を説明するため
のフローチャートである。
FIG. 12 is a flowchart for explaining detection within a barcode label screen.

【図13】バーコードラベル画面内検出を説明するため
のバーコードラベル投影像を示す図である。
FIG. 13 is a diagram showing a projected image of a barcode label for explaining detection within a barcode label screen.

【図14】スキャン方法を説明するためのフローチャー
トである。
FIG. 14 is a flowchart illustrating a scanning method.

【図15】スキャン方法を説明するためのバーコードラ
ベル投影像を示す図である。
FIG. 15 is a diagram showing a barcode label projection image for explaining a scanning method.

【図16】スタートコード検出を説明するためのフロー
チャートである。
FIG. 16 is a flowchart for explaining start code detection.

【図17】幅情報への変換方法を説明するためのフロー
チャートの前半部である。
FIG. 17 is the first half of a flowchart for explaining a conversion method into width information.

【図18】幅情報への変換方法を説明するためのフロー
チャートの後半部である。
FIG. 18 is the second half of the flowchart for explaining the conversion method into the width information.

【図19】ピーク値の選択について説明するための図で
ある。
FIG. 19 is a diagram for explaining selection of peak values.

【図20】ピーク間距離の算出方法について説明するた
めの図である。
FIG. 20 is a diagram for explaining a method of calculating a distance between peaks.

【図21】正規化について説明するためのフローチャー
トである。
FIG. 21 is a flowchart for explaining normalization.

【図22】Y座標の最大値最小値の検出について説明す
るためのフローチャートである。
FIG. 22 is a flowchart for explaining detection of the maximum value and minimum value of Y coordinates.

【図23】ラベルの範囲の検出について説明するための
フローチャートである。
FIG. 23 is a flowchart for explaining detection of a label range.

【図24】ラベルの傾きの検出について説明するための
フローチャートである。
FIG. 24 is a flowchart for explaining detection of label inclination.

【図25】閾値決定について説明するためのフローチャ
ートである。
FIG. 25 is a flowchart for explaining threshold determination.

【図26】図26(a)は、閾値算出ラインについて説
明するための図、図26(b)はスタートコードの微分
波形を示す図である。
26A is a diagram for explaining a threshold value calculation line, and FIG. 26B is a diagram showing a differential waveform of a start code.

【図27】インディケータ情報決定について説明するた
めのフローチャートである。
FIG. 27 is a flowchart for explaining determination of indicator information.

【図28】インディケータ情報決定についてフレームメ
モリへのバーコードラベル投影像を示す図である。
FIG. 28 is a diagram showing a bar code label projected image on a frame memory for determining indicator information.

【図29】バーコードラベルの傾きの再定義について説
明するためのフローチャートである。
FIG. 29 is a flowchart for explaining redefinition of the inclination of the barcode label.

【図30】バーコードラベルの傾きの再定義について説
明するためのバーコードラベル投影像を示す図である。
FIG. 30 is a diagram showing a barcode label projection image for explaining redefinition of the inclination of the barcode label.

【図31】ストップコード検出について説明するための
フローチャートである。
FIG. 31 is a flowchart for explaining stop code detection.

【図32】バーコードラベルの範囲検出について説明す
るためのフローチャートである。
FIG. 32 is a flowchart for explaining detection of a barcode label range.

【図33】バーコードラベルの傾き再計算について説明
するためのフローチャートである。
FIG. 33 is a flowchart for explaining the recalculation of the inclination of the barcode label.

【図34】バーコードラベルの欠損について説明するた
めの図である。
FIG. 34 is a diagram for explaining a defect of a barcode label.

【図35】バーコードラベルの始点、終点列の算出につ
いて説明するためのバーコードラベル投影像を示す図で
ある。
FIG. 35 is a diagram showing a barcode label projection image for explaining calculation of a starting point and an ending point sequence of a barcode label.

【図36】スキャン方程式決定について説明するための
フローチャートである。
FIG. 36 is a flowchart for explaining determination of a scan equation.

【図37】埋め込チェックについて説明するためのフロ
ーチャートである。
FIG. 37 is a flowchart for explaining an embedding check.

【図38】埋め込チェックについて説明するためのバー
コードラベル投影像を示す図である。
FIG. 38 is a diagram showing a barcode label projected image for explaining the embedding check.

【図39】ROW検出について説明するためのフローチ
ャートである。
FIG. 39 is a flowchart for explaining ROW detection.

【図40】ROW番号検出について説明するためのフロ
ーチャートである。
FIG. 40 is a flowchart for explaining ROW number detection.

【図41】最適スキャンについて説明するためのフロー
チャートである。
FIG. 41 is a flowchart for explaining an optimum scan.

【図42】最適スキャンについて説明するためのフレー
ムメモリへのバーコードラベル投影像を示す図である。
FIG. 42 is a diagram showing a bar code label projected image on a frame memory for explaining the optimum scanning.

【図43】インテリジェントスキャンについて説明する
ためのフローチャートである。
FIG. 43 is a flowchart illustrating an intelligent scan.

【図44】幅情報への変換方法を説明するためのフロー
チャートの前半部である。
FIG. 44 is the first half of a flowchart for explaining a method of converting to width information.

【図45】幅情報への変換方法を説明するためのフロー
チャートの後半部である。
FIG. 45 is the second half of the flowchart for explaining the method of converting to width information.

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

1…物品、2…バーコードラベル、3…搬送系、4…撮
像光学系、5…2次元撮像部、6…フレームメモリ、7
…データ処理装置、8…ラベル検出部、9…読取り部、
10…デコード判定部、11…復号部、12…メモリ、
13…制御部、14…位置検出部、15…傾き検出部、
16…ホスト装置。
DESCRIPTION OF SYMBOLS 1 ... Article, 2 ... Bar code label, 3 ... Conveying system, 4 ... Imaging optical system, 5 ... Two-dimensional imaging part, 6 ... Frame memory, 7
... data processing device, 8 ... label detecting unit, 9 ... reading unit,
10 ... Decode determination unit, 11 ... Decoding unit, 12 ... Memory,
13 ... Control unit, 14 ... Position detection unit, 15 ... Inclination detection unit,
16 ... Host device.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 バーとスペースとからなり任意の情報を
パターンとして表すバーコードを2次元像として撮像す
る撮像手段と、 前記撮像手段により順次得られた2次元像を一時的に記
憶する記憶手段と、 前記撮像手段から前記記憶手段に2次元像を転送する転
送手段と、 前記記憶手段に記憶された2次元像を順次読出し、撮像
範囲内でのバーコードシンボルの有無を認識する認識手
段と、 前記認識手段により認識されたバーコードの前記撮像範
囲内での存在位置及び傾きを検出し、バーコードのスキ
ャン方向を検出する位置検出手段と、 前記位置検出手段により検出されたスキャン方向により
バーコードの2次元像から該バーコードの情報を順次読
み取る読取手段と、 前記読取手段からのバーコードの情報から、前記任意の
情報に復号する復号手段と、を具備することを特徴とす
るシンボル情報読取装置。
1. An image pickup means for picking up a two-dimensional image of a bar code which is composed of a bar and a space and which represents arbitrary information as a pattern, and a storage means for temporarily storing the two-dimensional images sequentially obtained by the image pickup means. A transfer means for transferring a two-dimensional image from the imaging means to the storage means; and a recognition means for sequentially reading out the two-dimensional images stored in the storage means and recognizing the presence or absence of a bar code symbol within the imaging range. A position detecting unit that detects the position and inclination of the barcode recognized by the recognizing unit in the imaging range and detects the scanning direction of the barcode; and a bar based on the scanning direction detected by the position detecting unit. A reading unit that sequentially reads information of the barcode from a two-dimensional image of the code, and decodes the barcode information from the reading unit into the arbitrary information. A symbol information reading apparatus comprising: a decoding unit.
【請求項2】 前記転送手段は、撮像手段により撮像さ
れた2次元像を圧縮して転送することを特徴とする請求
項1記載のシンボル情報読取装置。
2. The symbol information reading device according to claim 1, wherein the transfer unit compresses and transfers the two-dimensional image captured by the image capturing unit.
【請求項3】 前記転送手段は、撮像手段により撮像さ
れた2次元像のフィールド成分の1スキャンラインを転
送した後、記憶手段の1ラインを空けてまたスキャンラ
インを転送し、1フィールド分の画像情報を転送するま
でそれを繰り返し、終了後に空いているラインにそのラ
インの1ライン上または下のラインの画像情報を複写す
る処理操作を含み、転送することを特徴とする請求項2
記載のシンボル情報読取装置。
3. The transfer means transfers one scan line of a field component of a two-dimensional image picked up by the image pickup means, vacates one line of the storage means, and transfers the scan line again, and one field worth The process is repeated until the image information is transferred, and after the process is completed, a processing operation of copying the image information of one line above or below the line to a vacant line is included and transferred.
The described symbol information reader.
JP13525695A 1995-06-01 1995-06-01 Symbol information reader Expired - Fee Related JP3580901B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13525695A JP3580901B2 (en) 1995-06-01 1995-06-01 Symbol information reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13525695A JP3580901B2 (en) 1995-06-01 1995-06-01 Symbol information reader

Publications (2)

Publication Number Publication Date
JPH08329185A true JPH08329185A (en) 1996-12-13
JP3580901B2 JP3580901B2 (en) 2004-10-27

Family

ID=15147463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13525695A Expired - Fee Related JP3580901B2 (en) 1995-06-01 1995-06-01 Symbol information reader

Country Status (1)

Country Link
JP (1) JP3580901B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002230475A (en) * 2001-01-08 2002-08-16 Symbol Technologies Inc Bioptics bar code reader
JP2006172267A (en) * 2004-12-17 2006-06-29 Toyo Kanetsu Solutions Kk System for recognizing symbol on mobile object
JP2009020611A (en) * 2007-07-10 2009-01-29 Toshiba Tec Corp Scanner device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116362274B (en) * 2023-05-30 2023-08-25 深圳市华众自动化工程有限公司 High-speed bar code reader

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002230475A (en) * 2001-01-08 2002-08-16 Symbol Technologies Inc Bioptics bar code reader
JP2006172267A (en) * 2004-12-17 2006-06-29 Toyo Kanetsu Solutions Kk System for recognizing symbol on mobile object
JP2009020611A (en) * 2007-07-10 2009-01-29 Toshiba Tec Corp Scanner device

Also Published As

Publication number Publication date
JP3580901B2 (en) 2004-10-27

Similar Documents

Publication Publication Date Title
KR100271245B1 (en) Bar code reading apparatus
US5635697A (en) Method and apparatus for decoding two-dimensional bar code
EP0669593B1 (en) Two-dimensional code recognition method
US8254683B2 (en) Code image processing method
JPH05324887A (en) Symbol information reader
KR100275006B1 (en) Barcode reader with automatic reading function
EP0353842A2 (en) Technique for reading bar codes
JP5140820B2 (en) Symbol information reading apparatus and symbol information reading method
EP1619604A2 (en) Code type determining method and code boundary detecting method
US5748868A (en) Two-dimensional management pattern, information display tag, and image processing method and device
JP4574503B2 (en) Image processing apparatus, image processing method, and program
US5550363A (en) Optical information reading apparatus
JPH0157394B2 (en)
KR100257128B1 (en) Symbol information reading apparatus
US4797940A (en) Optical character reader
EP0576220B1 (en) Bar-code reader device
JP3580901B2 (en) Symbol information reader
US5054104A (en) Optical character reader
JPH05233867A (en) Bar code reader
US20020089699A1 (en) Handling system and device for determining a state of a slip
JPH0469788A (en) Optical information reader
JPH0469785A (en) Optical information reader
JP2514660B2 (en) Optical character reader
JP2000194793A (en) Device and method for reading data of stack type two- dimensional bar code
JP2000268122A (en) Two-dimensional code reader

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040413

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040614

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040713

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040721

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

Free format text: PAYMENT UNTIL: 20080730

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees