JP2006178641A - Symbol information reading method and symbol information reading device - Google Patents

Symbol information reading method and symbol information reading device Download PDF

Info

Publication number
JP2006178641A
JP2006178641A JP2004369609A JP2004369609A JP2006178641A JP 2006178641 A JP2006178641 A JP 2006178641A JP 2004369609 A JP2004369609 A JP 2004369609A JP 2004369609 A JP2004369609 A JP 2004369609A JP 2006178641 A JP2006178641 A JP 2006178641A
Authority
JP
Japan
Prior art keywords
symbol information
image data
information reading
reading method
corrected image
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
JP2004369609A
Other languages
Japanese (ja)
Other versions
JP4403063B2 (en
Inventor
Hiroshi Nakamura
宏 中村
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.)
Nidec Sankyo Corp
Original Assignee
Nidec Sankyo Corp
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 Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2004369609A priority Critical patent/JP4403063B2/en
Priority to US11/316,546 priority patent/US7380718B2/en
Publication of JP2006178641A publication Critical patent/JP2006178641A/en
Application granted granted Critical
Publication of JP4403063B2 publication Critical patent/JP4403063B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a symbol information reading method and a symbol information reading device capable of preventing degradation in reliability for decoding by reducing a noise due to quantization error or local contamination or the like. <P>SOLUTION: The symbol information reading method includes a process for converting image data obtained by imaging symbol information such as barcodes into correction image data having zero tilt angle; a process for smoothing the correction image data; and a process for specifying the separation in columns in the symbol information by calculating total sum value on the smoothed correction image data in a row direction. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、バーコード等のシンボル情報を光学的に読み取るシンボル情報読取方法及びシンボル情報読取装置に関するものであって、特に、ノイズの影響を押さえた上でシンボル情報を読み取ることが可能なシンボル情報読取方法及びシンボル情報読取装置に関する。   The present invention relates to a symbol information reading method and a symbol information reading apparatus that optically read symbol information such as a bar code, and in particular, symbol information that can read symbol information while suppressing the influence of noise. The present invention relates to a reading method and a symbol information reading apparatus.

従来より、紙やプラスチック等の媒体に固有の情報を付与し、これを自動認識するための手段として、バーコードなるものが普及している。例えば、一般消費財には、1次元バーコードが使用されている。近年、バーコードの情報量に対する要求が強まり、一次元バーコードよりも格段に容量を増加させた二次元バーコードと呼ばれるシンボル情報が登場してきている。そして、この二次元バーコードに対応した読み取り装置も次第に普及してきている。   2. Description of the Related Art Conventionally, barcodes have been widely used as means for assigning unique information to a medium such as paper or plastic and automatically recognizing the information. For example, a one-dimensional barcode is used for general consumer goods. In recent years, demands for the amount of information on barcodes have increased, and symbol information called two-dimensional barcodes that have a much larger capacity than one-dimensional barcodes have appeared. A reading apparatus corresponding to the two-dimensional bar code is gradually becoming widespread.

この二次元バーコードの中には、一次元バーコードを積み重ねることによって情報量を増加させる方式のものがあり、これは、スタック型バーコードと呼ばれる。代表的なものにPDF417と呼ばれる符合体系のスタック型バーコードがある。なお、この符号体系PDF417は、ISO/IEC15438として国際規格化されている。   Among these two-dimensional barcodes, there is a method of increasing the amount of information by stacking one-dimensional barcodes, which is called a stack barcode. A typical one is a stack type barcode called PDF417. This code system PDF417 is internationally standardized as ISO / IEC15438.

スタック型バーコードを読み取る読取装置としては、例えば、特許文献1又は特許文献2記載の読取装置がある。特許文献1に開示されたバーコードリーダーは、二次元撮像装置でバーコードを撮像し、画像をメモリに取り込んで、このデータに基づいてバーコードシンボル情報を復号する、というものである。   As a reading device that reads a stack barcode, for example, there is a reading device described in Patent Document 1 or Patent Document 2. The barcode reader disclosed in Patent Document 1 captures a barcode with a two-dimensional imaging device, takes the image into a memory, and decodes barcode symbol information based on this data.

しかし、特許文献1に開示されたバーコードリーダーでは、スタック型バーコードのラベルの向きに読み取り精度が依存してしまう、という問題や、そのラベルが撮像装置の視野を外れて撮像された場合が考慮されていない、という問題がある。このような問題を改善するものとしては、特許文献2に開示されたシンボル情報読取装置がある。この特許文献2に開示されたシンボル情報読取装置は、二次元撮像装置でバーコードを撮像し、バーコードの位置と傾きを検出することで、スタック型バーコードのラベルがどのような向きにセットされていても、或いは、撮像画像に欠損があっても、そのバーコードシンボル情報を読み取ることができるようになっている。   However, in the barcode reader disclosed in Patent Document 1, there is a problem that the reading accuracy depends on the direction of the label of the stacked barcode, or the label is taken out of the field of view of the imaging device. There is a problem that it is not considered. As a means for improving such a problem, there is a symbol information reading apparatus disclosed in Patent Document 2. The symbol information reading device disclosed in Patent Document 2 captures a barcode with a two-dimensional imaging device and detects the position and inclination of the barcode, so that the stack barcode label is set in any orientation. The barcode symbol information can be read even if the captured image has a defect or is missing.

特開平2−268383号公報JP-A-2-268383 特開平5−324887号公報(段落[0013])JP-A-5-324887 (paragraph [0013])

しかしながら、特許文献2に開示されたシンボル情報読取装置では、スタック型バーコードのラベルの傾きがゼロでない場合、復号の信頼性が低下してしまう、といった問題がある。   However, the symbol information reading apparatus disclosed in Patent Document 2 has a problem that the reliability of decoding is lowered when the inclination of the label of the stack barcode is not zero.

すなわち、特許文献2に開示されたシンボル情報読取装置は、スタック型バーコードのラベルの傾きを求めた上で切り取りの基準となる直線を求め、これに基づいてスキャンラインを決定し、このスキャンライン上の点におけるアドレスを計算して該当する点の画素値を取り出し、画素値配列に格納するようにしている。   That is, the symbol information reading device disclosed in Patent Document 2 obtains a straight line as a cutting reference after obtaining the inclination of the label of the stack barcode, determines a scan line based on this, and determines the scan line. The address at the upper point is calculated, the pixel value at the corresponding point is extracted, and stored in the pixel value array.

従って、特に、スタック型バーコードのラベルの傾きがゼロでない場合(ラベルの傾きが水平或いは垂直となっていない場合)、アドレス計算時に生ずる量子化誤差によって、得られる画素配列にノイズが生じることとなり、その結果、復号の信頼性が低下してしまう、といった問題がある。   Therefore, in particular, when the label inclination of the stack barcode is not zero (when the label inclination is not horizontal or vertical), noise is generated in the obtained pixel array due to a quantization error generated during address calculation. As a result, there is a problem that the reliability of decoding is lowered.

また、特許文献2に開示されたシンボル情報読取装置は、基本的に間引きスキャンによって画素配列を得ていることから、局所的なノイズに弱い上、シンボル画像情報の一部しか復号に用いられない点で信頼性に欠ける、といった問題がある。   Further, since the symbol information reading device disclosed in Patent Document 2 basically obtains a pixel array by thinning scanning, it is vulnerable to local noise and only a part of the symbol image information is used for decoding. There are problems such as lack of reliability.

本発明は、このような点に鑑みてなされたものであり、その目的は、量子化誤差や局所的な汚れなどによるノイズを低減することで、復号の信頼性低下を防ぐことが可能なシンボル情報読取方法及びシンボル情報読取装置を提供することにある。   The present invention has been made in view of these points, and an object of the present invention is to reduce the reliability of decoding by reducing noise due to quantization error, local contamination, and the like. An information reading method and a symbol information reading device are provided.

以上のような課題を解決するために、本発明は、シンボル情報読取方法において、バーコード等のシンボル情報を撮像して得られた画像データを、傾斜角度ゼロの補正画像データに変換する工程と、その補正画像データを平滑化する工程と、平滑化された補正画像データ上の列方向の総和値を算出することによって、シンボル情報のカラムの区切りを特定する工程と、を含んでいることを特徴とする。   In order to solve the above-described problems, the present invention provides a process for converting image data obtained by imaging symbol information such as a barcode into corrected image data having a zero inclination angle in a symbol information reading method. A step of smoothing the corrected image data, and a step of specifying a column delimiter of the symbol information by calculating a sum value in the column direction on the smoothed corrected image data. Features.

より具体的には、本発明は、以下のものを提供する。   More specifically, the present invention provides the following.

(1) 媒体上に記録されたシンボル情報を撮像して得られた画像データを処理することによって、当該シンボル情報を読み取るシンボル情報読取方法において、前記画像データを、傾斜角度ゼロの補正画像データに変換する角度変換工程と、前記補正画像データを平滑化する平滑化工程と、前記平滑化工程によって平滑化された補正画像データ上の列方向の総和値を算出することによって、前記シンボル情報のカラムの区切りを特定するカラム特定工程と、を含むことを特徴とするシンボル情報読取方法。   (1) In a symbol information reading method for reading the symbol information by processing the image data obtained by imaging the symbol information recorded on the medium, the image data is converted into corrected image data having a zero inclination angle. A column of the symbol information by calculating an angle conversion step for conversion, a smoothing step for smoothing the corrected image data, and calculating a sum value in the column direction on the corrected image data smoothed by the smoothing step. And a column specifying step for specifying a delimiter of the symbol information reading method.

本発明によれば、紙やプラスチック等の媒体上に記録されたシンボル情報を撮像して得られた画像データをソフトウエア的に処理することによって、そのシンボル情報を読み取るシンボル情報読取方法に、画像データを傾斜角度ゼロの補正画像データに変換する角度変換工程と、その補正画像データを平滑化する平滑化工程と、この平滑化工程によって平滑化された補正画像データ上の列方向の総和値を算出することによって、シンボル情報のカラムの区切りを特定するカラム特定工程と、が含まれることとしたから、カラム特定工程は、角度変換工程によって傾斜角度ゼロにされた補正画像データが平滑化された後に行われることとなる。   According to the present invention, an image data obtained by imaging symbol information recorded on a medium such as paper or plastic is processed in software so that the symbol information reading method reads the symbol information. An angle conversion step for converting the data into corrected image data with a zero tilt angle, a smoothing step for smoothing the corrected image data, and a sum value in the column direction on the corrected image data smoothed by the smoothing step. Since the calculation includes a column specifying step that specifies a column break of the symbol information, the column specifying step has smoothed the corrected image data whose inclination angle has been zeroed by the angle conversion step. It will be done later.

従って、量子化誤差や局所的な汚れなどによるノイズを低減することができ、ひいては復号の信頼性低下を防ぐことができる。また、シンボル情報の列ごとに画素を計算して得られるプロファイルを計算することによってカラムの境界を特定しうるので、射影の平均化作用によって局所的な汚れなどのノイズの影響を低減することができる。   Accordingly, it is possible to reduce noise due to quantization error, local contamination, and the like, and to prevent deterioration in decoding reliability. In addition, since the column boundary can be specified by calculating the profile obtained by calculating the pixel for each column of symbol information, the influence of noise such as local contamination can be reduced by the projection averaging function. it can.

ここで、「角度変換工程」は、シンボル情報を撮像して得られた画像データ自体の傾きを変えて、傾斜角度ゼロの補正画像データに変換するのは勿論のこと、光学座標系を回転させて、実質的に傾斜角度ゼロの補正画像データに変換するなど、結果的に、傾斜角度ゼロの補正画像データを生成できるものであれば、如何なる手法であっても構わない。   Here, in the “angle conversion step”, the inclination of the image data itself obtained by imaging the symbol information is changed and converted into corrected image data having a zero inclination angle, and the optical coordinate system is rotated. Thus, any method may be used as long as it can generate corrected image data with a zero inclination angle as a result, for example, conversion into corrected image data with a substantially zero inclination angle.

また、「平滑化工程」は、平滑化を目的とする補間処理又は平均化処理であれば如何なる手法であってもよく、例えば、補正画像データをメディアンフィルタ,エッジ保存フィルタ,適応ウィナーフィルタ,移動平均フィルタなどの各種フィルタにかけて、補間又は平均化するものが挙げられる。   The “smoothing step” may be any method as long as it is an interpolation process or an averaging process for the purpose of smoothing. For example, the corrected image data is converted into a median filter, an edge preserving filter, an adaptive winner filter, a movement Examples include interpolation or averaging through various filters such as an average filter.

(2) 前記シンボル情報読取方法は、さらに、前記平滑化工程によって平滑化された補正画像データ上に、連続する複数の行からなる組を設定し、前記補正画像データに対して前記組を相対的に移動させながら、前記組が設定された行についての相関値列を算出することによって、前記シンボル情報の行の区切りを特定する行特定工程を含むことを特徴とする(1)記載のシンボル情報読取方法。   (2) The symbol information reading method further sets a set of a plurality of continuous rows on the corrected image data smoothed by the smoothing step, and sets the set relative to the corrected image data. The symbol according to (1), further including a row specifying step of specifying a line delimiter of the symbol information by calculating a correlation value sequence for the row in which the set is set while moving the symbol. Information reading method.

本発明によれば、上述したシンボル情報読取方法には、平滑化肯定によって平滑化された補正画像データ上に、例えば1行,2行及び3行といったように、連続する複数の行からなる組を設定し、補正画像データに対してその組を相対的に移動させながら(すなわち、2行,3行及び4行、次いで、3行,4行及び5行など)、組が設定された行についての相関値列を算出することによって、シンボル情報の行の区切りを特定する行特定工程が含まれることとしたから、量子化誤差や局所的な汚れなどによるノイズを低減した上で、シンボル情報の行の境界を特定することができ、ひいては復号の信頼性低下を防ぐことができる。   According to the present invention, the above-described symbol information reading method includes a set of a plurality of consecutive rows such as one row, two rows, and three rows on the corrected image data smoothed by smoothing affirmation. , And move the set relative to the corrected image data (that is, 2 rows, 3 rows and 4 rows, then 3 rows, 4 rows and 5 rows, etc.) By calculating the correlation value sequence for, the line identification process for identifying the line breaks of the symbol information is included, so the symbol information is reduced after reducing noise due to quantization errors and local contamination. Can be specified, and as a result, degradation in reliability of decoding can be prevented.

(3) 前記シンボル情報には、当該シンボル情報の開始を示すスタートパターンと、当該シンボル情報の終了を示すストップパターンと、が含まれており、
前記シンボル情報読取方法は、さらに、前記補正画像データ上の行方向において、1カラム分のバーとスペースのランレングスデータ列と、所定の基準パターンと、の類似度を算出することによって、前記スタートパターン又は前記ストップパターンを検出する検出工程を含むことを特徴とする(1)又は(2)記載のシンボル情報読取方法。
(3) The symbol information includes a start pattern indicating the start of the symbol information and a stop pattern indicating the end of the symbol information.
The symbol information reading method further includes calculating the similarity between a bar length and a run length data string of one column and a predetermined reference pattern in a row direction on the corrected image data. The symbol information reading method according to (1) or (2), further comprising a detection step of detecting a pattern or the stop pattern.

本発明によれば、上述したシンボル情報には、シンボル情報の開始を示すスターとパターンと、シンボル情報の終了を示すストップパターンと、が含まれており、また、シンボル情報読取方法には、補正画像データ上の行方向において、1カラム分のバーとスペースのランレングスデータ列と、所定の基準パターンと、の類似度を算出することによって、スタートパターン又はストップパターンを検出する検出工程が含まれることとしたから、量子化誤差や局所的な汚れなどによるノイズを低減した上で、スタートパターン又はストップパターンを検出することができ、ひいては復号の信頼性低下を防ぐことができる。   According to the present invention, the symbol information described above includes a star and pattern indicating the start of the symbol information and a stop pattern indicating the end of the symbol information, and the symbol information reading method includes a correction. A detection step of detecting a start pattern or a stop pattern by calculating a similarity between a run length data string of bars and spaces for one column and a predetermined reference pattern in the row direction on the image data is included. Therefore, it is possible to detect a start pattern or a stop pattern after reducing noise due to quantization error, local contamination, and the like, and to prevent a reduction in decoding reliability.

(4) 前記シンボル情報読取方法は、さらに、前記補正画像データ上の行方向において、1カラム分のバー及びスペースの総個数が、予め設定された個数と等しいか否かを判定する判定工程を含むことを特徴とする(1)から(3)のいずれか記載のシンボル情報読取方法。   (4) The symbol information reading method further includes a determination step of determining whether or not the total number of bars and spaces for one column is equal to a preset number in the row direction on the corrected image data. The symbol information reading method according to any one of (1) to (3), comprising:

本発明によれば、上述したシンボル情報読取方法には、補正画像データ上の行方向において、1カラム分のバー及びスペースの総個数が、予め設定された個数と等しいか否かを判定する判定工程が含まれることとしたから、量子化誤差や局所的な汚れなどによるノイズを低減した上で、所望データを表すデータカラムに異常があるか否かを適切に判定することができ、ひいては復号の信頼性低下を防ぐことができる。   According to the present invention, in the above-described symbol information reading method, it is determined whether or not the total number of bars and spaces for one column is equal to a preset number in the row direction on the corrected image data. Since the process is included, it is possible to appropriately determine whether or not there is an abnormality in the data column representing the desired data after reducing noise due to quantization error or local contamination, and in turn decoding. It is possible to prevent a decrease in reliability.

(5) (1)から(4)のいずれか記載のシンボル情報読取方法を用いて、シンボル情報の読み取りを行う読取手段を備えることを特徴とするシンボル情報読取装置。   (5) A symbol information reading apparatus comprising reading means for reading symbol information using the symbol information reading method according to any one of (1) to (4).

本発明によれば、上述したシンボル情報読取方法を用いて、シンボル情報の読み取りを行う読取手段を備えるシンボル情報読取装置を提供しうるので、量子化誤差や局所的な汚れなどによるノイズを低減することができ、ひいては復号の信頼性低下を防ぐことができる。   According to the present invention, it is possible to provide a symbol information reading apparatus including a reading unit that reads symbol information using the above-described symbol information reading method, so that noise due to quantization error or local contamination is reduced. As a result, it is possible to prevent a decrease in reliability of decoding.

本発明に係るシンボル情報読取方法及びシンボル情報読取装置は、以上説明したように、傾斜角度ゼロの補正画像データを平滑化した上で、シンボル情報のカラムの区切りを特定するものなので、量子化誤差や局所的な汚れなどによるノイズを低減することができ、ひいては復号の信頼性低下を防ぐことができ、また、射影の平均化作用による局所的な汚れなどのノイズの影響をも低減することができる。   Since the symbol information reading method and the symbol information reading apparatus according to the present invention smooth the corrected image data with zero tilt angle and specify the column separator of the symbol information as described above, the quantization error Noise and local contamination can be reduced, which in turn can prevent degradation in decoding reliability, and can also reduce the effects of noise such as local contamination due to projection averaging. it can.

以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

[シンボル情報読取装置]
図1は、本発明の実施の形態に係るシンボル情報読取装置1の電気的構成を示すブロック図である。
[Symbol information reader]
FIG. 1 is a block diagram showing an electrical configuration of a symbol information reading apparatus 1 according to an embodiment of the present invention.

図1において、シンボル情報読取装置1は、密着型の撮像素子11aと、カード搬送機構11bと、を有する撮像装置11と、画像メモリ12と、データ処理装置13と、を備えている。また、データ処理装置13は、位置検出部13aと、傾き補正部13bと、構造解析部13cと、復号部13dと、を備えている。また、バーコードなどのシンボル情報が付与されたカード等の記録担体2には、二次元バーコードのバーコードシンボル21が印刷されている。   In FIG. 1, the symbol information reading device 1 includes an imaging device 11 having a contact-type imaging device 11 a and a card transport mechanism 11 b, an image memory 12, and a data processing device 13. The data processing device 13 includes a position detection unit 13a, an inclination correction unit 13b, a structure analysis unit 13c, and a decoding unit 13d. A barcode symbol 21 of a two-dimensional barcode is printed on a record carrier 2 such as a card to which symbol information such as a barcode is given.

撮像装置11の撮像素子11aは、記録担体2に印刷されたバーコードシンボル21を、光電変換によって撮像する。画像メモリ12は、撮像素子11aによって撮像されたバーコードシンボル21の画像データを記憶する。データ処理装置13は、バーコードシンボル21の画像データを画像メモリ12から取り込み、取り込んだ画像データに対して様々な処理を施す。   The imaging device 11a of the imaging device 11 images the barcode symbol 21 printed on the record carrier 2 by photoelectric conversion. The image memory 12 stores image data of the barcode symbol 21 imaged by the image sensor 11a. The data processing device 13 captures the image data of the barcode symbol 21 from the image memory 12 and performs various processes on the captured image data.

このような電気的構成からなるシンボル情報読取装置1において、本発明の実施の形態に係るシンボル情報読取方法について説明する。   A symbol information reading method according to an embodiment of the present invention in the symbol information reading device 1 having such an electrical configuration will be described.

[シンボル情報読取方法]
図2は、本発明の実施の形態に係るシンボル情報読取方法の流れを示すフローチャートである。図2を用いて、本発明の実施の形態に係るシンボル情報読取方法の流れを概説する。
[Symbol information reading method]
FIG. 2 is a flowchart showing the flow of the symbol information reading method according to the embodiment of the present invention. The flow of the symbol information reading method according to the embodiment of the present invention will be outlined with reference to FIG.

まず、位置検出が行われる(ステップS21)。より具体的には、シンボル情報読取装置1の撮像素子11aは、カード搬送機構11bに沿って所定位置まで移動した記録担体2のバーコードシンボル21を、光電変換によって撮像する。そして、撮像されたバーコードシンボル21の画像データは、画像メモリ12において記憶される。なお、この画像メモリ12は、RAM,SDRAM,DDRSDRAM,RDRAMなど、画像データを記憶しうるものであれば如何なるものであってもよい。   First, position detection is performed (step S21). More specifically, the imaging element 11a of the symbol information reading apparatus 1 images the barcode symbol 21 of the record carrier 2 that has moved to a predetermined position along the card transport mechanism 11b by photoelectric conversion. The captured image data of the barcode symbol 21 is stored in the image memory 12. The image memory 12 may be anything such as RAM, SDRAM, DDRSDRAM, RDRAM, etc. as long as it can store image data.

その後、データ処理装置13の位置検出部13aは、画像メモリ12で記憶された画像データを読み込み、その画像データ中のバーコードシンボル21の位置を検出する。   Thereafter, the position detection unit 13a of the data processing device 13 reads the image data stored in the image memory 12, and detects the position of the barcode symbol 21 in the image data.

次いで、データ処理装置13において、傾き補正が行われる(ステップS22)。より具体的には、データ処理装置13の傾き補正部13bは、ステップS21において位置検出された画像データを読み込み、その画像データを、傾斜角度ゼロの補正画像データに変換する。   Next, tilt correction is performed in the data processing device 13 (step S22). More specifically, the inclination correction unit 13b of the data processing device 13 reads the image data whose position has been detected in step S21, and converts the image data into corrected image data with a zero inclination angle.

次いで、データ処理装置13において、構造解析が行われる(ステップS23)。より具体的には、データ処理装置13の構造解析部13cは、ステップS22において変換された補正画像データに基づき、バーコードシンボル21の構造を解析する。   Next, structural analysis is performed in the data processing device 13 (step S23). More specifically, the structure analysis unit 13c of the data processing device 13 analyzes the structure of the barcode symbol 21 based on the corrected image data converted in step S22.

最後に、データ処理装置13の復号部13dにおいて、復号の処理が行われる(ステップS24)。より具体的には、データ処理装置13の復号部13dは、ステップS23において解析されたバーコードシンボル21の構造に基づき、バーコードシンボル21の復号処理を行う。なお、復号処理に失敗した場合には、処理を再度ステップS21に戻す。   Finally, decryption processing is performed in the decryption unit 13d of the data processing device 13 (step S24). More specifically, the decoding unit 13d of the data processing device 13 performs the decoding process of the barcode symbol 21 based on the structure of the barcode symbol 21 analyzed in step S23. If the decoding process fails, the process returns to step S21 again.

図3は、上述したステップS21において撮像されたバーコードシンボル21の画像データの一例を示す図である。図3に示すバーコードシンボル21は、スタック型バーコードの一種であるPDF417のラベル構造によるバーコードシンボルを表している。   FIG. 3 is a diagram illustrating an example of the image data of the barcode symbol 21 captured in step S21 described above. A bar code symbol 21 shown in FIG. 3 represents a bar code symbol having a label structure of PDF417, which is a kind of stack type bar code.

図3において、バーコードシンボル21は、図中の縦方向をロウ方向、横方向をカラム方向とし、カラム方向は5つに大きく分かれている(図3では5カラムに分かれている)。そして、中央にデータカラムが配置され、また、データカラムの左右にはレフトロウインジケータ,ライトロウインジケータ、更にその左右にはスタートパターン,ストップパターンが配置されている。一方で、図3に示すバーコードシンボル21は6行から構成され、各行にはデータワードが1個ずつ含まれている。従って、バーコードシンボル21のデータ個数は、1個(データカラム1カラム分)×6行より6個となる。   In FIG. 3, the barcode symbol 21 has a vertical direction in the figure as a row direction and a horizontal direction as a column direction, and the column direction is largely divided into five (in FIG. 3, it is divided into five columns). A data column is arranged at the center, a left row indicator and a right row indicator are arranged on the left and right sides of the data column, and a start pattern and a stop pattern are arranged on the left and right sides thereof. On the other hand, the barcode symbol 21 shown in FIG. 3 is composed of six rows, and each row contains one data word. Therefore, the number of data of the barcode symbol 21 is 6 (1 (for one data column) × 6 rows).

図4は、撮像装置11の撮像素子11aによって、バーコードシンボル21が傾いた状態で撮像された様子を示す図である。バーコードシンボル21を撮像装置11でスキャンしたときには、ロウ方向が必ずしもカード搬送機構11bに対して垂直の関係に位置するとは限らない。撮像素子11aによって読み取られた画像データは、例えば図4に示すように傾く場合がある。このような場合に、従来のシンボル情報読取装置1では、量子化誤差に起因したノイズによって、復号の信頼性が損なわれていた。しかし、本発明によれば、かかるノイズの影響を低減することができる。以下、図2に示すフローチャートの各処理(ステップS21〜ステップS24)について詳述する。   FIG. 4 is a diagram illustrating a state in which the barcode symbol 21 is imaged in an inclined state by the imaging element 11 a of the imaging device 11. When the barcode symbol 21 is scanned by the imaging device 11, the row direction is not necessarily located in a vertical relationship with respect to the card transport mechanism 11b. The image data read by the image sensor 11a may be tilted as shown in FIG. 4, for example. In such a case, in the conventional symbol information reading apparatus 1, the reliability of decoding has been impaired due to noise caused by the quantization error. However, according to the present invention, the influence of such noise can be reduced. Hereinafter, each process (step S21-step S24) of the flowchart shown in FIG. 2 will be described in detail.

[位置検出]
図5は、図2に示すフローチャートにおける位置検出の流れを示すフローチャートである。また、図6は、バーコードシンボル21のうち、スタートパターンにおけるビッグバーの部分及びその周辺を拡大した拡大図である。
[Position detection]
FIG. 5 is a flowchart showing the flow of position detection in the flowchart shown in FIG. FIG. 6 is an enlarged view in which the big bar portion and its periphery in the start pattern of the barcode symbol 21 are enlarged.

図5において、まず、変数iに0を代入して初期化する(ステップS51)。   In FIG. 5, first, the variable i is initialized by substituting 0 (step S51).

次いで、Y=iにおける水平ラインL(i)上で、X方向に画像データを読み込み、画像が明から暗に変化する点(点P(i)とする)を検索する。また、同じライン上で、今度は画像が暗から明に変化する点(点Q(i)とする)を検索する(ステップS52)。   Next, on the horizontal line L (i) at Y = i, image data is read in the X direction, and a point where the image changes from light to dark (referred to as point P (i)) is searched. In addition, a point where the image changes from dark to light (referred to as point Q (i)) is searched for on the same line (step S52).

次いで、i=n−1(n:図6におけるY方向の画素数)が満たされたか否かが判断され(ステップS53)、満たされていないと判定された場合には、iを1だけインクリメントして(ステップS54)、再びステップS52の処理が行われる。一方で、満たされたと判定された場合には、処理を次のステップS55に移す。なお、この段階で、n個の点の組(P(i),Q(i))(I=0,1,・・・,n−2,n−1)を得る。   Next, it is determined whether i = n−1 (n: the number of pixels in the Y direction in FIG. 6) is satisfied (step S53). If it is determined that i is not satisfied, i is incremented by one. Then (step S54), the process of step S52 is performed again. On the other hand, when it determines with satisfy | filling, a process is moved to following step S55. At this stage, a set of n points (P (i), Q (i)) (I = 0, 1,..., N−2, n−1) is obtained.

次いで、図6中の点Aと点Cの座標を求める(ステップS55)。より具体的には、D(i)=|P(i)−Q(i)|を計算し、D(i)のうちの最小値min(D(i))を求める。このmin(D(i))が、PQ間の距離の最も短くなるビックバーの点A及び点Cの2点に対応する(図6参照)。これにより、点A及び点CのY座標は、それぞれAy=min(i)及びCy=max(i)となる。また、点A及び点CのX座標は、それぞれのiに対する点PのX座標になるので、それぞれAx=P(i=Ay)のX座標及びCx=P(i=Cy)のX座標となる。   Next, the coordinates of point A and point C in FIG. 6 are obtained (step S55). More specifically, D (i) = | P (i) −Q (i) | is calculated, and the minimum value min (D (i)) of D (i) is obtained. This min (D (i)) corresponds to two points of the big bar point A and point C where the distance between the PQs is the shortest (see FIG. 6). Thereby, the Y coordinate of the point A and the point C becomes Ay = min (i) and Cy = max (i), respectively. Further, since the X coordinates of the point A and the point C are the X coordinates of the point P with respect to each i, the X coordinate of Ax = P (i = Ay) and the X coordinate of Cx = P (i = Cy), respectively. Become.

次いで、図6中の点Bと点Cの座標を求める(ステップS56)。より具体的には、D(i)が一定となるiの範囲を特定する。そして、ビックバーの点B及び点DのY座標は、その範囲におけるmax(i)及びmin(i)となる。また、点B及び点DのX座標は、それぞれのiに対する点P及び点QのX座標となるので、それぞれBx=P(i=By)のX座標及びDx=Q(i=Dy)のX座標となる。   Next, the coordinates of point B and point C in FIG. 6 are obtained (step S56). More specifically, the range of i in which D (i) is constant is specified. The Y coordinates of the points B and D of the big bar are max (i) and min (i) in the range. Since the X coordinates of the points B and D are the X coordinates of the points P and Q with respect to each i, the X coordinates of Bx = P (i = By) and Dx = Q (i = Dy) respectively. X coordinate.

このようにして、ステップS51〜ステップS56の処理を経て、ビックバーの4隅の座標が確定したので、傾き角度は、atan((Ay−Dy)/(Ax−Dx))で計算することができる。   In this way, since the coordinates of the four corners of the big bar are determined through the processing of step S51 to step S56, the inclination angle can be calculated by atan ((Ay−Dy) / (Ax−Dx)). .

なお、傾き検出の精度を上げるため、図6において、XとYの役割を交換して同様の操作を行い、ビックバーの4隅の座標A',B',C',D'を求め、もとの座標値A,B,C,Dとの平均をとって最終的な座標値としてもよい。   In order to increase the accuracy of tilt detection, the same operation is performed by exchanging the roles of X and Y in FIG. 6 to obtain the coordinates A ′, B ′, C ′, D ′ of the four corners of the big bar. The average of the coordinate values A, B, C, and D may be taken as final coordinate values.

また、図5では、点A及び点Cの座標を求めるとともに(ステップS55)、点B及び点Dの座標も求めることとしたが(ステップS56)、本発明はこれに限定されず、例えば点A及び点Cの座標のみを求めることで、傾き検出を行うようにしてもよい。   In FIG. 5, the coordinates of the points A and C are obtained (step S55), and the coordinates of the points B and D are also obtained (step S56). However, the present invention is not limited to this. The inclination may be detected by obtaining only the coordinates of A and point C.

[傾き補正]
図7は、上述した角度(=atan((Ay−Dy)/(Ax−Dx)))で傾いたバーコードシンボル21の画像データを、傾斜角度ゼロの補正画像データに変換したときの様子を示す図である。
[Tilt correction]
FIG. 7 shows a state in which the image data of the barcode symbol 21 inclined at the above-described angle (= atan ((Ay−Dy) / (Ax−Dx))) is converted into corrected image data having a zero inclination angle. FIG.

図7において、傾斜角度ゼロの補正画像データへの変換は、バーコードシンボル21の傾斜角度を用いて行う。例えば、アフィン変換などの方法によって行うことができる。そして、本発明の実施の形態に係るシンボル情報読取方法では、座標変換に伴う量子化誤差の影響を緩和するため、座標変換後の画像に対して、平滑化を目的として補間処理又は平均化処理を行う。例えば、補正画像データを、メディアンフィルタ,エッジ保存フィルタ,適応ウィナーフィルタ,移動平均フィルタなどの各種フィルタにかけることによって行われる。   In FIG. 7, conversion to corrected image data with a tilt angle of zero is performed using the tilt angle of the barcode symbol 21. For example, it can be performed by a method such as affine transformation. In the symbol information reading method according to the embodiment of the present invention, an interpolation process or an averaging process is performed on the image after the coordinate conversion for the purpose of smoothing in order to reduce the influence of the quantization error accompanying the coordinate conversion. I do. For example, the correction image data is applied to various filters such as a median filter, an edge preserving filter, an adaptive winner filter, and a moving average filter.

[構造解析]
図8は、図2に示すフローチャートにおける構造解析の流れを示すフローチャートである。
[Structural analysis]
FIG. 8 is a flowchart showing the flow of structural analysis in the flowchart shown in FIG.

図8において、まず、水平射影の処理が行われ(ステップS81)、その後、射影の差分を用いてスタートパターン及びストップパターンの解析が行われる(ステップS82)。スタートパターンとストップパターンは、他のコードワードと異なり、全てのロウに共通不変のパターンであることから、射影をとることでパターンが平均化され安定した検出が可能である。   In FIG. 8, first, a horizontal projection process is performed (step S81), and then a start pattern and a stop pattern are analyzed using the difference in projection (step S82). Unlike the other code words, the start pattern and the stop pattern are invariant patterns common to all the rows. Therefore, by taking a projection, the patterns are averaged and stable detection is possible.

図9は、平均化された補正画像データ(図7参照)に所定の処理を施して得られた図である。より具体的には、図9(a)は、平均化された補正画像データ(図7参照)について、水平方向(図3でいえば、ロウ方向)の射影を計算したものであり、また、図9(b)は、図9(a)のグラフについて差分を計算したものである。   FIG. 9 is a diagram obtained by performing predetermined processing on the averaged corrected image data (see FIG. 7). More specifically, FIG. 9A shows a calculation of a projection in the horizontal direction (in the row direction in FIG. 3) for the averaged corrected image data (see FIG. 7). FIG. 9B shows the difference calculated for the graph of FIG.

スタートパターンの検出は、図9(a)又は図9(b)に示されるグラフを用いて、パターンが変化する点の間隔(ランレングス)を画素数でカウントすることによって行われる。例えば、図9(b)において、パターンが変化する点の感覚は、StartWork=[47,6,5,6,7,6,6,18]と求められる。一方で、スタートパターンのバーとスペースの長さの比は、PDF417の規格より、StartMark=[8,1,1,1,1,1,1,3]となっている。ここで、両者の類似性を調べる指標として、例えば正規化相関Rを用いることができる。図9(b)について、正規化相関Rを考えると、R=corrcoef(StartWork,StartMark)=0.9993となり、Rは十分1に近い。従って、この場合には、適切にスタートパターンが検出されたと判定されることになる。   The detection of the start pattern is performed by counting the interval (run length) of the points where the pattern changes by the number of pixels using the graph shown in FIG. 9A or 9B. For example, in FIG. 9B, the sense of the point where the pattern changes is obtained as StartWork = [47, 6, 5, 6, 7, 6, 6, 18]. On the other hand, the ratio between the length of the start pattern bar and the space is StartMark = [8, 1, 1, 1, 1, 1, 1, 3] according to the PDF417 standard. Here, for example, a normalized correlation R can be used as an index for examining the similarity between the two. In FIG. 9B, when considering the normalized correlation R, R = corrcoef (StartWork, StartMark) = 0.993, and R is sufficiently close to 1. Therefore, in this case, it is determined that the start pattern is appropriately detected.

このようにして、スタート/ストップパターンが適切に検出されたか否かが判断された後(ステップS83)、スタート/ストップパターンが適切に検出されたと判定された場合には、処理をステップS85に移す。一方で、スタート/ストップパターンが適切に検出されていないと判定された場合には、デコード不可として処理を終了する(ステップS84)。   Thus, after it is determined whether or not the start / stop pattern is properly detected (step S83), if it is determined that the start / stop pattern is properly detected, the process proceeds to step S85. . On the other hand, when it is determined that the start / stop pattern is not properly detected, the process is terminated as being undecodable (step S84).

なお、本実施形態では、類似性の尺度として、正規化相関Rを用いることとしたが、本発明はこれに限られず、例えば差分絶対値和,積和などを適宜用いることができる。   In this embodiment, the normalized correlation R is used as a measure of similarity. However, the present invention is not limited to this, and for example, sum of absolute differences, sum of products, etc. can be used as appropriate.

次いで、図9(b)のグラフに関してピーク検出が行われる(ステップS85)。より具体的には、コードワードの境界では全てのロウにおいてスペースからバーへの遷移が行われるため、射影の差分波形上、この部分で大きな差分値が現れる(図9(b)の上向き矢印)。そして、図9(b)の上向き矢印で示した差分値(ピーク値)を求めるには、適当な閾値を用意して、その閾値を超えたか超えないかでピークの有無を判定することができる。なお、このピークの位置は、次の処理で用いるので記憶しておく。   Next, peak detection is performed on the graph of FIG. 9B (step S85). More specifically, since a transition from space to bar occurs in all rows at the codeword boundary, a large difference value appears in this portion on the projected difference waveform (upward arrow in FIG. 9B). . Then, in order to obtain the difference value (peak value) indicated by the upward arrow in FIG. 9B, an appropriate threshold value is prepared, and the presence or absence of a peak can be determined based on whether or not the threshold value is exceeded. . Note that this peak position is stored for use in the next processing.

次いで、カラム境界の検出が行われる(ステップS86)。より具体的には、ステップS85において記憶されたピークの位置に基づき、カラムの境界を検出する。また、隣接するピークとピークの間隔はカラムの幅を表すものであり、同様に記憶しておく。ここで、ある特定のロウにおいてこの境界近傍に汚れがあった場合、ロウのスキャン中にコードワードの変化点を正しく検出できない場合があるが、本実施形態のように射影を用いることで、この汚れの影響が平均化作用によって小さくなり、コードワード境界の検出への悪影響を抑えることができる。   Next, column boundary detection is performed (step S86). More specifically, the column boundary is detected based on the peak position stored in step S85. The interval between adjacent peaks represents the column width and is stored in the same manner. Here, if there is a stain near this boundary in a specific row, the codeword change point may not be detected correctly during the scan of the row, but by using projection as in the present embodiment, this The influence of the contamination is reduced by the averaging operation, and the adverse effect on the detection of the codeword boundary can be suppressed.

次いで、ロウ境界の検出が行われる(ステップS87)。より具体的には、図10及び図11を用いて説明する。図10は、平均化された補正画像データの水平方向において、各ラインの画素値を示す波形図である。図11は、バーコードシンボル21の行の区切りを特定する様子を説明するための説明図である。   Next, a row boundary is detected (step S87). More specifically, a description will be given with reference to FIGS. FIG. 10 is a waveform diagram showing pixel values of each line in the horizontal direction of the averaged corrected image data. FIG. 11 is an explanatory diagram for explaining a state in which a line break of the barcode symbol 21 is specified.

図10(a)において、ロウ境界の検出は、まず、平均化された補正画像データ上に、連続する複数の行からなる組を設定する。例えば、連続する3個の水平ラインL(1),L(2)及びL(3)(以下、「L1,L2及びL3と略す」)からなる組(ライン組S1)を設定する。   In FIG. 10A, the detection of the row boundary is performed by first setting a set of a plurality of consecutive rows on the averaged corrected image data. For example, a set (line set S1) composed of three consecutive horizontal lines L (1), L (2) and L (3) (hereinafter abbreviated as “L1, L2 and L3”) is set.

そして、これらの自己正規化相関及び相互正規化相関を求めると、全部で9個の相関値(L1とL1,L2とL2,L3とL3について自己正規化相関を計算した値(3個)と、L1とL2,L1とL3,L2とL1,L2とL3,L3とL1,L3とL2について相互正規化相関を計算した値(6個)と、の9個の相関値からなる相関値列)が得られる。9個の相関値のうちの最も小さい値が、予め決められた閾値r0よりも大きければ、このライン組S1に1が与えられ、予め決められた閾値r0よりも小さければ、このライン組S1に0が与えられる。   Then, when these self-normalized correlations and cross-normalized correlations are obtained, a total of nine correlation values (values obtained by calculating self-normalized correlations for L1 and L1, L2 and L2, L3 and L3 (three) and , L1 and L2, L1 and L3, L2 and L1, L2 and L3, L3 and L1, and L3 and L2 are calculated as a correlation value string consisting of nine correlation values (6). ) Is obtained. If the smallest value among the nine correlation values is larger than a predetermined threshold value r0, 1 is given to this line set S1, and if it is smaller than the predetermined threshold value r0, this line set S1 is assigned to this line set S1. 0 is given.

ここで、水平ラインL1,L2及びL3からなる組については、水平ラインL1,L2及びL3が全てロウ1(最も上のロウ)に含まれていることから、9個の相関値のうちの最も小さい値は閾値r0よりも大きくなり、1が与えられることになる(図11において、ライン組S1の判定値は1となっている)。   Here, for the set of horizontal lines L1, L2, and L3, since the horizontal lines L1, L2, and L3 are all included in row 1 (the uppermost row), the highest of the nine correlation values. The smaller value is larger than the threshold value r0 and 1 is given (in FIG. 11, the determination value of the line set S1 is 1).

次に、補正画像データに対して上述した組を相対的に移動させて(例えばL2,L3及びL4からなるライン組S2を考えて)、相関値列を算出し、算出された相関値列の最小値が閾値よりも大きいか否かを判断することによって、そのライン組に0又は1の判定値が与えられる。   Next, the above-described set is moved relative to the corrected image data (for example, considering the line set S2 including L2, L3, and L4), a correlation value sequence is calculated, and the calculated correlation value sequence By determining whether or not the minimum value is greater than the threshold value, a determination value of 0 or 1 is given to the line set.

以下同様に、水平ラインLn−2,Ln−1,Ln(ライン組Sn−2)まで上述した処理(判定値を与える処理)を繰り返し行うと、全部でn−2個の1と0とからなる系列が得られる(図11の右欄)。   Similarly, when the above-described processing (processing for giving a judgment value) is repeated up to the horizontal lines Ln-2, Ln-1, Ln (line set Sn-2), a total of n-2 1s and 0s are obtained. Is obtained (right column in FIG. 11).

ここで、3個の水平ラインが同一ロウから選ばれている場合は、それら3個の水平ラインよりなるライン組は1に近い値となり、3個の水平ラインがロウをまたいで選ばれている場合は、それら3個の水平ラインよりなるライン組は比較的小さい値となる。より具体的には、図10(b)において、水平ラインL18より上の水平ラインはロウ1に属し、水平ラインL18より下の水平ラインはロウ2に属し、この水平ラインL18は、ロウ1とロウ2の境界に位置する水平ラインとなっている。   Here, when three horizontal lines are selected from the same row, the line set consisting of these three horizontal lines has a value close to 1, and the three horizontal lines are selected across the rows. In this case, the line set made up of these three horizontal lines has a relatively small value. More specifically, in FIG. 10B, the horizontal line above the horizontal line L18 belongs to row 1, the horizontal line below the horizontal line L18 belongs to row 2, and this horizontal line L18 is It is a horizontal line located at the boundary of row 2.

従って、この水平ラインL18を含むライン組では、判定値がほぼ0となり、それ以外では、判定値は1となる(図11参照)。判定値が0に近いライン組は、ロウの切り替わりを表しているので、判定値の系列をスキャンして、その判定値が0に近い場所を特定することにより、ロウの切り替わり位置を知ることができる。なお、本実施形態では、相関関数によって水平ライン相互の類似性を評価しているので、図10(a)に図示するように、スタートパターンやストップパターンのような共通パターンを除いた範囲を評価範囲とすることで、無駄な演算(計算コスト)を省くことができる。   Accordingly, in the line set including the horizontal line L18, the determination value is almost 0, and in other cases, the determination value is 1 (see FIG. 11). A line set whose judgment value is close to 0 represents a change of row. Therefore, by scanning a series of determination values and identifying a place where the determination value is close to 0, it is possible to know the change position of a row. it can. In this embodiment, since the similarity between horizontal lines is evaluated by a correlation function, a range excluding common patterns such as a start pattern and a stop pattern is evaluated as shown in FIG. By setting the range, useless calculation (calculation cost) can be omitted.

以上説明したように、ライン組の設定→相関値列の算出→相関値列の最小値と閾値との比較→0又は1の判定値付与→判定値の系列のスキャン、という流れによって、ステップS87のロウ境界の検出が行われることになる。   As described above, step S87 is performed according to the flow of setting a line group, calculating a correlation value sequence, comparing the minimum value of the correlation value sequence with a threshold value, providing a determination value of 0 or 1, and scanning a sequence of determination values. The row boundary is detected.

なお、ロウ境界の検出によって、補正画像データの各水平ラインがどのロウに属するかを判定できたら、デコード可能として処理を終了する(ステップS88)。また、ロウごとに、それに含まれる水平ラインの平均を計算することによって、水平ラインの局所ノイズを低減することができる。さらに、平均化後の水平ラインを、そのロウの画素パターンとして後述する復号処理に用いることができる。これにより、復号精度を向上させることができる。   Note that if it is possible to determine which row each horizontal line of the corrected image data belongs to by detecting the row boundary, the process is terminated as being decodable (step S88). Moreover, the local noise of a horizontal line can be reduced by calculating the average of the horizontal lines included in each row. Further, the horizontal line after the averaging can be used as a pixel pattern of the row for a decoding process described later. Thereby, decoding accuracy can be improved.

[復号処理]
図12は、図2に示すフローチャートにおける復号の流れを示すフローチャートである。
[Decryption process]
FIG. 12 is a flowchart showing the flow of decoding in the flowchart shown in FIG.

図12において、まず、線幅計測が行われる(ステップS121)。より具体的には、線幅計測とは、各ロウの画素パターンをスキャンして、バーとスペースの長さ、すなわち線幅を求める処理をいう。この線幅計測について、図13を用いて詳しく説明する。   In FIG. 12, first, line width measurement is performed (step S121). More specifically, the line width measurement is a process of scanning the pixel pattern of each row to obtain the length of the bar and space, that is, the line width. This line width measurement will be described in detail with reference to FIG.

図13は、ロウの画素パターンの一部を示す波形図である。なお、バー幅及びスペース幅は、パターンの変化点と変化点の間の画素数をカウントしたものである。1カラムは、4個のバーと4個のスペースで構成されるため、画素パターンに損傷のない場合には、図13(a)に示すように、合計8個の幅データが得られる。   FIG. 13 is a waveform diagram showing a part of a row pixel pattern. The bar width and the space width are obtained by counting the number of pixels between the change points of the pattern. Since one column is composed of four bars and four spaces, when there is no damage to the pixel pattern, a total of eight width data is obtained as shown in FIG.

一方で、画素パターンに異常がある場合には、図13(b)に示すように、合計8個以上(9個)の幅データが得られる。かかる場合には、カラムに損傷があることが分かり、このカラムの信頼性が低いことを示すフラグをセットする。かかる操作を画素パターンの終わりまで実行したら、次のロウにおいても同様の処理を実行する。全てのロウについて、線幅データが得られたら、ステップS121(図12参照)の処理を終了する。   On the other hand, when there is an abnormality in the pixel pattern, a total of 8 or more (9) width data is obtained as shown in FIG. In such a case, it is found that the column is damaged, and a flag indicating that the reliability of this column is low is set. When this operation is executed up to the end of the pixel pattern, the same processing is executed in the next row. When the line width data is obtained for all the rows, the processing in step S121 (see FIG. 12) is terminated.

次いで、線幅正規化処理が行われる(ステップ122)。線幅正規化処理は、画素数によって表現されている線幅データをモジュール数表現に変換する処理をいう。1モジュールは、バー又はスペースの最小幅に対応する。1カラムは17モジュールによって構成される。1カラム内の線幅データをW1,W2,W3,W4,W5,W6,W7,W8とし、Wc=W1+W2+W3+W4+W5+W6+W7+W8とすれば、正規化線幅データは、Xi=Wi*17/Wc(i=1,2,…,7,8)で表されるXシーケンスとなる。例えば、図13(a)に示す左側のカラムのXシーケンスは、[5,1,1,1,1,1,5,2]である。   Next, line width normalization processing is performed (step 122). The line width normalization process refers to a process of converting line width data expressed by the number of pixels into a module number expression. One module corresponds to the minimum width of the bar or space. One column is composed of 17 modules. If the line width data in one column is W1, W2, W3, W4, W5, W6, W7, W8, and Wc = W1 + W2 + W3 + W4 + W5 + W6 + W7 + W8, the normalized line width data is Xi = Wi * 17 / Wc (i = 1 , 2,..., 7, 8). For example, the X sequence of the left column shown in FIG. 13A is [5, 1, 1, 1, 1, 1, 5, 2].

さらに、Xシーケンスは、tシーケンスに変換される。これは、隣接する2個のXiとXi+1を加算したものであり、図13(a)に示す左側のカラムのXシーケンスをtシーケンスに変換すると、[6,2,2,2,2,6,7]となる。   Further, the X sequence is converted into a t sequence. This is a sum of two adjacent Xi and Xi + 1. When the X sequence in the left column shown in FIG. 13A is converted into a t sequence, [6, 2, 2, 2, 2, 6 , 7].

次いで、コードワード変換が行われる(ステップS123)。より具体的には、ステップS122において求められたtシーケンスに対応するコードワードを所定の参照テーブルから取得する。なお、コードワード変換が完了すると、一般的なハイレベル復号が行われ(ステップS124)、復号処理が完了する。また、復号処理が完了したデータについては、シンボル画像などとともに上位制御装置に出力されることになる。   Next, code word conversion is performed (step S123). More specifically, a code word corresponding to the t sequence obtained in step S122 is acquired from a predetermined reference table. When codeword conversion is completed, general high-level decoding is performed (step S124), and the decoding process is completed. Further, the data for which the decoding process has been completed is output to the upper control apparatus together with the symbol image and the like.

以上説明したように、図2に示す流れで行われるシンボル情報読取方法によれば、適宜施される補間処理や平均化処理によって、量子化誤差や局所的な汚れなどによるノイズを低減することができ、ひいては復号の信頼性低下を防ぐことができる。   As described above, according to the symbol information reading method performed in the flow shown in FIG. 2, noise due to quantization error, local contamination, and the like can be reduced by appropriate interpolation processing and averaging processing. As a result, the reliability of decoding can be prevented from being lowered.

また、本実施形態では、一次元撮像素子やリニア搬送機構の組合せに対して本発明を適用することとしたが、本発明はこれに限られることなく、例えば、二次元CCDやCMOSイメージャなどのエリアセンサと被写体支持機構との組合せに対して本発明を適用することとしてもよい。   In the present embodiment, the present invention is applied to a combination of a one-dimensional imaging device and a linear transport mechanism. However, the present invention is not limited to this, and examples thereof include a two-dimensional CCD and a CMOS imager. The present invention may be applied to a combination of an area sensor and a subject support mechanism.

さらに、本実施形態では、バーコードラベルにPDF417フォーマットを用いることとしたが、本発明はこれに限られることなく、例えば、バーコードラベルにCode49その他のスタック型バーコードや、JAN等の一次元バーコードを用いることとしてもよい。   Furthermore, in the present embodiment, the PDF417 format is used for the bar code label. However, the present invention is not limited to this. For example, the bar code label is a one-dimensional code such as Code 49 or other stack type bar code or JAN. A bar code may be used.

本発明に係るシンボル情報読取方法及びシンボル情報読取装置は、量子化誤差や局所的な汚れなどによるノイズを低減することで、復号の信頼性低下を防ぐことができるものとして有用である。   INDUSTRIAL APPLICABILITY The symbol information reading method and symbol information reading apparatus according to the present invention are useful as those capable of preventing deterioration in decoding reliability by reducing noise due to quantization error and local contamination.

本発明の実施の形態に係るシンボル情報読取装置の電気的構成を示すブロック図である。It is a block diagram which shows the electrical constitution of the symbol information reader which concerns on embodiment of this invention. 本発明の実施の形態に係るシンボル情報読取方法の流れを示すフローチャートである。It is a flowchart which shows the flow of the symbol information reading method which concerns on embodiment of this invention. 上述したステップS21において撮像されたバーコードシンボルの画像データの一例を示す図である。It is a figure which shows an example of the image data of the barcode symbol imaged in step S21 mentioned above. 撮像装置の撮像素子によって、バーコードシンボルが傾いた状態で撮像された様子を示す図である。It is a figure which shows a mode that it imaged in the state in which the barcode symbol inclined by the image pick-up element of the imaging device. 図2に示すフローチャートにおける位置検出の流れを示すフローチャートである。It is a flowchart which shows the flow of the position detection in the flowchart shown in FIG. バーコードシンボルのうち、スタートパターンにおけるビッグバーの部分及びその周辺を拡大した拡大図である。It is the enlarged view which expanded the part of the big bar in a start pattern, and its periphery among barcode symbols. 所定の角度で傾いたバーコードシンボルの画像データを、傾斜角度ゼロの補正画像データに変換したときの様子を示す図である。It is a figure which shows a mode when the image data of the barcode symbol inclined by the predetermined angle is converted into the correction image data of zero inclination angle. 図2に示すフローチャートにおける構造解析の流れを示すフローチャートである。It is a flowchart which shows the flow of the structural analysis in the flowchart shown in FIG. 平均化された補正画像データ(図7参照)に所定の処理を施して算出された図である。It is the figure calculated by giving a predetermined process to the averaged correction image data (refer FIG. 7). 平均化された補正画像データの水平方向において、各ラインの画素値を示す波形図である。It is a wave form diagram which shows the pixel value of each line in the horizontal direction of the averaged correction | amendment image data. バーコードシンボルの行の区切りを特定する様子を説明するための説明図である。It is explanatory drawing for demonstrating a mode that the division | segmentation of the line | wire of a barcode symbol is specified. 図2に示すフローチャートにおける復号の流れを示すフローチャートである。3 is a flowchart showing a decoding flow in the flowchart shown in FIG. 2. ロウの画素パターンの一部を示す波形図である。It is a waveform diagram showing a part of a row pixel pattern.

符号の説明Explanation of symbols

1 シンボル情報読取装置
2 記録担体
11 撮像装置
11a 撮像素子
12 画像メモリ
13 データ処理装置
13a 位置検出部
13b 傾き補正部
13c 構造解析部
13d 復号部
DESCRIPTION OF SYMBOLS 1 Symbol information reader 2 Record carrier 11 Imaging device 11a Imaging element 12 Image memory 13 Data processing device 13a Position detection part 13b Tilt correction part 13c Structure analysis part 13d Decoding part

Claims (5)

媒体上に記録されたシンボル情報を撮像して得られた画像データを処理することによって、当該シンボル情報を読み取るシンボル情報読取方法において、
前記画像データを、傾斜角度ゼロの補正画像データに変換する角度変換工程と、
前記補正画像データを平滑化する平滑化工程と、
前記平滑化工程によって平滑化された補正画像データ上の列方向の総和値を算出することによって、前記シンボル情報のカラムの区切りを特定するカラム特定工程と、を含むことを特徴とするシンボル情報読取方法。
In a symbol information reading method for reading symbol information by processing image data obtained by imaging symbol information recorded on a medium,
An angle conversion step of converting the image data into corrected image data having a tilt angle of zero;
A smoothing step of smoothing the corrected image data;
A column specifying step of specifying a column delimiter of the symbol information by calculating a sum value in the column direction on the corrected image data smoothed by the smoothing step. Method.
前記シンボル情報読取方法は、さらに、
前記平滑化工程によって平滑化された補正画像データ上に、連続する複数の行からなる組を設定し、前記補正画像データに対して前記組を相対的に移動させながら、前記組が設定された行についての相関値列を算出することによって、前記シンボル情報の行の区切りを特定する行特定工程を含むことを特徴とする請求項1記載のシンボル情報読取方法。
The symbol information reading method further includes:
A set consisting of a plurality of continuous rows is set on the corrected image data smoothed by the smoothing step, and the set is set while moving the set relative to the corrected image data. 2. The symbol information reading method according to claim 1, further comprising a row specifying step of specifying a line break of the symbol information by calculating a correlation value sequence for the row.
前記シンボル情報には、当該シンボル情報の開始を示すスタートパターンと、当該シンボル情報の終了を示すストップパターンと、が含まれており、
前記シンボル情報読取方法は、さらに、前記補正画像データ上の行方向において、1カラム分のバーとスペースのランレングスデータ列と、所定の基準パターンと、の類似度を算出することによって、前記スタートパターン又は前記ストップパターンを検出する検出工程を含むことを特徴とする請求項1又は2記載のシンボル情報読取方法。
The symbol information includes a start pattern indicating the start of the symbol information and a stop pattern indicating the end of the symbol information.
The symbol information reading method further includes calculating the similarity between a bar length and a run length data string of one column and a predetermined reference pattern in a row direction on the corrected image data. 3. The symbol information reading method according to claim 1, further comprising a detection step of detecting a pattern or the stop pattern.
前記シンボル情報読取方法は、さらに、前記補正画像データ上の行方向において、1カラム分のバー及びスペースの総個数が、予め設定された個数と等しいか否かを判定する判定工程を含むことを特徴とする請求項1から3のいずれか記載のシンボル情報読取方法。   The symbol information reading method further includes a determination step of determining whether the total number of bars and spaces for one column is equal to a preset number in the row direction on the corrected image data. 4. A symbol information reading method according to claim 1, wherein 請求項1から4のいずれか記載のシンボル情報読取方法を用いて、シンボル情報の読み取りを行う読取手段を備えたことを特徴とするシンボル情報読取装置。
5. A symbol information reading apparatus comprising reading means for reading symbol information using the symbol information reading method according to claim 1.
JP2004369609A 2004-12-21 2004-12-21 Symbol information reading method and symbol information reading apparatus Expired - Fee Related JP4403063B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004369609A JP4403063B2 (en) 2004-12-21 2004-12-21 Symbol information reading method and symbol information reading apparatus
US11/316,546 US7380718B2 (en) 2004-12-21 2005-12-21 Method for reading out symbol information and device for reading out symbol information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004369609A JP4403063B2 (en) 2004-12-21 2004-12-21 Symbol information reading method and symbol information reading apparatus

Publications (2)

Publication Number Publication Date
JP2006178641A true JP2006178641A (en) 2006-07-06
JP4403063B2 JP4403063B2 (en) 2010-01-20

Family

ID=36732712

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004369609A Expired - Fee Related JP4403063B2 (en) 2004-12-21 2004-12-21 Symbol information reading method and symbol information reading apparatus

Country Status (1)

Country Link
JP (1) JP4403063B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266190A (en) * 2008-03-31 2009-11-12 Nidec Sankyo Corp Symbol information reading apparatus and symbol information reading method
JP2010277446A (en) * 2009-05-29 2010-12-09 Toshiba Corp Apparatus and method for processing barcode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266190A (en) * 2008-03-31 2009-11-12 Nidec Sankyo Corp Symbol information reading apparatus and symbol information reading method
JP2010277446A (en) * 2009-05-29 2010-12-09 Toshiba Corp Apparatus and method for processing barcode

Also Published As

Publication number Publication date
JP4403063B2 (en) 2010-01-20

Similar Documents

Publication Publication Date Title
US7380718B2 (en) Method for reading out symbol information and device for reading out symbol information
JP4911340B2 (en) Two-dimensional code detection system and two-dimensional code detection program
US7949187B2 (en) Character string recognition method and device
EP0669593B1 (en) Two-dimensional code recognition method
EP0999519B1 (en) Distortion correction method in optical code reading
EP0685809A2 (en) Method and apparatus for decoding two-dimensional bar code
US8333326B2 (en) Stacked barcode reader and stacked barcode reading method
JP5140820B2 (en) Symbol information reading apparatus and symbol information reading method
JPH0612515A (en) Method and apparatus for decoding two-dimensional bar code using ccd/cmd camera
JP2005173646A (en) Code-kind discrimination method and code border detecting method
US9070033B2 (en) Stack barcode reader and stack barcode reading method
JP6078399B2 (en) Symbol information reading apparatus, symbol information reading method, and program
US8718370B2 (en) Optical information-reading apparatus and optical information-reading method
JP4652201B2 (en) Bar code symbol information reading method and bar code symbol information reading device
US8381983B2 (en) Apparatus and method for reading barcode
JP5379626B2 (en) Stack bar code information reading method and stack bar code information reading device
JP4403063B2 (en) Symbol information reading method and symbol information reading apparatus
JP4874706B2 (en) QR code reader
JP5657987B2 (en) Stacked bar code reader and stack bar code reading method
JP5683891B2 (en) Stacked bar code reader and stack bar code reading method
JP5470734B2 (en) Image processing apparatus and image processing program
JP6393226B2 (en) Stacked bar code reader and stack bar code reading method
JP5453594B2 (en) Symbol information reading apparatus and symbol information reading method
JPH1040331A (en) Bar code reader device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070328

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090911

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: 20091020

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091030

R150 Certificate of patent or registration of utility model

Ref document number: 4403063

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121106

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131106

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees