JP2022158916A - Information reader - Google Patents
Information reader Download PDFInfo
- Publication number
- JP2022158916A JP2022158916A JP2022010885A JP2022010885A JP2022158916A JP 2022158916 A JP2022158916 A JP 2022158916A JP 2022010885 A JP2022010885 A JP 2022010885A JP 2022010885 A JP2022010885 A JP 2022010885A JP 2022158916 A JP2022158916 A JP 2022158916A
- Authority
- JP
- Japan
- Prior art keywords
- code
- information
- processing
- reading
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本明細書で開示する技術は、情報コードに記録されている情報を読み取るための技術に関する。 The technology disclosed in this specification relates to a technology for reading information recorded in an information code.
特許文献1には、二次元コードを読み取るための読取条件(明るさ、露光時間、フィルタの有無)を調整して、二次元コード内の情報を読み取るリーダシステムが開示されている。リーダシステムは、二次元コードの濃度の劣化、外光等の影響によって、二次元コード内の情報の読取が失敗する場合に、基準バンクによって示される読取条件に代えて、拡張バンクによって示される読取条件に従って、二次元コード内の情報を読み取る。拡張バンクは、予め定められた調整ルールに従って基準バンクを調整することによって生成される。
上記の技術は、読取条件を調整するのみである。このため、例えば、読取条件を調整したとしても、二次元コードの画像から二次元コード内の情報を読み取るための情報(例えば二次元コードの位置を示す情報)を検出することができなければ、二次元コード内の情報を読み取ることができない。 The above technique only adjusts the reading conditions. Therefore, for example, even if the reading conditions are adjusted, if information for reading information in the two-dimensional code (for example, information indicating the position of the two-dimensional code) cannot be detected from the image of the two-dimensional code, The information in the two-dimensional code cannot be read.
本明細書では、二次元コード内の情報を読み取ることができない事態に対処するための技術を提供する。 This specification provides a technique for coping with a situation in which the information in the two-dimensional code cannot be read.
本明細書で開示する情報読取装置は、情報コードを撮像可能なカメラと、前記カメラによって撮像された第1の情報コードの読取結果を出力するための第1のコード処理を実行する第1のコード処理実行部であって、前記第1のコード処理は、前記第1の情報コードの画像から前記第1の情報コードに関する第1の関係情報を検出する検出処理と、検出済みの前記第1の関係情報を利用して、前記第1の情報コードに記録されている情報を読み取る読取処理と、前記読取処理の結果を出力する出力処理と、を含む、前記第1のコード処理実行部と、前記第1の関係情報を利用した前記読取処理の複数の成功事例を少なくとも含む教師データを利用して、学習モデルのパラメータを調整する調整部であって、前記学習モデルは、前記カメラによって撮像された前記情報コードの画像から前記情報コードに関する関係情報を出力するモデルである、前記調整部と、前記パラメータが調整された後に、前記第1のコード処理とは異なる第2のコード処理を実行する第2のコード処理実行部であって、前記第2のコード処理は、前記カメラによって撮像された第2の情報コードの画像の読取結果を出力するための処理であり、前記第2のコード処理は、前記カメラによって撮像された前記第2の情報コードの画像を前記学習モデルに入力して、前記学習モデルから前記第2の情報コードに関する第2の関係情報を取得する取得処理を、前記第2の関係情報を検出する前記検出処理に代えて含み、前記第2のコード処理は、取得済みの前記第2の関係情報を利用して、前記第2の情報コードに記録されている情報を読み取る前記読取処理と、前記出力処理と、を含む、前記第2のコード処理実行部と、を備える。 The information reading device disclosed in this specification includes a camera capable of imaging an information code, and a first code processing for outputting a reading result of the first information code imaged by the camera. A code processing execution unit, wherein the first code processing includes detection processing for detecting first relational information related to the first information code from an image of the first information code; the first code processing execution unit including a reading process of reading information recorded in the first information code using the relationship information of and an output process of outputting the result of the reading process; and an adjusting unit that adjusts parameters of a learning model using teacher data including at least a plurality of successful cases of the reading process using the first relationship information, wherein the learning model is captured by the camera. the adjusting unit, which is a model for outputting relational information about the information code from the image of the information code obtained; and executing second code processing different from the first code processing after the parameter is adjusted. wherein the second code processing is processing for outputting a reading result of an image of a second information code captured by the camera, wherein the second code The processing includes inputting an image of the second information code captured by the camera into the learning model and obtaining second relational information related to the second information code from the learning model. Include instead of the detection process for detecting the second relationship information, wherein the second code process utilizes the acquired second relationship information to obtain information recorded in the second information code and the second code processing execution unit including the reading process for reading the code and the output process.
このような構成によれば、情報読取装置は、検出処理によって検出された第1の関係情報を利用した読取処理の複数の成功事例を少なくとも含む教師データを利用して、情報コードの画像から情報コードに関する関係情報を出力する学習モデルのパラメータを調整する。そして、情報読取装置は、パラメータの調整後に、検出処理に代えて、学習モデルを利用した取得処理を実行して、第2の情報コードから第2の関係情報を取得し、取得済みの第2の関係情報を利用した読取処理を実行する。例えば、読取処理の読取条件を調整しても検出処理が失敗する状況において、学習モデルを利用した取得処理によって第2の情報コードから第2の関係情報を取得することができる。読取処理の読取条件を調整しても検出処理が失敗することに起因して、二次元コード内の情報を読み取ることができない事態に対処することができる。 According to such a configuration, the information reading device uses teacher data including at least a plurality of successful cases of reading processing using the first relational information detected by the detection processing to obtain information from the image of the information code. Adjust the parameters of the learning model that outputs relevant information about your code. Then, after adjusting the parameters, the information reading device executes an acquisition process using the learning model instead of the detection process, acquires the second relationship information from the second information code, and acquires the acquired second relationship information. read processing using the relationship information. For example, in a situation where the detection process fails even if the reading conditions of the reading process are adjusted, the second relational information can be obtained from the second information code by the obtaining process using the learning model. It is possible to cope with a situation in which the information in the two-dimensional code cannot be read because the detection process fails even if the reading conditions for the reading process are adjusted.
前記関係情報は、前記情報コードの四隅の座標を示す情報であってもよい。 The relationship information may be information indicating the coordinates of the four corners of the information code.
このような構成によれば、学習モデルを利用して情報コードの四隅の座標を取得することができる。 According to such a configuration, it is possible to acquire the coordinates of the four corners of the information code using the learning model.
前記関係情報は、前記情報コードを構成する複数個のセルの白黒のパターンを示す情報であってもよい。 The related information may be information indicating a black and white pattern of a plurality of cells forming the information code.
このような構成によれば、学習モデルを利用して情報コードの複数個のセルの白黒のパターンを取得することができる。 According to such a configuration, it is possible to acquire black and white patterns of a plurality of cells of the information code using the learning model.
前記関係情報では、前記複数個のセルのそれぞれについて、当該セルの位置を示す情報と、白黒のいずれかを示す値と、が対応付けられていてもよい。 In the relationship information, for each of the plurality of cells, information indicating the position of the cell may be associated with a value indicating black or white.
例えば、複数個のセルの白黒のパターンを示すデータ(以下、「パターンデータ」と記載)が、情報コードを示す複数個の画素である比較例が想定される。この比較例では、画素数の増加と共にパターン情報の情報量が増加する。これに対して、上記の構成によれば、1個のセルに対して1つの値が対応付けられるため、情報コードのセルの個数が一定であれば、画素数が増加しても、パターンデータの情報量は増加しない。上記の比較例と比べて、パターンデータの情報量の増加を抑制することができる。 For example, a comparative example is assumed in which data indicating black and white patterns of a plurality of cells (hereinafter referred to as "pattern data") are a plurality of pixels indicating an information code. In this comparative example, the amount of pattern information increases as the number of pixels increases. On the other hand, according to the above configuration, one value is associated with one cell. does not increase the amount of information in An increase in the information amount of pattern data can be suppressed as compared with the above comparative example.
前記関係情報は、前記情報コードの中の所定のパターンを示す情報であってもよい。 The related information may be information indicating a predetermined pattern in the information code.
このような構成によれば、学習モデルを利用して情報コードから所定のパターンを取得することができる。 According to such a configuration, it is possible to acquire a predetermined pattern from the information code using the learning model.
前記カメラと前記第1のコード処理実行部と前記第2のコード処理実行部とを備える1個以上のコード読取装置と、前記1個以上のコード読取装置と別体な、前記調整部を備える学習装置と、を備え、前記1個以上のコード読取装置は、前記学習装置から調整後の前記パラメータを取得し、前記第2のコード処理実行部は、取得済みの前記調整後のパラメータを利用して前記第2のコード処理を実行してもよい。 One or more code reading devices including the camera, the first code processing execution unit, and the second code processing execution unit; and the adjustment unit separate from the one or more code reading devices. and a learning device, wherein the one or more code reading devices acquire the adjusted parameters from the learning device, and the second code processing execution unit uses the acquired adjusted parameters. may be used to execute the second code processing.
例えば、1個の装置が、カメラと第1のコード処理実行部と第2のコード処理実行部と調整部を備える比較例が想定される。この比較例では、当該1個の装置が、情報コードの読み取りだけでなく、学習モデルのパラメータの調整も実行する。このため、学習モデルのパラメータの調整を実行していなかった従来の構成と比べて、当該1個の装置の処理能力を高める必要があり得る。これに対して、上記の構成によれば、学習モデルのパラメータの調整は、コード読取装置とは別体の学習装置によって実行される。このため、コード読取装置の処理能力を従来から高めなくても、学習モデルのパラメータの調整を実行することができる。 For example, a comparative example is assumed in which one device includes a camera, a first code processing execution unit, a second code processing execution unit, and an adjustment unit. In this comparative example, the single device not only reads the information code, but also adjusts the parameters of the learning model. For this reason, it may be necessary to increase the processing power of the single device compared to the conventional configuration in which adjustment of the parameters of the learning model was not performed. In contrast, according to the above configuration, the adjustment of the parameters of the learning model is performed by a learning device separate from the code reading device. Therefore, the parameters of the learning model can be adjusted without increasing the processing power of the code reading device.
前記学習装置は、インターネット上に設置されており、前記1個以上のコード読取装置と前記学習装置との通信を仲介し、前記インターネットに接続されている仲介装置をさらに備えてもよい。 The learning device may be installed on the Internet, mediate communication between the one or more code reading devices and the learning device, and further comprise an intermediary device connected to the Internet.
このような構成によれば、コード読取装置がインターネットからのアクセスを直接受けることを抑制することができる。 According to such a configuration, it is possible to prevent the code reader from being directly accessed from the Internet.
前記調整後のパラメータを記録する特定の情報コードを出力可能な出力装置をさらに備え、前記1個以上のコード読取装置のそれぞれは、前記出力装置によって出力された前記特定の情報コードから前記調整後のパラメータを読み取ることによって、前記学習装置から前記調整後のパラメータの全部又は一部を取得してもよい。 It further comprises an output device capable of outputting a specific information code that records the adjusted parameter, and each of the one or more code reading devices reads the adjusted information code from the specific information code output by the output device. All or part of the adjusted parameters may be obtained from the learning device by reading the parameters of .
このような構成によれば、コード読取装置は、特定の情報コードを読み取ることによってパラメータを取得することができる。 According to such a configuration, the code reader can acquire the parameter by reading the specific information code.
前記1個以上のコード読取装置は、第1のコード読取装置と、前記第1のコード読取装置とは異なる第2のコード読取装置と、を含み、前記学習装置は、前記第1のコード読取装置から前記教師データを取得して、取得済みの前記教師データを利用して、前記パラメータを調整し、前記第2のコード読取装置は、前記学習装置から、前記第1のコード読取装置の前記教師データを利用して調整された前記パラメータを取得し、取得済みの前記パラメータを利用して、前記第2のコード処理を実行してもよい。 The one or more code readers include a first code reader and a second code reader different from the first code reader, and the learning device is adapted to read the first code reader. The training data is acquired from the device, the parameter is adjusted using the acquired training data, and the second code reading device receives the training data of the first code reading device from the learning device. The parameter adjusted using training data may be obtained, and the second code processing may be performed using the obtained parameter.
このような構成によれば、第2のコード読取装置において、第2のコード読取装置とは異なる第1のコード読取装置における成功事例を利用することができる。 According to such a configuration, in the second code reader, it is possible to utilize the successful case of the first code reader, which is different from the second code reader.
特定のメモリをさらに備え、前記特定のメモリは、前記第1のコード処理及び前記第2のコード処理を実行するためのプログラムを記憶する第1の領域と、前記第1の領域とは異なる第2の領域と、を含み、前記第2の領域は、複数個の学習情報を記憶するための領域であり、前記複数個の学習情報のそれぞれは、前記学習モデルと、調整後の前記パラメータと、を含んでいてもよい。 a specific memory, wherein the specific memory has a first area for storing a program for executing the first code processing and the second code processing; 2 areas, wherein the second area is an area for storing a plurality of pieces of learning information, and each of the plurality of pieces of learning information includes the learning model and the adjusted parameters. , may be included.
このような構成によれば、情報コードを読み取る様々な状況に応じた複数個の学習情報を記憶することができる。当該様々な状況に対応することができる。 According to such a configuration, it is possible to store a plurality of pieces of learning information according to various situations in which the information code is read. It is possible to deal with such various situations.
前記調整部は、前記教師データに含まれる前記複数の成功事例の個数が所定の数を上回った後に、前記学習モデルの前記パラメータの調整を開始するように構成されていてもよい。 The adjusting unit may be configured to start adjusting the parameter of the learning model after the number of the plurality of successful cases included in the training data exceeds a predetermined number.
前記情報読取装置は、さらに、前記第1のコード処理において前記読取処理が成功した対象の情報コードを、情報コードの劣化の種類に関する複数のパターンのうちの特定のパターンに分類する分類部と、分類済みの前記特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用するのか否かを判断する判断部と、を備えていてもよい。 The information reading device further includes a classification unit that classifies the target information code for which the reading process has been successful in the first code process into a specific pattern among a plurality of patterns related to the type of deterioration of the information code; and a judgment unit that judges whether or not to adopt the successful case of the target information code as the training data based on the specific pattern that has been classified.
学習モデルのパラメータの信頼性を確保するためには、所定の数を上回る成功事例が必要となる。しかし、成功事例を無条件に教師データとして採用すると、教師データとしての成功事例の個数が所定の数を上回ったタイミングにおいて、教師データ内の成功事例のばらつきが、特定の劣化のパターン(例えば特定の箇所の特定の汚れ)における事例に偏る可能性がある。上記の構成によれば、情報読取装置は、対象の情報コードの成功事例を情報コードの劣化のパターンで分類して、分類結果に基づいて、対象の情報コードの成功事例を前記教師データとして採用するのか否かを判断する。これにより、教師データにおける成功事例が、特定の劣化のパターンにおける事例に偏ることを抑制することができる。なお、本明細書における「劣化」は、情報コードの経年劣化だけでなく、情報コードを印刷する印刷装置の劣化や、情報コードが印刷される媒体の印刷時における不安定な支持に起因する情報コードの変形も含む。 In order to ensure the reliability of the parameters of the learning model, more than a predetermined number of successful cases is required. However, if the successful cases are unconditionally adopted as training data, at the timing when the number of successful cases as training data exceeds a predetermined number, the variation of the successful cases in the training data will cause a specific deterioration pattern (for example, a specific deterioration pattern). There is a possibility that the cases of specific stains on the According to the above configuration, the information reading device classifies the success cases of the target information code according to the deterioration pattern of the information code, and adopts the success cases of the target information code as the training data based on the classification result. decide whether or not to As a result, it is possible to prevent the successful cases in the training data from being biased toward specific deterioration patterns. It should be noted that the "deterioration" in this specification is not only the deterioration of the information code over time, but also the deterioration of the printing device that prints the information code, and the information caused by unstable support during printing of the medium on which the information code is printed. Also includes code variants.
前記分類部は、前記対象の情報コードに対する前記読取処理内で実行された誤り訂正において復元された復元コードの画像と、前記対象の情報コードの実際の画像を二値化した画像と、を比較して、前記対象の情報コードの劣化の箇所を特定し、前記復元コードと前記実際の画像との比較によって特定された前記劣化の箇所に基づいて、前記対象の情報コードを前記特定のパターンに分類してもよい。 The classification unit compares an image of the restored code restored in the error correction executed in the reading process for the target information code with a binarized image of the actual image of the target information code. Then, the location of deterioration of the target information code is identified, and the target information code is converted into the specific pattern based on the location of deterioration identified by comparing the restored code with the actual image. can be classified.
このような構成によれば、対象の情報コードの実際の画像における劣化の箇所に基づいて対象の情報コードを分類することができる。 According to such a configuration, the target information code can be classified based on the location of deterioration in the actual image of the target information code.
前記分類部は、前記対象の情報コードの画像のコントラストと、前記対象の情報コードの変形と、のうちの少なくとも1つに基づいて、前記対象の情報コードを前記特定のパターンに分類してもよい。 The classification unit may classify the target information code into the specific pattern based on at least one of contrast of an image of the target information code and deformation of the target information code. good.
このような構成によれば、対象の情報コードの実際の画像におけるコントラストと、対象の情報コードの実際の変形と、のうちの少なくとも1つに基づいて対象の情報コードを分類することができる。 According to such a configuration, the target information code can be classified based on at least one of the contrast in the actual image of the target information code and the actual deformation of the target information code.
前記情報読取装置は、さらに、前記第1のコード処理において前記読取処理が成功した対象の情報コードを、前記情報読取装置の内的要因を示す複数の項目のうちの特定の項目に分類する分類部と、分類済みの前記特定の項目に基づいて、前記対象の情報コードの成功事例を前記教師データとして採用するのか否かを判断する判断部と、を備えてもよい。ここで、前記複数の項目は、前記情報読取装置が前記情報コードの画像に対して実行した画像処理に関する2個以上の項目と、前記情報読取装置が前記情報コードを撮像する撮像条件に関する2個以上の項目と、前記情報読取装置が前記情報コードに記録されている情報を読み取るための処理時間に関する2個以上の項目と、のうちの少なくとも1つを含んでもよい。 The information reading device further classifies the target information code, which has been successfully read in the first code processing, into a specific item out of a plurality of items indicating internal factors of the information reading device. and a judgment unit for judging whether or not to adopt the successful case of the target information code as the training data based on the specific item that has been classified. Here, the plurality of items include two or more items related to image processing performed by the information reading device on the image of the information code, and two items related to imaging conditions for the information reading device to capture the information code. At least one of the above items and two or more items relating to the processing time for the information reading device to read the information recorded in the information code may be included.
このような構成によれば、教師データにおける成功事例が、特定の内的要因に対応するパターンにおける事例に偏ることを抑制することができる。 According to such a configuration, it is possible to prevent the success cases in the training data from being biased toward cases in patterns corresponding to specific internal factors.
前記調整部は、前記教師データに含まれる前記複数の成功事例の個数が前記所定の数を上回る前であっても、前記複数の成功事例の個数のうちの2個以上の成功事例の個数が、前記所定の数よりも小さい特定の数を上回る場合に、前記学習モデルの前記パラメータの調整を開始するように構成されており、前記2個以上の成功事例のそれぞれは、前記情報コードの読み取りが成功するものの、前記情報コードの読み取りが失敗する可能性が高まっていることを示す事例であってもよい。 The adjusting unit determines that, even before the number of the plurality of success cases included in the training data exceeds the predetermined number, the number of two or more success cases out of the number of the plurality of success cases is , configured to initiate tuning of the parameters of the learning model when exceeding a specific number less than the predetermined number, each of the two or more success cases reading the information code. may be a case indicating that the reading of the information code is likely to fail although the reading is successful.
このような構成によれば、情報コードの読み取りが失敗する可能性が高まっている状況において、成功事例の個数が所定の数に到達することを待つことなく、学習を速やかに開始することができる。 According to such a configuration, it is possible to quickly start learning without waiting for the number of successful cases to reach a predetermined number in a situation where the possibility of reading the information code is likely to fail. .
第1のメモリと、前記分類済みの特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用すると判断される場合に、前記対象の情報コードの成功事例を前記教師データとして前記第1のメモリに記憶する第1の記憶制御部であって、前記分類済みの特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用しないと判断される場合に、前記対象の情報コードの成功事例は前記特定のメモリに記憶されない、前記第1の記憶制御部と、をさらに備え、前記調整部は、前記第1のメモリ内の前記教師データを利用して、前記パラメータを調整してもよい。 When it is determined to adopt the successful case of the target information code as the training data based on the first memory and the classified specific pattern, the successful case of the target information code is used as the training data. When it is determined that the success case of the target information code is not adopted as the teacher data based on the classified specific pattern and the first storage control unit that does not store successful cases of the target information code in the specific memory, wherein the adjustment unit uses the training data in the first memory. may be used to adjust the parameters.
このような構成によれば、教師データを記憶する第1のメモリの使用量を低減することができる。 According to such a configuration, it is possible to reduce the usage of the first memory for storing the teacher data.
前記カメラによって撮像された情報コードの画像であるコード画像に対する画像処理を実行して、前記読取処理の仮想的な事例を生成し、前記教師データ内の成功事例の個数を増やす増加制御部をさらに備えてもよい。ここで、前記画像処理は、前記コード画像のコントラストを調整する処理、所定の画像を前記コード画像に追加する処理、前記コード画像を回転する処理、及び、前記コード画像によって示される前記情報コードの各セルを加工する処理、のうちの少なくとも一つを含んでもよい。 an increase control unit that performs image processing on a code image, which is an image of the information code captured by the camera, generates virtual cases of the reading process, and increases the number of successful cases in the training data; You may prepare. Here, the image processing includes a process of adjusting the contrast of the code image, a process of adding a predetermined image to the code image, a process of rotating the code image, and a process of rotating the information code indicated by the code image. processing each cell.
学習モデルのパラメータの信頼性を確保するためには、所定の数を上回る成功事例が必要となる。上記の構成によれば、成功事例の個数が所定の数を上回らない状況において、成功事例の個数を増やすことができる。実際の成功事例の個数が所定の数を上回らなくても、学習モデルのパラメータの信頼性を確保することができる。 In order to ensure the reliability of the parameters of the learning model, more than a predetermined number of successful cases is required. According to the above configuration, the number of successful cases can be increased in a situation where the number of successful cases does not exceed the predetermined number. Even if the number of actual successful cases does not exceed a predetermined number, the reliability of the parameters of the learning model can be ensured.
複数個の情報コードのそれぞれについて、当該情報コードに対して実行された前記読取処理の事例を示す事例情報を記憶する第2のメモリをさらに備え、前記増加制御部は、前記第2のメモリに記憶されている複数個の前記事例情報によって示される前記読取処理の事例の傾向を利用して、複数種類の前記画像処理の中から1種類以上の前記画像処理を選択して、選択済みの前記1種類以上の画像処理を実行してもよい。 a second memory for storing, for each of a plurality of information codes, case information indicating an example of the reading process performed on the information code; selecting one or more types of the image processing from among a plurality of types of the image processing by using a tendency of the reading processing cases indicated by the plurality of the stored case information; One or more types of image processing may be performed.
例えば、管理者等によって予め決められている画像処理を利用して、仮想的な事例を生成する比較例が想定される。この比較例では、予め決められている画像処理が、実際の読取処理の事例とは異なる事例に対応している可能性がある。上記の構成によれば、実際の読取処理の事例の傾向を考慮した適切な画像処理を利用して、仮想的な事例を生成することができる。 For example, a comparative example is assumed in which virtual cases are generated using image processing predetermined by an administrator or the like. In this comparative example, there is a possibility that the predetermined image processing corresponds to cases different from actual reading processing cases. According to the above configuration, it is possible to generate a virtual example using appropriate image processing that takes into consideration the tendency of actual reading processing examples.
前記第1の関係情報を利用した前記読取処理が実行される場合に、前記第1の情報コードに対して実行された前記読取処理の事例を示す前記事例情報を前記第2のメモリに記憶する第2の記憶制御部をさらに備えてもよい。 When the reading process using the first relationship information is executed, the case information indicating the case of the reading process executed for the first information code is stored in the second memory. A second storage controller may further be provided.
このような構成によれば、仮想的な事例を生成するための事例情報を読取処理が実行される毎に記憶して蓄積することができる。 According to such a configuration, case information for generating a virtual case can be stored and accumulated each time the reading process is executed.
前記第2のコード処理は、前記第2の情報コードに照射された指示マーカの位置を利用して、前記カメラによって撮像された画像から、前記第2の情報コードの画像を切り取る切り取り処理を含んでもよい。 The second code processing includes cutting processing of cutting out the image of the second information code from the image captured by the camera using the position of the pointing marker illuminated on the second information code. It's okay.
このような構成によれば、既設の指示マーカに基づいて、撮像画像から二次元コードを含むコード画像を簡易に切り取ることができる。 According to such a configuration, a code image including a two-dimensional code can be easily cut out from the captured image based on the existing pointing marker.
また、上記の情報読取装置の制御方法、情報読取装置のためのコンピュータプログラム、及び、当該コンピュータプログラムを保存する記憶媒体も、新規で有用である。 Also, the control method of the information reading device, the computer program for the information reading device, and the storage medium storing the computer program are novel and useful.
(第1実施例)
(情報読取システム;図1、図2)
本実施例の情報読取システム2は、二次元コードに記録されている情報を読み取るためのシステムである。例えば、工場、野外の作業場等において、二次元コードが特定の媒体(例えば、金属、基板、樹脂、紙媒体等)に表示される。また、当該二次元コードが長時間に亘って利用される場合がある。このため、当該二次元コードが、経年劣化する場合がある。例えば、経年により、二次元コードの黒色の部分が薄くなり、二次元コードの白色の部分に対する黒色の部分のコントラストが低下する。また、例えば、経年により、二次元コードの一部が欠損し、及び、二次元コードの一部に汚れが付着する。
(First embodiment)
(Information reading system; Figures 1 and 2)
The
図2に示すように、情報読取システム2は、2個のコード読取装置10と、学習装置200と、プリンタ500と、を備える。各装置10、200、500は、LAN4に接続されており、LAN4を介して通信可能である。LAN4は、有線LAN又は無線LANである。なお、情報読取システム2は、2個のコード読取装置10を備えるが、これは一例に過ぎない。例えば、情報読取システム2は、1個のコード読取装置10のみを備えてもよいし、3個以上のコード読取装置10を備えていてもよい。
As shown in FIG. 2, the
(コード読取装置10の構成;図1、図2)
コード読取装置10は、二次元コードに記録されている情報を読み取るための携帯装置である。なお、図1に示すコード読取装置10の外観は、一例に過ぎず、例えば、コード読取装置10は、スマートフォンと同様の外観を有していてもよい。
(Configuration of
A
コード読取装置10は、操作部12と、表示部14と、カメラ20と、通信インターフェース22と、制御部30と、を備える。以下では、インターフェースのことを「I/F」と記載する。
The
操作部12は、複数のキーを備える。ユーザは、操作部12を操作することによって、様々な指示をコード読取装置10に入力することができる。表示部14は、様々な情報を表示するためのディスプレイである。また、表示部14は、ユーザの操作を受け付け可能なタッチパネル(即ち操作部12)として機能してもよい。カメラ20は、LEDライト等の発光源と、CCDイメージセンサと、を含む。通信I/F22は、LAN4を介した通信を実行するためのI/Fである。通信I/F22は、LAN4に接続されている。
The
制御部30は、CPU32と、不揮発性メモリなどによって構成されるメモリ34と、を備える。CPU32は、メモリ34に記憶されているプログラム40に従って、様々な処理を実行する。また、メモリ34は、さらに、多層ニューラルネットワークを利用した機械学習に関する学習情報50を記憶する。ここで、多層ニューラルネットワークは、入力層、中間層、及び、出力層から構成される関数であり、入力層に入力されたデータが、中間層によって処理されて、出力層から出力される。多層ニューラルネットワークは、例えば、畳み込みニューラルネットワーク、全結合ニューラルネットワーク等である。また、機械学習では、多層ニューラルネットワークに限らず、例えば、サポートベクターマシンが利用されてもよい。多層ニューラルネットワーク等は、既知の技術であり、ここでは、詳細な説明は省略する。
The
学習情報50は、学習モデル52と、モデルパラメータ54と、を含む。学習モデル52は、多層ニューラルネットワークのモデル(即ち数式)である。モデルパラメータ54は、学習モデル52のパラメータであり、具体的には、学習モデル52の中間層における各種の重みの値である。学習モデル52は、例えば、情報読取システム2のベンダによって提供されるサーバ(図示省略)からインストールされる。なお、変形例では、学習モデル52は、コード読取装置10の出荷段階においてメモリ34に予め記憶されていてもよい。一方、モデルパラメータ54は、学習装置200によって生成されてメモリ34に記憶される。
(学習装置200の構成;図2)
学習装置200は、学習モデル252のモデルパラメータ254を調整する装置である。学習装置200は、例えば、サーバである。学習装置200は、通信I/F222と、制御部230と、を備える。通信I/F222は、LAN4に接続されている。
(Configuration of
制御部230は、CPU232と、メモリ234と、を備える。CPU32は、メモリ234に記憶されているプログラム240に従って、様々な処理を実行する。また、メモリ234は、さらに、複数個の教師データ242と、学習情報250と、を記憶する。学習情報250は、コード読取装置10と同様の学習モデル52と、コード読取装置10と同様のモデルパラメータ254と、初期パラメータ256と、を含む。初期パラメータ256は、モデルパラメータ254の初期値(即ち中間層における各種の重みの初期値)である。初期パラメータ256は、例えば、情報読取システム2のベンダによって予め決められている。
The
教師データ242は、モデルパラメータ254の調整に利用される情報である。例えば、モデルパラメータ254は、複数個の教師データ242のそれぞれについて、当該教師データ242を入力した際の学習モデル252の出力と、当該教師データ242によって示される正解の値と、の誤差を最小化するように調整される。
The
(コード読取装置10の処理;図3)
図3を参照して、プログラム40に従って、コード読取装置10のCPU32が実行する処理について説明する。図3の処理は、コード読取装置10が、操作部12を介して、二次元コードの読み取りの開始の指示を受け付けることをトリガとして開始される。
(Processing of
Processing executed by the
CPU32は、S2において、操作部12を介して、撮像の指示を受け付けると、カメラ20を制御して、特定の媒体(例えば金属等)に表示されている二次元コードを撮像する。これにより、CPU32は、カメラ20から撮像済みの画像である撮像画像を示す撮像画像データを取得する。
In S2, when the
続くS4では、CPU32は、取得済みの撮像画像データによって示される撮像画像から二次元コードに記録されている情報を読み取るための通常読取処理を実行する。通常読取処理の詳細は、図4にて後述する。
In subsequent S4, the
続くS6では、CPU32は、通常読取処理における情報の読み取りが成功したのか否かを判断する。CPU32は、通常読取処理における情報の読み取りが成功したと判断する場合(S6でYES)に、S40に進む。一方、CPU32は、通常読取処理における情報の読み取りが失敗したと判断する場合(S6でNO)に、S10に進む。
In subsequent S6, the
S10では、CPU32は、S2での撮像の指示に応じた通常読取処理において情報の読み取りが失敗した回数が所定の閾値(例えば3回)より大きいのか否かを判断する。CPU32は、失敗回数が閾値以下であると判断する場合(S10でNO)に、S12に進む。
In S10, the
S12では、CPU32は、カメラ20の撮像の条件(例えば、感度、露光時間、発光源の有無、発光源の強さ等)を変更し、二次元コードを再び撮像する。CPU32は、S12が終了すると、S4に戻る。
In S12, the
また、CPU32は、失敗回数が閾値より大きいと判断する場合(S10でYES)に、S20に進む。S20では、CPU32は、メモリ34内のモデルパラメータ54が更新済みであるのか否かを判断する。モデルパラメータ54は、学習装置200から調整後のモデルパラメータ254が受信されて、調整後のモデルパラメータ254をモデルパラメータ54としてメモリ34に記憶されることによって更新される。CPU32は、モデルパラメータ54が更新済みであると判断する場合(S20でYES)に、S24に進む。
If the
S24では、CPU32は、カメラ20から取得した撮像画像データによって示される撮像画像から二次元コードに記録されている情報を読み取るための学習読取処理を実行する。学習読取処理は、S4の通常読取処理とは異なる処理であり、学習情報50を利用する処理である。学習読取処理の詳細は、図6にて後述する。
In S<b>24 , the
続くS26では、CPU32は、学習読取処理における情報の読み取りが成功したのか否かを判断する。CPU32は、学習読取処理における情報の読み取りが成功したと判断する場合(S26でYES)に、S40に進む。
In subsequent S26, the
S40では、CPU32は、S4の通常読取処理の読取結果及びS26の学習読取処理の読取結果のうちのいずれかを出力する。例えば、CPU32は、読取結果を示す画像を表示部14に表示させる。また、例えば、CPU32は、読取結果を示すデータを外部の装置(例えばPC等)に送信する。
In S40, the
S42では、CPU32は、S4の通常読取処理及びS26の学習読取処理のいずれかにおいて二次元コードの読み取りが成功する状況において、いずれかの処理の成功事例を教師データ242として学習装置200に送信する。教師データ242(即ち成功事例)の詳細については、図5において後述する。
In S42, the
続くS44では、CPU32は、操作部12を介して、二次元コードの読み取りの終了の指示を受け付けるのか否かを判断する。CPU32は、二次元コードの読み取りの終了の指示を受け付けたと判断する場合(S44でYES)に、図3の処理を終了する。一方、CPU32は、二次元コードの読み取りの終了の指示を受け付けていないと判断する場合(S44でNO)に、S2に戻り、二次元コードを再び撮像する。
In subsequent S<b>44 , the
また、CPU32は、モデルパラメータ54が一度も更新されていないと判断する場合(S20でNO)、及び、学習読取処理における情報の読み取りが失敗したと判断する場合(S26でNO)のうちのいずれかの場合において、S30に進む。S30では、CPU32は、二次元コードから情報を読み取ることが失敗したことを示す失敗通知を表示部14に表示させる。S30の処理が終了すると、図3の処理が終了する。
Further, the
(通常読取処理;図4)
図4を参照して、図3のS4における通常読取処理について説明する。S50では、CPU32は、撮像画像から二次元コードを示す画像であるコード画像を所定の画素数で切り取る切り取り処理を実行する。切り取り処理の具体例については、図22~図24にて後述する。
(Normal reading process; Fig. 4)
The normal reading process in S4 of FIG. 3 will be described with reference to FIG. In S50, the
S52では、CPU32は、S50で切り取られたコード画像の中から、二次元コードの四隅のうちの3か所に配置されているシンボルマークを特定する。CPU32は、特定済みの3個のシンボルマークから二次元コードの四隅のうちの3か所の座標L1、L2、L4を算出する。そして、CPU32は、算出済みの3個の座標L1、L2、L4から残りの座標L3を算出する。これにより、二次元コードの四隅の座標L1~L4が算出される。
At S52, the
S54では、CPU32は、S52で算出された四隅の座標L1~L4に基づいて、二次元コードを構成する各セルの座標を特定する。
In S54, the
S56では、CPU32は、コード画像に対する二値化処理を実行する。これにより、二次元コードの各セルが、白及び黒のいずれかに決定される。
In S56, the
S58では、CPU32は、S54で特定された各セルの座標と、S56の二値化処理において決定された各セルの白黒の値と、に基づいて、二次元コードをデコードするためのコード処理を実行する。ここで、デコード処理は、誤り訂正処理を含み得る。誤り訂正処理は、二次元コードの一部に汚れが付着している等により、元の二次元コードと撮像画像内の二次元コードとの間に差異が存在する場合に、各セルの座標及び各セルの白黒の値から元の二次元コードを復元する処理である。デコード処理において誤り訂正処理が複数回に亘って実行されたにも関わらず、二次元コードのデコードが失敗する場合に、図4の処理による二次元コードの読み取りは失敗する。一方、それ以外の場合には、図4の処理による二次元コードの読み取りは成功する。S58の処理が終了すると、図4の処理が終了する。
In S58, the
(学習装置200の処理;図5)
図5を参照して、プログラム240に従って、学習装置200のCPU232が実行する処理について説明する。図4の処理は、コード読取装置10から教師データ242を受信することをトリガとして開始される。ここで、教師データ242は、2個のコード読取装置10のうちの一方の装置から受信される。なお、変形例では、教師データ242は、2個のコード読取装置10の双方から受信されてもよい。
(Processing of learning
Processing executed by
S60では、CPU232は、コード読取装置10から受信した教師データ242をメモリ234に記憶する。ここで、本実施例における教師データ242は、図4の通常読取処理の成功事例として、S50で切り取られたコード画像を示すコード画像データと、S52で算出された四隅の座標L1~L4と、を含む。また、教師データ242は、後述する図6の学習読取処理の成功事例も含み得る。
In S<b>60 , the
S62では、CPU232は、メモリ234内の教師データ242の個数が目標数(例えば100個)以上であるのか否かを判断する。CPU232は、教師データ242の個数が目標数以上であると判断する場合(S62でYES)に、S64に進む。一方、CPU232は、教師データ242の個数が目標数より少ないと判断する場合(S62でNO)に、図5の処理を終了する。
In S62, the
S64では、CPU232は、メモリ234内の複数個の教師データ242を利用して、学習モデル252のモデルパラメータ254を調整するための学習処理を実行する。本実施例では、学習モデル252は、コード画像データを入力層に入力して、出力層から二次元コードの四隅の座標の推定値を出力するモデルである。S64の学習処理では、CPU232は、複数個の教師データ242の中から1個の教師データ242を選択し、選択済みの1個の教師データ242内のコード画像データを学習モデル252の入力層に入力する。これにより、学習モデル252の出力層から二次元コードの四隅の座標の推定値が出力される。CPU232は、選択済みの1個の教師データ242内の四隅の座標L1~L4と、学習モデル252から出力された推定値と、の差異が最小となるように、学習モデル252の中間層のモデルパラメータ254を調整する調整処理を実行する。CPU232は、複数個の教師データ242の全てについて、当該調整処理を実行する。なお、学習処理に利用された複数個の教師データ242は、メモリ234から削除される。そして、目標数以上の教師データ242が再びメモリ234に記憶されると、学習処理が再び実行される。これにより、モデルパラメータ254が繰り返し調整される。なお、学習処理の実行の頻度は、上記の例に限らず、例えば、教師データ242がコード読取装置10から受信される毎に学習処理が実行されてもよい。
In S<b>64 , the
S66では、CPU232は、S64で更新されたモデルパラメータ254の精度を検証するための検証処理を実行する。具体的には、CPU232は、疑似的なコード画像を示すコード画像データを学習モデル252に入力して、疑似的なコード画像の四隅の座標の推定値を取得する。CPU232は、取得済みの推定値を利用して、疑似的なコード画像に対して図4のS54~S58と同様の処理を実行して、疑似的なコード画像によって示される二次元コードの読み取りを実行する。CPU232は、疑似的な二次元コードの読み取りにおいて実行された誤り訂正処理の回数をカウントする。そして、CPU232は、カウントの回数が所定の回数(例えば2回)以下である場合に、モデルパラメータ254の精度が良好であることを示す検証結果「OK」を決定する。一方、CPU232は、カウントの回数が所定の回数より多い場合に、モデルパラメータ254の精度が良好でないことを示す検証結果「NG」を決定する。なお、変形例では、検証処理は、誤り訂正処理の回数に基づく検証に限らず、例えば、学習モデル252による四隅の座標の推定値と疑似的なコード画像の実際の四隅の座標との差異に基づく検証等であってもよい。
In S66, the
S68では、CPU232は、S66の検証結果が「OK」を示すのか否かを判断する。CPU232は、検証結果が「OK」を示すと判断する場合(S68でYES)に、S70に進む。一方、CPU232は、検証結果が「NG」を示すと判断する場合(S68でNO)に、S70の処理をスキップして、図5の処理を終了する。
In S68, the
S70では、CPU232は、S64において調整されたモデルパラメータ254をコード読取装置10に送信する。ここで、調整後のモデルパラメータ254は、教師データ242の送信元である第1のコード読取装置10だけでなく、2個のコード読取装置10のうち、上記の送信元でない第2のコード読取装置10にも送信される。このような構成によれば、第2のコード読取装置10において、別のコード読取装置10における成功事例を利用した学習読取処理(図6参照)を実行することができる。なお、変形例では、調整後のモデルパラメータ254は、第2のコード読取装置10に送信されなくてもよい。S70が終了すると、図5の処理が終了する。
At S70, the
(学習読取処理;図6)
図6を参照して、図3のS24における学習読取処理について説明する。S80は、図4のS50と同様である。S82では、コード読取装置10のCPU32は、S80で切り取られたコード画像を示すコード画像データをメモリ34内の学習モデル52に入力して、当該学習モデル52から当該コード画像の四隅の座標の推定値を取得する。S84~S88は、S82で取得された推定値が利用される点を除いて、図4のS54~S58と同様である。S88が終了すると、図6の処理が終了する。
(Learning reading process; FIG. 6)
The learning reading process in S24 of FIG. 3 will be described with reference to FIG. S80 is the same as S50 in FIG. In S82, the
(本実施例の効果)
本実施例の構成によれば、学習装置200は、図4の通常読取処理のS52によって算出された二次元コードの四隅の座標L1~L4を利用したデコード処理の複数の成功事例を含む教師データ242を利用して、二次元コードの画像から二次元コードの四隅の座標の推定値を出力する学習モデル252のモデルパラメータ254を調整する(図5のS64)。そして、コード読取装置10は、撮像条件を変更するものの、通常読取処理における読取が失敗する場合(図3のS12の後にS10でNO)に、学習読取処理を実行する(S24)。学習読取処理では、通常読取処理のS52による算出に代えて、学習モデル52を利用して四隅の座標の推定値を出力する処理が実行される(図6のS82)。例えば、二次元コードの経年劣化により二次元コードの四隅の座標L1~L4の算出が失敗することに起因して、通常読取処理による読み取りが失敗することが想定される。本実施例では、二次元コードの経年劣化により二次元コードの四隅の座標L1~L4の算出が失敗する場合であっても、学習読取処理を実行することにより、二次元コード内の情報を読み取ることができる。
(Effect of this embodiment)
According to the configuration of the present embodiment, the
例えば、情報読取システム2が学習装置200を備えず、コード読取装置10が図6の処理を実行する比較例が想定される。この比較例では、コード読取装置10が、二次元コードの読み取りだけでなく、学習モデル52のモデルパラメータ54の調整も実行する。このため、学習モデル52のモデルパラメータ54の調整を実行していなかった従来の装置と比べて、コード読取装置10のCPU32の処理能力を高める必要があり得る。これに対して、本実施例の構成によれば、学習モデル252のモデルパラメータ254の調整は、コード読取装置10とは別体の学習装置200によって実行される。このため、コード読取装置10のCPU32の処理能力を高めなくても、モデルパラメータ254の調整を実行することができる。なお、変形例では、上記の比較例の構成を採用してもよい。
For example, a comparative example is assumed in which the
(対応関係)
情報読取システム2が、「情報読取装置」の一例である。図2の2個のコード読取装置10、そのうちの一方のコード読取装置10、そのうちの他方のコード読取装置10が、ぞれぞれ、「1個以上のコード読取装置」、「第1のコード読取装置」、「第2のコード読取装置」の一例である。カメラ20が、「カメラ」の一例である。学習装置200が、「学習装置」の一例である。二次元コードが、「情報コード(第1の情報コード及び第2の情報コード)」の一例である。二次元コードの四隅の座標L1~L4が、「第1の関係情報」の一例である。二次元コードの四隅の座標の推定値が、「関係情報(及び第2の関係情報)」の一例である。教師データ242、学習モデル252、モデルパラメータ254が、それぞれ、「教師データ」、「学習モデル」、「パラメータ」の一例である。図4の処理及び図3のS40が、「第1のコード処理」の一例である。図4のS52、S58、図3のS40が、それぞれ、「検出処理」、「読取処理」、「出力処理」の一例である。図6の処理及び図3のS40が、「第2のコード処理」の一例である。図6のS82が、「取得処理」の一例である。
(correspondence relationship)
The
コード読取装置10の制御部30が、「第1のコード処理実行部」及び「第2のコード処理実行部」の一例である。学習装置200の制御部230が、「調整部」の一例である。
The
(第2実施例)
本実施例は、コード読取装置10の処理の内容が一部異なる点を除いて、第1実施例と同様である。
(Second embodiment)
This embodiment is the same as the first embodiment, except that the contents of the processing of the
(コード読取装置10の処理;図7)
本実施例のコード読取装置10の処理は、S100~S102の処理が追加され、S42に代えてS104の処理が実行されることを除いて、第1実施例のコード読取装置10の処理である図3の処理と同様である。なお、第1実施例と同様の処理については、同一の符号が付されており、後述する各実施例でも同様である。
(Processing of
The processing of the
図7に示すように、CPU32は、S40において、読取結果を出力すると、S100において、劣化分類処理を実行する。劣化分類処理は、読取対象の二次元コードを劣化のパターンに応じて分類し、当該二次元コードの読取結果に対応する成功事例を教師データ242として教師データテーブル60に記憶する処理である。劣化のパターンは、汚れの付着の有無、欠損の有無、劣化の箇所等に基づくパターンである。劣化分類処理については、図8で後述する。
As shown in FIG. 7, when the
教師データテーブル60は、コード読取装置10のメモリ34に記憶される。図7に示すように、教師データテーブル60は、複数の劣化のパターンのそれぞれについて、パターン番号(例えば「p001」)と、データ群(例えば「TD1、TD2」)と、上限値(例えば「20」)と、を対応付けて記憶するテーブルである。パターン番号は、対応する劣化のパターンを識別する番号である。データ群は、対応する劣化のパターンとして分類された1個以上の教師データ242である。上限値は、対応する劣化のパターンにおいて記憶可能な教師データ242の個数の上限値である。
The teacher data table 60 is stored in the
続くS102では、CPU32は、教師データテーブル60に記憶された教師データ242の個数が目標数以上であるのか否かを判断する。ここで、目標数は、例えば、図5のS62の目標数と同一である。CPU32は、教師データ242の個数が目標数以上である判断する場合(S102でYES)に、S104に進む。一方、CPU32は、教師データ242の個数が目標数より少ないと判断する場合(S102でNO)に、S104の処理をスキップして、S44に進む。
In subsequent S102, the
S104では、CPU32は、教師データテーブル60内の教師データ242の全てを学習装置200に送信する。CPU32は、S104が終了すると、S44に進む。
At S<b>104 , the
(劣化分類処理;図8)
図8を参照して、図7のS100の劣化分類処理について説明する。S110では、CPU32は、図7のS4の通常読取処理又はS24の学習読取処理において誤り訂正処理が実行されたのか否かを判断する。CPU32は、誤り訂正処理が実行されたと判断する場合(S110でYES)に、S112に進む。一方、CPU32は、誤り訂正処理が実行されなかったと判断する場合(S110でNO)に、S112の処理をスキップして、S114に進む。
(Deterioration classification process; Fig. 8)
The deterioration classification process of S100 of FIG. 7 will be described with reference to FIG. In S110, the
S112では、CPU32は、誤り訂正処理において復元された二次元コードである復元コードの画像と、実際に撮像された二次元コードである実コードの二値化画像と、を比較して、実コードの劣化のパターンを決定するパターン決定処理を実行する。復元コードの画像は、白黒の二値で表される。また、実コードの二値化画像は、実コードの実際の画像を二値化した画像である。パターン決定処理については、図9で後述する。CPU32は、S112の処理が終了すると、S114に進む。
In S112, the
S114では、CPU32は、教師データテーブル60内の対象のデータ群の記憶数が、当該対象のデータ群に対応する上限数に到達しているのか否かを判断する。ここで、対象のデータ群は、誤り訂正処理が実行されていない場合(S110でNO)には、劣化の無いパターンを識別するパターン番号に対応付けられているデータ群である。また、対象のデータ群は、誤り訂正処理が実行された場合(S110でYES)には、パターン決定処理により決定されたパターンを識別するパターン番号に対応付けられているデータ群である。CPU32は、対象のデータ群の記憶数が上限数に到達していないと判断する場合(S114でNO)に、S116に進む。一方、CPU32は、対象のデータ群の記憶数が上限数に到達していると判断する場合(S114でYES)に、S116の処理をスキップして、図8の処理を終了する。
In S114, the
S116では、CPU32は、図7のS40の読取結果に対応する成功事例を教師データ242として教師データテーブル60に記憶する。S116が終了すると、図8の処理が終了する。
At S116, the
例えば、S114の判断を実行せずに、成功事例の全てを教師データ242として教師データテーブル60に記憶する比較例が想定される。本実施例の構成によれば、S114の判断により、教師データテーブル60内の教師データ242の記憶数を制限することができる。比較例と比べて、教師データテーブル60を記憶するメモリ34の使用量を低減することができる。なお、変形例では、比較例の構成が採用されてもよい。
For example, a comparative example is assumed in which all successful cases are stored as
(パターン決定処理;図9)
図9を参照して、図8のS112のパターン決定処理について説明する。本実施例では、劣化の箇所を分類するために、二次元コードが9個の領域に等分割される。9個の領域のそれぞれには、劣化の種類を示す値である劣化値が対応付けられる。S130では、CPU32は、9個の領域のうちの1個の領域を対象領域に決定する。なお、領域の分割数は、9個に限らず、例えば、4個、12個等であってもよい。また、領域の分割は、等分割に限らず、例えば、領域の大きさが互いに異なっていてもよい。
(Pattern determination processing; FIG. 9)
The pattern determination process of S112 in FIG. 8 will be described with reference to FIG. In this embodiment, the two-dimensional code is equally divided into nine areas in order to classify the locations of deterioration. Each of the nine regions is associated with a deterioration value, which is a value indicating the type of deterioration. In S130, the
S132では、CPU32は、復元コードの画像の対象領域と実コードの二値化画像の対象領域との間に差異があるのか否かを判断する。復元コードの画像の対象領域と実コードの二値化画像の対象領域との間に差異があることは、撮像済みの二次元コードの対象領域が劣化していることを意味する。CPU32は、両コードの対象領域の間に差異があると判断する場合(S132でYES)に、S134に進む。一方、CPU32は、両コードの対象領域の間に差異がないと判断する場合(S132でNO)に、S134~S138の処理をスキップして、S140に進む。
In S132, the
S134では、CPU32は、両コードの対象領域の間の差異が、黒劣化に対応する差異であるのか、白劣化に対応する差異であるのか、を判断する。ここで、黒劣化は、二次元コードの白いセルが黒く変色する劣化である。黒劣化は、例えば、黒色のインクが二次元コードに付着する汚れである。また、白劣化は、二次元コードの黒いセルが白く変色する劣化である。白劣化は、例えば、白色のインクが二次元コードに付着する汚れ、二次元コードの黒いセルの欠損等である。
In S134, the
CPU32は、両コードの対象領域の間の差異が黒劣化に対応する差異であると判断する場合(S134でYES)に、S136に進む。S136では、CPU32は、対象領域に対応する劣化値を、黒劣化を示す値「黒」に決定する。一方、CPU32は、両コードの対象領域の間の差異が白劣化に対応する差異であると判断する場合(S134でNO)に、S138に進む。S138では、CPU32は、対象領域に対応する劣化値を、白劣化を示す値「白」に決定する。CPU32は、S136及びS138のいずれかが終了すると、S140に進む。
When the
S140では、CPU32は、9個の領域の中に対象領域として未選択の領域が存在するのか否かを判断する。CPU32は、対象領域として未選択の領域が存在すると判断する場合(S140でYES)に、S130に戻る。一方、CPU32は、対象領域として未選択の領域が存在しない、即ち、9個の領域の全てについてS132~S138の処理が実行された場合(S140でNO)に、図9の処理を終了する。
In S140, the
(本実施例の効果)
モデルパラメータ254の信頼性を確保するためには、目標数(例えば100)を上回る成功事例が必要となる。しかし、成功事例を無条件に教師データ242として採用すると、教師データ242の個数が目標数を上回ったタイミングにおいて、成功事例のばらつきが、例えば、特定の劣化のパターン(例えば特定の領域の黒劣化)における事例に偏る可能性がある。本実施例の構成によれば、コード読取装置10は、読取対象の二次元コードの成功事例を二次元コードの劣化のパターンで分類する(図8のS112)。そして、コード読取装置10は、分類結果に基づいて、読取対象の二次元コードの成功事例を教師データ242として教師データテーブル60に記憶するのか否かを判断する(S114)。これにより、教師データ242としての成功事例が、特定の劣化のパターンにおける事例に偏ることを抑制することができる。
(Effect of this embodiment)
To ensure reliability of the
また、本実施例では、劣化のパターンの分類において、汚れの付着の有無、欠損の有無、劣化の箇所が利用される。ここで、変形例では、劣化のパターンの分類において、コントラストが利用されてもよい。例えば、図4のS50又は図6のS80切り取り処理におけるコード画像の輝度値の上限値と下限値の差分の値に基づいて劣化のパターンが分類されてもよい。例えば、当該差分の値が第1の値域内の値である場合に、読取対象の二次元コードの成功事例が、第1のパターンに分類され、当該差分の値が第1の値域とは異なる第2の値域内の値である場合に、読取対象の二次元コードの成功事例が、第2のパターンに分類されてもよい。本変形例では、汚れの付着、欠損による劣化では分類できない、コントラストに基づく劣化を分類することができる。また、他の変形例では、汚れの付着、欠損に基づく分類と、コントラストに基づく分類と、を組み合わせて、二次元コードの劣化を分類してもよい。 In addition, in the present embodiment, presence/absence of adhesion of dirt, presence/absence of defects, and locations of deterioration are used in classifying patterns of deterioration. Here, in a modified example, contrast may be used in classifying deterioration patterns. For example, deterioration patterns may be classified based on the value of the difference between the upper limit value and the lower limit value of the luminance value of the code image in the cutting process in S50 of FIG. 4 or S80 of FIG. For example, when the value of the difference is a value within the first value range, the successful case of the two-dimensional code to be read is classified into the first pattern, and the value of the difference is different from the first value range. If the value is within the second value range, the successful case of the two-dimensional code to be read may be classified into the second pattern. In this modified example, it is possible to classify deterioration based on contrast, which cannot be classified by deterioration due to adhesion of dirt or defects. Further, in another modified example, the deterioration of the two-dimensional code may be classified by combining the classification based on the attachment or loss of dirt and the classification based on the contrast.
また、他の変形例では、劣化のパターンの分類において、情報コードの変形が利用されてもよい。情報コードの変形は、例えば、図16の太り細り現象、図17の歪み現象、図18のピッチずれ現象等である。情報コードの変形は、例えば、二次元コードを印刷する印刷装置の劣化や、情報コードが印刷される媒体の印刷時における不安定な支持に起因して発生する。 In another modification, modification of the information code may be used in classifying the pattern of deterioration. The deformation of the information code includes, for example, the thickening and thinning phenomenon in FIG. 16, the distortion phenomenon in FIG. 17, the pitch deviation phenomenon in FIG. The deformation of the information code occurs due to, for example, deterioration of the printing device that prints the two-dimensional code, or unstable support during printing of the medium on which the information code is printed.
(太り細り現象による分類;図16)
太り細り現象は、太り現象と、細り現象と、を含む。太り現象は、黒いセルの実際の幅が、理想的な幅によりも太い現象である。一方、細り現象は、黒いセルの実際の幅が、理想的な幅によりも細い現象である。
(Classification by thickening and thinning phenomenon; Fig. 16)
The thickening/thinning phenomenon includes a thickening phenomenon and a thinning phenomenon. Thickening is a phenomenon in which the actual width of a black cell is thicker than the ideal width. On the other hand, the thinning phenomenon is a phenomenon in which the actual width of the black cell is narrower than the ideal width.
太り細り現象の程度を示す太り細り割合は、例えば、二次元コードのタイミングパターンを分析して算出される。タイミングパターンは、シンボルマークの座標の特定に利用される。タイミングパターンは、白色のセルと黒色のセルが交互に並ぶパターンである。横方向における太り細り割合は、例えば、横方向のタイミングパターンの横方向における全長に対する、横方向のタイミングパターンの黒いセルの幅の合計と横方向のタイミングパターンの白いセルの幅の合計との差分の割合として算出される。横方向における太り細り割合「0%」は、太り細り現象が発生していないことを意味し、横方向における太り細り割合が正の値を示すことは、横方向に太り現象が発生していることを意味し、横方向における太り細り割合が負の値を示すことは、横方向に細り現象が発生していることを意味する。また、縦方向における太り細り割合は、縦方向のタイミングパターンを利用して、横方向における太り細り割合と同様に算出される。二次元コード全体の太り細り割合は、例えば、横方向における太り細り割合と縦方向における太り細り割合との平均値として算出される。なお、変形例では、全体の太り細り割合として、横方向における太り細り割合と縦方向における太り細り割合のうちの大きい値が利用されてもよいし、横方向における太り細り割合と縦方向における太り細り割合のうちの一方のみが利用されてもよい。 The thickening/thinning ratio indicating the degree of the thickening/thinning phenomenon is calculated, for example, by analyzing the timing pattern of the two-dimensional code. The timing pattern is used to specify the coordinates of the symbol mark. The timing pattern is a pattern in which white cells and black cells are alternately arranged. The width ratio in the horizontal direction is, for example, the difference between the total width of black cells in the horizontal timing pattern and the total width of white cells in the horizontal timing pattern with respect to the total length of the horizontal timing pattern in the horizontal direction. calculated as a percentage of A ratio of fat thinning in the horizontal direction of 0% means that the fat thinning phenomenon has not occurred, and a positive value of the fat thinning ratio in the horizontal direction indicates that the fat thinning phenomenon has occurred in the horizontal direction. In other words, the fact that the ratio of thickening and thinning in the horizontal direction shows a negative value means that the phenomenon of thinning has occurred in the horizontal direction. In addition, the fatness/thinness ratio in the vertical direction is calculated in the same way as the fatness/thinness ratio in the horizontal direction using the timing pattern in the vertical direction. The fatness/thinness ratio of the entire two-dimensional code is calculated, for example, as an average value of the fatness/thinness ratio in the horizontal direction and the fatness/thinness ratio in the vertical direction. Note that, in the modified example, the larger value of the ratio of fatness and thinning in the horizontal direction and the ratio of fatness and thinning in the vertical direction may be used as the overall fatness and thinning ratio. Only one of the thinning ratios may be used.
本変形例では、CPU32は、全体の太り細り割合に基づいて読取対象の二次元コードの成功事例が分類され、教師データテーブル60に記憶される(図8のS116参照)。例えば、図16に示すように、全体の太り細り割合の5個の値域に基づいて読取対象の二次元コードの成功事例が分類される。なお、図16の5個の値域は、一例に過ぎないことに留意されたい。
In this modified example, the
(歪み現象による分類;図17)
一般に、二次元コードの縦の長さと横の長さの比(以下では「縦横比」)は、1:1である。歪み現象は、二次元コードの縦の長さに対して二次元コードの横の長さが歪み、縦横比が1:1から変化する現象である。縦横比は、例えば、縦方向に隣接するセルの中心間の距離と、横方向に隣接するセルの中心間の距離と、の比として算出される。
(Classification by distortion phenomenon; Fig. 17)
In general, the ratio of the vertical length to the horizontal length of the two-dimensional code (hereafter referred to as the "length-to-width ratio") is 1:1. The distortion phenomenon is a phenomenon in which the horizontal length of the two-dimensional code is distorted with respect to the vertical length of the two-dimensional code, and the aspect ratio changes from 1:1. The aspect ratio is calculated, for example, as a ratio of the distance between the centers of vertically adjacent cells and the distance between the centers of horizontally adjacent cells.
本変形例では、CPU32は、縦横比に基づいて読取対象の二次元コードの成功事例が分類され、教師データテーブル60に記憶される(図8のS116参照)。例えば、図17に示すように、縦横比の6個のパターンに基づいて読取対象の二次元コードの成功事例が分類される。なお、図17の6個のパターンは、一例に過ぎないことに留意されたい。
In this modification, the
(ピッチずれ現象による分類;図18)
一般に、二次元コードを構成するセルは、縦方向及び横方向において一定の間隔(即ちピッチ)で並ぶ。ピッチずれ現象は、隣接するセルのピッチが、上記の一定の間隔である理想のピッチからずれる現象である。ピッチずれの程度を示すピッチずれ割合は、例えば、理想のピッチに対する、最大のピッチずれの量の割合として算出される。ピッチずれの量は、理想のピッチと隣接するセルの中心間の距離との間の差分の絶対値として算出される。なお、変形例では、ピッチずれ割合は、例えば、理想のピッチに対する、ピッチずれの量の平均値の割合であってもよい。
(Classification by pitch deviation phenomenon; Fig. 18)
In general, cells forming a two-dimensional code are arranged at regular intervals (that is, pitch) in the vertical and horizontal directions. The pitch deviation phenomenon is a phenomenon in which the pitch of adjacent cells deviates from the above-described ideal pitch, which is a constant interval. The pitch deviation ratio indicating the degree of pitch deviation is calculated, for example, as the ratio of the maximum amount of pitch deviation to the ideal pitch. The amount of pitch deviation is calculated as the absolute value of the difference between the ideal pitch and the distance between adjacent cell centers. Note that, in a modified example, the pitch deviation ratio may be, for example, the ratio of the average value of the amount of pitch deviation to the ideal pitch.
本変形例では、CPU32は、ピッチずれ割合に基づいて読取対象の二次元コードの成功事例が分類され、教師データテーブル60に記憶される(図8のS116参照)。例えば、図18に示すように、ピッチずれ割合の4個の値域に基づいて読取対象の二次元コードの成功事例が分類される。なお、図18の4個の値域は、一例に過ぎないことに留意されたい。
In this modification, the
(対応関係)
図7のS102の目標数が、「所定の数」の一例である。コード読取装置10のメモリ34が、「第1のメモリ」の一例である。図7のS100の処理を実行するコード読取装置10の制御部30が、「分類部」及び「判断部」の一例である。
(correspondence relationship)
The target number in S102 of FIG. 7 is an example of the "predetermined number". The
(第3実施例)
本実施例は、コード読取装置10の処理の内容及び学習装置200の処理の内容が一部で異なる点を除いて、第1実施例と同様である。
(Third embodiment)
This embodiment is the same as the first embodiment, except that the content of the processing of the
(コード読取装置10の処理;図10)
本実施例のコード読取装置10の処理は、S200の処理が追加される点を除いて、第1実施例のコード読取装置10の処理である図3の処理と同様である。
(Processing of
The processing of the
図10に示すように、CPU32は、S4において、通常読取処理を実行すると、S200において、通常読取処理において実行された処理の事例に関する事例情報を学習装置200に送信する。これにより、事例情報が、学習装置200のメモリ234内の事例テーブル270(図11参照)に記憶される。このような構成によれば、通常読取処理が実行される毎に、事例情報を事例テーブル270に記憶して、事例情報を蓄積することができる。
As shown in FIG. 10, after executing the normal reading process in S4, the
図11に示すように、事例テーブル270は、通常読取処理において実行された様々な処理について、当該処理の内容を示す処理情報と、当該処理の原因を示す原因情報と、発生回数と、を対応付けて記憶するテーブルである。処理情報は、例えば、通常読取処理において少なくとも1個のシンボルマークの特定に失敗したことを示す「シンボル」、通常読取処理において誤り訂正処理が実行されたことを示す「誤り訂正」等を示す。また、原因情報は、対応する処理の発生原因を示す情報であり、例えば、「黒劣化」、「白劣化」等の劣化の種類を示す(図9参照)。発生回数は、対応する処理情報と対応する原因情報の組合せによって示される処理の発生の回数を示す。発生回数は、対応する処理情報と対応する原因情報の組合せ(即ち事例情報)がコード読取装置10から受信される毎にインクリメントされる。
As shown in FIG. 11, the case table 270 corresponds to processing information indicating the content of the processing, cause information indicating the cause of the processing, and the number of occurrences of various processing executed in the normal reading processing. This is a table that is stored with the The processing information indicates, for example, "symbol" indicating that at least one symbol mark has failed to be specified in the normal reading process, "error correction" indicating that error correction processing was executed in the normal reading process, and the like. The cause information is information indicating the cause of occurrence of the corresponding process, and indicates the type of deterioration such as "black deterioration" and "white deterioration" (see FIG. 9). The number of occurrences indicates the number of occurrences of the process indicated by the combination of the corresponding process information and the corresponding cause information. The number of occurrences is incremented each time a combination of corresponding processing information and corresponding cause information (that is, case information) is received from the
例えば、コード読取装置10が所定の領域(例えば所定の工場)で利用される状況において、二次元コードの黒劣化が発生し易い場合には、事例テーブル270内の原因情報「黒劣化」に対応する発生回数が比較的に多くなる。事例テーブル270内の情報によって、コード読取装置10が利用される状況における劣化の傾向を知ることができる。
For example, in a situation where the
(学習装置200の処理;図11)
本実施例の学習装置200の処理は、図5のS62に代えてS205の処理が実行され、かつ、S210及びS220の処理が追加される点を除いて、第1実施例の学習装置200の処理である図5の処理と同様である。
(Processing of learning
The processing of the
S205は、目標数よりも少ないサブ目標数(例えば50個)を基準に判断される点を除いて、図5のS64と同様である。CPU232は、メモリ234内の教師データ242の個数がサブ目標数以上であると判断する場合(S62でYES)に、S210に進む。
S205 is the same as S64 in FIG. 5, except that the determination is made based on a sub-target number (for example, 50) that is smaller than the target number. When the
S210では、CPU232は、後述するS220で実行すべき1個以上の加工処理を決定する。加工処理は、メモリ234内の教師データ242を加工して新しい教師データ242を生成する処理である。加工処理では、事例テーブル270内の情報が利用される。例えば、CPU32は、事例テーブル270から、最も多い発生回数に対応付けて記憶されている事例情報(即ち処理情報と原因情報)を特定する。そして、CPU32は、特定済みの事例情報に従って、S220で実行すべき加工処理を決定する。また、CPU32は、事例テーブル270から、次に多い発生回数に対応付けて記憶されている事例情報を特定して、特定済みの事例情報に従った別の加工処理を決定する。また、例えば、CPU32は、事例テーブル270からランダムに事例情報を特定してもよい。CPU32は、1個の加工処理を決定してもよいし、2個以上の加工処理を決定してもよい。
At S210, the
教師データ242を加工する加工処理は、様々である。例えば、加工処理は、特定済みの処理情報が「シンボル」を示し、特定済みの原因情報が「白劣化」を示す場合には、教師データ242によって示されるコード画像に対して、シンボルマークの一部を白く変色する画像処理を実行する処理である。当該画像処理は、例えば、シンボルマークの一部に白色の画像を追加する処理、シンボルマークを構成する複数のセルのうちの一部を縮小又は拡大する処理等である。また、例えば、特定済みの処理情報が「誤り訂正」を示す場合には、当該画像処理は、シンボルマークを構成するセル以外のセルを対象としてもよい。
There are various processing processes for processing the
また、例えば、CPU32は、原因情報(例えば「白劣化」)に従った画像処理に加えて、教師データ242によって示されるコード画像に対して、コード画像のコントラストを調整する処理、コード画像を回転する処理等を含む様々な画像処理を実行してもよい。これにより、加工後の教師データ242のバリエーションが増える。なお、コード画像を回転する処理が実行される場合には、例えば、教師データ242によって示される四隅の座標L1~L4の値も、コード画像と同様の回転角度で回転された値に変換されてもよい。
Further, for example, in addition to image processing according to cause information (for example, “white deterioration”), the
また、例えば、CPU32は、加工処理として、原因情報に従った画像処理を実行することなく、コード画像のコントラストを調整する処理、コード画像を回転する処理等を実行してもよい。
Further, for example, the
S210に続くS220では、CPU32は、S210で決定された1個以上の加工処理のそれぞれを実行する。CPU32は、例えば、白色の画像を追加する箇所、コード画像を回転する回転角度等を調整して、1個の加工処理を複数回に亘って実行する。CPU32は、メモリ234内の教師データ242の個数が所定の目標個数(例えば100個)に到達するまで、1個以上の加工処理のそれぞれを複数回に亘って実行する。CPU232は、S220が終了すると、S64に進む。
In S220 following S210, the
(本実施例の効果)
モデルパラメータ254の信頼性を確保するためには、目標数(例えば100個)を上回る成功事例が必要となる。本実施例の構成によれば、成功事例の個数が目標数を上回らない状況において、加工処理を実行して、仮想的な成功事例、即ち、仮想的な教師データ242を生成することができる(図11のS220)。これにより、成功事例の個数、即ち、教師データ242の個数を増やすことができる。成功事例の個数が目標数を上回らなくても、モデルパラメータ254の信頼性を確保することができる。また、実際の成功事例の個数が目標数に到達しない状況において、比較的に信頼性の高いモデルパラメータ254を速やかに生成することができる。
(Effect of this embodiment)
In order to ensure the reliability of the
また、例えば、事例テーブル270を備えない比較例、例えば、学習装置200の管理者等によって予め決定されている画像処理を利用した加工処理を実行する比較例が想定される。この比較例では、加工処理が、実際の読取処理の事例とは異なる事例に対応している可能性がある。本実施例の構成によれば、事例テーブル270によって実際の通常読取処理の事例が蓄積される。そして、学習装置200は、事例テーブル270から1個以上の加工処理を決定する(図11のS210)。実際の読取処理の事例の傾向を考慮した適切な加工処理を実行することができる。
Further, for example, a comparative example that does not include the case table 270, for example, a comparative example that executes processing using image processing that is predetermined by an administrator or the like of the
(対応関係)
図11のS220の処理を実行する学習装置200の制御部230が、「増加制御部」の一例である。学習装置200のメモリ234が、「第2のメモリ」の一例である。図10のS200によって送信された事例情報をメモリ234に記憶する制御部230が、「第2の記憶制御部」の一例である。
(correspondence relationship)
(第4実施例)
(コード読取装置10及び学習装置200の処理;図10、11)
本実施例は、複数個の事例テーブル270(図11参照)が利用される点、及び、図10のS200で送信される事例情報の内容とS42で送信される教師データ242の内容が一部異なる点を除いて、第3実施例と同様である。
(Fourth embodiment)
(Processing of
In this embodiment, a plurality of case tables 270 (see FIG. 11) are used, and the contents of the case information transmitted in S200 of FIG. It is the same as the third embodiment except for the different points.
読取対象の二次元コードは、様々である。例えば、二次元コードは、様々な媒体(例えば基板、金属、紙媒体等)に表示される。また、例えば、二次元コードは、様々な表示方法(例えば、印刷、切削等)によって媒体上に表示される。また、例えば、二次元コードは、様々な規格(例えば、サイズ、暗号化等の規格)のうちの特定の規格に従って生成される。複数個の事例テーブル270のそれぞれは、読取対象の二次元コードの複数の種類のそれぞれと対応する。 There are various types of two-dimensional codes to be read. For example, the two-dimensional code is displayed on various media (eg substrate, metal, paper media, etc.). Also, for example, the two-dimensional code is displayed on the medium by various display methods (eg, printing, cutting, etc.). Also, for example, the two-dimensional code is generated according to a specific standard among various standards (for example, size, encryption, etc.). Each of the plurality of case tables 270 corresponds to each of the plurality of types of two-dimensional code to be read.
図10のS200で学習装置200に送信される事例情報は、第3実施例の情報(即ち処理情報と原因情報)に加えて、通常読取処理の読取対象の二次元コードの種類を特定するための特定情報が含まれる。特定情報は、読取対象の媒体、表示方法、規格等を示す情報である。特定情報は、例えば、コード読取装置10のユーザによってコード読取装置10に入力される。
The case information transmitted to the
学習装置200は、コード読取装置10から特定情報を含む事例情報を受信すると、事例情報内の特定情報を利用して、メモリ234内の複数の事例テーブル270の中から受信済みの事例情報を記憶すべき1個の事例テーブル270を特定する。そして、学習装置200は、受信済みの事例情報内の情報を特定済みの1個の事例テーブル270に記憶する。
When the
また、図10のS42では、コード読取装置10は、教師データ242とともに上記の特定情報を学習装置200に送信する。
In addition, in S42 of FIG. 10, the
学習装置200は、コード読取装置10から教師データ242と特定情報とを受信すると、図11のS60において、受信済みの特定情報によって特定される種類に対応する教師データ242として受信済みの教師データ242をメモリ234に記憶する。そして、学習装置200は、受信済みの特定情報に対応する教師データ242の個数がサブ目標値以上であると判断する場合(S205でYES)に、S210以降の処理に進む。具体的には、学習装置200は、教師データ242内の特定情報を利用して、メモリ234内の複数の事例テーブル270の中から図11のS64の学習処理で利用すべき1個の事例テーブル270を特定する。そして、学習装置200は、特定済みの1個の事例テーブル270を利用して、S210以降の処理を実行する。
When learning
本実施例の構成によれば、読取対象の二次元コードの様々な種類毎に事例情報を蓄積する。例えば、特定の種類の読取対象は、コード読取装置10が利用された直近の日時だけでなく、過去の日時でも読み取られ得る。また、特定の種類の読取対象は、コード読取装置10が利用される所定の領域とは異なる領域でも読み取られ得る。本実施例の構成によれば、直近の日時、所定の領域で読み取られた特定の種類の二次元コードの事例だけでなく、過去の日時、異なる領域等で読み取られた特定の種類の二次元コードの事例を利用して、加工処理(図11のS220)を実行することができる。
According to the configuration of this embodiment, case information is accumulated for each of various types of two-dimensional codes to be read. For example, a specific type of reading target can be read not only at the most recent date and time when the
(第5実施例)
本実施例は、教師データ242の内容及び学習モデル252によって出力される値が異なる点と、学習読取処理の一部が異なる点と、を除いて、第1実施例と同様である。
(Fifth embodiment)
This embodiment is the same as the first embodiment, except that the contents of the
(教師データと学習モデル;図12)
本実施例の学習モデル252は、コード画像データを入力層に入力して、出力層から二次元コードのセルの白黒のパターンの推定値を出力するモデルである。二次元コードのセルの白黒のパターンのデータ(以下では、「パターンデータ」と記載)は、例えば、通常読取処理で特定された各セルの座標(例えば図4のS54参照)と、同処理の二値化処理において決定された各セルの白黒の値と、に基づいて生成される。例えば、各セルの座標は、左上のセルを原点(0、0)として、右上のセル、左下のセル、及び、右下のセルのそれぞれを(N、0)、(0、N)、(N、N)と定義される。ここで「N」は、二次元コードの一辺のセルの個数であり、例えば、24である。そして、各セルの座標には、左上のセル、右上のセル、左下のセル、及び、右下のセルの順番に連番が付される。パターンデータは、各セルの連番のそれぞれについて、当該連番によって示されるセルの白黒の値を対応付けたデータである。ここで、白黒の値は、例えば、「白」が「1」を示し、「黒」が「0」を示す。なお、図4の通常読取処理のS58において誤り訂正処理が実行される場合には、パターンデータ内の白黒の値は、誤り訂正処理によって復元された値であってもよい。
(Teacher data and learning model; Fig. 12)
The
本実施例の教師データ242は、図4の通常読取処理のS50で切り取られたコード画像を示すコード画像データと、上記のパターンデータと、を含む。学習装置200は、当該教師データ242を利用して、モデルパラメータ254を調整するための学習処理を実行する(図5のS64参照)。なお、教師データ242は、本実施例において後述する図13の学習読取処理のS80で切り取られたコード画像を示すコード画像データと、図13の学習読取処理に基づいて生成されるパターンデータと、を含んでもよい。この場合、当該パターンデータは、図13のS84で特定された各セルの座標と、同処理のS300で推定された各セルの白黒の値と、に基づいて生成されてもよい。
The
(学習読取処理;図13)
本実施例の学習読取処理は、S86の二値化処理に代えて、S300の処理が実行される点を除いて、第1実施例の図6の処理と同様である。
(Learning reading process; FIG. 13)
The learning reading process of this embodiment is the same as the process of FIG. 6 of the first embodiment except that the process of S300 is executed instead of the binarization process of S86.
S300では、CPU232は、S80で切り取られたコード画像を示すコード画像データをメモリ34内の学習モデル52に入力して、当該学習モデル52から当該コード画像によって示される二次元コードの白黒のパターンの推定値を取得する。S300に続くS88では、CPU32は、S84で特定された各セルの座標と、S300で取得された白黒のパターンの推定値と、を利用して、二次元コードの各セルの白黒の値を決定する。そして、CPU32は、決定済みの各セルの白黒の値に基づいて、コード処理を実行する。
In S300, the
本実施例の学習読取処理では、通常読取処理のS86による二値化処理に代えて、学習モデル52を利用して二次元コードの各セルの白黒の値を決定する(図13のS300)。例えば、二次元コードの経年劣化により二次元コードの白黒の大部分が変色していることに起因して、通常読取処理による読み取りが失敗することが想定される。本実施例では、二次元コードの経年劣化により二次元コードの二値化処理によって決定される各セルの白黒の値が劣化前の二次元コードの各セルの白黒の値と大きく異なる場合であっても、学習読取処理を実行することにより、二次元コード内の情報を読み取ることができる。
In the learning reading process of this embodiment, the
また、パターンデータが、二次元コードを示す複数個の画素である比較例が想定される。この比較例では、画素数の増加と共にパターンデータの情報量が増加する。これに対して、本実施例の構成によれば、1個のセルに対して1つの値が対応付けられるため、二次元コードのセルの個数が一定であれば、画素数が増加しても、パターンデータの情報量は増加しない。上記の比較例と比べて、パターンデータの情報量の増加を抑制することができる。なお、変形例では、上記の比較例の構成を採用してもよい。 Also, a comparative example is assumed in which the pattern data is a plurality of pixels representing a two-dimensional code. In this comparative example, the information amount of the pattern data increases as the number of pixels increases. On the other hand, according to the configuration of this embodiment, one value is associated with one cell. , the amount of information in the pattern data does not increase. An increase in the information amount of pattern data can be suppressed as compared with the above comparative example. In addition, the configuration of the above comparative example may be employed in the modified example.
また、本実施例では、二次元コードのセルの白黒のパターンは、全てのセルについて、当該セルの白黒の値を含む。例えば、二次元コードには、シンボルマーク(即ちファインダパターン)、アライメントパターン、タイミングパターン等の一定のパターンで並ぶセル群が含まれる。変形例では、二次元コードのセルの白黒のパターンは、全てのセルから上記の一定のパターンで並ぶセル群を除いた複数個のセルの白黒の値を含み、上記の一定のパターンで並ぶセル群の白黒の値を含まなくてもよい。 Also, in this embodiment, the black and white pattern of the cells of the two-dimensional code includes the black and white values of the cells for all cells. For example, a two-dimensional code includes a group of cells arranged in a certain pattern such as a symbol mark (that is, a finder pattern), an alignment pattern, a timing pattern, or the like. In a modification, the black-and-white pattern of the cells of the two-dimensional code includes the black-and-white values of a plurality of cells excluding the group of cells arranged in the above fixed pattern from all the cells, and the cells arranged in the above fixed pattern It does not have to contain the black and white values of the group.
また、本実施例では、図12に示すように、二次元コードが(24、24)のセルの個数を有するサイズのコードである場合において、各セルの白黒のパターンにおける連番には、1~624が付される。624は、当該二次元コードのセルの個数と同一の値である。変形例では、各セルの白黒のパターンにおける連番には、1~M(Mは624より大きい値)が付されてもよい。ここで、Mは、例えば、二次元コードの最大のサイズにおけるセルの個数、例えば、(177、177)=31329であってもよい。この場合、1~31329の連番のうち、624個の連番が利用され、残りの連番は利用されなくてもよい。例えば、残りの連番に対応する値の全てを「0」に設定してもよい。本変形例では、複数のサイズの二次元コードが存在する状況において、複数のサイズの二次元コードの学習において1個の学習モデル252を共有することができる。
Further, in this embodiment, as shown in FIG. 12, when the two-dimensional code is a code having a size of (24, 24) cells, the serial number in the black and white pattern of each cell is 1 .about.624 are attached. 624 is the same value as the number of cells of the two-dimensional code. Alternatively, the serial numbers in the black and white pattern of each cell may be numbered from 1 to M (where M is greater than 624). Here, M may be, for example, the number of cells in the maximum size of the two-dimensional code, eg (177, 177)=31329. In this case, 624 of the serial numbers from 1 to 31329 are used, and the rest of the serial numbers may not be used. For example, all values corresponding to the remaining serial numbers may be set to "0". In this modification, in a situation where two-dimensional codes of multiple sizes exist, one
(対応関係)
パターンデータが、「第1の関係情報」の一例である。パターンデータの推定値が、「関係情報(及び第2の関係情報)」の一例である。
(correspondence relationship)
Pattern data is an example of "first relationship information". The estimated value of pattern data is an example of "related information (and second related information)."
(第6実施例)
本実施例は、学習装置200の処理の一部が異なる点を除いて、第1実施例と同様である。
(Sixth embodiment)
This embodiment is the same as the first embodiment, except that the processing of the
(学習装置200の処理;図14)
本実施例の学習装置200の処理は、図5のS70の処理に代えて、S400の処理が実行される点を除いて、第1実施例の図5の処理と同様である。なお、本実施例では、S64の学習処理において、学習モデル252のモデルパラメータ254の全部が調整されてもよいし、モデルパラメータ254の一部が調整されてもよい。モデルパラメータ254の一部が調整される場合には、例えば、多層ニューラルネットワークの入力層の側のパラメータが所定の値に固定され、多層ニューラルネットワークの出力層の側のパラメータが学習処理において調整されてもよい。
(Processing of learning
The processing of the
CPU232は、検証結果が「OK」を示すと判断する場合(S68でYES)に、S400に進む。S400では、CPU232は、S64において調整されたモデルパラメータ254を記録する二次元コードを生成する。そして、CPU232は、生成済みの二次元コードを示す印刷データをプリンタ500に送信する。これにより、当該二次元コードが印刷される。
When the
コード読取装置10は、印刷済みの二次元コードを読み取る。これにより、コード読取装置10は、当該二次元コード内のモデルパラメータ254を取得し、メモリ34に記憶する。
The
このような構成によれば、コード読取装置10は、二次元コードを読み取ることによってモデルパラメータ254を取得することができる。例えば、教師データ242の送信元である第1のコード読取装置10と、当該送信元でない第2のコード読取装置10と、が存在し、第2のコード読取装置10がLAN4に接続されていない状況が想定される。第2のコード読取装置10は、学習装置200との通信を実行しなくても、印刷済みの二次元コードを読み取ることによってモデルパラメータ254を取得することができる。
With such a configuration, the
また、二次元コードに記録される情報は、モデルパラメータ254の平文に限らず、例えば、平文のモデルパラメータ254を縮小したデータであってもよい。また、CPU232は、モデルパラメータ254を複数個のデータに分割し、分割済みの複数個のデータのそれぞれについて、当該データを記録する二次元コードを生成してもよい。このような構成によれば、モデルパラメータ254の情報量が1個の二次元コードに記憶可能な情報量を上回る場合でも、モデルパラメータ254を記録する二次元コードを作成することができる。
Further, the information recorded in the two-dimensional code is not limited to the plain text of the
また、二次元コードに記録される情報は、モデルパラメータ254の全部に限らず、モデルパラメータ254の一部であってもよい。例えば、モデルパラメータ254の一部の値が固定される場合には、S64の学習処理で調整された一部のパラメータのみが二次元コードに記録されてもよい。また、例えば、モデルパラメータ254の全部を調整する場合において、調整後のモデルパラメータ254のうち、調整前のモデルパラメータ254から変更されたパラメータのみが二次元コードに記録されてもよい。調整前のモデルパラメータ254は、例えば、出荷段階におけるモデルパラメータ254であってもよいし、前回の学習処理における調整後のモデルパラメータ254であってもよい。モデルパラメータ254の全部を記録する構成と比較して、二次元コードに記録する情報量を低減することができる。
Also, the information recorded in the two-dimensional code is not limited to all of the
(対応関係)
プリンタが、「出力装置」の一例である。なお、変形例では、学習装置200は、モデルパラメータ254が記録されている二次元コードを学習装置200と通信可能なディスプレイ(図示省略)に表示してもよい。本変形例では、当該ディスプレイが、「出力装置」の一例である。
(correspondence relationship)
A printer is an example of an "output device." Note that, in a modified example, the
(第7実施例)
本実施例では、コード読取装置10は、複数個の学習情報50をメモリ34に記憶する。例えば、コード読取装置10は、様々な状況で利用される。例えば、コード読取装置10が工場内だけでなく、野外で利用される状況が想定される。また、例えば、コード読取装置10が、第1の媒体(例えば紙媒体)に表示されている二次元コードを読み取るだけでなく、第1の媒体とは異なる第2の媒体(例えば金属)に表示されている二次元コードを読み取る状況が想定される。本実施例の構成によれば、様々な状況のそれぞれについて固有の学習情報50を記憶することができる。これにより、当該様々な状況に対応することができる。
(Seventh embodiment)
In this embodiment, the
メモリ34は、記憶領域a1、b1、b2を含む複数個の記憶領域に分けられている。プログラム40は、記憶領域a1に記憶されており、第1の学習情報50は、記憶領域b1に記憶されており、第2の学習情報50は、記憶領域b2に記憶されている。例えば、1個の記憶領域に複数個の学習情報50を記憶する比較例が想定される。この比較例では、複数個の学習情報50の中から更新対象の学習情報50を検索する処理を必要とする。これに対して、本実施例の構成によれば、複数個の学習情報50のそれぞれが異なる記憶領域に記憶されているので、複数個の学習情報50の中から更新対象の学習情報50を検索する処理を必要とせず、更新対象の学習情報50が記憶されている記憶領域へアクセスするだけでよい。
The
(対応関係)
メモリ34が、「特定のメモリ」の一例である。記憶領域a1が、「第1の領域」の一例である。記憶領域b1、b2が、「第2の領域」の一例である。
(correspondence relationship)
(第8実施例)
(情報読取システム2;図15)
本実施例は、情報読取システム2が仲介装置700を備える点と、学習装置200がインターネット6上に設置されている点と、を除いて、第1実施例と同様である。
(Eighth embodiment)
(
This embodiment is the same as the first embodiment, except that the
仲介装置700は、例えば、サーバである。仲介装置700は、LAN4に接続されている。これにより、仲介装置700は、LAN4を介して、コード読取装置10と通信可能である。また、仲介装置700は、インターネット6に接続されている。これにより、仲介装置700は、インターネット6を介して、学習装置200と通信可能である。
コード読取装置10は、仲介装置700と直接に通信可能であるが、学習装置200とは直接に通信不可能である。例えば、コード読取装置10は、教師データ242を仲介装置700に送信する。これにより、仲介装置700が、教師データ242を学習装置200に送信する。また、例えば、学習装置200は、調整後のモデルパラメータ254を仲介装置700に送信する。これにより、仲介装置700が、調整後のモデルパラメータ254をコード読取装置10に送信する。即ち、仲介装置700は、コード読取装置10と学習装置200との間の通信を仲介する。
The
本実施例の構成によれば、仲介装置700によって、コード読取装置10をインターネット6から遮断することができる。コード読取装置10が、インターネット6からのアクセスを直接受けることを抑制することができる。仲介装置700が、「仲介装置」の一例である。
According to the configuration of this embodiment, the
(第9実施例)
(内的要因分類処理:図19)
本実施例では、図7のS100の劣化分類処理に代えて、コード読取装置10の内的な処理及びコード読取装置10の設定等である内的要因に応じて分類する内的要因分類処理が実行される点を除いて、第2実施例と同様である。
(Ninth embodiment)
(Internal factor classification processing: FIG. 19)
In this embodiment, instead of the deterioration classification process of S100 of FIG. 7, an internal factor classification process of classifying according to internal factors such as the internal process of the
コード読取装置10は、例えば、読取の精度の向上等を目的として、コード画像に対する画像処理を実行し得る。画像処理は、少なくとも1個のフィルタを利用して、コード画像を変換する処理である。フィルタは、例えば、平滑化フィルタ、黒膨張フィルタ、黒収縮フィルタ等である。平滑化フィルタは、画像の輝度値を平滑化するフィルタである。黒膨張フィルタは、画像内の黒いブロブ(塊)を膨張させるフィルタである。黒収縮フィルタは、画像内の黒いブロブ(塊)を収縮させるフィルタである。これらの画像処理は、例えば、印字が不明瞭な二次元コードのコード画像に利用される。なお、上記のフィルタの具体例は、一例に過ぎず、コード読取装置10は、上記の具体例以外のフィルタも利用可能である。
The
本実施例の内的要因分類処理は、読取対象の二次元コードをコード読取装置10のフィルタの利用態様である内的要因に応じて分類する処理である。ここで、フィルタの利用の有無は、ユーザによって設定されてもよいし、コード読取装置10が自動的に選択してもよい。また、フィルタは、複数回に亘って利用されてもよく、また、フィルタのサイズも様々である。
The internal factor classification process of the present embodiment is a process of classifying the two-dimensional code to be read according to the internal factor, which is the mode of use of the filter of the
図19の処理は、図8のS110、S112に代えて、S510、S512の処理が実行される点を除いて、図8の処理と同様である。S510では、CPU32は、コード画像に対して少なくとも1個のフィルタが利用されたのか否かを判断する。CPU32は、コード画像に対してフィルタが1個も利用されなかったと判断する場合(S510でNO)に、後述するS512の処理をスキップして、S114に進む。
The process of FIG. 19 is the same as the process of FIG. 8 except that the processes of S510 and S512 are executed instead of S110 and S112 of FIG. At S510, the
S512では、CPU32は、フィルタの利用態様に基づいてコード画像を分類する。図19の教師データテーブル60に示すように、分類の項目は、例えば、フィルタの利用回数、フィルタの種類、フィルタのサイズ等である。例えば、図19に示すように、コード画像に対してサイズ「3×3」の平滑化フィルタが1回だけ利用された場合には、当該コード画像に対応する成功事例は、項目「サイズ「3×3」、平滑化フィルタ、及び、1回」に対応する教師データTD1として教師データテーブル60に記憶される(S116)。なお、コード画像に対してフィルタが1個も利用されない場合(S510でNO)には、当該コード画像に対応する成功事例は、利用回数「0回」の項目に対応付けて、教師データとして教師データテーブル60に記憶される(S116)。なお、図19の項目は、一例に過ぎず、例えば、2種類のフィルタが利用される場合には、その組み合わせも項目として採用されてもよい。
In S512, the
本実施例でも、第2実施例と同様の効果を得ることができる。即ち、成功事例を無条件に教師データ242として採用する構成と比較して、成功事例のばらつきが、特定のフィルタの利用(例えば平滑化フィルタの利用)における事例に偏ることを抑制することができる。
Also in this embodiment, the same effect as in the second embodiment can be obtained. That is, compared to a configuration in which successful cases are unconditionally adopted as
(第10実施例)
(内的要因分類処理:図20)
本実施例の内的要因分類処理は、読取対象の二次元コードをコード読取装置10の撮像条件である内的要因に応じて分類する処理である。撮像条件は、露光時間、撮像対象との距離、照明(例えばフラッシュ)のON/OFF等である。撮像条件は、ユーザによって設定されてもよいし、コード読取装置10が自動的に選択してもよい。なお、撮像対象との距離は、例えば、焦点距離を利用して算出されてもよいし、読取対象に照射された指示マーカを利用したステレオ法で算出されてもよい。
(Tenth embodiment)
(Internal Factor Classification Processing: FIG. 20)
The internal factor classification process of the present embodiment is a process of classifying the two-dimensional code to be read according to internal factors, which are imaging conditions of the
図20の処理は、図8のS110、S112に代えて、S612の処理が実行される点を除いて、図8の処理と同様である。S612では、CPU32は、コード画像の撮像に現在利用された撮像条件に基づいてコード画像を分類する。図20の教師データテーブル60に示すように、分類の項目は、例えば、露光時間、距離、照明等である。例えば、図20に示すように、露光時間が0.5ms以下で、撮像対象との距離が100mm以下で、照明がONである場合には、当該コード画像に対応する成功事例は、項目「0.5ms以下、100mm以下、及び、ON」に対応する教師データTD1として教師データテーブル60に記憶される(S116)。なお、図20の項目は、一例に過ぎず、他の撮像条件が採用されてもよい。
The process of FIG. 20 is the same as the process of FIG. 8 except that the process of S612 is executed instead of S110 and S112 of FIG. In S612, the
本実施例でも、第2実施例と同様の効果を得ることができる。即ち、成功事例を無条件に教師データ242として採用する構成と比較して、成功事例のばらつきが、特定の撮像条件における事例に偏ることを抑制することができる。
Also in this embodiment, the same effect as in the second embodiment can be obtained. In other words, compared to a configuration in which successful cases are unconditionally adopted as
(第11実施例)
(内的要因分類処理:図20)
本実施例の内的要因分類処理は、読取対象の二次元コードをコード読取装置10の読取処理の処理時間である内的要因に応じて分類する処理である。処理時間は、例えば、通常読取処理(図4参照)の開始から終了までの時間、又は、学習読取処理(図6参照)の開始から終了までの時間である。なお、他の変形例では、処理時間は、通常読取処理の一部、例えば、デコード処理の開始から終了までの時間であってもよい。
(11th embodiment)
(Internal Factor Classification Processing: FIG. 20)
The internal factor classification process of this embodiment is a process of classifying the two-dimensional code to be read according to the internal factor, which is the processing time of the reading process of the
本実施例のS612では、CPU32は、処理時間に基づいてコード画像を分類する。図20の教師データテーブル60に示すように、分類の項目は、例えば、処理時間「100ms以下」、処理時間「150ms以下」等である。例えば、処理時間が、100msよりも大きく、150ms以下である場合には、当該コード画像に対応する成功事例は、項目「150ms以下」に対応する教師データTD3として教師データテーブル60に記憶される(S116)。なお、図20の項目は、一例に過ぎない。
In S612 of this embodiment, the
処理時間が長い原因は、例えば、二次元コードの劣化であり、処理時間の長さと劣化の程度は、相関関係を有し得る。処理時間に基づく分類により、成功事例のばらつきが、特定の劣化の程度における事例に偏ることを抑制することができる。本実施例でも、第2実施例と同様の効果を得ることができる。 The cause of the long processing time is, for example, deterioration of the two-dimensional code, and the length of the processing time and the degree of deterioration may have a correlation. Classification based on the processing time makes it possible to suppress the distribution of success cases from biasing toward cases with a specific degree of deterioration. Also in this embodiment, the same effect as in the second embodiment can be obtained.
(第12実施例)
(コード読取装置10の処理;図21)
本実施例は、S700の判断が追加される点を除いて、第2実施例と同様である。CPU32は、教師データ242の個数が目標数より少ないと判断する場合(S102でNO)に、S700に進む。S700では、CPU32は、教師データテーブル60内の複数の項目のうち、影響度が高い1個以上の項目のデータ群の合計数が所定数以上であるのか否かを判断する。所定数は、S102の目標数よりも小さい値である。影響度は、二次元コードの読み取りが失敗する可能性の高さに応じて設定される。影響度が高い項目は、例えば、パターン決定処理(図9)においてシンボルマークの劣化を示すパターン番号である。二次元コードのうち、データが記録されている領域は、劣化しても誤り訂正によって復元可能である。これに対して、シンボルマークは、誤り訂正によって復元できず、シンボルマークが劣化すると、二次元コードの位置を特定できず、二次元コードの読み取りが失敗する可能性が高い。本実施例では、二次元コードの読み取りが失敗する可能性が高いシンボルマークの劣化を示す項目を、他の項目よりも影響度が高い項目として採用する。
(Twelfth embodiment)
(Processing of
This embodiment is the same as the second embodiment, except that the determination of S700 is added. When the
CPU32は、影響度が高い1個以上の項目のデータ群の合計数が所定数以上であると判断する場合(S700でYES)に、S104に進む。一方、CPU32は、影響度が高い1個以上の項目のデータ群の合計数が所定数未満であると判断する場合(S700でNO)に、S104をスキップして、S44に進む。
When the
本実施例の構成によれば、コード読取装置10は、教師データ242の個数が目標数に到達しなくても(S102でNO)、影響度が高い1個以上の項目のデータ群の合計数が所定数以上であると判断される場合(S700でYES)に、教師データ242の全てを学習装置200に送信する(S104)。影響度が高い1個以上の項目のデータ群に対応する成功事例は、二次元コードの読み取りが成功するものの、シンボルマークの劣化等により二次元コードの読み取りが失敗する可能性が高まっていることを示す事例である。二次元コードの読み取りが失敗する可能性が高まっている状況において、教師データ242の個数が目標数に到達することを待つことなく、学習を速やかに開始することができる。
According to the configuration of the present embodiment, even if the number of
また、図21のS700の判断は、情報コードの劣化に基づく分類だけでなく、情報コードのコントラストに基づく分類(第2実施例の変形例)、情報コードの変形に基づく分類(第2実施例の他の変形例(図16~図18))、及び、コード読取装置の内的要因に基づく分類(第9~第11実施例(図19、図20))のいずれかに採用されてもよい。また、図21のS700の判断は、上記の劣化、コントラスト、変形、及び、内的要因の少なくとも2個の組み合わせに基づく分類に採用されてもよい。 In addition, the determination in S700 of FIG. 21 is not limited to the classification based on the deterioration of the information code, but also the classification based on the contrast of the information code (modification of the second embodiment), the classification based on the deformation of the information code (second embodiment). (Figs. 16 to 18)), and classification based on the internal factors of the code reader (ninth to eleventh embodiments (Figs. 19 and 20)). good. Also, the determination of S700 of FIG. 21 may be employed for classification based on a combination of at least two of the above deterioration, contrast, deformation, and internal factors.
(切り取り処理の具体例1;図22)
図4のS50及び図6、図13のS80で実行される切り取り処理の具体例1について説明する。コード読取装置10は、読取対象の二次元コードを指示する指示マーカを照射可能である。指示マーカは、十字、丸、四角等の所定の形状を有する。具体例1では、CPU32は、カメラ20の撮像画像の中から、指示マーカの位置を特定する。例えば、CPU32は、撮像画像の中から指示マーカの所定の形状を抽出し、所定の形状の位置を指示マーカの位置として特定する。なお、変形例では、CPU32は、指示マーカの光源がカメラ20の画角の中心線上に位置している場合に、撮像画像の中心を指示マーカの位置として特定してもよい。
(Specific example 1 of cut processing; Fig. 22)
A specific example 1 of the cutting process executed in S50 of FIG. 4 and S80 of FIGS. 6 and 13 will be described. The
続けて、CPU32は、指示マーカの位置を中心として、所定の画素数(横、縦)=(N1、N2)で切り取り範囲を設定し、当該切り取り範囲で撮像画像を切り取る。所定の画素数(N1、N2)は、例えば、読取対象の二次元コードのサイズ等に基づき予め設定される。N1、N2は、正の整数であり、N2は、N1と同一であってもよいし、異なっていてもよい。
Subsequently, the
このような構成によれば、指示マーカに基づいて、撮像画像から二次元コードを含むコード画像を簡易に切り取ることができる。 With such a configuration, a code image including a two-dimensional code can be easily cut out from the captured image based on the indication marker.
(切り取り処理の具体例2;図23)
切り取り処理の他の具体例2について説明する。二次元コードは、白黒のパターンで構成される。このため、図23に示すように、二次元コードを示す画素の輝度は大きく変動し、二次元コード以外の背景を示す画素の輝度はほとんど変動しない。本具体例では、CPU32は、指示マーカの位置から横方向に沿って画素の輝度を分析し、輝度の変動が所定値以上である画素を横方向における二次元コードの境界線として推定する。同様に、CPU32は、指示マーカの位置から縦方向にも同様の分析を行い、輝度の変動が所定値以上である画素を縦方向における二次元コードの境界線として推定する。そして、CPU32は、横方向における境界線から所定の画素数N3の線を切り取り範囲の縦方向の線とし、縦方向における境界線から所定の画素数N4の線を切り取り範囲の横方向の線として決定する。所定の画素数N3、N4は、例えば、読取対象の二次元コードのサイズ等に基づき予め設定される。N3、N4は、正の整数であり、N3は、N4と同一であってもよいし、異なっていてもよい。所定の画素数N3、N4により上記の分析で推定される境界線よりも切り取り範囲を広くすることにより、読取対象の二次元コードの経年劣化により二次元コードの輪郭のセルが薄くなっても二次元コードを切り取り範囲に含ませることができる。
(Specific example 2 of cut processing; Fig. 23)
Another specific example 2 of the cutout process will be described. A two-dimensional code is composed of black and white patterns. Therefore, as shown in FIG. 23, the luminance of the pixels representing the two-dimensional code fluctuates greatly, while the luminance of the pixels representing the background other than the two-dimensional code hardly fluctuates. In this specific example, the
(切り取り処理の具体例3;図24)
切り取り処理の他の具体例3について説明する。本具体例では、CPU32は、図5のS60で記憶される複数個の教師データ242内のコード画像データの少なくとも一部のそれぞれについて、図4のS52と同様の四隅の座標を算出する。そして、CPU32は、複数個の教師データ242内のコード画像データの少なくとも一部について算出された四隅の全てを含む範囲を切り取り範囲に設定する。
(Specific example 3 of cut processing; Fig. 24)
Another specific example 3 of the cutout process will be described. In this specific example, the
このような構成によれば、指示マーカを利用しないコード読取装置10でも切り取り範囲を設定することができる。このようなコード読取装置10は、例えば、工場の製造ライン、POSレジ等に固定されている固定式のコード読取装置である。
According to such a configuration, it is possible to set the cutting range even with the
以上、本明細書で開示する技術の具体例を説明したが、これらは例示にすぎず、特許請求の範囲を限定するものではない。特許請求の範囲に記載の技術には以上に例示した具体例を様々に変形、変更したものが含まれる。例えば、以下の変形例を採用してもよい。 Specific examples of the technology disclosed in this specification have been described above, but these are merely examples and do not limit the scope of the claims. The technology described in the claims includes various modifications and changes of the specific examples illustrated above. For example, the following modifications may be adopted.
(変形例1)「情報コード」は、二次元コードに限らず、例えば、バーコード、多段のバーコード等であってもよい。 (Modification 1) The "information code" is not limited to a two-dimensional code, and may be, for example, a bar code, a multi-level bar code, or the like.
(変形例2-1)学習装置200の学習対象は、二次元コードの四隅の座標(第1実施例参照)、二次元コードの各セルの白黒のパターン(第5実施例参照)に限らない。例えば、学習対象は、撮像画像内におけるコード画像の位置を示すコード位置情報であってもよい。例えば、二次元コードの黒色の部分が薄くなり、撮像画像から二次元コードを見つけるのが困難になる状況が想定される。コード位置情報を学習することにより、上記の状況においても、撮像画像から二次元コードを見つけることができ、図4の切り取り処理においてコード画像の切り取りを実行することができる。本変形例では、コード位置情報が、「関係情報(第1の関係情報及び第2の関係情報)」の一例である。
(Modification 2-1) The learning target of the
(変形例2-2)さらに、学習対象は、切り取り処理において切り取る範囲であってよい。また、さらに、学習対象は、3か所のシンボルマークのそれぞれの四隅の座標であってもよい。さらに、学習対象は、二次元コードのタイミングパターンの位置であってもよい。一般的に言えば、学習対象は、二次元コードの中の所定のパターン(例えば、シンボルマーク、タイミングパターン等)を示す情報(位置、サイズ等)であってもよい。これら変形例では、切り取る範囲、シンボルマークの四隅の座標、又は、二次元コードの中の特定のパターンに関する情報が、「関係情報(第1の関係情報及び第2の関係情報)」の一例である。 (Modification 2-2) Furthermore, the learning target may be the range to be cut out in the cutout process. Furthermore, the learning target may be the coordinates of the four corners of each of the three symbol marks. Furthermore, the learning object may be the position of the timing pattern of the two-dimensional code. Generally speaking, the learning object may be information (position, size, etc.) indicating a predetermined pattern (eg, symbol mark, timing pattern, etc.) in the two-dimensional code. In these modifications, the information about the range to be cut, the coordinates of the four corners of the symbol mark, or the specific pattern in the two-dimensional code is an example of "relationship information (first relational information and second relational information)". be.
(変形例2-3)「関係情報(第1の関係情報及び第2の関係情報)」は、1種類の情報(例えば二次元コードの四隅の座標)に限らず、複数種類の情報(例えばシンボルマークの四隅の座標と二次元コードの四隅の座標)であってもよい。 (Modification 2-3) "Relationship information (first relational information and second relational information)" is not limited to one type of information (for example, coordinates of four corners of a two-dimensional code), but also multiple types of information (for example, coordinates of the four corners of the symbol mark and coordinates of the four corners of the two-dimensional code).
(変形例3)上記の各実施例では、教師データ242は、通常読取処理の成功事例だけでなく、学習読取処理の成功事例も含み得る。変形例では、教師データ242は、通常読取処理の成功事例を含み、学習読取処理の成功事例を含まなくてもよい。一般的に言えば、「教師データ」は、前記第1の関係情報を利用した前記読取処理の複数の成功事例を少なくとも含んでいればよい。
(Modification 3) In each of the above embodiments, the
(変形例4)「分類部」及び「判断部」は、コード読取装置10の制御部30に限らず、例えば、学習装置200の制御部230であってもよい。この場合、図8の処理は、学習装置200の制御部230によって実行されてもよい。
(Modification 4) The “classification unit” and the “determination unit” are not limited to the
(変形例5)第2実施例において、教師データテーブル60は、コード読取装置10のメモリ34に限らず、例えば、学習装置200のメモリ234に記憶されてもよい。本変形例では、メモリ234が、「第1のメモリ」の一例である。
(Modification 5) In the second embodiment, the teacher data table 60 may be stored not only in the
本明細書または図面に説明した技術要素は、単独であるいは各種の組合せによって技術的有用性を発揮するものであり、出願時請求項記載の組合せに限定されるものではない。また、本明細書または図面に例示した技術は複数目的を同時に達成するものであり、そのうちの一つの目的を達成すること自体で技術的有用性を持つものである。 The technical elements described in this specification or in the drawings exhibit technical usefulness alone or in various combinations, and are not limited to the combinations described in the claims as of the filing. In addition, the techniques exemplified in this specification or drawings achieve multiple purposes at the same time, and achieving one of them has technical utility in itself.
2 :情報読取システム
4 :LAN
6 :インターネット
10 :コード読取装置
12 :操作部
14 :表示部
20 :カメラ
22 :通信I/F
30 :制御部
32 :CPU
34 :メモリ
40 :プログラム
50 :学習情報
52 :学習モデル
54 :モデルパラメータ
60 :教師データテーブル
200 :学習装置
222 :通信I/F
230 :制御部
232 :CPU
234 :メモリ
240 :プログラム
242 :教師データ
250 :学習情報
252 :学習モデル
254 :モデルパラメータ
256 :初期パラメータ
270 :事例テーブル
500 :プリンタ
700 :仲介装置
L1~L4 :座標
a1、b1、b2 :記憶領域
2: Information reading system 4: LAN
6: Internet 10: Code reader 12: Operation unit 14: Display unit 20: Camera 22: Communication I/F
30: control unit 32: CPU
34: memory 40: program 50: learning information 52: learning model 54: model parameter 60: teacher data table 200: learning device 222: communication I/F
230: Control unit 232: CPU
234: Memory 240: Program 242: Teacher data 250: Learning information 252: Learning model 254: Model parameters 256: Initial parameters 270: Case table 500: Printer 700: Intermediary devices L1 to L4: Coordinates a1, b1, b2: Storage area
Claims (23)
前記カメラによって撮像された第1の情報コードの読取結果を出力するための第1のコード処理を実行する第1のコード処理実行部であって、
前記第1のコード処理は、
前記第1の情報コードの画像から前記第1の情報コードに関する第1の関係情報を検出する検出処理と、
検出済みの前記第1の関係情報を利用して、前記第1の情報コードに記録されている情報を読み取る読取処理と、
前記読取処理の結果を出力する出力処理と、
を含む、前記第1のコード処理実行部と、
前記第1の関係情報を利用した前記読取処理の複数の成功事例を少なくとも含む教師データを利用して、学習モデルのパラメータを調整する調整部であって、前記学習モデルは、前記カメラによって撮像された前記情報コードの画像から前記情報コードに関する関係情報を出力するモデルである、前記調整部と、
前記パラメータが調整された後に、前記第1のコード処理とは異なる第2のコード処理を実行する第2のコード処理実行部であって、
前記第2のコード処理は、前記カメラによって撮像された第2の情報コードの画像の読取結果を出力するための処理であり、
前記第2のコード処理は、前記カメラによって撮像された前記第2の情報コードの画像を前記学習モデルに入力して、前記学習モデルから前記第2の情報コードに関する第2の関係情報を取得する取得処理を、前記第2の関係情報を検出する前記検出処理に代えて含み、
前記第2のコード処理は、取得済みの前記第2の関係情報を利用して、前記第2の情報コードに記録されている情報を読み取る前記読取処理と、前記出力処理と、を含む、前記第2のコード処理実行部と、
を備える、情報読取装置。 a camera capable of imaging an information code;
A first code processing execution unit that executes first code processing for outputting a reading result of a first information code imaged by the camera,
The first code processing includes:
A detection process for detecting first relational information related to the first information code from the image of the first information code;
reading processing of reading information recorded in the first information code using the detected first relationship information;
an output process for outputting the result of the reading process;
the first code processing execution unit comprising:
an adjustment unit that adjusts parameters of a learning model using teacher data including at least a plurality of successful cases of the reading process using the first relationship information, wherein the learning model is captured by the camera; The adjusting unit, which is a model that outputs related information about the information code from the image of the information code,
a second code processing execution unit that executes a second code processing different from the first code processing after the parameter is adjusted,
The second code processing is processing for outputting a read result of the image of the second information code captured by the camera,
The second code processing inputs an image of the second information code captured by the camera to the learning model, and acquires second relational information related to the second information code from the learning model. An acquisition process is included instead of the detection process for detecting the second relationship information,
The second code processing includes the reading processing of reading information recorded in the second information code using the acquired second relationship information, and the output processing. a second code processing execution unit;
An information reader.
前記1個以上のコード読取装置と別体な、前記調整部を備える学習装置と、
を備え、
前記1個以上のコード読取装置は、前記学習装置から調整後の前記パラメータを取得し、
前記第2のコード処理実行部は、取得済みの前記調整後のパラメータを利用して前記第2のコード処理を実行する、請求項1から5のいずれか一項に記載の情報読取装置。 one or more code reading devices comprising the camera, the first code processing execution unit, and the second code processing execution unit;
a learning device, separate from the one or more code readers, comprising the adjustment unit;
with
The one or more code reading devices obtain the adjusted parameters from the learning device,
The information reading device according to any one of claims 1 to 5, wherein the second code processing execution unit executes the second code processing using the acquired adjusted parameters.
前記1個以上のコード読取装置と前記学習装置との通信を仲介し、前記インターネットに接続されている仲介装置をさらに備える、請求項6に記載の情報読取装置。 The learning device is installed on the Internet,
7. The information reader according to claim 6, further comprising an intermediary device that mediates communication between said one or more code readers and said learning device and is connected to said Internet.
前記1個以上のコード読取装置のそれぞれは、前記出力装置によって出力された前記特定の情報コードから前記調整後のパラメータを読み取ることによって、前記学習装置から前記調整後のパラメータの全部又は一部を取得する、請求項6又は7に記載の情報読取装置。 Further comprising an output device capable of outputting a specific information code that records the adjusted parameters,
Each of the one or more code reading devices reads all or part of the adjusted parameters from the learning device by reading the adjusted parameters from the specific information code output by the output device. 8. The information reader according to claim 6 or 7, which acquires.
前記学習装置は、前記第1のコード読取装置から前記教師データを取得して、取得済みの前記教師データを利用して、前記パラメータを調整し、
前記第2のコード読取装置は、
前記学習装置から、前記第1のコード読取装置の前記教師データを利用して調整された前記パラメータを取得し、
取得済みの前記パラメータを利用して、前記第2のコード処理を実行する、請求項6から8のいずれか一項に記載の情報読取装置。 the one or more code readers comprises a first code reader and a second code reader different from the first code reader;
the learning device acquires the teacher data from the first code reading device and adjusts the parameter using the acquired teacher data;
The second code reader is
obtaining the parameter adjusted using the training data of the first code reading device from the learning device;
9. The information reader according to any one of claims 6 to 8, wherein said second code processing is executed using said acquired parameters.
前記特定のメモリは、
前記第1のコード処理及び前記第2のコード処理を実行するためのプログラムを記憶する第1の領域と、前記第1の領域とは異なる第2の領域と、を含み、
前記第2の領域は、複数個の学習情報を記憶するための領域であり、
前記複数個の学習情報のそれぞれは、前記学習モデルと、調整後の前記パラメータと、を含む、請求項1から9のいずれか一項に記載の情報読取装置。 with more specific memory,
The specific memory is
a first area for storing programs for executing the first code processing and the second code processing; and a second area different from the first area,
The second area is an area for storing a plurality of pieces of learning information,
10. The information reader according to any one of claims 1 to 9, wherein each of said plurality of pieces of learning information includes said learning model and said parameter after adjustment.
前記第1のコード処理において前記読取処理が成功した対象の情報コードを、情報コードの劣化の種類に関する複数のパターンのうちの特定のパターンに分類する分類部と、
分類済みの前記特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用するのか否かを判断する判断部と、
を備える、請求項11に記載の情報読取装置。 The information reading device further
a classification unit that classifies the target information code, for which the reading process is successful in the first code process, into a specific pattern among a plurality of patterns related to the type of deterioration of the information code;
a determination unit that determines whether or not to adopt the successful case of the target information code as the training data based on the specific pattern that has been classified;
12. The information reader according to claim 11, comprising:
前記対象の情報コードに対する前記読取処理内で実行された誤り訂正において復元された復元コードの画像と、前記対象の情報コードの実際の画像を二値化した画像と、を比較して、前記対象の情報コードの劣化の箇所を特定し、
前記復元コードと前記実際の画像との比較によって特定された前記劣化の箇所に基づいて、前記対象の情報コードを前記特定のパターンに分類する、請求項12に記載の情報読取装置。 The classification unit
Comparing an image of the restored code restored in the error correction executed in the reading process for the target information code and an image obtained by binarizing the actual image of the target information code, the target Identify the location of deterioration of the information code of
13. The information reading device according to claim 12, wherein the target information code is classified into the specific pattern based on the location of deterioration identified by comparing the restoration code and the actual image.
前記第1のコード処理において前記読取処理が成功した対象の情報コードを、前記情報読取装置の内的要因を示す複数の項目のうちの特定の項目に分類する分類部と、
分類済みの前記特定の項目に基づいて、前記対象の情報コードの成功事例を前記教師データとして採用するのか否かを判断する判断部と、
を備える、請求項11に記載の情報読取装置。 The information reading device further
a classification unit that classifies the target information code for which the reading process has been successful in the first code process into a specific item among a plurality of items indicating internal factors of the information reading device;
a determination unit that determines whether or not to adopt the successful case of the target information code as the training data based on the specific item that has been classified;
12. The information reader according to claim 11, comprising:
前記情報読取装置が前記情報コードの画像に対して実行した画像処理に関する2個以上の項目と、
前記情報読取装置が前記情報コードを撮像する撮像条件に関する2個以上の項目と、
前記情報読取装置が前記情報コードに記録されている情報を読み取るための処理時間に関する2個以上の項目と、
のうちの少なくとも1つを含む、請求項15に記載の情報読取装置。 The plurality of items are
two or more items related to image processing performed by the information reading device on the image of the information code;
two or more items related to imaging conditions for the information reading device to image the information code;
Two or more items related to processing time for the information reading device to read information recorded in the information code;
16. The information reader of claim 15, comprising at least one of:
前記2個以上の成功事例のそれぞれは、前記情報コードの読み取りが成功するものの、前記情報コードの読み取りが失敗する可能性が高まっていることを示す事例である、請求項11から16のいずれか一項に記載の情報読取装置。 The adjusting unit determines that, even before the number of the plurality of success cases included in the training data exceeds the predetermined number, the number of two or more success cases out of the number of the plurality of success cases is , configured to initiate tuning of the parameter of the learning model when exceeding a certain number less than the predetermined number;
Each of the two or more success cases is a case indicating that the reading of the information code is successful, but there is an increasing possibility that the reading of the information code will fail. 1. The information reader according to item 1.
前記分類済みの特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用すると判断される場合に、前記対象の情報コードの成功事例を前記教師データとして前記第1のメモリに記憶する第1の記憶制御部であって、前記分類済みの特定のパターンに基づいて、前記対象の情報コードの成功事例を前記教師データとして採用しないと判断される場合に、前記対象の情報コードの成功事例は前記特定のメモリに記憶されない、前記第1の記憶制御部と、
をさらに備え、
前記調整部は、前記第1のメモリ内の前記教師データを利用して、前記パラメータを調整する、請求項10から17のいずれか一項に記載の情報読取装置。 a first memory;
when it is determined to employ the successful case of the target information code as the teacher data based on the classified specific pattern, the successful case of the target information code is used as the teacher data in the first memory; a first storage control unit that stores in the target information, when it is determined that the success case of the target information code is not adopted as the training data based on the classified specific pattern the first storage control, wherein code success stories are not stored in the particular memory;
further comprising
18. The information reading device according to any one of claims 10 to 17, wherein said adjustment unit adjusts said parameter using said teacher data in said first memory.
前記コード画像のコントラストを調整する処理、
所定の画像を前記コード画像に追加する処理、
前記コード画像を回転する処理、及び、
前記コード画像によって示される前記情報コードの各セルを加工する処理、
のうちの少なくとも一つを含む、請求項19に記載の情報読取装置。 The image processing includes
a process of adjusting the contrast of the code image;
a process of adding a predetermined image to the code image;
a process of rotating the code image; and
a process of processing each cell of the information code indicated by the code image;
20. The information reader according to claim 19, comprising at least one of
前記増加制御部は、前記第2のメモリに記憶されている複数個の前記事例情報によって示される前記読取処理の事例の傾向を利用して、複数種類の前記画像処理の中から1種類以上の前記画像処理を選択して、選択済みの前記1種類以上の画像処理を実行する、請求項19又は20に記載の情報読取装置。 further comprising a second memory for storing, for each of a plurality of information codes, case information indicating an example of the reading process performed on the information code;
The increase control unit selects one or more types of image processing from among a plurality of types of image processing, using a tendency of cases of the reading process indicated by the plurality of pieces of case information stored in the second memory. 21. The information reader according to claim 19 or 20, wherein said image processing is selected and said one or more types of selected image processing are executed.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/284,977 US20240176970A1 (en) | 2021-03-31 | 2022-03-31 | Information reader |
EP22781274.0A EP4318304A1 (en) | 2021-03-31 | 2022-03-31 | Information reading device |
PCT/JP2022/016728 WO2022211064A1 (en) | 2021-03-31 | 2022-03-31 | Information reading device |
CN202280025014.1A CN117083616A (en) | 2021-03-31 | 2022-03-31 | Information reading device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021061763 | 2021-03-31 | ||
JP2021061763 | 2021-03-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022158916A true JP2022158916A (en) | 2022-10-17 |
Family
ID=83638551
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022010885A Pending JP2022158916A (en) | 2021-03-31 | 2022-01-27 | Information reader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022158916A (en) |
-
2022
- 2022-01-27 JP JP2022010885A patent/JP2022158916A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4911340B2 (en) | Two-dimensional code detection system and two-dimensional code detection program | |
US8881986B1 (en) | Decoding machine-readable code | |
US8254683B2 (en) | Code image processing method | |
JP5507134B2 (en) | Two-dimensional code reading method, two-dimensional code recognition method, and two-dimensional code reading apparatus | |
KR20120023646A (en) | Two-dimensional symbol code and method for reading the symbol code | |
WO2013044875A1 (en) | Linear barcode identification method and system | |
TWI669519B (en) | Board defect filtering method and device thereof and computer-readabel recording medium | |
US9626738B2 (en) | Image processing apparatus, image processing method, and storage medium | |
US8538170B2 (en) | System and method for document location and recognition | |
CN111985465A (en) | Text recognition method, device, equipment and storage medium | |
US20020051573A1 (en) | Two-dimensional code extracting method | |
JP2023040038A (en) | Program, information processing method, and information processing device | |
WO2022021687A1 (en) | Method for positioning quick response code area, and electronic device and storage medium | |
JP5720623B2 (en) | Two-dimensional code reader | |
JP4335229B2 (en) | QR code recognition device, QR code recognition device control method, QR code recognition device control program, and computer-readable recording medium recording the same | |
WO2022211064A1 (en) | Information reading device | |
JP2022158916A (en) | Information reader | |
CN111767752A (en) | Two-dimensional code identification method and device | |
CN117083616A (en) | Information reading device | |
JP4013027B2 (en) | Two-dimensional code reader | |
JP4872895B2 (en) | Face centerline detection device | |
JP4872930B2 (en) | Character recognition device, fuel pump module assembling device equipped with such device, and character recognition method | |
CN115578729B (en) | AI intelligent process arrangement method for digital staff | |
JP6544191B2 (en) | Image creation device | |
JPH10207978A (en) | Character pattern collating method and device therefor |