JP6434354B2 - Symbol information reading apparatus and symbol information reading method - Google Patents

Symbol information reading apparatus and symbol information reading method Download PDF

Info

Publication number
JP6434354B2
JP6434354B2 JP2015074206A JP2015074206A JP6434354B2 JP 6434354 B2 JP6434354 B2 JP 6434354B2 JP 2015074206 A JP2015074206 A JP 2015074206A JP 2015074206 A JP2015074206 A JP 2015074206A JP 6434354 B2 JP6434354 B2 JP 6434354B2
Authority
JP
Japan
Prior art keywords
symbol
map
region
unit
area
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.)
Expired - Fee Related
Application number
JP2015074206A
Other languages
Japanese (ja)
Other versions
JP2016194803A (en
Inventor
中村 宏
宏 中村
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 JP2015074206A priority Critical patent/JP6434354B2/en
Priority to US15/086,812 priority patent/US9928396B2/en
Publication of JP2016194803A publication Critical patent/JP2016194803A/en
Application granted granted Critical
Publication of JP6434354B2 publication Critical patent/JP6434354B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14131D bar codes

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、バーコード等のシンボル情報を光学的に読み取り、処理情報を出力するシンボル情報読取装置およびシンボル情報読取方法に関するものである。   The present invention relates to a symbol information reading apparatus and a symbol information reading method for optically reading symbol information such as a barcode and outputting processing information.

たとえば、種々の情報を表すシンボル情報として、複数のバーとスペースを交互に配置するバーコードがある。このバーコードは、たとえば、個人番号などをバーコードで記録するIDカード等に利用されている。   For example, as symbol information representing various information, there is a barcode in which a plurality of bars and spaces are alternately arranged. This barcode is used, for example, in an ID card or the like that records a personal number or the like as a barcode.

このようなIDカードの全面をスキャンして画像を取り込み、その画像に基づいてバーコードを読み取るバーコード読取装置がある(特許文献1参照)。この特許文献1に示すシンボル情報読取装置では、シンボルラベリングマップ(バーコードマップ)の重心位置を求め、この重心位置を起点としてシンボルラベリングマップ上のバーコードシンボルの左端、右端、上端、下端位置を求め、バーコードシンボルの位置を検出している。   There is a barcode reader that scans the entire surface of such an ID card, captures an image, and reads a barcode based on the image (see Patent Document 1). In the symbol information reading apparatus shown in Patent Document 1, the barycentric position of the symbol labeling map (barcode map) is obtained, and the left end, right end, upper end, and lower end positions of the bar code symbol on the symbol labeling map are determined from this barycentric position. The position of the bar code symbol is detected.

特開2009-266190号公報JP 2009-266190 A

しかしながら、特許文献1に示すシンボル情報読取装置においては、バーコードの位置を検出する際にシンボルラベリングマップ(バーコードマップ)の重心位置を求めるため、同一種類のバーコードが同じ媒体上に2個以上(複数)存在する場合に、重心位置の算出が不安定となって、複数のバーコードを相互に区別することが難しいという課題があった。   However, in the symbol information reading apparatus shown in Patent Document 1, two bar codes of the same type are provided on the same medium in order to obtain the barycentric position of the symbol labeling map (bar code map) when detecting the bar code position. In the case where there are the above (plurality), the calculation of the center of gravity position becomes unstable, and there is a problem that it is difficult to distinguish a plurality of barcodes from each other.

そこで、本発明の課題は、同一種類のシンボルが同じ媒体上に2個以上(複数)存在する場合であっても、複数のシンボルを相互に区別することが可能なシンボル情報読取装置およびシンボル情報読取方法を提供することにある。   Accordingly, an object of the present invention is to provide a symbol information reading apparatus and symbol information capable of distinguishing a plurality of symbols from each other even when two or more (plural) symbols of the same type exist on the same medium. It is to provide a reading method.

上記の課題を解決するため、本発明のシンボル情報読取装置は、同じフォーマットで作成された複数のシンボルが記録された記録媒体を撮像する撮像手段と、前記撮像手段により得られた前記記録媒体の画像データを記憶する画像メモリと、前記画像データを取り込んで、前記シンボルが記録媒体に記録された位置を検出する位置検出処理部と、を有するシンボル情報読取装置であって、前記位置検出処理部は、前記画像データを所定の領域で前記シンボルの走査線の走査方向に沿って輝度値の変動量を計算して、前記シンボルに該当する可能性のある仮領域を判定する仮領域判定部と、前記仮領域について、前記走査線の走査方向に対して直交する方向に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する相関マップ作成部と、前記相関マップについて、前記シンボルの有無を検索し、前記シンボルが存在すると判断した領域をラベリングするラベリング部と、ラベリングされた領域に基づき、前記複数のシンボルのそれぞれについて領域を設定し分割する領域分割部と、前記領域分割部で分割された前記複数のシンボルの各シンボルについてラベリングされた領域に基づき、前記シンボルが記録媒体に記録された位置を検出する位置決定部と、を含むことを特徴とする。   In order to solve the above problems, a symbol information reading apparatus according to the present invention includes an imaging unit that images a recording medium on which a plurality of symbols created in the same format is recorded, and the recording medium obtained by the imaging unit. A position detection processing unit, comprising: an image memory for storing image data; and a position detection processing unit that captures the image data and detects a position where the symbol is recorded on a recording medium. A temporary region determination unit that calculates a variation amount of a luminance value along a scanning direction of the scanning line of the symbol in a predetermined region, and determines a temporary region that may correspond to the symbol; Correlation for creating a map indicating a region having a high correlation value by obtaining a correlation with an adjacent region adjacent to the temporary region in a direction orthogonal to the scanning direction of the scanning line. A map creation unit, a labeling unit that searches for the presence or absence of the symbol in the correlation map, labels a region that is determined to have the symbol, and a region for each of the plurality of symbols based on the labeled region. An area dividing unit for setting and dividing, and a position determining unit for detecting a position where the symbol is recorded on a recording medium based on an area labeled for each of the plurality of symbols divided by the area dividing unit; It is characterized by including.

本発明において、領域分割部でラベリングされた領域に基づき、複数のシンボルのそれぞれについて領域を設定し分割することから、(同じフォーマットで作成された)同一種類のシンボルが同じ記録媒体上に2個以上(複数)存在する場合であっても、分割された領域ごとにシンボルが記録媒体に記録された位置検出処理を行うことができるようになる。その結果、各シンボルの重心位置を安定して算出することができるようになり、複数のシンボルを相互に区別することが可能となる。   In the present invention, since a region is set and divided for each of a plurality of symbols based on the region labeled by the region dividing unit, two symbols of the same type (created in the same format) are recorded on the same recording medium. Even in the case where there are (plural) or more, it is possible to perform position detection processing in which symbols are recorded on the recording medium for each divided area. As a result, the barycentric position of each symbol can be calculated stably, and a plurality of symbols can be distinguished from each other.

また、本発明のシンボル情報処理装置は、前記領域分割部は、前記ラベリング部によるシンボルラベリングマップにおけるシンボル数を判定する個数判定部と、前記個数判定部によりシンボル数が2個以上であると判定された前記シンボルラベリングマップにおける前記複数のシンボルのそれぞれについて領域を設定し分割する分割処理部と、を含むことが好ましい。   In the symbol information processing apparatus of the present invention, the region dividing unit determines that the number of symbols in the symbol labeling map by the labeling unit is determined, and the number determination unit determines that the number of symbols is two or more. And a division processing unit that sets and divides a region for each of the plurality of symbols in the symbol labeling map.

本発明において、分割処理を行う前に、シンボルラベリングマップ上のシンボルの個数を判定することから、たとえばシンボルラベリングマップ上に、シンボルは存在しない、あるいは、シンボルは1個である場合には、分割処理自体を行わなくて良くなり(処理を省略でき)、その結果、シンボルが2個以上存在する場合にのみ行うことが可能となり、ひいては位置検出処理の効率化を図ることが可能となる。   In the present invention, since the number of symbols on the symbol labeling map is determined before the division process is performed, for example, when there is no symbol on the symbol labeling map or there is one symbol, the division is performed. The processing itself does not need to be performed (the processing can be omitted), and as a result, it can be performed only when there are two or more symbols, and the position detection processing can be made more efficient.

また、本発明のシンボル情報処理装置は、前記分割処理部は、前記シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の射影を取得する射影取得部と、前記射影取得部で取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、当該谷部分の位置を領域分割の境界位置として取得する境界位置取得部と、前記境界位置取得部で取得した境界位置を基準として前記複数のシンボルの各領域を設定する領域設定部と、を含み、前記位置決定部は、前記領域設定部で設定した各領域において前記シンボルが媒体に記録された位置を検出する。   In the symbol information processing device according to the present invention, the division processing unit includes a projection acquisition unit that acquires a projection of at least one of the X axis and the Y axis in the entire symbol labeling map, and the projection acquisition unit. Search for a position that can be recognized as a valley portion in the projection profile acquired in step (b), and obtain a boundary position acquisition unit that acquires the position of the valley portion as a boundary position of region division, and the boundary position acquired by the boundary position acquisition unit as a reference An area setting unit for setting each area of the plurality of symbols, and the position determination unit detects a position where the symbol is recorded on the medium in each area set by the area setting unit.

本発明において、分割処理を行う場合、シンボルラベリングマップ全域において、いわゆる直交座標系のX軸およびY軸のうちの少なくとも一方の軸の座標軸への射影を取得し、取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、谷部分の位置を領域分割の境界位置として取得し、取得した境界位置を基準として複数のシンボルの各領域を設定することから、分割すべき領域を特定し設定できるようになる。また、射影を用いて複数のシンボルの領域の境界を取得することから、計算量を削減することが可能となる。   In the present invention, when division processing is performed, the projection onto the coordinate axis of at least one of the X axis and the Y axis of the so-called orthogonal coordinate system is acquired over the entire symbol labeling map, and the valley portion is obtained in the acquired projection profile. Can be identified, and the valley position is acquired as the boundary position of area division, and each area of a plurality of symbols is set based on the acquired boundary position, so that the area to be divided can be specified and set It becomes like this. In addition, since the boundaries of a plurality of symbol areas are obtained using projection, the amount of calculation can be reduced.

本発明のシンボル情報読取方法は、同じフォーマットで作成された複数のシンボルが記録された記録媒体を撮像する撮像手段と、前記撮像手段により得られた前記記録媒体の画像データを記憶する画像メモリと、前記画像データを取り込んで、前記シンボルが記録媒体に記録された位置を検出する位置検出処理部と、を有するシンボル情報読取装置で使用されるシンボル情報読取方法であって、前記位置検出処理部において、前記画像データを所定の領域で前記シンボルの走査線の走査方向に沿って輝度値の変動量を計算して、前記シンボルに該当する可能性のある仮領域であるか否かを判定する第1ステップと、前記仮領域について、前記走査線の走査方向に対して直交する方向に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する第2ステップと、前記相関マップについて、前記シンボルの有無を検索し、前記シンボルが存在すると判断した領域をラベリングする第3ステップと、ラベリングされた領域に基づき、前記複数のシンボルのそれぞれについて領域を設定し分割する第4ステップと、前記領域分割部で分割された前記複数のシンボルの各シンボルについてラベリングされた領域に基づき、前記シンボルが記録媒体に記録された位置を検出する第5ステップと、を含むことを特徴とする。   The symbol information reading method of the present invention includes an imaging unit that images a recording medium on which a plurality of symbols created in the same format are recorded, and an image memory that stores image data of the recording medium obtained by the imaging unit. A symbol information reading method used in a symbol information reading device having a position detection processing unit that captures the image data and detects a position at which the symbol is recorded on a recording medium, the position detection processing unit , The image data is calculated in the predetermined area along the scanning direction of the scanning line of the symbol, and the variation amount of the luminance value is calculated to determine whether the image data is a temporary area that may correspond to the symbol. For the first step and the temporary region, a correlation between adjacent regions adjacent to each other in a direction orthogonal to the scanning direction of the scanning line is obtained, and a region having a high correlation value is obtained. A second step of creating a map, a third step of searching for the presence or absence of the symbol in the correlation map, and labeling a region where the symbol is determined to exist, and the plurality of symbols based on the labeled region And detecting a position where the symbol is recorded on a recording medium based on a region labeled for each symbol of the plurality of symbols divided by the region dividing unit. And a fifth step.

本発明において、第4ステップでラベリングされた領域に基づき、複数のシンボルのそれぞれについて領域を設定し分割することから、(同じフォーマットで作成された)同一種類のシンボルが同じ記録媒体上に2個以上(複数)存在する場合であっても、分割された領域ごとにシンボルが媒体に記録された位置検出処理を行うことができるようになる。その結果、各シンボルの重心位置を安定して算出することができるようになり、複数のシンボルを相互に区別することが可能となる。   In the present invention, since the area is set and divided for each of a plurality of symbols based on the area labeled in the fourth step, two symbols of the same type (created in the same format) are recorded on the same recording medium. Even in the case where there are (plural) or more, it is possible to perform position detection processing in which symbols are recorded on the medium for each divided area. As a result, the barycentric position of each symbol can be calculated stably, and a plurality of symbols can be distinguished from each other.

また、本発明のシンボル情報読取方法は、前記第4ステップは、前記ラベリング部によるシンボルラベリングマップにおけるシンボル数を判定する判定ステップと、シンボル数が2個以上であると判定された前記シンボルラベリングマップにおける前記複数のシンボルのそれぞれについて領域を設定し分割する分割処理ステップと、を含むことが好ましい。   In the symbol information reading method of the present invention, the fourth step includes a determination step of determining the number of symbols in the symbol labeling map by the labeling unit, and the symbol labeling map in which the number of symbols is determined to be two or more. And a division processing step of setting and dividing a region for each of the plurality of symbols.

本発明において、分割処理を行う前に、シンボルラベリングマップ上のシンボルの個数を判定することから、たとえばシンボルラベリングマップ上に、シンボルは存在しない、あるいは、シンボルは1個である場合には、分割処理自体を行わなくて良くなり(処理を省略でき)、その結果、シンボルが2個以上存在する場合にのみ行うことが可能となり、ひいては位置検出処理の効率化を図ることが可能となる。   In the present invention, since the number of symbols on the symbol labeling map is determined before the division process is performed, for example, when there is no symbol on the symbol labeling map or there is one symbol, the division is performed. The processing itself does not need to be performed (the processing can be omitted), and as a result, it can be performed only when there are two or more symbols, and the position detection processing can be made more efficient.

また、本発明のシンボル情報読取方法は、前記分割処理ステップは、前記シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の射影を取得する射影取得ステップと、取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、当該谷部分の位置を領域分割の境界位置として取得する境界位置取得ステップと、取得した境界位置を基準として前記複数のシンボルの各領域を設定する領域設定ステップと、を含み、前記第5ステップにおいては、前記領域設定部で設定した各領域において前記シンボルが媒体に記録された位置を検出する。   In the symbol information reading method of the present invention, the division processing step includes a projection acquisition step of acquiring a projection of at least one of the X axis and the Y axis in the entire symbol labeling map, Search for a position that can be recognized as a valley portion in the profile, acquire a position of the valley portion as a boundary position for region division, and set an area for each of the plurality of symbols based on the acquired boundary position In the fifth step, the position where the symbol is recorded on the medium is detected in each area set by the area setting unit.

本発明において、分割処理を行う場合、シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の座標軸への射影を取得し、取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、谷部分の位置を領域分割の境界位置として取得し、取得した境界位置を基準として複数のシンボルの各領域を設定することから、分割すべき領域を特定し設定できるようになる。また、射影を用いて複数のシンボルの領域の境界を取得することから、計算量を削減することが可能となる。   In the present invention, when division processing is performed, a projection onto the coordinate axis of at least one of the X-axis and the Y-axis is obtained in the entire symbol labeling map, and a position that can be recognized as a valley portion in the obtained projection profile is obtained. By searching, the position of the valley portion is acquired as the boundary position of the region division, and each region of the plurality of symbols is set on the basis of the acquired boundary position, so that the region to be divided can be specified and set. In addition, since the boundaries of a plurality of symbol areas are obtained using projection, the amount of calculation can be reduced.

本発明によれば、(同じフォーマットで作成された)同一種類のシンボルが同じ記録媒体上に2個以上(複数)存在する場合であっても、重心位置を安定して算出することができ、複数のシンボルを相互に区別することが可能となる。   According to the present invention, even when there are two or more (several) symbols of the same type (created in the same format) on the same recording medium, the center of gravity position can be stably calculated, A plurality of symbols can be distinguished from each other.

本発明の実施形態に係るシンボル情報読取装置の構成例を示す図である。It is a figure which shows the structural example of the symbol information reader which concerns on embodiment of this invention. 本実施形態に係る領域分割部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the area division part which concerns on this embodiment. 図2の射影を利用した分割処理部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the division | segmentation process part using the projection of FIG. 本発明の実施形態に係るシンボル情報読取処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the symbol information reading process which concerns on embodiment of this invention. 図4におけるバーコード検出に関する情報処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the information processing regarding barcode detection in FIG. 画像メモリに記憶された一次元バーコードが2個の記録媒体の画像データの一例を示す図である。It is a figure which shows an example of the image data of the recording medium with two one-dimensional barcodes memorize | stored in the image memory. 図6に示す画像データに基づき作成されたマップ数値を画像で表現した図である。It is the figure which expressed the map numerical value produced based on the image data shown in FIG. 6 with the image. 図6の2個のバーコードが印刷された記録媒体を画像化したマップを2値化した図である。It is the figure which binarized the map which imaged the recording medium with which two barcodes of FIG. 6 were printed. バーコードが2個の場合の上下ライン相関の処理結果である相関マップを示す図である。It is a figure which shows the correlation map which is a process result of the up-and-down line correlation in the case of two barcodes. 図9に示す相関マップから得られたシンボルラベリングマップ(バーコードマップ)を示す図である。It is a figure which shows the symbol labeling map (barcode map) obtained from the correlation map shown in FIG. 本実施形態に係るシンボルラベリングマップ(バーコードマップ)におけるバーコードの個数を判定する処理の一例を説明するためのフローチャートであるIt is a flowchart for demonstrating an example of the process which determines the number of barcodes in the symbol labeling map (barcode map) which concerns on this embodiment. 2個のバーコードを検出したときのシンボルラベリングマップ(バーコードマップ)とそのX軸およびY軸の射影のプロファイル、並びにシンボルラベリングマップの重心、左端・右端・上端・下端位置の各座標を示す図である。Shows the symbol labeling map (barcode map) when two barcodes are detected, their X-axis and Y-axis projection profiles, and the center of gravity, left end, right end, upper end, and lower end coordinates of the symbol labeling map. FIG. バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割処理を説明するための図である。It is a figure for demonstrating the area | region division | segmentation process of the symbol labeling map, when two barcodes exist. バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割の一処理を説明するためのフローチャートである。It is a flowchart for demonstrating one process of the area | region division | segmentation of the symbol labeling map, when two barcodes exist. 2個のバーコードを検出したときのシンボルラベリングマップ(バーコードマップ)の第1分割領域とそのX軸およびY軸の射影のプロファイル、並びに分割領域の重心、左端・右端・上端・下端位置の各座標を示す図である。The first divided area of the symbol labeling map (barcode map) when two barcodes are detected and the projection profile of the X and Y axes, and the center of gravity, left end, right end, upper end, and lower end positions of the divided areas It is a figure which shows each coordinate. 2個のバーコードを検出したときのシンボルラベリングマップ(バーコードマップ)の第2分割領域とそのX軸およびY軸の射影のプロファイル、並びに分割領域の重心、左端・右端・上端・下端位置の各座標を示す図である。The second divided area of the symbol labeling map (barcode map) when two barcodes are detected and the projection profile of the X and Y axes, and the center of gravity, left end, right end, upper end, and lower end positions of the divided areas It is a figure which shows each coordinate. バーコード付近における平均輝度のプロファイルを示す図である。It is a figure which shows the profile of the average brightness | luminance in barcode vicinity. バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割の他処理を説明するためのフローチャートである。It is a flowchart for demonstrating the other process of area division of the symbol labeling map, when two barcodes exist.

以下、本発明の実施形態を図面に関連付けて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の実施形態に係るシンボル情報読取装置の構成例を示す図である。   FIG. 1 is a diagram illustrating a configuration example of a symbol information reading apparatus according to an embodiment of the present invention.

本実施形態に係るシンボル情報読取装置10は、カード等の記録媒体20上に固有の情報が付与されたバーコード21、22を撮像して得られた画像データを処理するバーコード読取装置である。   The symbol information reader 10 according to the present embodiment is a barcode reader that processes image data obtained by imaging the barcodes 21 and 22 to which unique information is given on a recording medium 20 such as a card. .

バーコード読取装置10は、図1に示すように、撮像装置11、記憶部としての画像メモリ12、およびデータ処理装置13を主構成要素として有している。   As shown in FIG. 1, the barcode reader 10 includes an imaging device 11, an image memory 12 as a storage unit, and a data processing device 13 as main components.

撮像装置11は、密着型の一次元撮像素子111、および記録媒体20を搬送する搬送機構(搬送ガイドを含む)112を含んで構成されている。記録媒体20には、図1に示すように、同じフォーマットで作成された同じ種類の一次元バーコード21,22が複数(本例では2個)の印刷(記録)されている。   The imaging apparatus 11 includes a contact type one-dimensional imaging element 111 and a transport mechanism (including a transport guide) 112 that transports the recording medium 20. As shown in FIG. 1, a plurality of (two in this example) one-dimensional barcodes 21 and 22 created in the same format are printed (recorded) on the recording medium 20.

図1において、符号Dは記録媒体20の搬送方向を示している。また、図1に示すように、符号L1は、一次元バーコード21の走査線を示し、符号L2は一次元バーコード22の走査線を示す。すなわち、走査線L1、L2が走査する方向は、複数のバーとスペースを交互に配置している方向となっている。なお、説明を簡単にするために、本実施形態では、搬送方向D、走査線L1、L2の走査方向はX軸方向としている。また、搬送方向Dに直交する方向および走査線L1、L2の走査方向に直交する方向をY軸方向としている。   In FIG. 1, the symbol D indicates the conveyance direction of the recording medium 20. As shown in FIG. 1, the symbol L <b> 1 indicates a scanning line for the one-dimensional barcode 21, and the symbol L <b> 2 indicates a scanning line for the one-dimensional barcode 22. That is, the scanning direction of the scanning lines L1 and L2 is a direction in which a plurality of bars and spaces are alternately arranged. In order to simplify the description, in the present embodiment, the transport direction D and the scanning directions of the scanning lines L1 and L2 are the X-axis direction. A direction orthogonal to the transport direction D and a direction orthogonal to the scanning direction of the scanning lines L1 and L2 are defined as the Y-axis direction.

ここでは、撮像素子111として密着型一次元撮像素子を採用して装置の小型化等を図っているが、撮像素子111としては、読み取り対象の記録媒体20の文字列を読み取り対象とする二次元のエリアセンサ等を採用することも可能である。また、搬送機構として定速の搬送機構を採用しているが、手動によるものも採用可能である。撮像素子111は、たとえばCCDやCMOSセンサにより形成される。   Here, a close contact type one-dimensional image sensor is employed as the image sensor 111 to reduce the size of the apparatus, but the image sensor 111 is a two-dimensional object that reads a character string of the recording medium 20 to be read. It is also possible to employ an area sensor or the like. Moreover, although the constant speed conveyance mechanism is employ | adopted as a conveyance mechanism, the thing by manual is also employable. The image sensor 111 is formed by, for example, a CCD or a CMOS sensor.

画像メモリ12は、撮像素子111で撮像された一次元バーコード21,22を含む記録媒体20のデジタル化された読み取り多値画像(濃淡画像)データを記憶(格納)する。画像メモリ12に格納される原画像は、複数の画素がマトリクス状に配列されて形成され、具体的には、図示していないが、X軸方向にm行、Y軸方向にn列の画素が配置されている。各画素はそれぞれ画素値(輝度値)を有する。本実施形態では、各画素値は、たとえば8ビットで表現すると0〜255の間のいずれかの値をとり、画素値は黒に近いほど小さく、白に近いほど大きな値をとる。なお、この画像メモリ12は、RAM,SDRAM,DDRSDRAM,RDRAMなど、画像データを記憶しうるものであれば如何なるものであってもよい。   The image memory 12 stores (stores) digitized read multilevel image (grayscale image) data of the recording medium 20 including the one-dimensional barcodes 21 and 22 imaged by the image sensor 111. The original image stored in the image memory 12 is formed by arranging a plurality of pixels in a matrix. Specifically, although not shown, there are m rows in the X-axis direction and n columns in the Y-axis direction. Is arranged. Each pixel has a pixel value (luminance value). In this embodiment, each pixel value takes any value between 0 and 255 when expressed in 8 bits, for example. The pixel value is smaller as it is closer to black, and is larger as it is closer to white. The image memory 12 may be any memory such as RAM, SDRAM, DDRSDRAM, and RDRAM as long as it can store image data.

データ処理装置13は、位置検出処理部14および復号処理部15を主構成要素として有している。そして、本実施形態の位置検出処理部14は、仮領域判定部141、相関マップ作成部142、ラベリング部143、領域分割部44、および位置決定部145を有する。   The data processing device 13 includes a position detection processing unit 14 and a decoding processing unit 15 as main components. The position detection processing unit 14 according to the present embodiment includes a temporary region determination unit 141, a correlation map creation unit 142, a labeling unit 143, a region division unit 44, and a position determination unit 145.

なお、位置検出処理部14を構成する各要素は、CPUやROM,RAMといったハードウェアにより実現することができる。また、本実施形態では、位置検出処理部14と復号処理部15は別要素として図示しているが、復号処理部15が位置検出処理部14内に組み込まれていてもよい。   In addition, each element which comprises the position detection process part 14 is realizable with hardwares, such as CPU, ROM, and RAM. In the present embodiment, the position detection processing unit 14 and the decoding processing unit 15 are illustrated as separate elements, but the decoding processing unit 15 may be incorporated in the position detection processing unit 14.

仮領域判定部141は、画像メモリ12から読み出した多値画像(濃淡画像)データを所定の領域で一次元バーコード21,22の一次元の走査線L1,L2の走査方向(X軸方向)に沿って輝度値の変動量を計算して、一次元バーコードに該当する可能性のある仮領域を判定する。   The temporary area determination unit 141 scans the multi-valued image (grayscale image) data read from the image memory 12 in the scanning direction of the one-dimensional scanning lines L1 and L2 of the one-dimensional barcodes 21 and 22 (X-axis direction) in a predetermined area. The amount of fluctuation of the luminance value is calculated along the lines to determine a temporary area that may correspond to the one-dimensional barcode.

仮領域判定部141は、輝度値の変動量としては、たとえば分散や標準偏差などが適用される。本実施形態の仮領域判定部141は、一例として分散マップを計算し、その結果により仮領域であるか否かを判定する。すなわち、本実施形態の仮領域判定部141は、分散マップ計算機能を含んで構成される。この仮領域のマップである、周期的に並んだ同じ大きさの矩形をなす複数の区画(区切り、仕切り)を持つ格子状の分散マップの具体例については後述する。なお、各区画はいわゆる単位区画であり、一次元バーコード等の画像空間上の座標等を求める場合の単位的な大きさを持つ。
各区画の大きさはX軸方向、Y軸方向において基準の大きさとなり、各区画はX軸方向の長さがY軸方向の長さより長い長方形状となっている。
たとえば一元バーコード22では、X軸方向に3区画、Y軸方向に3区画の計9個の区画に跨ることになる。
たとえば一元バーコード21では、X軸方向に5区画、Y軸方向に4区画の計20個の区画に跨ることになる。
For example, variance or standard deviation is applied to the temporary region determination unit 141 as the amount of change in the luminance value. The temporary area determination unit 141 according to the present embodiment calculates a dispersion map as an example, and determines whether the area is a temporary area based on the result. That is, the temporary area determination unit 141 of the present embodiment is configured to include a dispersion map calculation function. A specific example of a lattice-like dispersion map having a plurality of sections (partitions, partitions) that form a rectangle of the same size and are arranged periodically will be described later. Each section is a so-called unit section, and has a unit size for obtaining coordinates in an image space such as a one-dimensional barcode.
The size of each section is a reference size in the X-axis direction and the Y-axis direction, and each section has a rectangular shape whose length in the X-axis direction is longer than the length in the Y-axis direction.
For example, in the unified bar code 22, a total of nine sections, ie, three sections in the X-axis direction and three sections in the Y-axis direction, are straddled.
For example, in the unified barcode 21, it extends over a total of 20 sections, 5 sections in the X-axis direction and 4 sections in the Y-axis direction.

相関マップ作成部142は、仮領域判定部141で判定された仮領域について、走査線L1,L2の走査方向に対して直交する方向(Y軸方向)に隣接する隣接領域との相関を求めて、相関値の高い領域を示す相関マップを作成する。   The correlation map creating unit 142 obtains the correlation between the temporary region determined by the temporary region determining unit 141 and the adjacent region adjacent in the direction orthogonal to the scanning direction of the scanning lines L1 and L2 (Y-axis direction). Then, a correlation map indicating a region having a high correlation value is created.

本実施形態の相関マップ作成部142は、一次元バーコードとそうでない部分とを分離するため、いわゆる上下走査線相関処理を行う。すなわち、相関マップ作成部142は、格子状の分散マップ上の「1」の各要素について、該当する区画のすぐ上とすぐ下に隣接する区画のライン相互の輝度の相関を計算する。それらの区画が一次元バーコードを含んでいればこの相関値は大きな値を示す。   The correlation map creating unit 142 according to the present embodiment performs so-called vertical scanning line correlation processing in order to separate the one-dimensional barcode from the portion that is not. That is, the correlation map creation unit 142 calculates the correlation of the luminance between the lines of the adjacent sections immediately above and immediately below the corresponding section for each element of “1” on the lattice-like dispersion map. If these sections contain a one-dimensional barcode, this correlation value is large.

具体的には、相関マップ作成部142は、格子座標上に相関マップを作成する。後で説明するように、相関マップ作成部142は、たとえば注目ラインと上または下の各ラインとの相関値が高ければその要素にポイント(値)「1」を加算し、上下いずれとも相関が高かった場合はポイント(値)「2」を加算する。   Specifically, the correlation map creation unit 142 creates a correlation map on the lattice coordinates. As will be described later, the correlation map creating unit 142 adds a point (value) “1” to the element if the correlation value between the target line and each of the upper and lower lines is high, for example. If it is higher, add point (value) “2”.

ラベリング部143は、相関マップ作成部142で作成された相関マップについて、相関マップ上で1要素ずつシフト(本実施形態では、走査方向(X軸方向)にシフト)しながら一次元バーコードにおけるたとえば3つの要素を含む基本パターンおよびそれ以上の要素を含むパターンの有無を検索し、一次元バーコードに基本パターンおよびそれ以上の要素を含むパターンが存在すると判断した領域をラベリングする。   The labeling unit 143 shifts the correlation map created by the correlation map creation unit 142 element by element on the correlation map (in this embodiment, shifting in the scanning direction (X-axis direction)), for example, in a one-dimensional barcode. The presence / absence of a pattern including a basic pattern including three elements and a pattern including more elements is searched, and an area determined to include a pattern including the basic pattern and higher elements in a one-dimensional barcode is labeled.

ラベリング部143における基本パターン検索処理では相関マップにおいて、一次元バーコードにおける基本パターンの存在を調べる。たとえば、検出したい最小の一次元バーコードのサイズが、相関マップ上で基本パターン[2 2 2]に対応する場合、相関マップをサーチしてこの基本パターンが検出されたらそのパターンによって占有されるマップ要素に「1」を立て、それ以外のマップ要素は「0」とする。   In the basic pattern search process in the labeling unit 143, the existence of the basic pattern in the one-dimensional barcode is checked in the correlation map. For example, when the minimum one-dimensional barcode size to be detected corresponds to the basic pattern [2 2 2] on the correlation map, the map occupied by the pattern when the basic pattern is detected by searching the correlation map “1” is set in the element, and other map elements are set to “0”.

このように、ラベリング部143でラベリングされたシンボルラベリングマップ(バーコードマップ)には、たとえば前述したように、複数(本例では2個)の一次元バーコード21,22が印刷(記録)されている記録媒体20の読み取りが行われた場合、上記した基本パターンおよびそれ以上の要素を含むパターンを有する一次元バーコードが存在するとしてラベリングされた領域が複数箇所ある蓋然性が高い。このようにラベリング部143でラベリングされたシンボルラベリングマップは、領域分割部144に供給される。   As described above, a plurality of (two in this example) one-dimensional barcodes 21 and 22 are printed (recorded) on the symbol labeling map (barcode map) labeled by the labeling unit 143 as described above. When the recording medium 20 is read, there is a high probability that there are a plurality of regions labeled as having a one-dimensional barcode having the above-described basic pattern and a pattern including more elements. The symbol labeling map labeled by the labeling unit 143 in this way is supplied to the region dividing unit 144.

領域分割部144は、ラベリング部143から供給されたシンボルラベリングマップ(バーコードマップに相当する)においてラベリングされた領域に基づき、複数の一次元バーコードのそれぞれについて領域を設定し、シンボルラベリングマップを用いて領域を分割する。   The region dividing unit 144 sets a region for each of a plurality of one-dimensional barcodes based on the regions labeled in the symbol labeling map (corresponding to the barcode map) supplied from the labeling unit 143, and displays the symbol labeling map. Use to divide the region.

本実施形態の領域分割部144は、シンボルラベリングマップにおける一次元バーコードの数をゼロ個か1個か2個以上であるか否かの判定を行い、一次元バーコードが2個以上と判定した場合に、シンボルラベリングマップを用いて領域分割を行う。   The area dividing unit 144 according to the present embodiment determines whether the number of one-dimensional barcodes in the symbol labeling map is zero, one, two or more, and determines that there are two or more one-dimensional barcodes. In this case, the region is divided using the symbol labeling map.

図2は、本実施形態に係る領域分割部の構成例を示すブロック図である。   FIG. 2 is a block diagram illustrating a configuration example of the area dividing unit according to the present embodiment.

この領域分割部144は、図2に示すように、個数判定部1441および分割処理部1442を有している。   As shown in FIG. 2, the area dividing unit 144 includes a number determining unit 1441 and a division processing unit 1442.

個数判定部1441は、ラベリング部143によるシンボルラベリングマップにおけるシンボル数を判定する。個数判定部1441は、シンボルラベリングマップにおける一次元バーコードの数をゼロ個か1個か2個以上であるか否かの判定を行う。   The number determination unit 1441 determines the number of symbols in the symbol labeling map by the labeling unit 143. The number determination unit 1441 determines whether the number of one-dimensional barcodes in the symbol labeling map is zero, one, or two or more.

個数判定部1441は、個数判定をたとえば次のようにして行う。
シンボルラベリングマップ(バーコードマップ)上で値1をもつ要素数をカウントしこれをC0とする。一方、シンボルラベリングマップ(バーコードマップ)上で重心COGを起点として求めた一次元バーコードの4辺によって囲まれる領域内の値1をもつ要素数をカウントしこれをC1とする。
The number determination unit 1441 performs the number determination as follows, for example.
The number of elements having a value of 1 on the symbol labeling map (barcode map) is counted and is designated as C0. On the other hand, the number of elements having a value of 1 in the region surrounded by the four sides of the one-dimensional barcode obtained from the center of gravity COG on the symbol labeling map (barcode map) is counted as C1.

個数判定部1441は、このとき、
もし、C0=0であれば一次元バーコードは存在しない、
C0>0 かつ C0=C1であれば、一次元バーコードは1個である、
C0>0 かつ C0≠C1であれば、一次元バーコードは2個以上存在する、
と判定する。
At this time, the number determination unit 1441
If C0 = 0, there is no one-dimensional barcode,
If C0> 0 and C0 = C1, there is one one-dimensional barcode.
If C0> 0 and C0 ≠ C1, there are two or more one-dimensional barcodes.
Is determined.

分割処理部1442は、個数判定部1441により一次元バーコード数が2個以上であると判定されたシンボルラベリングマップにおける複数の一次元バーコードのそれぞれについて領域を設定し分割する処理を行う。   The division processing unit 1442 performs a process of setting and dividing a region for each of a plurality of one-dimensional barcodes in the symbol labeling map that is determined by the number determination unit 1441 that the number of one-dimensional barcodes is two or more.

本実施形態の分割処理部1442は、領域分割に際してシンボルラベリングマップ(バーコードマップ)全域において、図1等の中に設定した直交座標系のX軸に投影した射影projXおよびY軸に投影した射影projYを取得し、取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、この谷部分の位置を領域分割の境界位置(境界線)として取得し、取得した境界位置を基準として複数(本例では2個)の一次元バーコード21、22の各領域R1,R2・・を設定し、分割する。   The division processing unit 1442 of the present embodiment projects the projection projX projected on the X axis of the orthogonal coordinate system set in FIG. 1 and the like on the entire symbol labeling map (barcode map) at the time of area division. projY is acquired, a position that can be recognized as a valley portion in the acquired projection profile is searched, the position of this valley portion is acquired as a boundary position (boundary line) of the region division, and a plurality of (books) are obtained based on the acquired boundary position. Each region R1, R2,... Of the one-dimensional barcodes 21 and 22 is set and divided.

たとえば本例のように一次元バーコード21、22が2個の場合は、双方の一次元バーコードが結合状態にない限り、X軸の射影projXおよびY軸の射影projYのいずれか一方もしくは両者が2つの山と1つの谷からなるプロファイルをもつ。よって、分割処理部1442は、X軸の射影projXおよびY軸の射影projY上でこの谷の位置を決定することにより、2つの一次元バーコードのX軸方向、Y軸方向の境界位置(分離位置の座標)を求めることができる。   For example, when there are two one-dimensional barcodes 21 and 22 as in this example, one or both of the X-axis projection projX and the Y-axis projection projY unless both the one-dimensional barcodes are in a coupled state. Has a profile consisting of two peaks and one valley. Therefore, the division processing unit 1442 determines the positions of the valleys on the X-axis projection projX and the Y-axis projection projY, thereby demarcating the boundary positions (separation of the two one-dimensional barcodes in the X-axis direction and the Y-axis direction). Position coordinates).

分割処理部1442は、境界位置の座標によってX軸方向、Y軸方向に分離された2つの領域をたとえばR1およびR2とする。以降の処理は、領域R1とR2のそれぞれについて、一次元バーコードが1個の場合と同様の処理を適用することで、各々の一次元バーコードの位置を決定することができる。   The division processing unit 1442 sets, for example, R1 and R2 as two regions separated in the X-axis direction and the Y-axis direction by the coordinates of the boundary position. In the subsequent processing, the position of each one-dimensional barcode can be determined by applying the same processing as in the case of one one-dimensional barcode to each of the regions R1 and R2.

図3は、図2の射影を利用した分割処理部の構成例を示すブロック図である。   FIG. 3 is a block diagram illustrating a configuration example of a division processing unit using the projection of FIG.

この分割処理部1442は、射影取得部14421、境界位置取得部14422、および領域設定部14423を有している。   The division processing unit 1442 includes a projection acquisition unit 14421, a boundary position acquisition unit 14422, and an area setting unit 14423.

射影取得部14421は、領域分割に際してシンボルラベリングマップ(バーコードマップ)全域において直交座標系のX軸に投影した射影projXおよびY軸に投影した射影projYを取得する。   The projection acquisition unit 14421 acquires the projection projX projected on the X axis of the orthogonal coordinate system and the projection projY projected on the Y axis in the entire region of the symbol labeling map (barcode map) at the time of area division.

境界位置取得部14422は、射影取得部14421で取得した射影の概要等を図等で表現したプロファイルにおいて谷部分と認識できる位置を探索し、谷部分の位置を領域分割の境界位置(分離位置のy座標、またはx座標)ydiv,xdivとして取得する。   The boundary position acquisition unit 14422 searches for a position that can be recognized as a valley portion in a profile that expresses the outline of the projection acquired by the projection acquisition unit 14421 with a figure or the like, and determines the position of the valley portion as the boundary position of the region division (the separation position of the separation position). (y-coordinate or x-coordinate) acquired as ydiv, xdiv.

領域設定部14423は、境界位置取得部14422で取得した境界位置を基準として複数(本例では2個)の一次元バーコードの各領域R1,R2・・を設定する。   The region setting unit 14423 sets a plurality (two in this example) of one-dimensional barcodes R1, R2,... Using the boundary position acquired by the boundary position acquisition unit 14422 as a reference.

また、領域設定部14423は、設定した各領域におけるバーコードの個数を再確認する機能を有している。
この機能を有することにより、分割領域に存在するバーコードの個数を確認することが可能となり、分割処理の結果を再確認しながら、領域分割を行うことが可能となり、たとえば個数が先に判定した個数と異なっている場合には、何らかの異常が生じている等の判断を行うことが可能となる。
The area setting unit 14423 has a function of reconfirming the number of barcodes in each set area.
By having this function, it is possible to check the number of barcodes existing in the divided area, and it is possible to perform area division while reconfirming the result of the dividing process. For example, the number is determined first. When the number is different from the number, it is possible to determine that some abnormality has occurred.

このような構成を有する分割処理部1442は、射影取得部14421で、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYを取得し、境界位置取得部14422でX軸およびY軸のうちの一方の軸の射影において探索の結果、谷部分と認識できる位置を取得できない場合に、他方の軸の射影において谷部分と認識できる位置の探索を行うように構成可能である。   In the division processing unit 1442 having such a configuration, the projection acquisition unit 14421 acquires the X-axis projection projX and the Y-axis projection projY over the entire symbol labeling map, and the boundary position acquisition unit 14422 acquires the X-axis and Y-axis. When a position that can be recognized as a valley portion cannot be acquired as a result of the search in the projection of one of the axes, a position that can be recognized as a valley portion in the projection of the other axis can be searched.

また、分割処理部1442は、射影取得部14421で、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYのうちの一方の軸の射影を取得した結果、境界位置取得部14422で谷部分と認識できる位置を取得できない場合に、射影取得部14421で、シンボルラベリングマップ全域において、X軸およびY軸のうちの他方の軸の射影を取得し、境界位置取得部14422で谷部分と認識できる位置の探索を行うように構成してもよい。   In addition, the division processing unit 1442 acquires the projection of one of the X-axis projection projX and the Y-axis projection projY over the entire symbol labeling map by the projection acquisition unit 14421. As a result, the boundary position acquisition unit 14422 When the position that can be recognized as the valley portion cannot be acquired, the projection acquisition unit 14421 acquires the projection of the other axis of the X axis and the Y axis in the entire symbol labeling map, and the boundary position acquisition unit 14422 You may comprise so that the position which can be recognized is searched.

位置決定部145は、領域分割部144で分割された複数の一次元バーコードの各シンボルについてラベリングされた領域に基づき、一次元バーコードが記録媒体20に記録された位置を検出する。   The position determination unit 145 detects the position where the one-dimensional barcode is recorded on the recording medium 20 based on the region labeled for each symbol of the plurality of one-dimensional barcodes divided by the region division unit 144.

位置決定部145は、分割された個別の領域について一次元バーコードのX軸、Y軸(図では上下左右)の概略位置である重心を決定し、概略位置情報より画像空間座標上のバーコードのX軸、Y軸(図では上下左右)位置を最終決定する。   The position determination unit 145 determines the center of gravity which is the approximate position of the X-axis and Y-axis (up, down, left and right in the figure) of the one-dimensional barcode for each divided area, and the barcode on the image space coordinates from the approximate position information. The X-axis and Y-axis positions (up, down, left and right in the figure) are finally determined.

位置決定部145のシンボル位置判定処理においては、シンボルラベリングマップ(バーコードマップ)の重心(yxog,xcog)を求めることから開始される。重心は定義に基づいて計算される。   The symbol position determination process of the position determination unit 145 starts by obtaining the center of gravity (yxog, xcog) of the symbol labeling map (barcode map). The center of gravity is calculated based on the definition.

複数の一次元バーコードがあり、領域分割部144で一次元バーコードごとに分割されている場合には、分割領域の一次元バーコードごとに上記したような、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYを取得して一次元バーコードごとの重心が求められる。   In the case where there are a plurality of one-dimensional barcodes and the region dividing unit 144 divides each one-dimensional barcode, the X axis in the entire symbol labeling map as described above for each one-dimensional barcode in the divided region. Are obtained, and the center of gravity for each one-dimensional barcode is obtained.

次に、位置決定部145は、一次元バーコードの左端・右端・上端・下端位置を求める。位置決定部145は、左右位置はシンボルラベリングマップ(バーコードマップ)上を、重心座標xcogを起点としてX軸方向に要素和(加算範囲はycog±2)がゼロとなる座標xstartおよびxstopを検出し、そこで打ち切る。上下位置はycogを起点としてY軸方向に要素和(加算範囲[xstart,xstop])がゼロとなる座標yupperおよびylowerを検出したら打ち切る。   Next, the position determination unit 145 obtains the left end, right end, upper end, and lower end positions of the one-dimensional barcode. The position determination unit 145 detects coordinates xstart and xstop where the element sum (addition range is ycog ± 2) is zero in the X-axis direction starting from the barycentric coordinate xcog on the symbol labeling map (barcode map). And then stop. The vertical position is cut off when coordinates yuper and ylower at which the element sum (addition range [xstart, xstop]) becomes zero in the Y-axis direction starting from ycog are detected.

このようにして、座標上における一次元バーコードの4辺位置が特定される。
位置決定部145は、この4辺の座標から画像空間上の座標を求める。
In this way, the four side positions of the one-dimensional barcode on the coordinates are specified.
The position determination unit 145 obtains coordinates in the image space from the coordinates of these four sides.

位置決定部145は、記録媒体20上のシンボル数が1つで、領域分割部144で領域分割が行われない場合、シンボルラベリングマップ全域において一次元バーコードが記録媒体20に記録された位置を検出する。   When the number of symbols on the recording medium 20 is one and the area dividing unit 144 does not perform area division, the position determining unit 145 determines the position where the one-dimensional barcode is recorded on the recording medium 20 in the entire symbol labeling map. To detect.

このような構成を有するシンボル情報読取装置10において、一次元バーコード21,22が印刷(記録)された記録媒体20は、搬送機構112の搬送ガイドに沿って搬送され、一次元撮像素子111を通過することによってその記録媒体20のイメージ(像)が光電変換され、その多値画像(濃淡画像)データが画像メモリ12に取り込まれ記憶される。   In the symbol information reading apparatus 10 having such a configuration, the recording medium 20 on which the one-dimensional barcodes 21 and 22 are printed (recorded) is transported along the transport guide of the transport mechanism 112, and the one-dimensional image sensor 111 is moved. By passing, the image (image) of the recording medium 20 is photoelectrically converted, and the multi-value image (grayscale image) data is captured and stored in the image memory 12.

データ処理装置13においては、一次元バーコード21,22を含む多値画像(濃淡画像)データが画像メモリ12から取り込まれ、取り込んだ画像データに基づいて様々な処理が施される。本実施形態では、データ処理装置13における位置検出処理部14によって、一次元バーコード21,22が記録媒体20に記録された位置が検出される。   In the data processing device 13, multi-value image (grayscale image) data including the one-dimensional barcodes 21 and 22 is captured from the image memory 12 and various processes are performed based on the captured image data. In the present embodiment, the position detection processing unit 14 in the data processing device 13 detects the position where the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20.

本実施形態のシンボル情報読取装置10において、一次元バーコードのデコード処理は概略図4のフローチャートに従って実行される。
以下、本発明の実施形態に係るシンボル情報読取処理を図面に関連付けて詳細に説明する。
In the symbol information reading apparatus 10 of the present embodiment, the one-dimensional barcode decoding process is executed according to the flowchart of FIG.
Hereinafter, symbol information reading processing according to an embodiment of the present invention will be described in detail with reference to the drawings.

[シンボル情報読取処理の概要]
図4は、本発明の実施形態に係るシンボル情報読取処理の流れを示すフローチャートである。
ここで、本発明の実施形態に係るシンボル情報読取処理の流れを図4に関連付けて概説する。
[Overview of symbol information reading process]
FIG. 4 is a flowchart showing a flow of symbol information reading processing according to the embodiment of the present invention.
Here, the flow of the symbol information reading process according to the embodiment of the present invention will be outlined with reference to FIG.

まず、処理プランの指定が行われる(ステップST1)。
具体的には、処理プランの指定において、記録媒体20に記録されているバーコードの種類、あるいは読み取るべきバーコードの種類に応じて使用するバーコード検出器(検出フィルタ)の種類と適用順番の設定を行う。
デフォルトでは、第一の検出フィルタ(バーコードの一つ)が指定されるが(ステップST2)、たとえば、バーコードの出現頻度に応じて順番を変えてもよい。
First, a processing plan is designated (step ST1).
Specifically, in the designation of the processing plan, the type of barcode detector (detection filter) used in accordance with the type of barcode recorded on the recording medium 20 or the type of barcode to be read and the order of application Set up.
By default, the first detection filter (one of the barcodes) is specified (step ST2), but the order may be changed according to, for example, the barcode appearance frequency.

次に、バーコード検出(ステップST3)が行われる。
具体的には、バーコード検出において、シンボル情報読取装置10の撮像素子111は、搬送機構(搬送ガイド)112に沿って所定位置まで移動した一次元バーコード21,22を含む記録媒体20を、光電変換によって撮像する。そして、撮像された一次元バーコード21,22含む多値画像(濃淡画像)データは、画像メモリ12において記憶される。
Next, barcode detection (step ST3) is performed.
Specifically, in barcode detection, the image sensor 111 of the symbol information reading device 10 includes a recording medium 20 including one-dimensional barcodes 21 and 22 moved to a predetermined position along a conveyance mechanism (conveyance guide) 112. Imaging is performed by photoelectric conversion. The captured multi-value image (grayscale image) data including the one-dimensional barcodes 21 and 22 is stored in the image memory 12.

その後、データ処理装置13における位置検出処理部14では、復号処理部15において、バーコードの復号処理を行う前に、バーコード検出のための一連の処理が行われる。その詳細は後述するとして、一連の処理を要約すると、次のような処理が行われる。
すなわち、位置検出処理部14では、画像メモリ12に記憶された多値画像(濃淡画像)データを読み込み、仮領域判定部141において分散マップ計算処理等を行い、次いで相関マップ作成部142において上下ライン間の相関計算処理等を行う。素子、ラベリング部143において基本パターン検索処理等を行い、領域分割部144においてバーコードごとの領域分割処理等を行い、位置決定部145においてシンボル位置判定処理等を行うことにより、上述した第一の検出フィルタが担当するバーコードの有無が決定され、有りと判定された場合には、その位置が決定される。
Thereafter, in the position detection processing unit 14 in the data processing device 13, a series of processing for barcode detection is performed before the decoding processing unit 15 performs barcode decoding processing. As will be described later in detail, a series of processes are summarized as follows.
That is, the position detection processing unit 14 reads multi-valued image (grayscale image) data stored in the image memory 12, performs a scatter map calculation process in the temporary region determination unit 141, and then in the correlation map creation unit 142, the upper and lower lines A correlation calculation process is performed. The element and labeling unit 143 performs basic pattern search processing, the region dividing unit 144 performs area division processing for each barcode, and the position determination unit 145 performs symbol position determination processing and the like. The presence / absence of a barcode handled by the detection filter is determined. If it is determined that there is a barcode, the position is determined.

そして、データ処理装置13の復号処理部15において、バーコードの復号処理が行われる(ステップST4)。
より具体的には、データ処理装置13の復号処理部15は、ステップST3において解析された一次元バーコード21,22の位置等に基づき、一次元バーコード21,22の復号処理(走査線L1,L2に沿ったデータ復号)を行う。
And the decoding process part 15 of the data processor 13 performs the decoding process of barcode (step ST4).
More specifically, the decoding processing unit 15 of the data processing device 13 decodes the one-dimensional barcodes 21 and 22 (scanning line L1) based on the positions of the one-dimensional barcodes 21 and 22 analyzed in step ST3. , Data decoding along L2.

ここで、仮に検出すべき一次元バーコードが残っている場合、すなわち未適用の検出フィルタがある場合には(ステップST5:YES)、次の検出フィルタが適用され(ステップST6)、処理はステップST3に移され、新たなシンボル検出およびシンボル復号が行われる(ステップST3およびステップST4)。
一方で、未適用の検出フィルタがない場合には(ステップST5:NO)、一連のシンボルの読取処理は終了する。
Here, if a one-dimensional bar code to be detected remains, that is, if there is an unapplied detection filter (step ST5: YES), the next detection filter is applied (step ST6), and the processing is step. Moving to ST3, new symbol detection and symbol decoding are performed (step ST3 and step ST4).
On the other hand, when there is no unapplied detection filter (step ST5: NO), the series of symbol reading processing ends.

なお、検出フィルタの切り替え処理は、たとえば、位置検出処理部14のラベリング部143が行ってもよいし、復号処理部15が行ってもよい。また、検出フィルタを切り替える順番は、たとえば出現頻度に基づいて決めてもよい。これにより、シンボル情報読取処理の効率化を図ることができる。
さらに、本実施形態では、1つの媒体に同種類(同一のフォーマット)の複数の一次元バーコード、複数種類の一次元バーコードが用いられている可能性を考慮して、処理プランの指定(ステップST1)や検出フィルタの更新(ステップST6)などを行うこととしたが、これらを省くことも可能である。すなわち、ステップST3およびステップST4のみで処理を行うことも可能である。
The detection filter switching process may be performed by, for example, the labeling unit 143 of the position detection processing unit 14 or the decoding processing unit 15. Moreover, you may determine the order which switches a detection filter based on appearance frequency, for example. Thereby, the efficiency of the symbol information reading process can be improved.
Furthermore, in the present embodiment, in consideration of the possibility that a plurality of one-dimensional barcodes of the same type (same format) and a plurality of types of one-dimensional barcodes are used on one medium, a processing plan is designated ( Step ST1) and detection filter update (step ST6) are performed, but these can be omitted. That is, it is possible to perform the process only in step ST3 and step ST4.

[シンボル検出の具体的な処理]
図5は、図4におけるステップST3のバーコード検出に関する情報処理の流れを示すフローチャートである。
[Specific processing of symbol detection]
FIG. 5 is a flowchart showing a flow of information processing related to barcode detection in step ST3 in FIG.

図5において、最初に、記録媒体20の上下左右のエッジ位置が検出される(ステップST11)。
より具体的には、エッジ検出処理において、仮領域判定部141は、分散マップを計算するための前処理として、画像メモリ12に記憶された記録媒体20の画像データより、上下左右のエッジ位置を検出する。
In FIG. 5, first, the top, bottom, left, and right edge positions of the recording medium 20 are detected (step ST11).
More specifically, in the edge detection process, the temporary area determination unit 141 calculates the upper, lower, left, and right edge positions from the image data of the recording medium 20 stored in the image memory 12 as preprocessing for calculating the variance map. To detect.

図6は、画像メモリ12に記憶された一次元バーコードが2個の記録媒体20の画像データの一例を示す図である。図6は2個の一次元バーコード21,22が印刷された記録媒体20の画像データの一例を示している。
図6における周囲の実線SLは、エッジ検出処理によって得られた記録媒体20のエッジ位置を表している。また、図6における縦、横の破線はエッジラインを基準として、画像空間全体を格子状の小区画に分割するラインを示している。
FIG. 6 is a diagram illustrating an example of image data of a recording medium 20 having two one-dimensional barcodes stored in the image memory 12. FIG. 6 shows an example of image data of the recording medium 20 on which two one-dimensional barcodes 21 and 22 are printed.
The surrounding solid line SL in FIG. 6 represents the edge position of the recording medium 20 obtained by the edge detection process. In addition, vertical and horizontal broken lines in FIG. 6 indicate lines that divide the entire image space into grid-like subsections using the edge line as a reference.

(分散マップの作成)
次に、仮領域判定部141において分散マップの計算が行われる(ステップST12)。
より具体的には、仮領域判定部141は、エッジラインを基準として、画像空間全体を図6に示すような格子状の小区画に分割し、分割した区画ごとに区画内の一つのラインに沿って輝度値の変動量たとえば分散を計算する。
この区画内の一つのラインとは、図1に示す一次元バーコード21,22の走査線L1,L2の走査方向と同じ方向に形成されており、たとえば、図6に示す符号A0(B0)で示す1区画内の1ラインである。
(Create distribution map)
Next, the temporary area determination unit 141 calculates a dispersion map (step ST12).
More specifically, the temporary area determination unit 141 divides the entire image space into grid-like small sections as shown in FIG. 6 with the edge line as a reference, and each divided section is divided into one line in the section. A fluctuation amount of the luminance value, for example, a variance is calculated along the line.
One line in this section is formed in the same direction as the scanning direction of the scanning lines L1 and L2 of the one-dimensional barcodes 21 and 22 shown in FIG. 1, for example, the code A0 (B0) shown in FIG. It is 1 line in 1 division shown by.

全格子区画について同様の演算を行うと、格子状の分散マップの座標上に基づく変動量マップを得ることができる。
図7は、一例として図6の2個の一次元バーコード21,22が印刷された記録媒体20のマップ数値を画像で表現した図である。
図7において、白い部分は変動が大きい部分を表し、黒い部分は変動が小さい部分を表している。そして、この変動量が大きい部分については、図6に示す一次元バーコード21,22の位置に対応している。
If the same calculation is performed for all grid sections, a variation map based on the coordinates of the grid-like dispersion map can be obtained.
FIG. 7 is a diagram representing, as an example, map numerical values of the recording medium 20 on which the two one-dimensional barcodes 21 and 22 of FIG. 6 are printed as images.
In FIG. 7, a white portion represents a portion with a large variation, and a black portion represents a portion with a small variation. The portion where the fluctuation amount is large corresponds to the positions of the one-dimensional barcodes 21 and 22 shown in FIG.

次に、画像化した図7に示すようなマップを2値化すると、図8に示すようになる。2値化の閾値は、変動量の分布状態から適したものを設定することができる。
図8は、図6の2個の一次元バーコード21,22が印刷された記録媒体20を画像化したマップを2値化した図である。
Next, when the imaged map as shown in FIG. 7 is binarized, it becomes as shown in FIG. The threshold value for binarization can be set appropriately from the distribution state of the fluctuation amount.
FIG. 8 is a binarized map obtained by imaging the recording medium 20 on which the two one-dimensional barcodes 21 and 22 shown in FIG. 6 are printed.

以下に、図8について詳述する。
たとえば、図8のマップにおいて、左から1列目は、上から[0,1,1,1,1,0,0,0,0,0,0]という順で数値が並んでいるが(点線枠X1で示す部分)、これは、図6におけるA1〜A11という各単一ラインの分散を所定の閾値で2値化したものに相当する。
図8に示すように、図6における一次元バーコード21の位置には、「1」の値が20箇所、長方形状(太枠Z11で示す領域部分)に並んでいることが分かる(そのうちの1辺が、図6に示すA2,A3,A4およびA5である)。
Hereinafter, FIG. 8 will be described in detail.
For example, in the map of FIG. 8, in the first column from the left, numerical values are arranged in the order of [0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0] from the top ( This is equivalent to binarizing the variance of each single line, A1 to A11 in FIG. 6, with a predetermined threshold value.
As shown in FIG. 8, at the position of the one-dimensional barcode 21 in FIG. 6, it can be seen that 20 values of “1” are arranged in a rectangular shape (region portion indicated by a thick frame Z11) (of which One side is A2, A3, A4 and A5 shown in FIG. 6).

また、たとえば、図8のマップにおいて、右から3列目は、上から[0,0,0,0,0,0,1,1,1,0,0]という順で数値が並んでいるが(点線枠X2で示す部分)、これは、図6におけるA1〜A11という各単一ラインの分散を所定の閾値で2値化したものに相当する。
図8に示すように、図6における一次元バーコード22の位置には、「1」の値が9箇所、長方形状(太枠Z21で示す領域部分)に並んでいることが分かる(そのうちの1辺が、図6に示すA7,A8およびA9である)。
Further, for example, in the map of FIG. 8, in the third column from the right, numerical values are arranged in the order of [0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0] from the top. (Part indicated by the dotted frame X2), this corresponds to binarization of the variance of each single line A1 to A11 in FIG. 6 with a predetermined threshold.
As shown in FIG. 8, it can be seen that nine values of “1” are arranged in a rectangular shape (region portion indicated by a thick frame Z21) at the position of the one-dimensional barcode 22 in FIG. One side is A7, A8, and A9 shown in FIG. 6).

また、たとえば、図8のマップにおいて、右から4列目は、上から[0,1,1,1,1,0,1,1,1,0,0]という順で数値が並んでいるが(点線枠X3で示す部分)、これは、図6におけるA1〜A11という各単一ラインの分散を所定の閾値で2値化したものに相当する。
これは、符号Z11で示す一次元バーコード21の領域の右端部と符号Z21で示す一次元バーコード22の領域の左端部が、上下方向に重なる領域があることを示している。
Further, for example, in the map of FIG. 8, in the fourth column from the right, numerical values are arranged in the order of [0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0] from the top. (Part indicated by the dotted frame X3), this corresponds to binarization of the variance of each single line A1 to A11 in FIG. 6 with a predetermined threshold.
This indicates that there is a region in which the right end portion of the region of the one-dimensional barcode 21 indicated by symbol Z11 and the left end portion of the region of the one-dimensional barcode 22 indicated by symbol Z21 overlap in the vertical direction.

このように、上下左右のエッジ位置を検出し(図5のステップST11)、分散マップ(図8)の計算(図5のステップST12)を行う分散マップ計算機能を有す仮領域判定部141は、画像データを所定の領域で走査線に沿って輝度値の変動量を計算して、一次元バーコードに該当する可能性のある仮領域を判定する。
なお、ここでいう「仮領域」は、上述した「1」が20箇所並んでいる領域Z11および9箇所並んでいる領域Z21である。
In this way, the provisional region determination unit 141 having a dispersion map calculation function for detecting the top / bottom / left / right edge positions (step ST11 in FIG. 5) and calculating the dispersion map (FIG. 8) (step ST12 in FIG. 5) Then, the fluctuation amount of the luminance value is calculated along the scanning line in the predetermined area of the image data, and the temporary area that may correspond to the one-dimensional barcode is determined.
The “temporary region” here is a region Z11 in which the above-described “1” is arranged in 20 places and a region Z21 in which 9 places are arranged.

ここで、図8に示すマップにおいて、「1」に該当するイメージ部分は、一次元バーコード領域に合致している見込みが高い一方、必ずしも一次元バーコード領域になるとは限らない。
すなわち、一次元バーコード21,22が位置する領域ではないが「1」となる領域が存在する場合があり、その領域が「仮領域」として判定されることも考えられる。
Here, in the map shown in FIG. 8, the image portion corresponding to “1” is highly likely to match the one-dimensional barcode area, but is not necessarily a one-dimensional barcode area.
In other words, there may be a region “1”, which is not the region where the one-dimensional barcodes 21 and 22 are located, and the region may be determined as a “provisional region”.

(相関マップの作成)
そこで、次に、図5のステップST13において次に上下走査線相関処理が行われる。
これは、上下ライン間の相関マップ作成部142によって、一次元バーコード21,22とそうでない部分とを分離するための処理である。
具体的には、格子マップ上の「1」の各要素について、該当する区画のすぐ上とすぐ下に隣接する区画のライン相互の輝度の相関を計算する。
それらの区画が一次元バーコード21,22を含んでいれば、この相関値は大きな値を示すはずである。
具体的には、相関マップ作成部142は、格子座標上にライン相関マップを作成する。
(Creation of correlation map)
Therefore, next, in step ST13 of FIG. 5, the vertical scanning line correlation process is performed next.
This is a process for separating the one-dimensional barcodes 21 and 22 and the portions that are not so by the correlation map creation unit 142 between the upper and lower lines.
Specifically, for each element of “1” on the lattice map, the correlation between the luminances of the lines in the adjacent sections immediately above and immediately below the corresponding section is calculated.
If these sections contain one-dimensional barcodes 21, 22, this correlation value should be large.
Specifically, the correlation map creation unit 142 creates a line correlation map on the lattice coordinates.

図9は、一次元バーコードが2個の場合の上下ライン相関の処理結果である相関マップを示す図である。
具体的には、一次元バーコード21,22の走査線の走査方向に沿って形成されたラインにおいて、注目ラインとY軸方向に形成された上または下のいずれかのラインとの相関値が高ければ、その要素に1ポイントが加算され、注目ラインと上および下の両方のラインとの相関値が高ければ、その要素に2ポイントが加算される。
ここで注意すべき点は、図8に示す値(0と1の2値)が処理対象ではない点である。図6に示す実際の画像データが処理対象になる。
FIG. 9 is a diagram showing a correlation map that is a result of processing of upper and lower line correlations when there are two one-dimensional barcodes.
Specifically, in the lines formed along the scanning direction of the scanning lines of the one-dimensional barcodes 21 and 22, the correlation value between the target line and either the upper or lower line formed in the Y-axis direction is If it is high, 1 point is added to the element, and if the correlation value between the target line and both the upper and lower lines is high, 2 points are added to the element.
The point to be noted here is that the values shown in FIG. 8 (binary values 0 and 1) are not processing targets. The actual image data shown in FIG.

図8に示す領域Z11内の20箇所のポイントを生成するために使われたラインは、図6でいえば、一次元バーコード21を包含する20ラインとなる。
たとえば、図9に示す領域Z12内の左列の各ポイント(上から[1,2,2,1]の部分)を生成するために使われた4ラインに着目すると、図6でいえば、A1〜A4のラインとなる。A2を注目ラインとした場合、上下ライン相関の処理は、A2とA1の相関値と、A2とA3の相関値とが計算されるところ、一次元バーコード21の性質上、A2とA3の相関値は極めて大きく(限りなく1に)なる。
その結果、ポイントは1が加算される。また、A4を注目ラインとした場合も同様に、ポイントは1が加算される。そして、A3を注目ラインとした場合には、A3とA2の相関値も、A3とA4の相関値も、極めて大きくなることから、ポイントは2が加算される。
このようにして、領域Z12内の左列の各ポイント[1,2,2,1]が決まる。領域Z12内の左から2〜5列の各ポイント[1,2,2,1]も、右列の各ポイント[1,2,1]も、同様に決まる。
The lines used to generate the 20 points in the area Z11 shown in FIG. 8 are 20 lines including the one-dimensional barcode 21 in FIG.
For example, when attention is paid to the four lines used to generate each point in the left column (the portion [1, 2, 2, 1] from the top) in the region Z12 shown in FIG. The lines are A1 to A4. When A2 is the target line, the upper and lower line correlation processing calculates the correlation value between A2 and A1 and the correlation value between A2 and A3. Due to the nature of the one-dimensional barcode 21, the correlation between A2 and A3 is calculated. The value is very large (infinitely 1).
As a result, 1 is added to the points. Similarly, when the line of interest is A4, 1 is added to the point. When A3 is set as the attention line, the correlation value between A3 and A2 and the correlation value between A3 and A4 are extremely large, so 2 is added to the point.
In this way, each point [1, 2, 2, 1] in the left column in the region Z12 is determined. The points [1, 2, 2, 1] in the 2-5 columns from the left in the region Z12 and the points [1, 2, 1] in the right column are determined in the same manner.

同様にして、図8に示す領域Z21内の9箇所のポイントを生成するために使われたラインは、図6でいえば、一次元バーコード22を包含する9ラインとなる。
たとえば、図9に示す領域Z22内の左列の各ポイント(上から[1,2,1]の部分)を生成するために使われた3ラインに着目すると、図6でいえば、A7〜A9のラインとなる。A7を注目ラインとした場合、上下ライン相関の処理は、A7とA6の相関値と、A7とA8の相関値とが計算されるところ、一次元バーコード22の性質上、A7とA8の相関値は極めて大きく(限りなく1に)なる。
その結果、ポイントは1が加算される。また、A9を注目ラインとした場合も同様に、ポイントは1が加算される。そして、A8を注目ラインとした場合には、A8とA7の相関値も、A8とA9の相関値も、極めて大きくなることから、ポイントは2が加算される。
このようにして、点線枠Z内の左列の各ポイント[1,2,1]が決まる。点線枠Z2内の中央列の各ポイント[1,2,1]も、右列の各ポイント[1,2,1]も、同様に決まる。
Similarly, the lines used to generate nine points in the area Z21 shown in FIG. 8 are nine lines including the one-dimensional barcode 22 in FIG.
For example, when attention is paid to the three lines used to generate each point in the left column (part [1, 2, 1] from the top) in the area Z22 shown in FIG. 9, in FIG. This is the A9 line. When A7 is the target line, the upper and lower line correlation processing calculates the correlation value between A7 and A6 and the correlation value between A7 and A8. From the nature of the one-dimensional barcode 22, the correlation between A7 and A8 is calculated. The value is very large (infinitely 1).
As a result, 1 is added to the points. Similarly, when A9 is set as the target line, 1 is added to the point. When A8 is taken as the target line, the correlation value between A8 and A7 and the correlation value between A8 and A9 are extremely large, so 2 is added to the point.
In this way, each point [1, 2, 1] in the left column in the dotted frame Z is determined. Each point [1, 2, 1] in the center row in the dotted line frame Z2 and each point [1, 2, 1] in the right row are similarly determined.

図8に示すように、値「2」をもつ要素は、特に上下の相関が強いことを表している。そして、このような要素は、同一ラインパターンが上下に積層しているバーコードの特徴を反映していると考えられ、バーコード領域である可能性が高いことが分かる。
このように、上下ライン相関の処理(図5のステップST13)を行う上下ライン間の相関計算処理を行う相関マップ作成部142は、上述した仮領域について、バーコード21,22の走査線(図1に示す符号L1,L2参照)の走査方向に対して直交する方向(図6や図8でいえばY軸方向)に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する。
また、本実施形態では、図9の領域Z12,Z22を用いて説明したように、上下方向に隣接する2つの隣接領域(隣接するライン)との相関を求めた後、これら2つの相関値の双方が所定の閾値よりも高い相関値を示した場合(ポイント2が加算された場合)と、これら2つの相関値のいずれか一方が所定の閾値よりも高い相関値を示した場合(ポイント1が加算された場合)とを区別して、相関マップを作成するようにしている。
これにより、バーコード21,22が存在する位置を的確に認識できる相関マップを作成することができる(図9参照)。
As shown in FIG. 8, the element having the value “2” indicates that the correlation between the upper and lower sides is particularly strong. Such an element is considered to reflect the characteristics of a barcode in which the same line pattern is stacked one above the other, and it can be seen that there is a high possibility that it is a barcode region.
In this way, the correlation map creating unit 142 that performs the correlation calculation process between the upper and lower lines that performs the process of the upper and lower line correlation (step ST13 in FIG. 5) scans the barcodes 21 and 22 with respect to the temporary area described above (see FIG. Correlation with an adjacent region adjacent to the direction orthogonal to the scanning direction of the scanning direction of the scanning direction (L1 and L2 shown in FIG. 1) (the Y-axis direction in FIGS. 6 and 8) is obtained to indicate a region having a high correlation value. Create a map.
In the present embodiment, as described with reference to the regions Z12 and Z22 in FIG. 9, after obtaining the correlation between two adjacent regions (adjacent lines) adjacent in the vertical direction, the two correlation values are calculated. When both show a correlation value higher than a predetermined threshold (when point 2 is added), and when either one of these two correlation values shows a correlation value higher than a predetermined threshold (point 1) The correlation map is created in such a manner that the correlation map is created.
Thereby, the correlation map which can recognize the position where barcode 21 and 22 exist exactly can be created (refer FIG. 9).

(基本パターンの検索)
次に、ラベリング部143において基本パターンの検索が行われる(図5のステップS14)。
具体的には、ラベリング部143は、相関マップを用いて、一次元バーコードにおける基本パターンの存在を調べる。たとえば、検出した最小の一次元バーコードサイズが、相関マップ上で走査方向(X軸方向)に2が3つ並んだ[2,2,2]の基本パターン(ポイント列)に対応する場合において、図9の相関マップをサーチして、この基本パターン[2,2,2]が検出されたら、その基本パターンによって占有されるマップ要素に「1」を立て、それ以外のマップ要素は「0」とする。
この3つの要素の基本パターン[2,2,2]以上の4要素[2,2,2,2]、5要素[2,2,2,2,2]のパターンを一次元バーコードとして検出することができる。
図9に示す相関マップに対して、このような処理を実行すると、図10の領域Z13,Z23に示すようなシンボルラベリングマップ(バーコードマップ)SLM1を得ることができる。
なお、本実施形態では、2つの一次元バーコード21,22に対応して基本パターン[2,2,2]に加えて[2,2,2,2,2]が必要となっている。
(Basic pattern search)
Next, the basic pattern is searched in the labeling unit 143 (step S14 in FIG. 5).
Specifically, the labeling unit 143 checks the presence of the basic pattern in the one-dimensional barcode using the correlation map. For example, when the detected minimum one-dimensional barcode size corresponds to a basic pattern (point sequence) of [2, 2, 2] in which three 2s are arranged in the scanning direction (X-axis direction) on the correlation map. When the basic map [2, 2, 2] is detected by searching the correlation map of FIG. 9, “1” is set to the map element occupied by the basic pattern, and other map elements are “0”. "
A pattern of 4 elements [2, 2, 2, 2] and 5 elements [2, 2, 2, 2, 2] more than the basic pattern [2, 2, 2] of these three elements is detected as a one-dimensional barcode. can do.
When such processing is executed on the correlation map shown in FIG. 9, a symbol labeling map (barcode map) SLM1 as shown in the areas Z13 and Z23 of FIG. 10 can be obtained.
In the present embodiment, [2, 2, 2, 2, 2] is required in addition to the basic pattern [2, 2, 2] corresponding to the two one-dimensional barcodes 21, 22.

図10は、図9に示す相関マップから得られたシンボルラベリングマップ(バーコードマップ)を示す図である。
このように、基本パターン検索の処理(図5のステップST14)を行うラベリング部143は、相関マップについて、バーコードの基本パターン[2,2,2]およびパターン[2,2,2,2,2]の有無を検索し、その基本パターンが存在すると判断した領域をラベリングする(本実施形態ではマップ要素に「1」を立てる)。
FIG. 10 is a diagram showing a symbol labeling map (barcode map) obtained from the correlation map shown in FIG.
In this way, the labeling unit 143 that performs the basic pattern search process (step ST14 in FIG. 5) performs the barcode basic pattern [2, 2, 2] and pattern [2, 2, 2, 2, 2] is searched, and an area where the basic pattern is determined to be present is labeled (in this embodiment, “1” is set in the map element).

以上、図6の2個の一次元バーコード21,22が印刷された記録媒体20を画像化したマップを2値化した図8について詳述した。
なお、1個の一次元バーコードが印刷された記録媒体を画像化したマップを2値化した場合、1個の一次元バーコードが存在するが、基本的な処理は上述した一次元バーコード21に対する処理を除いて図8に関連付けて説明した処理と同様である。
As described above, FIG. 8 in which the map obtained by imaging the recording medium 20 on which the two one-dimensional barcodes 21 and 22 of FIG. 6 are binarized has been described in detail.
When a map obtained by imaging a recording medium on which one one-dimensional barcode is printed is binarized, one one-dimensional barcode exists, but the basic process is the above-described one-dimensional barcode. The process is the same as that described with reference to FIG.

なお、本実施形態では、2つの一次元バーコード22,21に対応して基本パターン[2,2,2]に加えてパターン[2,2,2,2,2]、が必要となる。3要素の基本パターン[2,2,2]や5要素のパターン[2,2,2,2,2]からなるパターンを考えたが、一列4要素、6要素、あるいはそれ以上の要素からなるパターンや、上下各3要素の計6要素からなるパターンなど、読取対象のバーコードの態様としては種々変更可能である。
また、本実施形態では、注目ラインについて、走査線の走査方向に対して直交する方向に隣接する隣接領域(隣接するライン)との相関を求め、これら2つの相関値の双方が所定の閾値よりも高い相関値を示す領域が、一次元バーコードが存在すると判断した領域としてラベリングされるようにしている。
これにより、文字部分を適切に排除し、より確度の高い部分(一次元バーコード21,22が存在する部分のみ)を検索対象とすることができる。
In the present embodiment, the pattern [2, 2, 2, 2, 2] is required in addition to the basic pattern [2, 2, 2] corresponding to the two one-dimensional barcodes 22, 21. We considered a pattern consisting of a basic pattern [2, 2, 2] of 3 elements and a pattern [2, 2, 2, 2, 2] of 5 elements, but it consists of 4 elements in a row, 6 elements, or more. Various changes can be made to the mode of the barcode to be read, such as a pattern and a pattern composed of a total of six elements, each of three elements on the upper and lower sides.
In the present embodiment, the correlation between the target line and an adjacent region (adjacent line) adjacent in the direction orthogonal to the scanning direction of the scanning line is obtained, and both of these two correlation values are determined from a predetermined threshold value. An area having a higher correlation value is labeled as an area determined to have a one-dimensional barcode.
Thereby, a character part can be excluded appropriately and a part with higher accuracy (only a part where the one-dimensional barcodes 21 and 22 exist) can be set as a search target.

また、位置検出処理部14のラベリング部143には、一または複数のバーコードの基本パターンおよびそれ以上の要素を持つパターン(検出フィルタ)が記憶されている。
そして、図2のフローチャートに関連付けて説明したように、一連のバーコードの読取処理の中で、バーコードの基本パターンおよびそれ以上の要素のおパターンが順次切り替わるので(図2のステップST5,ステップST6)、結果的に、ラベリング部143は、複数のバーコードの基本パターンおよび所定のパターンを用いて基本パターン等の検索を行うことになる。
Further, the labeling unit 143 of the position detection processing unit 14 stores a pattern (detection filter) having one or a plurality of barcode basic patterns and more elements.
As described with reference to the flowchart of FIG. 2, the bar code basic pattern and the pattern of elements higher than that are sequentially switched in a series of bar code reading processes (steps ST5 and ST5 in FIG. 2). ST6) As a result, the labeling unit 143 searches for a basic pattern or the like using a plurality of barcode basic patterns and a predetermined pattern.

本実施形態においては、位置決定部145においてシンボル位置判定を行う前に、領域分割部144においてバーコードの個数判定(図5のステップST15)および領域分割処理(図5のステップST16)を行う。   In the present embodiment, before the position determination unit 145 performs symbol position determination, the region division unit 144 performs barcode number determination (step ST15 in FIG. 5) and region division processing (step ST16 in FIG. 5).

領域分割部144の個数判定部1441では、ラベリング部143によるシンボルラベリングマップSLM1におけるシンボル数を判定する。個数判定部1441では、シンボルラベリングマップ(バーコードマップ)における一次元バーコードの数をゼロ個から1個か2個以上であるか否かの判定が行われる。   The number determining unit 1441 of the region dividing unit 144 determines the number of symbols in the symbol labeling map SLM1 by the labeling unit 143. The number determination unit 1441 determines whether the number of one-dimensional barcodes in the symbol labeling map (barcode map) is from zero to one or two or more.

図11は、本実施形態に係るシンボルラベリングマップ(バーコードマップ)における一次元バーコードの個数を判定する処理の一例を説明するためのフローチャートである。   FIG. 11 is a flowchart for explaining an example of processing for determining the number of one-dimensional barcodes in the symbol labeling map (barcode map) according to the present embodiment.

個数判定部1441は、個数判定をたとえば次のようにして行う。
シンボルラベリングマップ(バーコードマップ)SLM上でゼロでない値1をもつ要素数をカウントしこれをC0とする(ステップST21)。
ここで、ステップST22においてC0がゼロ(0)であるか否かを判定する。ステップST22においてC0がゼロ(0)であると判定した場合には、一次元バーコードは0個であると判定する(ステップST28)。
The number determination unit 1441 performs the number determination as follows, for example.
The number of elements having a non-zero value 1 on the symbol labeling map (barcode map) SLM is counted and set as C0 (step ST21).
Here, in step ST22, it is determined whether or not C0 is zero (0). If it is determined in step ST22 that C0 is zero (0), it is determined that there are no one-dimensional barcodes (step ST28).

ステップST22において、C0がゼロ(0)ではないと判定すると、ラベリング部143で取得されたシンボルラベリングマップ(バーコードマップ)SLMの重心COG(CenterOfGravity)を求める。
シンボルラベリングマップ(バーコードマップ)SLMの重心COG(ycog,xcog)は、たとえばシンボルラベリングマップSLMの全域においてX軸の射影projXおよびY軸の射影projYを取得(計算)し、そのプロファイルのレベル特性から求めることができる。
If it is determined in step ST22 that C0 is not zero (0), the center of gravity COG (CenterOfGravity) of the symbol labeling map (barcode map) SLM acquired by the labeling unit 143 is obtained.
The center of gravity COG (ycog, xcog) of the symbol labeling map (barcode map) SLM acquires (calculates), for example, the X-axis projection projX and the Y-axis projection projY over the entire area of the symbol labeling map SLM, and level characteristics of the profile Can be obtained from

求めたシンボルラベリングマップの重心COG(ycog,xcog)を起点として、シンボルラベリングマップSLMの左端・右端・上端・下端位置を求める。左右位置は、バーコードマップ上でxcogを起点としてX軸方向に要素和(加算範囲はycog±2)がゼロとなる座標xstartおよびxstopを検出し(ステップST24)、そこで打ち切る。
上下位置は、バーコードマップ上でycogを起点としてY軸方向に要素和(加算範囲[xstart, xstop])がゼロとなる座標yupperおよびylowerを検出し(ステップST25)、そこで打ち切る。
このようにして、格子座標上において、一次元バーコード21の4辺位置が特定される。
Starting from the center of gravity COG (ycog, xcog) of the obtained symbol labeling map, the left end, right end, upper end, and lower end positions of the symbol labeling map SLM are obtained. As for the left and right positions, coordinates xstart and xstop where the element sum (addition range is ycog ± 2) is zero in the X-axis direction from xcog as a starting point on the barcode map are detected (step ST24), and are terminated there.
As for the vertical position, coordinates yuper and ylower at which the element sum (addition range [xstart, xstop]) is zero in the Y-axis direction starting from ycog on the barcode map are detected (step ST25), and the position is terminated.
In this way, the four side positions of the one-dimensional barcode 21 are specified on the lattice coordinates.

また、シンボルラベリングマップ(バーコードマップ)内の4辺で囲まれる部分領域内の非ゼロ要素の数をC1とする。   Also, let C1 be the number of non-zero elements in the partial area surrounded by the four sides in the symbol labeling map (barcode map).

図12は、2個の一次元バーコードを検出したときのシンボルラベリングマップ(バーコードマップ)SLM1とそのX軸およびY軸の射影projX,projYのプロファイルPRFX、PRFY、並びにシンボルラベリングマップSLM1の重心、左端・右端・上端・下端位置の各座標を示す図である。   FIG. 12 shows a symbol labeling map (barcode map) SLM1 when two one-dimensional barcodes are detected, and projections projX and projY of the X-axis and Y-axis, profiles PRFX and PRFY, and the center of gravity of the symbol labeling map SLM1. It is a figure which shows each coordinate of a left end, a right end, an upper end, and a lower end position.

図12のシンボルラベリングマップSLM1の重心COG1の格子上の座標(ycog,xcog)は(4.5,3.7)となる。   The coordinates (ycog, xcog) on the lattice of the center of gravity COG1 of the symbol labeling map SLM1 of FIG. 12 are (4.5, 3.7).

座標ycog=4.5はY軸の射影projYに基づき次式で求めることができる。
ycog={(3×5)+(4×5)+(8×3)}/{5+5+3}
={15+20+24}/{13}=59/13=4.5
The coordinate ycog = 4.5 can be obtained by the following expression based on the projection projY of the Y axis.
ycog = {(3 × 5) + (4 × 5) + (8 × 3)} / {5 + 5 + 3}
= {15 + 20 + 24} / {13} = 59/13 = 4.5

座標xcog=3.7はX軸の射影projXに基づき次式で求めることができる。
xcog={(1×2)+(2×2)+(3×2)+(4×2)+(5×3)+
(6×1)+(7×1)}/{2+2+2+2+3+1+1}
={2+4+6+8+15+6+7}/{13}=48/13≒3.7
The coordinate xcog = 3.7 can be obtained by the following expression based on the projection projX of the X axis.
xcog = {(1 × 2) + (2 × 2) + (3 × 2) + (4 × 2) + (5 × 3) +
(6 × 1) + (7 × 1)} / {2 + 2 + 2 + 2 + 3 + 1 + 1}
= {2 + 4 + 6 + 8 + 15 + 6 + 7} / {13} = 48 / 13≈3.7

なお、バーコードが2個存在する場合、対応するシンボルラベリングマップ(バーコードマップ)は、図12に示すように、このマップ上で重心COG1を求めると、一次元バーコードに含まれないバーコードから外れた外部の位置に来てしまう場合が多い。   If there are two barcodes, the corresponding symbol labeling map (barcode map) can be obtained by calculating the barycenter COG1 on this map as shown in FIG. In many cases, it will come to an outside position that is outside of the range.

なお、一次元バーコードが1個しか存在しない場合、対応するシンボルラベリングマップ(バーコードマップ)は、このマップ上で重心COG2を求めると、一次元バーコード内の適正な位置となる。   If there is only one one-dimensional barcode, the corresponding symbol labeling map (barcode map) is an appropriate position in the one-dimensional barcode when the center of gravity COG2 is obtained on this map.

次に、そして、ステップST26において、シンボルラベリングマップ(バーコードマップ)上で重心COGを起点として求めた一次元バーコードの4辺によって囲まれる領域内の値1をもつ要素数をカウントしこれをC1とする。本例では、シンボルラベリングマップSLM1の場合、C1=2となる。   Next, in step ST26, the number of elements having a value of 1 in the region surrounded by the four sides of the one-dimensional barcode obtained from the center of gravity COG on the symbol labeling map (barcode map) is counted. Let C1. In this example, in the case of the symbol labeling map SLM1, C1 = 2.

そして、ステップST27において、C0がC1であるか否かを判定する。ステップST27においてC0がC1であると判定した場合には、一次元バーコードは1個であると判定する(ステップST29)。   In step ST27, it is determined whether C0 is C1. If it is determined in step ST27 that C0 is C1, it is determined that there is one one-dimensional barcode (step ST29).

ステップST22において、C0がC1ではないと判定すると、一次元バーコードは2個以上であると判定する(ステップST30)。   If it is determined in step ST22 that C0 is not C1, it is determined that there are two or more one-dimensional barcodes (step ST30).

個数判定部1441の判定結果は分割処理部1442に供給され、領域分割処理(図5のステップST16)が行われる。   The determination result of the number determination unit 1441 is supplied to the division processing unit 1442, and the region division processing (step ST16 in FIG. 5) is performed.

分割処理部1442では、一次元バーコードが2個以上と判定された場合に、対応するシンボルラベリングマップ(バーコードマップ)を用いて領域分割を行う。
領域分割は以下の理由により行う。
When the division processing unit 1442 determines that there are two or more one-dimensional barcodes, the division processing unit 1442 performs region division using a corresponding symbol labeling map (barcode map).
Region division is performed for the following reason.

一次元バーコードが同一画像空間上に2個以上(複数個)存在する場合は、正しく位置検出を行うことができない。
たとえば図6に示すような一次元バーコードが2個存在する場合、対応するシンボルラベリングマップ(バーコードマップ)は図10に示すようになるが、前述したように、このマップ上で重心COGを求めると、重心COGは一次元バーコードに含まれないバーコードから外れた外部の位置に来てしまう場合が多い。一次元バーコードの位置関係によっては重心が一次元バーコードの内側に来る場合もあるが、その場合でも存在するバーコードすべてをただしく復号することは難しい。
そこで、一次元バーコードごとに領域分割して分割した領域ごとに重心を求めることができるように領域分割を行う。
When two or more (plural) one-dimensional barcodes exist in the same image space, position detection cannot be performed correctly.
For example, when there are two one-dimensional barcodes as shown in FIG. 6, the corresponding symbol labeling map (barcode map) is as shown in FIG. 10, but as described above, the center of gravity COG is displayed on this map. As a result, the center of gravity COG often comes to an external position outside the barcode that is not included in the one-dimensional barcode. Depending on the positional relationship of the one-dimensional barcode, the center of gravity may be inside the one-dimensional barcode, but even in that case, it is difficult to decode all the existing barcodes.
Therefore, the region is divided so that the center of gravity can be obtained for each divided region by dividing the region for each one-dimensional barcode.

領域分割は、たとえばシンボルラベリングマップSLM1全域のX軸の射影projXおよびY軸の射影projYを取得し、取得した射影のプロファイルPRFX,PRFYにおいて谷部分と認識できる位置を探索し、この谷部分の位置を領域分割の境界位置(境界線)として取得し、取得した境界位置を基準として複数(本例では2個)の一次元バーコードの各領域R1,R2・・を設定する。   In the area division, for example, an X-axis projection projX and a Y-axis projection projY of the entire symbol labeling map SLM1 are acquired, and a position that can be recognized as a valley portion in the acquired projection profiles PRFX and PRFY is searched, and the position of this valley portion is searched. Are obtained as boundary positions (boundary lines) of area division, and a plurality (two in this example) of one-dimensional barcodes R1, R2,... Are set based on the acquired boundary positions.

図13は、一次元バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割処理を説明するための図である。
図14は、一次元バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割の一処理を説明するためのフローチャートである。
FIG. 13 is a diagram for explaining region division processing of the symbol labeling map when there are two one-dimensional barcodes.
FIG. 14 is a flowchart for explaining one process of area division of the symbol labeling map when there are two one-dimensional barcodes.

分割処理部1442は、シンボルラベリングマップ(バーコードマップ)SLM1の全域におけるX軸の射影projXおよびY軸の射影projY、あるいは射影projXおよびY軸の射影projYの一方を取得(計算)する。   The division processing unit 1442 acquires (calculates) one of the X-axis projection projX and the Y-axis projection projY or the projection projX and the Y-axis projection projY in the entire area of the symbol labeling map (barcode map) SLM1.

一次元バーコードが2個の場合は、双方のバーコードが結合状態にない限り、射影projXおよびprojYのいずれか一方もしくは両者が2つの山と1つの谷からなるプロファイルPRF(X、Y)をもつ。
図13ではY軸の射影projYにその特性が現れている。射影projYの谷に相当する部分が、2つの一次元バーコードに挟まれた空間に対応する。よって、射影projY上でこの谷の位置を決定することにより、2つの一次元バーコードの上下方向の境界位置(分離位置のy座標)ydivを求めることができる。
境界位置ydivによって上下に分離された2つの領域をR1およびR2とする。以降の処理は、領域R1とR2のそれぞれについて、一次元バーコードが1個の場合と同様の処理を適用することで、各々の一次元バーコードの位置を決定することができる。
In the case of two one-dimensional barcodes, as long as both barcodes are not in a combined state, one or both of the projections projX and projY have a profile PRF (X, Y) consisting of two peaks and one valley. Have.
In FIG. 13, the characteristic appears in the projection projY on the Y axis. A portion corresponding to the valley of the projection projY corresponds to a space sandwiched between two one-dimensional barcodes. Therefore, by determining the position of this valley on the projection projY, the vertical boundary position (y coordinate of the separation position) ydiv of the two one-dimensional barcodes can be obtained.
Let R1 and R2 be two regions separated vertically by the boundary position ydiv. In the subsequent processing, the position of each one-dimensional barcode can be determined by applying the same processing as in the case of one one-dimensional barcode to each of the regions R1 and R2.

図14の処理では、まずステップST41において、シンボルラベリングマップ(バーコードマップ)SLM1の全域におけるX軸の射影projXおよびY軸の射影projYを取得(計算)する。なお、X軸の射影projXおよびY軸の射影projYは、前述した個数判定処理で計算して取得した射影情報を用いてもよい。   In the process of FIG. 14, first, in step ST41, the X-axis projection projX and the Y-axis projection projY in the entire area of the symbol labeling map (barcode map) SLM1 are obtained (calculated). Note that the projection information obtained by calculation in the above-described number determination process may be used for the projection projX on the X axis and the projection projY on the Y axis.

次に、X軸の射影projXを解析し(ステップST42)、曲線を2山に分ける値ゼロの区間が存在するか調べる(ステップST43)。
図13の例では射影projX上にそのような区間は存在しない。これは2つの一次元バーコードが、横方向に見た場合にオーバーラップしていることによる。
Next, the projection projX of the X axis is analyzed (step ST42), and it is checked whether or not there is a zero value section that divides the curve into two peaks (step ST43).
In the example of FIG. 13, no such section exists on the projection projX. This is because the two one-dimensional barcodes overlap when viewed in the horizontal direction.

したがって次に、Y軸への射影projYを解析し(ステップST44)、曲線を2山に分ける値ゼロの区間が存在するか調べる(ステップST45)。
図13の例では射影projY上にそのような区間が存在する。この射影曲線上で値ゼロの谷を形成する区間の中央の値をydivとして、シンボルラベリングマップ(バーコードマップ)を上下に2つの部分領域R1およびR2に分割する(ステップST46)。
Therefore, next, the projection projY onto the Y-axis is analyzed (step ST44), and it is checked whether there is a zero-value section that divides the curve into two peaks (step ST45).
In the example of FIG. 13, such a section exists on the projection projY. The symbol labeling map (barcode map) is vertically divided into two partial regions R1 and R2 with the central value of the section forming the valley having a value of zero on the projection curve as ydiv (step ST46).

なお、X軸への射影projXを解析し(ステップST43)、曲線を2山に分ける値ゼロの区間が存在する場合には、この射影曲線上で値ゼロの谷を形成する区間の中央の値をxdivとして、シンボルラベリングマップ(バーコードマップ)を上下に2つの部分領域R1およびR2に分割する(ステップST47)。   If the projection projX on the X-axis is analyzed (step ST43) and there is a zero-value section that divides the curve into two peaks, the central value of the section that forms a zero-value valley on this projection curve Is divided into xdiv, and the symbol labeling map (barcode map) is vertically divided into two partial regions R1 and R2 (step ST47).

次に、シンボルラベリングマップ(バーコードマップ)SLM1の部分領域R1について一次元バーコードの個数の判定を行う(ステップST48)。ここでの処理は、前述の図11に示した処理手順に従って行うことができる。問題がなければ領域R1における一次元バーコードの個数が1個であることが確認できる(ステップST49)。   Next, the number of one-dimensional barcodes is determined for the partial region R1 of the symbol labeling map (barcode map) SLM1 (step ST48). This processing can be performed according to the processing procedure shown in FIG. If there is no problem, it can be confirmed that the number of one-dimensional barcodes in the region R1 is one (step ST49).

続いて、部分領域R2について同様に一次元バーコードの個数の判定を行う(ステップST50)。問題がなければ領域R2における一次元バーコードの個数が1個であることが確認できる(ステップST51)。
ここまでの処理によって、各分割領域R1,R2に1個ずつ復号可能な一次元バーコードが存在し、一次元バーコードの位置が確定できる(ステップST52)。
Subsequently, the number of one-dimensional barcodes is similarly determined for the partial region R2 (step ST50). If there is no problem, it can be confirmed that the number of one-dimensional barcodes in the region R2 is 1 (step ST51).
Through the processing so far, one-dimensional barcode that can be decoded exists in each of the divided regions R1, R2, and the position of the one-dimensional barcode can be determined (step ST52).

なお、ステップST45で射影projY上に谷の存在が確認できない場合、ステップST49,ST51で領域R1,R2における一次元バーコードの個数が1個であることが確認できない場合には、何らかの異常が生じているものと判定される(ステップST53)。   If it is not possible to confirm the existence of a valley on the projection projY in step ST45, or if it is not possible to confirm that the number of one-dimensional barcodes in the regions R1 and R2 is one in steps ST49 and ST51, some abnormality occurs. Is determined (step ST53).

次に、位置決定部145において、バーコード位置決定(位置判定)が行われる(図5のステップST17)。
一次元バーコードが2個存在し、シンボルラベリングマップSLM1の領域分割が行われた場合には、分割された複数の一次元バーコードの各シンボルについてラベリングされた領域に基づき、一次元バーコードが記録媒体20に記録された位置を検出する。
Next, in the position determination unit 145, barcode position determination (position determination) is performed (step ST17 in FIG. 5).
When there are two one-dimensional barcodes and the area division of the symbol labeling map SLM1 is performed, the one-dimensional barcode is based on the area labeled for each symbol of the divided one-dimensional barcode. The position recorded on the recording medium 20 is detected.

位置決定部145は、分割された個別の領域について一次元バーコードの上下左右の概略位置である重心を決定し、概略位置情報より上記画像空間座標上のバーコードの上下左右位置を最終決定する。   The position determination unit 145 determines the center of gravity as the approximate vertical and horizontal positions of the one-dimensional barcode for each divided area, and finally determines the vertical and horizontal positions of the barcode on the image space coordinates from the approximate position information. .

位置決定部145のシンボル位置判定処理においては、シンボルラベリングマップの重心(yxog,xcog)を求めることから開始される。重心は定義に基づいて計算される。   The symbol position determination process of the position determination unit 145 starts from obtaining the center of gravity (yxog, xcog) of the symbol labeling map. The center of gravity is calculated based on the definition.

2個(複数)の一次元バーコードがあり、領域分割部144で一次元バーコードごとに分割されている場合には、分割領域の一次元バーコードごとに上記したような、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYを取得して一次元バーコードごとの重心が求められる。   When there are two (plural) one-dimensional barcodes and the area dividing unit 144 divides each one-dimensional barcode, the entire symbol labeling map as described above for each one-dimensional barcode in the divided area , The X-axis projection projX and the Y-axis projection projY are obtained to obtain the center of gravity for each one-dimensional barcode.

図15は、2個の一次元バーコードを検出したときのシンボルラベリングマップ(バーコードマップ)SLM1の第1分割領域R1とそのX軸およびY軸の射影projX,projYのプロファイルPRFX、PRFY、並びに分割領域の重心、左端・右端・上端・下端位置の各座標を示す図である。   FIG. 15 shows the profiles PRFX and PRFY of the first divided region R1 of the symbol labeling map (barcode map) SLM1 and the projections projX and projY of the X and Y axes when two one-dimensional barcodes are detected, and It is a figure which shows the gravity center of a division area, and each coordinate of a left end, a right end, an upper end, and a lower end position.

図15のシンボルラベリングマップSLM11の重心COG11の座標(ycog,xcog)は(3.5,3.4)となる。   The coordinates (ycog, xcog) of the center of gravity COG11 of the symbol labeling map SLM11 of FIG. 15 are (3.5, 3.4).

座標ycog=3.5はY軸の射影projYに基づき次式で求めることができる。
ycog={(3×5)+(4×5)}/{5+5}
={15+20}/{10}=35/10=3.5
The coordinate y cog = 3.5 can be obtained by the following expression based on the projection projY of the Y axis.
ycog = {(3 × 5) + (4 × 5)} / {5 + 5}
= {15 + 20} / {10} = 35/10 = 3.5

座標xcog=3.4はX軸の射影projXに基づき次式で求めることができる。
xcog={(1×2)+(2×2)+(3×2)+(4×2)+(5×2)+
(5.5×2)}/{2+2+2+2+2+2}
={2+4+6+8+10+11}/{12}=41/12≒3.4
The coordinate xcog = 3.4 can be obtained by the following expression based on the projection projX of the X axis.
xcog = {(1 × 2) + (2 × 2) + (3 × 2) + (4 × 2) + (5 × 2) +
(5.5 × 2)} / {2 + 2 + 2 + 2 + 2 + 2}
= {2 + 4 + 6 + 8 + 10 + 11} / {12} = 41 / 12≈3.4

このように、分割領域R1には一次元バーコードが1個しか存在しないことから、対応するシンボルラベリングマップ(バーコードマップ)は、このマップ上で重心COG11を求めると、一次元バーコード21内の適正な位置となる。   As described above, since there is only one one-dimensional barcode in the divided region R1, the corresponding symbol labeling map (barcode map) is obtained by calculating the center of gravity COG11 on this map, and in the one-dimensional barcode 21. The proper position.

図16は、2個の一次元バーコードを検出したときのシンボルラベリングマップ(バーコードマップ)SLM1の第2分割領域R2とそのX軸およびY軸の射影projX,projYのプロファイルPRFX、PRFY、並びに分割領域の重心、左端・右端・上端・下端位置の各座標を示す図である。   FIG. 16 shows the profiles PRFX and PRFY of the second division region R2 of the symbol labeling map (barcode map) SLM1 and the projections projX and projY of the X and Y axes when two one-dimensional barcodes are detected, and It is a figure which shows the gravity center of a division area, and each coordinate of a left end, a right end, an upper end, and a lower end position.

図16のシンボルラベリングマップSLM12の重心COG12の格子上の座標(ycog,xcog)は(8,6)となる。   The coordinates (ycog, xcog) on the lattice of the center of gravity COG12 of the symbol labeling map SLM12 of FIG. 16 are (8, 6).

座標ycog=8はY軸の射影projYに基づき次式で求めることができる。
ycog={8×3}/{3}
={24}/{3}=8
The coordinate y cog = 8 can be obtained by the following expression based on the projection projY of the Y axis.
ycog = {8 × 3} / {3}
= {24} / {3} = 8

座標xcog=6はX軸の射影projXに基づき次式で求めることができる。
xcog={(4.5×1)+(5×1)+(6×1)+(7×1)+(7.5×1)
={4.5+5+6+7+7.5}/{1+1+1+1+1}
=30/5=6
The coordinate xcog = 6 can be obtained by the following expression based on the projection projX of the X axis.
xcog = {(4.5 × 1) + (5 × 1) + (6 × 1) + (7 × 1) + (7.5 × 1)
= {4.5 + 5 + 6 + 7 + 7.5} / {1 + 1 + 1 + 1 + 1}
= 30/5 = 6

このように、分割領域R2には一次元バーコードが1個しか存在しないことから、対応するシンボルラベリングマップ(バーコードマップ)は、このマップ上で重心COG12を求めると、一次元バーコード22内の適正な位置となる。   As described above, since there is only one one-dimensional barcode in the divided region R2, the corresponding symbol labeling map (barcode map) is obtained by calculating the center of gravity COG12 on this map. The proper position.

なお、記録媒体20に1個のバーコードが存在する場合には、領域分割部144の個数判定部1441でバーコード数が1個と判定され、領域分割処理が行われることなく、位置決定部145において、シンボルラベリングマップ(バーコードマップ)の全域の重心が求められる。   If there is one barcode on the recording medium 20, the number determining unit 1441 of the region dividing unit 144 determines that the number of barcodes is one, and the position determining unit is not subjected to the region dividing process. At 145, the center of gravity of the entire area of the symbol labeling map (barcode map) is determined.

このように重心を求めた後、次に、シンボルラベリングマップ(バーコードマップ)の左端・右端・上端・下端位置を求める。左右位置は、シンボルラベリングマップ(バーコードマップ)上でxcogを起点としてX軸方向に要素和(加算範囲はycog±2)がゼロとなる座標xstartおよびxstopを検出し、そこで打ち切る。
上下位置は、シンボルラベリングマップ(バーコードマップ)上でycogを起点としてY軸方向に要素和(加算範囲[xstart, xstop])がゼロとなる座標yupperおよびylowerを検出したら打ち切る。
このようにして、座標上において、一次元バーコード21,22の4辺位置が特定される。そして、4辺の座標から画像空間上の座標を求める。
After obtaining the center of gravity in this way, next, the left end, right end, upper end, and lower end positions of the symbol labeling map (barcode map) are obtained. The left and right positions are detected on coordinates xstart and xstop where the element sum (addition range is ycog ± 2) is zero in the X-axis direction starting from xcog on the symbol labeling map (barcode map).
The vertical position is cut off when coordinates yuper and ylower at which the element sum (addition range [xstart, xstop]) becomes zero in the Y-axis direction starting from ycog on the symbol labeling map (barcode map) are detected.
In this way, the four side positions of the one-dimensional barcodes 21 and 22 are specified on the coordinates. Then, the coordinates in the image space are obtained from the coordinates of the four sides.

分割された区画ごとに画像空間との1対1の対応関係をもっているので、一次元バーコードの左端は、区画(ycog, xstart)における区画開始点である。一次元バーコードの右端は、区画(ycog, xstop)における区画終了点である。したがって、一次元バーコードの左右範囲は、左端〜右端となる。
なお、この左右範囲については、マージンをみて、左右それぞれ一定画素数拡張することも可能である。一次元バーコードの上下端の画像空間上の位置は、区画(yupper, xcog)のy座標と、区画(ylower, xcog)のy座標とで挟まれた領域の平均輝度のプロファイルから求められる。
具体例を図17に示す。
Since each divided section has a one-to-one correspondence with the image space, the left end of the one-dimensional barcode is a section start point in the section (ycog, xstart). The right end of the one-dimensional barcode is a partition end point in the partition (ycog, xstop). Therefore, the left-right range of the one-dimensional barcode is the left end to the right end.
Note that the left and right range can be expanded by a certain number of pixels on each of the left and right sides in view of the margin. The positions of the upper and lower ends of the one-dimensional barcode in the image space are obtained from the average luminance profile of the area sandwiched between the y coordinate of the section (upper, xcog) and the y coordinate of the section (ylower, xcog).
A specific example is shown in FIG.

図17は、一次元バーコード22付近における平均輝度のプロファイルを示す図である。
図17に示すように、上下エッジのサーチ開始点は、重心区画のy座標であり、その輝度に基づいてエッジ判定閾値(図17参照)を決める。
そして、上下にサーチして、エッジ判定閾値を超えたところをエッジと判定し、それらをBimgtopおよびBimgbottomとする。
FIG. 17 is a diagram showing a profile of average luminance in the vicinity of the one-dimensional barcode 22.
As shown in FIG. 17, the search start point of the upper and lower edges is the y coordinate of the barycentric section, and the edge determination threshold (see FIG. 17) is determined based on the luminance.
Then, the search is performed up and down, and a portion exceeding the edge determination threshold is determined as an edge, and these are designated as Bimgtop and Bimgbottom.

このように、位置決定部145は、ラベリングされた領域に基づき、一次元バーコード21,22が記録媒体20に記録された位置を検出する。なお、本実施形態では、画像メモリを構成するm行n列に配置した画素の位置を検出している。また、たとえば、この位置決定部145のシンボル位置判定機能として、ラベリングされた領域に基づいて一次元バーコード21が記録媒体20に記録された上下左右の概略位置を決定し、その概略位置で形成される矩形領域内のラベルリング総数をカウントし、これを予めカウントされた前記相関マップ全体でのラベリング総数と一致するか否かを判定した後、一次元バーコード21,22が記録媒体20に記録された位置を検出するようにしてもよい。これにより、上下左右の概略位置の精度を高めることが可能である。   As described above, the position determination unit 145 detects the position where the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20 based on the labeled area. In the present embodiment, the positions of pixels arranged in m rows and n columns constituting the image memory are detected. Further, for example, as the symbol position determination function of the position determination unit 145, the approximate position of the top, bottom, left, and right where the one-dimensional barcode 21 is recorded on the recording medium 20 is determined based on the labeled area, and formed at the approximate position. The total number of label rings in the rectangular area is counted, and after determining whether or not this matches the total number of labels in the whole correlation map, the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20. The recorded position may be detected. Thereby, it is possible to improve the accuracy of the approximate positions of the top, bottom, left, and right.

基本的にシンボル情報読取装置においては、エッジをBimgtopおよびBimgbottomとすることで、バーコードの画像空間上の位置(画素位置)が確定できたので、バーコード位置検出の全処理を終わることも可能である。   Basically, in the symbol information reader, the position of the barcode in the image space (pixel position) can be determined by setting the edge to Bimgtop and Bimgbottom, so it is possible to end the entire barcode position detection process. It is.

そして、図5のステップST18において、データ復号のための走査線が決定される。   Then, in step ST18 of FIG. 5, a scanning line for data decoding is determined.

[実施形態の主な効果]
以上説明したように、本実施形態に係るバーコード読取装置10によれば、位置検出処理部14において、相関マップ作成部142は、仮領域について、走査線の走査方向に対して直交する方向に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する。ラベリング部143は、相関マップについて、一次元バーコード21,22の有無を検索し、一次元バーコード21,22が存在すると判断した領域をラベリングする。次いで、領域分割部144が、ラベリングされた領域に基づき、複数の一次元バーコード21,22のそれぞれについて領域を設定し分割する。そして、位置決定部145が、領域分割部144で分割された複数のシンボルの各シンボルについてラベリングされた領域に基づき、一次元バーコード21,22が記録媒体20に記録された位置を検出する。
[Main effects of the embodiment]
As described above, according to the barcode reading apparatus 10 according to the present embodiment, in the position detection processing unit 14, the correlation map creating unit 142 has the temporary region in a direction orthogonal to the scanning direction of the scanning line. A correlation between adjacent regions is obtained, and a map showing a region having a high correlation value is created. The labeling unit 143 searches the correlation map for the presence / absence of the one-dimensional barcodes 21 and 22, and labels an area where it is determined that the one-dimensional barcodes 21 and 22 exist. Next, the region dividing unit 144 sets and divides a region for each of the plurality of one-dimensional barcodes 21 and 22 based on the labeled region. Then, the position determination unit 145 detects the position where the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20 based on the regions labeled for each symbol of the plurality of symbols divided by the region dividing unit 144.

したがって、本実施形態によれば、以下の効果を得ることができる。
本実施形態においては、領域分割部144でラベリングされた領域に基づき、一次元バーコード21,22のそれぞれについて領域を設定し分割することから、バーコード等の同一種類のシンボルが同じ記録媒体20上に2個以上(複数)存在する場合であっても、分割された領域ごとに一次元バーコード21,22が記録媒体20に記録された位置検出処理を行うことができるようになる。その結果、各一次元バーコード21,22の重心位置を安定して算出することができるようになり、複数の一次元バーコード21,22を相互に区別することが可能であり、一次元バーコード21,22個別にデコードすることが可能となる。
Therefore, according to the present embodiment, the following effects can be obtained.
In the present embodiment, since the areas are set and divided for each of the one-dimensional barcodes 21 and 22 based on the areas labeled by the area dividing unit 144, the same type of symbols such as barcodes have the same recording medium 20. Even in the case where there are two or more (a plurality) above, the position detection process in which the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20 can be performed for each divided area. As a result, the barycentric positions of the one-dimensional barcodes 21 and 22 can be stably calculated, and a plurality of one-dimensional barcodes 21 and 22 can be distinguished from each other. The codes 21 and 22 can be decoded individually.
.

本実施形態においては、領域分割部144は、ラベリング部143によるシンボルラベリングマップにおける一次元バーコード21,22の数を判定する個数判定部1441と、個数判定部1441により一次元バーコード21,22の数が2個以上であると判定されたシンボルラベリングマップSLMにおける複数の一次元バーコード21,22のそれぞれについて領域を設定し分割する分割処理部1442と、を含む。
本実施形態によれば、分割処理を行う前に、シンボルラベリングマップSLM上の一次元バーコード21,22の個数を判定することから、たとえばシンボルラベリングマップ上に、一次元バーコードは存在しない、あるいは、一次元バーコードは1個である場合には、分割処理自体を行わなくて良くなり(処理を省略でき)、その結果、一次元バーコード21,22が2個以上存在する場合にのみ行うことが可能となり、ひいては位置検出処理の効率化を図ることが可能となる。
In the present embodiment, the area dividing unit 144 includes a number determining unit 1441 that determines the number of one-dimensional barcodes 21 and 22 in the symbol labeling map by the labeling unit 143, and a one-dimensional barcode 21 and 22 using the number determining unit 1441. A division processing unit 1442 that sets and divides a region for each of the plurality of one-dimensional barcodes 21 and 22 in the symbol labeling map SLM determined to be two or more.
According to the present embodiment, since the number of one-dimensional barcodes 21 and 22 on the symbol labeling map SLM is determined before performing the division process, for example, there is no one-dimensional barcode on the symbol labeling map. Alternatively, when there is one one-dimensional barcode, the division process itself does not have to be performed (the process can be omitted), and as a result, only when two or more one-dimensional barcodes 21 and 22 exist. As a result, the position detection process can be made more efficient.

本実施形態においては、分割処理部1442は、射影取得部14421においてシンボルラベリングマップSLM全域において、X軸およびY軸のうちの少なくとも一方の軸の射影を取得する。次に、境界位置取得部14422において、射影取得部14421で取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、この谷部分の位置を領域分割の境界位置として取得する。そして、領域設定部14423において、境界位置取得部14422で取得した境界位置を基準として複数の一次元バーコード21,22の各領域を設定する。位置決定部145は、領域設定部14423で設定した各領域において一次元バーコード21,22が記録媒体20に記録された位置を検出する。
このように、本実施形態によれば、分割処理を行う場合、シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の座標軸への射影を取得し、取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、谷部分の位置を領域分割の境界位置として取得し、取得した境界位置を基準として複数の一次元バーコード21,22の各領域を設定することから、分割すべき領域を高い確度で特定し設定できるようになる。
また、射影を用いて複数の一次元バーコード21,22の領域の境界を取得することから、計算量を大幅に削減することが可能となる。
また、演算量が削減されれば、処理時間の短縮化に貢献することができる。さらに、安価な撮像素子を用いても十分な速度を出すことができれば、高価な撮像素子を控えることで、製造コスト削減に寄与することができる。
In the present embodiment, the division processing unit 1442 acquires the projection of at least one of the X axis and the Y axis in the entire area of the symbol labeling map SLM in the projection acquisition unit 14421. Next, the boundary position acquisition unit 14422 searches for a position that can be recognized as a valley portion in the projection profile acquired by the projection acquisition unit 14421, and acquires the position of this valley portion as the boundary position of region division. Then, the region setting unit 14423 sets each region of the plurality of one-dimensional barcodes 21 and 22 based on the boundary position acquired by the boundary position acquisition unit 14422. The position determination unit 145 detects the position where the one-dimensional barcodes 21 and 22 are recorded on the recording medium 20 in each region set by the region setting unit 14423.
As described above, according to the present embodiment, when division processing is performed, the projection onto the coordinate axis of at least one of the X axis and the Y axis is acquired in the entire symbol labeling map, and the obtained projection profile is used. Search for a position that can be recognized as a valley part, acquire the position of the valley part as a boundary position of area division, and set each area of a plurality of one-dimensional barcodes 21 and 22 with the acquired boundary position as a reference. It is possible to specify and set the area to be performed with high accuracy.
Moreover, since the boundary of the area | region of several one-dimensional barcode 21 and 22 is acquired using a projection, it becomes possible to reduce a calculation amount significantly.
Moreover, if the amount of calculation is reduced, it can contribute to shortening of processing time. Furthermore, if a sufficient speed can be obtained even if an inexpensive image sensor is used, it is possible to reduce the manufacturing cost by refraining from an expensive image sensor.

また、本実施形態においては、分割処理部1442は、射影取得部14421で、シンボルラベリングマップSLM全域において、X軸およびY軸の射影を取得し、境界位置取得部14422でX軸およびY軸のうちの一方の軸の射影において谷部分と認識できる位置を取得できない場合に、他方の軸の射影において谷部分と認識できる位置の探索を行う。
これにより、本実施形態によれば、シンボルラベリングマップSLM全域において、X軸およびY軸の射影の両方を取得しておき、X軸およびY軸のうちの一方の軸の射影において谷部分と認識できる位置の探索の結果、谷部分の位置を取得できた場合は、他方の軸の射影の探索を省略することが可能となり、分割処理の効率化を図ることが可能となる。
Further, in the present embodiment, the division processing unit 1442 acquires the projections of the X axis and the Y axis in the entire area of the symbol labeling map SLM by the projection acquisition unit 14421, and the X and Y axes by the boundary position acquisition unit 14422. If a position that can be recognized as a valley portion in the projection of one of the axes cannot be obtained, a position that can be recognized as a valley portion in the projection of the other axis is searched.
As a result, according to the present embodiment, both the X-axis and Y-axis projections are acquired in the entire symbol labeling map SLM, and the valley portion is recognized in the projection of one of the X-axis and Y-axis. If the position of the valley portion can be acquired as a result of the search for the position that can be performed, the search for the projection of the other axis can be omitted, and the efficiency of the division process can be improved.

また、本実施形態においては、分割処理部1442は、射影取得部14421で、シンボルラベリングマップSLM全域において、X軸およびY軸のうちの一方の軸の射影を取得した結果、境界位置取得部14422で谷部分と認識できる位置を取得できない場合に、射影取得部14421で、シンボルラベリングマップSLM全域において、X軸およびY軸のうちの他方の軸の射影を取得し、境界位置取得部14422で谷部分と認識できる位置の探索を行う。
これにより、本実施形態によれば、シンボルラベリングマップ全域において、X軸およびY軸の射影の一方を取得しておき、その軸の射影において谷部分と認識できる位置の探索の結果、谷部分の位置を取得できた場合は、他方の軸の射影の取得並びに探索を省略することが可能となり、分割処理のさらなる効率化を図ることが可能となる。
In the present embodiment, the division processing unit 1442 acquires the projection of one of the X axis and the Y axis in the entire area of the symbol labeling map SLM by the projection acquisition unit 14421. As a result, the boundary position acquisition unit 14422 is obtained. When the position that can be recognized as the valley portion cannot be acquired, the projection acquisition unit 14421 acquires the projection of the other of the X axis and the Y axis in the entire symbol labeling map SLM, and the boundary position acquisition unit 14422 A position that can be recognized as a part is searched.
Thereby, according to this embodiment, one of the projections of the X-axis and the Y-axis is acquired in the entire symbol labeling map, and as a result of searching for a position that can be recognized as a valley portion in the projection of the axis, When the position can be acquired, the acquisition and search of the projection of the other axis can be omitted, and the efficiency of the division process can be further improved.

また、本実施形態において、領域設定部14423は、設定した各領域における一次元バーコードの個数を確認するように構成される。
これにより、本実施形態によれば、分割領域に存在する一次元バーコードの個数を確認することが可能となり、分割処理の結果を再確認しながら、領域分割を行うことが可能となり、たとえば個数が先に判定した個数と異なっている場合には、何らかの異常が生じている等の判断を行うことが可能となる。
In the present embodiment, the region setting unit 14423 is configured to check the number of one-dimensional barcodes in each set region.
Thus, according to the present embodiment, it is possible to check the number of one-dimensional barcodes existing in the divided area, and it is possible to perform area division while reconfirming the result of the division processing. If the number is different from the previously determined number, it is possible to determine that some abnormality has occurred.

また、本実施形態においては、位置決定部145は、分割された個別の領域について一次元バーコード21,22の上下左右(X軸方向、Y軸方向)の概略位置である重心を決定し、概略位置情報より画像空間座標上の一次元バーコード21,22の上下左右位置を最終決定する。
これにより、本実施形態によれば、位置決定部145は、一次元バーコード21,22等の同一種類のシンボルが同じ記録媒体20上に2個以上(複数)存在する場合であっても、分割された領域ごとに各一次元バーコード21,22の重心位置を安定して算出することができるようになり、一次元バーコード21,22が記録媒体20に記録された位置検出処理を高い精度で行うことができるようになる。
In the present embodiment, the position determination unit 145 determines the center of gravity which is the approximate position of the one-dimensional barcodes 21 and 22 in the vertical and horizontal directions (X-axis direction and Y-axis direction) for the divided individual areas. The vertical and horizontal positions of the one-dimensional barcodes 21 and 22 on the image space coordinates are finally determined from the approximate position information.
Thereby, according to the present embodiment, the position determination unit 145 is configured even when there are two or more (plural) symbols of the same type such as the one-dimensional barcodes 21 and 22 on the same recording medium 20. The barycentric position of each one-dimensional barcode 21, 22 can be stably calculated for each divided area, and the position detection process in which the one-dimensional barcode 21, 22 is recorded on the recording medium 20 is enhanced. It can be done with accuracy.

また、本実施形態においては、位置決定部145は、記録媒体20上の一次元バーコードの数が1つで、前記領域分割部で領域分割が行われない場合、シンボルラベリングマップSLM全域において一次元バーコードが記録媒体20に記録された位置を検出する。
これにより、本実施形態によれば、一次元バーコードは1個あるいはゼロである場合には、分割処理の有無やその内容を判断する必要がなくなり(処理を省略でき)、位置検出処理の効率化を図ることが可能となる。
Further, in the present embodiment, the position determination unit 145 has a one-dimensional barcode on the recording medium 20, and when the region division unit does not perform region division, the position determination unit 145 performs primary over the entire symbol labeling map SLM. The position where the original barcode is recorded on the recording medium 20 is detected.
Thus, according to the present embodiment, when there is one or zero one-dimensional barcode, it is not necessary to determine the presence / absence of the division process and the content thereof (the process can be omitted), and the efficiency of the position detection process Can be achieved.

[他の実施形態]
本実施形態では、一次元バーコードが2個存在する場合に、そのシンボルラベリングマップの領域分割の処理を図14に関連付けて説明したが、この一次元バーコードが2個存在する場合のシンボルラベリングマップの領域分割の処理はたとえば図18に示すような処理も可能である。
[Other Embodiments]
In the present embodiment, when there are two one-dimensional barcodes, the area division processing of the symbol labeling map has been described with reference to FIG. 14, but symbol labeling when two one-dimensional barcodes exist is described. For example, the map segmentation process shown in FIG. 18 is also possible.

図18は、一次元バーコード21,22が2個存在する場合に、そのシンボルラベリングマップの領域分割の他処理を説明するためのフローチャートである。   FIG. 18 is a flowchart for explaining another process of area division of the symbol labeling map when two one-dimensional barcodes 21 and 22 exist.

図18の分割処理が上述した図14の分割処理と異なる点は以下の通りである。
図14の分割処理では、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYの両方を取得しておき、X軸およびY軸のうちの一方の軸の射影において探索の結果、谷部分と認識できる位置を取得できない場合に、他方の軸の射影において谷部分と認識できる位置の探索を行う。
これに対して、図18の分割処理では、シンボルラベリングマップ全域において、X軸の射影projXおよびY軸の射影projYのうちの一方のX軸の射影を取得した結果(ステップST41X)、谷部分と認識できる位置を取得できない場合に(ステップST42,ST43)、シンボルラベリングマップ全域において、Y軸の射影を取得し(ステップST41Y)、谷部分と認識できる位置の探索を行う(ステップST44,ST45)。
図18のその他の処理は図14の処理と同様である。
The dividing process of FIG. 18 differs from the dividing process of FIG. 14 described above as follows.
In the division processing of FIG. 14, both the X-axis projection projX and the Y-axis projection projY are acquired in the entire symbol labeling map, and the result of the search in the projection of one of the X-axis and the Y-axis is as follows. When a position that can be recognized as a valley portion cannot be obtained, a position that can be recognized as a valley portion in the projection of the other axis is searched.
On the other hand, in the division processing of FIG. 18, as a result of obtaining the projection of one of the X-axis projection projX and the Y-axis projection projY over the entire symbol labeling map (step ST41X), When a recognizable position cannot be acquired (steps ST42 and ST43), a Y-axis projection is acquired in the entire symbol labeling map (step ST41Y), and a position that can be recognized as a valley is searched (steps ST44 and ST45).
The other processes in FIG. 18 are the same as the processes in FIG.

なお、図14および図18は一次元バーコード21,22が2個の場合の処理フローとなっているが、一次元バーコードが3個の場合においても、第1ステップとしてバーコードマップにおいて、一次元バーコードを1個と2個に分割する境界線を求め、第2ステップとして一次元バーコードが2個の領域について、これを2つに分割する境界線を求めるようにすればよい。   14 and 18 show the processing flow when there are two one-dimensional barcodes 21 and 22. However, even when there are three one-dimensional barcodes, as a first step in the barcode map, What is necessary is just to obtain | require the boundary line which divides | segments a one-dimensional barcode into 1 and 2 and to obtain | require the boundary line which divides | segments this into two about the area | region where a one-dimensional barcode is two as 2nd step.

なお、本実施形態に係るシンボル情報読取処理では、小区画内で複数ラインを指定して、まず微分演算した上で対応点ごとの積和演算を行うのではなく、単一ラインかつ分散の演算が行われるように構成したが、たとえば、輝度値の変動量は分散に代えて標準偏差を計算することで得ることも可能であり、分散に代えて単一ラインかつ標準偏差の演算が行われるように構成しても良い。
この場合も、本実施形態に係るシンボル情報読取処理は、従来技術と比べて演算量の少ない処理となる。
In the symbol information reading process according to the present embodiment, multiple lines are specified in a small section, and a differential operation is performed first, and then a product-sum operation is performed for each corresponding point. However, for example, the amount of change in the luminance value can be obtained by calculating the standard deviation instead of the variance, and a single line and standard deviation are calculated instead of the variance. You may comprise as follows.
Also in this case, the symbol information reading process according to the present embodiment is a process with a small amount of calculation compared to the conventional technique.

[応用例]
上述した実施形態では、一次元バーコードが2個の場合の処理フローについて説明したが、一次元バーコードが3個の場合においても、第1ステップとしてバーコードマップにおいて、一次元バーコードを1個と2個に分割する境界線を求め、第2ステップとして一次元バーコードが2個の領域について、これを2つに分割する境界線を求めるようにすればよい。
[Application example]
In the above-described embodiment, the processing flow in the case where there are two one-dimensional barcodes has been described. However, even in the case where there are three one-dimensional barcodes, the one-dimensional barcode is 1 in the barcode map as the first step. A boundary line that is divided into two and two is obtained, and as a second step, a boundary line that divides the two-dimensional area into two is obtained.

本発明において、バーコードとしては、一次元バーコードだけでなく、代表的な二次元バーコードであるPDF417やCODE128シンボル、Code49その他のスタック型バーコード等の位置検出にも利用可能である。さらに、バーコード以外のシンボル情報であってもよい。   In the present invention, as a barcode, not only a one-dimensional barcode, but also a position detection of a typical two-dimensional barcode such as PDF417, CODE128 symbol, Code49, and other stacked barcodes can be used. Further, it may be symbol information other than the barcode.

なお、以上詳細に説明した方法は、上記手順に応じたプログラムとして形成し、CPU等のコンピュータで実行するように構成することも可能である。
また、このようなプログラムは、半導体メモリ、磁気ディスク、光ディスク、フロッピー(登録商標)ディスク等の記録媒体、この記録媒体をセットしたコンピュータによりアクセスし上記プログラムを実行するように構成可能である。
Note that the method described above in detail can be formed as a program according to the above-described procedure and executed by a computer such as a CPU.
Further, such a program can be configured to be accessed by a recording medium such as a semiconductor memory, a magnetic disk, an optical disk, a floppy (registered trademark) disk, or the like, and to execute the program by a computer in which the recording medium is set.

10・・・シンボル情報読取装置、11・・・撮像装置、111・・・撮像素子、112・・・搬送機構、12・・・画像メモリ、13・・・データ処理装置、14・・・位置検出処理部、141・・・仮領域判定部、142・・・相関マップ作成部、143・・・ラベリング部、144・・・領域分割部、1441・・・個数判定部、1442・・・分割処理部、14421・・・射影取得部、14422・・・境界位置取得部、14423・・・領域設定部、145・・・位置決定部、15・・・復号処理部。   DESCRIPTION OF SYMBOLS 10 ... Symbol information reader, 11 ... Imaging device, 111 ... Imaging device, 112 ... Conveyance mechanism, 12 ... Image memory, 13 ... Data processing device, 14 ... Position Detection processing unit 141... Temporary region determination unit 142... Correlation map creation unit 143. Labeling unit 144 144 Region division unit 1441 Number determination unit 1442 Division Processing unit, 14421 ... projection acquisition unit, 14422 ... boundary position acquisition unit, 14423 ... region setting unit, 145 ... position determination unit, 15 ... decoding processing unit.

Claims (2)

同じフォーマットで作成された複数のシンボルが記録された記録媒体を撮像する撮像手段と、
前記撮像手段により得られた前記記録媒体の画像データを記憶する画像メモリと、
前記画像データを取り込んで、前記シンボルが記録媒体に記録された位置を検出する位置検出処理部と、を有するシンボル情報読取装置であって、
前記位置検出処理部は、
前記画像データを所定の領域で前記シンボルの走査線の走査方向に沿って輝度値の変動量を計算して、前記シンボルに該当する可能性のある仮領域を判定する仮領域判定部と、
前記仮領域について、前記走査線の走査方向に対して直交する方向に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する相関マップ作成部と、
前記相関マップについて、前記シンボルの有無を検索し、前記シンボルが存在すると判断した領域をラベリングしてシンボルラベリングマップを作成するラベリング部と、
ラベリングされた領域に基づき、前記複数のシンボルのそれぞれのシンボルについて領域を設定し、前記シンボルラベリングマップを複数の領域に分割する領域分割部と、
前記領域分割部で分割された前記複数のシンボルの各シンボルについてラベリングされた領域に基づき、前記シンボルが記録媒体に記録された位置を検出する位置決定部と、を含み、
前記領域分割部は、
前記ラベリング部による前記シンボルラベリングマップにおけるシンボル数を判定する個数判定部と、
前記個数判定部によりシンボル数が2個以上であると判定された前記シンボルラベリングマップにおける前記複数のシンボルのそれぞれについて領域を設定し分割する分割処理部と、を含み、
前記分割処理部は、
前記シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の射影を取得する射影取得部と、
前記射影取得部で取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、当該谷部分の位置を領域分割の境界位置として取得する境界位置取得部と、
前記境界位置取得部で取得した境界位置を基準として前記複数のシンボルのそれぞれのシンボルについて各領域を設定する領域設定部と、を含み、
前記位置決定部は、
前記領域設定部で設定した各領域において前記シンボルが記録媒体に記録された位置を検出することを特徴とするシンボル情報読取装置。
Imaging means for imaging a recording medium on which a plurality of symbols created in the same format is recorded;
An image memory for storing image data of the recording medium obtained by the imaging means;
A position detection processing unit that captures the image data and detects a position at which the symbol is recorded on a recording medium;
The position detection processing unit
A temporary area determination unit that calculates a fluctuation amount of a luminance value along a scanning direction of a scanning line of the symbol in the predetermined area of the image data, and determines a temporary area that may correspond to the symbol;
A correlation map creating unit that creates a map indicating a region having a high correlation value by obtaining a correlation with an adjacent region adjacent to the temporary region in a direction orthogonal to the scanning direction of the scanning line;
A labeling unit that searches for the presence or absence of the symbol with respect to the correlation map, creates a symbol labeling map by labeling a region that is determined to have the symbol , and
Based on the labeled area, set the region for each symbol of the plurality of symbols, and the area dividing unit that divides the symbol labeling map into a plurality of regions,
Based on the labeled regions for each symbol of the divided plurality of symbols in said region dividing section, seen including a position determination unit for detecting a position where the symbol is recorded on a recording medium,
The area dividing unit includes:
And determining number determination unit the number of symbols in the symbol labeling map by the labeling section,
See containing and a division processing unit for setting the area division for each of the plurality of symbols in the symbol labeling map number of symbols is determined to be 2 or more by the number determination unit,
The division processing unit
A projection acquisition unit that acquires a projection of at least one of the X axis and the Y axis in the entire symbol labeling map;
A boundary position acquisition unit that searches for a position that can be recognized as a valley portion in the projection profile acquired by the projection acquisition unit, and acquires the position of the valley portion as a boundary position of region division;
A region setting unit that sets each region for each symbol of the plurality of symbols with reference to the boundary position acquired by the boundary position acquisition unit,
The position determination unit
A symbol information reading apparatus for detecting a position where the symbol is recorded on a recording medium in each area set by the area setting unit.
同じフォーマットで作成された複数のシンボルが記録された記録媒体を撮像する撮像手段と、
前記撮像手段により得られた前記記録媒体の画像データを記憶する画像メモリと、
前記画像データを取り込んで、前記シンボルが記録媒体に記録された位置を検出する位置検出処理部と、を有するシンボル情報読取装置で使用されるシンボル情報読取方法であって、
前記位置検出処理部において、
前記画像データを所定の領域で前記シンボルの走査線の走査方向に沿って輝度値の変動量を計算して、前記シンボルに該当する可能性のある仮領域であるか否かを判定する第1ステップと、
前記仮領域について、前記走査線の走査方向に対して直交する方向に隣接する隣接領域との相関を求めて、相関値の高い領域を示すマップを作成する第2ステップと、
前記相関マップについて、前記シンボルの有無を検索し、前記シンボルが存在すると判断した領域をラベリングしてシンボルラベリングマップを作成する第3ステップと、
ラベリングされた領域に基づき、前記複数のシンボルのそれぞれのシンボルについて領域を設定し、前記シンボルラベリングマップを複数の領域に分割する第4ステップと、
前記領域分割部で分割された前記複数のシンボルの各シンボルについてラベリングされた領域に基づき、前記シンボルが記録媒体に記録された位置を検出する第5ステップと、を含み、
前記第4ステップは、
前記ラベリング部による前記シンボルラベリングマップにおけるシンボル数を判定する判定ステップと、
シンボル数が2個以上であると判定された前記シンボルラベリングマップにおける前記複数のシンボルのそれぞれについて領域を設定し分割する分割処理ステップと、を含み、
前記分割処理ステップは、
前記シンボルラベリングマップ全域において、X軸およびY軸のうちの少なくとも一方の軸の射影を取得する射影取得ステップと、
取得した射影のプロファイルにおいて谷部分と認識できる位置を探索し、当該谷部分の位置を領域分割の境界位置として取得する境界位置取得ステップと、
取得した境界位置を基準として前記複数のシンボルのそれぞれのシンボルについて各領域を設定する領域設定ステップと、を含み、
前記第5ステップにおいては、
前記領域設定部で設定した各領域において前記シンボルが記録媒体に記録された位置を検出することを特徴とするシンボル情報読取方法。
Imaging means for imaging a recording medium on which a plurality of symbols created in the same format is recorded;
An image memory for storing image data of the recording medium obtained by the imaging means;
A symbol information reading method used in a symbol information reading apparatus, which includes a position detection processing unit that captures the image data and detects a position where the symbol is recorded on a recording medium,
In the position detection processing unit,
First, a determination is made as to whether or not the image data is a temporary area that may correspond to the symbol by calculating a fluctuation amount of a luminance value along a scanning direction of the scanning line of the symbol in a predetermined area. Steps,
A second step of determining a correlation with an adjacent region adjacent to the temporary region in a direction orthogonal to the scanning direction of the scanning line and creating a map indicating a region having a high correlation value;
A third step of searching for the presence or absence of the symbol with respect to the correlation map and labeling a region where the symbol is determined to be present to create a symbol labeling map ;
A fourth step of setting a region for each of the plurality of symbols based on a labeled region and dividing the symbol labeling map into a plurality of regions ;
Based on the labeled regions for each symbol of the divided plurality of symbols in said region dividing section, viewed contains a fifth step, the detecting the position where the symbol is recorded in a recording medium,
The fourth step includes
A determining step of determining the number of symbols in the symbol labeling map by the labeling section,
A dividing processing step of setting an area division for each of the plurality of symbols in the symbol labeling map number of symbols it is determined to be 2 or more, only including,
The division processing step includes
A projection obtaining step for obtaining a projection of at least one of the X axis and the Y axis in the entire symbol labeling map;
A boundary position acquisition step of searching for a position that can be recognized as a valley portion in the acquired projection profile, and acquiring the position of the valley portion as a boundary position of region division;
An area setting step for setting each area for each of the plurality of symbols with reference to the acquired boundary position;
In the fifth step,
A symbol information reading method, comprising: detecting a position where the symbol is recorded on a recording medium in each region set by the region setting unit.
JP2015074206A 2015-03-31 2015-03-31 Symbol information reading apparatus and symbol information reading method Expired - Fee Related JP6434354B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015074206A JP6434354B2 (en) 2015-03-31 2015-03-31 Symbol information reading apparatus and symbol information reading method
US15/086,812 US9928396B2 (en) 2015-03-31 2016-03-31 Symbol information reader and symbol information reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015074206A JP6434354B2 (en) 2015-03-31 2015-03-31 Symbol information reading apparatus and symbol information reading method

Publications (2)

Publication Number Publication Date
JP2016194803A JP2016194803A (en) 2016-11-17
JP6434354B2 true JP6434354B2 (en) 2018-12-05

Family

ID=57015217

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015074206A Expired - Fee Related JP6434354B2 (en) 2015-03-31 2015-03-31 Symbol information reading apparatus and symbol information reading method

Country Status (2)

Country Link
US (1) US9928396B2 (en)
JP (1) JP6434354B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9928632B1 (en) 2017-06-14 2018-03-27 Capital One Services, Llc Systems and methods for generating and reading intrinsic matrixed bar codes
JP7451844B2 (en) * 2020-03-19 2024-03-19 株式会社キーエンス optical reader

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5979768A (en) * 1988-01-14 1999-11-09 Intermec I.P. Corp. Enhanced bar code resolution through relative movement of sensor and object
JP2957727B2 (en) * 1990-03-28 1999-10-06 オムニプラナー,インコーポレーテッド Dual processor omnidirectional barcode reader with dual memory for barcode location and orientation
US5468945A (en) * 1994-02-25 1995-11-21 Intermec Corporation Method and apparatus for locating and decoding a postnet forwarding bar code in a field of postnet bar codes
JP3591184B2 (en) * 1997-01-14 2004-11-17 松下電器産業株式会社 Barcode reader
US6176428B1 (en) * 1999-04-07 2001-01-23 Symbol Technologies, Inc. Techniques for reading postal code
JP4276972B2 (en) * 2003-03-17 2009-06-10 株式会社リコー Image recognition apparatus and image recognition method
JP5140820B2 (en) * 2008-03-31 2013-02-13 日本電産サンキョー株式会社 Symbol information reading apparatus and symbol information reading method

Also Published As

Publication number Publication date
US9928396B2 (en) 2018-03-27
JP2016194803A (en) 2016-11-17
US20160292483A1 (en) 2016-10-06

Similar Documents

Publication Publication Date Title
EP3416091B1 (en) Systems and methods for generating and reading intrinsic matrixed bar codes
JP4707718B2 (en) Barcode scanner decoding
JP5140820B2 (en) Symbol information reading apparatus and symbol information reading method
US7264174B2 (en) 2D coding and decoding barcode and its method thereof
JP4752413B2 (en) Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus
US8254683B2 (en) Code image processing method
JP6078399B2 (en) Symbol information reading apparatus, symbol information reading method, and program
EP0999519B1 (en) Distortion correction method in optical code reading
KR101770540B1 (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
EP2393035A2 (en) QR barcode decoding chip and decoding method thereof
KR101821087B1 (en) Two-dimensional code, and two-dimensional-code analysis system
US20040256462A1 (en) Method and device for recording of data
GB2446424A (en) Two dimensional bar code with locating symbols
RU2729399C1 (en) Method for detection and recognition of visual markers of long range and high density
JPH086969A (en) Two-dimensional pattern for management and information display tag as well as method and apparatus for image processing
US10936837B1 (en) 2D barcode overlays
JP6434354B2 (en) Symbol information reading apparatus and symbol information reading method
KR100404306B1 (en) Coded pattern and method for the extraction of code from the same
CN109740403B (en) Method and device for reading one-dimensional bar code
JP2013073454A (en) Bar code symbol reading device and bar code symbol reading method
JP2007102386A (en) Symbol information reading method and symbol information reading device
JP2011054211A (en) Two-dimensional code dividing and displaying method, two-dimensional code reading method, and two-dimensional code reader
JP2011145826A (en) Sequence code, method for decoding sequence code, article given with sequence code, article holding place given with sequence code, and sequence code recognition device
JP5470734B2 (en) Image processing apparatus and image processing program
JP2009031892A (en) Information reading system and program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20171121

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180814

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181012

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181108

R150 Certificate of patent or registration of utility model

Ref document number: 6434354

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees