JP2013196470A - Two-dimensional code reader - Google Patents

Two-dimensional code reader Download PDF

Info

Publication number
JP2013196470A
JP2013196470A JP2012063924A JP2012063924A JP2013196470A JP 2013196470 A JP2013196470 A JP 2013196470A JP 2012063924 A JP2012063924 A JP 2012063924A JP 2012063924 A JP2012063924 A JP 2012063924A JP 2013196470 A JP2013196470 A JP 2013196470A
Authority
JP
Japan
Prior art keywords
code
feature value
dimensional code
dot
labeling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012063924A
Other languages
Japanese (ja)
Other versions
JP5810997B2 (en
Inventor
Takeshi Fujikado
岳史 藤角
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.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
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 Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2012063924A priority Critical patent/JP5810997B2/en
Publication of JP2013196470A publication Critical patent/JP2013196470A/en
Application granted granted Critical
Publication of JP5810997B2 publication Critical patent/JP5810997B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a two-dimensional code reader capable of suppressing failures in reading a dot code.SOLUTION: A connection component is extracted by labeling processing (S3), and a peripheral length of the connection component is statistically processed (S4, S5). In the case of a dot code, since almost all the connection components that can be extracted by the labeling processing are dots, a result of statistical processing becomes a value indicating that it is the dot. In cell shape determination (S6), whether or not an imaged two-dimensional code is a dot code is determined on the basis of the result of the statistical processing, and when determined that it is the dot code (S7:YES), reading processing exclusive for the dot code is performed (S8), and thus failures in reading the dot code are suppressed.

Description

本発明は、二次元コードに関し、特に、二次元コードがドットで印字されたものであるかどうかを判定する技術に関する。   The present invention relates to a two-dimensional code, and more particularly to a technique for determining whether or not a two-dimensional code is printed with dots.

二次元コードは様々な場面で利用されており、様々な材質、形状のものに直接印字するダイレクトパーツマーキング(DPM)により印字されたコードが、品質管理や流通管理のために利用される機会が多くなっている。   Two-dimensional codes are used in various situations, and there is an opportunity for codes printed by direct part marking (DPM) to be printed directly on various materials and shapes for quality control and distribution management. It is increasing.

DPMにおいては、金属や基板等の部材に直接印字することから、レーザーによる彫刻など、部材に合わせた様々な方法を用いる。その中でも一般的な方法として、ドットピーニングによる印字方法がある。   In DPM, since printing is directly performed on a member such as a metal or a substrate, various methods such as laser engraving are used. Among them, a general method is a printing method using dot peening.

また、二次元コードの読み取り方法においては、一般に、二次元コードに含まれている特徴パターンを検出することで、各セルの位置決め等のその後の処理を行なう。   In a two-dimensional code reading method, generally, subsequent processing such as positioning of each cell is performed by detecting a feature pattern included in the two-dimensional code.

特開2000−222517号公報JP 2000-222517 A

ドットピーニングにより印字された二次元コード(以下、ドットコード)では、円形のドットを直線状に並べることにより直線が表現される。つまり、ドットコードでは、直線といっても、直線を形成している各ドットは、隣接するドットと接しておらず、ドットとしての形状を保持している。   In a two-dimensional code (hereinafter, dot code) printed by dot peening, a straight line is expressed by arranging circular dots in a straight line. That is, in the dot code, even though it is a straight line, each dot forming a straight line is not in contact with an adjacent dot and retains the shape as a dot.

ドットコードでは、直線部分における隣接ドット間は、ピーニングされていない部分であり、また、明セルもピーニングされていない部分である。よって、ドットコードでは、ピーニングされていない部分として、互いに隣接するドットの間と明セルとが存在するという特徴がある。   In the dot code, between adjacent dots in the straight line portion is a portion that is not peened, and a bright cell is also a portion that is not peened. Therefore, the dot code is characterized in that between the adjacent dots and bright cells exist as non-peened portions.

上記特徴があるため、ドットコードに対して通常のコード(各セル形状が正方形のコード)と同じ読み取り方法を用いると、特徴パターンが検出できないとか、明セルとドット間とを間違える等の問題が生じて読み取りが困難となる場合がある。そこで、ドットコード専用の読み取りアルゴリズムを用いてコードの読み取りを行なう。   Due to the above characteristics, if the same reading method as a normal code (a code having a square cell shape) is used for a dot code, there are problems such as a feature pattern not being detected or a mistake between a bright cell and a dot. May occur, making reading difficult. Therefore, the code is read using a dot code-dedicated reading algorithm.

しかし、ドットコードと通常のコードとが混在する使用環境も考えられ、この場合には、ドットコードかそうでないかにより使用するアルゴリズムを変更して読み取りを行なう必要がある。仮に、ドットコードであるのに、通常のコード用のアルゴリズムを用いてしまうと、読み取りに失敗する可能性が高くなる。   However, a use environment in which dot codes and normal codes are mixed is also conceivable. In this case, it is necessary to change the algorithm to be used depending on whether the dot code is used or not. If a normal code algorithm is used even though it is a dot code, there is a high possibility that reading will fail.

本発明は、この事情に基づいて成されたものであり、その目的とするところは、ドットコードの読み取りに失敗することを抑制できる二次元コード読み取り装置を提供することにある。   The present invention has been made based on this situation, and an object of the present invention is to provide a two-dimensional code reader capable of suppressing a failure in reading a dot code.

その目的を達成するための本発明は、二次元コードを含む画像を撮像し、撮像した画像の二次元コードから情報を読み取る二次元コード読み取り装置であって、前記画像において前記二次元コードが撮像されている部分を含む領域から、ラベリング処理を行なって連結成分を抽出する抽出手段と、前記抽出手段で抽出した連結成分の形態の特徴を表している形態特徴値を算出する形態特徴値算出手段と、前記形態特徴値算出手段で算出した形態特徴値に基づいて、撮像した二次元コードが、ドットコードであるか否かを判定する判定手段と、前記判定手段が、撮像した二次元コードがドットコードであると判定した場合、ドットコード専用の読み取り処理を実行する読み取り手段と、を含むことを特徴とする。   In order to achieve the object, the present invention provides a two-dimensional code reading device that captures an image including a two-dimensional code and reads information from the two-dimensional code of the captured image. The two-dimensional code is captured in the image. Extracting means for extracting a connected component by performing a labeling process from a region including a portion that has been processed, and a morphological feature value calculating means for calculating a morphological feature value representing a feature of the connected component extracted by the extracting means And determining means for determining whether or not the captured two-dimensional code is a dot code based on the morphological feature value calculated by the morphological characteristic value calculating means; and And a reading unit that executes a reading process dedicated to the dot code when the dot code is determined.

ドットコードは、前述したように、直線を形成している各ドットも、ドットとしての形状を保持しているという特徴がある。よって、ドットコードの場合には、ラベリング処理により抽出できる連結成分は、ほとんどがドットであり、その結果、連結成分に対して算出する形態特徴値も、ドットであることを示す値となる。判定手段では、この形態特徴値に基づいて、撮像した二次元コードがドットコードであるか否かを判定することから、精度よくドットコードか否かの判定を行なうことができる。そして、読み取り手段は、判定手段が、撮像した二次元コードがドットコードであると判定した場合には、ドットコード専用の読み取り処理を行なうことから、ドットコードの読み取りに失敗することを抑制できる。   As described above, the dot code is characterized in that each dot forming a straight line also retains its shape as a dot. Therefore, in the case of a dot code, most of the connected components that can be extracted by the labeling process are dots, and as a result, the form feature value calculated for the connected components is also a value indicating that it is a dot. Since the determination means determines whether or not the captured two-dimensional code is a dot code based on this form feature value, it can be accurately determined whether or not it is a dot code. Then, when the determination unit determines that the captured two-dimensional code is a dot code, the reading unit performs reading processing dedicated to the dot code, and thus can prevent the dot code reading from failing.

また、請求項2記載の発明では、形態特徴値算出手段は、前記連結成分から単セル成分を抽出し、前記形態特徴値として、その単セル成分の円形度を算出し、前記判定手段は、前記円形度が、円形であることを示す所定範囲内であった場合には、撮像した二次元コードはドットコードであると判定する。   Further, in the invention according to claim 2, the form feature value calculating unit extracts a single cell component from the connected component, calculates a circularity of the single cell component as the form feature value, and the determining unit includes: When the circularity is within a predetermined range indicating circularity, it is determined that the captured two-dimensional code is a dot code.

打刻ずれや撮像状態が悪い等により、複数のドットのうちの一部が隣接するドットと結合してしまう可能性もあるが、複数のドットが結合したものは単セル成分から除外されるので、単セル成分の円形度には影響がない。よって、本発明によれば、複数のドットのうちの一部が隣接するドットと結合してしまっている画像であっても、精度よく、ドットコードか否かの判定を行なうことができる。   Some of the dots may be combined with the adjacent dots due to imprint errors or poor imaging conditions, but the combination of dots is excluded from the single cell component. The circularity of the single cell component is not affected. Therefore, according to the present invention, it is possible to accurately determine whether a dot code is used, even in an image in which some of a plurality of dots are combined with adjacent dots.

請求項3記載の発明では、前記形態特徴値算出手段は、前記抽出手段が抽出した連結成分の周長を算出し、算出した周長の統計特徴値を前記形態特徴値として算出し、前記判定手段は、前記統計特徴値と、その統計特徴値に対して予め設定された統計閾値との比較に基づいて、撮像した二次元コードがドットコードであるか否かを判定する。   According to a third aspect of the present invention, the morphological feature value calculating means calculates a circumference of the connected component extracted by the extracting means, calculates a statistical feature value of the calculated circumference as the morphological feature value, and the determination The means determines whether or not the captured two-dimensional code is a dot code based on a comparison between the statistical feature value and a statistical threshold value preset for the statistical feature value.

この発明では、周長を形態としており、形態の特徴値として、周長の統計特徴値を算出している。ドットコードであれば、連結成分は、ほとんどがドットであることから、複数の連結成分についての周長も、ドット一つの周長と想定されるある一つの長さが多くなるはずである。よって、判定手段において、周長の統計特徴値と、その統計特徴値に対して予め設定された統計閾値との比較に基づいて、撮像した二次元コードがドットコードであるか否かを判定することができる。   In the present invention, the circumference is a form, and a statistical characteristic value of the circumference is calculated as a feature value of the form. In the case of a dot code, since most of the connected components are dots, the circumference of a plurality of connected components should also be increased by a certain length assumed to be the circumference of one dot. Therefore, the determination means determines whether or not the captured two-dimensional code is a dot code based on a comparison between the statistical feature value of the circumference and a statistical threshold value preset for the statistical feature value. be able to.

なお、統計特徴値としては、周長を所定の階級毎(たとえば1画素毎)に区分し、連結成分の周長を階級別に分類したときの、最大数となった階級における連結成分数や、周長の分散などがある。   In addition, as a statistical feature value, when the perimeter is divided into predetermined classes (for example, for each pixel) and the perimeter of the connected components is classified by class, the number of connected components in the class that is the maximum number, There is dispersion of circumference.

請求項4記載の発明では、前記判定手段は、統計特徴値と前記統計閾値との比較に加え、前記連結成分の数と連結成分の数に対して予め設定された成分数閾値との比較も行い、連結成分数が前記成分数閾値よりも少ない場合には、撮像した二次元コードはドットコードではないと判定する。   In the invention according to claim 4, in addition to the comparison between the statistical feature value and the statistical threshold value, the determination means also compares the number of the connected components with a component number threshold set in advance for the number of connected components. If the number of connected components is smaller than the component number threshold, it is determined that the captured two-dimensional code is not a dot code.

統計特徴値と統計閾値との比較は、統計数が少なすぎると信頼性に欠けることになる。そこで、この発明では、連結成分数と成分数閾値との比較も行う。連結成分数が成分数閾値よりも少ない場合には、統計特徴値の信頼性が低いため、この比較に基づいてドットコードであると判定したとしても、判定の信頼性は低い。そこで、連結成分数が成分数閾値よりも少ない場合には、撮像した二次元コードはドットコードではないと判定する。これにより、ドットコードであるとの判定結果の信頼性の低下を抑制できる。   The comparison between the statistical feature value and the statistical threshold value is not reliable when the number of statistics is too small. Therefore, in the present invention, the number of connected components is also compared with the component number threshold. When the number of connected components is smaller than the component number threshold value, the reliability of the statistical feature value is low. Therefore, even if it is determined that the dot code is based on this comparison, the determination reliability is low. Therefore, when the number of connected components is smaller than the component number threshold, it is determined that the captured two-dimensional code is not a dot code. Thereby, the fall of the reliability of the determination result that it is a dot code can be suppressed.

請求項5記載の発明では、前記抽出手段は、大きさの異なる複数のラベリング領域を抽出し、各ラベリング領域に対してそれぞれ前記ラベリング処理を行い、複数のラベリング領域毎に連結成分を抽出し、前記形態特徴値算出手段は、複数のラベリング領域毎に前記統計特徴値を算出し、前記判定手段は、いずれか少なくとも一つのラベリング領域に対する統計特徴値がドットコードであるとの判定条件を満たした場合、撮像した二次元コードがドットコードであると判定する。   In the invention of claim 5, the extraction means extracts a plurality of labeling regions having different sizes, performs the labeling process on each labeling region, and extracts a connected component for each of the plurality of labeling regions, The form feature value calculating unit calculates the statistical feature value for each of a plurality of labeling regions, and the determination unit satisfies a determination condition that the statistical feature value for at least one labeling region is a dot code In this case, it is determined that the captured two-dimensional code is a dot code.

判定手段によりドットコードか否かの判定を行なう前の段階では、セルサイズも不明であるため、ラベリング領域をある一つの大きさに決めてしまうと、ラベリング領域の大きさがセルサイズに対して大きすぎたり、小さすぎたりする可能性がある。ラベリング領域が小さすぎる場合、ラベリング領域に含まれるセル(ドット)の数が少なくなりすぎて、統計の信頼性に欠けることになる。その一方で、ラベリング領域が大きくても、不要な部分が含まれてしまい、ドットコードであるにもかかわらず、統計特徴値がドットコードの特徴を示す値とならない恐れもある。   Since the cell size is also unknown at the stage before the determination means determines whether or not it is a dot code, if the labeling area is determined to be one size, the size of the labeling area will be smaller than the cell size. It may be too large or too small. If the labeling area is too small, the number of cells (dots) included in the labeling area is too small, and the reliability of the statistics is lacking. On the other hand, even if the labeling area is large, an unnecessary portion is included, and there is a possibility that the statistical feature value does not become a value indicating the feature of the dot code despite the dot code.

そこで、本発明では、大きさの異なる複数のラベリング領域を抽出し、複数のラベリング領域毎に統計特徴値を算出する。そして、いずれか少なくとも一つのラベリング領域に対する統計特徴値がドットコードであるとの判定条件を満たした場合、撮像した二次元コードがドットコードであると判定する。これにより、ドットコードを撮像した場合、いずれかの大きさのラベリング領域における統計特徴値がドットコードであるとの判定条件を満たす可能性が高くなるので、高い精度でドットコードであるか否かの判定ができる。   Therefore, in the present invention, a plurality of labeling regions having different sizes are extracted, and a statistical feature value is calculated for each of the plurality of labeling regions. Then, when the determination condition that the statistical feature value for at least one labeling region is a dot code is satisfied, it is determined that the captured two-dimensional code is a dot code. As a result, when a dot code is imaged, there is a high probability that the statistical feature value in any size labeling area is a dot code, so whether or not it is a dot code with high accuracy. Can be determined.

本発明の実施形態となる二次元コード読み取り装置10の機械的構成を示すブロック図である。It is a block diagram which shows the mechanical structure of the two-dimensional code reader 10 used as embodiment of this invention. コード読み取り処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of a code reading process. 図2のステップS3で抽出した連結成分を例示する図であって、ドットコードの例である。It is a figure which illustrates the connected component extracted by step S3 of FIG. 2, Comprising: It is an example of a dot code. 図2のステップS3で抽出した連結成分を例示する図であって、通常コードの例である。It is a figure which illustrates the connected component extracted by step S3 of FIG. 2, Comprising: It is an example of a normal code. 図3に示すドットコードの画像から求めた周長を統計処理したグラフである。It is the graph which statistically processed the circumference calculated | required from the image of the dot code shown in FIG. 図4に示す通常コードの画像から求めた周長を統計処理したグラフである。5 is a graph obtained by statistically processing the circumference obtained from the normal code image shown in FIG. 4. ラベリング領域が小さすぎる場合、この領域に含まれる暗セルの数が少なくなることを説明する図である。It is a figure explaining that the number of dark cells contained in this area | region becomes small when a labeling area | region is too small. 図7の領域における周長の分布を示すグラフである。It is a graph which shows distribution of the circumference in the area | region of FIG. 第2実施形態におけるコード読み取り処理において、第1実施形態と相違する部分を示すフローチャートである。It is a flowchart which shows the part which is different from 1st Embodiment in the code reading process in 2nd Embodiment.

(第1実施形態)
以下、本発明の実施形態を図面に基づいて説明する。図1は、本発明の実施形態となる二次元コード読み取り装置10の機械的構成を示すブロック図である。機械的構成は、従来周知の二次元コード読み取り装置と同じである。
(First embodiment)
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a mechanical configuration of a two-dimensional code reading apparatus 10 according to an embodiment of the present invention. The mechanical configuration is the same as that of a conventionally known two-dimensional code reader.

図1に示す回路部20は、図示しないハウジング内に収容されている。この回路部20は、主に、光学系とコンピュータ系と電源系とから構成されている。光学系は、マーカ光投射器60、発光ダイオード21、エリアセンサ23、結像レンズ27等から構成されている。   The circuit unit 20 shown in FIG. 1 is accommodated in a housing (not shown). The circuit unit 20 mainly includes an optical system, a computer system, and a power supply system. The optical system includes a marker light projector 60, a light emitting diode 21, an area sensor 23, an imaging lens 27, and the like.

発光ダイオード21は、ハウジング本体の読取口(図示せず)を介して読み取り面Rに向けて照明光Lfを照射可能に構成されている。この読み取り面Rには二次元コードなどが記録されている。なお、記録形態としては、印刷、刻印等がある。   The light emitting diode 21 is configured to be able to irradiate the illumination light Lf toward the reading surface R through a reading port (not shown) of the housing body. A two-dimensional code or the like is recorded on the reading surface R. The recording form includes printing, engraving, and the like.

エリアセンサ23は、読み取り面Rに照射されて反射した反射光Lrを受光可能に構成されるもので、例えば、C−MOSやCCD等の固体撮像素子である受光素子を数10万から数100万個オーダでm行n列の2次元に配列して構成されている。受光素子は、受光した光を電気信号に変換して出力する。   The area sensor 23 is configured to be able to receive the reflected light Lr irradiated and reflected on the reading surface R. For example, the area sensor 23 includes a light receiving element that is a solid-state image pickup element such as a C-MOS or a CCD. It is arranged in two dimensions of m rows and n columns in the order of 10,000. The light receiving element converts the received light into an electrical signal and outputs it.

このエリアセンサ23の受光面23aは、ハウジング本体外から上述の読取口を介して外観可能に位置しており、エリアセンサ23は、結像レンズ27を介して入射する入射光をこの受光面23aで受光可能に配置されている。   The light receiving surface 23a of the area sensor 23 is positioned so as to be visible from the outside of the housing main body through the above-described reading port, and the area sensor 23 receives incident light incident through the imaging lens 27 as the light receiving surface 23a. It is arranged so that it can receive light.

結像レンズ27は、外部から読取口を介して入射する入射光を集光してエリアセンサ23の受光面23aに像を結像可能な結像光学系として機能するもので、例えば、鏡筒とこの鏡筒内に収容される複数の集光レンズとにより構成されている。発光ダイオード21から照射された照明光Lfが二次元コードに反射して読取口に入射する反射光Lrは、結像レンズ27により集光され、これにより、エリアセンサ23の受光面23aにコード像が結像する。マーカ光投射器60は、二次元コードの読み取り範囲を示すマーカ光Mを読み取り面Rに投射する。   The imaging lens 27 functions as an imaging optical system capable of condensing incident light incident from the outside via a reading port and forming an image on the light receiving surface 23a of the area sensor 23. And a plurality of condensing lenses housed in the lens barrel. The reflected light Lr that is reflected from the two-dimensional code by the illumination light Lf emitted from the light emitting diode 21 and is incident on the reading port is condensed by the imaging lens 27, and thereby the code image is formed on the light receiving surface 23 a of the area sensor 23. Forms an image. The marker light projector 60 projects the marker light M indicating the reading range of the two-dimensional code onto the reading surface R.

次に、コンピュータ系の構成概要を説明する。コンピュータ系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、操作スイッチ42、LED43、ブザー44、液晶表示器46、通信インタフェース48等から構成されている。このコンピュータ系は、前述した光学系によって撮像されたコード像の画像信号をハードウェア的およびソフトウェア的に信号処理し得るものである。また制御回路40は、二次元コード読み取り装置10の全体システムに関する制御も行っている。   Next, a configuration outline of the computer system will be described. The computer system includes an amplification circuit 31, an A / D conversion circuit 33, a memory 35, an address generation circuit 36, a synchronization signal generation circuit 38, a control circuit 40, an operation switch 42, an LED 43, a buzzer 44, a liquid crystal display 46, and a communication interface 48. Etc. This computer system can process the image signal of the code image captured by the optical system described above in hardware and software. The control circuit 40 also performs control related to the entire system of the two-dimensional code reader 10.

光学系のエリアセンサ23から出力される画像信号(アナログ信号)は、増幅回路31に入力されることで所定ゲインで増幅された後、A/D変換回路33に入力されると、アナログ信号からディジタル信号に変換される。そして、ディジタル化された画像信号、つまり画像データ(画像情報)は、メモリ35に入力されて蓄積される。なお、同期信号発生回路38は、エリアセンサ23およびアドレス発生回路36に対する同期信号を発生可能に構成されており、またアドレス発生回路36は、この同期信号発生回路38から供給される同期信号に基づいて、メモリ35に格納される画像データの格納アドレスを発生可能に構成されている。   The image signal (analog signal) output from the area sensor 23 of the optical system is amplified by a predetermined gain by being input to the amplifier circuit 31, and then input from the analog signal when input to the A / D conversion circuit 33. Converted into a digital signal. The digitized image signal, that is, image data (image information) is input to the memory 35 and stored. The synchronization signal generation circuit 38 is configured to generate a synchronization signal for the area sensor 23 and the address generation circuit 36. The address generation circuit 36 is based on the synchronization signal supplied from the synchronization signal generation circuit 38. Thus, the storage address of the image data stored in the memory 35 can be generated.

メモリ35は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。またROMには、画像処理プログラムの他、マーカ光投射器60、発光ダイオード21、エリアセンサ23等の各ハードウェアを制御可能なシステムプログラム等が予め格納されている。   The memory 35 is a semiconductor memory device, and corresponds to, for example, a RAM (DRAM, SRAM, etc.) or a ROM (EPROM, EEPROM, etc.). In addition to the image processing program, the ROM stores in advance a system program that can control each hardware such as the marker light projector 60, the light emitting diode 21, and the area sensor 23.

制御回路40は、二次元コード読み取り装置10全体を制御可能なコンピュータで、CPU、システムバス、入出力インタフェース等からなる。この制御回路40は、内蔵された入出力インタフェースを介して種々の入出力装置(周辺装置)と接続可能に構成されており、電源スイッチ41、操作スイッチ42、LED43、ブザー44、液晶表示器46、通信インタフェース48、マーカ光投射器60等が接続されている。   The control circuit 40 is a computer that can control the entire two-dimensional code reader 10 and includes a CPU, a system bus, an input / output interface, and the like. The control circuit 40 is configured to be connectable to various input / output devices (peripheral devices) via a built-in input / output interface, and includes a power switch 41, an operation switch 42, an LED 43, a buzzer 44, and a liquid crystal display 46. The communication interface 48, the marker light projector 60, and the like are connected.

これにより、例えば、コードの読み取り処理、電源スイッチ41や操作スイッチ42の監視や管理、またインジケータとして機能するLED43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、さらには読み取った二次元コードによるコード内容を画面表示可能な液晶表示器46の画面制御や外部機器との通信を可能にする通信インタフェース48の通信制御、マーカ光投射器60からのマーカ光Mの投射制御等を可能にしている。   Accordingly, for example, code reading processing, monitoring and management of the power switch 41 and the operation switch 42, turning on / off the LED 43 functioning as an indicator, turning on / off the buzzer 44 capable of generating a beep sound and an alarm sound, Is a screen control of the liquid crystal display 46 capable of displaying the code contents of the read two-dimensional code, communication control of the communication interface 48 enabling communication with an external device, and projection of the marker light M from the marker light projector 60. Control is possible.

電源系は、電源スイッチ41、電池49等により構成されており、制御回路40により管理される電源スイッチ41のオンオフによって、上述した各装置や各回路に、電池49から供給される駆動電圧の導通や遮断が制御されている。   The power supply system includes a power switch 41, a battery 49, and the like. When the power switch 41 managed by the control circuit 40 is turned on and off, the conduction of the drive voltage supplied from the battery 49 to each device and each circuit described above is established. Or shut off is controlled.

次に、制御回路40の読み取り処理について説明する。読み取り処理は、撮像したコード像から文字コードを読み取る処理である。本実施形態の読み取り処理においては、二次元コードが、ドットコードであるかどうかの判定を行ない、判定結果に応じ、その後に用いるアルゴリズムを異ならせる。   Next, the reading process of the control circuit 40 will be described. The reading process is a process of reading a character code from the captured code image. In the reading process of this embodiment, it is determined whether or not the two-dimensional code is a dot code, and the algorithm used thereafter is changed according to the determination result.

図2は、コード読み取り処理の概要を示すフローチャートである。この図2を用いてコード読み取り処理をさらに詳細に説明する。図2の処理は、ユーザ操作によりコードを含む画像が撮像されたことにより開始する。   FIG. 2 is a flowchart showing an outline of the code reading process. The code reading process will be described in more detail with reference to FIG. The process of FIG. 2 starts when an image including a code is captured by a user operation.

まず、ステップS1では、メモリ35から撮像データを取得し、従来周知の方法により、撮像した画像から、コード領域を抽出する。このステップS1で抽出する領域は、ドットコードか通常コードかを判定する目的であり、コードの正確な境界を抽出する必要はない。たとえば、このステップS1では、画像を予め設定した複数の領域に分割し、分割領域毎に、白黒密度を決定する。なお、白黒密度は平均輝度値で表す。この白黒密度が、黒が多いことを示す所定範囲内の密度となっている分割領域を、コード領域として抽出する。   First, in step S1, imaging data is acquired from the memory 35, and a code area is extracted from the captured image by a conventionally known method. The area extracted in step S1 is for the purpose of determining whether it is a dot code or a normal code, and it is not necessary to extract the exact boundary of the code. For example, in step S1, the image is divided into a plurality of preset areas, and the black and white density is determined for each divided area. The black and white density is represented by an average luminance value. A divided area in which the black and white density is within a predetermined range indicating that there is much black is extracted as a code area.

続くステップS2では、上記ステップS1で抽出したコード領域から、さらにラベンリング領域を抽出する。このラベンリング領域は、次のステップS3において、ラベリング処理を行なう領域である。また、本実施形態では、大きさの異なる複数のラベリング領域を抽出する。ある大きさのラベリング領域に対して、抽出する領域の候補が複数存在する場合には、暗セルが多い領域とする。暗セルが多いことの判断は、領域の平均輝度値により行う。また、ラベリング領域の大きさは、予め設定しておくことになる。たとえば、1辺が所定画素数の正方形を1ブロックとして、4ブロック、9ブロック、25ブロックを、大きさの異なるラベリング領域として抽出する。   In subsequent step S2, a laven ring region is further extracted from the code region extracted in step S1. This labeling area is an area where labeling processing is performed in the next step S3. In the present embodiment, a plurality of labeling regions having different sizes are extracted. When there are a plurality of candidate areas to be extracted for a labeling area of a certain size, the area is assumed to have many dark cells. The determination that there are many dark cells is made based on the average luminance value of the area. Further, the size of the labeling area is set in advance. For example, a square having a predetermined number of pixels on one side is defined as one block, and 4 blocks, 9 blocks, and 25 blocks are extracted as labeling regions having different sizes.

大きさの異なる複数のラベリング領域を抽出するのは次の理由による。このステップS2を実行する時点では、コードのバージョンやセルサイズの情報が得られておらず、領域内に占めるセルの割合も不明である。コードには、明セル部分も存在し、コードに対して、抽出するラベリング領域が小さい場合には、そのラベリング領域に含まれる暗セルの数が少なくなる可能性がある。その場合、その後の処理の信頼性に欠けることになる。そこで、セルサイズ(ドットサイズ)の大小に対応するため、ラベリング領域も、異なる複数の大きさの領域を抽出するのである。なお、大きいラベリング領域は、大きいセルサイズに対応するためであり、細かな情報は不要である。そこで、サイズの大きい予め定めたラベリング領域に対しては、間引き処理を行なったデータを用いて、ステップS3〜S5を行なう。これにより、処理時間を短くすることができる。   The reason for extracting a plurality of labeling regions having different sizes is as follows. At the time of executing step S2, information on the code version and cell size has not been obtained, and the proportion of cells in the area is unknown. There is a bright cell portion in the code, and when the labeling area to be extracted is small with respect to the code, the number of dark cells included in the labeling area may be reduced. In that case, the reliability of subsequent processing is lacking. Therefore, in order to cope with the size of the cell size (dot size), a plurality of different sizes of the labeling region are extracted. The large labeling area corresponds to a large cell size and does not require detailed information. Therefore, steps S3 to S5 are performed on the predetermined labeling area having a large size using the data subjected to the thinning process. Thereby, processing time can be shortened.

ステップS3〜S5は、ステップS2で抽出した各ラベンリング領域に対して行う。まず、特許請求の範囲の抽出手段に相当するステップS3では、公知のラベリング処理を行なって連結成分を抽出する。ラベリング処理は公知であるので詳細な説明は省略し、概要のみ説明する。ラベリング処理は、二値化処理した画像において、白の部分(または黒の部分)が連続した画素に同じ番号を割り振る処理である。   Steps S <b> 3 to S <b> 5 are performed on each ravenling region extracted in step S <b> 2. First, in step S3 corresponding to the extracting means in the claims, a known labeling process is performed to extract connected components. Since the labeling process is known, a detailed description is omitted, and only an outline is described. The labeling process is a process of assigning the same number to pixels in which white portions (or black portions) are continuous in a binarized image.

図3、4は、このステップS3で抽出した連結成分を例示する図であり、図3はドットコードの例、図4は通常コードの例である。   3 and 4 are diagrams illustrating the connected components extracted in step S3. FIG. 3 is an example of a dot code, and FIG. 4 is an example of a normal code.

図3に示すように、ドットコードの場合には、各セル(ドット)が分離しているため、それぞれのセル(ドット)が1つの連結成分となる。これに対して、通常セルは矩形であり、互いに隣接する暗セルは接しているため、図4の(1)、(4)、(5)に示すように複数のセルが結合して1つの連結成分となる場合がある。   As shown in FIG. 3, in the case of a dot code, since each cell (dot) is separated, each cell (dot) becomes one connected component. On the other hand, normal cells are rectangular and adjacent dark cells are in contact with each other. Therefore, as shown in (1), (4), and (5) of FIG. May be a connected component.

続くステップS4では、ステップS3で抽出した各連結成分に対して、輪郭追跡を行なって、周長を求める。続くステップS5では、ステップS4で求めた周長の統計処理を行う。本実施形態では、これらステップS4、S5が、特許請求の範囲の形態特徴値算出手段に相当する。   In subsequent step S4, contour tracing is performed on each connected component extracted in step S3 to obtain a circumference. In subsequent step S5, statistical processing of the circumference obtained in step S4 is performed. In the present embodiment, these steps S4 and S5 correspond to the form feature value calculation means in the claims.

ステップS6では、ステップS5における周長の統計処理結果を用いてセル形状がドットかどうかを判定する。図5は、図3に示すドットコードの画像から求めた周長を統計処理したグラフであり、図6は、図4に示す通常コードの画像から求めた周長を統計処理したグラフである。図5、図6とも、横軸の周長の単位は画素であって、1目盛りは1である。つまり、周長は、1画素を最小単位として求めている。換言すれば、1画素を1階級として周長を区分している。   In step S6, it is determined whether or not the cell shape is a dot using the circumference statistical processing result in step S5. 5 is a graph obtained by statistically processing the circumference obtained from the dot code image shown in FIG. 3, and FIG. 6 is a graph obtained by statistically processing the circumference obtained from the normal code image shown in FIG. 5 and 6, the unit of the circumference on the horizontal axis is a pixel, and one scale is 1. That is, the circumference is obtained with 1 pixel as the minimum unit. In other words, the circumference is divided with one pixel as one class.

ドットコードの場合には、図5に示すように、周長は、ドット一つの周長と想定される、ある一つの長さに集中する傾向がある。一方、通常コードの場合には、図6に示すように、周長が、様々な長さに分散する。   In the case of a dot code, as shown in FIG. 5, the circumference tends to concentrate on a certain length, which is assumed to be the circumference of one dot. On the other hand, in the case of a normal code, as shown in FIG. 6, the circumference is dispersed in various lengths.

よって、ステップS6では、図5のような傾向が見られる場合にはドットコードであると判断する。具体的には、ピークにおける連結成分の数、あるいは、分散により判断を行なう。ただし、ラベリング領域が小さすぎる場合、ドットコードであっても、図7に示すように、ラベリング領域に含まれる暗セルの数が少なくなる。ラベリング領域に含まれるセル数が少ないと、図7の上側に示すドットのように、ラベリング領域の境界により一部切り取られてしまったドットの影響が大きくなる。   Therefore, in step S6, when the tendency as shown in FIG. 5 is observed, it is determined that the dot code is used. Specifically, the determination is made based on the number of connected components in the peak or the variance. However, when the labeling area is too small, the number of dark cells included in the labeling area is reduced as shown in FIG. When the number of cells included in the labeling area is small, the influence of dots that have been partially cut off by the boundary of the labeling area, such as the dots shown in the upper side of FIG. 7, increases.

図8は、図7に示すラベリング領域に対して、連結成分毎に求めた周長の分布を示すグラフである。連結成分数が少なすぎると、この図8に示すように、ドットコードであっても、周長がある一つの長さに集中しない。そこで、セル形状の判定条件には、連結成分数も含ませる。   FIG. 8 is a graph showing the distribution of the perimeter obtained for each connected component in the labeling region shown in FIG. If the number of connected components is too small, as shown in FIG. 8, even a dot code does not concentrate on a certain length. Therefore, the cell shape determination condition includes the number of connected components.

よって、セル形状の判定条件は、たとえば、下記(1)、(2)の条件とすることができる。下記(1)、(2)のいずれか一方を判定条件としてもよいし、両方を判定条件としてもよい。
判定条件(1) 連結成分数が成分数閾値以上、且つ、周長の分布グラフの最大ピークにおける連結成分の数が所定閾値以上
判定条件(2) 連結成分数が成分数閾値以上、且つ、周長の分散Vが所定閾値以下
設定した判定条件が成立する場合には、セル形状がドットであると判定する。なお、上記(1)、(2)のように、2つの判定条件を設定した場合には、いずれか一方が成立した場合に、セル形状がドットであると判定する。また、ステップS3〜S5は、各ラベリング領域に対して行なっており、ステップS6における判定も、各ラベリング領域に対して行なう。
Therefore, the cell shape determination conditions can be, for example, the following conditions (1) and (2). Either one of the following (1) and (2) may be set as the determination condition, or both may be set as the determination condition.
Determination condition (1) The number of connected components is greater than or equal to the component number threshold, and the number of connected components at the maximum peak of the circumference distribution graph is greater than or equal to a predetermined threshold. Determination condition (2) The number of connected components is greater than or equal to the component number threshold and the circumference If the dispersion condition of the length V is equal to or less than a predetermined threshold value, the cell shape is determined to be a dot. In addition, when two determination conditions are set as in (1) and (2) above, it is determined that the cell shape is a dot when either one is satisfied. Steps S3 to S5 are performed for each labeling region, and the determination in step S6 is also performed for each labeling region.

各ラベリング領域に対して判定を行ない、全てのラベリング領域に対して判定条件が成立しなかった場合には、通常セルであると判定する。   A determination is made for each labeling region, and if the determination condition is not satisfied for all the labeling regions, it is determined that the cell is a normal cell.

ステップS7では、ステップS6において、セル形状をドットと判定したか否かの判断を行なう。ドットと判定していた場合には(S7:YES)、ステップS8へ進み、ドット用の読み取りアルゴリズムを実行するドット用読み取り処理を行なう。一方、通常セルと判定していた場合には(S7:NO)、ステップS9へ進み、通常セル用読み取り処理を行なう。   In step S7, it is determined whether or not the cell shape is determined to be a dot in step S6. If it is determined to be a dot (S7: YES), the process proceeds to step S8, and a dot reading process for executing a dot reading algorithm is performed. On the other hand, if it is determined that the cell is a normal cell (S7: NO), the process proceeds to step S9 to perform a normal cell reading process.

以上、説明した本実施形態によれば、ドットコードは、直線を形成している各ドットも、ドットとしての形状を保持しているという特徴を利用してドットコードか否かの判定を行なっている。   As described above, according to the present embodiment described above, the dot code is determined based on the feature that each dot forming a straight line also retains the shape as a dot. Yes.

具体的には、本実施形態では、ラベリング処理により連結成分を抽出しており(S3)、この連結成分の周長を統計処理して、周長の分布グラフの最大ピークにおける連結成分数や、周長の分散Vを算出している(S4、S5)。ドットコードの場合には、ラベリング処理により抽出できる連結成分は、ほとんどがドットであることから、上記最大ピークにおける連結成分数や、周長の分散Vも、ドットであることを示す値となる。   Specifically, in this embodiment, connected components are extracted by a labeling process (S3), the circumference of this connected component is statistically processed, the number of connected components at the maximum peak of the circumference distribution graph, Circumference variance V is calculated (S4, S5). In the case of a dot code, since most of the connected components that can be extracted by the labeling process are dots, the number of connected components at the maximum peak and the dispersion V of the circumference are also values indicating dots.

セル形状判定(S6)では、上記最大ピークにおける連結成分数や、周長の分散Vに基づいて、撮像した二次元コードがドットコードであるか否かを判定することから、精度よくドットコードか否かの判定を行なうことができる。そして、撮像した二次元コードがドットコードであると判定した場合には(S7:YES)、ドットコード専用の読み取り処理を行なう(S8)ことから、ドットコードの読み取りに失敗することを抑制できる。   In the cell shape determination (S6), since it is determined whether or not the captured two-dimensional code is a dot code based on the number of connected components at the maximum peak and the dispersion V of the circumference, whether the dot code is accurate. A determination of whether or not can be made. If it is determined that the imaged two-dimensional code is a dot code (S7: YES), the dot code reading process is performed (S8), so that it is possible to suppress the dot code reading failure.

また、本実施形態では、判定条件(1)、(2)に、「連結成分数が成分数閾値以上」という条件も含ませており、この条件が成立しない場合には、撮像した二次元コードはドットコードではないと判定している(S6)。これにより、ドットコードであるとの判定結果の信頼性の低下を抑制できる。   In this embodiment, the determination conditions (1) and (2) also include a condition that “the number of connected components is equal to or greater than a component number threshold”. If this condition is not satisfied, the captured two-dimensional code is recorded. Is determined not to be a dot code (S6). Thereby, the fall of the reliability of the determination result that it is a dot code can be suppressed.

また、大きさの異なる複数のラベリング領域を抽出しており(S2)、複数のラベリング領域毎に周長の統計処理を行なっている(S4、S5)。そして、いずれか少なくとも一つのラベリング領域に対して判定条件が成立した場合、撮像した二次元コードがドットコードであると判定している(S6)。これにより、ドットコードを撮像した場合、いずれかの大きさのラベリング領域に対する統計処理結果がドットコードであるとの判定条件を満たす可能性が高くなるので、高い精度でドットコードであるか否かの判定ができる。   In addition, a plurality of labeling regions having different sizes are extracted (S2), and a circumference statistical process is performed for each of the plurality of labeling regions (S4, S5). When the determination condition is satisfied for at least one of the labeling regions, it is determined that the captured two-dimensional code is a dot code (S6). As a result, when a dot code is imaged, it is highly possible that the statistical processing result for a labeling area of any size satisfies the determination condition that it is a dot code. Can be determined.

(第2実施形態)
次に、第2実施形態を説明する。第2実施形態は、機械的構成は第1実施形態と同じであり、コード読み取り処理において第1実施形態と相違する。ただし、そのコード読み取り処理も、第1実施形態と類似している。
(Second Embodiment)
Next, a second embodiment will be described. The mechanical structure of the second embodiment is the same as that of the first embodiment, and the code reading process is different from that of the first embodiment. However, the code reading process is also similar to that of the first embodiment.

図9は、第2実施形態におけるコード読み取り処理において、第1実施形態と相違する部分を示すフローチャートである。第2実施形態では、ステップS5に続き、ステップS5−1を実行する点、および、ステップS6に代えて、ステップS6−1を実行する点が第1実施形態と相違する。以下、第1実施形態と相違する部分のみ説明する。   FIG. 9 is a flowchart showing a portion different from the first embodiment in the code reading process in the second embodiment. The second embodiment is different from the first embodiment in that step S5-1 is executed following step S5, and step S6-1 is executed instead of step S6. Hereinafter, only portions different from the first embodiment will be described.

ステップS5−1では、連結成分の円形度を算出する。連結成分はステップS3において複数を抽出しているが、このステップS5−1では、複数抽出した連結成分のうち、ステップS5で周長の統計処理を行なった結果の最小ピークを対象として円形度を算出する。なお、連結成分の数が1であるものはピークとしないで最小ピークを決定する。連結成分の数が1であるものを除外して決定した最小ピークは、単セル成分であると考えることができる。   In step S5-1, the circularity of the connected component is calculated. In step S5-1, a plurality of connected components are extracted. In step S5-1, among the plurality of extracted connected components, the circularity is measured for the minimum peak of the result of the statistical processing of the circumference in step S5. calculate. In addition, the minimum peak is determined without setting the number of connected components to 1 as a peak. The minimum peak determined by excluding the number of connected components of 1 can be considered as a single cell component.

この最小ピークに含まれている連結成分に対して、下記式1に示す周知の円形度の式を用いて、円形度を算出する。なお、第2実施形態では、ステップS5、S5−1が、特許請求の範囲の形態特徴値算出手段に相当する。   For the connected component included in the minimum peak, the circularity is calculated using the well-known circularity formula shown in the following formula 1. In the second embodiment, steps S5 and S5-1 correspond to the form feature value calculation means in the claims.

(式1) 円形度=(4π×面積)/(周長×周長)
ステップS6−1では、ステップS5−1で決定した円形度に基づいて、セル形状の判定を行う。具体的には、ステップS5−1で算出した円形度が、円形とみなすことができる範囲として予め設定された円形判定範囲内か否かでセル形状の判定を行なう。なお、円形判定範囲は1を挟む範囲であり、実験に基づいて予め設定される。
(Formula 1) Circularity = (4π × area) / (perimeter × perimeter)
In step S6-1, the cell shape is determined based on the circularity determined in step S5-1. Specifically, the cell shape is determined based on whether or not the circularity calculated in step S5-1 is within a circular determination range set in advance as a range that can be regarded as a circular shape. Note that the circular determination range is a range including 1 and is set in advance based on experiments.

図3に示した例の場合、円形度が1.05と、1に近い円形度となる。よって、セル形状はドットであると判定する。一方、図4に示した例では、円形度は0.78となる。0.78の場合、円形に近いとは言えず、円形判定範囲から外れることになる。よって、セル形状は、通常セルと判定する。このステップS6−1を実行後は、第1実施形態と同じステップS7へ進む。   In the case of the example shown in FIG. 3, the circularity is 1.05, which is close to 1. Therefore, it is determined that the cell shape is a dot. On the other hand, in the example shown in FIG. 4, the circularity is 0.78. In the case of 0.78, it cannot be said that it is close to a circle, and is out of the circle determination range. Therefore, the cell shape is determined as a normal cell. After executing step S6-1, the process proceeds to step S7, which is the same as in the first embodiment.

コードによっては、セル形状がドットであっても、打刻ずれや撮像状態等でセルが一部結合してしまう場合もある。セルの一部が結合すると周長が長くなることから、周長の統計処理(第1実施形態のステップS5)は、セルの一部が結合してしまうことの影響を受ける。その結果、前述の判定条件(1)、(2)の後半部分の変数となっている「最大ピークにおける連結成分の数」、「周長の分散V」も、この影響を受けることになる。   Depending on the code, even if the cell shape is a dot, some of the cells may be joined due to misprinting or imaging state. When a part of cells is combined, the perimeter becomes longer. Therefore, the perimeter statistical processing (step S5 in the first embodiment) is affected by the fact that part of the cells are combined. As a result, the “number of connected components at the maximum peak” and “circumference variance V”, which are variables in the latter half of the above-described determination conditions (1) and (2), are also affected by this.

これに対して、第2実施形態における円形度は、単セル成分を抽出し、その単セル成分に対して算出している。つまり、もともと、結合しているセルは除外している。そのため、ドット形状のセルの一部が互いに結合してしまっていても、第2実施形態ではその影響は受けない。よって、第2実施形態の方法は、ドット形状のセルの一部が互いに結合してしまっていても、精度よくセル形状がドットかどうかを判定することができる。   In contrast, the circularity in the second embodiment is calculated for a single cell component extracted from the single cell component. In other words, cells that are originally merged are excluded. For this reason, even if some of the dot-shaped cells are coupled to each other, the second embodiment is not affected. Therefore, the method of the second embodiment can accurately determine whether the cell shape is a dot even if some of the dot-shaped cells are coupled to each other.

以上、本発明の実施形態を説明したが、本発明は上述の実施形態に限定されるものではなく、次の実施形態も本発明の技術的範囲に含まれ、さらに、下記以外にも要旨を逸脱しない範囲内で種々変更して実施することができる。   As mentioned above, although embodiment of this invention was described, this invention is not limited to the above-mentioned embodiment, The following embodiment is also contained in the technical scope of this invention, and also the summary other than the following is also included. Various modifications can be made without departing from the scope.

たとえば、前述の実施形態では、ラベリング領域として、大きさの異なる複数の領域を抽出していたが、ラベリング領域は一つでもよい。また、ラベリング領域の大きさは、ステップS1で抽出したコード領域全体でもよいし、そのコード領域の一部分でもよい。   For example, in the above-described embodiment, a plurality of regions having different sizes are extracted as the labeling region, but there may be one labeling region. The size of the labeling area may be the entire code area extracted in step S1 or a part of the code area.

10:二次元コード読み取り装置、 20:回路部、 21:発光ダイオード、 23:エリアセンサ、 27:結像レンズ、 31:増幅回路、 33:A/D変換回路、 35:メモリ、 36:アドレス発生回路、 38:同期信号発生回路、 40:制御回路、 41:電源スイッチ、 42:操作スイッチ、 43:LED、 44:ブザー、 46:液晶表示器、 48:通信インタフェース、 49:電池、 60:マーカ光投射器
S3:抽出手段、 S4、S5:形態特徴値算出手段、 S5、S5−1:形態特徴値算出手段、 S6:判定手段、 S7〜S9:読み取り手段
10: Two-dimensional code reading device, 20: Circuit section, 21: Light emitting diode, 23: Area sensor, 27: Imaging lens, 31: Amplification circuit, 33: A / D conversion circuit, 35: Memory, 36: Address generation Circuit 38: synchronization signal generation circuit 40: control circuit 41: power switch 42: operation switch 43: LED 44: buzzer 46: liquid crystal display 48: communication interface 49: battery 60: marker Optical projector S3: extraction means, S4, S5: morphological feature value calculation means, S5, S5-1: morphological feature value calculation means, S6: determination means, S7 to S9: reading means

Claims (5)

二次元コードを含む画像を撮像し、撮像した画像の二次元コードから情報を読み取る二次元コード読み取り装置であって、
前記画像において前記二次元コードが撮像されている部分を含む領域から、ラベリング処理を行なって連結成分を抽出する抽出手段と、
前記抽出手段で抽出した連結成分の形態の特徴を表している形態特徴値を算出する形態特徴値算出手段と、
前記形態特徴値算出手段で算出した形態特徴値に基づいて、撮像した二次元コードが、ドットコードであるか否かを判定する判定手段と、
前記判定手段が、撮像した二次元コードがドットコードであると判定した場合、ドットコード専用の読み取り処理を実行する読み取り手段と、
を含むことを特徴とする二次元コード読み取り装置。
A two-dimensional code reader that captures an image including a two-dimensional code and reads information from the two-dimensional code of the captured image,
Extraction means for extracting a connected component by performing a labeling process from a region including a portion where the two-dimensional code is imaged in the image;
Morphological feature value calculating means for calculating a morphological feature value representing the characteristics of the form of the connected component extracted by the extracting means;
Determining means for determining whether or not the captured two-dimensional code is a dot code based on the form feature value calculated by the form feature value calculating means;
When the determination unit determines that the captured two-dimensional code is a dot code, a reading unit that executes a reading process dedicated to the dot code;
A two-dimensional code reading device comprising:
請求項1において、
前記形態特徴値算出手段は、前記連結成分から単セル成分を抽出し、前記形態特徴値として、その単セル成分の円形度を算出し、
前記判定手段は、前記円形度が、円形であることを示す所定範囲内であった場合には、撮像した二次元コードはドットコードであると判定する
ことを特徴とする二次元コード読み取り装置。
In claim 1,
The form feature value calculating means extracts a single cell component from the connected component, calculates a circularity of the single cell component as the form feature value,
The determination unit determines that the captured two-dimensional code is a dot code when the circularity is within a predetermined range indicating that the circularity is circular.
請求項1において、
前記形態特徴値算出手段は、前記抽出手段が抽出した連結成分の周長を算出し、算出した周長の統計特徴値を前記形態特徴値として算出し、
前記判定手段は、前記統計特徴値と、その統計特徴値に対して予め設定された統計閾値との比較に基づいて、撮像した二次元コードがドットコードであるか否かを判定する
ことを特徴とする二次元コード読み取り装置。
In claim 1,
The form feature value calculation means calculates a circumference of the connected component extracted by the extraction means, calculates a statistical feature value of the calculated circumference as the form feature value,
The determination unit determines whether the captured two-dimensional code is a dot code based on a comparison between the statistical feature value and a statistical threshold value preset for the statistical feature value. A two-dimensional code reader.
請求項3において、
前記判定手段は、統計特徴値と前記統計閾値との比較に加え、前記連結成分の数と連結成分の数に対して予め設定された成分数閾値との比較も行い、連結成分数が前記成分数閾値よりも少ない場合には、撮像した二次元コードはドットコードではないと判定することを特徴とする二次元コード読み取り装置。
In claim 3,
In addition to comparing the statistical feature value and the statistical threshold value, the determination unit also compares the number of connected components and a component number threshold set in advance with respect to the number of connected components. A two-dimensional code reading device, wherein when the number is smaller than a threshold value, it is determined that the captured two-dimensional code is not a dot code.
請求項3または4において、
前記抽出手段は、大きさの異なる複数のラベリング領域を抽出し、各ラベリング領域に対してそれぞれ前記ラベリング処理を行い、複数のラベリング領域毎に連結成分を抽出し、
前記形態特徴値算出手段は、複数のラベリング領域毎に前記統計特徴値を算出し、
前記判定手段は、いずれか少なくとも一つのラベリング領域に対する統計特徴値がドットコードであるとの判定条件を満たした場合、撮像した二次元コードがドットコードであると判定する
ことを特徴とする二次元コード読み取り装置。
In claim 3 or 4,
The extraction means extracts a plurality of labeling regions having different sizes, performs the labeling process on each labeling region, extracts a connected component for each of the plurality of labeling regions,
The form feature value calculating means calculates the statistical feature value for each of a plurality of labeling regions,
The determination unit determines that the captured two-dimensional code is a dot code when a determination condition that a statistical feature value for at least one labeling region is a dot code is satisfied. Code reader.
JP2012063924A 2012-03-21 2012-03-21 Two-dimensional code reader Active JP5810997B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012063924A JP5810997B2 (en) 2012-03-21 2012-03-21 Two-dimensional code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012063924A JP5810997B2 (en) 2012-03-21 2012-03-21 Two-dimensional code reader

Publications (2)

Publication Number Publication Date
JP2013196470A true JP2013196470A (en) 2013-09-30
JP5810997B2 JP5810997B2 (en) 2015-11-11

Family

ID=49395308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012063924A Active JP5810997B2 (en) 2012-03-21 2012-03-21 Two-dimensional code reader

Country Status (1)

Country Link
JP (1) JP5810997B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108351979A (en) * 2015-11-09 2018-07-31 三星电子株式会社 Electronic equipment and its operating method
CN116468060A (en) * 2023-04-23 2023-07-21 创新奇智(上海)科技有限公司 DPM code processing method, device, storage medium and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048119A (en) * 1998-07-28 2000-02-18 Omron Corp Method for judging cell logical value in two-dimensional code reader
JP2000235617A (en) * 1999-02-17 2000-08-29 Olympus Optical Co Ltd Data reader
JP2002074258A (en) * 2000-08-31 2002-03-15 Denso Corp Optical information reader
JP2007172596A (en) * 2005-11-24 2007-07-05 Canon Inc Two-dimensional code, and method and apparatus for detecting the same
JP2008305058A (en) * 2007-06-06 2008-12-18 Panasonic Corp Code reading device and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048119A (en) * 1998-07-28 2000-02-18 Omron Corp Method for judging cell logical value in two-dimensional code reader
JP2000235617A (en) * 1999-02-17 2000-08-29 Olympus Optical Co Ltd Data reader
JP2002074258A (en) * 2000-08-31 2002-03-15 Denso Corp Optical information reader
JP2007172596A (en) * 2005-11-24 2007-07-05 Canon Inc Two-dimensional code, and method and apparatus for detecting the same
JP2008305058A (en) * 2007-06-06 2008-12-18 Panasonic Corp Code reading device and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108351979A (en) * 2015-11-09 2018-07-31 三星电子株式会社 Electronic equipment and its operating method
CN108351979B (en) * 2015-11-09 2021-06-18 三星电子株式会社 Electronic device and operation method thereof
CN116468060A (en) * 2023-04-23 2023-07-21 创新奇智(上海)科技有限公司 DPM code processing method, device, storage medium and equipment
CN116468060B (en) * 2023-04-23 2024-01-19 创新奇智(上海)科技有限公司 DPM code processing method, device, storage medium and equipment

Also Published As

Publication number Publication date
JP5810997B2 (en) 2015-11-11

Similar Documents

Publication Publication Date Title
JP6115214B2 (en) Pattern processing apparatus, pattern processing method, and pattern processing program
JP2007122243A (en) Optical information verification device
US20220254067A1 (en) Optical information detection method, device and equipment
JP2008175686A (en) Visual examination device and visual examination method
JP2023062139A (en) Improved method for correcting errors in matrix symbols
CN112750116A (en) Defect detection method and device, computer equipment and storage medium
JP2015222220A (en) Control apparatus, robot, and control method
JP5810997B2 (en) Two-dimensional code reader
US9739604B2 (en) Information processing apparatus, information processing method, and storage medium
JP2007298376A (en) Method and device for determining boundary position, program for making computer function as boundary position determination device, and recording medium
JP2009301411A (en) Image processing method and image processing device for sampling embossed characters
JP5034693B2 (en) Code reading apparatus and method
JP2008071032A (en) Optical information reader
JP2018196426A (en) Pore detection method and pore detection device
JP5293853B1 (en) Bar code reader
KR101383827B1 (en) System and method for automatic extraction of soldering regions in pcb
JP2011008574A (en) Optical information reader
JP5825110B2 (en) Two-dimensional code reader
JP2015060531A (en) Information code reader
JP5724771B2 (en) Optical information reader
JP5282559B2 (en) Information code reader
JP2008134940A (en) Object detection device, object detection method, object detection program and recording medium recording the program
US20230394789A1 (en) Image processing method, information processing apparatus, and non-transitory computer-readable storage medium storing program
JP2010097316A (en) Optical information reader
JP2013045149A (en) Information code reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150616

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150729

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150831

R150 Certificate of patent or registration of utility model

Ref document number: 5810997

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250