JP2013148981A - Two-dimensional code reading device - Google Patents

Two-dimensional code reading device Download PDF

Info

Publication number
JP2013148981A
JP2013148981A JP2012007429A JP2012007429A JP2013148981A JP 2013148981 A JP2013148981 A JP 2013148981A JP 2012007429 A JP2012007429 A JP 2012007429A JP 2012007429 A JP2012007429 A JP 2012007429A JP 2013148981 A JP2013148981 A JP 2013148981A
Authority
JP
Japan
Prior art keywords
cell
gray
binarization
cells
correction
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
JP2012007429A
Other languages
Japanese (ja)
Other versions
JP5825110B2 (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 JP2012007429A priority Critical patent/JP5825110B2/en
Publication of JP2013148981A publication Critical patent/JP2013148981A/en
Application granted granted Critical
Publication of JP5825110B2 publication Critical patent/JP5825110B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide a two-dimensional code reading device which rarely fails in reading.SOLUTION: In order to execute disappearance correction with higher correction capability than that of detection correction when the detection correction fails, a gray flag is set to a cell with lower reliability of a binarization result (S12). For example, the gray flag is set to a cell whose luminance is ±α to a threshold th. Then, when detection correction processing (S14) fails (NO in S15), a code word including the gray flag is set to an error position (S16), and the disappearance correction is performed (S17). The disappearance correction has double correction capability than that of the detection correction. Thus, there is a possibility that correction can be performed even when the detection correction fails, the case that reading fails is reduced.

Description

本発明は、二次元コード読み取り装置に関し、特に、セルの二値化に関する。   The present invention relates to a two-dimensional code reader, and more particularly, to binarization of cells.

二次元コードからコードワードを解読するためには、コード内のセルの明暗(白黒)を得るために画像を二値化する必要がある。二値化手法としては、分離度と言われる値が最大となる閾値を求める判別分析法(大津の二値化)がよく知られている。   In order to decode a code word from a two-dimensional code, it is necessary to binarize the image in order to obtain the contrast (black and white) of the cells in the code. As a binarization method, a discriminant analysis method (Otsu's binarization) for obtaining a threshold value that maximizes a value called a degree of separation is well known.

ただし、画像は、照明のあたり方が不均一であったあり、ボケの影響を受けたりするため、閾値を一様に決定することは難しい。そこで、特許文献1、2には、画像の変化に合わせて閾値を可変とするものが知られている。   However, it is difficult to determine the threshold value uniformly because the image is unevenly illuminated and is subject to blurring. Therefore, Patent Documents 1 and 2 are known in which the threshold value is variable in accordance with a change in the image.

特開平2−141886号公報Japanese Patent Laid-Open No. 2-141886 特開2000−259759号公報JP 2000-259759 A

しかし、ボケ等の影響が強くなると、個々のセルはその周囲のパターンの影響が大きくなり、個々のセルの適性閾値を決定することが難しくなる。その結果、閾値を可変としてもセルの明暗の分類を失敗してしまう場合が増加する。分類失敗が増加し、コードが備える誤り訂正の限度を越えてしまうと、コードの読み取りができなくなってしまうことにつながる。   However, when the influence of blur or the like becomes strong, the influence of the surrounding pattern of each cell increases, and it becomes difficult to determine the suitability threshold of each cell. As a result, the number of cases in which the light / dark classification of the cells fails even if the threshold value is variable increases. If the number of classification failures increases and the error correction limit of the code is exceeded, the code cannot be read.

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

その目的を達成するための請求項1記載の発明は、複数のセルによりデータブロックと誤り訂正符号ブロックとが複数形成されている二次元コードから情報を読み取るために、その二次元コードを含む画像を撮像し、撮像した画像における各セルの色を二値化して読み取りを行なう二次元コード読み取り装置であって、撮像した画像における二次元コードの各セルを明セルおよび暗セルのいずれかに決定する二値化手段と、前記二値化手段による二値化結果の信頼性が低いセルに対してグレーフラグを設定するグレー設定手段と、前記誤り訂正符号ブロックのコードを用いて検出訂正を行う検出訂正手段と、前記検出訂正手段で訂正に失敗した場合、グレーフラグが設定されているセルを含むデータブロックを誤り位置に指定して消失訂正を行う消失訂正手段とを含むことを特徴とする。   In order to achieve the object, the invention according to claim 1 is directed to an image including a two-dimensional code for reading information from a two-dimensional code in which a plurality of data blocks and error correction code blocks are formed by a plurality of cells. Is a two-dimensional code reading device that binarizes and reads the color of each cell in the captured image, and determines each cell of the two-dimensional code in the captured image as either a bright cell or a dark cell Binarizing means, a gray setting means for setting a gray flag for a cell with low reliability of the binarization result by the binarizing means, and detection correction using the code of the error correction code block If the correction fails by the detection and correction means and the detection and correction means, the data block including the cell in which the gray flag is set is designated as the error position and the erasure correction is performed. Characterized in that it comprises a Cormorant erasure correction means.

消失訂正は、誤り位置が分かっていることが必要となるものの、誤り発生位置が特定されていない状態で行う検出訂正に比較して訂正能力は2倍となる。本発明では、誤り訂正が失敗した場合に、検出訂正よりも訂正能力の高い消失訂正を実行できるようにするため、二値化結果の信頼性が低いセルに対してグレーフラグを設定しておく。そして、検出訂正が失敗した場合には、グレーフラグが設定されているセルを含むデータブロックを誤り位置に指定して消失訂正を行う。よって、読み取りに失敗する場合が少なくなる。   Although erasure correction requires that the error position is known, the correction capability is doubled compared to detection correction performed in a state where the error occurrence position is not specified. In the present invention, when error correction fails, a gray flag is set for a cell with low reliability of the binarization result so that erasure correction with higher correction capability than detection correction can be executed. . When detection and correction fails, erasure correction is performed by designating a data block including a cell with the gray flag set as an error position. Therefore, there are fewer cases where reading fails.

請求項2記載の発明では、前記二値化手段は、互いに異なる2種類の二値化処理により各セルが明セルであるか暗セルであるかを仮決定し、それら2つの二値化処理による二値化結果に基づいて各セルが明セルであるか暗セルであるかを最終決定するようになっており、前記グレー設定手段は、前記2種類の二値化処理のうちの一方の二値化結果の信頼性が低いセルに対して仮グレーフラグを設定するとともに、他方の二値化結果の信頼性が低いセルに対しても仮グレーフラグを設定し、それら2つの仮グレーフラグの設定有無に基づいて、最終的なグレーフラグを設定する。   In the invention described in claim 2, the binarization means tentatively determines whether each cell is a bright cell or a dark cell by two types of binarization processing different from each other, and the two binarization processing Based on the binarization result by the above, each cell is finally determined whether it is a bright cell or a dark cell, and the gray setting means is one of the two types of binarization processing. A temporary gray flag is set for a cell with low reliability of the binarization result, and a temporary gray flag is also set for the other cell with low reliability of the binarization result. The final gray flag is set based on the presence / absence of setting.

このように、互いに異なる2種類の二値化処理により各セルの二値化を行なって、それぞれの二値化処理結果に基づいて仮グレーフラグを設定し、それら2つの仮グレーフラグの設定有無に基づいて最終的なグレーフラグを設定するようにすれば、二値化結果が正しいものに対してグレーフラグを設定してしまうことを少なくでき、その結果、読み取りに失敗する場合がより減少する。   In this way, binarization of each cell is performed by two types of binarization processing different from each other, a temporary gray flag is set based on the respective binarization processing results, and whether or not these two temporary gray flags are set If the final gray flag is set based on the value, it is possible to reduce the setting of the gray flag for the correct binarization result, and as a result, the number of cases where reading fails is further reduced. .

請求項3記載の発明では、前記二値化手段は、各セルの輝度と、セルの明暗決定のための閾値とを比較することで、各セルが明セルであるか暗セルであるかを決定するようになっており、前記グレー設定手段は、各セルの輝度と前記閾値との差が予め設定された範囲である場合には、そのセルに対してグレーフラグを設定する。   In the invention of claim 3, the binarization means compares the brightness of each cell with a threshold value for determining the brightness of the cell, thereby determining whether each cell is a bright cell or a dark cell. When the difference between the brightness of each cell and the threshold value is within a preset range, the gray setting unit sets a gray flag for the cell.

このようにしてグレーフラグを設定すれば、明暗決定の信頼性が低いセルに対して精度よくグレーフラグを設定することができる。   If the gray flag is set in this way, the gray flag can be set with high accuracy for a cell with low reliability of light / dark determination.

請求項4記載の発明は、請求項2における2種類の二値化処理を具体化した発明である。その請求項4記載の発明では、前記二値化手段は、各セルの周囲に存在する周辺セルの輝度変化に基づいて閾値を設定し、その設定した閾値と当該セルの輝度の比較に基づいて、各セルが明セルであるか暗セルであるかを決定する局所的二値化手段と、前記局所的二値化手段における閾値設定のための輝度範囲よりも広い範囲に設定された部分領域毎に閾値を設定し、その設定した閾値と当該部分領域に含まれるセルの輝度の比較に基づいて、各セルが明セルであるか暗セルであるかを決定する大局的二値化手段とを含む。   The invention described in claim 4 is an invention embodying the two types of binarization processing in claim 2. In the invention according to claim 4, the binarization means sets a threshold based on a luminance change of surrounding cells existing around each cell, and based on a comparison between the set threshold and the luminance of the cell. , Local binarization means for determining whether each cell is a bright cell or a dark cell, and a partial area set to a range wider than a luminance range for threshold setting in the local binarization means A global binarization unit that sets a threshold value for each cell and determines whether each cell is a bright cell or a dark cell based on a comparison of the set threshold value and the luminance of a cell included in the partial region; including.

請求項5記載の発明では、前記二値化手段は、明セルと暗セルとの間の輝度勾配と同色セル間の輝度勾配との中間的な勾配に基準勾配を設定し、各セルに対して、隣接セルとの間の輝度勾配が前記基準勾配よりも急であるか否か、および、その隣接セルよりも高輝度か否かに基づいて、各セルの明暗を決定するものであり、前記グレー設定手段は、互いに隣接するセル間の輝度勾配が、前記基準勾配に対して予め設定された範囲であるか否かに基づいて、それら2つのセルに対して、グレーフラグを設定するか否かを決定する。   In the invention according to claim 5, the binarization means sets a reference gradient to an intermediate gradient between the luminance gradient between the light cell and the dark cell and the luminance gradient between the same color cells, and for each cell. The brightness gradient of each cell is determined based on whether the luminance gradient between adjacent cells is steeper than the reference gradient and whether the luminance is higher than that of the adjacent cell. Whether the gray setting means sets a gray flag for these two cells based on whether or not the luminance gradient between adjacent cells is within a preset range with respect to the reference gradient. Decide whether or not.

このように、輝度勾配に基づいてグレーフラグを設定することができる。また、輝度勾配に基づいて二値化するので、セル中心に汚れがあっても、正しく二値化を行うこともできる。   In this way, the gray flag can be set based on the luminance gradient. Further, since binarization is performed based on the luminance gradient, binarization can be performed correctly even if the cell center is dirty.

請求項6記載の発明では、前記グレー設定手段は、前記二値化手段により、互いに隣接するセルがともに暗セル、あるいはともに明セルに設定されたにも関わらず、それら隣接セル間の輝度勾配が前記基準勾配以上である場合、および、前記二値化手段により互いに隣接するセルの一方が暗セル、他方が明セルに設定されたにも関わらず、その暗セルと明セルとの間の輝度勾配が前記基準勾配以下である場合のいずれかである場合には、それら互いに隣接するセルに対してグレーフラグを設定する。   In the invention according to claim 6, the gray setting means, even though the cells adjacent to each other are both set as dark cells or both light cells by the binarization means, the luminance gradient between the adjacent cells. Is equal to or greater than the reference gradient, and even if one of the cells adjacent to each other is set as a dark cell and the other as a bright cell by the binarization means, If the luminance gradient is any of the reference gradients or less, a gray flag is set for the cells adjacent to each other.

互いに隣接するセルがともに暗セル、あるいはともに明セルに設定された場合には、それら隣接セル間の輝度勾配は緩やかであるはずである。それにも関わらず、それら隣接セル間の輝度勾配が前記基準勾配以上である場合には、セルの明暗決定が誤っている可能性が高い。また、互いに隣接するセルの一方が暗セル、他方が明セルに設定された場合には、それら隣接セル間の輝度勾配は比較的急な勾配であるはずである。それにも関わらず、それら隣接セル間の輝度勾配が前記基準勾配以下である場合には、セルの明暗決定が誤っている可能性が高い。よって、これらの場合にグレーフラグを設定することで、明暗の判断が誤っている可能性が高いセルに対してグレーフラグを設定することができる。   When cells adjacent to each other are both set as dark cells or light cells, the luminance gradient between the adjacent cells should be gentle. Nevertheless, if the luminance gradient between the adjacent cells is greater than or equal to the reference gradient, there is a high possibility that the cell brightness determination is incorrect. In addition, when one of adjacent cells is set as a dark cell and the other is set as a bright cell, the luminance gradient between the adjacent cells should be a relatively steep gradient. Nevertheless, if the luminance gradient between the adjacent cells is less than or equal to the reference gradient, there is a high possibility that the cell brightness determination is incorrect. Therefore, by setting a gray flag in these cases, it is possible to set a gray flag for a cell that is highly likely to be erroneously determined to be bright or dark.

請求項7記載の発明では、前記二値化手段は、前記二次元コードを異なる条件で撮像した複数の画像を用い、画像毎に二次元コードの各セルが明セルであるか暗セルであるかを仮決定し、それら2つの画像からの仮決定結果に基づいて各セルが明セルであるか暗セルであるかを最終決定するようになっており、前記グレー設定手段は、前記2つの画像の二値化結果が不一致であるセルに対してグレーフラグを設定する。   In the invention according to claim 7, the binarization means uses a plurality of images obtained by imaging the two-dimensional code under different conditions, and each cell of the two-dimensional code is a bright cell or a dark cell for each image. Is temporarily determined, and based on the provisional determination results from these two images, it is finally determined whether each cell is a bright cell or a dark cell. A gray flag is set for a cell whose image binarization result is inconsistent.

このように、2つの画像による二値化結果が不一致であるセルに対してグレーフラグを設定することによっても、明暗決定の信頼性が低いセルに対して精度よくグレーフラグを設定することができる。その結果、明暗決定が間違っている可能性が高いセルを含むブロックが優先的に消失訂正されることになることから、明暗の誤りを訂正できる可能性が向上する。よって、読み取りの成功可能性がより向上する。   As described above, it is possible to accurately set the gray flag for the cells having low reliability of the brightness determination by setting the gray flag for the cells in which the binarization results of the two images do not match. . As a result, erasure correction is performed on a block including cells that are likely to be wrong in light / dark determination, so that the possibility of correcting light / dark errors is improved. Therefore, the possibility of successful reading is further improved.

請求項8記載の発明は、前記二値化手段による二値化結果の信頼の程度に基づいてグレースコアを設定するスコア設定手段を備え、前記グレー設定手段は、グレーフラグが設定されたセルを含むブロックの数が予め設定した消失訂正規定数を超えない範囲で、二値化結果の信頼の程度が低いことを示している側のグレースコアのセルから順に、グレーフラグを設定する。   The invention according to claim 8 includes score setting means for setting a gray score based on a degree of confidence of the binarization result by the binarization means, and the gray setting means includes a cell in which a gray flag is set. The gray flag is set in order from the cell of the gray score on the side indicating that the degree of reliability of the binarization result is low within a range in which the number of blocks to be included does not exceed the preset erasure correction prescribed number.

このようにすれば、消失訂正の能力を越えて消失訂正を行うことが抑制される。その結果、消失訂正が成功する可能性が高くなるので、読み取りの成功可能性が向上する。   In this way, erasure correction beyond the erasure correction capability is suppressed. As a result, since the possibility of successful erasure correction increases, the possibility of successful reading is improved.

本発明の実施形態となる二次元コード読み取り装置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のステップS1で設定する閾値thの例を示す図である。It is a figure which shows the example of the threshold value th set by step S1 of FIG. 第1実施形態において行なう、図2のマッピングとデコード処理の詳細を示すフローチャートである。3 is a flowchart showing details of the mapping and decoding process of FIG. 2 performed in the first embodiment. ステップS12のグレー設定処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the gray setting process of step S12. (A)は、QRコード(登録商標)のブロック配置を示す概略図、(B)は誤りブロックのデータ処理例である。(A) is a schematic diagram showing a block arrangement of a QR code (registered trademark), and (B) is an example of data processing of an error block. サンプル画像10枚での第1実施形態と従来手法との比較結果を示す図であり、(A)は誤り総数を比較したグラフ、(B)は訂正コストを比較したグラフである。It is a figure which shows the comparison result of 1st Embodiment and the conventional method with 10 sample images, (A) is a graph which compared the total number of errors, (B) is a graph which compared the correction cost. 第2実施形態において実行するグレー設定処理である。This is a gray setting process executed in the second embodiment. 図8に続いて実行するグレー設定処理の一部である。FIG. 9 is a part of a gray setting process executed subsequent to FIG. 図8のステップS35で行なう二値化処理における周辺セルを例示する図である。It is a figure which illustrates the surrounding cell in the binarization process performed by step S35 of FIG. 二次元コードの撮像画像の一部を拡大した図である。It is the figure which expanded a part of picked-up image of a two-dimensional code. 図11の(A)、(B)、(C)の部分の輝度変化を示すグラフである。It is a graph which shows the luminance change of the part of (A) of FIG. 11, (B), (C). 輝度勾配の矛盾なし、矛盾ありの一例を説明する図である。It is a figure explaining an example with no inconsistency of a brightness | luminance gradient and inconsistency. 第3実施形態において実行するグレー設定処理を示すフローチャートである。It is a flowchart which shows the gray setting process performed in 3rd Embodiment. 図14に続いて実行するグレー設定処理の一部である。FIG. 15 is a part of a gray setting process executed subsequent to FIG. 14. 第4実施形態において行なうコード読み取り処理を示すフローチャートである。It is a flowchart which shows the code reading process performed in 4th Embodiment. 図16に続いて実行するコード読み取り処理の一部である。It is a part of code reading process performed following FIG.

(第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, it is determined whether each cell constituting the two-dimensional code is a dark cell or a bright cell. In this cell color determination (cell light / dark determination), a binarization process of the cell center luminance is performed. The position of the cell center is determined based on the position of the feature pattern. Since the feature pattern has a predetermined position and range in the two-dimensional code, the center coordinates of each cell of the two-dimensional code can be determined based on the position of the feature pattern.

図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から撮像データを取得し、従来周知の方法、たとえば、判別分析法により、明セルと暗セルとを区別するための閾値thを設定する。図3に、上記閾値thの例を示す。この図3に示すように、閾値thは、一例としては、暗セルを示す輝度のピークと明セルを示す輝度のピークとの間の極小値を示す輝度に設定する。また、図3には、この輝度に対するマージンαも示している。このマージンαの大きさは予め設定されている。   First, in step S1, imaging data is acquired from the memory 35, and a threshold value th for distinguishing between bright cells and dark cells is set by a conventionally known method such as discriminant analysis. FIG. 3 shows an example of the threshold th. As shown in FIG. 3, for example, the threshold th is set to a luminance that indicates a minimum value between a luminance peak indicating a dark cell and a luminance peak indicating a bright cell. FIG. 3 also shows a margin α for this luminance. The size of the margin α is set in advance.

ステップS2では、コードから特徴パターンを検出する。たとえば、QRコード(登録商標)では切り出しシンボル(ファインダパターン)を検出する。ステップS3ではステップS2で検出した特徴パターンをもとにコードの各セルの中心座標を決定する。さらに、その中心座標の輝度から、各セルの明暗を決定する。この処理はマッピングとも言われる。ステップS4では、ステップS3で決定した各セルの明暗をもとにデコード処理を行なう。   In step S2, a feature pattern is detected from the code. For example, in a QR code (registered trademark), a cut-out symbol (finder pattern) is detected. In step S3, the center coordinates of each cell of the code are determined based on the feature pattern detected in step S2. Further, the brightness of each cell is determined from the brightness of the center coordinates. This process is also called mapping. In step S4, a decoding process is performed based on the brightness of each cell determined in step S3.

図4は、第1実施形態において行なう、図2のマッピングとデコード処理の詳細を示すフローチャートである。まず、ステップS11では、各セルの中心座標を決定する。ステップS12ではグレー設定処理を行なう。ステップS12のグレー設定処理の詳細を図5に示す。   FIG. 4 is a flowchart showing details of the mapping and decoding process of FIG. 2 performed in the first embodiment. First, in step S11, the center coordinates of each cell are determined. In step S12, a gray setting process is performed. Details of the gray setting process in step S12 are shown in FIG.

図5では、ステップS21〜S24の処理を各セルに対して行なう。まず、ステップS21では、ステップS11で決定したセル中心座標に対する輝度と、図2のステップS1で設定した閾値thとを比較する。   In FIG. 5, the processes of steps S21 to S24 are performed for each cell. First, in step S21, the luminance with respect to the cell center coordinates determined in step S11 is compared with the threshold th set in step S1 of FIG.

ステップS22では、ステップS21の比較の結果、セル中心座標の輝度が閾値thから±α以内であるか否かを判断する。この判断が肯定判断であった場合にはステップS23へ進み、そのセルに対してグレーフラグを格納(設定)する。その後、ステップS24へ進む。一方、ステップS22が否定判断であった場合、すなわち、セル中心座標の輝度が閾値thから±α以上離れていた場合には、ステップS23を介さずに直接、ステップS24へ進む。ステップS24では、ステップS21での比較結果に基づいてセルの明暗を格納する。   In step S22, as a result of the comparison in step S21, it is determined whether or not the luminance of the cell center coordinates is within ± α from the threshold th. If this determination is affirmative, the process proceeds to step S23, and a gray flag is stored (set) for the cell. Thereafter, the process proceeds to step S24. On the other hand, if the determination in step S22 is negative, that is, if the brightness of the cell center coordinates is more than ± α from the threshold th, the process proceeds directly to step S24 without going through step S23. In step S24, the brightness of the cell is stored based on the comparison result in step S21.

図4へ戻り、ステップS13では、コードの各ブロックからコードワードを取得する。ステップS14では、公知の検出訂正処理を行なう。この検出訂正処理は、誤り発生位置が特定されていない状態で行なう誤り訂正であり、コードに誤り訂正符号として含まれている誤り訂正符号(たとえばリードソロモン符号)を取得して、取得した誤り訂正符号を用い、ステップS13で取得したコードワードが正しいかどうかを確認する。   Returning to FIG. 4, in step S13, a code word is obtained from each block of the code. In step S14, a known detection and correction process is performed. This detection and correction processing is error correction performed in a state where an error occurrence position is not specified, and an error correction code (for example, a Reed-Solomon code) included in the code as an error correction code is acquired and the acquired error correction is performed. The code is used to check whether the code word acquired in step S13 is correct.

ステップS15では、ステップS14の処理の結果、訂正に成功したか否かを判断する。このステップS15が肯定判断である場合にはステップS18へ進む。一方、ステップS15が否定判断である場合、すなわち、検出訂正処理に失敗した場合にはステップS16へ進む。   In step S15, it is determined whether or not the correction is successful as a result of the process in step S14. If step S15 is affirmative, the process proceeds to step S18. On the other hand, if the determination in step S15 is negative, that is, if the detection and correction process has failed, the process proceeds to step S16.

ステップS16ではグレーフラグ反映処理を行う。このグレーフラグ反映処理は、図5でグレーフラグを設定したセルを含んでいるコードワード(すなわちブロック)の位置を誤り位置として設定する処理である。図6(A)は、QRコード(登録商標)のブロック配置を示す概略図である。この図6(A)において、×印はグレーフラグを設定したセルを含んでいるコードワードを示している。この×印のセルを含むコードワードを、誤っていることを示す符号、たとえば、図6(B)では「0」に変更する。この処理がステップS16の処理である。   In step S16, a gray flag reflection process is performed. This gray flag reflection process is a process of setting the position of a code word (that is, a block) including a cell for which the gray flag is set in FIG. 5 as an error position. FIG. 6A is a schematic diagram showing a block arrangement of a QR code (registered trademark). In FIG. 6A, a cross indicates a code word including a cell in which a gray flag is set. The code word including the cell marked with x is changed to a code indicating that it is incorrect, for example, “0” in FIG. 6B. This process is the process of step S16.

続くステップS17では消失訂正を行う。より正確には、誤り訂正を再度実行するが、誤り位置が分かっているブロックについては消失訂正を行なう。消失訂正は、誤り位置が分かっていることが前提とはなるものの、シンドローム多項式から求める多項式は消失数値多項式1つのみとなる。よって、訂正能力が誤り訂正の2倍となるという特徴を持っている。従って、ステップS15で検出訂正処理が失敗と判断されていても、このステップS17の消失訂正は成功する可能性がある。   In subsequent step S17, erasure correction is performed. More precisely, error correction is performed again, but erasure correction is performed for blocks whose error positions are known. Although the erasure correction is based on the premise that the error position is known, only one erasure numerical polynomial is obtained from the syndrome polynomial. Therefore, the correction capability is twice that of error correction. Therefore, even if the detection correction process is determined to have failed in step S15, the erasure correction in step S17 may be successful.

ステップS18では、ステップS17あるいはステップS14の処理の結果を出力する。この結果は、具体的には、ステップS15が肯定判断であった場合には、訂正成功(すなわち読み取り成功)との結果、および、読み取ったデータを出力することになる。また、ステップS17を実行した場合には、訂正の成否を出力するとともに、訂正成功の場合には、訂正処理によって得たデータを出力する。   In step S18, the result of the process in step S17 or step S14 is output. Specifically, if the result of step S15 is an affirmative determination, the result of correction success (that is, reading success) and the read data are output. When step S17 is executed, the success / failure of the correction is output, and when the correction is successful, the data obtained by the correction process is output.

ここで、本実施形態の手法は従来手法よりも読み取り可能性が向上していることを、訂正コストを用いて定量的に説明する。リードソロモン法における訂正コストの関係式を(1)に示す。式(1)において、ECCは訂正コスト、Pは誤り検出数、FPは誤り誤検出数、Eは誤り数である。   Here, the fact that the readability of the method of the present embodiment is improved as compared with the conventional method will be quantitatively described using the correction cost. The relational expression of the correction cost in the Reed-Solomon method is shown in (1). In Equation (1), ECC is the correction cost, P is the number of error detections, FP is the number of error detection errors, and E is the number of errors.

ECC=P+FP+(E−P)×2 ・・・(1)
誤り検出数P、誤り誤検出数FP、誤り数Eを詳しく説明すると次の通りである。誤り検出数Pは、グレーフラグを設定したセルのうち実際に二値化が誤っていたセルを含むブロックの数である。誤り検出数FPは、グレーフラグを設定したが二値化は誤っていなかったセルを含むブロックの数である。誤り数Eは、二値化結果が誤っていたセルを含むブロック数である。また、式(1)の(E−P)は、二値化結果は誤っていたが、グレーフラグを設定できなかったセルを含むブロックの数を意味することになる。これについては、消失訂正を行なうことができない、つまり検出訂正を行なうので係数「2」を乗じている。
ECC = P + FP + (E−P) × 2 (1)
The error detection number P, error error detection number FP, and error number E will be described in detail as follows. The error detection number P is the number of blocks including cells that are actually erroneously binarized among the cells for which the gray flag is set. The error detection number FP is the number of blocks including cells for which a gray flag is set but binarization is not erroneous. The error number E is the number of blocks including cells in which the binarization result is incorrect. In addition, (E−P) in Expression (1) means the number of blocks including cells in which the binarization result was incorrect but the gray flag could not be set. About this, since erasure correction cannot be performed, that is, detection correction is performed, it is multiplied by a coefficient “2”.

グレーフラグを設定しない従来手法の場合、P=0、FP=0である。よって、訂正コストECCは2Eとなる。一方、本実施形態において、仮に全ての誤り位置を検出できた場合には、E=P、FP=0となる。この場合、訂正コストECCはEとなるので、従来手法の半分のコストで訂正ができることが分かる。   In the case of the conventional method in which no gray flag is set, P = 0 and FP = 0. Therefore, the correction cost ECC is 2E. On the other hand, in this embodiment, if all error positions can be detected, E = P and FP = 0. In this case, since the correction cost ECC is E, it can be seen that correction can be performed at half the cost of the conventional method.

図7は、サンプル画像10枚での本実施形態と従来手法との比較結果を示す図であり、図7(A)は誤り総数を比較したグラフであり、図7(B)は訂正コストを比較したグラフである。   FIG. 7 is a diagram showing a comparison result between the present embodiment and the conventional method with 10 sample images, FIG. 7A is a graph comparing the total number of errors, and FIG. 7B shows the correction cost. It is the graph compared.

図7(A)に示すように、本実施形態では、実際には誤っていないものについてまでグレーフラグを設定してしまう可能性があるので、誤り総数は実際の誤り数Eよりも増加する。しかし、図7(B)に示すように、訂正コストは従来よりも低下している。この図7の結果からも、本実施形態の手法は従来手法よりも読み取り可能性が向上していることが分かる。   As shown in FIG. 7A, in the present embodiment, there is a possibility that the gray flag is set even for those that are not actually in error, so the total number of errors increases from the actual number of errors E. However, as shown in FIG. 7B, the correction cost is lower than the conventional one. From the results of FIG. 7, it can be seen that the method of this embodiment has improved readability compared to the conventional method.

以上、説明した本実施形態によれば、検出訂正が失敗した場合に、検出訂正よりも訂正能力の高い消失訂正を実行できるようにするため、二値化結果の信頼性が低いセルに対してグレーフラグを設定している。具体的には、輝度が閾値thに対して±αである場合には、そのセルにグレーフラグを設定している(図5のS23)。そして、検出訂正処理(図4:S14)が失敗した場合には(図4:S15がNO)、グレーフラグを含んでいるコードワードを誤り位置に設定し(図4:S16)、消失訂正を行う(図4:S17)。消失訂正は、検出訂正よりも2倍の訂正能力である。よって、本実施形態によれば、検出訂正に失敗したとしても訂正ができる可能性があるので、読み取りに失敗する場合が少なくなる。   As described above, according to the present embodiment described above, when detection correction fails, in order to perform erasure correction with higher correction capability than detection correction, for a cell with low reliability of the binarization result The gray flag is set. Specifically, when the luminance is ± α with respect to the threshold th, a gray flag is set for the cell (S23 in FIG. 5). If the detection correction process (FIG. 4: S14) fails (FIG. 4: S15 is NO), the code word including the gray flag is set to the error position (FIG. 4: S16), and the erasure correction is performed. Perform (FIG. 4: S17). The erasure correction is twice the correction capability than the detection correction. Therefore, according to the present embodiment, there is a possibility that the correction can be performed even if the detection / correction is unsuccessful.

(第2実施形態)
次に、第2実施形態を説明する。第2実施形態は、第1実施形態とグレー設定処理において相違する。図8は、第2実施形態において実行するグレー設定処理である。この第2実施形態では、二種類の互いに異なる二値化処理を行い、それぞれの二値化処理において仮グレーフラグを設定する。そして、それら二種類の二値化処理の結果を用いて、セルの明暗の決定およびグレースコアの設定を行う。なお、グレースコアの意味は後述する。
(Second Embodiment)
Next, a second embodiment will be described. The second embodiment differs from the first embodiment in gray setting processing. FIG. 8 shows gray setting processing executed in the second embodiment. In the second embodiment, two kinds of different binarization processes are performed, and a temporary gray flag is set in each binarization process. Then, using the results of these two types of binarization processing, determination of the brightness of the cell and setting of the gray score are performed. The meaning of the gray score will be described later.

まず、ステップS31では第1二値化処理を行う。第2実施形態におけるこの第1二値化処理は大局的視点で各セルの二値化を行うものである。このステップS31の処理が特許請求の範囲の大局的二値化手段に相当する。   First, in step S31, a first binarization process is performed. The first binarization process in the second embodiment performs binarization of each cell from a global viewpoint. The processing in step S31 corresponds to the global binarization means in the claims.

ステップS31の具体的処理内容は、撮像画像の二次元コードの部分を複数の部分領域に分割し、部分領域毎に第1閾値th1を設定し、その設定した第1閾値th1と部分領域に含まれるセルの輝度を比較する処理である。部分領域の大きさは、後述する第2二値化処理(局所的二値化処理)における閾値設定のための輝度範囲よりも広い範囲に設定される。たとえば、二次元コードを3×3の9つに分割し、各分割領域を部分領域とする。部分領域における第1閾値th1は第1実施形態と同じ手法で決定する。この決定した第1閾値th1と各セルの中心座標の輝度とを比較する。   The specific processing content of step S31 divides the two-dimensional code portion of the captured image into a plurality of partial areas, sets a first threshold th1 for each partial area, and includes the set first threshold th1 and the partial area. This is a process of comparing the brightness of cells to be compared. The size of the partial region is set to a range wider than a luminance range for setting a threshold value in a second binarization process (local binarization process) described later. For example, a two-dimensional code is divided into nine 3 × 3, and each divided area is set as a partial area. The first threshold th1 in the partial area is determined by the same method as in the first embodiment. The determined first threshold th1 is compared with the luminance of the center coordinates of each cell.

続くステップS32では、上記比較の結果、セル中心座標の輝度が第1閾値th1から±α以内であるか否かを判断する。なお、このαは予め設定しておくが、第1実施形態と同じ値である必要はない。   In subsequent step S32, as a result of the comparison, it is determined whether or not the luminance of the cell center coordinates is within ± α from the first threshold th1. Note that α is set in advance, but need not be the same value as in the first embodiment.

ステップS32の判断が肯定判断であった場合にはステップS33へ進み、そのセルに対して仮グレーフラグ1を格納(設定)する。その後、ステップS34へ進む。一方、ステップS32が否定判断であった場合、すなわち、セル中心座標の輝度が第1閾値th1から±α以上離れていた場合には、ステップS33を介さずに直接、ステップS34へ進む。ステップS34では、ステップS31での比較結果に基づいてセルの明暗を格納する。ここで格納したセルの明暗をセル明暗1とする。   If the determination in step S32 is affirmative, the process proceeds to step S33, and the temporary gray flag 1 is stored (set) for the cell. Thereafter, the process proceeds to step S34. On the other hand, if the determination in step S32 is negative, that is, if the luminance of the cell center coordinates is more than ± α from the first threshold th1, the process proceeds directly to step S34 without going through step S33. In step S34, the brightness of the cell is stored based on the comparison result in step S31. The brightness of the cell stored here is defined as cell brightness 1.

ステップS35では第2二値化処理を行う。第2二値化処理は局所的視点で各セルの二値化を行うものである。このステップS35の処理が特許請求の範囲の局所的二値化手段に相当する。   In step S35, a second binarization process is performed. The second binarization process binarizes each cell from a local viewpoint. The processing in step S35 corresponds to the local binarization means in the claims.

ステップS35の具体的処理内容は、各セルの周囲に存在する周辺セルの輝度変化から閾値(第2閾値th2)を設定し、その設定した第2閾値th2と当該セルの輝度を比較する。図10は周辺セルを例示する図であり、丸印のセルの明暗を設定する場合に、そのセルを取り囲む8セルの輝度、および、そのセルの上下左右方向については、該当セルの2つ隣りのセルも含めている。よって合計12セルを周辺セルとしており、12セルの輝度に基づいて、その中心にあるセルの閾値(第2閾値th2)を決定する。この決定した第2閾値th2と、各セルの中心座標の輝度とを比較する。   The specific processing content of step S35 sets a threshold value (second threshold value th2) from the luminance change of surrounding cells existing around each cell, and compares the set second threshold value th2 with the luminance of the cell. FIG. 10 is a diagram illustrating neighboring cells. When setting the brightness of a circle-shaped cell, the brightness of eight cells surrounding the cell and the vertical and horizontal directions of the cell are two adjacent to the corresponding cell. This cell is also included. Therefore, a total of 12 cells are used as peripheral cells, and the threshold value (second threshold th2) of the cell at the center is determined based on the luminance of the 12 cells. The determined second threshold th2 is compared with the luminance of the center coordinates of each cell.

続くステップS36では、ステップS35での比較の結果、セル中心座標の輝度が第2閾値th2から±β以内であるか否かを判断する。なお、このβも予め設定しておく。βの値はαと同じであってもよいし、異なっていてもよい。   In the subsequent step S36, it is determined whether or not the luminance of the cell center coordinates is within ± β from the second threshold th2 as a result of the comparison in step S35. This β is also set in advance. The value of β may be the same as or different from α.

ステップS36の判断が肯定判断であった場合にはステップS37へ進み、そのセルに対して仮グレーフラグ2を格納(設定)する。その後、ステップS38へ進む。一方、ステップS36が否定判断であった場合、すなわち、セル中心座標の輝度が第2閾値th2から±β以上離れていた場合には、ステップS37を介さずに直接、ステップS38へ進む。ステップS38では、ステップS35での比較結果に基づいてセルの明暗を格納する。ここで格納したセルの明暗をセル明暗2とする。   If the determination in step S36 is affirmative, the process proceeds to step S37, and the provisional gray flag 2 is stored (set) for the cell. Thereafter, the process proceeds to step S38. On the other hand, if the determination in step S36 is negative, that is, if the luminance of the cell center coordinates is more than ± β from the second threshold th2, the process proceeds directly to step S38 without going through step S37. In step S38, the brightness of the cell is stored based on the comparison result in step S35. The brightness of the cell stored here is defined as cell brightness 2.

ステップS39では、ステップS34で設定したセル明暗1とステップS38で設定したセル明暗2を比較する。また、ステップS33で設定した仮グレーフラグ1とステップS37で設定した仮グレーフラグ2も比較する。これ以降の処理は図9に示す。   In step S39, the cell contrast 1 set in step S34 and the cell contrast 2 set in step S38 are compared. Also, the temporary gray flag 1 set in step S33 and the temporary gray flag 2 set in step S37 are compared. The subsequent processing is shown in FIG.

ステップS40では、ステップS39の結果を用い、グレーフラグ1、2のいずれか一方でも設定されているか否かを判断する。この判断が肯定判断であればステップS42へ進む。一方、グレーフラグ1もグレーフラグ2も設定されていない場合にはステップS41へ進む。   In step S40, using the result of step S39, it is determined whether either one of the gray flags 1 and 2 is set. If this determination is affirmative, the process proceeds to step S42. On the other hand, if neither the gray flag 1 nor the gray flag 2 is set, the process proceeds to step S41.

ステップS41では、ステップS39の比較の結果、セル明暗1とセル明暗2とが不一致か否かを判断する。不一致である場合にもステップS42へ進む。一方、セル明暗1とセル明暗2とが一致していればステップS43へ直接進む。   In step S41, it is determined as a result of the comparison in step S39 whether cell brightness 1 and cell brightness 2 are inconsistent. Even if they do not match, the process proceeds to step S42. On the other hand, if cell brightness 1 and cell brightness 2 match, the process proceeds directly to step S43.

ステップS42ではグレースコアを設定する。ここで、このステップS42を実行するのは、ステップS40が肯定判断の場合、または、ステップS41が肯定判断の場合である。すなわち、いずれか一方の二値化処理においてグレーフラグが設定された場合、あるいは、2種類の二値化処理における二値化結果(明暗)が異なっていた場合のいずれかである。   In step S42, a gray score is set. Here, step S42 is executed when step S40 is affirmative or when step S41 is affirmative. That is, either when the gray flag is set in one of the binarization processes, or when the binarization results (brightness and darkness) in the two types of binarization processes are different.

グレースコアは、閾値thからのずれが小さいほど大きい値に設定する。閾値thからのずれが小さいほど二値化結果の信頼性は低い。よって、グレースコアが大きいほど、二値化結果の信頼性が低いことになる。   The gray score is set to a larger value as the deviation from the threshold th is smaller. The smaller the deviation from the threshold th, the lower the reliability of the binarization result. Therefore, the greater the gray score, the lower the reliability of the binarization result.

なお、本実施形態では、第1閾値th1と第2閾値th2の2つの閾値を設定している。このうちのどちらか一方の予め定めてある側の閾値thと、その閾値thに対応する二値化処理手法における各セルの輝度との差に基づいてグレースコアを決定する。また、2種類の二値化手法のうち、閾値と各セルの輝度の差が大きいほうを用いて、グレースコアを決定してもよい。また、両方の二値化手法における閾値と各セルの輝度との差を平均した値に基づいてグレースコアを決定してもよい。   In the present embodiment, two threshold values, the first threshold value th1 and the second threshold value th2, are set. The gray score is determined based on the difference between the threshold th on one of these predetermined thresholds and the luminance of each cell in the binarization processing method corresponding to the threshold th. Moreover, you may determine a gray score using the one with the larger difference of the brightness | luminance of a threshold value and each cell among two types of binarization methods. Alternatively, the gray score may be determined based on a value obtained by averaging the difference between the threshold value and the luminance of each cell in both binarization methods.

ステップS43では、最終的なセル明暗を格納する。この第2実施形態では、第1二値化処理および第2二値化処理の二種類の二値化処理を行なっているが、このステップS43において、二値化結果を統合するのである。二種類の二値化結果が一致していれば、その二値化結果が示しているセル明暗を格納する。不一致の場合には、予め設定された側のセル明暗を、最終的なセル明暗として格納する。   In step S43, the final cell brightness is stored. In the second embodiment, two types of binarization processing, ie, first binarization processing and second binarization processing, are performed. In step S43, the binarization results are integrated. If the two types of binarization results match, the cell contrast indicated by the binarization result is stored. If they do not match, the cell brightness on the preset side is stored as the final cell brightness.

ステップS44では、グレースコアのソートを行なう。その後、グレースコアを設定したセルに対して、ステップS45、S46を実行する。ステップS45では、グレーフラグを設定したセルを含むブロックの数が消失訂正規定数に到達したか否かを判断する。この消失訂正規定数は、誤り訂正コードワードの数を超えない範囲で予め設定されている。消失訂正においては、最大で、誤り訂正コードワードの数の訂正が可能である。従って、上記消失訂正規定数は誤り訂正コードワードの数を超えない範囲で設定される。また、上記消失訂正規定数を誤り訂正コードワードの数、すなわち最大数としてしまうと、グレースコアが設定されなかったが、二値化結果が誤っていたセルの訂正ができない。そこで、上記消失訂正規定数は、誤り訂正コードワードの数を超えない範囲で、適宜の値が設定される。   In step S44, the gray scores are sorted. Then, Steps S45 and S46 are executed for the cell for which the gray score is set. In step S45, it is determined whether or not the number of blocks including cells for which the gray flag is set has reached the erasure correction prescribed number. This specified number of erasure corrections is preset in a range not exceeding the number of error correction codewords. In erasure correction, the maximum number of error correction codewords can be corrected. Therefore, the specified number of erasure corrections is set in a range not exceeding the number of error correction codewords. Further, if the prescribed number of erasure corrections is set to the number of error correction codewords, that is, the maximum number, the gray score is not set, but the cell in which the binarization result is incorrect cannot be corrected. Therefore, the erasure correction prescribed number is set to an appropriate value within a range not exceeding the number of error correction codewords.

ステップS45の判断が否定判断であればステップS46へ進む。ステップS46では、グレーフラグ未設定セルのうち、最もグレースコアが高いセルにグレーフラグを設定する。このステップS46を実行後は、ステップS45へ戻り、前述の判断を再度行なう。これにより、グレースコアの高い順に、グレーフラグを設定したセルを含むブロックの数が消失訂正規定数に到達するまでグレーフラグが設定される。そして、消失訂正規定数に到達した場合には、図8、9のグレー設定処理を終了する。また、消失訂正規定数に到達しなくても、グレースコアを設定したセル全てにグレーフラグを設定した場合にもグレー設定処理を終了する。   If the determination in step S45 is negative, the process proceeds to step S46. In step S46, the gray flag is set to the cell with the highest gray score among the gray flag non-set cells. After executing step S46, the process returns to step S45, and the above-described determination is performed again. As a result, the gray flag is set in the descending order of the gray score until the number of blocks including the cells for which the gray flag is set reaches the erasure correction prescribed number. Then, when the erasure correction prescribed number is reached, the gray setting process of FIGS. Even if the erasure correction prescribed number is not reached, the gray setting process is also ended when the gray flag is set for all the cells for which the gray score is set.

グレー設定処理を終了した後は、第1実施形態と同様に、図4のステップS13以下を実行する。   After the gray setting process is completed, step S13 and subsequent steps in FIG. 4 are executed as in the first embodiment.

以上、説明した第2実施形態によれば、異なる2種類の二値化処理を行なっており(ステップS31、S35)、それぞれの二値化処理結果に基づいて仮グレーフラグ1、2を設定している(ステップS33、S37)。そして、それら2つの仮グレーフラグ1、2の設定有無に基づいて最終的なグレーフラグを設定している(ステップS46)。これにより、二値化結果が正しいものに対してグレーフラグを設定してしまうことを少なくでき、その結果、読み取りに失敗する場合がより減少する。   As described above, according to the second embodiment described above, two different types of binarization processing are performed (steps S31 and S35), and the temporary gray flags 1 and 2 are set based on the respective binarization processing results. (Steps S33 and S37). Then, the final gray flag is set based on whether or not these two provisional gray flags 1 and 2 are set (step S46). Thereby, it is possible to reduce the setting of the gray flag for the correct binarization result, and as a result, the number of cases in which reading fails is further reduced.

また、この第2実施形態では、上記2つの仮グレーフラグ1、2から最終的なグレーフラグを設定する際に、まず二値化結果の信頼性を示すグレースコアを設定しており、このグレースコアが高いセルから順にグレーフラグを設定している。そして、グレーフラグを設定したセルを含むブロック数が消失訂正規定数となった場合には、グレーフラグの設定を終了している。よって、消失訂正の能力を越えて消失訂正を行うことが抑制される。その結果、消失訂正が成功する可能性が高くなるので、読み取りの成功可能性が向上する。   In the second embodiment, when the final gray flag is set from the two provisional gray flags 1 and 2, a gray score indicating the reliability of the binarization result is set first. Gray flags are set in order from the cell with the highest score. Then, when the number of blocks including the cell for which the gray flag is set becomes the erasure correction prescribed number, the setting of the gray flag is finished. Therefore, it is possible to suppress erasure correction beyond the erasure correction capability. As a result, since the possibility of successful erasure correction increases, the possibility of successful reading is improved.

また、グレースコアが高いセルから順にグレーフラグを設定することで、二値化処理結果の信頼性が低いものについて消失訂正を行なうことができる。これによっても、読み取りの成功可能性が向上する。   In addition, by setting the gray flag in order from the cell with the highest gray score, it is possible to perform erasure correction for those with low reliability of the binarization processing result. This also increases the likelihood of successful reading.

(第3実施形態)
次に、第3実施形態を説明する。第3実施形態も、グレー設定処理において第1実施形態と相違する。第3実施形態では、隣接セル間の輝度勾配の程度、および、勾配の矛盾有無からグレーフラグを設定する。
(Third embodiment)
Next, a third embodiment will be described. The third embodiment is also different from the first embodiment in the gray setting process. In the third embodiment, the gray flag is set based on the degree of the luminance gradient between adjacent cells and the presence or absence of gradient inconsistency.

まず、隣接セル間の輝度勾配、および、勾配の矛盾について説明する。図11は、二次元コードの撮像画像の一部を拡大した図である。この図において、十字、実線、破線、(A)、(B)、(C)は説明のために付してある。十字はセル中心を示しており、十字間を結ぶ実線、破線は、輝度勾配を演算する箇所を示している。特に、実線には、(A)、(B)、(C)が付記してある。これら(A)、(B)、(C)の部分の輝度変化を図12に示す。   First, the luminance gradient between adjacent cells and the gradient contradiction will be described. FIG. 11 is an enlarged view of a part of the captured image of the two-dimensional code. In this figure, a cross, a solid line, a broken line, (A), (B), and (C) are added for explanation. A cross indicates the cell center, and a solid line and a broken line connecting the crosses indicate locations where the luminance gradient is calculated. In particular, (A), (B), and (C) are appended to the solid line. FIG. 12 shows changes in luminance in the portions (A), (B), and (C).

図12は、(A)、(B)、(C)とも、横軸は画像位置を示し縦軸が輝度を示す。また、図12(A)は暗セル間の輝度変化を示しており、図12(C)は暗セルと明セルとの間の輝度変化を示している。図12(B)の輝度勾配は、これらの中間的な勾配となっている。この図12(B)のような輝度勾配となる場合、この輝度勾配を示している2セルのうち、少なくとも一方は、撮像条件、汚れ等、何らかの理由により、そのセルの本来の明暗よりも明るく、或いは暗く撮像されていると言える。そこで、第3実施形態では、この図12(B)のような中間的な輝度勾配のセルに対してグレースコアを設定する。   In FIG. 12, in each of (A), (B), and (C), the horizontal axis represents the image position, and the vertical axis represents the luminance. FIG. 12A shows a change in luminance between dark cells, and FIG. 12C shows a change in luminance between dark cells and bright cells. The luminance gradient in FIG. 12B is an intermediate gradient between these. When the luminance gradient is as shown in FIG. 12B, at least one of the two cells indicating the luminance gradient is brighter than the original light and darkness of the cell for some reason such as imaging conditions and dirt. Or, it can be said that the image is captured darkly. Therefore, in the third embodiment, a gray score is set for a cell having an intermediate luminance gradient as shown in FIG.

また、第3実施形態では、輝度勾配の程度だけでなく、輝度勾配の矛盾も判定し、この判定結果から、グレーフラグを設定する。   In the third embodiment, not only the brightness gradient level but also the brightness gradient contradiction is determined, and the gray flag is set based on the determination result.

図13は、輝度勾配の矛盾なし、矛盾ありの一例を説明する図である。図13において、1、2、3、4の数字が示されている四角が1つのセルを示しており、また、図13右側の凡例で示すように、矢印は、ある程度の輝度勾配が存在することを示しており、矢印の基端が高輝度側、先端が低輝度側であることを示している。   FIG. 13 is a diagram for explaining an example where there is no contradiction in luminance gradient and there is a contradiction. In FIG. 13, squares with numbers 1, 2, 3, and 4 indicate one cell, and as shown in the legend on the right side of FIG. 13, the arrows have a certain luminance gradient. This indicates that the base end of the arrow is on the high brightness side and the tip is on the low brightness side.

図13において、(a)、(b)は輝度勾配に矛盾がない例、(c)、(d)は輝度勾配に矛盾がある例である。図13(a)では、セル2に対してセル1から矢印が入っている。このことからセル1が明セル、セル2が暗セルと推定できる。また、セル2には、セル4からも矢印が入っている。このことからセル4が明セル、セル2が暗セルと推定できる。2つの矢印からのセル2に対する推定結果は矛盾していない。   In FIG. 13, (a) and (b) are examples in which there is no contradiction in luminance gradient, and (c) and (d) are examples in which there is a contradiction in luminance gradient. In FIG. 13A, an arrow from cell 1 is entered for cell 2. From this, it can be estimated that cell 1 is a bright cell and cell 2 is a dark cell. Cell 2 also has an arrow from cell 4. From this, it can be estimated that the cell 4 is a bright cell and the cell 2 is a dark cell. The estimation results for cell 2 from the two arrows are consistent.

図13(b)では、セル2に対してセル1から矢印が入っている。また、セル4に対してセル3から矢印が入っている。これらのことからセル1、3が明セル、セル2、4が暗セルと推定できる。また、ともに明セルであるセル1、3の間、および、ともに暗セルであるセル2、4の間には矢印はない。この点でも矛盾はない。   In FIG. 13B, an arrow is entered from the cell 1 with respect to the cell 2. Further, an arrow from cell 3 is entered for cell 4. From these, it can be estimated that the cells 1 and 3 are bright cells and the cells 2 and 4 are dark cells. There are no arrows between the cells 1 and 3 that are both bright cells and between the cells 2 and 4 that are both dark cells. There is no contradiction in this respect.

一方、図13(c)では、セル2に対してセル1から矢印が入っている。このことからセル1が明セル、セル2が暗セルと推定できる。また、セル4に対してセル3から矢印が入っている。このことからセル3が明セル、セル4が暗セルと推定できる。このように、セル2、4はともに暗セルと推定できるにも関わらず、セル2からセル4へ矢印が入っている。よって、セル2、4間の矢印は矛盾である。   On the other hand, in FIG. From this, it can be estimated that cell 1 is a bright cell and cell 2 is a dark cell. Further, an arrow from cell 3 is entered for cell 4. From this, it can be estimated that the cell 3 is a bright cell and the cell 4 is a dark cell. Thus, although both cells 2 and 4 can be estimated as dark cells, an arrow is entered from cell 2 to cell 4. Therefore, the arrows between the cells 2 and 4 are contradictory.

また、図13(d)では、セル2に対してセル1から矢印が入っている。このことからセル1が明セル、セル2が暗セルと推定できる。また、セル3に対してセル4から矢印が入っている。このことから、セル4が明セル、セル3が暗セルであると推定できる。しかし、明セルであると推定できるセル1から暗セルであると推定できるセル3への矢印がない。よって、セル1、3は矛盾している。同様に、明セルであると推定できるセル4から暗セルであると推定できるセル2への矢印もない。よって、セル2、4も矛盾している。   In FIG. 13D, an arrow is entered from the cell 1 with respect to the cell 2. From this, it can be estimated that cell 1 is a bright cell and cell 2 is a dark cell. An arrow is entered from the cell 4 to the cell 3. From this, it can be estimated that the cell 4 is a bright cell and the cell 3 is a dark cell. However, there is no arrow from cell 1 that can be estimated to be a bright cell to cell 3 that can be estimated to be a dark cell. Thus, cells 1 and 3 are contradictory. Similarly, there is no arrow from cell 4 that can be estimated to be a bright cell to cell 2 that can be estimated to be a dark cell. Therefore, the cells 2 and 4 are also contradictory.

第3実施形態では、以上のような、隣接セル間の輝度勾配、勾配の矛盾有無からグレーフラグを設定する。図14は、第3実施形態において実行するグレー設定処理を示すフローチャートである。まず、ステップS51を各セルに対して実行する。ステップS51では、勾配情報を収集する。ここでの勾配とは、上下左右に隣接する4つの隣接セルとの間の勾配である。   In the third embodiment, the gray flag is set based on the luminance gradient between adjacent cells and the presence or absence of the gradient inconsistency as described above. FIG. 14 is a flowchart showing gray setting processing executed in the third embodiment. First, step S51 is executed for each cell. In step S51, gradient information is collected. The gradient here is a gradient between four adjacent cells that are adjacent vertically and horizontally.

続くステップS52では基準勾配を設定する。基準勾配は、隣接2セルがともに暗セルである場合、あるいは、隣接2セルがともに明セルである場合の勾配と、隣接2セルが明セルと暗セルである場合の勾配の中間的な勾配とする。基準勾配の決定には、二次元コードに存在する固定パターン(たとえば、QRコード(登録商標)であれば、ファインダパターン、アライメントパターンなど)を検出し、この固定パターンにおける明セルと暗セルとの間の勾配を利用する。固定パターンにおける明セルと暗セルの輝度勾配に所定係数(たとえば1/2)を乗じることで基準勾配を決定する。また、固定パターンに、隣接2セルが、ともに明セル、あるいは、ともに暗セルである場所があれば、それらの明−明セル、暗−暗セルの輝度勾配も用い、固定パターンにおける明セルと暗セルの輝度勾配との平均を、基準勾配としてもよい。   In subsequent step S52, a reference gradient is set. The reference gradient is an intermediate gradient between the gradient when both adjacent two cells are dark cells, or when both adjacent two cells are bright cells, and when the adjacent two cells are both bright and dark cells. And In determining the reference gradient, a fixed pattern (for example, a finder pattern or an alignment pattern in the case of a QR code (registered trademark)) is detected in the two-dimensional code, and a bright cell and a dark cell in the fixed pattern are detected. Use the slope between. The reference gradient is determined by multiplying the luminance gradient of the bright cell and the dark cell in the fixed pattern by a predetermined coefficient (for example, 1/2). Also, if there is a place where two adjacent cells are both bright cells or both dark cells in the fixed pattern, the brightness gradient of those bright-light cells and dark-dark cells is also used, An average with the brightness gradient of the dark cell may be used as the reference gradient.

続いてステップS53〜S55をセル毎に実行する。ステップS53では、ステップS51で収集した勾配情報、すなわち、上下左右の隣接セルとの勾配が、ステップS52で設定した基準勾配±γの以内であるか否かを判断する。上下左右の勾配のうちいずれか一つでも基準勾配±γ以内であればステップS53を肯定判断してステップS54へ進む。   Subsequently, steps S53 to S55 are executed for each cell. In step S53, it is determined whether or not the gradient information collected in step S51, that is, the gradient between the vertical and horizontal adjacent cells is within the reference gradient ± γ set in step S52. If any one of the vertical and horizontal gradients is within the reference gradient ± γ, an affirmative decision is made in step S53 and the operation proceeds to step S54.

ステップS54ではグレースコアを設定する。グレースコアの大きさは、第2実施形態と同様に、基準値(ここでは基準勾配)との差に基づいて設定し、その差が小さいほど、すなわち、基準勾配に近いほど高い値に設定する。   In step S54, a gray score is set. Similar to the second embodiment, the gray score is set based on a difference from a reference value (here, a reference gradient), and is set to a higher value as the difference is smaller, that is, closer to the reference gradient. .

ステップS54を実行後はステップS55へ進む。また、ステップS53が否定判断であった場合には、直接、ステップS55へ進む。ステップS55では、セルの明暗を格納する。セルの明暗は、ステップS51で収集した勾配情報とステップS52で設定した基準勾配との比較により行う。ステップS51で収集した勾配情報が基準勾配よりも高い場合であって、自セルの輝度が高い側であれば自セルは明セル、自セルの輝度が低い側であれば自セルは暗セルとする。また、ステップS51で収集した勾配情報が基準勾配よりも低い場合には、そのセルと隣接セルは、ともに暗セルあるいはともに明セルと言える。この場合には、自セルの輝度から明セルか暗セルかを決定する。このときは、明セル、暗セルの基準輝度を決定し、この決定した基準輝度と自セルの輝度を比較する。基準輝度は、基準勾配を設定したときに用いた固定パターンにおいて明暗を推定できるセルの輝度を用いる。また、全セルの輝度分布から、明セル、暗セルの標準的な輝度を決定し、この標準的な輝度を基準輝度としてもよい。   After executing step S54, the process proceeds to step S55. If step S53 is negative, the process proceeds directly to step S55. In step S55, the brightness of the cell is stored. The brightness of the cell is determined by comparing the gradient information collected in step S51 with the reference gradient set in step S52. If the gradient information collected in step S51 is higher than the reference gradient, the own cell is a bright cell if the luminance of the own cell is high, and the own cell is a dark cell if the luminance of the own cell is low. To do. If the gradient information collected in step S51 is lower than the reference gradient, it can be said that both the cell and the adjacent cell are dark cells or both bright cells. In this case, whether the cell is a bright cell or a dark cell is determined from the luminance of the own cell. At this time, the reference brightness of the bright cell and the dark cell is determined, and the determined reference brightness is compared with the brightness of the own cell. As the reference luminance, the luminance of a cell capable of estimating brightness and darkness in the fixed pattern used when the reference gradient is set is used. Further, the standard brightness of the bright cell and the dark cell may be determined from the brightness distribution of all the cells, and this standard brightness may be used as the reference brightness.

ステップS56では、図13を用いて例示した輝度勾配の矛盾判定を行う。より詳しくは、次の(1)、(2)の場合に矛盾ありと判定する。(1)は、ステップS55において互いに隣接するセルがともに暗セル或いはともに明セルであるとしたにも関わらず、それら隣接セル間の輝度勾配が基準勾配以上である場合である。(2)は、ステップS55において互いに隣接するセルの一方を暗セル、他方を明セルとしたにも関わらず、それら隣接セル間の輝度勾配が基準勾配以下である場合である。なお、セル明暗も輝度勾配を用いて設定しているが、セル明暗を決定する際の輝度勾配は、上下左右のいずれか一方向のみでよい。このステップS56での矛盾判定で用いる輝度勾配は、セル明暗決定に用いなかった方向の輝度勾配である。上記(1)、(2)のいずれかの場合に、隣接セルは矛盾ありとする。ステップS56を実行後は図15のステップS57へ進む。   In step S56, the brightness gradient inconsistency exemplified with reference to FIG. 13 is determined. More specifically, it is determined that there is a contradiction in the following cases (1) and (2). (1) is a case where the luminance gradient between the adjacent cells is equal to or higher than the reference gradient even though the cells adjacent to each other are both dark cells or bright cells in step S55. (2) is a case where the luminance gradient between the adjacent cells is equal to or less than the reference gradient even though one of the adjacent cells is a dark cell and the other is a bright cell in step S55. In addition, although the cell brightness is also set using the brightness gradient, the brightness gradient when determining the brightness of the cell may be only in one of the upper, lower, left, and right directions. The luminance gradient used in the contradiction determination in step S56 is a luminance gradient in a direction not used for the cell light / dark determination. In any of the cases (1) and (2), it is assumed that there is a contradiction between adjacent cells. After executing step S56, the process proceeds to step S57 in FIG.

ステップS57では、ステップ54で設定したグレースコアのソートを行なう。その後、グレースコアを設定したセルに対して、ステップS58、S59を実行する。ステップS58では、グレーフラグを設定したセルを含むブロックの数が消失訂正規定数に到達したか否かを判断する。この消失訂正規定数は、第2実施形態と同様、適宜設定される。   In step S57, the gray scores set in step 54 are sorted. Thereafter, Steps S58 and S59 are executed for the cell for which the gray score is set. In step S58, it is determined whether the number of blocks including cells for which the gray flag is set has reached the erasure correction prescribed number. The specified number of erasure corrections is set as appropriate as in the second embodiment.

ステップS58の判断が否定判断であればステップS59へ進む。ステップS59では、グレーフラグ未設定セルに対して、ステップS56で判定した矛盾有無と、ステップS54で設定したグレースコアに基づいてグレーフラグを設定する。詳しくは、まず、矛盾があると判定されたセルのうち、複数の方向において矛盾があると判定されたセルに対して、グレーフラグを設定する。ステップS56での矛盾判定では、自セルのセル明暗は誤っていなくても、自セルに隣接するセルの明暗が誤っている場合には、勾配に矛盾ありと判定される可能性がある。しかし、複数の方向において矛盾があると判定される場合には、隣接セルではなく、自セルの明暗決定が誤っている可能性が高い。そこで、まず、複数の方向において矛盾があると判定されたセルに対してグレーフラグを設定する。   If the determination in step S58 is negative, the process proceeds to step S59. In step S59, a gray flag is set for a cell in which the gray flag is not set based on the contradiction determined in step S56 and the gray score set in step S54. Specifically, first, a gray flag is set for a cell determined to have a contradiction in a plurality of directions among cells determined to have a contradiction. In the contradiction determination in step S56, even if the cell contrast of the own cell is not incorrect, there is a possibility that the gradient is determined to be inconsistent if the contrast of the cell adjacent to the own cell is incorrect. However, when it is determined that there is a contradiction in a plurality of directions, it is highly possible that the brightness determination of the own cell, not the neighboring cell, is incorrect. Therefore, first, a gray flag is set for a cell that is determined to have inconsistencies in a plurality of directions.

これによって消失規定数に到達しなかった場合には、グレースコアを設定したセルを対象としてグレーフラグを設定する。具体的には、グレースコアを設定したが、まだ、グレーフラグは設定していない残りのセルのうち、最もグレースコアが高いセルにグレーフラグを設定する。そして、グレースコアを設定した全てのセルに対してグレーフラグを設定しても、まだ消失訂正規定数に到達しなかった場合には、矛盾があると判定されたセルであって、一つの方向においてのみ矛盾があると判定されたセルにグレーフラグを設定する。なお、一つの方向においてのみ矛盾があると判定されたセルの全てにグレーフラグを設定することができない場合には、基準勾配からの差が小さいセルから順にグレーフラグを設定する。   As a result, when the specified number of disappearances is not reached, a gray flag is set for a cell for which a gray score is set. Specifically, the gray flag is set in the cell having the highest gray score among the remaining cells in which the gray score is set but the gray flag is not yet set. Then, even if the gray flag is set for all the cells for which the gray score is set, if the erasure correction prescribed number is not yet reached, the cell is determined to have a contradiction, and is in one direction. A gray flag is set for cells that are determined to be inconsistent only in. If the gray flag cannot be set for all the cells determined to have inconsistency only in one direction, the gray flag is set in order from the cell having the smallest difference from the reference gradient.

ステップS58において消失訂正規定数に到達したと判断した場合には、図14、15のグレー設定処理を終了する。また、消失訂正規定数に到達しなくても、グレースコアを設定したセル全てにグレーフラグを設定した場合にもグレー設定処理を終了する。グレー設定処理を終了した後は、第1、2実施形態と同様に、図4のステップS13以下を実行する。   If it is determined in step S58 that the specified number of erasure corrections has been reached, the gray setting process of FIGS. Even if the erasure correction prescribed number is not reached, the gray setting process is also ended when the gray flag is set for all the cells for which the gray score is set. After the gray setting process is completed, step S13 and subsequent steps in FIG. 4 are executed as in the first and second embodiments.

以上、説明した第3実施形態によれば、隣接2セルの輝度勾配を用いて各セルの二値化を行なっている(S51、S52、S55)ので、セル中心に汚れがあっても正しく二値化を行うこともできる。   As described above, according to the third embodiment described above, binarization of each cell is performed using the luminance gradient of two adjacent cells (S51, S52, S55). It can also be valuated.

また、この第3実施形態では、輝度勾配の矛盾を判定しており(S56)、輝度勾配の矛盾判定結果も用いてグレーフラグを設定している。輝度勾配に矛盾がある場合には、セルの二値化結果が誤っている可能性が高いことから、輝度勾配の矛盾判定結果も用いてグレーフラグを設定することで、明暗の判断が誤っている可能性が高いセルに対してグレーフラグを設定することができる。よって、読み取り精度がより向上する。   In the third embodiment, the brightness gradient contradiction is determined (S56), and the gray flag is set using the brightness gradient conflict determination result. If there is a contradiction in the brightness gradient, it is highly possible that the binarization result of the cell is wrong. A gray flag can be set for a cell having a high possibility of being present. Therefore, the reading accuracy is further improved.

(第4実施形態)
次に、第4実施形態を説明する。第4実施形態では、撮像条件が互いに異なる複数の撮像画像(ここでは2枚として説明する)を用いて読み取りを行なう。異ならせる撮像条件は、たとえば、照明条件とする。また、複数のカメラにより同時に撮像してもよい。この場合、撮像方向が異なることになる。
(Fourth embodiment)
Next, a fourth embodiment will be described. In the fourth embodiment, reading is performed using a plurality of captured images having different imaging conditions (herein described as two images). The imaging conditions to be varied are, for example, illumination conditions. Moreover, you may image simultaneously with several cameras. In this case, the imaging direction is different.

図16は、第4実施形態において行なうコード読み取り処理を示すフローチャートである。この処理は、ユーザ操作により、コードを含む画像が2枚撮像されたことにより開始する。   FIG. 16 is a flowchart showing a code reading process performed in the fourth embodiment. This process starts when two images including a code are captured by a user operation.

まず、ステップS61では、読み取り処理1を実行する。この読み取り処理1は、2枚の撮像画像のうちの一方の画像を用いて行なう。処理の内容は、従来公知の種々のコード読み取り処理を用いることができる。   First, in step S61, the reading process 1 is executed. This reading process 1 is performed using one of the two captured images. As the content of the process, various conventionally known code reading processes can be used.

ステップS62では、ステップS61での読み取り処理1が成功したか否かを判断する。この判断が肯定判断であれば、図17のステップS75へ進み、読み取ったデータを出力する。一方、ステップS61が否定判断であればステップS63へ進む。   In step S62, it is determined whether or not the reading process 1 in step S61 is successful. If this determination is affirmative, the process proceeds to step S75 in FIG. 17 and the read data is output. On the other hand, if step S61 is negative, the process proceeds to step S63.

ステップS63では読み取り処理2を実行する。読み取り処理2では、2枚の撮像画像のうち、ステップS61で用いた画像とは違う側の画像を用いて行なう。処理の内容は、従来公知の種々のコード読み取り処理を用いることができ、また、ステップS61と同じでもよいし、異なっていてもよい。   In step S63, reading process 2 is executed. In the reading process 2, an image on the side different from the image used in step S61 is used out of the two captured images. The content of the process can use various conventionally known code reading processes, and may be the same as or different from step S61.

ステップS64では、ステップS63での読み取り処理2が成功したか否かを判断する。この判断が肯定判断であれば、図17のステップS75へ進み、読み取ったデータを出力する。一方、ステップS64が否定判断であればステップS65へ進む。   In step S64, it is determined whether or not the reading process 2 in step S63 is successful. If this determination is affirmative, the process proceeds to step S75 in FIG. 17 and the read data is output. On the other hand, if step S64 is negative, the process proceeds to step S65.

ステップS65では、マップ情報の有無を判断する。マップ情報とは、二次元コードにおける各セルの位置であり、読み取り処理1および読み取り処理2のいずれか一方でも、各セルの位置が決定できていない場合には、マップ情報なしと判断する。この場合にはステップS75へ進み、読み取り処理の結果として、読み取り失敗との結果を出力する。   In step S65, the presence / absence of map information is determined. The map information is the position of each cell in the two-dimensional code. If the position of each cell has not been determined in any one of the reading process 1 and the reading process 2, it is determined that there is no map information. In this case, the process proceeds to step S75, and the result of reading failure is output as the result of the reading process.

一方、読み取り処理1、2でともに各セルの位置が決定できている場合にはマップ情報ありと判断する。この場合にはステップS66へ進む。   On the other hand, if the position of each cell can be determined in both reading processes 1 and 2, it is determined that there is map information. In this case, the process proceeds to step S66.

ステップS66では、読み取り処理1、2のマップ情報の対応関係を決定する。すなわち、読み取り処理1における各セルが、読み取り処理2においてどのセルに対応するかを決定する。   In step S66, the correspondence relationship of the map information of the reading processes 1 and 2 is determined. That is, each cell in the reading process 1 is determined to correspond to which cell in the reading process 2.

続いて、ステップS67〜S70を各セルに対して実行する。まず、ステップS67では、読み取り処理1、2のセル明暗結果を比較する。ステップS68では、ステップS67の比較の結果、読み取り処理1、2のセル明暗結果が不一致か否かを判断する。不一致である場合にはステップS69へ進む。   Subsequently, steps S67 to S70 are executed for each cell. First, in step S67, the cell contrast results of the reading processes 1 and 2 are compared. In step S68, as a result of the comparison in step S67, it is determined whether or not the cell light / dark results of the reading processes 1 and 2 are inconsistent. If not, the process proceeds to step S69.

ステップS69ではグレースコアを設定する。グレースコアの決定方法は、たとえば、これまでに説明した実施形態と同じ方法で設定する。ステップS70では、最終的なセル明暗を格納する。ここで格納するセル明暗は、第2実施形態と同じ方法で決定する。すなわち、読み取り処理1、2の二値化結果が一致していれば、その二値化結果が示しているセル明暗を格納する。不一致の場合には、予め設定された側の読み取り処理におけるセル明暗を、最終的なセル明暗として格納する。   In step S69, a gray score is set. The gray score determination method is set, for example, in the same manner as in the embodiments described so far. In step S70, the final cell brightness is stored. The cell contrast stored here is determined by the same method as in the second embodiment. That is, if the binarization results of the reading processes 1 and 2 match, the cell brightness indicated by the binarization result is stored. In the case of mismatch, the cell brightness in the reading process on the preset side is stored as the final cell brightness.

ステップS71以降は図17に示す。ステップS71では、ステップ69で設定したグレースコアのソートを行なう。その後、グレースコアを設定したセルに対して、ステップS72、S73を実行する。ステップS72では、グレーフラグを設定したセルを含むブロックの数が消失訂正規定数に到達したか否かを判断する。この消失訂正規定数は、第2、3実施形態と同様、適宜設定される。   Steps S71 and thereafter are shown in FIG. In step S71, the gray scores set in step 69 are sorted. Thereafter, Steps S72 and S73 are executed for the cell for which the gray score is set. In step S72, it is determined whether or not the number of blocks including cells for which the gray flag is set has reached the erasure correction prescribed number. This erasure correction prescribed number is appropriately set as in the second and third embodiments.

ステップS73では、グレーフラグ未設定セルのうち、最もグレースコアが高いセルにグレーフラグを設定する。このステップS73を実行後は、ステップS72へ戻り、前述の判断を再度行なう。そして、消失訂正規定数に到達したと判断した場合には、ステップS74へ進む。   In step S73, the gray flag is set to the cell with the highest gray score among the gray flag non-set cells. After executing step S73, the process returns to step S72, and the above-described determination is performed again. If it is determined that the erasure correction prescribed number has been reached, the process proceeds to step S74.

ステップS74では、グレーフラグを格納したセルを含んでいるコードワードの位置を誤り位置として設定して消失訂正を行う。その後は、ステップS75へ進む。ステップS74の消失訂正が成功した場合には、ステップS75において、読み取り成功との結果、および、読み取ったデータを出力する。一方、消失訂正を実行しても、読み取りができなかった場合には、読み取りが失敗したことを出力する。   In step S74, the position of the code word including the cell storing the gray flag is set as an error position, and erasure correction is performed. Thereafter, the process proceeds to step S75. If the erasure correction in step S74 is successful, the result of successful reading and the read data are output in step S75. On the other hand, if the reading cannot be performed even after the erasure correction, the fact that the reading has failed is output.

以上、説明した第4実施形態によれば、読み取り処理1、2の2回の読み取り処理を実行しており、これら2回の読み取り処理におけるセル明暗結果が不一致であるセルに対してグレーフラグを設定している。これにより、明暗決定の信頼性が低いセルに対して精度よくグレーフラグを設定することができる。その結果、明暗決定が間違っている可能性が高いセルを含むブロックが優先的に消失訂正されることになることから、明暗の誤りを訂正できる可能性が向上する。よって、読み取りの成功可能性がより向上する。   As described above, according to the fourth embodiment described above, two reading processes of reading processes 1 and 2 are executed, and a gray flag is set for a cell in which the cell brightness results in these two reading processes do not match. It is set. As a result, the gray flag can be accurately set for a cell having low light / dark determination reliability. As a result, erasure correction is performed on a block including cells that are likely to be wrong in light / dark determination, so that the possibility of correcting light / dark errors is improved. Therefore, the possibility of successful reading is further improved.

以上、本発明の実施形態を説明したが、本発明は上述の実施形態に限定されるものではなく、次の実施形態も本発明の技術的範囲に含まれ、さらに、下記以外にも要旨を逸脱しない範囲内で種々変更して実施することができる。   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.

たとえば、前述の第3実施形態では、隣接セル間の輝度勾配、および、輝度勾配の矛盾有無からグレーフラグを設定していたが、いずれか一方のみからグレーフラグを設定してもよい。   For example, in the above-described third embodiment, the gray flag is set based on the luminance gradient between adjacent cells and the presence or absence of the luminance gradient contradiction, but the gray flag may be set only from either one.

また、マージンαを固定値とするのではなく、誤り訂正能力に応じて定まるようにしておいてもよい。誤り訂正能力は、たとえば、ユーザが入力する。また、コードのフォーマット情報から誤り訂正能力を読み取ってもよい。   Further, the margin α may be determined according to the error correction capability instead of a fixed value. The error correction capability is input by the user, for example. Further, the error correction capability may be read from the code format information.

10:二次元コード読み取り装置、 20:回路部、 21:発光ダイオード、 23:エリアセンサ、 27:結像レンズ、 31:増幅回路、 33:A/D変換回路、 35:メモリ、 36:アドレス発生回路、 38:同期信号発生回路、 40:制御回路、 41:電源スイッチ、 42:操作スイッチ、 43:LED、 44:ブザー、 46:液晶表示器、 48:通信インタフェース、 49:電池、 60:マーカ光投射器、 S12:グレー設定手段、 S14:検出訂正手段、 S17:消失訂正手段、 S31:大局的二値化手段、 S35:局所的二値化手段、 S42、S54、S69:スコア設定手段 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, S12: Gray setting means, S14: Detection correction means, S17: Disappearance correction means, S31: Global binarization means, S35: Local binarization means, S42, S54, S69: Score setting means

Claims (8)

複数のセルによりデータブロックと誤り訂正符号ブロックとが複数形成されている二次元コードから情報を読み取るために、その二次元コードを含む画像を撮像し、撮像した画像における各セルの色を二値化して読み取りを行なう二次元コード読み取り装置であって、
撮像した画像における二次元コードの各セルを明セルおよび暗セルのいずれかに決定する二値化手段と、
前記二値化手段による二値化結果の信頼性が低いセルに対してグレーフラグを設定するグレー設定手段と、
前記誤り訂正符号ブロックのコードを用いて検出訂正を行う検出訂正手段と、
前記検出訂正手段で訂正に失敗した場合、グレーフラグが設定されているセルを含むデータブロックを誤り位置に指定して消失訂正を行う消失訂正手段と
を含むことを特徴とする二次元コード読み取り装置。
In order to read information from a two-dimensional code in which a plurality of data blocks and error correction code blocks are formed by a plurality of cells, an image including the two-dimensional code is captured, and the color of each cell in the captured image is binary. A two-dimensional code reading device that reads and converts
Binarization means for determining each cell of the two-dimensional code in the captured image as either a bright cell or a dark cell;
A gray setting unit that sets a gray flag for a cell having low reliability of a binarization result by the binarization unit;
Detection and correction means for performing detection and correction using a code of the error correction code block;
A two-dimensional code reader comprising: a erasure correction unit that performs erasure correction by designating a data block including a cell in which a gray flag is set as an error position when correction by the detection and correction unit fails .
請求項1において、
前記二値化手段は、互いに異なる2種類の二値化処理により各セルが明セルであるか暗セルであるかを仮決定し、それら2つの二値化処理による二値化結果に基づいて各セルが明セルであるか暗セルであるかを最終決定するようになっており、
前記グレー設定手段は、前記2種類の二値化処理のうちの一方の二値化結果の信頼性が低いセルに対して仮グレーフラグを設定するとともに、他方の二値化結果の信頼性が低いセルに対しても仮グレーフラグを設定し、それら2つの仮グレーフラグの設定有無に基づいて、最終的なグレーフラグを設定することを特徴とする二次元コード読み取り装置。
In claim 1,
The binarization means tentatively determines whether each cell is a bright cell or a dark cell by two different types of binarization processing, and based on the binarization result of the two binarization processing The final decision is whether each cell is a light cell or a dark cell,
The gray setting unit sets a provisional gray flag for a cell having low reliability of one of the two types of binarization processing and the reliability of the other binarization result. A two-dimensional code reading apparatus, wherein a temporary gray flag is set even for a low cell, and a final gray flag is set based on whether or not these two temporary gray flags are set.
請求項1において、
前記二値化手段は、各セルの輝度と、セルの明暗決定のための閾値とを比較することで、各セルが明セルであるか暗セルであるかを決定するようになっており、
前記グレー設定手段は、各セルの輝度と前記閾値との差が予め設定された範囲である場合には、そのセルに対してグレーフラグを設定することを特徴とする二次元コード読み取り装置。
In claim 1,
The binarization means determines whether each cell is a bright cell or a dark cell by comparing the brightness of each cell with a threshold value for determining the brightness of the cell,
2. The two-dimensional code reading device according to claim 1, wherein the gray setting means sets a gray flag for a cell when the difference between the luminance of each cell and the threshold is within a preset range.
請求項2において、
前記二値化手段は、
各セルの周囲に存在する周辺セルの輝度変化に基づいて閾値を設定し、その設定した閾値と当該セルの輝度の比較に基づいて、各セルが明セルであるか暗セルであるかを決定する局所的二値化手段と、
前記局所的二値化手段における閾値設定のための輝度範囲よりも広い範囲に設定された部分領域毎に閾値を設定し、その設定した閾値と当該部分領域に含まれるセルの輝度の比較に基づいて、各セルが明セルであるか暗セルであるかを決定する大局的二値化手段と
を含むことを特徴とする二次元コード読み取り装置。
In claim 2,
The binarization means includes
A threshold value is set based on a change in luminance of surrounding cells around each cell, and whether each cell is a bright cell or a dark cell is determined based on a comparison between the set threshold value and the luminance of the cell. Local binarization means to
A threshold is set for each partial region set in a range wider than the luminance range for threshold setting in the local binarization means, and based on a comparison between the set threshold and the luminance of cells included in the partial region And a global binarization means for determining whether each cell is a bright cell or a dark cell.
請求項1において、
前記二値化手段は、明セルと暗セルとの間の輝度勾配と同色セル間の輝度勾配との中間的な勾配に基準勾配を設定し、各セルに対して、隣接セルとの間の輝度勾配が前記基準勾配よりも急であるか否か、および、その隣接セルよりも高輝度か否かに基づいて、各セルの明暗を決定するものであり、
前記グレー設定手段は、互いに隣接するセル間の輝度勾配が、前記基準勾配に対して予め設定された範囲であるか否かに基づいて、それら2つのセルに対して、グレーフラグを設定するか否かを決定することを特徴とする二次元コード読み取り装置。
In claim 1,
The binarization unit sets a reference gradient to an intermediate gradient between a luminance gradient between a light cell and a dark cell and a luminance gradient between cells of the same color, and for each cell, between the adjacent cells. Determining the brightness of each cell based on whether the brightness gradient is steeper than the reference gradient and whether it is brighter than its neighboring cells;
Whether the gray setting means sets a gray flag for these two cells based on whether or not the luminance gradient between adjacent cells is within a preset range with respect to the reference gradient. A two-dimensional code reader characterized by determining whether or not.
請求項5において、
前記グレー設定手段は、前記二値化手段により、互いに隣接するセルがともに暗セル、あるいはともに明セルに設定されたにも関わらず、それら隣接セル間の輝度勾配が前記基準勾配以上である場合、および、前記二値化手段により互いに隣接するセルの一方が暗セル、他方が明セルに設定されたにも関わらず、その暗セルと明セルとの間の輝度勾配が前記基準勾配以下である場合のいずれかである場合には、それら互いに隣接するセルに対してグレーフラグを設定することを特徴とする二次元コード読み取り装置。
In claim 5,
The gray setting means, when the binarization means sets both adjacent cells as dark cells or both as bright cells, but the luminance gradient between the adjacent cells is equal to or higher than the reference gradient. Even though one of the cells adjacent to each other is set as a dark cell and the other as a bright cell by the binarization means, the luminance gradient between the dark cell and the bright cell is less than the reference gradient. In any case, a two-dimensional code reading apparatus is characterized in that a gray flag is set for cells adjacent to each other.
請求項1において、
前記二値化手段は、前記二次元コードを異なる条件で撮像した複数の画像を用い、画像毎に二次元コードの各セルが明セルであるか暗セルであるかを仮決定し、それら2つの画像からの仮決定結果に基づいて各セルが明セルであるか暗セルであるかを最終決定するようになっており、
前記グレー設定手段は、前記2つの画像の二値化結果が不一致であるセルに対してグレーフラグを設定することを特徴とする二次元コード読み取り装置。
In claim 1,
The binarization means uses a plurality of images obtained by capturing the two-dimensional code under different conditions, provisionally determines whether each cell of the two-dimensional code is a bright cell or a dark cell for each image, and 2 Based on the tentative decision result from one image, each cell is finally decided whether it is a light cell or a dark cell,
The two-dimensional code reading device, wherein the gray setting means sets a gray flag for a cell in which the binarization results of the two images do not match.
請求項1〜7のいずれか1項において、
前記二値化手段による二値化結果の信頼の程度に基づいてグレースコアを設定するスコア設定手段を備え、
前記グレー設定手段は、グレーフラグが設定されたセルを含むブロックの数が予め設定した消失訂正規定数を超えない範囲で、二値化結果の信頼の程度が低いことを示している側のグレースコアのセルから順に、グレーフラグを設定することを特徴とする二次元コード読み取り装置。
In any one of Claims 1-7,
Score setting means for setting a gray score based on the degree of confidence of the binarization result by the binarization means,
The gray setting means has a gray level on the side indicating that the degree of reliability of the binarization result is low in a range in which the number of blocks including cells with the gray flag set does not exceed a preset erasure correction prescribed number. A two-dimensional code reading device, wherein a gray flag is set in order from a score cell.
JP2012007429A 2012-01-17 2012-01-17 Two-dimensional code reader Active JP5825110B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012007429A JP5825110B2 (en) 2012-01-17 2012-01-17 Two-dimensional code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012007429A JP5825110B2 (en) 2012-01-17 2012-01-17 Two-dimensional code reader

Publications (2)

Publication Number Publication Date
JP2013148981A true JP2013148981A (en) 2013-08-01
JP5825110B2 JP5825110B2 (en) 2015-12-02

Family

ID=49046444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012007429A Active JP5825110B2 (en) 2012-01-17 2012-01-17 Two-dimensional code reader

Country Status (1)

Country Link
JP (1) JP5825110B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021119465A (en) * 2016-01-26 2021-08-12 ハンド ヘルド プロダクツ インコーポレーティッド Enhanced matrix symbol error correction method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10111904A (en) * 1996-10-04 1998-04-28 Matsushita Electric Ind Co Ltd Bar code reader and recording medium
JP2000148904A (en) * 1998-08-31 2000-05-30 Sony Corp Two-dimensional code recognition processing method, two- dimensional code recognition processor and two- dimensional code recognition processing program storage medium
JP2001005906A (en) * 1999-06-22 2001-01-12 Olympus Optical Co Ltd Code image reader
JP2001167222A (en) * 1999-09-29 2001-06-22 Denso Corp Error correcting method, method and device for reading two-dimensional code and recording medium
JP2008083843A (en) * 2006-09-26 2008-04-10 Casio Comput Co Ltd Code reader and program
JP2010257225A (en) * 2009-04-24 2010-11-11 Denso Wave Inc Two-dimensional code reading system
JP2011134211A (en) * 2009-12-25 2011-07-07 Denso Wave Inc Information code and method for generating information code

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10111904A (en) * 1996-10-04 1998-04-28 Matsushita Electric Ind Co Ltd Bar code reader and recording medium
JP2000148904A (en) * 1998-08-31 2000-05-30 Sony Corp Two-dimensional code recognition processing method, two- dimensional code recognition processor and two- dimensional code recognition processing program storage medium
JP2001005906A (en) * 1999-06-22 2001-01-12 Olympus Optical Co Ltd Code image reader
JP2001167222A (en) * 1999-09-29 2001-06-22 Denso Corp Error correcting method, method and device for reading two-dimensional code and recording medium
JP2008083843A (en) * 2006-09-26 2008-04-10 Casio Comput Co Ltd Code reader and program
JP2010257225A (en) * 2009-04-24 2010-11-11 Denso Wave Inc Two-dimensional code reading system
JP2011134211A (en) * 2009-12-25 2011-07-07 Denso Wave Inc Information code and method for generating information code

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021119465A (en) * 2016-01-26 2021-08-12 ハンド ヘルド プロダクツ インコーポレーティッド Enhanced matrix symbol error correction method
US11449700B2 (en) 2016-01-26 2022-09-20 Hand Held Products, Inc. Enhanced matrix symbol error correction method
JP7263423B2 (en) 2016-01-26 2023-04-24 ハンド ヘルド プロダクツ インコーポレーティッド Improved matrix symbol error fix
US11727232B2 (en) 2016-01-26 2023-08-15 Hand Held Products, Inc. Enhanced matrix symbol error correction method

Also Published As

Publication number Publication date
JP5825110B2 (en) 2015-12-02

Similar Documents

Publication Publication Date Title
TWI528293B (en) QR code
JP2004234318A (en) Two-dimension information code, and display method, generation method and reading method thereof
US7826679B2 (en) Image reading apparatus
TW201432576A (en) Two-dimensional code, system for creation of two-dimensional code, and analysis program
JP2011227636A (en) Character string recognition apparatus and character string recognition method
TWI501159B (en) QR code
JP2010027034A (en) Authentication apparatus, image sensing apparatus, authentication method and program therefor
US8718370B2 (en) Optical information-reading apparatus and optical information-reading method
JP2014085777A (en) Two-dimensional code, method of generating two-dimensional code, and method of reading two-dimensional code
JP5825110B2 (en) Two-dimensional code reader
JP5913506B2 (en) Color correction apparatus and method
JP6069835B2 (en) Image processing apparatus and image processing program
KR102026410B1 (en) Sytem for marker recognition and method therefor
JPH10111904A (en) Bar code reader and recording medium
JP4241803B2 (en) Two-dimensional information code reading method and reading apparatus
JP2008140255A (en) Bar code reader and bar code reading method
KR102257998B1 (en) Apparatus and method for cell counting
JP2000101924A (en) Defect detection correction device in image input device
CN112036375A (en) Method and device for detecting infrared image and depth image and face recognition system
JP2013196470A (en) Two-dimensional code reader
JP6544191B2 (en) Image creation device
WO2022211064A1 (en) Information reading device
JP2003168070A (en) Code reader
JPH11142348A (en) Meandering follow-up device for defect inspecting device and defect inspecting device
JP4231445B2 (en) Coin identification device

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150609

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150928

R150 Certificate of patent or registration of utility model

Ref document number: 5825110

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