JP2021184141A - Code decoding device, code decoding method, and program - Google Patents
Code decoding device, code decoding method, and program Download PDFInfo
- Publication number
- JP2021184141A JP2021184141A JP2020088825A JP2020088825A JP2021184141A JP 2021184141 A JP2021184141 A JP 2021184141A JP 2020088825 A JP2020088825 A JP 2020088825A JP 2020088825 A JP2020088825 A JP 2020088825A JP 2021184141 A JP2021184141 A JP 2021184141A
- Authority
- JP
- Japan
- Prior art keywords
- contour line
- code
- dimensional code
- cell
- function
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 17
- 238000001514 detection method Methods 0.000 claims abstract description 48
- 230000006870 function Effects 0.000 claims description 81
- 238000010801 machine learning Methods 0.000 claims description 24
- 238000013527 convolutional neural network Methods 0.000 claims description 17
- 235000019557 luminance Nutrition 0.000 claims description 8
- 230000010365 information processing Effects 0.000 claims description 4
- 238000012545 processing Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 238000011156 evaluation Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 238000013135 deep learning Methods 0.000 description 6
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000008439 repair process Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 238000012549 training Methods 0.000 description 3
- 238000003709 image segmentation Methods 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009194 climbing Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、コード復号装置、コード復号方法及びプログラムに関する。 The present invention relates to a code decoding device, a code decoding method and a program.
交通機関の搭乗券、決済、認証などにおいて、シート上に印刷された2次元コードが用いられる場面が増えている。2次元コードの画像から、コード情報を復号化する際には、まず、その中に埋め込まれた位置検出用コードが検出される。続いて、検出された位置検出用コードに従って、サンプリンググリッドとも呼ばれる2次元格子が2次元コードの画像上に規定される。この場合、2次元格子の交点は2次元コードを構成する各セル(1ビットの情報を示す単位領域)の位置に合致する。したがって、サンプリング点の明暗情報から、コード情報を検出してコード情報を復号化することができる。 Two-dimensional codes printed on sheets are increasingly used in boarding passes, payments, authentication, etc. for transportation. When decoding the code information from the image of the two-dimensional code, first, the position detection code embedded in the code information is detected. Subsequently, according to the detected position detection code, a two-dimensional grid, also called a sampling grid, is defined on the image of the two-dimensional code. In this case, the intersection of the two-dimensional lattice matches the position of each cell (unit area indicating one-bit information) constituting the two-dimensional code. Therefore, the code information can be detected from the light / dark information of the sampling point and the code information can be decoded.
2次元コードが紙などのシート上に印刷されている場合、シートが折れたり皺が寄ったりすると、印刷された2次元コードも複雑に歪む。この場合、サンプリング点と実際のセルの位置とにずれが生じ、明暗情報が間違って検出され、コード情報を正確に復号化できない場合がある。 When the two-dimensional code is printed on a sheet such as paper, if the sheet is folded or wrinkled, the printed two-dimensional code is also complicatedly distorted. In this case, the sampling point and the actual cell position may be misaligned, the light / dark information may be detected incorrectly, and the code information may not be accurately decoded.
このような状況に対応すべく、2次元コードの様々な検出方法が提案されている。例えば、2次元コードの包絡線、すなわち2次元コード全体の外形から形成した補助線に基づいてコード情報を検出する技術が開示されている(例えば、特許文献1参照)。この他、2次元コードに予め補助線を埋め込んで、復号化の際に補助線を検出し、検出した補助線に沿ってコード情報を検出して、復号を行う技術が開示されている(例えば、非特許文献1、2参照)。
Various methods for detecting a two-dimensional code have been proposed in order to deal with such a situation. For example, a technique for detecting code information based on an envelope of a two-dimensional code, that is, an auxiliary line formed from the outer shape of the entire two-dimensional code is disclosed (see, for example, Patent Document 1). In addition, a technique is disclosed in which an auxiliary line is embedded in a two-dimensional code in advance, an auxiliary line is detected at the time of decoding, code information is detected along the detected auxiliary line, and decoding is performed (for example). , See Non-Patent
上記特許文献1に開示された装置によれば、2次元コードの緩やかな歪みに対して高速かつ正確なコード情報の検出が可能となる。しかしながら、この装置では、2次元コードに、図14(A)の点線で囲まれた部分に示すような不均一な凸状又は凹状な歪み(複雑、局所的な歪み)があったり、図14(B)の点線で囲まれた部分に示すような遮蔽領域のある歪みがあったりする場合には、コード情報を正確に検出するのが困難になる。
According to the apparatus disclosed in
上記非特許文献1、2に開示された装置によれば、2次元コードに複雑な歪み、局所的な歪みおよび遮蔽領域のある歪みにも対応することが可能である。2次元コードの補助線の位置から、明暗が同じ、すなわち同色のセル同士の間の境界線の正確な位置を把握することができるので、複雑な局所的な歪み、遮蔽領域のある歪みをある程度把握し易くすることができるためである。しかしながら、これらの装置では、2次元コード内に補助線を予め設けておく必要があり、補助線のない一般的な2次元コードには対応することができない。
According to the apparatus disclosed in
本発明は、上記実情の下になされたものであり、補助線が設けられていない2次元コードの画像に複雑な歪み、局所的な歪みおよび遮蔽領域のある歪みがあっても、コード情報を正確に検出することができるコード復号装置、コード復号方法及びプログラムを提供することを目的とする。 The present invention has been made under the above circumstances, and even if the image of the two-dimensional code without auxiliary lines has complicated distortion, local distortion, and distortion with a shielding region, the code information can be obtained. It is an object of the present invention to provide a code decoding device, a code decoding method and a program that can be accurately detected.
上記目的を達成するために、本発明の第1の観点に係るコード復号装置は、
互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、前記セルの輪郭線を検出する輪郭線検出部と、
前記輪郭線検出部で検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定部と、
前記輪郭線検出部で検出された前記輪郭線と、前記輪郭線推定部で推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号部と、
を備える。
In order to achieve the above object, the code decryption device according to the first aspect of the present invention is
A contour line detection unit that detects the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region or a second region having different brightness from each other. When,
A contour line estimation unit that estimates the position information of the contour line detected by the contour line detection unit in the two-dimensional code, and a contour line estimation unit.
Based on the contour line detected by the contour line detection unit and the position information of the contour line estimated by the contour line estimation unit, the position information in the two-dimensional code of the cell is estimated. A decoding unit that decodes the code information based on the estimation result of the cell position information, and
To prepare for.
この場合、前記輪郭線推定部は、
前記輪郭線検出部で検出された前記輪郭線に対して、前記2次元コード内の位置を表す識別番号を付与し、
付与した前記識別番号に基づいて、前記輪郭線の前記2次元コード内の位置情報を推定する、
こととしてもよい。
これにより、輝度が等しい両隣の前記セル同士の間の前記輪郭線を抽出することが可能となる。
In this case, the contour line estimation unit is
An identification number indicating a position in the two-dimensional code is assigned to the contour line detected by the contour line detection unit.
Based on the assigned identification number, the position information of the contour line in the two-dimensional code is estimated.
It may be that.
This makes it possible to extract the contour line between the adjacent cells having the same brightness.
また、前記輪郭線推定部は、
同じ前記識別番号を有する前記輪郭線の端部同士を接続線で接続した場合において、前記接続線と前記輪郭線とのなす角度が大きくなるにつれて大きくなる第1の関数と、前記接続線同士の交叉回数が増えるにつれて大きくなる第2の関数と、隣接する前記輪郭線の間隔が大きくなるにつれて大きくなる第3の関数とのいずれか、又は、前記第1の関数、前記第2の関数及び前記第3の関数のうちの少なくとも2つの和のいずれかを含む目的関数を用いて、前記輪郭線に付与される前記識別番号の組み合わせの中から、前記目的関数の値が最も小さくなる前記識別番号の組み合わせを探索する、
こととしてもよい。
前記目的関数を用いて前記輪郭線に付与される最適な前記識別番号の組み合わせを探索することにより、全ての前記セルの輪郭線を見つけ出すことができるとともに、全ての前記セルの位置を特定することができ、前記2次元コードを復元できるようになる。
Further, the contour line estimation unit is
When the ends of the contour lines having the same identification number are connected by a connecting line, the first function that increases as the angle between the connecting line and the contour line increases, and the connecting lines Either a second function that increases as the number of crossings increases and a third function that increases as the distance between adjacent contour lines increases, or the first function, the second function, and the above. The identification number having the smallest value of the objective function among the combinations of the identification numbers given to the contour line by using the objective function including any one of at least two sums of the third function. Search for combinations of
It may be that.
By searching for the optimum combination of the identification numbers given to the contour line using the objective function, the contour lines of all the cells can be found and the positions of all the cells can be specified. And the two-dimensional code can be restored.
前記目的関数において、前記第1の関数と、前記第2の関数と、前記第3の関数とには、それぞれ異なる重みが付与されている、
こととしてもよい。
In the objective function, the first function, the second function, and the third function are given different weights.
It may be that.
前記輪郭線検出部は、
機械学習を行って、前記2次元コードの画像から、両隣の前記セルの輝度が等しいために不可視の前記セルの輪郭線を検出する機械学習部を備える、
こととしてもよい。
The contour line detection unit is
It is provided with a machine learning unit that performs machine learning and detects the contour line of the cell that is invisible because the brightness of the cells on both sides is equal from the image of the two-dimensional code.
It may be that.
前記機械学習部は、
多層パーセプトロン、畳み込みニューラルネットワーク、又は前記2次元コードの画像の各画素をノードとするグラフ構造で表現したマルコフ確率場として最適化を行う最適化器である、
こととしてもよい。前記多層パーセプトロンや前記畳み込みニューラルネットワークは、前記2次元コードの画像の各画素に対して前記輪郭線であるか否かを識別するモデルであり、移動窓方式により画像の全画素について識別を行う。また、前記マルコフ確率場は、画像の領域分割に利用される一般的なモデルと同一である。
The machine learning unit
It is an optimizer that optimizes as a Markov random field expressed by a multi-layer perceptron, a convolutional neural network, or a graph structure with each pixel of the image of the two-dimensional code as a node.
It may be that. The multi-layer perceptron and the convolutional neural network are models for discriminating whether or not each pixel of the image of the two-dimensional code is the contour line, and all the pixels of the image are discriminated by the moving window method. Further, the Markov random field is the same as a general model used for region division of an image.
前記畳み込みニューラルネットワークは、全結合層を持たず全ての層が畳み込み層である全層畳み込みネットワークである、
こととしてもよい。
The convolutional neural network is a full-layer convolutional network that does not have a fully connected layer and all layers are convolutional layers.
It may be that.
本発明の第2の観点に係るコード復号方法は、
情報処理装置によって実行されるコード復号方法であって、
互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、前記セルの輪郭線を検出する輪郭線検出ステップと、
前記輪郭線検出ステップで検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定ステップと、
前記輪郭線検出ステップで検出された前記輪郭線と、前記輪郭線推定ステップで推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号ステップと、
を含む。
The code decoding method according to the second aspect of the present invention is
A code decryption method executed by an information processing device.
A contour line detection step for detecting the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region and a second region having different luminances from each other. When,
A contour line estimation step for estimating the position information of the contour line detected in the contour line detection step in the two-dimensional code, and a contour line estimation step.
Based on the contour line detected in the contour line detection step and the position information of the contour line estimated in the contour line estimation step, the position information in the two-dimensional code of the cell is estimated. A decoding step for decoding the code information based on the estimation result of the cell position information, and
including.
本発明の第3の観点に係るプログラムは、
コンピュータを、
互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、前記セルの輪郭線を検出する輪郭線検出部、
前記輪郭線検出部で検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定部、
前記輪郭線検出部で検出された前記輪郭線と、前記輪郭線推定部で推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号部、
として機能させる。
The program according to the third aspect of the present invention is
Computer,
A contour line detection unit that detects the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region or a second region having different brightness from each other. ,
A contour line estimation unit that estimates the position information of the contour line detected by the contour line detection unit in the two-dimensional code.
Based on the contour line detected by the contour line detection unit and the position information of the contour line estimated by the contour line estimation unit, the position information in the two-dimensional code of the cell is estimated. A decoding unit that decodes the code information based on the estimation result of the cell position information.
To function as.
本発明によれば、互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、セルの輪郭線を検出するだけでなく、輪郭線の2次元コード内の位置情報を推定する。これにより、検出された輪郭線と推定された輪郭線の2次元コード内の位置情報とに基づいて、セルの2次元コード内の位置情報を正確に推定することができる。このため、補助線が設けられていない2次元コードの画像に複雑な歪み、局所的な歪みおよび遮蔽領域のある歪みがあっても、コード情報を正確に検出することができる。 According to the present invention, the contour line of a cell is detected from an image of a two-dimensional code in which code information is encoded by a combination of cells composed of either a first region or a second region having different brightness. Not only does it, but it also estimates the position information of the contour line in the two-dimensional code. Thereby, the position information in the two-dimensional code of the cell can be accurately estimated based on the detected contour line and the position information in the two-dimensional code of the estimated contour line. Therefore, even if the image of the two-dimensional code without the auxiliary line has complicated distortion, local distortion, and distortion with a shielding region, the code information can be accurately detected.
以下、本発明の実施の形態について図面を参照して詳細に説明する。全図において、同一又は相当する構成要素には、同一の符号が付されている。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all figures, the same or corresponding components are designated by the same reference numerals.
実施の形態1
まず、本発明の実施の形態1について説明する。図1に示すように、2次元コード2は、紙等のシート3に印刷されたものであり、シート3の歪みに応じて歪んでいる。カメラ5は、この2次元コード2を撮像する。本実施の形態に係るコード復号装置1は、カメラ5で撮像された2次元コード2の画像Im1に基づいて、コード情報を検出し、そのコード情報を復号化する。
First,
図2に示すように、2次元コード2は、矩形状のセル4がマトリクス状に配列されることにより構成されている。セル4は、第1の領域としての黒領域4Aと、第2の領域としての白領域4Bのいずれかで構成される、1ビットの情報を示す単位領域である。セル4は、モジュールとも呼ばれる。黒領域4Aと白領域4Bは、互いに輝度が異なる。黒領域4Aがコード情報の「1」を示し、白領域4Bがコード情報の「0」を示しているが、この逆であってもよい。2次元コード2は、セル4毎に「1」か「0」かを示す明暗情報で符号化されている。
As shown in FIG. 2, the two-
図1に戻り、セル4は矩形状であるため、その外形に4辺の輪郭線6が形成されている。隣接するセル4同士では、その境界線が輪郭線6となる。この輪郭線6は、モジュールエッジともいう。
Returning to FIG. 1, since the
セル4は、マトリクス状に配列されているため、シート3に印刷された2次元コード2に歪みがない場合には、セル4の輪郭線6は、図2に示すように、縦方向に延びる直線と横方向に延びる直線とになる。縦方向に延びる輪郭線6を輪郭線6Vとし、横方向に延びる輪郭線6を輪郭線6Hとする。なお、輪郭線6は、2次元コード2の上に実際に形成されてはいない。図2では、説明のために、2次元コード2の上に、輪郭線6を重ねて示しているだけである。2次元コード2の歪みにより、輪郭線6(6V,6H)も歪んでいる(図3(A)及び図3(B)参照)。
Since the
本実施の形態に係るコード復号装置1は、セル4の輪郭線6(6V,6H)を検出する。そして、コード復号装置1は、縦の輪郭線6Vと横の輪郭線6Hとで仕切られる領域を抽出し、その領域の輝度が黒領域4Aのものであるか白領域4Bのものであるかを判定する。さらに、コード復号装置1は、その領域が「1」を示すか「0」を示すかを判定することにより、コード情報を読み出して、復号化する。
The
なお、セル4は、黒領域4Aか白領域4Bかのいずれかであるため、図3(A)に示すように、黒領域4A同士、白領域4B同士が隣接する場合もある。図3(B)に示すように、これら同輝度、同色のセル4の間では輪郭線6(6v,6h)が明示されず、不可視となる。このようなこともあって、検出される輪郭線6(6v,6h)は、途中で途切れるようになる。そこで、本実施の形態に係るコード復号装置1は、黒領域4A同士、白領域4B同士を仕切る輪郭線6をも推定する。なお、以下では、このようにして推定された輪郭線6を、輪郭線6(6v’,6h’)とする。また、輪郭線6(6v,6h)と、輪郭線6(6v’,6h’)とを組み合わせた輪郭線6を、輪郭線6(6v+6v’,6h+6h’)と表現する。
Since the
図1に戻り、本実施の形態に係るコード復号装置1は、輪郭線検出部10と、輪郭線推定部11と、復号部12と、を備える。輪郭線検出部10は、カメラ5で撮像された2次元コード2の画像Im1から、セル4の輪郭線6(6v+6v’,6h+6h’)を検出する。輪郭線推定部11は、輪郭線検出部10で検出された輪郭線6(6v+6v’,6h+6h’)の2次元コード2内の位置情報を推定する。輪郭線推定部11での位置情報の推定により追加生成される輪郭線6を、輪郭線6(6v”,6h”)とする。復号部12は、輪郭線検出部10で検出された輪郭線6(6v+6v’,6h+6h’)と、輪郭線推定部11で推定された輪郭線6の位置情報とに基づいて、セル4の2次元コード2内の位置情報を推定し、セル4の位置情報の推定結果に基づいてコード情報を復号化する。ここでは、全てのセル4の2次元コード2内での相対位置が認識され、各セル4の明暗を判定することで復号化が行われる。以下、コード復号装置1の各構成要素の詳細について説明する。
Returning to FIG. 1, the
[輪郭線検出部]
輪郭線検出部10の詳細について説明する。輪郭線検出部10は、機械学習を行って、2次元コード2の画像Im1から、輪郭線6(6v,6h)の他、両隣のセル4の輝度が等しいために不可視のセル4の輪郭線6(6v’,6h’)を推定し、輪郭線6(6v+6v’,6h+6h’)を出力する機械学習部21を有している。
[Contour line detector]
The details of the contour
機械学習部21は、例えば、多層パーセプトロン又は畳み込みニューラルネットワーク,全層畳み込みネットワークとすることができる。多層パーセプトロンや畳み込みニューラルネットワークは、画素の各画素に対して輪郭線であるか否かを識別するモデルであり、移動窓方式により画像の全画素について識別を行う。また、この機械学習部21を、2次元コード2の画像Im1の各画素をノードとするグラフ構造で表現したマルコフ確率場として最適化を行う最適化器とすることができる。マルコフ確率場は、画像の領域分割に利用される一般的なモデルと同一とすることができる。
The
スキップ結合を含み、全結合層を持たず全ての層が畳み込み層である全層畳み込みネットワークであるU−Netを用いた例を図4に示す。U−Netは、エンコーダ・デコーダ構造にスキップ構造を加えたネットワークである。図4に示すように、本実施の形態に係るU−Netでは、5層の畳み込み層と、同じく5層の逆畳み込み層とで構成される。しかしながら、畳み込み層及び逆畳み込み層は、5層には限られない。 FIG. 4 shows an example using U-Net, which is a full-layer convolutional network including a skip bond and having no fully connected layer and all layers are convolutional layers. U-Net is a network in which a skip structure is added to an encoder / decoder structure. As shown in FIG. 4, the U-Net according to the present embodiment is composed of five convolution layers and five reverse convolution layers. However, the convolutional layer and the deconvolutional layer are not limited to the five layers.
U−Netでは、エンコーダ時の特徴マップをデコーダ時にも利用するスキップ結合(スキップ接続)が導入されている。U−Netは、エンコーダとデコーダとが対となる構造となっている。U−Netでは、対応するエンコーダとデコーダの畳み込み層で得られる特徴マップは、同じサイズとなるため、そのまま連結し、スキップ結合を実現することができる。このスキップ結合の採用により、セグメンテーションの結果が粗くなるのを防止することが可能となる。 In U-Net, skip coupling (skip connection) is introduced, in which the feature map at the time of encoder is also used at the time of decoder. The U-Net has a structure in which an encoder and a decoder are paired. In U-Net, the feature maps obtained from the corresponding encoder and decoder convolution layers have the same size, so they can be connected as they are and skip coupling can be realized. By adopting this skip join, it is possible to prevent the result of segmentation from becoming rough.
言い換えれば、U−Netは、画素単位の領域分割を行う全層畳み込みニューラルネットワークであり、スキップ結合により詳細な領域分割が可能になる。図4では、各層のデータサイズと、特徴マップの数が示されている。例えば、入力画像のサイズは512×512ピクセルであり、その次の畳み込み層のサイズは256×256ピクセルとなり、枚数は64となる。 In other words, U-Net is a full-layer convolutional neural network that divides a region in pixel units, and skip coupling enables detailed region division. FIG. 4 shows the data size of each layer and the number of feature maps. For example, the size of the input image is 512 × 512 pixels, the size of the next convolution layer is 256 × 256 pixels, and the number of sheets is 64.
輪郭線検出部10は、深層学習が行われた畳み込みニューラルネットワークである機械学習部21を用いて、画像Im1から、輪郭線6(6v+6v’,6h+6h’)を推定する。この深層学習は、全セルの全輪郭線から構成される画像を教師データとして訓練が行われる。具体的には、2次元コード2の画像Im1(図5(A)参照)と、正確に得られた輪郭線6(6v+6v’,6h+6h’)の画像Im2(図5(B)参照)との組み合わせを複数作成し、作成された訓練データを用いて深層学習が行われる。なお、輪郭線6(6v+6v’,6h+6h’)の画像Im2には、遮蔽領域が輪郭線6とは異なる他の色に着色されている。このような画像を用いて学習を行えば、2次元コード2の遮蔽領域を検出し、遮蔽領域付近での不正確な輪郭線6’の抽出を回避することができる。
The contour
深層学習には、例えば、誤差逆伝搬法等が用いられる。深層学習の結果得られたパラメータは、予め別のサーバコンピュータで行うことができ、サーバコンピュータから、後述する通信インターフェイス35を介して最適なパラメータを受信して、畳み込みニューラルネットワークに設定しておくことができる。
For deep learning, for example, an error back propagation method or the like is used. The parameters obtained as a result of deep learning can be performed in advance on another server computer, and the optimum parameters are received from the server computer via the
このように、深層学習された畳み込みニューラルネットワークの機械学習部21を用いることにより、従来は困難であった輝度差のない領域同士の輪郭線6(6v’,6h’)をも検出することが可能となる。なお、図6(A)には、機械学習部21を用いることなくエッジ検出された縦の輪郭線6(6v)の一例が示され、図6(B)には、機械学習部21で推定された縦の輪郭線6(6v+6v’)の一例が示されている。
In this way, by using the
[輪郭線推定部]
次に、輪郭線推定部11(図1参照)の詳細について説明する。輪郭線検出部10で検出された輪郭線6(6v+6v’,6h+6h’)は完全ではなく、一部つながっておらず、検出されていない輪郭線6(6v”,6h”)も存在する。輪郭線推定部11は、輪郭線検出部10で検出された輪郭線6(6v+6v’,6h+6h’)の番号を推定するとともに、輪郭線検出部10で検出されなかった輪郭線6(6v”,6h”)を推定する。これにより、輪郭線6全体の2次元コード2内の位置情報が推定される。図6(B)には、縦の輪郭線6(6v+6v’)が示され、図6(C)には、縦の輪郭線6(6v”)が示されている。
[Contour line estimation unit]
Next, the details of the contour line estimation unit 11 (see FIG. 1) will be described. The contour line 6 (6v + 6v', 6h + 6h') detected by the contour
輪郭線6の推定は、以下のようにして行われる。輪郭線推定部11は、例えば、図6(B)に示すように、縦の輪郭線6(6v+6v’)に対して、輪郭線6(6v+6v’)が並ぶ方向に、順番に識別番号としてのラベルを付与する。ラベルは、輪郭線6(6v+6v’)毎の固有の情報であり、輪郭線6(6v+6v’)の2次元コード2内の位置を表す情報である。例えば、左から0、1、2、3、4、・・・というように輪郭線6が並ぶ順番に付与される。途切れた輪郭線6についても、左から順番に0,1,2,・・・というように順番にラベルが付与される。例えば、型番が3のQRコード(登録商標)であれば29×29セルを含むため、ラベルは0から29となる。なお、横の輪郭線6(6h+6h’)の場合には、上から輪郭線6が並ぶ順番に、0、1、2、・・・というようにラベルを付与することができる。これらのラベルは、輪郭線6(6v+6v’,6h+6h’)の2次元コード2内での位置を表し、各セル4の2次元コード2内での位置を推定することを可能にする。輪郭線推定部11は、付与したラベルに基づいて、輪郭線検出部10で検出されなかった輪郭線6(6v”,6h”)の2次元コード2内の位置情報を推定する。
The estimation of the
輪郭線6は、理想的には2次元コード2の一辺と同じ長さを持つ線であるが、輪郭線検出部10で検出された輪郭線6は途切れ途切れとなっており、途切れた輪郭線6毎にラベルが付与される。本実施の形態に係る輪郭線推定部11は、同じラベルを有する途切れた輪郭線6(6v+6v’,6h+6h’)の端部同士を、輪郭線(接続線)6(6v”,6h”)で接続して途切れのない輪郭線6(6v+6v’+6v”,6h+6h’+6h”)を生成する。このとき、接続線6(6v”,6h”)を結び後述する目的関数F(C)を用いることで、途切れた輪郭線6の集合に対して付与されたラベルの組み合わせの適切さを評価することが可能となる。結果的に、輪郭線推定部11は、輪郭線6(6v+6v’,6h+6h’)に、輪郭線6(6v”,6h”)を加えた輪郭線6(6v+6v’+6v”,6h+6h’+6h”)を出力する。なお、図6(C)では、縦の輪郭線6(6v+6v’+6v”)しか示されていないが、横の輪郭線6(6h+6h’+6h”)についても、同様の推定処理が行われる。
The
輪郭線推定部11は、輪郭線6(6v+6v’,6h+6h’)に対して最適なラベルの組み合わせを割り当てるために、仮に割り当てたラベルにより得られる接続線6(6v”,6h”)において、3つの関数の値を算出することでその妥当性を評価する。第1の関数Fa(C)と、第2の関数Fc(C)と、第3の関数Fi(C)である。なお、これらの関数の説明では、輪郭線6(6v+6v’,6h+6h’)を輪郭線6’とし、輪郭線、すなわち接続線6(6v”,6h”)を輪郭線6”として説明する。
The contour
第1の関数Fa(C)は、輪郭線6’と接続線6”とのなす角度が大きくなるにつれて大きくなる評価関数である。図7(A)に示すように、ラベルが同じ上の輪郭線6’(モジュールエッジe1)と、下の輪郭線6’(モジュールエッジe2)とが、接続線6”で接続されるものとした場合、上の輪郭線6’と接続線6”とのなす角度をθi,topとし、下の輪郭線6’と接続線6”とのなす角度をθi,bottomとする。輪郭線6’について引かれた接続線6”の総数をnとすると、第1の関数Fa(C)は、以下の式(1)で示されている。
第2の関数Fc(C)は、図7(B)に示すように、接続線6”同士の交叉回数が増えるにつれて大きくなる評価関数である。第2の関数Fc(C)は、以下の式(2)で示されている。
Fc(C)=Ccross ・・・(2)
ここで、Ccrossは、輪郭線6’について引かれた接続線6”の交叉回数である。
Second function F c (C), as shown in FIG. 7 (B), connecting
F c (C) = C cross ... (2)
Here, C cross is the number of crossings of the connecting
第3の関数Fi(C)は、図7(C)に示すように、隣接する輪郭線6’の間隔が大きくなるにつれて大きくなる評価関数である。第3の関数Fi(C)を以下の式(3)に示す。
目的関数F(C)としては、例えば次式を採用することができる。
輪郭線推定部11は、目的関数F(C)を用いて、輪郭線6’に付与されるラベルの組み合わせの中から、目的関数F(C)の値が最も小さくなるラベルの組み合わせを探索する。目的関数F(C)の値が最も小さくなる接続線6”で接続された輪郭線6が、最終的な輪郭線6となる。なお、目的関数F(C)は、上記式のものに限らず、第1の関数Fa(C)、第2の関数Fc(C)及び第3の関数Fi(C)のいずれか、又は第1の関数Fa(C)、第2の関数Fc(C)及び第3の関数Fi(C)のうちの少なくとも2つの和のいずれかを含んでいればよい。
The contour
[復号部]
次に、復号部12の詳細について説明する。復号部12は、輪郭線検出部10で検出された輪郭線6と、輪郭線推定部11で推定された輪郭線6の位置情報とに基づいて、セル4の2次元コード内の位置情報を推定する。例えば、図8に示すように、ラベル14、15が付与された縦の輪郭線6及びその位置情報と、ラベル14、15が付与された横の輪郭線6及びその位置情報とによって、その間の領域が推定される。復号部12は、推定された輝度値を検出し、検出した輝度値を閾値と比較して、「1」を示しているか、「0」を示しているかを判定する。この判定は、例えば、領域内の平均輝度値が閾値以上であるか否かにより行われる。この判定結果により、セル4を示す値が決定される。このように、復号部12は、輪郭線6(6v+6v’+6v”,6h+6h’+6h”)及びその位置情報に基づいてセル4の領域を推定し、領域毎に輝度値を検出し、その輝度値と閾値とを比較して、「1」又は「0」を判定する処理をすべての領域について行う。そして、すべての領域での「1」、「0」の情報を組み合わせてコード情報が生成される。
[Decoding section]
Next, the details of the
[ハードウエア構成]
図9には、コード復号装置1(情報処理装置)のコンピュータのハードウエア構成が示されている。図9に示すように、コード復号装置1は、CPU(Central Processing Unit)30と、メモリ31と、外部記憶部32と、入出力部33と、通信インターフェイス35とを備える。コード復号装置1の各構成要素は、内部バス40を介して接続されている。
[Hardware configuration]
FIG. 9 shows the hardware configuration of the computer of the code decoding device 1 (information processing device). As shown in FIG. 9, the
CPU30は、ソフトウエアプログラム(以下、単に「プログラム」とする)を実行するプロセッサ(演算装置)である。メモリ31には、外部記憶部32からプログラム39が読み込まれ、CPU30は、メモリ31に格納されたプログラム39を実行することにより、輪郭線検出部10、輪郭線推定部11及び復号部12の動作を行う。
The
メモリ31は、例えばRAM(Random Access Memory)である。メモリ31には、CPU30によって実行されるプログラム39が格納される他、CPU30によるプログラム39の実行で必要なデータ、プログラム39の実行の結果生成されるデータが記憶される。
The
外部記憶部32は、例えばハードディスク等である。外部記憶部32は、CPU30により実行されるプログラム39が記憶される。
The
入出力部33は、カメラ5とのデータ入出力を行うインターフェイスである。カメラ5で撮像された画像は、入出力部33を介してメモリ31等に記憶される。
The input / output unit 33 is an interface for inputting / outputting data to / from the
通信インターフェイス35は、インターネット等の通信ネットワークに接続する通信インターフェイスである。深層学習によって得られた畳み込みニューラルネットワーク等の機械学習部21のパラメータは、この通信インターフェイス35を介してダウンロードされ、コード復号装置1に設定される。
The
なお、輪郭線検出部10、輪郭線推定部11及び復号部12の機能は、通信ネットワーク上に構築されるクラウドコンピュータによって実現されるようにしてもよい。この場合、CPU30は、クラウドコンピュータに画像等を送り、復号の指示を行うだけでよい。
The functions of the contour
次に、本実施の形態に係るコード復号装置1(情報処理装置)の動作、すなわちコード復号装置1によって実行されるコード復号方法について説明する。
Next, the operation of the code decoding device 1 (information processing device) according to the present embodiment, that is, the code decoding method executed by the
カメラ5で2次元コード2の画像Im1が撮像されると、図10に示すように、まず、輪郭線検出部10は、画像Im1における2次元コード2の位置を検出する(ステップS1)。この検出は、例えば、Star検出器を用いて行われる。Star検出器は、Center Surround Extremas(CenSurE)から派生した特徴点検出器である。CenSurE検出器は、グレースケール画像に対して回転やスケール変化に不変であり、簡素化された2階層のCenter−surroundフィルタを用いることで差分処理を行い、極値を検出する。Star検出器では、大小の星形範囲の符号をそれぞれ変えて重ねたフィルタが使用されている。このフィルタは、格子状に符号化されている2次元コードの領域間で多くの特徴点を検出する。この検出結果により2次元コード2の画像Im1が規格化される。
When the image Im1 of the two-
続いて、輪郭線検出部10を構成する機械学習部21は、画像Im1(図5(A)参照)から、セル4(4A,4B)の輪郭線6(6v+6v’,6h+6h’)を推定する(ステップS2;輪郭線検出ステップ)。これにより、機械学習部21から輪郭線6(6v+6v’,6h+6h’)の画像Im2(図5(B))が得られる。
Subsequently, the
続いて、輪郭線推定部11は、輪郭線6を縦の輪郭線6v+6v’と、横の輪郭線6h+6h’とに分離する(ステップS4)。これにより、図12(A)及び図12(B)に示すように、例えば、ステップS2,S3で検出された輪郭線6が、縦の輪郭線6(6v+6v’)と、横の輪郭線6(6h+6h’)とに分離される。
Subsequently, the contour
さらに、輪郭線推定部11は、図6(B)に示すように、縦の輪郭線6(6v+6v’)にラベルを付与するとともに、横の輪郭線6(6h+6h’)にラベルを付与する(ステップS5)。輪郭線6(6v+6v’,6h+6h’)の位置情報の推定は、このラベルに基づいて行われる。
Further, as shown in FIG. 6B, the contour
さらに、輪郭線推定部11は、ステップS2で検出された縦の輪郭線6(6v+6v’)同士をつなぎ合わせてセル4の輪郭線6(6v”)の位置情報を推定するとともに、ステップS2で検出された横の輪郭線6(6h+6h’)同士をつなぎ合わせてセル4の輪郭線6(6h”)の位置情報を推定する推定処理サブルーチンを行う(ステップS6;輪郭線推定ステップ)。
Further, the contour
この推定処理サブルーチンでは、山登り法を用いて、輪郭線6に付与されるラベルの組み合わせの最適化が行われる。具体的には、例えば、図11に示すように、まず、輪郭線推定部11が、初期解を生成する(ステップS10)。この推定処理サブルーチンにおいて、「解」とは、輪郭線6に付与されるラベルの組み合わせのことである。このような、輪郭線6に付与されるラベルの組み合わせは複数あり、その中の1つの組み合わせが初期解となる。
In this estimation processing subroutine, the combination of labels given to the
続いて、輪郭線推定部11は、生成された解の評価を行う(ステップS11)。具体的には、輪郭線推定部11は、設定された初期解について、上述の式を用いて、目的関数F(C)を算出する。
Subsequently, the contour
続いて、輪郭線推定部11は、終了判定を行う(ステップS12)。ここで、終了条件は、最適解の近傍にあるすべての解の評価が完了することであるとする。ここでは、初期解の評価が行われただけであるので、判定は否定される(ステップS12;No)。
Subsequently, the contour
続いて、輪郭線推定部11は、新たな解の候補を生成する(ステップS13)。まだ、評価が行われていない、ラベルの組み合わせが存在する場合には、その組み合わせが生成される。
Subsequently, the contour
続いて、輪郭線推定部11は、リペア処理を行う(ステップS14)。このリペア処理では、接続線6”でつないで形成される輪郭線6’について、接続線6”同士の交叉を解消したり、分割されている接続線6”を結合したり、結合されている接続線6”を解消したり、ラベルが付与されていない輪郭線6’を削除したりすることなどが行われる。
Subsequently, the contour
リペア処理を行った後、輪郭線推定部11は、新たな解について評価を行う(ステップS11)。以降、ステップS12で終了である、すなわち、すべての解の組み合わせでの評価が完了し、終了条件を満たすまで(ステップS12;Yes)、ステップS11→S12→S13→S14が繰り返される。終了条件を満たすと(ステップS12;Yes)、推定処理のサブルーチンが終了する。
After performing the repair process, the contour
上述の推定処理により、例えば、図13に示すように、2次元コード2全体に対応する輪郭線6(6v+6v’+6v”,6h+6h’+6h”)が形成される。
By the above estimation process, for example, as shown in FIG. 13, the contour line 6 (6v + 6v'+ 6v ", 6h + 6h' + 6h") corresponding to the entire two-
図10に戻り、続いて、復号部12は、輪郭線6(6v+6v’+6v”,6h+6h’+6h”)で2次元コード2の画像Im1を仕切って、領域分割を行う(ステップS7)。さらに、復号部12は、図8に示すように、仕切られた領域を各セル4として推定し、コード情報を検出して、その復号化を行う(ステップS8;復号ステップ)。これにより、2次元コード2の画像Im1の各セル4の輝度が判定され、「1」と「0」とのデータ列であるコード情報が生成される。このコードは、例えば、インターネットのサイトのアドレスなどを表している。
Returning to FIG. 10, the
以上詳細に説明したように、本実施の形態に係るコード復号装置1によれば、互いに輝度が異なる黒領域4Aと白領域4Bのいずれかで構成されるセル4の組み合わせでコード情報が符号化された2次元コード2の画像Im1から、セル4の輪郭線6(6v+6v’,6h+6h’)が検出されるだけでなく、検出された輪郭線6(6v+6v’,6h+6h’)の2次元コード内での位置を表すラベルを推定するとともに、検出されなかった輪郭線6(6v”,6h”)を推定する。これにより、検出された輪郭線6(6v+6v’,6h+6h’)と推定された輪郭線6(6v”,6h”)とに基づいて、全てのセル4の輪郭線が得られ、セル4の位置を正確に特定することができる。このため、補助線が設けられていない2次元コード2の画像Im1に複雑な歪み、局所的な歪みおよび遮蔽領域のある歪みがあっても、コード情報を正確に検出することができる。
As described in detail above, according to the
また、上記実施の形態によれば、図6(B)に示すように、輪郭線推定部11は、輪郭線検出部10で検出された輪郭線6(6v+6v’,6h+6h’)に対して、輪郭線6(6v+6v’,6h+6h’)が並ぶ方向に、順番にラベルを付与する。さらに、輪郭線推定部11は、付与したラベルに基づいて、輪郭線検出部10で検出されなかった輪郭線6(6v”,6h”)を推定する。このように、輪郭線6(6v”,6h”)を推定することにより、断片化された輪郭線6(6v+6v’,6h+6h’)の総数を削減することができ、ラベルの推定を行う組み合わせ最適化の問題のサイズが抑えられるため、番号の推定を行い易くなるうえ、推定に要する時間を短縮することが可能となる。
Further, according to the above embodiment, as shown in FIG. 6B, the contour
また、上記実施の形態に係るコード復号装置1において、輪郭線推定部11においてラベルの割り当ての妥当性を評価するために、以下の関数を用いる。すなわち、仮に割り当てられたラベルに基づいて、同じラベルを有する輪郭線6’同士を接続線6”で接続した場合において、輪郭線6’と接続線6”とのなす角度が大きくなるにつれて大きくなる第1の関数Fa(C)と、接続線6”同士の交叉回数が増えるにつれて大きくなる第2の関数Fc(C)と、隣接する輪郭線6’の間隔が大きくなるにつれて大きくなる第3の関数Fi(C)とのいずれか、又は、第1の関数Fa(C)、第2の関数Fc(C)及び第3の関数Fi(C)のうちの少なくとも2つの和のいずれかを含む目的関数F(C)を用いて、輪郭線6に付与されるラベルの組み合わせの中から、目的関数F(C)の値が最も小さくなる組み合わせを探索する。このようにすれば、推定される輪郭線6を最適なものとすることができる。
Further, in the
また、目的関数では、第1の関数Fa(C)と、第2の関数Fc(C)と、第3の関数Fi(C)とは、それぞれ異なる重みwa,wc,wiが付与されている。このようにすれば、輪郭線6との角度、交叉回数、間隔それぞれ重みwa,wc,wiを異ならせるようにした最適化が可能となる。
Further, in the objective function, the first function Fa (C), the second function F c (C), and the third function Fi (C) have different weights w a , w c , w, respectively. i is given. In this way, the angle of the
また、上記実施の形態に係るコード復号装置1において、輪郭線検出部10は、2次元コード2の画像Im1を入力し、セル4の輪郭線6を出力する機械学習部21を有している。輪郭線検出部10は、2次元コード2の撮像画像Im1と、理想的な輪郭線6(6v’,6h’)の画像との組み合わせを訓練データとして学習させた機械学習部21を用いて、輪郭線6(6v’,6h’)を推定する。このようにすれば、同じ輝度のセル4間の輪郭線6を推定することが可能となる。これにより、輪郭線推定部11における輪郭線6に対する番号の推定時間を短縮することができる。
Further, in the
また、上記実施の形態に係るコード復号装置1において、機械学習部21について、畳み込みニューラルネットワークを採用した場合には、その畳み込みニューラルネットワークを、U−Netとすることができる。このようにすれば、画像のボケの発生を防止することができる。しかしながら、本実施の形態に係るコード復号装置1で用いることができる畳み込みニューラルネットワークはU−Netには限られない。例えば、畳み込みニューラルネットワークとしてSegNet(画像セグメンテーションニューラルネットワーク)、GAN(敵対的生成ネットワーク)等を採用するようにしてもよい。
Further, when a convolutional neural network is adopted for the
なお、輪郭線検出部10は、機械学習部21を用いなくてもよい。例えば、ソーベルフィルタを用いて、輪郭線6、すなわちモジュールエッジを検出するだけでもよい。また、ソーベルフィルタを用いて輪郭線6(6v+6h)を検出した後、輪郭線6(6v+6h)の画像を機械学習部21に入力して、輪郭線6(6v+6v’,6h+6h’)を推定するようにしてもよい。
The contour
また、輪郭線検出部10により、全ての輪郭線6が抽出されている場合には、輪郭線推定部11は、処理を行う必要はない。
Further, when all the
また、上記実施の形態に係るコード復号装置1は、QRコード(登録商標)の2次元コード2の画像Im1から、コード情報を復号化した。しかしながら、本発明はこれには限られない。いわゆるバーコードを復号化するのに用いるようにしてもよい。本発明は、QRコード(登録商標)以外のマトリクス型の2次元コードにも、スタック型の2次元コードにも適用することが可能である。
Further, the
その他、コード復号装置1のハードウエア構成やソフトウエア構成は一例であり、任意に変更および修正が可能である。
In addition, the hardware configuration and software configuration of the
輪郭線検出部10、輪郭線推定部11及び復号部12などから構成されるコード復号装置1の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、前記の動作を実行するためのコンピュータプログラムを、コンピュータが読み取り可能な記録媒体(フレキシブルディスク、CD−ROM、DVD−ROM等)に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、前記の処理を実行するコード復号装置1を構成してもよい。また、インターネット等の通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロード等することでコード復号装置1を構成してもよい。
The central part for processing the
コード復号装置1の機能を、OS(オペレーティングシステム)とアプリケーションプログラムとの分担、またはOSとアプリケーションプログラムとの協働により実現する場合などには、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。
When the function of the
搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して配信することも可能である。例えば、通信ネットワーク上の掲示板(BBS;Bulletin Board System)にコンピュータプログラムを掲示し、ネットワークを介してコンピュータプログラムを配信してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、前記の処理を実行できるように構成してもよい。 It is also possible to superimpose a computer program on a carrier wave and distribute it via a communication network. For example, a computer program may be posted on a bulletin board system (BBS) on a communication network, and the computer program may be distributed via the network. Then, the computer program may be started and executed in the same manner as other application programs under the control of the OS so that the above processing can be executed.
この発明は、この発明の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、この発明を説明するためのものであり、この発明の範囲を限定するものではない。すなわち、この発明の範囲は、実施の形態ではなく、特許請求の範囲によって示される。そして、特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、この発明の範囲内とみなされる。 The present invention allows for various embodiments and variations without departing from the broad spirit and scope of the invention. Further, the above-described embodiments are for explaining the present invention, and do not limit the scope of the present invention. That is, the scope of the present invention is shown not by the embodiment but by the claims. Then, various modifications made within the scope of the claims and within the scope of the equivalent invention are considered to be within the scope of the present invention.
本発明は、撮像画像からコードを検出するのに適用することができる。 The present invention can be applied to detect a code from a captured image.
1 コード復号装置、2 2次元コード、3 シート、4 セル、4A 黒領域(第1の領域)、4B 白領域(第2の領域)、5 カメラ、6,6’,6V,6H,6v,6v’,6h,6h’ 輪郭線(モジュールエッジ)、6”,6v”,6h” 輪郭線(接続線)、10 輪郭線検出部、11 輪郭線推定部、12 復号部、21 機械学習部、30 CPU、31 メモリ、32 外部記憶部、33 入出力部、35 通信インターフェイス、39 プログラム、40 内部バス、Im1,1m2 画像 1 code decoder, 2 2D code, 3 sheets, 4 cells, 4A black area (first area), 4B white area (second area), 5 cameras, 6,6', 6V, 6H, 6v, 6v', 6h, 6h'contour line (module edge), 6 ", 6v", 6h "contour line (connection line), 10 contour line detection unit, 11 contour line estimation unit, 12 decoding unit, 21 machine learning unit, 30 CPU, 31 memory, 32 external storage, 33 input / output, 35 communication interface, 39 program, 40 internal bus, Im1,1m2 image
Claims (9)
前記輪郭線検出部で検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定部と、
前記輪郭線検出部で検出された前記輪郭線と、前記輪郭線推定部で推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号部と、
を備えるコード復号装置。 A contour line detection unit that detects the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region or a second region having different brightness from each other. When,
A contour line estimation unit that estimates the position information of the contour line detected by the contour line detection unit in the two-dimensional code, and a contour line estimation unit.
Based on the contour line detected by the contour line detection unit and the position information of the contour line estimated by the contour line estimation unit, the position information in the two-dimensional code of the cell is estimated. A decoding unit that decodes the code information based on the estimation result of the cell position information, and
A code decryption device.
前記輪郭線検出部で検出された前記輪郭線に対して、前記2次元コード内の位置を表す識別番号を付与し、
付与した前記識別番号に基づいて、前記輪郭線の前記2次元コード内の位置情報を推定する、
請求項1に記載のコード復号装置。 The contour line estimation unit is
An identification number indicating a position in the two-dimensional code is assigned to the contour line detected by the contour line detection unit.
Based on the assigned identification number, the position information of the contour line in the two-dimensional code is estimated.
The code decryption device according to claim 1.
同じ前記識別番号を有する前記輪郭線の端部同士を接続線で接続した場合において、前記接続線と前記輪郭線とのなす角度が大きくなるにつれて大きくなる第1の関数と、前記接続線同士の交叉回数が増えるにつれて大きくなる第2の関数と、隣接する前記輪郭線の間隔が大きくなるにつれて大きくなる第3の関数とのいずれか、又は、前記第1の関数、前記第2の関数及び前記第3の関数のうちの少なくとも2つの和のいずれかを含む目的関数を用いて、前記輪郭線に付与される前記識別番号の組み合わせの中から、前記目的関数の値が最も小さくなる前記識別番号の組み合わせを探索する、
請求項2に記載のコード復号装置。 The contour line estimation unit is
When the ends of the contour lines having the same identification number are connected by a connecting line, the first function that increases as the angle between the connecting line and the contour line increases, and the connecting lines Either a second function that increases as the number of crossings increases and a third function that increases as the distance between adjacent contour lines increases, or the first function, the second function, and the above. The identification number having the smallest value of the objective function among the combinations of the identification numbers given to the contour line by using the objective function including any one of at least two sums of the third function. Search for combinations of
The code decryption device according to claim 2.
請求項3に記載のコード復号装置。 In the objective function, the first function, the second function, and the third function are given different weights.
The code decryption device according to claim 3.
機械学習を行って、前記2次元コードの画像から、両隣の前記セルの輝度が等しいために不可視の前記セルの前記輪郭線を検出する機械学習部を備える、
請求項1から4のいずれか一項に記載のコード復号装置。 The contour line detection unit is
A machine learning unit is provided that performs machine learning and detects the contour line of the cell that is invisible because the brightness of the cells on both sides is equal from the image of the two-dimensional code.
The code decryption device according to any one of claims 1 to 4.
多層パーセプトロン、畳み込みニューラルネットワーク、又は前記2次元コードの画像の各画素をノードとするグラフ構造で表現したマルコフ確率場として最適化を行う最適化器である、
請求項5に記載のコード復号装置。 The machine learning unit
It is an optimizer that optimizes as a Markov random field expressed by a multi-layer perceptron, a convolutional neural network, or a graph structure with each pixel of the image of the two-dimensional code as a node.
The code decryption device according to claim 5.
請求項6に記載のコード復号装置。 The convolutional neural network is a full-layer convolutional network that does not have a fully connected layer and all layers are convolutional layers.
The code decryption device according to claim 6.
互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、前記セルの輪郭線を検出する輪郭線検出ステップと、
前記輪郭線検出ステップで検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定ステップと、
前記輪郭線検出ステップで検出された前記輪郭線と、前記輪郭線推定ステップで推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号ステップと、
を含むコード復号方法。 A code decryption method executed by an information processing device.
A contour line detection step for detecting the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region and a second region having different luminances from each other. When,
A contour line estimation step for estimating the position information of the contour line detected in the contour line detection step in the two-dimensional code, and a contour line estimation step.
Based on the contour line detected in the contour line detection step and the position information of the contour line estimated in the contour line estimation step, the position information in the two-dimensional code of the cell is estimated. A decoding step for decoding the code information based on the estimation result of the cell position information, and
Code decryption method including.
互いに輝度が異なる第1の領域と第2の領域のいずれかで構成されるセルの組み合わせでコード情報が符号化された2次元コードの画像から、前記セルの輪郭線を検出する輪郭線検出部、
前記輪郭線検出部で検出された前記輪郭線の前記2次元コード内の位置情報を推定する輪郭線推定部、
前記輪郭線検出部で検出された前記輪郭線と、前記輪郭線推定部で推定された前記輪郭線の前記位置情報とに基づいて、前記セルの前記2次元コード内の位置情報を推定し、前記セルの位置情報の推定結果に基づいて前記コード情報を復号化する復号部、
として機能させるプログラム。 Computer,
A contour line detection unit that detects the contour line of the cell from a two-dimensional code image in which code information is encoded by a combination of cells composed of either a first region or a second region having different brightness from each other. ,
A contour line estimation unit that estimates the position information of the contour line detected by the contour line detection unit in the two-dimensional code.
Based on the contour line detected by the contour line detection unit and the position information of the contour line estimated by the contour line estimation unit, the position information in the two-dimensional code of the cell is estimated. A decoding unit that decodes the code information based on the estimation result of the cell position information.
A program that functions as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020088825A JP2021184141A (en) | 2020-05-21 | 2020-05-21 | Code decoding device, code decoding method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020088825A JP2021184141A (en) | 2020-05-21 | 2020-05-21 | Code decoding device, code decoding method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021184141A true JP2021184141A (en) | 2021-12-02 |
Family
ID=78767414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020088825A Pending JP2021184141A (en) | 2020-05-21 | 2020-05-21 | Code decoding device, code decoding method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021184141A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023166672A1 (en) * | 2022-03-03 | 2023-09-07 | 三菱電機株式会社 | Diagnosis system, control device, diagnosis method, and diagnosis program |
CN117197422A (en) * | 2023-11-07 | 2023-12-08 | 深圳优艾智合机器人科技有限公司 | Identification code positioning method, electronic equipment and storage medium |
-
2020
- 2020-05-21 JP JP2020088825A patent/JP2021184141A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023166672A1 (en) * | 2022-03-03 | 2023-09-07 | 三菱電機株式会社 | Diagnosis system, control device, diagnosis method, and diagnosis program |
JP7461510B2 (en) | 2022-03-03 | 2024-04-03 | 三菱電機株式会社 | Diagnostic system, control device, diagnostic method and diagnostic program |
CN117197422A (en) * | 2023-11-07 | 2023-12-08 | 深圳优艾智合机器人科技有限公司 | Identification code positioning method, electronic equipment and storage medium |
CN117197422B (en) * | 2023-11-07 | 2024-03-26 | 深圳优艾智合机器人科技有限公司 | Identification code positioning method, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106548127B (en) | Image recognition method | |
RU2621601C1 (en) | Document image curvature eliminating | |
US20230021661A1 (en) | Forgery detection of face image | |
JP7246104B2 (en) | License plate identification method based on text line identification | |
CN113435240B (en) | End-to-end form detection and structure identification method and system | |
CN105574524B (en) | Based on dialogue and divide the mirror cartoon image template recognition method and system that joint identifies | |
JP4901676B2 (en) | License plate information processing apparatus and license plate information processing method | |
WO2013112738A1 (en) | Identifying regions of text to merge in a natural image or video frame | |
Dal Poz et al. | Automated extraction of road network from medium-and high-resolution images | |
KR102111667B1 (en) | Apparatus of generating 2d image data set for deep learning through 3d design drawing data processing and system for searching simillar design drawing data based on deep learning using the same | |
JP2021184141A (en) | Code decoding device, code decoding method, and program | |
WO2014129018A1 (en) | Character recognition device, character recognition method, and recording medium | |
CN111104941B (en) | Image direction correction method and device and electronic equipment | |
Cohen et al. | Symmetry-aware facade parsing with occlusions | |
JP2019220014A (en) | Image analyzing apparatus, image analyzing method and program | |
CN111507119B (en) | Identification code recognition method, identification code recognition device, electronic equipment and computer readable storage medium | |
Xue et al. | Indoor obstacle discovery on reflective ground via monocular camera | |
CN117115824A (en) | Visual text detection method based on stroke region segmentation strategy | |
US9111142B2 (en) | Method and apparatus for providing sign information | |
CN115223173A (en) | Object identification method and device, electronic equipment and storage medium | |
EP3702958B1 (en) | Method for verifying the identity of a user by identifying an object within an image that has a biometric characteristic of the user and separating a portion of the image comprising the biometric characteristic from other portions of the image | |
CN111680691A (en) | Character detection method and device, electronic equipment and computer readable storage medium | |
US20230146018A1 (en) | Polygonal building extraction from satellite images | |
CN116071835B (en) | Face recognition attack post screening method and device and electronic equipment | |
CN116958981B (en) | Character recognition method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230516 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240214 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20240412 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240605 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240618 |