[go: up one dir, main page]

JP2009169931A - Optical information reader - Google Patents

Optical information reader Download PDF

Info

Publication number
JP2009169931A
JP2009169931A JP2008156841A JP2008156841A JP2009169931A JP 2009169931 A JP2009169931 A JP 2009169931A JP 2008156841 A JP2008156841 A JP 2008156841A JP 2008156841 A JP2008156841 A JP 2008156841A JP 2009169931 A JP2009169931 A JP 2009169931A
Authority
JP
Japan
Prior art keywords
position detection
image
value
state value
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008156841A
Other languages
Japanese (ja)
Other versions
JP5007960B2 (en
Inventor
Toshiji Ishibashi
利治 石橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2008156841A priority Critical patent/JP5007960B2/en
Publication of JP2009169931A publication Critical patent/JP2009169931A/en
Application granted granted Critical
Publication of JP5007960B2 publication Critical patent/JP5007960B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a configuration capable of quickly grasping the printing quality of an information code attached to an object and quickly, satisfactorily and effectively using the printing quality information. <P>SOLUTION: An information code reader 20 is configured so as to detect the position detection pattern of a QR code Q on the basis of light-receiving results by a light-receiving sensor 23 and to calculate the luminance of bright color cells and dark color cells of the detected position detection pattern. Furthermore, the information code reader 20 is configured so as to calculate contrast of the position detection pattern, on the basis of the luminance detection result and to notify a user or record in a recording means a margin (printing quality information), obtained by reflecting the calculated contrast of the position detection pattern and a threshold (reference information) to be reference in evaluating the contrast. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、光学的情報読取装置に関するものである。   The present invention relates to an optical information reader.

流通業等の各種産業においてバーコードやQRコードなどの情報コードが広く用いられている。この種の情報コードは、プリンタによる印刷や、ダイレクトマーキングなどによって様々な対象物に付されるようにして用いられており、このような情報コードを光学的に読み取る装置として、バーコードリーダ等の光学的情報読取装置が広く用いられている。
特開平9−128469号公報
Information codes such as barcodes and QR codes are widely used in various industries such as the distribution industry. This type of information code is used by being attached to various objects by printing with a printer, direct marking, etc. As a device for optically reading such an information code, a bar code reader or the like is used. Optical information readers are widely used.
JP-A-9-128469

上記のような情報コードは、例えば紙等の印刷媒体にプリンタ等によって印刷する方法や、或いは金属材料や樹脂材料の製品等にダイレクトマーキング処理を行う方法等によって形成される。このように情報コードを形成する方法としては様々な方法が考えられており、形成される情報コードの印字品質は、形成方法や対象物などの影響を受けて大きくばらつく場合がありうる。   The information code as described above is formed by, for example, a method of printing on a printing medium such as paper by a printer or the like, or a method of performing a direct marking process on a metal or resin material product. Various methods for forming the information code are considered in this way, and the print quality of the formed information code may vary greatly due to the influence of the forming method and the object.

情報コードの印字品質は情報コードの読取処理に大きな影響を与えるものであり、例えば情報コードの印字品質が極端に悪い場合には読み取り処理を正常に行うことが難しくなる。従って、上記光学的情報読取装置の分野では、必要に応じて情報コードの印字品質を評価できる構成が望まれており、このような構成として例えば特許文献1のような技術が提供されている。この特許文献1の技術によれば、コントラストを1つの評価項目として印刷状態の総合評価を行うことができるが、評価処理が長時間化、複雑化する懸念があり、またコントラストが具体的にどの程度であるか判断し難いという問題もある。   The printing quality of the information code has a great influence on the reading process of the information code. For example, when the printing quality of the information code is extremely bad, it is difficult to perform the reading process normally. Therefore, in the field of the optical information reading apparatus, a configuration capable of evaluating the print quality of the information code as desired is desired. For example, a technique as disclosed in Patent Document 1 is provided. According to the technique of this patent document 1, it is possible to perform a comprehensive evaluation of a printing state using contrast as one evaluation item. However, there is a concern that the evaluation process may be long and complicated, and the contrast is specific. There is also a problem that it is difficult to judge whether it is a degree.

本発明は、上述した課題を解決するためになされたものであり、物品に付された情報コードの印字品質を迅速に把握でき、かつその印字品質情報を迅速かつ良好に有効利用できる構成を提供することを目的とする。   The present invention has been made in order to solve the above-described problems, and provides a configuration capable of quickly grasping the print quality of an information code attached to an article and quickly and effectively using the print quality information. The purpose is to do.

上記課題を解決するため、請求項1の発明は、複数の明色セル及び複数の暗色セルからなる情報コードからの反射光を受光する受光手段と、前記受光手段による受光結果に基づいて前記情報コードの画像データを生成する生成手段と、前記生成手段にて生成された前記画像データに基づいてデコード処理を行うデコード手段と、を備えた光学的情報読取装置であって、前記受光手段による受光結果に基づき前記情報コードの一部を構成する特定部分を検出する特定部分検出手段と、前記特定部分検出手段にて検出された前記特定部分における前記明色セル及び暗色セルの少なくともいずれかに基づき、前記特定部分の画像状態を示す評価値を、所定の評価方法に従って算出する算出手段と、前記算出手段によって得られた前記評価値に基づき、当該評価値を反映して得られる前記情報コードの印字品質情報を、ユーザに通知又は記録手段に記録する算出結果利用手段と、を備えたことを特徴とする。   In order to solve the above-mentioned problem, the invention of claim 1 is characterized in that the information is received based on a light receiving means for receiving reflected light from an information code comprising a plurality of light-colored cells and a plurality of dark-colored cells, and a light reception result by the light receiving means. An optical information reader comprising: generating means for generating code image data; and decoding means for performing decoding processing based on the image data generated by the generating means, wherein the light receiving means receives light Based on the specific part detecting means for detecting a specific part constituting a part of the information code based on the result, and at least one of the light cell and the dark color cell in the specific part detected by the specific part detecting means A calculation means for calculating an evaluation value indicating an image state of the specific portion according to a predetermined evaluation method, and based on the evaluation value obtained by the calculation means The printing quality information of said information code obtained by reflecting the evaluation value, characterized in that and a calculation result utilization means for recording the notification or the recording means to the user.

請求項2の発明は、請求項1に記載の光学的情報読取装置において、前記算出手段は、前記特定部分検出手段にて検出された前記特定部分における前記明色セル及び前記暗色セルの輝度を求める輝度検出手段と、前記輝度検出手段による検出結果に基づき、前記特定部分の前記評価値として当該特定部分のコントラストを算出するコントラスト算出手段と、からなり、前記算出結果利用手段は、前記コントラスト算出手段にて算出された前記特定部分のコントラストと、当該コントラストを評価する上での基準となるコントラスト基準値と、を反映して得られる前記情報コードの前記印字品質情報を、ユーザに通知又は前記記録手段に記録することを特徴とする。   According to a second aspect of the present invention, in the optical information reading apparatus according to the first aspect, the calculation means calculates the luminance of the light cell and the dark cell in the specific portion detected by the specific portion detection means. A luminance detection means to be obtained; and a contrast calculation means for calculating a contrast of the specific part as the evaluation value of the specific part based on a detection result by the luminance detection means, wherein the calculation result utilization means is the contrast calculation The print quality information of the information code obtained by reflecting the contrast of the specific part calculated by the means and the contrast reference value used as a reference for evaluating the contrast is notified to the user or the It records on a recording means, It is characterized by the above-mentioned.

請求項3の発明は、請求項2に記載の光学的情報読取装置において、前記コントラスト基準値は、予め定められた閾値であり、前記算出結果利用手段は、前記コントラスト算出手段によって算出された前記特定部分のコントラストを前記閾値と比較し、前記特定部分のコントラストと前記閾値との差を前記印字品質情報として通知することを特徴とする。   According to a third aspect of the present invention, in the optical information reading apparatus according to the second aspect, the contrast reference value is a predetermined threshold value, and the calculation result using means is calculated by the contrast calculating means. The contrast of the specific part is compared with the threshold value, and the difference between the contrast of the specific part and the threshold value is notified as the print quality information.

請求項4の発明は、請求項2又は請求項3に記載の光学的情報読取装置において、前記コントラスト算出手段は、前記特定部分における前記明色セルの輝度をXとし、前記特定部分における前記暗色セルの輝度をYとした場合に、以下の式、(X−Y)/Xにて得られる値を前記特定部分のコントラストとして算出することを特徴とする。   According to a fourth aspect of the present invention, in the optical information reading apparatus according to the second or third aspect, the contrast calculating means sets the brightness of the bright cell in the specific portion as X, and the dark color in the specific portion. When the luminance of the cell is Y, a value obtained by the following expression (XY) / X is calculated as the contrast of the specific portion.

請求項5の発明は、請求項2から請求項4のいずれか一項に記載の光学的情報読取装置において、前記輝度検出手段は、前記特定部分に配される前記明色セルの少なくとも一位置の輝度を抽出し、かつ前記特定部分に配される前記暗色セルの少なくとも一位置の輝度を抽出することで、前記特定部分の前記明色セル及び前記暗色セルの輝度をそれぞれ検出することを特徴とする。   According to a fifth aspect of the present invention, in the optical information reading device according to any one of the second to fourth aspects, the luminance detecting means is at least one position of the light cell arranged in the specific portion. And the brightness of at least one position of the dark color cell arranged in the specific portion is extracted to detect the brightness of the light cell and the dark color cell of the specific portion, respectively. And

請求項6の発明は、請求項2から請求項5のいずれかに記載の光学的情報読取装置において、前記輝度検出手段は、前記特定部分に配される、いずれかの前記明色セル及びいずれかの前記暗色セルの各々のセル内において、所定の中心位置及び当該中心位置を挟んだ両側位置の輝度をそれぞれ抽出し、前記特定部分の前記明色セルの輝度を、単一明色セル内の前記中心位置及び前記両側位置での輝度抽出結果に基づいて検出し、前記特定部分の前記暗色セルの輝度を、単一暗色セル内の前記中心位置及び前記両側位置での輝度抽出結果に基づいて検出することを特徴とする。   According to a sixth aspect of the present invention, in the optical information reading device according to any one of the second to fifth aspects, the brightness detecting means is any one of the light-colored cells arranged in the specific portion, and In each of the dark cells, the brightness of a predetermined center position and both side positions sandwiching the center position is extracted, and the brightness of the light cell of the specific portion is determined in a single light cell. Is detected based on the luminance extraction results at the center position and the both side positions, and the luminance of the dark cell in the specific portion is determined based on the luminance extraction results at the center position and the both side positions in a single dark cell. It is characterized by detecting.

請求項7の発明は、請求項2から請求項6のいずれか一項に記載の光学的情報読取装置において、前記情報コードは、QRコードであり、前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする。   According to a seventh aspect of the present invention, in the optical information reading device according to any one of the second to sixth aspects, the information code is a QR code, and the specific portion detection means is configured to detect the QR code. A position detection pattern is detected as the specific portion.

請求項8の発明は、請求項7に記載の光学的情報読取装置において、前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、前記コントラスト算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎にコントラストを算出し、前記算出結果利用手段は、前記コントラスト算出手段にて算出された前記位置検出パターン毎のコントラストに基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする。   The invention according to claim 8 is the optical information reading apparatus according to claim 7, wherein the specific portion detection means attempts to detect all the position detection patterns in the QR code, and the contrast calculation means includes The contrast is calculated for each of the position detection patterns detected by the specific part detection unit, and the calculation result using unit is configured to print the print based on the contrast for each of the position detection patterns calculated by the contrast calculation unit. Quality information is generated, and the printing quality information is notified or recorded.

請求項9の発明は、請求項8に記載の光学的情報読取装置において、前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記コントラスト算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎にコントラストを算出し、前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記コントラストの算出結果と、を対応付けて通知又は記録することを特徴とする。   A ninth aspect of the present invention is the optical information reading device according to the eighth aspect, wherein when all the position detection patterns are not detected by the specific portion detecting means, the image data of the QR code is predetermined. Image processing means for performing one or a plurality of image processing based on one or a plurality of processing settings, and the specific portion detecting means for each image processed data after the image processing is performed according to each processing setting Then, the detection of the position detection pattern is retried, and the contrast calculation means calculates the contrast for each position detection pattern in each image processed data corresponding to each process setting, and the calculation result using means determines each process setting. And the detection result of the position detection pattern and the calculation result of the contrast in each image processed data corresponding to each processing setting And notifying or recording.

請求項10の発明は、請求項8に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記コントラスト算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎にコントラストを算出し、前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンのコントラストが最も大きくなる前記画像処理済データと、複数の前記位置検出パターンにおけるコントラストのばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする。   According to a tenth aspect of the present invention, in the optical information reading apparatus according to the eighth aspect, the image data of the QR code includes image processing means for performing a plurality of image processings according to a plurality of predetermined processing settings. The specific portion detection means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting, and the contrast calculation means corresponds to each processing setting. The contrast is calculated for each position detection pattern in each image processed data, and the decoding means includes the image processed data in which the position detection pattern is detected most frequently among the plurality of image processed data, The image-processed data in which the contrast of the position detection pattern is maximized, and a contrast in the plurality of position detection patterns Each of the image-processed data with the smallest variation is decoded, and the calculation result using means has the smallest number of error corrections among the plurality of image-processed data subjected to the decode process. The image processed data is selected, and the processing setting for obtaining the image processed data is notified or recorded.

請求項11の発明は、請求項7又は請求項8に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、前記コントラスト算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンのコントラストを算出し、前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンのコントラストに基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする。   According to an eleventh aspect of the present invention, in the optical information reading device according to the seventh or eighth aspect, the image data of the QR code is one or more based on one or more predetermined processing settings. Image processing means for performing the image processing, and when the position detection pattern is detected by the specific part detection means, the image processing means is detected with respect to the detected position detection pattern or the detected position detection pattern. The image processing is performed on the position detection pattern and the quiet zone, and the contrast calculation unit calculates a contrast of the position detection pattern after the image processing is performed by the image processing unit, and uses the calculation result utilization unit. Is based on the contrast of the position detection pattern after the image processing is performed by the image processing means. It generates a broadcast, characterized by the printed notice the quality information or recording.

請求項12の発明は、請求項1に記載の光学的情報読取装置において、前記算出手段は、前記特定部分の前記評価値として、当該特定部分における前記明色セル及び前記暗色セルの少なくともいずれかの太さ状態を定量化した値である太さ状態値を、所定の太さ状態値算出方法に従って算出する太さ状態値算出手段からなり、前記算出結果利用手段は、前記太さ状態値算出手段にて算出された前記特定部分の前記太さ状態値に基づいて、前記太さ状態値を反映した前記印字品質情報を生成し、当該印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする。   According to a twelfth aspect of the present invention, in the optical information reading device according to the first aspect, the calculation means uses at least one of the light color cell and the dark color cell in the specific portion as the evaluation value of the specific portion. A thickness state value calculating unit that calculates a thickness state value that is a value obtained by quantifying the thickness state of the image according to a predetermined thickness state value calculating method, and the calculation result using unit calculates the thickness state value Based on the thickness state value of the specific portion calculated by the means, the print quality information reflecting the thickness state value is generated, and the print quality information is notified to the user or recorded in the recording means. It is characterized by that.

請求項13の発明は、請求項12に記載の光学的情報読取装置において、前記算出結果利用手段は、前記太さ状態値を評価する上での基準となる太さ基準値が予め定められており、前記太さ状態値算出手段によって算出された前記特定部分の前記太さ状態値と前記太さ基準値との差を示す値、又は前記太さ基準値に対する前記太さ状態値の割合を示す値を前記印字品質情報として通知することを特徴とする。   According to a thirteenth aspect of the present invention, in the optical information reading device according to the twelfth aspect, the calculation result using means has a thickness reference value as a reference for evaluating the thickness state value determined in advance. A value indicating a difference between the thickness state value of the specific portion calculated by the thickness state value calculating unit and the thickness reference value, or a ratio of the thickness state value to the thickness reference value. The indicated value is notified as the print quality information.

請求項14の発明は、請求項12又は請求項13に記載の光学的情報読取装置において、前記太さ状態値算出手段は、前記特定部分における前記明色セル及び前記暗色セルのいずれか一方の幅値をW1とし、他方の幅値をW2としたときの、W1とW2との加算値に対する一方の幅値W1の割合を示す値を、前記特定部分の前記太さ状態値として算出することを特徴とする。   According to a fourteenth aspect of the present invention, in the optical information reading device according to the twelfth or thirteenth aspect, the thickness state value calculating means is either one of the light color cell and the dark color cell in the specific portion. A value indicating the ratio of one width value W1 to the added value of W1 and W2 when the width value is W1 and the other width value is W2 is calculated as the thickness state value of the specific portion. It is characterized by.

請求項15の発明は、請求項12から請求項14のいずれか一項に記載の光学的情報読取装置において、前記太さ状態値算出手段は、前記特定部分に配される前記明色セルの1セル分の幅値と、前記特定部分に配される前記暗色セルの1セル分の幅値とを抽出し、前記明色セルの1セル分の幅値及び前記暗色セルの1セル分の幅値に基づいて前記太さ状態値を算出することを特徴とする。   According to a fifteenth aspect of the present invention, in the optical information reading device according to any one of the twelfth to fourteenth aspects, the thickness state value calculating unit is configured to store the light cell arranged in the specific portion. A width value for one cell and a width value for one cell of the dark cell arranged in the specific portion are extracted, and a width value for one cell of the light cell and one cell of the dark cell are extracted. The thickness state value is calculated based on a width value.

請求項16の発明は、請求項12から請求項15のいずれか一項に記載の光学的情報読取装置において、前記情報コードは、QRコードであり、前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする。   According to a sixteenth aspect of the present invention, in the optical information reading device according to any one of the twelfth to fifteenth aspects, the information code is a QR code, and the specific portion detection unit is configured to detect the QR code. A position detection pattern is detected as the specific portion.

請求項17の発明は、請求項16に記載の光学的情報読取装置において、前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、前記太さ状態値算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎に前記太さ状態値を算出し、前記算出結果利用手段は、前記太さ状態値算出手段にて算出された前記位置検出パターン毎の前記太さ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする。   According to a seventeenth aspect of the present invention, in the optical information reading device according to the sixteenth aspect, the specific portion detecting unit is configured to try to detect all the position detection patterns in the QR code, and the thickness state value The calculating means calculates the thickness state value for each of the position detection patterns detected by the specific part detecting means, and the calculation result using means calculates the position calculated by the thickness state value calculating means. The print quality information is generated based on the thickness state value for each detection pattern, and the print quality information is notified or recorded.

請求項18の発明は、請求項17に記載の光学的情報読取装置において、前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記太さ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記太さ状態値を算出し、前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記太さ状態値の算出結果と、を対応付けて通知又は記録することを特徴とする。   The optical information reader according to claim 18 is predetermined for the image data of the QR code when not all the position detection patterns are detected by the specific portion detection unit. Image processing means for performing one or a plurality of image processing based on one or a plurality of processing settings, and the specific portion detecting means for each image processed data after the image processing is performed according to each processing setting The thickness state value calculating means calculates the thickness state value for each position detection pattern in each image processed data corresponding to each processing setting, and the calculation result The utilization means associates each processing setting with the detection result of the position detection pattern and the calculation result of the thickness state value in each image processed data corresponding to each processing setting. And notifying or recording Te.

請求項19の発明は、請求項18に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記太さ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記太さ状態値を算出し、前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンの前記太さ状態値が最も適切値に近づく前記画像処理済データと、複数の前記位置検出パターンにおける前記太さ状態値のばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする。   According to a nineteenth aspect of the present invention, there is provided the optical information reading device according to the eighteenth aspect, further comprising image processing means for performing a plurality of image processing on the image data of the QR code according to a plurality of predetermined processing settings. The specific portion detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting, and the thickness state value calculating means The thickness state value is calculated for each position detection pattern in each image processed data corresponding to the image processing data, and the decoding means detects the position detection pattern most frequently among the plurality of image processed data. Image-processed data, the image-processed data in which the thickness state value of the position detection pattern approaches the most appropriate value, and a plurality of the position detection patterns before Each of the image processed data with the smallest variation in thickness state value is decoded, and the calculation result using means is the error that is the most error among the plurality of the image processed data subjected to the decoding processing. The image processed data having a small number of corrections is selected, and the processing setting for obtaining the image processed data is notified or recorded.

請求項20の発明は、請求項16又は請求項17に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、前記太さ状態値算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記太さ状態値を算出し、前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記太さ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする。   According to a twentieth aspect of the present invention, in the optical information reading device according to the sixteenth or seventeenth aspect, one or more of the image data of the QR code is determined based on one or more predetermined processing settings. Image processing means for performing the image processing, and when the position detection pattern is detected by the specific part detection means, the image processing means is detected with respect to the detected position detection pattern or the detected position detection pattern. The image processing is performed on the position detection pattern and the quiet zone, and the thickness state value calculating unit calculates the thickness state value of the position detection pattern after the image processing is performed by the image processing unit. Then, the calculation result utilization unit is configured to perform the marking based on the thickness state value of the position detection pattern after the image processing is performed by the image processing unit. It generates quality information, characterized in that the printing notifies the quality information or recording.

請求項21の発明は、請求項1に光学的情報読取装置において、前記算出手段は、前記特定部分の前記評価値として、当該特定部分のかすれ状態を定量化した値であるかすれ状態値を、所定のかすれ状態値算出方法に従って算出するかすれ状態値算出手段からなり、前記算出結果利用手段は、前記かすれ状態値算出手段にて算出された前記特定部分の前記かすれ状態値に基づいて、当該かすれ状態値を反映した前記印字品質情報を生成し、当該印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする。   The invention according to claim 21 is the optical information reading apparatus according to claim 1, wherein the calculation means uses a blurred state value, which is a value obtained by quantifying the blurred state of the specific part, as the evaluation value of the specific part. A blur state value calculating unit that calculates in accordance with a predetermined blur state value calculating method, wherein the calculation result using unit is based on the blur state value of the specific portion calculated by the blur state value calculating unit. The print quality information reflecting the status value is generated, and the print quality information is notified to the user or recorded in the recording means.

請求項22の発明は、請求項21に記載の光学的情報読取装置において、前記算出結果利用手段は、前記かすれ状態値を評価する上での基準となるかすれ基準値が予め定められており、前記かすれ状態値算出手段によって算出された前記特定部分の前記かすれ状態値と前記かすれ基準値との差を示す値、又は前記かすれ基準値に対する前記かすれ状態値の割合を示す値を前記印字品質情報として通知することを特徴とする。   The invention according to claim 22 is the optical information reader according to claim 21, wherein the calculation result using means has a predetermined blur reference value as a reference for evaluating the blur state value, The value indicating the difference between the blurred state value of the specific portion calculated by the blurred state value calculating unit and the blurred reference value, or the value indicating the ratio of the blurred state value to the blurred reference value is the print quality information. It is characterized by notifying.

請求項23の発明は、請求項21又は請求項22に記載の光学的情報読取装置において、前記かすれ状態値算出手段は、前記特定部分における前記暗色セル又は前記明色セルが連続して並ぶべき領域において暗色部と明色部とを抽出し、前記暗色部と前記明色部との配置割合を示す値を、前記特定部分の前記かすれ状態値として算出することを特徴とする。   According to a twenty-third aspect of the present invention, in the optical information reading device according to the twenty-first or twenty-second aspect, the blur state value calculating means should be arranged such that the dark color cells or the light color cells in the specific portion are continuously arranged. A dark color portion and a light color portion are extracted in the area, and a value indicating an arrangement ratio of the dark color portion and the light color portion is calculated as the blur state value of the specific portion.

請求項24の発明は、請求項23に記載の光学的情報読取装置において、前記かすれ状態値算出手段は、前記暗色セル又は前記明色セルが連続して並ぶべき領域において、前記暗色部又は前記明色部が配される配置間隔と、前記暗色部又は前記明色部の幅値とを抽出し、前記配置間隔に対する前記暗色部又は前記明色部の幅値の割合を示す値を、前記特定部分の前記かすれ状態値として算出することを特徴とする。   According to a twenty-fourth aspect of the present invention, in the optical information reading device according to the twenty-third aspect, the fading state value calculating means is configured such that the dark color portion or the light color cell is in the region where the dark color cells or the light color cells are to be continuously arranged. The arrangement interval at which the light color portion is arranged and the width value of the dark color portion or the light color portion are extracted, and the value indicating the ratio of the width value of the dark color portion or the light color portion to the arrangement interval, It is calculated as the faint state value of a specific part.

請求項25の発明は、請求項21から請求項24のいずれか一項に記載の光学的情報読取装置において、前記情報コードは、QRコードであり、前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする。   According to a twenty-fifth aspect of the present invention, in the optical information reading device according to any one of the twenty-first to twenty-fourth aspects, the information code is a QR code, and the specific portion detecting unit is configured to detect the QR code. A position detection pattern is detected as the specific portion.

請求項26の発明は、請求項25に記載の光学的情報読取装置において、前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、前記かすれ状態値算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎に前記かすれ状態値を算出し、前記算出結果利用手段は、前記かすれ状態値算出手段にて算出された前記位置検出パターン毎の前記かすれ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする。   According to a twenty-sixth aspect of the present invention, in the optical information reading device according to the twenty-fifth aspect, the specific part detecting means is configured to try to detect all the position detection patterns in the QR code, and the blur state value calculation is performed. The means calculates the blurred state value for each position detection pattern detected by the specific portion detecting means, and the calculation result utilizing means calculates the position detection pattern calculated by the blurred state value calculating means. The print quality information is generated on the basis of the blurred state value, and the print quality information is notified or recorded.

請求項27の発明は、請求項26に記載の光学的情報読取装置において、前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記かすれ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記かすれ状態値を算出し、前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記かすれ状態値の算出結果と、を対応付けて通知又は記録することを特徴とする。   According to a twenty-seventh aspect of the present invention, in the optical information reading device according to the twenty-sixth aspect, when all the position detection patterns are not detected by the specific portion detecting means, the image data of the QR code is predetermined. Image processing means for performing one or a plurality of image processing based on one or a plurality of processing settings, and the specific portion detecting means for each image processed data after the image processing is performed according to each processing setting Then, the detection of the position detection pattern is attempted again, and the blurred state value calculating unit calculates the blurred state value for each position detection pattern in each image processed data corresponding to each processing setting, and the calculation result using unit Each processing setting, the detection result of the position detection pattern and the calculation result of the blurred state value in each image processed data corresponding to each processing setting, And notifying or recorded with response.

請求項28の発明は、請求項27に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、前記かすれ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記かすれ状態値を算出し、前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンの前記かすれ状態値が最も適切値に近づく前記画像処理済データと、複数の前記位置検出パターンにおける前記かすれ状態値のばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする。   A twenty-eighth aspect of the present invention is the optical information reading apparatus according to the twenty-seventh aspect, further comprising image processing means for performing a plurality of image processing on the image data of the QR code according to a plurality of predetermined processing settings. The specific portion detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting, and the blurred state value calculating means sets each processing setting to each processing setting. The blur state value is calculated for each position detection pattern in each corresponding image processed data, and the decoding means detects the image processing in which the position detection pattern is detected most frequently among a plurality of the image processed data. Between the completed data, the image-processed data in which the blurred state value of the position detection pattern approaches the most appropriate value, and a plurality of the position detection patterns. Each of the image-processed data having the smallest variation in the faint state value is decoded, and the calculation result using unit is the most out of the plurality of the image-processed data subjected to the decode process. The image processed data having a small number of error corrections is selected, and the processing setting for obtaining the image processed data is notified or recorded.

請求項29の発明は、請求項25又は請求項26に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、前記かすれ状態値算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記かすれ状態値を算出し、前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記かすれ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする。   According to a twenty-ninth aspect of the present invention, in the optical information reading device according to the twenty-fifth or twenty-sixth aspect, the image data of the QR code is one or more based on one or more predetermined processing settings. Image processing means for performing the image processing, and when the position detection pattern is detected by the specific part detection means, the image processing means is detected with respect to the detected position detection pattern or the detected position detection pattern. The image processing is performed on the position detection pattern and the quiet zone, and the blurred state value calculation unit calculates the blurred state value of the position detection pattern after the image processing is performed by the image processing unit, The calculation result using means is based on the blurred state value of the position detection pattern after the image processing is performed by the image processing means. Serial generates print quality information, and notifies or recording the print quality information.

請求項30の発明は、請求項9から請求項11、請求項18から請求項20、請求項27から請求項29のいずれか一項に記載の光学的情報読取装置において、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、前記算出結果利用手段は、前記処理設定に従って前記画像処理がなされた後の画像処理済データに対して前記位置検出パターンの検出又は前記デコード処理が行われたときに、「画像処理前よりも前記位置検出パターンの検出数が増加」、「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果をユーザに通知することを特徴とする。   The invention of claim 30 is the optical information reader according to any one of claims 9 to 11, 18 to 20, and 27 to 29, wherein the QR code Image processing means for performing one or more image processing on image data based on one or more predetermined processing settings, and the calculation result using means after the image processing is performed according to the processing settings When the position detection pattern is detected or the decoding process is performed on the image-processed data, “the number of detections of the position detection pattern is increased than before the image processing”, “error correction than before the image processing” In the case where any of “the number is reduced” and “decoding process is successful”, the result is notified to the user.

請求項31の発明は、請求項9から請求項11、請求項18から請求項20、請求項27から請求項30のいずれか一項に記載の光学的情報読取装置において、前記画像処理手段は、前記画像データのダイナミックレンジを変更する変更手段を有することを特徴とする。   The invention of claim 31 is the optical information reading apparatus according to any one of claims 9 to 11, 18 to 20, and 27 to 30, wherein the image processing means is And a changing means for changing the dynamic range of the image data.

請求項32の発明は、請求項1から請求項31のいずれか一項に記載の光学的情報読取装置において、前記情報コードに向けて照明光を照射する照明手段と、前記照明手段を制御する照明制御手段と、前記照明手段の点灯パターンを設定する点灯パターン設定手段と、を備え、前記照明制御手段は、前記点灯パターン設定手段により設定された前記点灯パターンで点灯を行うように前記照明手段を制御することを特徴とする。   A thirty-second aspect of the invention is the optical information reading device according to any one of the first to thirty-first aspects, wherein the illuminating means for irradiating illumination light toward the information code and the illuminating means are controlled. Illumination control means, and lighting pattern setting means for setting a lighting pattern of the lighting means, wherein the lighting control means performs lighting with the lighting pattern set by the lighting pattern setting means. It is characterized by controlling.

請求項33の発明は、請求項32に記載の光学的情報読取装置において、前記生成手段は、前記点灯パターン設定手段により設定変更される各点灯パターンごとの前記受光結果に基づき、前記情報コードの前記画像データを各点灯パターンごとに生成し、前記デコード手段は、各点灯パターンごとの前記画像データについてそれぞれ前記デコード処理を行う構成をなしており、前記算出手段は、各点灯パターンごとの前記画像データのうち、前記デコード手段による前記デコード処理が正常に行われた前記画像データについて前記評価値を算出し、前記算出結果利用手段は、その正常に行われた前記画像データについての前記評価値に基づいて得られる前記印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする。   According to a thirty-third aspect of the present invention, in the optical information reading device according to the thirty-second aspect, the generation unit is configured to store the information code based on the light reception result for each lighting pattern whose setting is changed by the lighting pattern setting unit. The image data is generated for each lighting pattern, and the decoding unit is configured to perform the decoding process on the image data for each lighting pattern, and the calculating unit is configured to perform the image processing for each lighting pattern. Among the data, the evaluation value is calculated for the image data that has been normally decoded by the decoding means, and the calculation result using means is used to calculate the evaluation value for the image data that has been normally executed. The print quality information obtained based on the notification is notified to the user or recorded in the recording means.

請求項34の発明は、請求項32又は請求項33に記載の光学的情報読取装置において、前記照明手段は、複数の照明光源を有してなり、前記点灯パターン設定手段は、少なくともそれら複数の照明光源における点灯位置を設定し、前記照明制御手段は、前記点灯パターン設定手段によって設定された前記点灯位置で点灯を行うように前記照明手段を制御することを特徴とする。   The invention of claim 34 is the optical information reader according to claim 32 or claim 33, wherein the illumination means comprises a plurality of illumination light sources, and the lighting pattern setting means comprises at least a plurality of the illumination pattern setting means. A lighting position in an illumination light source is set, and the lighting control unit controls the lighting unit to perform lighting at the lighting position set by the lighting pattern setting unit.

請求項35の発明は、請求項32から請求項34のいずれか一項に記載の光学的情報読取装置において、前記照明手段は、複数色の発光部を有してなり、前記点灯パターン設定手段は、少なくともそれら複数色の発光部における点灯色を設定し、前記照明制御手段は、前記点灯パターン設定手段によって設定された前記点灯色で点灯を行うように前記照明手段を制御することを特徴とする。   The invention of claim 35 is the optical information reader according to any one of claims 32 to 34, wherein the illumination means has a plurality of color light emitting sections, and the lighting pattern setting means. Sets at least lighting colors in the light emitting sections of the plurality of colors, and the lighting control means controls the lighting means to perform lighting with the lighting colors set by the lighting pattern setting means. To do.

請求項36の発明は、請求項32から請求項35のいずれか一項に記載の光学的情報読取装置において、前記照明手段は、複数の照明光源を有してなり、前記点灯パターン設定手段は、それら複数の照明光源の各々の点灯時間を設定し、前記照明制御手段は、前記点灯パターン設定手段によって設定された複数の前記照明光源の各々の点灯時間に対応した点灯を行うように前記照明手段を制御することを特徴とする。   The invention of claim 36 is the optical information reader according to any one of claims 32 to 35, wherein the illumination means comprises a plurality of illumination light sources, and the lighting pattern setting means is The lighting time of each of the plurality of illumination light sources is set, and the lighting control means performs the lighting corresponding to each lighting time of the plurality of illumination light sources set by the lighting pattern setting means. The means is controlled.

請求項37の発明は、請求項32から請求項36のいずれか一項に記載の光学的情報読取装置において、前記照明制御手段は、前記受光手段の露光中に前記照明手段の前記点灯パターンの切り替えを行うことを特徴とする。   The invention of claim 37 is the optical information reading apparatus according to any one of claims 32 to 36, wherein the illumination control means is configured to detect the lighting pattern of the illumination means during exposure of the light receiving means. It is characterized by switching.

請求項38の発明は、請求項32から請求項37のいずれか一項に記載の光学的情報読取装置において、前記算出結果利用手段は、過去得られた複数の前記印字品質情報を、各々の前記印字品質情報の取得の際に用いられた前記点灯パターンとそれぞれ対応付けて前記記憶手段に蓄積する構成をなしており、前記点灯パターン設定手段は、前記記憶手段に蓄積される過去の前記印字品質情報に対応付けられた過去の前記点灯パターンを、前記照明手段に用いる新たな前記点灯パターンとして設定することを特徴とする。   According to a thirty-eighth aspect of the present invention, in the optical information reading device according to any one of the thirty-second to thirty-seventh aspects, the calculation result using means obtains a plurality of the print quality information obtained in the past. The lighting pattern used in the acquisition of the print quality information is associated with each of the lighting patterns and stored in the storage unit, and the lighting pattern setting unit stores the past prints stored in the storage unit. The past lighting pattern associated with the quality information is set as a new lighting pattern used for the illumination means.

請求項39の発明は、請求項38に記載の光学的情報読取装置において、前記点灯パターン設定手段は、前記記憶手段に蓄積される複数の過去の前記印字品質情報に対応付けられたそれぞれの前記点灯パターンを、それら複数の過去の前記印字品質情報の印字品質の良い順に順序化し、前記照明制御手段は、前記点灯パターン設定手段によって順序化された前記点灯パターンの順序で点灯を行うように前記照明手段を制御し、前記デコード手段は、それら順序化された各点灯パターンごとの前記画像データについて前記デコード処理を行うことを特徴とする。   According to a thirty-ninth aspect of the present invention, in the optical information reading device according to the thirty-eighth aspect, the lighting pattern setting unit is associated with each of the past print quality information stored in the storage unit. The lighting patterns are ordered in the order of good print quality of the plurality of past print quality information, and the illumination control means performs the lighting in the order of the lighting patterns ordered by the lighting pattern setting means. The lighting unit is controlled, and the decoding unit performs the decoding process on the image data for each of the ordered lighting patterns.

請求項40の発明は、請求項39に記載の光学的情報読取装置において、前記点灯パターン設定手段は、当該点灯パターン設定手段により順序化された各点灯パターンごとの前記画像データについてそれぞれ前記デコード手段により前記デコード処理を行ったときに、それら各点灯パターンごとの前記画像データ全てについて読取不良が生じた場合、それら順序化された複数の前記点灯パターン以外の前記点灯パターンを新規点灯パターンとして設定し、前記デコード手段は、前記照明手段を前記新規点灯パターンで点灯させて得られた前記画像データについて前記デコード処理を行い、前記算出手段は、前記新規点灯パターンで点灯させて得られた前記画像データについての前記デコード処理が正常に行われた場合、当該画像データについて前記評価値を算出し、前記算出結果利用手段は、その正常に行われた前記画像データについての前記評価値に基づいて得られる前記印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする。   The invention according to claim 40 is the optical information reader according to claim 39, wherein the lighting pattern setting means is the decoding means for the image data for each lighting pattern ordered by the lighting pattern setting means. When the decoding process is performed by the above, if a reading failure occurs for all the image data for each lighting pattern, the lighting patterns other than the plurality of lighting patterns ordered are set as new lighting patterns. The decoding means performs the decoding process on the image data obtained by lighting the illumination means with the new lighting pattern, and the calculating means is the image data obtained by lighting with the new lighting pattern. If the decoding process is successfully performed for the image data, The evaluation value is calculated, and the calculation result utilization unit notifies the user of the print quality information obtained based on the evaluation value for the image data that has been normally performed or records the information on the recording unit. Features.

なお、請求項32に係る発明を、請求項1から請求項31のいずれか一項に従属させるのではなく、独立した構成とすることもできる。
即ち、前記情報コードに向けて照明光を照射する照明手段と、前記照明手段を制御する照明制御手段と、を備えた光学的情報読取装置であって、前記照明手段の点灯パターンを設定する点灯パターン設定手段を備えた構成とし、前記照明制御手段が、前記点灯パターン設定手段により設定された前記点灯パターンで点灯を行うように前記照明手段を制御する構成とすることができる。
さらに、このような構成に、請求項34〜37のいずれか一項又は複数項の構成を付加した構成とすることもできる。
Note that the invention according to claim 32 may be an independent configuration instead of being dependent on any one of claims 1 to 31.
That is, an optical information reading apparatus including an illuminating unit that irradiates illumination light toward the information code, and an illumination control unit that controls the illuminating unit, wherein the lighting unit sets a lighting pattern of the illuminating unit. A configuration including a pattern setting unit may be employed, and the illumination control unit may control the illumination unit so as to perform lighting with the lighting pattern set by the lighting pattern setting unit.
Furthermore, such a configuration may be configured by adding the configuration of any one of claims 34 to 37 or a plurality of terms.

請求項1の発明では、情報コードの一部を構成する特定部分に着目し、当該特定部分の画像状態を示す評価値を算出している。このようにすれば、情報コードの全領域に基づいて画像評価する構成と比較して処理の迅速化を実現できる。また、特定部分の評価値を反映して印字品質情報を生成し、それをユーザに通知又は記録手段に記録している。このようにすれば、対象となる情報コードがどのような印字品質であるかを迅速に把握でき、かつ迅速に有効利用できるようになる。   According to the first aspect of the invention, attention is paid to a specific part constituting a part of the information code, and an evaluation value indicating the image state of the specific part is calculated. In this way, the processing speed can be increased compared to a configuration in which an image is evaluated based on the entire area of the information code. Also, the print quality information is generated by reflecting the evaluation value of the specific part, and this is notified to the user or recorded in the recording means. In this way, it is possible to quickly grasp the print quality of the target information code, and to use it quickly and effectively.

請求項2の発明では、情報コードの一部を構成する特定部分に着目し、当該特定部分のコントラストを算出している。このようにすれば、情報コードの全領域に基づいてコントラストを取得する構成と比較して処理の迅速化を実現できる。また、特定部分のコントラストと、当該コントラストを評価する上での基準となるコントラスト基準値とを反映して印字品質情報を生成し、それをユーザに通知又は記録手段に記録している。このようにすれば、対象となる情報コードがどのような印字品質であるかを迅速に把握でき、かつ迅速に有効利用できるようになる。   In the second aspect of the invention, attention is paid to a specific part constituting a part of the information code, and the contrast of the specific part is calculated. In this way, the processing speed can be increased compared to a configuration in which contrast is acquired based on the entire area of the information code. Also, the print quality information is generated by reflecting the contrast of the specific portion and the contrast reference value that is a reference for evaluating the contrast, and the print quality information is notified to the user or recorded in the recording means. In this way, it is possible to quickly grasp the print quality of the target information code, and to use it quickly and effectively.

請求項3の発明では、コントラスト算出手段によって算出された特定部分のコントラストを予め定められた閾値と比較し、特定部分のコントラストと閾値との差を印字品質情報として通知している。このようにすれば、コントラストがどのような状態であるかをユーザにわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。   In the invention of claim 3, the contrast of the specific part calculated by the contrast calculating means is compared with a predetermined threshold value, and the difference between the contrast of the specific part and the threshold value is notified as print quality information. In this way, it is possible to convey to the user in an easy-to-understand manner what the contrast is, and the user can grasp the print quality with high accuracy based on quantitative criteria.

請求項4の発明では、特定部分における明色セルの輝度をXとし、特定部分における暗色セルの輝度をYとした場合に、以下の式、(X−Y)/Xにて得られる値を特定部分のコントラストとして算出している。このようにすれば、特定部分の暗色セル及び明色セルを良好に反映した数値が得られる。   In the invention of claim 4, when the brightness of the bright cell in the specific part is X and the brightness of the dark cell in the specific part is Y, the value obtained by the following equation (XY) / X is It is calculated as the contrast of a specific part. By doing this, it is possible to obtain a numerical value that favorably reflects the dark color cell and the light color cell of the specific portion.

請求項5の発明では、特定部分に配される明色セルの少なくとも一位置の輝度を抽出し、かつ特定部分に配される暗色セルの少なくとも一位置の輝度を抽出することで、特定部分の明色セル及び暗色セルの輝度をそれぞれ検出している。このように少なくとも一位置の輝度を代表値として抽出すればコントラスト算出処理の迅速化を図ることができる。   In the invention of claim 5, the luminance of at least one position of the light cell arranged in the specific portion is extracted, and the luminance of at least one position of the dark cell arranged in the specific portion is extracted, thereby The brightness of the light cell and the dark cell is detected. In this way, if the luminance at least at one position is extracted as a representative value, the contrast calculation process can be speeded up.

請求項6の発明では、特定部分の明色セルの輝度を、単一明色セル内の中心位置及び両側位置での輝度抽出結果に基づいて検出し、特定部分の暗色セルの輝度を、単一暗色セル内の中心位置及び両側位置での輝度抽出結果に基づいて検出している。このようにすれば、特定位置にノイズが集中するような場合にノイズの影響を効果的に抑えることができる。   In the invention of claim 6, the brightness of the light cell in the specific part is detected based on the brightness extraction results at the center position and both side positions in the single light cell, and the brightness of the dark cell in the specific part is simply determined. Detection is based on the luminance extraction results at the center position and both side positions in one dark cell. In this way, the influence of noise can be effectively suppressed when the noise is concentrated at a specific position.

請求項7の発明は、QRコードを読取対象とし、当該QRコードの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンをコントラスト算出を行う対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定できコントラストを迅速かつ良好に算出できる。特に、QRコードの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、コントラスト算出処理の一層の迅速化を図ることができる。   According to the seventh aspect of the present invention, the QR code is to be read, and the position detection pattern of the QR code is detected as a “specific portion”. If the position detection pattern having the prescribed shape is used as a target part for calculating the contrast, the bright cell and the dark cell can be identified with high accuracy without using a complicated detection method, and the contrast can be calculated quickly and satisfactorily. In particular, in the QR code reading process, since the position detection pattern can be specified at an initial stage, the contrast calculation process can be further speeded up.

請求項8の発明では、QRコードにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎にコントラストを算出し、それら算出された位置検出パターン毎のコントラストに基づいて印字品質情報を生成している。このように、複数の位置検出パターンのコントラストを算出できる構成とし、それらコントラストに基づいて印字品質情報を生成する構成とすれば、印字品質の迅速な把握を実現しつつ、単一の位置検出パターンのコントラストのみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   The invention of claim 8 attempts to detect all position detection patterns in the QR code, calculates contrast for each detected position detection pattern, and print quality information based on the calculated contrast for each position detection pattern. Is generated. In this way, if the configuration is such that the contrast of a plurality of position detection patterns can be calculated and the print quality information is generated based on these contrasts, a single position detection pattern can be obtained while realizing a quick grasp of the print quality. Compared with the configuration for calculating only the contrast, the print quality information reflecting the print quality of the entire code more appropriately can be obtained.

請求項9の発明は、全ての位置検出パターンが検出されない場合に、QRコードの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎にコントラストを算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及びコントラストの算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及びコントラストの算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   According to the ninth aspect of the present invention, when all the position detection patterns are not detected, one or a plurality of image processes are performed on the QR code image data based on one or a plurality of predetermined process settings. The position detection pattern is retried for each image processed data after the image processing is performed according to the setting. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. In addition, the contrast is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and the detection result and contrast of the position detection pattern in each image processed data corresponding to each processing setting are calculated. The calculation result is notified or recorded in association with each other. By doing this, it is possible to grasp the detection result of the position detection pattern and the calculation result of the contrast for each processing setting, and it becomes easy to effectively use the appropriate processing setting.

請求項10の発明では、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのコントラストが最も大きくなる画像処理済データと、複数の位置検出パターンにおけるコントラストのばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行い、最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このように、画像処理が効果的になされたと考えられる複数の画像処理済データについてそれぞれデコード処理を行い、さらにその中から最も誤り訂正数が少ない画像処理済データを選択するようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。   In the invention of claim 10, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the contrast of the position detection pattern is maximized, and the plurality of position detections Each of the image-processed data having the smallest contrast variation in the pattern is decoded, and the image-processed data having the smallest number of error corrections is selected, and the processing setting for obtaining the image-processed data is notified or I try to record. As described above, if each of the plurality of image processed data that is considered to have been effectively processed is subjected to decoding processing, and the image processed data with the smallest number of error corrections is selected from among the decoded data, Highly reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively.

請求項11の発明では、位置検出パターンが検出された場合に、その検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行い、その画像処理がなされた後の位置検出パターンのコントラストを算出している。そして、画像処理がなされた後の位置検出パターンのコントラストに基づいて印字品質情報を生成し、当該印字品質情報を通知又は記録するようにしている。このように情報コード全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して行い、その位置検出パターンのコントラストを算出するようにすれば、画像処理の迅速化を図りつつ、画像処理後の位置検出パターンのコントラスト算出結果を利用できるようになる。   In the invention of claim 11, when a position detection pattern is detected, image processing is performed on the detected position detection pattern or on the detected position detection pattern and quiet zone, and the image processing is performed. The contrast of the position detection pattern after having been calculated is calculated. Then, print quality information is generated based on the contrast of the position detection pattern after the image processing is performed, and the print quality information is notified or recorded. If image processing is not performed on the entire information code in this way, but is performed on the position detection pattern, or the position detection pattern and the quiet zone, and the contrast of the position detection pattern is calculated, image processing can be accelerated. The contrast calculation result of the position detection pattern after image processing can be used.

請求項12の発明では、情報コードの一部を構成する特定部分に着目し、この特定部分の画像状態を示す評価値として、当該特定部分における明色セル及び暗色セルの少なくともいずれかの太さ状態を定量化した値である太さ状態値を、所定の太さ状態値算出方法に従って算出している。このようにすれば、情報コードの全領域について太さ状態を算出する構成と比較して処理の迅速化を実現でき、またどのような太さ状態であるかを定量的に把握できる。さらに、特定部分の太さ状態値を反映して印字品質情報を生成し、それをユーザに通知又は記録手段に記録している。このようにすれば、対象となる情報コードがどのような印字品質であるか(具体的には、セルがどのような太さ状態であるか)を迅速に把握でき、かつ迅速に有効利用できるようになる。   In the invention of claim 12, paying attention to a specific part constituting a part of the information code, as an evaluation value indicating the image state of the specific part, the thickness of at least one of the light cell and the dark cell in the specific part A thickness state value, which is a value obtained by quantifying the state, is calculated according to a predetermined thickness state value calculation method. In this way, it is possible to speed up the processing as compared with the configuration in which the thickness state is calculated for the entire area of the information code, and it is possible to quantitatively grasp the thickness state. Further, the print quality information is generated by reflecting the thickness state value of the specific part, and this is notified to the user or recorded in the recording means. In this way, it is possible to quickly grasp the print quality of the target information code (specifically, the thickness state of the cell), and to quickly and effectively use it. It becomes like this.

請求項13の発明では、太さ状態値算出手段によって算出された特定部分の太さ状態値を予め定められた太さ基準値と比較し、特定部分の太さ状態値と太さ基準値との差を示す値、或いは、太さ基準値に対する太さ状態値の割合を示す値を印字品質情報として通知している。このようにすれば、セルがどのような太さ状態であるか(換言すれば、セルの太り細りがどのような程度であるか)をユーザによりわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。   In the invention of claim 13, the thickness state value of the specific portion calculated by the thickness state value calculating means is compared with a predetermined thickness reference value, and the thickness state value and the thickness reference value of the specific portion are A value indicating the difference between these values or a value indicating the ratio of the thickness state value to the thickness reference value is notified as print quality information. In this way, the thickness of the cell (in other words, how thick the cell is) can be communicated to the user in an easy-to-understand manner. Based on this, the print quality can be grasped with high accuracy.

請求項14の発明では、特定部分における明色セル及び暗色セルのいずれか一方の幅値をW1とし、他方の幅値をW2としたときの、W1とW2との加算値に対する一方の幅値W1の割合を示す値を、特定部分の太さ状態値として算出している。このようにすれば、明色セルと暗色セルのそれぞれの幅がどのような比率であるかを適切に定量化でき、暗色セル或いは明色セルの太さ状態を良好に反映した数値が得られる。   According to the fourteenth aspect of the present invention, when the width value of one of the light color cell and the dark color cell in the specific portion is W1, and the other width value is W2, one width value with respect to the added value of W1 and W2 A value indicating the ratio of W1 is calculated as the thickness state value of the specific portion. In this way, it is possible to appropriately quantify the ratio between the widths of the light cell and the dark cell, and to obtain a numerical value that favorably reflects the thickness state of the dark cell or the light cell. .

請求項15の発明では、特定部分に配される明色セルの1セル分の幅値と、特定部分に配される暗色セルの1セル分の幅値とを抽出し、明色セルの1セル分の幅値及び暗色セルの1セル分の幅値に基づいて太さ状態値を算出している。このようにすると、より迅速かつ効果的に太さ状態値を算出できる。   According to the fifteenth aspect of the present invention, the width value for one cell of the light color cell arranged in the specific portion and the width value for one cell of the dark color cell arranged in the specific portion are extracted, and 1 of the light color cell is extracted. The thickness state value is calculated based on the width value of the cell and the width value of one dark cell. In this way, the thickness state value can be calculated more quickly and effectively.

請求項16の発明は、QRコードを読取対象とし、当該QRコードの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンを、太さ状態値を算出する対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定でき、太さ状態値を迅速かつ良好に算出できる。特に、QRコードの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、太さ状態値算出処理の一層の迅速化を図ることができる。   According to the sixteenth aspect of the present invention, the QR code is to be read, and the position detection pattern of the QR code is detected as a “specific portion”. If the position detection pattern having a prescribed shape as described above is a target part for calculating the thickness state value, it is possible to specify the light cell and the dark cell with high accuracy without using a complicated detection method. Can be calculated quickly and satisfactorily. In particular, in the QR code reading process, the position detection pattern can be specified in the initial stage, so that the thickness state value calculation process can be further speeded up.

請求項17の発明は、QRコードにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎に太さ状態値を算出し、それら算出された位置検出パターン毎の太さ状態値に基づいて印字品質情報を生成している。このように、複数の位置検出パターンの太さ状態値を算出する構成とすれば、QRコードにおける互いに距離を隔てた複数位置において複雑な処理を用いることなく太さ状態値を迅速に算出でき、更に、それら太さ状態値に基づいて印字品質情報を生成する構成とすれば、単一の位置検出パターンの太さ状態値のみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   The invention of claim 17 attempts to detect all position detection patterns in the QR code, calculates a thickness state value for each detected position detection pattern, and calculates the calculated thickness state value for each position detection pattern. Print quality information is generated based on the above. In this way, if the thickness state value of the plurality of position detection patterns is calculated, the thickness state value can be quickly calculated without using complicated processing at a plurality of positions separated from each other in the QR code, Further, if the print quality information is generated based on the thickness status values, the print quality of the entire code is more appropriately compared with the configuration in which only the thickness status value of a single position detection pattern is calculated. Reflected print quality information can be obtained.

請求項18の発明は、全ての位置検出パターンが検出されない場合に、QRコードの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎に太さ状態値を算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及び太さ状態値の算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及び太さ状態値の算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   The invention according to claim 18 performs one or more image processing on the image data of the QR code based on one or more predetermined processing settings when not all position detection patterns are detected. The position detection pattern is retried for each image processed data after the image processing is performed according to the setting. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. In addition, a thickness state value is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and detection of a position detection pattern in each image processed data corresponding to each processing setting are detected. The result and the calculation result of the thickness state value are associated with each other and notified or recorded. In this way, the detection result of the position detection pattern and the calculation result of the thickness state value for each processing setting can be grasped, and it becomes easy to effectively use the appropriate processing setting.

請求項19の発明では、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンの太さ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおける太さ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行っている。このようにすれば、画像処理が効果的になされたと考えられる複数の画像処理済データに対し選択的にデコード処理を行うことができる。更に、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。   In the invention of claim 19, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the thickness state value of the position detection pattern is closest to the appropriate value, Decoding processing is performed for each of the image processed data with the smallest variation in thickness state value in the plurality of position detection patterns. In this way, it is possible to selectively perform decoding processing on a plurality of pieces of image processed data that are considered to have been effectively processed. Further, the image processed data with the smallest number of error corrections is selected from the plurality of image processed data subjected to the decoding process, and the processing setting for obtaining the image processed data is notified or recorded. ing. In this way, more reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively.

請求項20の発明では、位置検出パターンが検出された場合に、その検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行っている。このように情報コード全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して選択的に行うようにすれば、太さ状態値を得るために必要な領域に対して効率的に画像処理を行うことができ、画像処理を適切かつ迅速に行うことができる。更に、その画像処理がなされた後の位置検出パターンの太さ状態値に基づいて印字品質情報を生成し、当該印字品質情報を通知又は記録しているため、画像処理後の位置検出パターンの太さ状態値を有効利用できるようになる。   In the twentieth aspect, when a position detection pattern is detected, image processing is performed on the detected position detection pattern, or on the detected position detection pattern and the quiet zone. In this way, if the image processing is not performed on the entire information code but is selectively performed on the position detection pattern or the position detection pattern and the quiet zone, the area necessary for obtaining the thickness state value can be obtained. On the other hand, image processing can be performed efficiently, and image processing can be performed appropriately and quickly. Further, since the print quality information is generated based on the thickness state value of the position detection pattern after the image processing and the print quality information is notified or recorded, the thickness of the position detection pattern after the image processing is recorded. The state value can be used effectively.

請求項21の発明は、情報コードの一部を構成する特定部分に着目し、この特定部分の画像状態を示す評価値として、当該特定部分のかすれ状態を定量化した値であるかすれ状態値を、所定のかすれ状態値算出方法に従って算出している。このようにすれば、情報コードの全領域についてかすれ状態を算出する構成と比較して処理の迅速化を実現でき、またどのようなかすれ状態であるかを定量的に把握できる。さらに、特定部分のかすれ状態値を反映して印字品質情報を生成し、それをユーザに通知又は記録手段に記録しており、このようにすれば、対象となる情報コードがどのような印字品質であるか(具体的には、セルがどのようなかすれ状態であるか)を迅速に把握でき、かつ迅速に有効利用できるようになる。   The invention of claim 21 pays attention to a specific part constituting a part of the information code, and uses a blurred state value which is a value obtained by quantifying the blurred state of the specific part as an evaluation value indicating the image state of the specific part. The calculation is performed according to a predetermined blurred state value calculation method. In this way, it is possible to speed up the processing as compared with the configuration for calculating the fading state for the entire area of the information code, and it is possible to quantitatively grasp the fading state. Furthermore, the print quality information is generated by reflecting the blurred state value of the specific part, and this is notified to the user or recorded in the recording means. In this way, the print quality information of the target information code (Specifically, what kind of faint state the cell is) can be quickly grasped and can be effectively used quickly.

請求項22の発明は、かすれ状態値算出手段によって算出された特定部分のかすれ状態値を予め定められたかすれ基準値と比較し、特定部分のかすれ状態値とかすれ基準値との差を示す値、又はかすれ基準値に対するかすれ状態値の割合を示す値を印字品質情報として通知している。このようにすれば、セルがどのようなかすれ状態であるかをユーザによりわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。   The invention according to claim 22 is a value indicating a difference between the blurred state value of the specific portion and the blurred reference value by comparing the blurred state value of the specific portion calculated by the blurred state value calculating means with a predetermined blurred reference value. Or a value indicating the ratio of the blurred state value to the blurred reference value is notified as print quality information. In this way, it is possible to convey to the user in an easy-to-understand manner what the cell is in a faint state, and the user can accurately grasp the print quality based on a quantitative standard.

請求項23の発明では、特定部分における暗色セル又は明色セルが連続して並ぶべき領域において暗色部と明色部とを抽出し、暗色部と明色部との配置割合を示す値を、特定部分のかすれ状態値として算出している。このようにすれば、本来配置されるべき暗色領域又は明色領域に対する実際の暗色部又は明色部の割合を適切に定量化でき、セルのかすれ状態を精度高く反映した数値が得られる。   In the invention of claim 23, a dark color portion and a light color portion are extracted in a region where dark cells or light cells in a specific portion should be continuously arranged, and a value indicating an arrangement ratio of the dark color portion and the light color portion is represented by: It is calculated as a blurred state value of a specific part. In this way, the ratio of the actual dark color portion or light color portion to the dark color region or light color region that should be originally arranged can be appropriately quantified, and a numerical value that accurately reflects the blurred state of the cell can be obtained.

請求項24の発明では、暗色セル又は明色セルが連続して並ぶべき領域において、暗色部又は明色部が配される配置間隔と、暗色部又は明色部の幅値とを抽出し、配置間隔に対する暗色部又は明色部の幅値の割合を示す値を、特定部分のかすれ状態値として算出している。このようにすれば、明色部と暗色部の配置割合を、より迅速に、且つ良好に定量化できる。   In the invention of claim 24, in a region where dark cells or light cells should be continuously arranged, an arrangement interval in which the dark color portion or the light color portion is arranged and a width value of the dark color portion or the light color portion are extracted, A value indicating the ratio of the width value of the dark color portion or the light color portion to the arrangement interval is calculated as the blurred state value of the specific portion. In this way, the arrangement ratio of the light color part and the dark color part can be quantified more quickly and satisfactorily.

請求項25の発明は、QRコードを読取対象とし、当該QRコードの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンを、かすれ状態値を算出する対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定でき、かすれ状態値を迅速かつ良好に算出できる。特に、QRコードの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、かすれ状態値算出処理の一層の迅速化を図ることができる。   According to a twenty-fifth aspect of the present invention, a QR code is a reading target, and a position detection pattern of the QR code is detected as a “specific portion”. If the position detection pattern having the prescribed shape is set as a target part for calculating the blur state value, the bright cell and the dark cell can be accurately identified without using a complicated detection method, and the blur state value can be quickly determined. And it can be calculated well. In particular, in the QR code reading process, since the position detection pattern can be specified at an initial stage, the blur state value calculation process can be further accelerated.

請求項26の発明は、QRコードにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎にかすれ状態値を算出し、それら算出された位置検出パターン毎のかすれ状態値に基づいて印字品質情報を生成している。このように、複数の位置検出パターンのかすれ状態値を算出する構成とすれば、QRコードにおける互いに距離を隔てた複数位置において複雑な処理を用いることなくかすれ状態値を迅速に算出でき、更に、それらかすれ状態値に基づいて印字品質情報を生成する構成とすれば、単一の位置検出パターンのかすれ状態値のみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   The invention of claim 26 attempts to detect all the position detection patterns in the QR code, calculates a blurred state value for each detected position detection pattern, and based on the calculated blurred state value for each position detection pattern. Print quality information. In this way, if it is configured to calculate the blur state value of a plurality of position detection patterns, it is possible to quickly calculate the blur state value without using complicated processing at a plurality of positions separated from each other in the QR code. If the configuration generates print quality information based on the blurred state value, the print quality more appropriately reflects the print quality of the entire code compared to a configuration that calculates only the blurred state value of a single position detection pattern. Information will be obtained.

請求項27の発明は、全ての位置検出パターンが検出されない場合に、QRコードの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎にかすれ状態値を算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及びかすれ状態値の算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及びかすれ状態値の算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   According to the twenty-seventh aspect of the present invention, when not all position detection patterns are detected, one or a plurality of image processes are performed on the QR code image data based on one or a plurality of predetermined process settings. The position detection pattern is retried for each image processed data after the image processing is performed according to the setting. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. Further, a blur state value is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and a detection result of the position detection pattern in each image processed data corresponding to each processing setting And the calculation result of the blurred state value is associated with the notification or recording. In this way, the detection result of the position detection pattern and the calculation result of the blurred state value for each processing setting can be grasped, and it becomes easy to effectively use the appropriate processing setting.

請求項28の発明は、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのかすれ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおけるかすれ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行っている。このようにすれば、画像処理が効果的になされたと考えられる複数の画像処理済データに対し選択的にデコード処理を行うことができる。更に、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。   The invention of claim 28 is the image-processed data in which the position detection pattern is detected most frequently among the plurality of image-processed data, the image-processed data in which the blur state value of the position detection pattern approaches the most appropriate value, Decoding processing is performed for each of the image-processed data that minimizes the variation in the blur state value in the plurality of position detection patterns. In this way, it is possible to selectively perform decoding processing on a plurality of pieces of image processed data that are considered to have been effectively processed. Further, the image processed data with the smallest number of error corrections is selected from the plurality of image processed data subjected to the decoding process, and the processing setting for obtaining the image processed data is notified or recorded. ing. In this way, more reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively.

請求項29の発明は、位置検出パターンが検出された場合に、その検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行っている。このように情報コード全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して選択的に行うようにすれば、かすれ状態値を得るために必要な領域に対して効率的に画像処理を行うことができ、画像処理を適切かつ迅速に行うことができる。更に、その画像処理がなされた後の位置検出パターンのかすれ状態値に基づいて印字品質情報を生成し、当該印字品質情報を通知又は記録しているため画像処理後の位置検出パターンのかすれ状態値を有効利用できるようになる。   In a twenty-ninth aspect of the present invention, when a position detection pattern is detected, image processing is performed on the detected position detection pattern or on the detected position detection pattern and the quiet zone. In this way, instead of performing image processing on the entire information code, if it is performed selectively with respect to the position detection pattern, or the position detection pattern and the quiet zone, the area necessary for obtaining the blurred state value can be obtained. Image processing can be performed efficiently, and image processing can be performed appropriately and quickly. Further, since the print quality information is generated based on the blurred state value of the position detection pattern after the image processing is performed and the print quality information is notified or recorded, the blurred state value of the position detection pattern after the image processing is performed. Can be used effectively.

請求項30の発明は、QRコードの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う構成をなしており、各処理設定に従って画像処理がなされた後の画像処理済データに対して位置検出パターンの検出又はデコード処理が行われたときに、「画像処理前よりも位置検出パターンの検出数が増加」、「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果をユーザに通知する構成とされている。このようにすれば、画像処理が効果的になされたときにその旨をユーザに伝達でき、ユーザは当該結果を有効利用できるようになる。   The invention of claim 30 is configured to perform one or more image processing on the QR code image data based on one or more predetermined processing settings, and image processing is performed according to each processing setting. When the position detection pattern is detected or decoded for the image-processed data after that, “the number of detected position detection patterns is increased compared to before image processing”, “the number of error corrections before image processing” In the case where any one of “Decrease” and “Decoding process succeeded” is met, the result is notified to the user. In this way, when the image processing is effectively performed, the fact can be transmitted to the user, and the user can effectively use the result.

請求項31の発明では、画像処理手段が、画像データのダイナミックレンジを変更する変更手段を有しているため、画像処理の自由度がより大きくなる。   In the invention of claim 31, since the image processing means has a changing means for changing the dynamic range of the image data, the degree of freedom of the image processing is further increased.

請求項32の発明では、点灯パターン設定手段により設定された点灯パターンで照明手段の点灯が行われるように制御がなされる構成となっている。このようにすれば、照明手段の点灯パターンを切り替えて使用でき、点灯パターンに応じた印字品質情報を取得、利用できる。   In the invention of claim 32, the lighting unit is controlled to be lit with the lighting pattern set by the lighting pattern setting unit. If it does in this way, the lighting pattern of an illumination means can be switched and used, and the print quality information according to a lighting pattern can be acquired and utilized.

請求項33の発明では、各点灯パターンごとの画像データのうち、デコード処理が正常に行われた画像データについて評価値を算出し、その評価値に基づいて得られる印字品質情報をユーザに通知又は記録手段に記録している。このようにすると、ある点灯パターンでデコード処理が正常に行われない場合であっても点灯パターンを変更してデコード処理成功の確率を高めることができる。更に、ある点灯パターンでは印字品質情報が得られなくても、点灯パターンを変更して印字品質情報を取得できる可能性を高めることができ、印字品質情報を取得及び利用する上でより一層有利となる。   In the invention of claim 33, an evaluation value is calculated for image data that has been normally decoded among image data for each lighting pattern, and print quality information obtained based on the evaluation value is notified to the user or Recorded on recording means. In this way, even if the decoding process is not normally performed with a certain lighting pattern, the lighting pattern can be changed to increase the probability of a successful decoding process. Furthermore, even if the print quality information cannot be obtained with a certain lighting pattern, it is possible to increase the possibility of acquiring the print quality information by changing the lighting pattern, which is more advantageous in obtaining and using the print quality information. Become.

請求項34の発明では、点灯パターン設定手段により、複数の照明光源における点灯位置を設定し、その設定された点灯位置で点灯を行うように照明手段を制御している。このようにすると、点灯位置の変更によって画像状態が変わりやすい場合(例えばダイレクトマーキングによって得られた情報コードを読み取る場合等)にデコード成功の可能性を効果的に高めることができ、このような場合により有利となる。   In the invention of claim 34, the lighting pattern is set by the lighting pattern setting means, and the lighting means is controlled so that the lighting is performed at the set lighting position. In this case, the possibility of successful decoding can be effectively increased when the image state is easily changed by changing the lighting position (for example, when reading an information code obtained by direct marking). More advantageous.

請求項35の発明では、点灯パターン設定手段により、複数色の発光部における点灯色を設定し、その設定された点灯色で点灯を行うように照明手段を制御している。このようにすると、点灯色の変更によって画像状態が変わりやすい場合にデコード成功の可能性を効果的に高めることができ、このような読み取りの場合により有利となる。   In the invention of claim 35, the lighting pattern is set by the lighting pattern setting means, and the lighting means is controlled so that lighting is performed with the set lighting color. This makes it possible to effectively increase the possibility of successful decoding when the image state is easily changed by changing the lighting color, which is more advantageous for such reading.

請求項36の発明は、点灯パターン設定手段により、複数の照明光源の各々の点灯時間を設定し、その設定された複数の照明光源の各々の点灯時間に対応した点灯を行うように照明手段を制御している。このようにすると、点灯パターンを簡易且つ良好に切り替えることができる。   The invention of claim 36 sets the lighting time of each of the plurality of illumination light sources by the lighting pattern setting means, and the lighting means so as to perform lighting corresponding to each lighting time of the set plurality of illumination light sources. I have control. In this way, the lighting pattern can be switched easily and satisfactorily.

請求項37の発明は、受光手段の露光中に照明手段の点灯パターンの切り替えを行う構成をなしている。このようにすると、短時間でより多くの点灯パターンを用いることができるようになる。   The invention of claim 37 is configured to switch the lighting pattern of the illumination means during exposure of the light receiving means. In this way, more lighting patterns can be used in a short time.

請求項38の発明では、過去得られた複数の印字品質情報を、各々の印字品質情報の取得の際に用いられた点灯パターンとそれぞれ対応付けて記憶手段に蓄積しておき、その蓄積される過去の点灯パターンを、新たな点灯パターンとして設定するようにしている。このようにすると、どの点灯パターンで過去どのような印字品質情報が得られたかを把握した上で点灯パターンを設定できるため、期待する印字品質を得られやすい点灯パターンを設定しやすくなる。   In a thirty-eighth aspect of the present invention, a plurality of print quality information obtained in the past is stored in the storage means in association with the lighting pattern used in acquiring each print quality information, and the storage is stored. The past lighting pattern is set as a new lighting pattern. In this way, since it is possible to set the lighting pattern after grasping what kind of printing quality information has been obtained in the past with which lighting pattern, it becomes easy to set the lighting pattern that makes it easy to obtain the expected printing quality.

請求項39の発明では、複数の過去の印字品質情報に対応付けられたそれぞれの点灯パターンを、それら複数の過去の印字品質情報の印字品質の良い順に順序化し、その順序で点灯を行うように照明手段を制御している。このようにすると、より良好な印字品質が得られやすい点灯パターンを優先的に点灯を行うことができ、デコードが正常に行われる可能性の高い画像データをより迅速に取得できる。更に、このように順序化された各点灯パターンごとの画像データについてそれぞれデコード処理を行うようにしているため、情報コードについての正常な解読がより迅速に行われ、更には、正常に解読された画像データについての印字品質情報をより迅速に取得、利用できるようになる。   In the invention of claim 39, each lighting pattern associated with a plurality of past print quality information is ordered in the order of good print quality of the plurality of past print quality information, and lighting is performed in that order. The lighting means is controlled. In this way, it is possible to preferentially turn on a lighting pattern in which better print quality is easily obtained, and it is possible to more quickly acquire image data that is likely to be decoded normally. In addition, since the image data for each lighting pattern thus ordered is decoded, the normal decoding of the information code is performed more quickly, and further the normal decoding is performed. Printing quality information about image data can be acquired and used more quickly.

請求項40の発明では、順序化された各点灯パターンごとの画像データ全てについて読取不良が生じた場合、それら順序化された複数の点灯パターン以外の新規点灯パターンを設定している。このようにすると、過去蓄積された点灯パターンによって望ましい結果が得られなくても、それら以外の点灯パターンを新たに試すことができる。更に、その新規点灯パターンで点灯させて得られた画像データについてデコード処理が正常に行われた場合、その画像データについての印字品質情報をユーザに通知又は記録手段に記録するようにしている。このようにすると、次善策として新規点灯パターンを試行した上で、その新規点灯パターンについての結果をより有効に利用できるようになる。   In the invention of claim 40, when a reading failure occurs for all the image data for each of the ordered lighting patterns, new lighting patterns other than the plurality of lighting patterns ordered are set. In this way, even if a desired result cannot be obtained by the previously accumulated lighting patterns, other lighting patterns can be tried anew. Further, when the decoding process is normally performed on the image data obtained by lighting with the new lighting pattern, the print quality information about the image data is notified to the user or recorded in the recording means. If it does in this way, after trying a new lighting pattern as a next best measure, the result about the new lighting pattern can be used more effectively.

[第1実施形態]
以下、本発明の光学的情報読取装置を具現化した第1実施形態について、図面を参照して説明する。図1は本発明の光学情報読取装置の第1実施形態に係る情報コードリーダ20を概略的に例示するブロック図である。
[First embodiment]
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, a first embodiment in which an optical information reading device of the invention is embodied will be described with reference to the drawings. FIG. 1 is a block diagram schematically illustrating an information code reader 20 according to the first embodiment of the optical information reading apparatus of the present invention.

図1に示すように、情報コードリーダ20は、主に、照明光源21、受光センサ23、フィルタ25、結像レンズ27等の光学系と、メモリ35、制御回路40、操作スイッチ42、液晶表示装置46等のマイクロコンピュータ(以下「マイコン」という)系と、電源スイッチ41、電池49等の電源系と、から構成されている。なお、これらは、図略のプリント配線板に実装あるいは図略のハウジング内に内装されている。   As shown in FIG. 1, the information code reader 20 mainly includes an optical system such as an illumination light source 21, a light receiving sensor 23, a filter 25, and an imaging lens 27, a memory 35, a control circuit 40, an operation switch 42, and a liquid crystal display. A microcomputer (hereinafter referred to as “microcomputer”) system such as the device 46 and a power system such as a power switch 41 and a battery 49 are configured. These are mounted on a printed wiring board (not shown) or housed in a housing (not shown).

光学系は、照明光源21、受光センサ23、フィルタ25、結像レンズ27等から構成されている。照明光源21は、照明光Lfを発光可能な照明光源として機能するもので、例えば、赤色のLEDとこのLEDの出射側に設けられる拡散レンズ、集光レンズ等とから構成されている。本実施形態では、複数の照明光源21が設けられており、図略のハウジングの読取口を介して読取対象物Rに向けて照明光Lfを照射可能に構成されている。この読取対象物Rは、例えば、包装容器や包装用紙あるいはラベルといった表示媒体に相当するもので、その表面には情報コードQとして例えば二次元コードが印刷されている。なお、図1では、2つの照明光源21を図示しているが、これ以外の照明光源が別の位置に配されていてもよい。   The optical system includes an illumination light source 21, a light receiving sensor 23, a filter 25, an imaging lens 27, and the like. The illumination light source 21 functions as an illumination light source capable of emitting illumination light Lf, and includes, for example, a red LED and a diffusion lens, a condensing lens, and the like provided on the emission side of the LED. In the present embodiment, a plurality of illumination light sources 21 are provided, and configured to irradiate the illumination light Lf toward the reading object R through a reading port of a housing (not shown). The reading object R corresponds to a display medium such as a packaging container, packaging paper, or label, for example, and a two-dimensional code is printed on the surface as an information code Q, for example. In FIG. 1, two illumination light sources 21 are illustrated, but other illumination light sources may be arranged at different positions.

受光センサ23は、読取対象物Rや情報コードQに照射されて反射した反射光Lrを受光可能に構成されるもので、例えば、C−MOSやCCD等の固体撮像素子である受光素子を2次元に配列したエリアセンサが、これに相当する。この受光センサ23の受光面23aは、ハウジング外から読取口を介して外観可能に位置しており、受光センサ23は、結像レンズ27を介して入射する入射光をこの受光面23aで受光可能に図略のプリント配線板に実装されている。なお、本実施形態では、受光センサ23が「受光手段」の一例に相当する。   The light receiving sensor 23 is configured to receive the reflected light Lr irradiated and reflected on the reading object R and the information code Q. For example, the light receiving sensor 2 is a solid-state image pickup device such as a C-MOS or CCD. An area sensor arranged in a dimension corresponds to this. The light receiving surface 23a of the light receiving sensor 23 is positioned so as to be externally visible through the reading port from the outside of the housing. The light receiving sensor 23 can receive incident light incident through the imaging lens 27 on the light receiving surface 23a. It is mounted on a printed wiring board (not shown). In the present embodiment, the light receiving sensor 23 corresponds to an example of “light receiving means”.

フィルタ25は、反射光Lrの波長相当以下の光の通過を許容し、当該波長相当を超える光の通過を遮断し得る光学的なローパスフィルタで、ハウジングの読取口と結像レンズ27との間に設けられている。これにより、反射光Lrの波長相当を超える不要な光が受光センサ23に入射することを抑制している。   The filter 25 is an optical low-pass filter that allows passage of light that is less than or equal to the wavelength of the reflected light Lr, and that can block passage of light that exceeds the wavelength, and is provided between the reading port of the housing and the imaging lens 27. Is provided. Thereby, unnecessary light exceeding the wavelength equivalent of the reflected light Lr is prevented from entering the light receiving sensor 23.

結像レンズ27は、外部から読取口を介して入射する入射光を集光して受光センサ23の受光面23aに像を結像可能な結像光学系として機能するもので、例えば、鏡筒とこの鏡筒内に収容される複数の集光レンズとにより構成されている。本実施形態では、照明光源21から照射された照明光Lfが情報コードQに反射して読取口に入射する反射光Lrを集光することにより、受光センサ23の受光面23aに情報コードQのコード画像を結像可能にしている。   The imaging lens 27 functions as an imaging optical system capable of condensing incident light incident from the outside via a reading port and forming an image on the light receiving surface 23a of the light receiving sensor 23. And a plurality of condensing lenses housed in the lens barrel. In the present embodiment, the illumination light Lf emitted from the illumination light source 21 is reflected by the information code Q, and the reflected light Lr incident on the reading port is collected, whereby the information code Q is reflected on the light receiving surface 23a of the light receiving sensor 23. The code image can be formed.

次に、マイコン系の構成概要を説明する。マイコン系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、操作スイッチ42、LED43、ブザー44、液晶表示装置46、通信インタフェース48等から構成されている。このマイコン系は、その名の通り、マイコン(情報処理装置)として機能し得る制御回路40およびメモリ35と中心に構成されるもので、前述した光学系によって撮像された情報コードQの画像信号をハードウェア的およびソフトウェア的に信号処理し得るものである。また制御回路40は、当該情報コードリーダ20の全体システムに関する制御も行っている。   Next, a configuration outline of the microcomputer system will be described. The microcomputer system includes an amplification circuit 31, an A / D conversion circuit 33, a memory 35, an address generation circuit 36, a synchronization signal generation circuit 38, a control circuit 40, an operation switch 42, an LED 43, a buzzer 44, a liquid crystal display device 46, and a communication interface 48. Etc. As the name suggests, this microcomputer system is composed mainly of a control circuit 40 and a memory 35 that can function as a microcomputer (information processing apparatus). The microcomputer system captures the image signal of the information code Q imaged by the optical system described above. It can perform signal processing in terms of hardware and software. The control circuit 40 also performs control related to the entire system of the information code reader 20.

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

メモリ35は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。このメモリ35のうちのRAMには、前述した画像データ蓄積領域のほかに、制御回路40が算術演算や論理演算等の各処理時に利用する作業領域や読取条件テーブルも確保可能に構成されている。またROMには、後述する読取処理、評価処理等を実行可能な所定プログラムやその他、照明光源21、受光センサ23等の各ハードウェアを制御可能なシステムプログラム等が予め格納されている。   The memory 35 is a semiconductor memory device, and corresponds to, for example, a RAM (DRAM, SRAM, etc.) or a ROM (EPROM, EEPROM, etc.). In addition to the above-described image data storage area, the RAM of the memory 35 is configured to be able to secure a work area and a reading condition table that are used by the control circuit 40 in each processing such as arithmetic operation and logical operation. . In addition, the ROM stores in advance a predetermined program that can execute a reading process, an evaluation process, and the like, which will be described later, and a system program that can control each piece of hardware such as the illumination light source 21 and the light receiving sensor 23.

制御回路40は、情報コードリーダ20全体を制御可能なマイコンで、CPU、システムバス、入出力インタフェース等からなるもので、メモリ35とともに情報処理装置を構成し得るもので情報処理機能を有する。この制御回路40には、内蔵された入出力インタフェースを介して種々の入出力装置(周辺装置)と接続可能に構成されており、本実施形態の場合、電源スイッチ41、操作スイッチ42、LED43、ブザー44、液晶表示装置46、通信インタフェース48等を接続されている。   The control circuit 40 is a microcomputer capable of controlling the entire information code reader 20 and includes a CPU, a system bus, an input / output interface, and the like. The control circuit 40 can constitute an information processing apparatus together with the memory 35 and has an information processing function. The control circuit 40 is configured to be connectable to various input / output devices (peripheral devices) via a built-in input / output interface. In the present embodiment, the power switch 41, the operation switch 42, the LED 43, A buzzer 44, a liquid crystal display device 46, a communication interface 48, and the like are connected.

これにより、例えば、電源スイッチ41や操作スイッチ42の監視や管理、またインジケータとして機能するLED43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、さらには読み取った情報コードQによるコード内容を画面表示可能な液晶表示装置46の画面制御や外部装置とのシリアル通信を可能にする通信インタフェース48の通信制御等を可能にしている。なお、通信インタフェース48に接続される外部装置には、当該情報コードリーダ20の上位システムに相当するホストコンピュータHST等が含まれる。   Thereby, for example, monitoring and management of the power switch 41 and the operation switch 42, turning on / off the LED 43 functioning as an indicator, turning on / off the buzzer 44 capable of generating a beep sound and an alarm sound, and further reading the information code Screen control of the liquid crystal display device 46 capable of displaying the code contents by Q on the screen, communication control of the communication interface 48 enabling serial communication with an external device, and the like are enabled. The external device connected to the communication interface 48 includes a host computer HST corresponding to the host system of the information code reader 20 and the like.

電源系は、電源スイッチ41、電池49等により構成されており、制御回路40により管理される電源スイッチ41のオンオフによって、上述した各装置や各回路に、電池49から供給される駆動電圧の導通や遮断が制御されている。なお、電池49は、所定の直流電圧を発生可能な2次電池で、例えば、リチウムイオン電池等がこれに相当する。また、電池49によることなく、例えば、通信インタフェース48を介して接続されるホストコンピュータHST等の外部装置から電力供給を受ける構成を採る場合もあり、この場合には当該電池49は不要となる。   The power supply system includes a power switch 41, a battery 49, and the like. When the power switch 41 managed by the control circuit 40 is turned on and off, the conduction of the drive voltage supplied from the battery 49 to each device and each circuit described above is established. Or shut off is controlled. The battery 49 is a secondary battery that can generate a predetermined DC voltage, and corresponds to, for example, a lithium ion battery. Further, the battery 49 may be configured to receive power supply from an external device such as the host computer HST connected via the communication interface 48 without using the battery 49. In this case, the battery 49 is unnecessary.

このように情報コードリーダ20を構成することによって、例えば、電源スイッチ41がオンされて所定の自己診断処理等が正常終了し、情報コードQの読み取りが可能な状態になると、照明光Lfの発光を指示する操作スイッチ42(例えばトリガースイッチ)の入力を受け付ける。これにより、作業者がトリガースイッチを押圧しオンにすることで、制御回路40が同期信号を基準に照明光源21に発光信号を出力するので、当該発光信号を受けた照明光源21は、LEDを発光させて照明光Lfを照射する。   By configuring the information code reader 20 in this manner, for example, when the power switch 41 is turned on and a predetermined self-diagnosis process or the like is normally completed and the information code Q can be read, the illumination light Lf is emitted. The input of the operation switch 42 (for example, a trigger switch) is given. As a result, when the operator presses the trigger switch to turn it on, the control circuit 40 outputs a light emission signal to the illumination light source 21 based on the synchronization signal, so that the illumination light source 21 that has received the light emission signal turns on the LED. Light is emitted to irradiate illumination light Lf.

すると、情報コードQに照射された照明光Lfが反射しその反射光Lrが読取口およびフィルタ25を介して結像レンズ27に入射するため、受光センサ23の受光面23aには、結像レンズ27により情報コードQの像、つまりコード画像が結像される。これにより、受光面23aを構成する各受光素子が露光され、各受光素子から受光量に応じた信号がそれぞれ出力される。各受光素子から出力される信号は、情報コードの画像データを構成するものであり、この画像データを2値化した後、所定のデコード処理を施すことによって、情報コードQとして符号化された文字データ等が解読されることとなる。解読された内容は液晶表示器46に表示したり、通信インターフェース48を介してホストコンピュータHSTに出力したりすることができる。なお、本実施形態では、制御回路40が「デコード手段」の一例に相当する。   Then, the illumination light Lf irradiated to the information code Q is reflected, and the reflected light Lr enters the imaging lens 27 through the reading port and the filter 25, so that the imaging lens is formed on the light receiving surface 23a of the light receiving sensor 23. 27, an image of the information code Q, that is, a code image is formed. Thereby, each light receiving element which comprises the light-receiving surface 23a is exposed, and the signal according to the light reception amount is output from each light receiving element, respectively. The signal output from each light receiving element constitutes the image data of the information code. After the image data is binarized, a character is encoded as the information code Q by performing a predetermined decoding process. Data etc. will be deciphered. The decrypted contents can be displayed on the liquid crystal display 46 or output to the host computer HST via the communication interface 48. In the present embodiment, the control circuit 40 corresponds to an example of “decoding means”.

次に、情報コードリーダ20を用いた評価処理について説明する。
図2は評価処理の流れを例示するフローチャートである。この評価処理はメモリ35に記憶されるプログラムに従って制御回路40によって実行されるものであり、所定の操作をトリガとして開始されたり、或いは読取処理のサブルーチンとして実施されたりするものである。当該評価処理が開始されると、まず、画像取得処理が行われる(S1)。画像取得処理は、当該処理実施時における受光センサ23による受光結果に基づいて情報コードの画像データを生成し、メモリ35に記憶する処理である。なお、情報コードの画像データを生成し、メモリ35に記憶する流れは上述した通りであり、本実施形態では、制御回路40が「生成手段」の一例に相当する。
Next, an evaluation process using the information code reader 20 will be described.
FIG. 2 is a flowchart illustrating the flow of the evaluation process. This evaluation process is executed by the control circuit 40 in accordance with a program stored in the memory 35, and is started with a predetermined operation as a trigger, or is executed as a reading process subroutine. When the evaluation process is started, first, an image acquisition process is performed (S1). The image acquisition process is a process of generating image data of an information code based on the light reception result by the light receiving sensor 23 at the time of executing the process and storing it in the memory 35. The flow of generating the image data of the information code and storing it in the memory 35 is as described above. In the present embodiment, the control circuit 40 corresponds to an example of “generating means”.

次いで、Nの値を初期状態に設定する処理を行う(S2)。このNは画像処理を行う際の処理設定のカウンタとして機能するものであり、N=1のときには後述する画像処理において1番目の処理設定が用いられ、N=2のときには後述する画像処理において2番目の処理設定が用いられるようになっている。   Next, a process of setting the value of N to the initial state is performed (S2). This N functions as a counter for processing setting when performing image processing. When N = 1, the first processing setting is used in image processing described later, and when N = 2, 2 is set in image processing described later. The second processing setting is used.

次に、位置検出パターン(以下FPパターンとも称する)の検出処理が行われる(S3)。本実施形態では情報コードの例としてQRコードを挙げており、S3では、QRコードにおける全ての位置検出パターンの検出を試みるように処理が行われる。QRコードの位置検出パターンの検出処理は公知であるので詳細は省略するが、概要としては明色セル、暗色セルの並びが特定の比率(1:1:3:1:1)となる部位を検出するように処理が行われる。
なお、位置検出パターンは「特定部分」の一例に相当する。また、制御回路40は、「特定部分検出手段」の一例に相当し、受光センサ23による受光結果に基づき(即ち、S1の画像取得処理により得られた画像データに基づき)QRコードの一部を構成する位置検出パターンを検出するように機能する。
Next, a position detection pattern (hereinafter also referred to as FP pattern) detection process is performed (S3). In the present embodiment, a QR code is used as an example of the information code. In S3, processing is performed so as to try to detect all position detection patterns in the QR code. The detection process of the QR code position detection pattern is well known and will not be described in detail. However, as a summary, a part where the arrangement of light cells and dark cells is a specific ratio (1: 1: 3: 1: 1) is used. Processing is performed to detect.
The position detection pattern corresponds to an example of a “specific part”. The control circuit 40 corresponds to an example of a “specific part detecting unit”, and a part of the QR code is obtained based on the light reception result by the light receiving sensor 23 (that is, based on the image data obtained by the image acquisition process of S1). It functions to detect the position detection pattern that constitutes it.

次に、上記位置検出パターン検出処理によって検出された位置検出パターンの数が「3」であるか否かを判断する(S4)。QRコードはその規格上3つの位置検出パターンが配置されるため、位置検出パターンが3つ検出されたということは、全ての位置検出パターンが検出されたことを意味する。この場合にはS4にてYesに進み、S5にてコントラスト算出・デコード処理を実施する。   Next, it is determined whether or not the number of position detection patterns detected by the position detection pattern detection process is “3” (S4). Since three position detection patterns are arranged in the QR code according to the standard, the fact that three position detection patterns are detected means that all position detection patterns have been detected. In this case, the process proceeds to Yes in S4, and the contrast calculation / decoding process is performed in S5.

S5のコントラスト算出・デコード処理では、まずS3にて検出された位置検出パターンについて、各位置検出パターン毎にコントラストの算出が行われる。コントラストの算出は、S3にて検出されたそれぞれの位置検出パターンにおいて、明色セル及び暗色セルの輝度を検出し、その検出結果を所定の演算式に当てはめるようになされる。   In the contrast calculation / decoding process in S5, the contrast is calculated for each position detection pattern for the position detection pattern detected in S3. The contrast is calculated by detecting the brightness of the light cell and the dark cell in each position detection pattern detected in S3 and applying the detection result to a predetermined arithmetic expression.

図3は、画像データ内の1つの位置検出パターンFP1(図6(a)も参照)を拡大して説明する説明図である。本実施形態では、位置検出パターンFP1に配される複数の明色セルの輝度、及び複数の暗色セルの輝度をそれぞれ算出しており、具体的には、図3のように、明色セル、暗色セルの並びが特定の比率(1:1:3:1:1)となるライン上に配される複数の明色セルA1、A2、A3、A4及び複数の暗色セルB1、B2、B3に着目し、各々のセルA1〜A4、B1〜B3の輝度をそれぞれ算出している。   FIG. 3 is an explanatory diagram for enlarging and explaining one position detection pattern FP1 (see also FIG. 6A) in the image data. In the present embodiment, the brightness of a plurality of bright cells and the brightness of a plurality of dark cells arranged in the position detection pattern FP1 are respectively calculated. Specifically, as shown in FIG. A plurality of light-colored cells A1, A2, A3, A4 and a plurality of dark-colored cells B1, B2, B3 arranged on a line in which dark cell arrangements have a specific ratio (1: 1: 3: 1: 1) Paying attention, the brightness of each of the cells A1 to A4 and B1 to B3 is calculated.

各セルにおける輝度の算出は、各々のセル内において、所定の中心位置及び当該中心位置を挟んだ両側位置の輝度をそれぞれ抽出するようになされる。図4は、代表例として明色セルA1における輝度の検出を説明しており、図4に示すように、セル内の中心位置P1の輝度X1を抽出すると共に、中心位置P1を挟んだ左右両側位置P2,P3の輝度X2、X3、及び中心位置P1を挟んだ上下両側位置P4,P5の輝度X4、X5をそれぞれ抽出している。図4の例では、左右方向(受光センサ23における画像素子の行方向に対応する方向)において、一端側の端部Paと中心位置P1との中間位置を左側位置P2とし、一端側の端部Pbと中心位置P1との中間位置を右側位置P3としている。また、上下方向(受光センサ23における画像素子の列方向に対応する方向)において、一端側の端部Pcと中心位置P1との中間位置を上側位置P4とし、一端側の端部Pdと中心位置P1との中間位置を下側位置P5としている。   The calculation of the luminance in each cell is performed by extracting the luminance at a predetermined center position and both side positions sandwiching the center position in each cell. FIG. 4 illustrates the detection of the luminance in the light cell A1 as a representative example. As shown in FIG. 4, the luminance X1 at the center position P1 in the cell is extracted and both the left and right sides sandwiching the center position P1. Luminances X2 and X3 at positions P2 and P3 and luminances X4 and X5 at both upper and lower positions P4 and P5 across the center position P1 are extracted. In the example of FIG. 4, in the left-right direction (the direction corresponding to the row direction of the image element in the light receiving sensor 23), the intermediate position between the end Pa on one end side and the center position P1 is the left position P2, and the end on one end side An intermediate position between Pb and the center position P1 is a right position P3. Further, in the vertical direction (direction corresponding to the row direction of the image elements in the light receiving sensor 23), an intermediate position between the end portion Pc on one end side and the center position P1 is set as an upper position P4, and an end portion Pd on one end side and the center position are set. An intermediate position with respect to P1 is a lower position P5.

そして、このように抽出される単一明色セル内の各位置(即ち、中心位置P1、左右両側位置P2、P3、上下両側位置P4,P5)での輝度抽出結果に基づいて、位置検出パターンFP1の明色セルA1の輝度Xが算出される。これら各位置P1〜P5の輝度値に基づいて明色セルA1の輝度Xを算出する方法としては様々な例が考えられるが、本実施形態では、各位置P1〜P5での輝度X1〜X5の平均値(即ち(X1+X2+X3+X4+X5)/5)を明色セルA1の輝度Xaとしている。他の明色セルA2、A3、A4の輝度Xb、Xc、Xdも同様に算出される。そして、これら明色セルA1、A2、A3、A4の輝度Xa、Xb、Xc、Xdの平均値(即ち、(Xa+Xb+Xc+Xd)/4)を明色セルの輝度Xとしている。   Then, based on the luminance extraction result at each position (that is, the center position P1, the left and right side positions P2, P3, the upper and lower side positions P4, P5) in the single light color cell extracted in this way, the position detection pattern. The luminance X of the light cell A1 of FP1 is calculated. Various examples of the method for calculating the luminance X of the light cell A1 based on the luminance values at the respective positions P1 to P5 are conceivable. In the present embodiment, the luminance X1 to X5 at the respective positions P1 to P5 are calculated. The average value (that is, (X1 + X2 + X3 + X4 + X5) / 5) is set as the luminance Xa of the light cell A1. The luminances Xb, Xc, and Xd of the other bright cells A2, A3, and A4 are similarly calculated. The average value (that is, (Xa + Xb + Xc + Xd) / 4) of the luminances Xa, Xb, Xc, and Xd of the light cells A1, A2, A3, and A4 is used as the light cell X.

また、暗色セルの輝度Yも同様であり、例えば暗色セルB1の場合、単一暗色セル内の中心位置の輝度Y1、左右両側位置の輝度Y2、Y3、上下両側位置での輝度Y4、Y5に基づき、その平均値(即ち、Y1+Y2+Y3+Y4+Y5)/5)を暗色セルB1の輝度Yaとしている。他の暗色セルB2、B3の輝度Yb、Ycも同様に算出される。そして、これら暗色セルB1、B2、B3の輝度Ya、Yb、Ycの平均値(即ち、(Ya+Yb+Yc)/3)を暗色セルの輝度Yとしている。   The same applies to the luminance Y of the dark cell. For example, in the case of the dark cell B1, the luminance Y1 at the center position in the single dark cell, the luminances Y2 and Y3 at the left and right side positions, and the luminance Y4 and Y5 at the upper and lower side positions. Based on this, the average value (ie, Y1 + Y2 + Y3 + Y4 + Y5) / 5) is set as the luminance Ya of the dark cell B1. The luminances Yb and Yc of the other dark cells B2 and B3 are similarly calculated. The average value (that is, (Ya + Yb + Yc) / 3) of the luminances Ya, Yb, Yc of the dark cells B1, B2, B3 is set as the luminance Y of the dark cell.

そして、このように得られた明色セルの輝度X及び暗色セルの輝度Yをパラメータとして予め定められたコントラスト算出式に基づいて位置検出パターンFP1のコントラストC1を算出する。本実施形態では、(X−Y)/Xにて得られる値を位置検出パターンFP1のコントラストC1としている。なお、上記説明では位置検出パターンFP1のコントラストC1を検出する方法を説明したが、他の位置検出パターンFP2、FP3のコントラストC2、C3も同様の方法で検出される。   Then, the contrast C1 of the position detection pattern FP1 is calculated on the basis of a predetermined contrast calculation formula using the brightness X and brightness Y of the dark cell thus obtained as parameters. In the present embodiment, the value obtained by (XY) / X is used as the contrast C1 of the position detection pattern FP1. In the above description, the method of detecting the contrast C1 of the position detection pattern FP1 has been described. However, the contrasts C2 and C3 of the other position detection patterns FP2 and FP3 are also detected by the same method.

そして、上記のようにして得られた3つの位置検出パターンFP1、FP2、FP3のコントラストC1,C2,C3の平均値Ca(Ca=(C1+C2+C3)/3)を算出し、この平均値CaをQRコードQのコントラストとして扱う。
なお、本実施形態では制御回路40が、「輝度検出手段」「コントラスト算出手段」の一例に相当する。
Then, an average value Ca (Ca = (C1 + C2 + C3) / 3) of the contrasts C1, C2, and C3 of the three position detection patterns FP1, FP2, and FP3 obtained as described above is calculated, and this average value Ca is calculated as QR. Treat as the contrast of code Q.
In the present embodiment, the control circuit 40 corresponds to an example of “luminance detection means” and “contrast calculation means”.

また、S5のコントラスト算出、デコード処理では、QRコードQのコントラストCaのみならず、余裕度の算出をも行っている。本実施形態では、予め定められた閾値Cs(閾値Csはコントラストを評価する上での基準情報に相当する)と得られたコントラストCaとを比較し、閾値CsとコントラストCaとの差Cs−Caを余裕度Cdとしている。なお、この余裕度Cdは「印字品質情報」の一例に相当するものである。   In contrast calculation and decoding processing in S5, not only the contrast Ca of the QR code Q but also a margin is calculated. In the present embodiment, a predetermined threshold Cs (threshold Cs corresponds to reference information for evaluating contrast) is compared with the obtained contrast Ca, and a difference Cs−Ca between the threshold Cs and the contrast Ca is compared. Is a margin Cd. The margin Cd corresponds to an example of “print quality information”.

また、S5では、併せてデコード処理が行われる。具体的には現在の画像データ(S1にて取得した画像データ、なおS10又はS11にて画像処理が行われた後の画像処理済データが存在する場合にはその画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   In S5, a decoding process is also performed. Specifically, based on current image data (image data acquired in S1, or image processed data if image processed data after image processing is performed in S10 or S11) exists. A decoding process is performed, and the possibility of decoding and the number of error corrections are verified.

その後、得られた余裕度Cdや誤り訂正数をメモリ35に記憶する記憶処理が行われる(S6)。図5(a)は、このときにメモリ35に記憶される記憶内容を例示するものであり、本実施形態では、S5の処理対象のデータについて、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各コントラストC1、C2、C3、位置検出パターンのコントラストの平均値Ca、余裕度Cd、S5のデコード処理の可否、誤り訂正数がそれぞれ記憶される。   Thereafter, a storage process for storing the obtained margin Cd and the number of error corrections in the memory 35 is performed (S6). FIG. 5A illustrates the storage contents stored in the memory 35 at this time. In this embodiment, the image processing setting, the number of detected position detection patterns, and the position of the data to be processed in S5 are described. The coordinates of the detection pattern, the contrasts C1, C2, and C3 of the position detection pattern, the average value Ca of the contrast of the position detection pattern, the allowance Cd, the availability of the decoding process of S5, and the number of error corrections are stored.

このS6の記憶処理は、後述する画像処理(S10又はS11)が行われない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かは現在のNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」としてN−1番目の画像処理設定の情報を対応付けて記憶する。   The storage process of S6 may be performed in a state where image processing (S10 or S11) described later is not performed, or may be performed after image processing described later. Whether it is after image processing can be determined by the current value of N, and N = 1 means a state in which image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, information on the (N−1) -th image processing setting is stored in association with “image processing setting”.

なお、図2の例ではS5にて得られた余裕度Cd等についての記憶を行っているが、このような余裕度Cdや他の情報(画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各コントラストC1、C2、C3、位置検出パターンのコントラストの平均値Ca、S5のデコード処理の可否、誤り訂正数のいずれか1又は複数)を液晶表示器46に出力し、ユーザに通知するようにしてもよい。   In the example of FIG. 2, the margin Cd and the like obtained in S5 are stored, but such margin Cd and other information (image processing setting, number of detected position detection patterns, position detection, etc.) The coordinate of the pattern, each contrast C1, C2, C3 of the position detection pattern, the average value Ca of the contrast of the position detection pattern, whether or not decoding of S5 is possible, and the number of error corrections are output to the liquid crystal display 46 The user may be notified.

本実施形態では、余裕度Cdが「印字品質情報」の一例に相当し、算出された位置検出パターン毎のコントラストに基づいて余裕度Cdが算出されるようになっている。
また、本実施形態では、制御回路40及びメモリ35が「算出結果利用手段」の一例に相当し、位置検出パターンのコントラスト(上記例ではCa)と、当該コントラストCaを評価する上での基準となる閾値Csと、を反映して得られるQRコードQの余裕度Cdをメモリ35に記憶するように機能する。
また、制御回路40及び液晶表示器46は「算出結果利用手段」として機能し、QRコードQの余裕度Cdをユーザに通知するように機能する。
In the present embodiment, the margin Cd corresponds to an example of “print quality information”, and the margin Cd is calculated based on the calculated contrast for each position detection pattern.
Further, in the present embodiment, the control circuit 40 and the memory 35 correspond to an example of “calculation result utilization means”, and the contrast (Ca in the above example) of the position detection pattern and the reference for evaluating the contrast Ca The margin Cd of the QR code Q obtained by reflecting the threshold value Cs is stored in the memory 35.
The control circuit 40 and the liquid crystal display 46 function as “calculation result utilization means” and function to notify the user of the margin Cd of the QR code Q.

一方、S4にて位置検出パターンの検出数が3でないと判断された場合にはS4にてNoに進み、S7において検出数が0であるか否かを判断する。0でない場合には、S7にてNoに進み、S8においてS5と同様のコントラスト算出・デコード処理処理を行う。S5では3つの位置検出パターンFP1〜FP3のそれぞれのコントラストC1〜C3を算出し平均値Caを求めていたが、S8では、S2にて検出された位置検出パターンの分だけコントラストを算出する。各位置検出パターンのコントラストを算出する方法はS5と同様であり、また、S5と同様に、各位置検出パターンのコントラストの平均値Cbも算出する。   On the other hand, if it is determined in S4 that the number of detected position detection patterns is not 3, the process proceeds to No in S4, and it is determined whether or not the number of detection is 0 in S7. If it is not 0, the process proceeds to No in S7, and the same contrast calculation / decoding process as S5 is performed in S8. In S5, the respective contrasts C1 to C3 of the three position detection patterns FP1 to FP3 are calculated and the average value Ca is obtained. In S8, the contrast is calculated for the position detection patterns detected in S2. The method for calculating the contrast of each position detection pattern is the same as that in S5, and the average value Cb of the contrast of each position detection pattern is also calculated as in S5.

また、S8のコントラスト算出、デコード処理でも、QRコードQのコントラスト(即ち、各位置検出パターンのコントラストの平均値Cb)のみならず、余裕度の算出をも行っている。具体的にはS5と同様に、閾値Csと得られたコントラスト(即ち、平均値Cb)との差Cs−Cbを余裕度Cdとしている。   In contrast calculation and decoding processing in S8, not only the contrast of the QR code Q (that is, the average value Cb of the contrast of each position detection pattern) but also a margin is calculated. Specifically, similarly to S5, the difference Cs−Cb between the threshold Cs and the obtained contrast (that is, the average value Cb) is set as the margin Cd.

また、S8でも、デコード処理が行われる。具体的には現在の画像データ(S1にて取得した画像データ、既にS10又はS11にて画像処理が行われている場合には直前の画像処理後の画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   In S8, the decoding process is also performed. Specifically, the decoding process is performed based on the current image data (the image data acquired in S1, or the image processed data immediately after the previous image processing if the image processing has already been performed in S10 or S11). This is done to verify whether decoding is possible and the number of error corrections.

その後、S6と同様に、得られた余裕度Cdや誤り訂正数をメモリ35に記憶する記憶処理が行われる(S9)。図5(b)はこのときの記憶例を示すものであり、S8の処理対象のデータについて、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各コントラスト、位置検出パターンのコントラストの平均値Cb、余裕度Cd、S8のデコード処理の可否、誤り訂正数がそれぞれ記憶される。   Thereafter, similarly to S6, a storage process for storing the obtained margin Cd and the number of error corrections in the memory 35 is performed (S9). FIG. 5B shows an example of storage at this time. For the data to be processed in S8, image processing settings, the number of detected position detection patterns, the coordinates of the position detection pattern, each contrast and position of the position detection pattern. The average value Cb of the contrast of the detection pattern, the margin Cd, the availability of decoding processing in S8, and the number of error corrections are stored.

このS9の記憶処理は、後述する画像処理(S10又はS11)が行われない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かはNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として、「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」として、N−1番目の画像処理設定の情報を対応付けて記憶する。   The storage process in S9 may be performed in a state where image processing (S10 or S11) described later is not performed, or may be performed after image processing described later. Whether or not it is after image processing can be determined by the value of N, and N = 1 means that image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, as the “image processing setting”, information on the (N−1) th image processing setting is stored in association with each other.

その後、画像処理が行われる(S10)。S10では、、予め登録されている複数の処理設定の中からいずれかの処理設定が用いられ、S1にて取得された画像データに対して画像処理が行われる。S10で用いられる処理設定は、N番目の処理設定であり、現在のNの値が1であれば1番目の処理設定が用いられ、現在のNの値が2であれば2番目の処理設定が用いられることとなる。処理設定としては画像処理に用いる様々な設定を採用でき、本実施形態では、例えば3×3平滑処理、5×5平滑処理、5×5膨張処理などを例示している。また、「画像データのダイナミックレンジを変更する処理」も処理設定として採用されている。例えば現在のNの値が1であり、1番目の処理設定が3×3平滑処理であれば、S10においては、S1にて得られた画像データに対して3×3平滑処理による画像処理が行われる。また、現在のNの値が3であり、3番目の処理設定が5×5膨張処理であればS10では、S1にて得られた画像データに対して5×5膨張処理による画像処理が行われることとなる。   Thereafter, image processing is performed (S10). In S10, any one of a plurality of processing settings registered in advance is used, and image processing is performed on the image data acquired in S1. The process setting used in S10 is the Nth process setting. If the current N value is 1, the first process setting is used. If the current N value is 2, the second process setting is used. Will be used. Various settings used for image processing can be adopted as the processing settings. In the present embodiment, for example, 3 × 3 smoothing processing, 5 × 5 smoothing processing, 5 × 5 expansion processing, and the like are illustrated. Further, “processing for changing the dynamic range of image data” is also adopted as a processing setting. For example, if the current value of N is 1 and the first processing setting is 3 × 3 smoothing processing, in S10, image processing by 3 × 3 smoothing processing is performed on the image data obtained in S1. Done. If the current value of N is 3 and the third processing setting is 5 × 5 expansion processing, in S10, image processing by 5 × 5 expansion processing is performed on the image data obtained in S1. Will be.

一方、S7にて位置検出パターンの検出数が0と判断された場合には、S7にてYesに進み、S10と同様の画像処理を行う。この画像処理もS10と同様であり、S1にて取得した画像データに対してN番目の処理設定を用いて画像処理を行うこととなる。   On the other hand, if it is determined in S7 that the number of detected position detection patterns is 0, the process proceeds to Yes in S7 and image processing similar to S10 is performed. This image processing is also the same as S10, and the image processing is performed on the image data acquired in S1 using the Nth processing setting.

S10又はS11の画像処理が終了すると、S12にてNの値がインクリメントされ、S13にて全ての処理設定について画像処理が終了したか判断される。予め登録されている処理設定全てについて画像処理が完了した場合にはS13にてYesに進み、当該評価処理を終了する。一方、登録された処理設定の全てについて画像処理が完了していない場合にはS13にてNoに進み、S3以降の処理を繰り返すこととなる。   When the image processing in S10 or S11 is completed, the value of N is incremented in S12, and it is determined in S13 whether the image processing has been completed for all processing settings. If the image processing has been completed for all processing settings registered in advance, the process proceeds to Yes in S13, and the evaluation processing is terminated. On the other hand, if the image processing has not been completed for all of the registered processing settings, the process proceeds to No in S13, and the processes in and after S3 are repeated.

本実施形態では、S3において全ての位置検出パターンが検出されない場合(即ち、S4にてNoとなる場合)に、S10又はS11においてQRコードQの画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行うことができるようになっており、S3において、画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるようになっている。そして、S5又はS8において、各処理設定に対応した各画像処理済データに対し位置検出パターン毎にコントラストを算出し、その後のS6又はS9において、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果と、コントラストの算出結果と、を対応付けて通知又は記録するようになっている。例えば、S1の処理において図6(a)に示す画像データが取得され、初回のS3の処理では領域Mに配置される1つの位置検出パターンFP1のみしか検出できなかった場合、S10においてNの値に基づく画像処理が行われ、図6(b)のような画像処理済データが得られることとなる。そして、このような画像処理済データに対してS3において位置検出パターンの検出が再度なされ、かつS5又はS8においてコントラスト算出・デコード処理が行われる。このとき、画像処理前よりもコントラストが増大したり、誤り訂正数が減少したり、或いは画像処理前にデコードできなかったものがデコードできるようになった場合、画像処理が有効であったといえる。本実施形態では、このような事情を考慮し、画像処理に用いる処理設定と、その処理設定に基づいて画像処理がなされた後の評価結果と、を対応付けて記憶或いは通知しているため、当該評価処理以降において同様の読み取りを行う際に当該情報を役立てることができる。   In this embodiment, when all the position detection patterns are not detected in S3 (that is, when No in S4), a plurality of predetermined process settings are performed on the image data of QR code Q in S10 or S11. A plurality of image processing can be performed according to the above, and in S3, the detection of the position detection pattern is tried again for each image processed data after the image processing is performed. In S5 or S8, contrast is calculated for each position detection pattern for each image processed data corresponding to each processing setting, and in each subsequent S6 or S9, each processing setting and each image corresponding to each processing setting are calculated. The detection result of the position detection pattern in the processed data and the calculation result of the contrast are notified or recorded in association with each other. For example, when the image data shown in FIG. 6A is acquired in the process of S1 and only one position detection pattern FP1 arranged in the region M can be detected in the first process of S3, the value of N is determined in S10. The image processing based on is performed, and the image processed data as shown in FIG. 6B is obtained. Then, the position detection pattern is detected again in S3 for such image processed data, and contrast calculation / decoding processing is performed in S5 or S8. At this time, it can be said that the image processing is effective when the contrast increases before the image processing, the number of error corrections decreases, or the one that cannot be decoded before the image processing can be decoded. In the present embodiment, in consideration of such circumstances, the processing setting used for the image processing and the evaluation result after the image processing based on the processing setting are stored or notified in association with each other. The information can be used when the same reading is performed after the evaluation process.

なお、図2の評価処理において、S13の後に更にデコード処理を行うようにしてもよい。具体的には、S1〜S13の処理にて得られた複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのコントラストが最も大きくなる画像処理済データと、複数の位置検出パターンにおけるコントラストのばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行い、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしてもよい。   In the evaluation process of FIG. 2, a decoding process may be further performed after S13. Specifically, among the plurality of image processed data obtained in the processes of S1 to S13, the image processed data in which the position detection pattern is detected most frequently and the image processing in which the contrast between the position detection patterns is maximized. The number of error corrections among the plurality of image-processed data subjected to the decoding process, and the decoded data and the image-processed data with the smallest contrast variation in the plurality of position detection patterns. It is also possible to select image processed data with a small amount and notify or record processing settings for obtaining the image processed data.

また、S10又はS11において画像処理がなされた後の画像処理済データに対しその後のS3において位置検出パターンの検出が行われたときに、画像処理前よりも位置検出パターンの検出数が増加した場合には、その結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。また、S10又はS11において画像処理がなされた後の画像処理済データに対しその後のS5又はS8においてデコード処理が行われたときに「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。   In addition, when the position detection pattern is detected in the subsequent S3 with respect to the image processed data after the image processing is performed in S10 or S11, the number of position detection patterns detected is greater than that before the image processing. Alternatively, the user may be notified of the result using the liquid crystal display 46 or the like. Further, when the image-processed data after the image processing in S10 or S11 is decoded in the subsequent S5 or S8, “the number of error corrections is reduced compared to before the image processing”, “decoding processing is In the case of any of “success”, the result may be notified to the user using the liquid crystal display 46 or the like.

本実施形態では、QRコードQの一部を構成する位置検出パターンに着目し、当該位置検出パターンのコントラストを算出している。このようにすれば、QRコードQの全領域に基づいてコントラストを取得する構成と比較して処理の迅速化を実現できる。また、位置検出パターンのコントラストと、当該コントラストを評価する上での基準情報(閾値)を反映して印字品質情報(余裕度)を生成し、それをユーザに通知又は記録手段に記録している。このようにすれば、対象となるQRコードQがどのような印字品質であるかを迅速に把握でき、かつ迅速に有効利用できるようになる。   In the present embodiment, attention is paid to the position detection pattern constituting a part of the QR code Q, and the contrast of the position detection pattern is calculated. In this way, it is possible to speed up the processing as compared with the configuration in which the contrast is acquired based on the entire region of the QR code Q. Also, print quality information (margin) is generated reflecting the contrast of the position detection pattern and the reference information (threshold value) for evaluating the contrast, and this is notified to the user or recorded in the recording means. . In this way, it is possible to quickly grasp the print quality of the target QR code Q, and to make effective use quickly.

また、位置検出パターンのコントラストと閾値との差を表した余裕度を印字品質情報として通知している。このようにすれば、コントラストがどのような状態であるかをユーザにわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。   Further, the margin indicating the difference between the contrast of the position detection pattern and the threshold is notified as print quality information. In this way, it is possible to convey to the user in an easy-to-understand manner what the contrast is, and the user can grasp the print quality with high accuracy based on quantitative criteria.

また、位置検出パターンにおける明色セルの輝度をXとし、位置検出パターンにおける暗色セルの輝度をYとした場合に、以下の式、(X−Y)/Xにて得られる値を位置検出パターンのコントラストとして算出している。このようにすれば、位置検出パターンの暗色セル及び明色セルを良好に反映した数値が得られる。   Further, when the brightness of the bright cell in the position detection pattern is X and the brightness of the dark cell in the position detection pattern is Y, a value obtained by the following expression (XY) / X is used as the position detection pattern. It is calculated as the contrast. By doing this, it is possible to obtain numerical values that favorably reflect the dark cells and light cells of the position detection pattern.

また、位置検出パターンに配される明色セルの少なくとも一位置の輝度を抽出し、かつ位置検出パターンに配される暗色セルの少なくとも一位置の輝度を抽出することで、位置検出パターンの明色セル及び暗色セルの輝度をそれぞれ検出している。このように少なくとも一位置の輝度を代表値として抽出すればコントラスト算出処理の迅速化を図ることができる。   In addition, by extracting the luminance of at least one position of the light cell arranged in the position detection pattern and extracting the luminance of at least one position of the dark cell arranged in the position detection pattern, the light color of the position detection pattern The luminance of the cell and the dark cell is detected. In this way, if the luminance at least at one position is extracted as a representative value, the contrast calculation process can be speeded up.

また、位置検出パターンの明色セルの輝度を、単一明色セル内の中心位置及び両側位置での輝度抽出結果に基づいて検出し、位置検出パターンの暗色セルの輝度を、単一暗色セル内の中心位置及び両側位置での輝度抽出結果に基づいて検出している。このようにすれば、特定位置にノイズが集中するような場合にノイズの影響を効果的に抑えることができる。   In addition, the brightness of the light cell in the position detection pattern is detected based on the brightness extraction results at the center position and both side positions in the single light cell, and the brightness of the dark cell in the position detection pattern is determined as a single dark cell. Detection is based on the luminance extraction results at the center position and the both side positions. In this way, the influence of noise can be effectively suppressed when the noise is concentrated at a specific position.

また、QRコードQを読取対象とし、当該QRコードQの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンをコントラスト算出を行う対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定できコントラストを迅速かつ良好に算出できる。特に、QRコードQの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、コントラスト算出処理の一層の迅速化を図ることができる。   Further, the QR code Q is set as a reading target, and the position detection pattern of the QR code Q is detected as a “specific part”. If the position detection pattern having the prescribed shape is used as a target part for calculating the contrast, the bright cell and the dark cell can be identified with high accuracy without using a complicated detection method, and the contrast can be calculated quickly and satisfactorily. In particular, in the QR code Q reading process, the position detection pattern can be specified in the initial stage, so that the contrast calculation process can be further speeded up.

また、QRコードQにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎にコントラストを算出し、それら算出された位置検出パターン毎のコントラストに基づいて印字品質情報(余裕度)を生成している。このように、複数の位置検出パターンのコントラストを算出できる構成とし、それらコントラストに基づいて印字品質情報(余裕度)を生成する構成とすれば、印字品質の迅速な把握を実現しつつ、単一の位置検出パターンのコントラストのみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   Further, it tries to detect all the position detection patterns in the QR code Q, calculates the contrast for each detected position detection pattern, and print quality information (margin) based on the calculated contrast for each position detection pattern. Is generated. In this way, if the configuration is such that the contrast of a plurality of position detection patterns can be calculated and the print quality information (margin) is generated based on these contrasts, the print quality can be quickly grasped while the print quality information can be quickly grasped. Compared with a configuration that calculates only the contrast of the position detection pattern, print quality information that more appropriately reflects the print quality of the entire code can be obtained.

また、全ての位置検出パターンが検出されない場合に、QRコードQの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎にコントラストを算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及びコントラストの算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及びコントラストの算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   Further, when not all the position detection patterns are detected, one or a plurality of image processing is performed on the image data of the QR code Q based on one or a plurality of predetermined processing settings, and the image processing is performed according to each processing setting. In this case, the detection of the position detection pattern is tried again with respect to each image processed data after. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. In addition, the contrast is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and the detection result and contrast of the position detection pattern in each image processed data corresponding to each processing setting are calculated. The calculation result is notified or recorded in association with each other. By doing this, it is possible to grasp the detection result of the position detection pattern and the calculation result of the contrast for each processing setting, and it becomes easy to effectively use the appropriate processing setting.

また、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのコントラストが最も大きくなる画像処理済データと、複数の位置検出パターンにおけるコントラストのばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行い、最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このように、画像処理が効果的になされたと考えられる複数の画像処理済データについてそれぞれデコード処理を行い、さらにその中から最も誤り訂正数が少ない画像処理済データを選択するようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。   In addition, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the contrast of the position detection pattern is the largest, and the contrast variation in the plurality of position detection patterns Each of the image processed data having the smallest value is decoded, and the image processed data having the smallest number of error corrections is selected, and the processing setting for obtaining the image processed data is notified or recorded. Yes. As described above, if each of the plurality of image processed data that is considered to have been effectively processed is subjected to decoding processing, and the image processed data with the smallest number of error corrections is selected from among the decoded data, Highly reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively.

また、QRコードQの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う構成をなしており、各処理設定に従って画像処理がなされた後の画像処理済データに対して位置検出パターンの検出又はデコード処理が行われたときに、「画像処理前よりも位置検出パターンの検出数が増加」、「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果をユーザに通知する構成とされている。このようにすれば、画像処理が効果的になされたときにその旨をユーザに伝達でき、ユーザは当該結果を有効利用できるようになる。   Further, the image data of the QR code Q is configured to perform one or a plurality of image processing based on one or a plurality of predetermined processing settings, and the image after the image processing is performed according to each processing setting When position detection pattern detection or decoding processing is performed on the processed data, “the number of detected position detection patterns is increased before image processing”, “the number of error corrections is decreased before image processing”, When any of “decoding process is successful” is met, the result is notified to the user. In this way, when the image processing is effectively performed, the fact can be transmitted to the user, and the user can effectively use the result.

また、画像処理手段が、画像データのダイナミックレンジを変更する変更手段を有しているため、画像処理の自由度がより大きくなる。   Further, since the image processing means has a changing means for changing the dynamic range of the image data, the degree of freedom in image processing is further increased.

[第2実施形態]
次に、第2実施形態について説明する。第2実施形態は、評価処理の内容のみが第1実施形態と異なり、電気的構成については第1実施形態と同一である。よって、電気的構成については第1実施形態と同一であるとして詳細な説明は省略し、適宜図1を参照して説明することとする。
なお、本実施形態でも、図1の受光センサ23が、「受光手段」の一例に相当し、制御回路40が「デコード手段」の一例に相当する。
[Second Embodiment]
Next, a second embodiment will be described. The second embodiment is different from the first embodiment only in the contents of the evaluation process, and the electrical configuration is the same as that of the first embodiment. Accordingly, the electrical configuration is the same as that of the first embodiment, and a detailed description thereof will be omitted, and will be described with reference to FIG. 1 as appropriate.
In this embodiment, the light receiving sensor 23 in FIG. 1 corresponds to an example of “light receiving unit”, and the control circuit 40 corresponds to an example of “decoding unit”.

以下、図7等を参照し、第2実施形態で行われる評価処理について説明する。図7は、第2実施形態の評価処理の流れを例示するフローチャートである。また、図8は、位置検出パターンにおける太さ状態値の算出を説明する説明図である。また、図9(a)は、S206においてメモリに記憶されるデータ構成例を示す説明図であり、図9(b)は、S206及びS209においてメモリに記憶されるデータ構成例を示す説明図である。   Hereinafter, the evaluation processing performed in the second embodiment will be described with reference to FIG. FIG. 7 is a flowchart illustrating the flow of evaluation processing according to the second embodiment. FIG. 8 is an explanatory diagram for explaining the calculation of the thickness state value in the position detection pattern. 9A is an explanatory diagram illustrating an example of a data configuration stored in the memory in S206, and FIG. 9B is an explanatory diagram illustrating an example of a data configuration stored in the memory in S206 and S209. is there.

本実施形態で行われる評価処理もメモリ35に記憶されるプログラムに従って制御回路40によって実行されるものであり、所定の操作をトリガとして開始されたり、或いは読取処理のサブルーチンとして実施されたりするものである。当該評価処理が開始されると、まず、画像取得処理が行われ、(S201)、次いで、Nの値を初期状態に設定する処理が行われる(S202)。なお、S201の処理は、図2のS1と同一の処理であり、S202の処理は、図2のS2と同一の処理である。また、本実施形態でも、制御回路40(図1)が「生成手段」の一例に相当する。   The evaluation process performed in the present embodiment is also executed by the control circuit 40 in accordance with a program stored in the memory 35, and is started with a predetermined operation as a trigger or executed as a reading process subroutine. is there. When the evaluation process is started, first, an image acquisition process is performed (S201), and then a process of setting the value of N to an initial state is performed (S202). The process of S201 is the same process as S1 of FIG. 2, and the process of S202 is the same process as S2 of FIG. Also in the present embodiment, the control circuit 40 (FIG. 1) corresponds to an example of “generating means”.

次に、位置検出パターン(以下FPパターンとも称する)の検出処理が行われる(S203)。本実施形態でも情報コードの例としてQRコードを用いており、S203の処理は、図2のS3と同様に、QRコードにおける全ての位置検出パターンの検出を試みるように行われる。
なお、本実施形態でも、位置検出パターンが「特定部分」の一例に相当する。また、図1の制御回路40が、「特定部分検出手段」の一例に相当し、受光センサ23による受光結果に基づき(即ち、S201の画像取得処理により得られた画像データに基づき)QRコードの一部を構成する位置検出パターンを検出するように機能する。
Next, a position detection pattern (hereinafter also referred to as FP pattern) detection process is performed (S203). In the present embodiment, a QR code is used as an example of an information code, and the process of S203 is performed so as to try to detect all position detection patterns in the QR code, similarly to S3 of FIG.
In the present embodiment, the position detection pattern corresponds to an example of a “specific part”. Further, the control circuit 40 of FIG. 1 corresponds to an example of “specific part detecting means”, and is based on the result of light reception by the light reception sensor 23 (that is, based on the image data obtained by the image acquisition process of S201). It functions to detect a position detection pattern constituting a part.

次に、上記位置検出パターン検出処理によって検出された位置検出パターンの数が「3」であるか否かを判断する(S204)。位置検出パターンが3つ検出された場合(即ち、全ての位置検出パターンが検出された場合)、S204にてYesに進み、S205にて太さ状態値算出・デコード処理を実施する。   Next, it is determined whether or not the number of position detection patterns detected by the position detection pattern detection process is “3” (S204). When three position detection patterns are detected (that is, when all position detection patterns are detected), the process proceeds to Yes in S204, and the thickness state value calculation / decoding process is performed in S205.

S205の太さ状態値算出・デコード処理では、まず、位置検出パターン(特定部分)の画像状態を示す評価値を算出する。なお、本実施形態では、制御回路40が、「算出手段」「太さ状態値算出手段」の一例に相当し、S203で検出された位置検出パターンにおける明色セル及び暗色セルの少なくともいずれかに基づき、当該位置検出パターンの画像状態を示す評価値を、所定の評価方法に従って算出するように機能する。より具体的には、S205又はS208で算出される「太さ状態値」が、「特定部分の画像状態を示す評価値」の一例に相当し、後述する太さ状態値算出方法が「所定の評価方法」の一例に相当している。   In the thickness state value calculation / decoding process of S205, first, an evaluation value indicating the image state of the position detection pattern (specific portion) is calculated. In the present embodiment, the control circuit 40 corresponds to an example of “calculation unit” and “thickness state value calculation unit”, and at least one of the light color cell and the dark color cell in the position detection pattern detected in S203. Based on this, it functions to calculate an evaluation value indicating the image state of the position detection pattern according to a predetermined evaluation method. More specifically, the “thickness state value” calculated in S205 or S208 corresponds to an example of “an evaluation value indicating the image state of a specific portion”, and a thickness state value calculation method described later is “predetermined value”. This corresponds to an example of “evaluation method”.

S205の太さ状態値算出・デコード処理では、S203にて検出された位置検出パターンについて、各位置検出パターン毎に太さ状態値の算出が行われる。なお、「太さ状態値」は、特定部分(本実施形態では位置検出パターン)における明色セル及び暗色セルの少なくともいずれかの太さ状態を定量化した値であればよく、本実施形態の例では、後述する太さ状態値算出方法によって得られる値を太さ状態値としている。   In the thickness state value calculation / decoding process in S205, the thickness state value is calculated for each position detection pattern for the position detection pattern detected in S203. The “thickness state value” may be a value obtained by quantifying the thickness state of at least one of the light color cell and the dark color cell in the specific portion (position detection pattern in the present embodiment). In the example, a value obtained by a thickness state value calculation method described later is used as the thickness state value.

各位置検出パターン毎に太さ状態値を算出するに際しては、まず、S203にて検出されたいずれかの位置検出パターンにおいて、明色セル及び暗色セルの幅値を算出する。具体的には、図8(a)のように、S203で特定されたいずれかの位置検出パターンにおいて明色セル1セル分の幅値Wa1及び暗色セル1セル分の幅値Wb1をそれぞれ抽出する。そして、それら幅値Wa1とWb1との加算値(Wa1+Wb1)に対する暗色セルの幅値Wb1の割合を示す値であるWb1/(Wa1+Wb1)を算出し、この値Wb1/(Wa1+Wb1)を当該位置検出パターンの太さ状態値D1とする。そして、同様に残り2つの位置検出パターンについての太さ状態値D2、D3も算出し、更に、それら3つの位置検出パターンの太さ状態値D1、D2、D3の平均値Da(Da=(D1+D2+D3)/3)を算出する。本実施形態ではこのように得られた平均値DaをQRコードQの太さ状態値としている。   In calculating the thickness state value for each position detection pattern, first, the width value of the light color cell and the dark color cell is calculated in any of the position detection patterns detected in S203. Specifically, as shown in FIG. 8A, in one of the position detection patterns specified in S203, a width value Wa1 for one bright cell and a width value Wb1 for one dark cell are extracted. . Then, Wb1 / (Wa1 + Wb1) that is a value indicating the ratio of the dark cell width value Wb1 to the added value (Wa1 + Wb1) of the width values Wa1 and Wb1 is calculated, and this value Wb1 / (Wa1 + Wb1) is calculated as the position detection pattern. The thickness state value D1. Similarly, thickness state values D2 and D3 for the remaining two position detection patterns are also calculated, and an average value Da (Da = (D1 + D2 + D3) of the thickness state values D1, D2, and D3 of the three position detection patterns is calculated. ) / 3) is calculated. In the present embodiment, the average value Da thus obtained is used as the thickness state value of the QR code Q.

なお、上記の例では、各位置検出パターン(特定部分)の太さ状態値を算出するに際し、各位置検出パターンにおいて、明色セルの1セル分の幅値及び暗色セルの1セル分の幅値を抽出し、これら1セル分の幅値及びに基づいて当該位置検出パターンの太さ状態値を算出しているが、各位置検出パターンの太さ状態値を算出する際に用いられる「明色セルの幅値」を複数の明色セルに基づいて算出し、同様に「暗色セルの幅値」を複数の暗色セルに基づいて算出してもよい。例えば、図8(a)のように所定の2位置の明色セルの幅値Wa1、Wa2を抽出し、これらの平均値Wa(Wa=(Wa1+Wa2)/2)を明色セルの幅値としてもよい。同様に、所定の2位置の暗色セルの幅値Wb1、Wb2を抽出し、これらの平均値Wb(Wb=(Wb1+Wb2)/2)を暗色セルの幅値としてもよい。この場合、それら平均値Wa及びWbの加算値(Wa+Wb)に対する暗色セルの平均値Wbの割合を示す値であるWb/(Wa+Wb)を当該位置検出パターンの太さ状態値D1として扱うことができる。そして、同様の方法で残り2つの位置検出パターンの太さ状態値D2、D3を算出し、それらD1、D2、D3の平均値DaをQRコードQの太さ状態値として扱うことができる。   In the above example, when calculating the thickness state value of each position detection pattern (specific portion), the width value for one cell of the light cell and the width for one cell of the dark cell in each position detection pattern. The value is extracted, and the thickness state value of the position detection pattern is calculated based on the width value for one cell, and “bright” used when calculating the thickness state value of each position detection pattern. The “color cell width value” may be calculated based on a plurality of light color cells, and similarly, the “dark cell width value” may be calculated based on a plurality of dark color cells. For example, as shown in FIG. 8A, the light cell width values Wa1 and Wa2 at two predetermined positions are extracted, and the average value Wa (Wa = (Wa1 + Wa2) / 2) is used as the light cell width value. Also good. Similarly, the width values Wb1 and Wb2 of the dark cell at two predetermined positions may be extracted, and the average value Wb (Wb = (Wb1 + Wb2) / 2) may be used as the width value of the dark cell. In this case, Wb / (Wa + Wb), which is a value indicating the ratio of the average value Wb of the dark cell to the added value (Wa + Wb) of the average values Wa and Wb, can be handled as the thickness state value D1 of the position detection pattern. . Then, the thickness state values D2 and D3 of the remaining two position detection patterns can be calculated by the same method, and the average value Da of these D1, D2 and D3 can be handled as the thickness state value of the QR code Q.

また、上記幅値Wa1、Wb1の抽出は例えば画素数の検出によって行うことができる。例えば、図8(a)の例において幅値Wa1が10画素分の幅値に相当し、幅値Wb1が10画素分の幅値に相当する場合、太さ状態値D1を10/(10+10)(即ち0.5)と定量化できる。図8(b)のような場合も同様であり、幅値Wa1が5画素分の幅値に相当し、Wb2が15画素分の幅値に相当する場合、太さ状態値D1を15/(15+5)(即ち0.75)と定量化できる。   The width values Wa1 and Wb1 can be extracted by detecting the number of pixels, for example. For example, in the example of FIG. 8A, when the width value Wa1 corresponds to a width value for 10 pixels and the width value Wb1 corresponds to a width value for 10 pixels, the thickness state value D1 is set to 10 / (10 + 10). (Ie 0.5). The same applies to the case shown in FIG. 8B. When the width value Wa1 corresponds to a width value for 5 pixels and Wb2 corresponds to a width value for 15 pixels, the thickness state value D1 is set to 15 / ( 15 + 5) (ie 0.75).

本実施形態では、S205で算出された太さ状態値Daそのものを印字品質情報とすると共に、この太さ状態値Daと、当該太さ状態値Daを評価する上での基準となる太さ基準値と、に基づいて、これら太さ状態値Da及び太さ基準値を反映した印字品質情報を生成している。具体的には、「太さ基準値」として太さ状態値Daの度合を判断するための標準値Dbが定められており、太さ状態値Daと標準値Dbとをパラメータとする値(具体的には標準値Dbに対する太さ状態値Daの割合Da/Db)を判定値として算出し、この判定値も印字品質情報として扱っている。   In the present embodiment, the thickness state value Da itself calculated in S205 is used as print quality information, and the thickness state value Da and a thickness reference that serves as a reference for evaluating the thickness state value Da. The print quality information reflecting the thickness state value Da and the thickness reference value is generated based on the value. Specifically, a standard value Db for determining the degree of the thickness state value Da is defined as the “thickness reference value”, and a value (specifically, the thickness state value Da and the standard value Db are parameters). Specifically, a ratio Da / Db) of the thickness state value Da to the standard value Db is calculated as a determination value, and this determination value is also handled as print quality information.

また、S205では、併せてデコード処理が行われる。具体的には現在の画像データ(S201にて取得した画像データ、なおS210又はS211にて画像処理が行われた後の画像処理済データが存在する場合にはその画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   In S205, a decoding process is also performed. Specifically, based on the current image data (image data acquired in S201, or image processed data if image processed data after image processing is performed in S210 or S211 exists). A decoding process is performed, and the possibility of decoding and the number of error corrections are verified.

その後、太さ状態値Da、判定値Da/Db、誤り訂正数などをメモリ35に記憶する記憶処理が行われる(S206)。図9(a)は、このときにメモリ35に記憶される記憶内容を例示するものであり、本実施形態では、S205の処理対象のデータについての、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各太さ状態値D1、D2、D3、位置検出パターンの太さ状態値の平均値Da、判定値Dd(=Da/Db)、S205のデコード処理の可否、誤り訂正数などがそれぞれ記憶される。   Thereafter, a storage process of storing the thickness state value Da, the determination value Da / Db, the number of error corrections, and the like in the memory 35 is performed (S206). FIG. 9A illustrates the storage contents stored in the memory 35 at this time. In the present embodiment, the image processing setting, the number of detected position detection patterns for the data to be processed in S205, Position detection pattern coordinates, position detection pattern thickness state values D1, D2, and D3, position detection pattern thickness state value average value Da, determination value Dd (= Da / Db), and whether or not decoding processing of S205 is possible The number of error corrections is stored.

なお、本実施形態では、制御回路40及びメモリ35が「算出結果利用手段」の一例に相当し、位置検出パターンの太さ状態値を反映して得られる情報コードの印字品質情報を、ユーザに通知又は記録手段に記録するように機能する。
また、制御回路40及び液晶表示器46は「算出結果利用手段」として機能し、印字品質情報をユーザに通知するように機能する。
In the present embodiment, the control circuit 40 and the memory 35 correspond to an example of “calculation result utilization means”, and print quality information of an information code obtained by reflecting the thickness state value of the position detection pattern is given to the user. It functions to record in a notification or recording means.
The control circuit 40 and the liquid crystal display 46 function as “calculation result utilization means” and function to notify the user of print quality information.

ところで、S206の記憶処理は、後述する画像処理(S210又はS211)が行われていない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かは現在のNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」としてN−1番目の画像処理設定の情報を対応付けて記憶する。   By the way, the storage process of S206 may be performed in a state where image processing (S210 or S211) described later is not performed, or may be performed after image processing described later. Whether it is after image processing can be determined by the current value of N, and N = 1 means a state in which image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, information on the (N−1) -th image processing setting is stored in association with “image processing setting”.

なお、図7の例ではS205にて得られた太さ状態値等についてメモリ35に記憶し、その後に利用できるようにしているが、これらの情報(画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各太さ状態値D1、D2、D3、位置検出パターンの太さ状態値の平均値Da、判定値Dd(=Da/Db)、S205のデコード処理の可否、誤り訂正数、のいずれか1又は複数)を液晶表示器46に出力し、ユーザに通知するようにしてもよい。或いは、所定の条件が成立した場合に警告を行うようにしてもよい。例えば、得られた判定値Dd(=Da/Db)と適切値(例えば1)との差、、或いは適切値(例えば1)に対する判定値Ddの割合が所定閾値以上となったときに、液晶表示器46等によって警告を発するようにしてもよい。   In the example of FIG. 7, the thickness state value obtained in S205 is stored in the memory 35 so that it can be used thereafter. However, these pieces of information (image processing setting, number of detected position detection patterns, Position detection pattern coordinates, position detection pattern thickness state values D1, D2, and D3, position detection pattern thickness state value average value Da, determination value Dd (= Da / Db), and whether or not decoding processing of S205 is possible , Any one or a plurality of error correction numbers) may be output to the liquid crystal display 46 to notify the user. Alternatively, a warning may be issued when a predetermined condition is satisfied. For example, when the difference between the obtained determination value Dd (= Da / Db) and an appropriate value (for example, 1), or the ratio of the determination value Dd to the appropriate value (for example, 1) is equal to or greater than a predetermined threshold value, the liquid crystal A warning may be issued by the display 46 or the like.

一方、S204にて位置検出パターンの検出数が3でないと判断された場合にはS204にてNoに進み、S207において検出数が0であるか否かを判断する。0でない場合には、S207にてNoに進み、S208においてS205と同様の太さ状態値算出・デコード処理処理を行う。なお、S205では3つの位置検出パターンのそれぞれの太さ状態値D1〜D3を算出し平均値Daを求めていたが、S208では、S202にて検出された位置検出パターンの分だけ太さ状態値を算出する。各位置検出パターンの太さ状態値を算出する方法はS205と同様であり、また、S205と同様に、検出された位置検出パターンの太さ状態値の平均値Daを算出する。   On the other hand, if it is determined in S204 that the number of detected position detection patterns is not 3, the process proceeds to No in S204, and it is determined whether or not the number of detection is 0 in S207. If it is not 0, the process proceeds to No in S207, and the thickness state value calculation / decode processing similar to S205 is performed in S208. In S205, the respective thickness state values D1 to D3 of the three position detection patterns are calculated and the average value Da is obtained. However, in S208, the thickness state values corresponding to the position detection pattern detected in S202 are obtained. Is calculated. The method for calculating the thickness state value of each position detection pattern is the same as that in S205, and the average value Da of the thickness state values of the detected position detection patterns is calculated as in S205.

S208の太さ状態値算出、デコード処理でも、QRコードQの太さ状態値(即ち、各位置検出パターンの太さ状態値の平均値Da)のみならず、判定値の算出をも行っている。具体的にはS205と同様に、標準値Dbに対する太さ状態値Daの割合Da/Dbを判定値として算出する。また、S208でも、デコード処理が行われる。具体的には現在の画像データ(S201にて取得した画像データ、既にS210又はS211にて画像処理が行われている場合には直前の画像処理後の画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   Also in the thickness state value calculation and decoding processing of S208, not only the thickness state value of the QR code Q (that is, the average value Da of the thickness state values of each position detection pattern) but also the determination value is calculated. . Specifically, as in S205, the ratio Da / Db of the thickness state value Da to the standard value Db is calculated as a determination value. In S208, the decoding process is also performed. Specifically, the decoding process is performed based on the current image data (the image data acquired in S201, or the image processed data immediately after the previous image processing if image processing has already been performed in S210 or S211). This is done to verify whether decoding is possible and the number of error corrections.

その後、S206と同様に、得られた太さ状態値、判定値、誤り訂正数などをメモリ35に記憶する記憶処理が行われる(S209)。図9(b)はこのときの記憶例を示すものであり、S208の処理対象のデータについて、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各太さ状態値、位置検出パターンの太さ状態値の平均値Da、判定値Da/Db、S208のデコード処理の可否、誤り訂正数がそれぞれ記憶される。   Thereafter, similarly to S206, a storage process is performed to store the obtained thickness state value, determination value, number of error corrections, and the like in the memory 35 (S209). FIG. 9B shows an example of storage at this time. For the data to be processed in S208, the image processing setting, the number of detected position detection patterns, the coordinates of the position detection pattern, and each thickness state of the position detection pattern. Value, average value Da of the thickness state value of the position detection pattern, determination value Da / Db, availability of decoding processing in S208, and the number of error corrections are stored.

このS209の記憶処理は、後述する画像処理(S210又はS211)が行われない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かはNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として、「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」として、N−1番目の画像処理設定の情報を対応付けて記憶する。   The storage processing in S209 may be performed in a state where image processing (S210 or S211) described later is not performed, or may be performed after image processing described later. Whether or not it is after image processing can be determined by the value of N, and N = 1 means that image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, as the “image processing setting”, information on the (N−1) th image processing setting is stored in association with each other.

その後、画像処理が行われる(S210)。S210では、予め登録されている複数の処理設定の中からいずれかの処理設定が用いられ、S201にて取得された画像データに対して画像処理が行われる。S210で用いられる処理設定は、N番目の処理設定であり、現在のNの値が1であれば1番目の処理設定が用いられ、現在のNの値が2であれば2番目の処理設定が用いられることとなる。処理設定としては画像処理に用いる様々な設定を採用でき、本実施形態では、例えば3×3平滑処理、5×5平滑処理、5×5膨張処理などを例示している。また、「画像データのダイナミックレンジを変更する処理」も処理設定として採用されている。例えば現在のNの値が1であり、1番目の処理設定が3×3平滑処理であれば、S210においては、S201にて得られた画像データに対して3×3平滑処理による画像処理が行われる。また、現在のNの値が3であり、3番目の処理設定が5×5膨張処理であればS210では、S201にて得られた画像データに対して5×5膨張処理による画像処理が行われることとなる。   Thereafter, image processing is performed (S210). In S210, one of a plurality of processing settings registered in advance is used, and image processing is performed on the image data acquired in S201. The process setting used in S210 is the Nth process setting. If the current N value is 1, the first process setting is used. If the current N value is 2, the second process setting is used. Will be used. Various settings used for image processing can be adopted as the processing settings. In the present embodiment, for example, 3 × 3 smoothing processing, 5 × 5 smoothing processing, 5 × 5 expansion processing, and the like are illustrated. Further, “processing for changing the dynamic range of image data” is also adopted as a processing setting. For example, if the current value of N is 1 and the first processing setting is 3 × 3 smoothing processing, in S210, image processing by 3 × 3 smoothing processing is performed on the image data obtained in S201. Done. If the current value of N is 3 and the third processing setting is 5 × 5 expansion processing, in S210, image processing by 5 × 5 expansion processing is performed on the image data obtained in S201. Will be.

一方、S207にて位置検出パターンの検出数が0と判断された場合には、S207にてYesに進み、S210と同様の画像処理を行う(S211)。この画像処理もS210と同様であり、S201にて取得した画像データに対してN番目の処理設定を用いて画像処理を行うこととなる。   On the other hand, if it is determined in S207 that the number of detected position detection patterns is 0, the process proceeds to Yes in S207 and image processing similar to S210 is performed (S211). This image processing is also the same as S210, and the image processing is performed on the image data acquired in S201 using the Nth processing setting.

S210又はS211の画像処理が終了すると、S212にてNの値がインクリメントされ、S213にて全ての処理設定について画像処理が終了したか判断される。予め登録されている処理設定全てについて画像処理が完了した場合にはS213にてYesに進み、当該評価処理を終了する。一方、登録された処理設定の全てについて画像処理が完了していない場合にはS213にてNoに進み、S203以降の処理を繰り返すこととなる。   When the image processing in S210 or S211 is completed, the value of N is incremented in S212, and it is determined in S213 whether the image processing has been completed for all processing settings. If the image processing has been completed for all processing settings registered in advance, the process proceeds to Yes in S213, and the evaluation processing is terminated. On the other hand, if the image processing has not been completed for all the registered processing settings, the process proceeds to No in S213, and the processing from S203 onward is repeated.

本実施形態では、S203において全ての位置検出パターンが検出されない場合(即ち、S204にてNoとなる場合)に、S210又はS211においてQRコードQの画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行うことができるようになっており、S203において、画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるようになっている。そして、S205又はS208において、各処理設定に対応した各画像処理済データに対し位置検出パターン毎に太さ状態値を算出し、その後のS206又はS209において、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果と、太さ状態値の算出結果と、を対応付けて通知又は記録するようになっている。例えば、初回のS203の処理では1つの位置検出パターンのみしか検出できなかった場合、S210においてNの値に基づく画像処理が行われ、このような画像処理後のデータに対してS203において位置検出パターンの検出が再度なされ、かつS205又はS208において太さ状態値算出・デコード処理が行われる。このとき、画像処理前よりも太さ状態値が適切値に近づいたり、誤り訂正数が減少したり、或いは画像処理前にデコードできなかったものがデコードできるようになった場合、画像処理が有効であったといえる。本実施形態では、このような事情を考慮し、画像処理に用いる処理設定と、その処理設定に基づいて画像処理がなされた後の評価結果と、を対応付けて記憶或いは通知しているため、当該評価処理以降において同様の読み取りを行う際に当該情報を役立てることができる。   In the present embodiment, when all the position detection patterns are not detected in S203 (that is, when No in S204), a plurality of predetermined process settings are performed on the image data of QR code Q in S210 or S211. A plurality of image processing can be performed according to the above, and in S203, detection of a position detection pattern is tried again for each image processed data after the image processing is performed. In S205 or S208, a thickness state value is calculated for each position detection pattern for each image processed data corresponding to each processing setting, and in each subsequent S206 or S209, each processing setting and each processing setting are handled. The position detection pattern detection result and the thickness state value calculation result in each processed image data are notified or recorded in association with each other. For example, if only one position detection pattern can be detected in the first processing of S203, image processing based on the value of N is performed in S210, and the position detection pattern in S203 is applied to the data after such image processing. Is detected again, and the thickness state value calculation / decoding process is performed in S205 or S208. At this time, if the thickness state value is closer to the appropriate value than before image processing, the number of error corrections is reduced, or the one that could not be decoded before image processing can be decoded, image processing is effective It can be said that it was. In the present embodiment, in consideration of such circumstances, the processing setting used for the image processing and the evaluation result after the image processing based on the processing setting are stored or notified in association with each other. The information can be used when the same reading is performed after the evaluation process.

なお、図7の評価処理において、S213の後に更にデコード処理を行うようにしてもよい。具体的には、S201〜S213の処理にて得られた複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンの太さ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおける太さ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行い、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしてもよい。なお、本実施形態では、上述の標準値Dbが太さ状態値の「適切値」に相当しているため、判定値Da/Dbが最も1に近くなる画像処理済データが「位置検出パターンの太さ状態値が最も適切値に近づく画像処理済データ」に相当する。   In the evaluation process of FIG. 7, a decoding process may be further performed after S213. Specifically, among the plurality of image processed data obtained in the processing of S201 to S213, the image processed data in which the position detection pattern is detected most frequently and the thickness state value of the position detection pattern are most appropriate. The image processed data that approaches the value and the image processed data that has the smallest variation in the thickness state value in the plurality of position detection patterns are each decoded, and the plurality of image processed data that have undergone the decoding processing Image processed data with the smallest number of error corrections may be selected from the data, and processing settings for obtaining the image processed data may be notified or recorded. In the present embodiment, since the standard value Db described above corresponds to the “appropriate value” of the thickness state value, the image processed data with the determination value Da / Db closest to 1 is “position detection pattern of This corresponds to “image processed data whose thickness state value approaches the most appropriate value”.

また、S210又はS211において画像処理がなされた後の画像処理済データに対しその後のS203において位置検出パターンの検出が行われたときに、画像処理前よりも位置検出パターンの検出数が増加した場合には、その結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。また、S210又はS211において画像処理がなされた後の画像処理済データに対しその後のS205又はS208においてデコード処理が行われたときに「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。   In addition, when the position detection pattern is detected in the subsequent S203 for the image processed data after the image processing is performed in S210 or S211, the number of position detection patterns detected is greater than that before the image processing. Alternatively, the user may be notified of the result using the liquid crystal display 46 or the like. Further, when the image processed data after the image processing in S210 or S211 is decoded in the subsequent S205 or S208, “the number of error corrections is reduced than before the image processing”, “decoding processing is In the case of any of “success”, the result may be notified to the user using the liquid crystal display 46 or the like.

本実施形態では、情報コード(QRコードQ)の一部を構成する特定部分(位置検出パターン)に着目し、この特定部分の画像状態を示す評価値として、当該特定部分における明色セル及び暗色セルの少なくともいずれかの太さ状態を定量化した値である太さ状態値Daを、所定の太さ状態値算出方法に従って算出している。このようにすれば、情報コードの全領域について太さ状態を算出する構成と比較して処理の迅速化を実現でき、またどのような太さ状態であるかを定量的に把握できる。さらに、特定部分の太さ状態値Daを反映して印字品質情報を生成し、それをユーザに通知又はメモリ35に記録している。このようにすれば、対象となる情報コードがどのような印字品質であるか(具体的には、セルがどのような太さ状態であるか)を迅速に把握でき、かつ迅速に有効利用できるようになる。   In the present embodiment, attention is paid to a specific part (position detection pattern) that constitutes a part of the information code (QR code Q), and as an evaluation value indicating the image state of the specific part, a light cell and a dark color in the specific part A thickness state value Da, which is a value obtained by quantifying the thickness state of at least one of the cells, is calculated according to a predetermined thickness state value calculation method. In this way, it is possible to speed up the processing as compared with the configuration in which the thickness state is calculated for the entire area of the information code, and it is possible to quantitatively grasp the thickness state. Further, the print quality information is generated by reflecting the thickness state value Da of the specific portion, and is notified to the user or recorded in the memory 35. In this way, it is possible to quickly grasp the print quality of the target information code (specifically, the thickness state of the cell), and to quickly and effectively use it. It becomes like this.

また、算出された特定部分の太さ状態値Daを予め定められた太さ基準値(標準値Db)と比較し、太さ基準値(標準値Db)に対する太さ状態値Daの割合を示す値Da/Dbを印字品質情報として通知している。このようにすれば、セルがどのような太さ状態であるか(換言すれば、セルの太り細りがどのような程度であるか)をユーザによりわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。なお、上記例では、太さ基準値(標準値Db)に対する太さ状態値Daの割合を示す値Da/Dbを印字品質情報として通知しているが、太さ状態値Daと太さ基準値(標準値Db)との差を示す値(例えばDb−Da)を印字品質情報として通知するようにしても、同様の効果が得られる。   Further, the calculated thickness state value Da of the specific portion is compared with a predetermined thickness reference value (standard value Db), and the ratio of the thickness state value Da to the thickness reference value (standard value Db) is shown. The value Da / Db is notified as print quality information. In this way, the thickness of the cell (in other words, how thick the cell is) can be communicated to the user in an easy-to-understand manner. Based on this, the print quality can be grasped with high accuracy. In the above example, the value Da / Db indicating the ratio of the thickness state value Da to the thickness reference value (standard value Db) is notified as the print quality information. However, the thickness state value Da and the thickness reference value are reported. The same effect can be obtained even if a value (for example, Db−Da) indicating a difference from (standard value Db) is notified as print quality information.

また、特定部分(位置検出パターン)における明色セル及び暗色セルのいずれか一方の幅値をW1とし、他方の幅値をW2としたときの、W1とW2との加算値に対する一方の幅値W1の割合を示す値を、特定部分の太さ状態値として算出している。このようにすれば、明色セルと暗色セルのそれぞれの幅がどのような比率であるかを適切に定量化でき、暗色セル或いは明色セルの太さ状態を良好に反映した数値が得られる。   One width value with respect to the added value of W1 and W2 when the width value of one of the light cell and the dark cell in the specific portion (position detection pattern) is W1 and the other width value is W2. A value indicating the ratio of W1 is calculated as the thickness state value of the specific portion. In this way, it is possible to appropriately quantify the ratio between the widths of the light cell and the dark cell, and to obtain a numerical value that favorably reflects the thickness state of the dark cell or the light cell. .

また、本実施形態では、特定部分に配される明色セルの1セル分の幅値と、特定部分に配される暗色セルの1セル分の幅値とを抽出し、明色セルの1セル分の幅値及び暗色セルの1セル分の幅値に基づいて太さ状態値を算出している。このようにすると、より迅速かつ効果的に太さ状態値を算出できる。   In this embodiment, the width value for one cell of the light cell arranged in the specific part and the width value of one cell of the dark cell arranged in the specific part are extracted, and 1 of the light cell is extracted. The thickness state value is calculated based on the width value of the cell and the width value of one dark cell. In this way, the thickness state value can be calculated more quickly and effectively.

また、本実施形態では、QRコードを読取対象とし、当該QRコードの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンを、太さ状態値を算出する対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定でき、太さ状態値を迅速かつ良好に算出できる。特に、QRコードの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、太さ状態値算出処理の一層の迅速化を図ることができる。   In the present embodiment, the QR code is to be read, and the position detection pattern of the QR code is detected as a “specific portion”. If the position detection pattern having a prescribed shape as described above is a target part for calculating the thickness state value, it is possible to specify the light cell and the dark cell with high accuracy without using a complicated detection method. Can be calculated quickly and satisfactorily. In particular, in the QR code reading process, the position detection pattern can be specified in the initial stage, so that the thickness state value calculation process can be further speeded up.

また、QRコードにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎に太さ状態値を算出し、それら算出された位置検出パターン毎の太さ状態値に基づいて印字品質情報を生成している。このように、複数の位置検出パターンの太さ状態値を算出する構成とすれば、QRコードにおける互いに距離を隔てた複数位置において複雑な処理を用いることなく太さ状態値を迅速に算出でき、更に、それら太さ状態値に基づいて印字品質情報を生成する構成とすれば、単一の位置検出パターンの太さ状態値のみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   In addition, it tries to detect all position detection patterns in the QR code, calculates a thickness state value for each detected position detection pattern, and print quality based on the calculated thickness state value for each position detection pattern. Information is generated. In this way, if the thickness state value of the plurality of position detection patterns is calculated, the thickness state value can be quickly calculated without using complicated processing at a plurality of positions separated from each other in the QR code, Further, if the print quality information is generated based on the thickness status values, the print quality of the entire code is more appropriately compared with the configuration in which only the thickness status value of a single position detection pattern is calculated. Reflected print quality information can be obtained.

また、全ての位置検出パターンが検出されない場合に、QRコードの画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎に太さ状態値を算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及び太さ状態値の算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及び太さ状態値の算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   When all the position detection patterns are not detected, one or a plurality of image processes are performed on the QR code image data based on one or a plurality of predetermined process settings, and the image process is performed according to each process setting. It is configured to try again the detection of the position detection pattern for each image-processed data that has been made. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. In addition, a thickness state value is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and detection of a position detection pattern in each image processed data corresponding to each processing setting are detected. The result and the calculation result of the thickness state value are associated with each other and notified or recorded. In this way, the detection result of the position detection pattern and the calculation result of the thickness state value for each processing setting can be grasped, and it becomes easy to effectively use the appropriate processing setting.

また、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンの太さ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおける太さ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行っている。このようにすれば、画像処理が効果的になされたと考えられる複数の画像処理済データに対し選択的にデコード処理を行うことができる。更に、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。 [第3実施形態]
次に、第3実施形態について説明する。第3実施形態は、評価処理の内容のみが第1実施形態と異なり、電気的構成については第1実施形態と同一である。よって、電気的構成については第1実施形態と同一であるとして詳細な説明は省略し、適宜図1を参照して説明することとする。
なお、本実施形態でも、図1の受光センサ23が、「受光手段」の一例に相当し、制御回路40が「デコード手段」の一例に相当する。
In addition, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the thickness state value of the position detection pattern approaches the most appropriate value, and the plurality of position detection Decoding processing is performed for each of the image processed data with the smallest variation in thickness state value in the pattern. In this way, it is possible to selectively perform decoding processing on a plurality of pieces of image processed data that are considered to have been effectively processed. Further, the image processed data with the smallest number of error corrections is selected from the plurality of image processed data subjected to the decoding process, and the processing setting for obtaining the image processed data is notified or recorded. ing. In this way, more reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively. [Third embodiment]
Next, a third embodiment will be described. The third embodiment is different from the first embodiment only in the contents of the evaluation process, and the electrical configuration is the same as that of the first embodiment. Accordingly, the electrical configuration is the same as that of the first embodiment, and a detailed description thereof will be omitted, and will be described with reference to FIG. 1 as appropriate.
In this embodiment, the light receiving sensor 23 in FIG. 1 corresponds to an example of “light receiving unit”, and the control circuit 40 corresponds to an example of “decoding unit”.

以下、図10等を参照し、第3実施形態で行われる評価処理について説明する。図10は、第3実施形態の評価処理の流れを例示するフローチャートである。また、図11は、位置検出パターンにおけるかすれ状態値の算出を説明する説明図である。また、図12(a)は、S306においてメモリに記憶されるデータ構成例を示す説明図であり、図12(b)は、S306及びS309においてメモリに記憶されるデータ構成例を示す説明図である。   Hereinafter, the evaluation process performed in the third embodiment will be described with reference to FIG. 10 and the like. FIG. 10 is a flowchart illustrating the flow of evaluation processing according to the third embodiment. FIG. 11 is an explanatory diagram for explaining the calculation of the blurred state value in the position detection pattern. 12A is an explanatory diagram showing an example of the data configuration stored in the memory in S306, and FIG. 12B is an explanatory diagram showing an example of the data configuration stored in the memory in S306 and S309. is there.

本実施形態で行われる評価処理もメモリ35に記憶されるプログラムに従って制御回路40によって実行されるものであり、所定の操作をトリガとして開始されたり、或いは読取処理のサブルーチンとして実施されたりするものである。当該評価処理が開始されると、まず、画像取得処理が行われ、(S301)、次いで、Nの値を初期状態に設定する処理が行われる(S302)。なお、S301の処理は、図2のS1と同一の処理であり、S302の処理は、図2のS2と同一の処理である。また、本実施形態でも、制御回路40(図1)が「生成手段」の一例に相当する。   The evaluation process performed in the present embodiment is also executed by the control circuit 40 in accordance with a program stored in the memory 35, and is started with a predetermined operation as a trigger or executed as a reading process subroutine. is there. When the evaluation process is started, first, an image acquisition process is performed (S301), and then a process of setting the value of N to an initial state is performed (S302). The process of S301 is the same process as S1 in FIG. 2, and the process of S302 is the same process as S2 in FIG. Also in the present embodiment, the control circuit 40 (FIG. 1) corresponds to an example of “generating means”.

次に、位置検出パターン(以下FPパターンとも称する)の検出処理が行われる(S303)。本実施形態でも情報コードの例としてQRコードを用いており、S303の処理は、図2のS3と同様に、QRコードにおける全ての位置検出パターンの検出を試みるように行われる。
なお、本実施形態でも、位置検出パターンが「特定部分」の一例に相当する。また、図1の制御回路40が、「特定部分検出手段」の一例に相当し、受光センサ23による受光結果に基づき(即ち、S301の画像取得処理により得られた画像データに基づき)QRコードの一部を構成する位置検出パターンを検出するように機能する。
Next, a position detection pattern (hereinafter also referred to as FP pattern) detection process is performed (S303). In the present embodiment, a QR code is used as an example of the information code, and the process of S303 is performed so as to try to detect all position detection patterns in the QR code, similarly to S3 of FIG.
In the present embodiment, the position detection pattern corresponds to an example of a “specific part”. Further, the control circuit 40 of FIG. 1 corresponds to an example of “specific part detecting means”, and is based on the light reception result by the light receiving sensor 23 (that is, based on the image data obtained by the image acquisition process of S301) It functions to detect a position detection pattern constituting a part.

次に、上記位置検出パターン検出処理によって検出された位置検出パターンの数が「3」であるか否かを判断する(S304)。位置検出パターンが3つ検出された場合(即ち、全ての位置検出パターンが検出された場合)、S304にてYesに進み、S305にてかすれ状態値算出・デコード処理を実施する。   Next, it is determined whether or not the number of position detection patterns detected by the position detection pattern detection process is “3” (S304). When three position detection patterns are detected (that is, when all the position detection patterns are detected), the process proceeds to Yes in S304, and the blur state value calculation / decoding process is performed in S305.

S305のかすれ状態値算出・デコード処理では、まず、位置検出パターン(特定部分)の画像状態を示す評価値を算出する。なお、本実施形態では、制御回路40が、「算出手段」「かすれ状態値算出手段」の一例に相当し、S303で検出された位置検出パターンにおける明色セル及び暗色セルの少なくともいずれかに基づき、当該位置検出パターンの画像状態を示す評価値を、所定の評価方法に従って算出するように機能する。具体的には、S305又はS308の処理により、位置検出パターンのかすれ状態を示す「かすれ状態値」を算出しており、この「かすれ状態値」が、「特定部分の画像状態を示す評価値」の一例に相当し、後述するかすれ状態値算出方法が「所定の評価方法」の一例に相当している。   In the blur state value calculation / decoding process of S305, first, an evaluation value indicating the image state of the position detection pattern (specific portion) is calculated. In the present embodiment, the control circuit 40 corresponds to an example of “calculation means” and “blurred state value calculation means”, and is based on at least one of light cells and dark cells in the position detection pattern detected in S303. The evaluation value indicating the image state of the position detection pattern functions to calculate according to a predetermined evaluation method. Specifically, a “blurred state value” indicating a blurred state of the position detection pattern is calculated by the processing of S305 or S308, and this “blured state value” is “an evaluation value indicating the image state of a specific portion”. The blur state value calculation method described later corresponds to an example of “predetermined evaluation method”.

S305のかすれ状態値算出・デコード処理では、S303にて検出された位置検出パターンについて、各位置検出パターン毎にかすれ状態値の算出が行われる。なお、「かすれ状態値」は、特定部分(本実施形態では位置検出パターン)における明色セル及び暗色セルの少なくともいずれかのかすれ状態を定量化した値であればよく、本実施形態では、後述するかすれ状態値算出方法によって得られる値をかすれ状態値としている。   In the fading state value calculation / decoding process of S305, the fading state value is calculated for each position detection pattern for the position detection pattern detected in S303. Note that the “blurred state value” may be a value obtained by quantifying the blurred state of at least one of light cells and dark cells in a specific portion (position detection pattern in the present embodiment). The value obtained by the fading state value calculation method is used as the fading state value.

各位置検出パターン毎にかすれ状態値を算出するに際しては、まず、S303で検出されたいずれかの位置検出パターンにおいて、暗色セル又は明色セルが連続して並ぶべき領域を特定し、この領域の暗色部と明色部とを抽出する。図11の例では、S303で検出されたいずれかの位置検出パターンにおいて、暗色セルが連続して並ぶべき中央領域AR1を特定し、その中央領域AR1における暗色部と明色部の幅を抽出している。より具体的には、例えば中央領域AR1(暗色部が連続して並ぶべき領域)を貫通する画素のラインL1を設定し、その画素ラインL1において一の暗色部領域B2と、その隣の暗色部領域B2とを抽出する。さらに、その一の暗色部領域B1の幅値Z1を検出すると共に、当該一の暗色部領域B1と、その隣の暗色部領域B2との配置間隔Z2を検出する。ここでは、一の暗色部領域B1の先端部P1から次の暗色部領域B2の先端部P2までの距離を配置間隔Z2としている。そして、この距離Z2に対する幅値Z1の割合Z1/Z2を、当該位置検出パターンのかすれ状態値E1として取得する。そして、同様の方法で残り2つの位置検出パターンのかすれ状態値E2、E3を算出し、それらE1、E2、E3の平均値EaをQRコードQのかすれ状態値として扱う。   In calculating the blurred state value for each position detection pattern, first, in any of the position detection patterns detected in S303, an area where dark cells or light cells should be continuously arranged is specified, and A dark color part and a light color part are extracted. In the example of FIG. 11, in any position detection pattern detected in S303, the central area AR1 where dark cells should be continuously arranged is specified, and the widths of the dark color part and the light color part in the central area AR1 are extracted. ing. More specifically, for example, a line L1 of pixels penetrating through the central area AR1 (area where dark color parts should be continuously arranged) is set, and one dark color part area B2 in the pixel line L1 and a dark color part adjacent thereto are set. Region B2 is extracted. Further, the width value Z1 of the one dark color part region B1 is detected, and the arrangement interval Z2 between the one dark color part region B1 and the adjacent dark color part region B2 is detected. Here, the distance from the leading end portion P1 of one dark color portion region B1 to the leading end portion P2 of the next dark color portion region B2 is defined as an arrangement interval Z2. Then, the ratio Z1 / Z2 of the width value Z1 with respect to the distance Z2 is acquired as the blurred state value E1 of the position detection pattern. Then, the blurred state values E2 and E3 of the remaining two position detection patterns are calculated by the same method, and the average value Ea of these E1, E2, and E3 is handled as the blurred state value of the QR code Q.

なお、上記の例では、位置検出パターン内の暗色セル又は明色セルが連続して並ぶべき領域における暗色部と明色部との配置割合を示す値としてZ1/Z2を取得しているが、かすれ状態値算出方法はこれに限られない。例えば、図11(a)のように、位置検出パターンの一辺の幅Z4に対する当該一辺側に配される暗色領域の幅値Z31〜Z37の総計Z3の割合(即ちZ3/Z4)をかすれ状態値とするような算出方法であってもよく、かすれ状態値を定量的に特定し得る算出方法であれば他の例でもよい。   In the above example, Z1 / Z2 is acquired as a value indicating the arrangement ratio of the dark color portion and the light color portion in the region where the dark color cell or the light color cell in the position detection pattern should be continuously arranged. The blur state value calculation method is not limited to this. For example, as shown in FIG. 11A, the ratio of the total value Z3 of the width values Z31 to Z37 of the dark color region arranged on the one side with respect to the width Z4 of one side of the position detection pattern (that is, Z3 / Z4) is blurred. As long as the calculation method can quantitatively specify the blurred state value, another example may be used.

本実施形態では、S305で算出されたかすれ状態値Eaそのものを印字品質情報とすると共に、このかすれ状態値Eaと、当該かすれ状態値Eaを評価する上での基準となるかすれ基準値と、に基づいて、これらかすれ状態値Ea及びかすれ基準値を反映した印字品質情報を生成している。具体的には、「かすれ基準値」としてかすれ状態値Eaの度合を判断するための標準値Ebが定められており、かすれ状態値Eaと標準値Ebとをパラメータとする値(具体的には標準値Ebに対するかすれ状態値Eaの割合Ea/Eb)を判定値として算出し、この判定値も印字品質情報として扱っている。なお、標準値Ebとしては、例えば、かすれが生じていないときに得られるべき値(本実施形態では「1」)を用いることができる。   In the present embodiment, the faint state value Ea itself calculated in S305 is used as the print quality information, and the faint state value Ea and the faint reference value that serves as a reference in evaluating the faint state value Ea. Based on this, print quality information reflecting the blurred state value Ea and the blurred reference value is generated. Specifically, a standard value Eb for determining the degree of the blurred state value Ea is determined as the “blur reference value”, and a value (specifically, a value using the blurred state value Ea and the standard value Eb as parameters) The ratio Ea / Eb) of the blurred state value Ea with respect to the standard value Eb is calculated as a determination value, and this determination value is also handled as print quality information. As the standard value Eb, for example, a value (“1” in the present embodiment) that should be obtained when no blur has occurred can be used.

また、S305では、併せてデコード処理が行われる。具体的には現在の画像データ(S301にて取得した画像データ、なおS310又はS311にて画像処理が行われた後の画像処理済データが存在する場合にはその画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   In S305, a decoding process is also performed. Specifically, based on current image data (image data acquired in S301, or image processed data if image processed data after image processing is performed in S310 or S311). A decoding process is performed, and the possibility of decoding and the number of error corrections are verified.

その後、かすれ状態値Ea、判定値Ea/Eb、誤り訂正数などをメモリ35に記憶する記憶処理が行われる(S306)。図12(a)は、このときにメモリ35に記憶される記憶内容を例示するものであり、本実施形態では、S305の処理対象のデータについての、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、各位置検出パターンの各かすれ状態値E1、E2、E3、各位置検出パターンのかすれ状態値の平均値Ea、判定値Ed(=Ea/Eb)、S305のデコード処理の可否、誤り訂正数などがそれぞれ記憶される。   Thereafter, a storage process for storing the blurred state value Ea, the determination value Ea / Eb, the number of error corrections, and the like in the memory 35 is performed (S306). FIG. 12A illustrates the storage contents stored in the memory 35 at this time. In the present embodiment, the image processing setting, the number of detected position detection patterns for the data to be processed in S305, The coordinates of the position detection pattern, the blur state values E1, E2, and E3 of each position detection pattern, the average value Ea of the blur state values of each position detection pattern, the determination value Ed (= Ea / Eb), and whether or not the decoding process of S305 is possible The number of error corrections is stored.

なお、本実施形態では、制御回路40及びメモリ35が「算出結果利用手段」の一例に相当し、位置検出パターンのかすれ状態値を反映して得られる情報コードの印字品質情報を、ユーザに通知又は記録手段に記録するように機能する。
また、制御回路40及び液晶表示器46も「算出結果利用手段」として機能し、印字品質情報をユーザに通知するように機能する。
In the present embodiment, the control circuit 40 and the memory 35 correspond to an example of “calculation result utilization means”, and notify the user of the print quality information of the information code obtained by reflecting the blurred state value of the position detection pattern. Or it functions to record in the recording means.
The control circuit 40 and the liquid crystal display 46 also function as “calculation result utilization means” and function to notify the user of print quality information.

ところで、S306の記憶処理は、後述する画像処理(S310又はS311)が行われていない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かは現在のNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」としてN−1番目の画像処理設定の情報を対応付けて記憶する。   By the way, the storage process of S306 may be performed in a state where image processing (S310 or S311) described later is not performed, or may be performed after image processing described later. Whether it is after image processing can be determined by the current value of N, and N = 1 means a state in which image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, information on the (N−1) -th image processing setting is stored in association with “image processing setting”.

なお、図10の例ではS305にて得られたかすれ状態値等についてメモリ35に記憶し、その後に利用できるようにしているが、これらの情報(画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各かすれ状態値E1、E2、E3、位置検出パターンのかすれ状態値の平均値Ea、判定値Ed(=Ea/Eb)、S305のデコード処理の可否、誤り訂正数、のいずれか1又は複数)を液晶表示器46に出力し、ユーザに通知するようにしてもよい。或いは、所定の条件が成立した場合に警告を行うようにしてもよい。例えば、得られた判定値Ed(=Ea/Eb)と適切値(例えば1)との差、或いは適切値(例えば1)に対する判定値Edの割合が所定閾値以上となったときに、液晶表示器46等によって警告を発するようにしてもよい。   In the example of FIG. 10, the faint state value obtained in S305 is stored in the memory 35 so that it can be used later. However, these pieces of information (image processing setting, number of detected position detection patterns, position Detection pattern coordinates, blurred state values E1, E2, and E3 of the position detection pattern, average value Ea of blurred state values of the position detection pattern, determination value Ed (= Ea / Eb), availability of decoding processing in S305, error correction Any one or more of the number may be output to the liquid crystal display 46 to notify the user. Alternatively, a warning may be issued when a predetermined condition is satisfied. For example, when the difference between the obtained determination value Ed (= Ea / Eb) and an appropriate value (for example, 1), or the ratio of the determination value Ed to the appropriate value (for example, 1) exceeds a predetermined threshold value, the liquid crystal display A warning may be issued by the device 46 or the like.

一方、S304にて位置検出パターンの検出数が3でないと判断された場合にはS304にてNoに進み、S307において検出数が0であるか否かを判断する。0でない場合には、S307にてNoに進み、S308においてS305と同様のかすれ状態値算出・デコード処理を行う。なお、S305では3つの位置検出パターンのそれぞれのかすれ状態値E1〜E3を算出し平均値Eaを求めていたが、S308では、S302にて検出された位置検出パターンの分だけかすれ状態値を算出する。各位置検出パターンのかすれ状態値を算出する方法はS305と同様であり、また、S305と同様に、検出された位置検出パターンのかすれ状態値の平均値Eaを算出する。   On the other hand, if it is determined in S304 that the number of detected position detection patterns is not 3, the process proceeds to No in S304, and it is determined whether or not the number of detection is 0 in S307. If it is not 0, the process proceeds to No in S307, and the blur state value calculation / decoding process similar to S305 is performed in S308. In S305, the blur state values E1 to E3 of the three position detection patterns are calculated to obtain the average value Ea. However, in S308, the blur state value is calculated for the position detection pattern detected in S302. To do. The method of calculating the blurred state value of each position detection pattern is the same as that in S305, and the average value Ea of the blurred state values of the detected position detection pattern is calculated as in S305.

S308のかすれ状態値算出、デコード処理でも、QRコードQのかすれ状態値(即ち、各位置検出パターンのかすれ状態値の平均値Ea)のみならず、判定値の算出をも行っている。具体的にはS305と同様に、標準値Eb(例えば1)に対するかすれ状態値Eaの割合Ea/Ebを判定値として算出する。また、S308でも、デコード処理が行われる。具体的には現在の画像データ(S301にて取得した画像データ、既にS310又はS311にて画像処理が行われている場合には直前の画像処理後の画像処理済データ)に基づいてデコード処理が行われ、デコードの可否と誤り訂正の数が検証される。   In the blur state value calculation and decoding process of S308, not only the blur state value of the QR code Q (that is, the average value Ea of the blur state values of each position detection pattern) but also the determination value is calculated. Specifically, as in S305, the ratio Ea / Eb of the blurred state value Ea to the standard value Eb (for example, 1) is calculated as the determination value. In S308, the decoding process is also performed. Specifically, the decoding process is performed based on the current image data (the image data acquired in S301, or the image processed data after the previous image processing if the image processing has already been performed in S310 or S311). This is done to verify whether decoding is possible and the number of error corrections.

その後、S306と同様に、得られたかすれ状態値、判定値、誤り訂正数などをメモリ35に記憶する記憶処理が行われる(S309)。図11(b)はこのときの記憶例を示すものであり、S308の処理対象のデータについての、画像処理設定、位置検出パターンの検出数、位置検出パターンの座標、位置検出パターンの各かすれ状態値、位置検出パターンのかすれ状態値の平均値Ea、判定値Ed(=Ea/Eb)、S308のデコード処理の可否、誤り訂正数がそれぞれ記憶される。   Thereafter, similarly to S306, a storage process for storing the obtained faint state value, determination value, number of error corrections, and the like in the memory 35 is performed (S309). FIG. 11B shows an example of storage at this time. For the data to be processed in S308, the image processing setting, the number of position detection patterns detected, the coordinates of the position detection pattern, and the fading state of the position detection pattern. Value, average value Ea of the blurred state value of the position detection pattern, determination value Ed (= Ea / Eb), whether or not the decoding process of S308 is possible, and the number of error corrections are stored.

このS309の記憶処理は、後述する画像処理(S310又はS311)が行われない状態でなされる場合もあれば、後述の画像処理後に行われる場合もある。画像処理後であるか否かはNの値で判断することができ、N=1は画像処理が行われていない状態を意味する。よって、N=1のときには、「画像処理設定」として、「画像処理設定なし」の情報を併せて記憶する。一方、Nが2以上であるときは画像処理が既に行われていることを意味し、そのときのN−1の値は直前の画像処理において用いられた処理設定の番号を意味するものである。よって、この場合には、「画像処理設定」として、N−1番目の画像処理設定の情報を対応付けて記憶する。   The storage processing in S309 may be performed in a state where image processing (S310 or S311) described later is not performed, or may be performed after image processing described later. Whether or not it is after image processing can be determined by the value of N, and N = 1 means that image processing is not performed. Therefore, when N = 1, information “no image processing setting” is also stored as “image processing setting”. On the other hand, when N is 2 or more, it means that image processing has already been performed, and the value of N-1 at that time means the number of the processing setting used in the immediately preceding image processing. . Therefore, in this case, as the “image processing setting”, information on the (N−1) th image processing setting is stored in association with each other.

S309の記憶処理の後には画像処理が行われる(S310)。S310では、予め登録されている複数の処理設定の中からいずれかの処理設定が用いられ、S301にて取得された画像データに対して画像処理が行われる。S310で用いられる処理設定は、N番目の処理設定であり、現在のNの値が1であれば1番目の処理設定が用いられ、現在のNの値が2であれば2番目の処理設定が用いられることとなる。処理設定としては画像処理に用いる様々な設定を採用でき、本実施形態では、例えば3×3平滑処理、5×5平滑処理、5×5膨張処理などを例示している。また、「画像データのダイナミックレンジを変更する処理」も処理設定として採用されている。例えば現在のNの値が1であり、1番目の処理設定が3×3平滑処理であれば、S310においては、S301にて得られた画像データに対して3×3平滑処理による画像処理が行われる。また、現在のNの値が3であり、3番目の処理設定が5×5膨張処理であれば、S310では、S301にて得られた画像データに対して5×5膨張処理による画像処理が行われることとなる。   Image processing is performed after the storage processing of S309 (S310). In S310, one of a plurality of processing settings registered in advance is used, and image processing is performed on the image data acquired in S301. The process setting used in S310 is the Nth process setting. If the current N value is 1, the first process setting is used. If the current N value is 2, the second process setting is used. Will be used. Various settings used for image processing can be adopted as the processing settings. In the present embodiment, for example, 3 × 3 smoothing processing, 5 × 5 smoothing processing, 5 × 5 expansion processing, and the like are illustrated. Further, “processing for changing the dynamic range of image data” is also adopted as a processing setting. For example, if the current value of N is 1 and the first processing setting is 3 × 3 smoothing processing, in S310, image processing by 3 × 3 smoothing processing is performed on the image data obtained in S301. Done. If the current value of N is 3 and the third processing setting is 5 × 5 expansion processing, in S310, image processing by 5 × 5 expansion processing is performed on the image data obtained in S301. Will be done.

一方、S307にて位置検出パターンの検出数が0と判断された場合には、S307にてYesに進み、S310と同様の画像処理を行う(S311)。この画像処理もS310と同様であり、S301にて取得した画像データに対してN番目の処理設定を用いて画像処理を行うこととなる。   On the other hand, if it is determined in S307 that the number of detected position detection patterns is 0, the process proceeds to Yes in S307 and image processing similar to S310 is performed (S311). This image processing is also the same as S310, and the image processing is performed on the image data acquired in S301 using the Nth processing setting.

S310又はS311の画像処理が終了すると、S312にてNの値がインクリメントされ、S313にて全ての処理設定について画像処理が終了したか判断される。予め登録されている処理設定全てについて画像処理が完了した場合にはS313にてYesに進み、当該評価処理を終了する。一方、登録された処理設定の全てについて画像処理が完了していない場合にはS313にてNoに進み、S303以降の処理を繰り返すこととなる。   When the image processing in S310 or S311 is completed, the value of N is incremented in S312, and it is determined in S313 whether the image processing has been completed for all processing settings. If image processing has been completed for all processing settings registered in advance, the process proceeds to Yes in S313, and the evaluation processing ends. On the other hand, if the image processing has not been completed for all the registered processing settings, the process proceeds to No in S313, and the processing from S303 onward is repeated.

本実施形態では、S303において全ての位置検出パターンが検出されない場合(即ち、S304にてNoとなる場合)に、S310又はS311において、QRコードQの画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行うことができるようになっており、その後再び行われるS303の処理において、画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるようになっている。そして、S305又はS308において、各処理設定に対応した各画像処理済データに対し位置検出パターン毎にかすれ状態値を算出し、その後のS306又はS309において、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果と、かすれ状態値の算出結果と、を対応付けて通知又は記録するようになっている。例えば、初回のS303の処理では1つの位置検出パターンのみしか検出できなかった場合、S310においてNの値に基づく画像処理が行われ、このような画像処理後のデータに対してS303において位置検出パターンの検出が再度なされ、かつS305又はS308においてかすれ状態値算出・デコード処理が行われる。このとき、画像処理前よりもかすれ状態値が適切値に近づいたり、誤り訂正数が減少したり、或いは画像処理前にデコードできなかったものがデコードできるようになった場合、画像処理が有効であったといえる。本実施形態では、このような事情を考慮し、画像処理に用いる処理設定と、その処理設定に基づいて画像処理がなされた後の評価結果と、を対応付けて記憶或いは通知しているため、当該評価処理以降において同様の読み取りを行う際に当該情報を役立てることができる。   In the present embodiment, when all the position detection patterns are not detected in S303 (that is, when No in S304), a plurality of predetermined processes are performed on the image data of QR code Q in S310 or S311. A plurality of image processes can be performed according to the setting, and in the process of S303 performed again thereafter, the detection of the position detection pattern is tried again for each image processed data after the image process is performed. It has become. Then, in S305 or S308, a blur state value is calculated for each position detection pattern for each image processed data corresponding to each processing setting, and in each subsequent S306 or S309, each processing setting and each processing setting are handled. The detection result of the position detection pattern in each image processed data and the calculation result of the blurred state value are notified or recorded in association with each other. For example, if only one position detection pattern can be detected in the first processing of S303, image processing based on the value of N is performed in S310, and the position detection pattern is processed in S303 for such image-processed data. Is detected again, and the blur state value calculation / decoding process is performed in S305 or S308. At this time, if the blurred state value is closer to an appropriate value than before image processing, the number of error corrections is reduced, or the one that could not be decoded before image processing can be decoded, image processing is effective. It can be said that there was. In the present embodiment, in consideration of such circumstances, the processing setting used for the image processing and the evaluation result after the image processing based on the processing setting are stored or notified in association with each other. The information can be used when the same reading is performed after the evaluation process.

なお、図10の評価処理において、S313の後に更にデコード処理を行うようにしてもよい。具体的には、S301〜S313の処理にて得られた複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのかすれ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおけるかすれ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行い、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしてもよい。なお、本実施形態では、上述の標準値Ebがかすれ状態値の「適切値」に相当しているため、判定値Ea/Ebが最も1に近くなる画像処理済データが「位置検出パターンのかすれ状態値が最も適切値に近づく画像処理済データ」に相当する。   In the evaluation process of FIG. 10, a decoding process may be further performed after S313. Specifically, among the plurality of image processed data obtained in the processing of S301 to S313, the image processed data in which the position detection pattern is detected most frequently, and the blur state value of the position detection pattern is the most appropriate value. Image-processed data that approaches the image data and image-processed data that minimizes the variation in the blurring state value in the plurality of position detection patterns, respectively, and a plurality of image-processed data that has been subjected to the decoding processing are decoded. The image processed data with the smallest number of error corrections may be selected from among them, and the processing setting for obtaining the image processed data may be notified or recorded. In the present embodiment, since the above-described standard value Eb corresponds to the “appropriate value” of the blurred state value, the image processed data with the determination value Ea / Eb closest to 1 is “the blurred position detection pattern”. This corresponds to “image-processed data whose state value approaches the most appropriate value”.

また、S310又はS311において画像処理がなされた後の画像処理済データに対しその後のS303において位置検出パターンの検出が行われたときに、画像処理前よりも位置検出パターンの検出数が増加した場合には、その結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。また、S310又はS311において画像処理がなされた後の画像処理済データに対しその後のS305又はS308においてデコード処理が行われたときに「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果を液晶表示器46等を用いてユーザに通知するようにしてもよい。   In addition, when the position detection pattern is detected in the subsequent S303 for the image processed data after the image processing is performed in S310 or S311, the number of position detection patterns detected is greater than that before the image processing. Alternatively, the user may be notified of the result using the liquid crystal display 46 or the like. Further, when the image processed data after the image processing in S310 or S311 is decoded in the subsequent S305 or S308, “the number of error corrections is reduced than before the image processing”, “decoding processing is In the case of any of “success”, the result may be notified to the user using the liquid crystal display 46 or the like.

本実施形態の構成によれば例えば以下のような効果が得られる。
本実施形態では、情報コード(QRコードQ)の一部を構成する特定部分(位置検出パターン)に着目し、この特定部分の画像状態を示す評価値として、当該特定部分のかすれ状態を定量化した値であるかすれ状態値Eaを、所定のかすれ状態値算出方法に従って算出している。このようにすれば、情報コードの全領域についてかすれ状態を算出する構成と比較して処理の迅速化を実現でき、またどのようなかすれ状態であるかを定量的に把握できる。さらに、特定部分のかすれ状態値を反映して印字品質情報を生成し、それをユーザに通知又は記録手段に記録しており、このようにすれば、対象となる情報コードがどのような印字品質であるか(具体的には、セルがどのようなかすれ状態であるか)を迅速に把握でき、かつ迅速に有効利用できるようになる。
According to the configuration of the present embodiment, for example, the following effects can be obtained.
In this embodiment, attention is paid to a specific part (position detection pattern) constituting a part of the information code (QR code Q), and the blurred state of the specific part is quantified as an evaluation value indicating the image state of the specific part. The blurred state value Ea that is the calculated value is calculated according to a predetermined blurred state value calculation method. In this way, it is possible to speed up the processing as compared with the configuration for calculating the fading state for the entire area of the information code, and it is possible to quantitatively grasp the fading state. Furthermore, the print quality information is generated by reflecting the blurred state value of the specific part, and this is notified to the user or recorded in the recording means. In this way, the print quality information of the target information code (Specifically, what kind of faint state the cell is) can be quickly grasped and can be effectively used quickly.

また、算出された特定部分のかすれ状態値Eaを予め定められたかすれ基準値(標準値Eb)と比較し、かすれ基準値Ebに対するかすれ状態値Eaの割合を示す値Ea/Ebを印字品質情報として通知している。このようにすれば、セルがどのようなかすれ状態であるかをユーザによりわかりやすく伝達でき、ユーザは定量的な基準に基づいて印字品質を精度高く把握できる。なお、特定部分のかすれ状態値Eaとかすれ基準値(標準値Eb)との差を示す値(例えばEb−Ea)を印字品質情報としてユーザに通知するようにしても、同様の効果が得られる。   Further, the calculated blur state value Ea of the specific portion is compared with a predetermined blur reference value (standard value Eb), and a value Ea / Eb indicating the ratio of the blur state value Ea to the blur reference value Eb is printed quality information. As a notification. In this way, it is possible to convey to the user in an easy-to-understand manner what the cell is in a faint state, and the user can accurately grasp the print quality based on a quantitative standard. The same effect can be obtained by notifying the user of the print quality information (eg, Eb−Ea) indicating the difference between the blur state value Ea of the specific portion and the blur reference value (standard value Eb). .

また、特定部分における暗色セルが連続して並ぶべき領域(図11の例では位置検出パターンの中央領域AR1)において暗色部と明色部とを抽出し、暗色部と明色部との配置割合を示す値を、特定部分のかすれ状態値として算出している。このようにすれば、本来配置されるべき暗色領域に対する実際の暗色部又は明色部の割合を適切に定量化でき、セルのかすれ状態を精度高く反映した数値が得られる。具体的には、暗色セルが連続して並ぶべき中央領域AR1において、暗色部が配される配置間隔Z2と、暗色部の幅値Z1とを抽出し、配置間隔Z2に対する暗色部の幅値Z1の割合を示す値Z1/Z2を、特定部分のかすれ状態値として算出している。このようにすれば、明色部と暗色部の配置割合を、より迅速に、且つ良好に定量化できる。   Further, the dark color portion and the light color portion are extracted in the region where the dark color cells in the specific portion should be continuously arranged (the center region AR1 of the position detection pattern in the example of FIG. 11), and the arrangement ratio of the dark color portion and the light color portion Is calculated as the blurred state value of the specific portion. In this way, the ratio of the actual dark color portion or the light color portion to the dark color region to be originally arranged can be appropriately quantified, and a numerical value accurately reflecting the blurred state of the cell can be obtained. Specifically, in the central area AR1 where the dark cells should be continuously arranged, the arrangement interval Z2 in which the dark color portion is arranged and the width value Z1 of the dark color portion are extracted, and the width value Z1 of the dark color portion with respect to the arrangement interval Z2 The value Z1 / Z2 indicating the ratio is calculated as the blurred state value of the specific portion. In this way, the arrangement ratio of the light color part and the dark color part can be quantified more quickly and satisfactorily.

また、QRコードを読取対象とし、当該QRコードの位置検出パターンを「特定部分」として検出している。このように規定形状とされた位置検出パターンを、かすれ状態値を算出する対象部位とすれば、複雑な検出手法を用いずとも明色セル及び暗色セルを精度高く特定でき、かすれ状態値を迅速かつ良好に算出できる。特に、QRコードの読取処理においては、位置検出パターンの特定を初期段階で行うことができるため、かすれ状態値算出処理の一層の迅速化を図ることができる。   Further, the QR code is set as a reading target, and the position detection pattern of the QR code is detected as a “specific portion”. If the position detection pattern having the prescribed shape is set as a target part for calculating the blur state value, the bright cell and the dark cell can be accurately identified without using a complicated detection method, and the blur state value can be quickly determined. And it can be calculated well. In particular, in the QR code reading process, since the position detection pattern can be specified at an initial stage, the blur state value calculation process can be further accelerated.

また、QRコードにおける全ての位置検出パターンの検出を試みると共に、検出された位置検出パターン毎にかすれ状態値を算出し、それら算出された位置検出パターン毎のかすれ状態値に基づいて印字品質情報を生成している。このように、複数の位置検出パターンのかすれ状態値を算出する構成とすれば、QRコードにおける互いに距離を隔てた複数位置において複雑な処理を用いることなくかすれ状態値を迅速に算出でき、更に、それらかすれ状態値に基づいて印字品質情報を生成する構成とすれば、単一の位置検出パターンのかすれ状態値のみを算出する構成と比較してコード全体の印字品質をより適切に反映した印字品質情報が得られることとなる。   In addition, it tries to detect all position detection patterns in the QR code, calculates a blur state value for each detected position detection pattern, and print quality information based on the calculated blur state value for each position detection pattern. Is generated. In this way, if it is configured to calculate the blur state value of a plurality of position detection patterns, it is possible to quickly calculate the blur state value without using complicated processing at a plurality of positions separated from each other in the QR code. If the configuration generates print quality information based on the blurred state value, the print quality more appropriately reflects the print quality of the entire code compared to a configuration that calculates only the blurred state value of a single position detection pattern. Information will be obtained.

また、全ての位置検出パターンが検出されない場合に、QRコードの画像データに対し、予め定められた複数の処理設定に基づいて複数の画像処理を行い、各処理設定に従って画像処理がなされた後の各画像処理済データに対して位置検出パターンの検出を再度試みるように構成されている。このようにすれば、位置検出パターンが検出できないような場合であっても画像処理に基づいて位置検出パターンの状態を把握できるようになる。また、各処理設定に対応した各画像処理済データにおいて位置検出パターン毎にかすれ状態値を算出し、各処理設定と、各処理設定に対応する各画像処理済データでの位置検出パターンの検出結果及びかすれ状態値の算出結果と、を対応付けて通知又は記録する構成をなしている。このようにすれば、各処理設定ごとの位置検出パターンの検出結果及びかすれ状態値の算出結果を把握でき、適切な処理設定を有効利用しやすくなる。   Further, when all the position detection patterns are not detected, a plurality of image processes are performed on the QR code image data based on a plurality of predetermined process settings, and the image process is performed according to each process setting. It is configured to retry the detection of the position detection pattern for each image processed data. In this way, even if the position detection pattern cannot be detected, the state of the position detection pattern can be grasped based on the image processing. Further, a blur state value is calculated for each position detection pattern in each image processed data corresponding to each processing setting, and each processing setting and a detection result of the position detection pattern in each image processed data corresponding to each processing setting And the calculation result of the blurred state value is associated with the notification or recording. In this way, the detection result of the position detection pattern and the calculation result of the blurred state value for each processing setting can be grasped, and it becomes easy to effectively use the appropriate processing setting.

また、複数の画像処理済データのうち、位置検出パターンが最も多く検出される画像処理済データと、位置検出パターンのかすれ状態値が最も適切値に近づく画像処理済データと、複数の位置検出パターンにおけるかすれ状態値のばらつきが最も小さくなる画像処理済データと、についてそれぞれデコード処理を行っている。このようにすれば、画像処理が効果的になされたと考えられる複数の画像処理済データに対し選択的にデコード処理を行うことができる。更に、それらデコード処理が行われた複数の画像処理済データの中から最も誤り訂正数が少ない画像処理済データを選択し、その画像処理済データを得るための処理設定を通知又は記録するようにしている。このようにすれば、より信頼性の高い画像処理済みデータを取得でき、そのデータを得るための処理設定を有効利用できるようになる。   In addition, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the blur state value of the position detection pattern approaches the most appropriate value, and the plurality of position detection patterns Decoding processing is performed for each of the image-processed data with the smallest variation in the blurred state value. In this way, it is possible to selectively perform decoding processing on a plurality of pieces of image processed data that are considered to have been effectively processed. Further, the image processed data with the smallest number of error corrections is selected from the plurality of image processed data subjected to the decoding process, and the processing setting for obtaining the image processed data is notified or recorded. ing. In this way, more reliable image processed data can be acquired, and processing settings for obtaining the data can be used effectively.

[第4実施形態]
次に、第4実施形態について説明する。第4実施形態は、評価処理の内容のみが第1実施形態と異なり、電気的構成については第1実施形態と同一である。よって、電気的構成については第1実施形態と同一であるとして詳細な説明は省略し、適宜図1を参照することとする。なお、本実施形態でも、図1の受光センサ23が、「受光手段」の一例に相当し、制御回路40が「デコード手段」の一例に相当する。
[Fourth embodiment]
Next, a fourth embodiment will be described. The fourth embodiment differs from the first embodiment only in the contents of the evaluation process, and the electrical configuration is the same as that of the first embodiment. Therefore, the electrical configuration is the same as that of the first embodiment, and a detailed description thereof will be omitted, and FIG. 1 will be referred to as appropriate. In this embodiment, the light receiving sensor 23 in FIG. 1 corresponds to an example of “light receiving unit”, and the control circuit 40 corresponds to an example of “decoding unit”.

図14は、本実施形態の情報コードリーダ20の内部を読取口側から見た図である。情報コードリーダ20は、図示しない読取口寄りの位置に、レンズ27が配置されており、読取口を基準とするレンズ27と同程度に奥まった位置、若しくはレンズ27よりも若干前寄りの位置に、レンズ27を取り囲むように複数(図14の例では4つ)の照明光源21が環状に配されている。なお、以下の説明では、4つの照明光源21をそれぞれ、第1の照明光源21a、第2の照明光源21b、第3の照明光源21c、第4の照明光源21dとしている。   FIG. 14 is a view of the inside of the information code reader 20 of the present embodiment as viewed from the reading port side. The information code reader 20 is provided with a lens 27 at a position close to a reading port (not shown), and is located at a position slightly behind the lens 27 as far as the lens 27 with the reading port as a reference. A plurality of (four in the example of FIG. 14) illumination light sources 21 are annularly arranged so as to surround the lens 27. In the following description, the four illumination light sources 21 are a first illumination light source 21a, a second illumination light source 21b, a third illumination light source 21c, and a fourth illumination light source 21d, respectively.

各照明光源21はいずれも複数色のLED(ここでは赤色LEDと青色LED)を備えた構成をなしており、各照明光源21のいずれのLEDも制御回路40からの指令に応じて点灯する構成となっている。なお、これら4つの照明光源21は「照明手段」の一例に相当し、QRコード(情報コード)に向けて照明光を照射するように機能する。また、制御回路40は、照明光源21の点灯タイミングや点灯時間を制御するものであり、「照明制御手段」の一例に相当し、後述する「点灯パターン設定手段」により設定された点灯パターンで点灯を行うように照明光源21を制御する。   Each illumination light source 21 has a configuration including LEDs of a plurality of colors (here, a red LED and a blue LED), and any LED of each illumination light source 21 is turned on in response to a command from the control circuit 40. It has become. These four illumination light sources 21 correspond to an example of “illumination means” and function to irradiate illumination light toward a QR code (information code). The control circuit 40 controls the lighting timing and lighting time of the illumination light source 21, corresponds to an example of “illumination control means”, and lights with a lighting pattern set by “lighting pattern setting means” described later. The illumination light source 21 is controlled to perform

本実施形態では、4つの照明光源21の点灯パターンを設定変更しうる構成となっている。具体的には、図16のように、複数種類の点灯パターンのデータがメモリ35に登録されており、この登録された点灯パターンの中からいずれかを選択して実際に用いる点灯パターンを設定できるようになっている。メモリ35に登録される点灯パターンデータは少なくとも4つの照明光源21における点灯位置を設定するものであり、制御回路40は、その設定された点灯位置で点灯を行うように4つの照明光源21を制御している。なお、図15(a)〜(d)は、4つの照明光源21の点灯位置の変更態様を例示している。   In the present embodiment, the lighting patterns of the four illumination light sources 21 can be set and changed. Specifically, as shown in FIG. 16, data of a plurality of types of lighting patterns are registered in the memory 35, and one of the registered lighting patterns can be selected and a lighting pattern to be actually used can be set. It is like that. The lighting pattern data registered in the memory 35 sets lighting positions in at least four illumination light sources 21, and the control circuit 40 controls the four illumination light sources 21 so as to perform lighting at the set lighting positions. is doing. Note that FIGS. 15A to 15D illustrate how the lighting positions of the four illumination light sources 21 are changed.

また、各照明光源21は上述のように複数色の発光部(赤色LED,青色LED)を有しており、各照明光源21ごとに点灯色を切り替えることができるようになっている。即ち、図16の点灯パターンのデータは、各照明光源21毎に、いずれの色の発光部を使用するかを定めており、制御回路40は、その設定された点灯色で点灯を行うように照明光源21を制御している。例えば、図15(a)〜(d)のように点灯位置が設定される場合、その点灯される各照明光源21の点灯色を、赤色LEDとしたり、青色LEDとしたり、或いは両LEDとしたりすることができる。なお、メモリ35及び制御回路40が「点灯パターン設定手段」の一例に相当する。   Moreover, each illumination light source 21 has a light emitting part (red LED, blue LED) of a plurality of colors as described above, and the lighting color can be switched for each illumination light source 21. That is, the lighting pattern data in FIG. 16 determines which color of the light emitting unit is to be used for each illumination light source 21, and the control circuit 40 performs lighting with the set lighting color. The illumination light source 21 is controlled. For example, when the lighting position is set as shown in FIGS. 15A to 15D, the lighting color of each illumination light source 21 to be lit is a red LED, a blue LED, or both LEDs. can do. The memory 35 and the control circuit 40 correspond to an example of “lighting pattern setting unit”.

次に、図13等を参照し、第4実施形態で行われる評価処理について説明する。なお、図13は、第4実施形態の評価処理の流れを例示するフローチャートである。
本実施形態で行われる評価処理もメモリ35に記憶されるプログラムに従って制御回路40によって実行されるものであり、所定の操作をトリガとして開始されたり、或いは読取処理のサブルーチンとして実施されたりするものである。当該評価処理が開始されると、まず、点灯パターンの初期設定が行われる(S401)。この初期設定では、例えば、図16のように順序化された点灯パターンの1番目の点灯パターンを使用パターンとして設定する。
Next, the evaluation process performed in the fourth embodiment will be described with reference to FIG. FIG. 13 is a flowchart illustrating the flow of evaluation processing according to the fourth embodiment.
The evaluation process performed in the present embodiment is also executed by the control circuit 40 in accordance with a program stored in the memory 35, and is started with a predetermined operation as a trigger or executed as a reading process subroutine. is there. When the evaluation process is started, the lighting pattern is initially set (S401). In this initial setting, for example, the first lighting pattern of the lighting patterns ordered as shown in FIG. 16 is set as the usage pattern.

次いで、解読処理が行われる(S402)。この解読処理では、まず、S401で設定された点灯パターンとなるように4つの照明光源21の点灯制御を行い、その点灯状態でQRコードQの画像データを取得する。そして、得られた画像データに対して公知のデコード処理を行う。例えば、当該評価処理の開始直後の解読処理では、S401の初期設定で設定される点灯パターン(第1の照明光源21aの赤色LEDをオンし、他の照明光源21b〜21dをオフにする点灯パターン)で点灯を行うと共に、その点灯状態で取得された画像データに対してデコード処理を行う。
このように、本実施形態では、設定変更される各点灯パターンごとの受光結果に基づき、QRコードQの画像データを各点灯パターンごとに生成しており、点灯パターンごとの画像データについてそれぞれデコード処理を行っている。なお、本実施形態でも、制御回路40(図1)が「生成手段」の一例に相当する。
Next, decryption processing is performed (S402). In this decoding process, first, lighting control of the four illumination light sources 21 is performed so that the lighting pattern set in S401 is obtained, and image data of QR code Q is acquired in the lighting state. Then, a known decoding process is performed on the obtained image data. For example, in the decoding process immediately after the start of the evaluation process, the lighting pattern set in the initial setting in S401 (the lighting pattern for turning on the red LED of the first illumination light source 21a and turning off the other illumination light sources 21b to 21d) ) And the decoding process is performed on the image data acquired in the lighting state.
As described above, in the present embodiment, the image data of the QR code Q is generated for each lighting pattern based on the light reception result for each lighting pattern whose setting is changed, and the decoding process is performed on the image data for each lighting pattern. It is carried out. In the present embodiment as well, the control circuit 40 (FIG. 1) corresponds to an example of “generating means”.

S402の解読処理後には、解読処理が成功したか否かを判断する処理が行われる(S403)。S402にて適切なデコード結果が得られた場合には、解読が成功したと判断してS403にてYesに進み、S404にて印字判定処理が行われる。この印字判定処理は、図2のS5、図7のS205、及び図10のS305の少なくともいずれかと同様の評価値算出処理が行われ、QRコードQの位置検出パターンの画像状態を示す評価値が取得される。例えば、S404において図2のS5のようにコントラストを算出する場合には、第1実施形態と同様の方法でQRコードQについてのコントラストCaを算出し、かつ第1実施形態と同様の方法で余裕度を算出する。また、S404において図7のS205のように太さ状態値を算出する場合には、第2実施形態と同様の方法でQRコードQについての太さ状態値Daを算出し、かつ第2実施形態と同様の方法で判定値Ddを算出する。或いはS404において図10のS305のようにかすれ状態値を算出する場合には、第3実施形態と同様の方法でQRコードQについてのかすれ状態値Eaを算出し、かつ第3実施形態と同様の方法で判定値Edを算出する。なお、これらの印字品質情報は、S402で用いられた点灯パターンの情報と対応付けられてメモリ35に記憶される。即ち、どの点灯パターンでどのような印字品質情報が得られたかを特定できるデータ状態でメモリ35に蓄積される。   After the decoding process in S402, a process for determining whether or not the decoding process is successful is performed (S403). If an appropriate decoding result is obtained in S402, it is determined that the decoding is successful, the process proceeds to Yes in S403, and a print determination process is performed in S404. In this print determination process, an evaluation value calculation process similar to at least one of S5 in FIG. 2, S205 in FIG. 7, and S305 in FIG. 10 is performed, and an evaluation value indicating the image state of the position detection pattern of the QR code Q is obtained. To be acquired. For example, when the contrast is calculated in S404 as in S5 of FIG. 2, the contrast Ca for the QR code Q is calculated by the same method as in the first embodiment, and a margin is obtained by the same method as in the first embodiment. Calculate the degree. In S404, when the thickness state value is calculated as in S205 of FIG. 7, the thickness state value Da for the QR code Q is calculated by the same method as in the second embodiment, and the second embodiment The determination value Dd is calculated by the same method as described above. Alternatively, when the blurred state value is calculated in S404 as in S305 of FIG. 10, the blurred state value Ea for the QR code Q is calculated by the same method as in the third embodiment, and the same as in the third embodiment. The determination value Ed is calculated by the method. The print quality information is stored in the memory 35 in association with the lighting pattern information used in S402. In other words, it is stored in the memory 35 in a data state that can specify what kind of print quality information is obtained with which lighting pattern.

このように、本実施形態では、各点灯パターンごとの画像データのうち、デコード処理が正常に行われた画像データについて評価値(例えば、コントラスト、太さ状態値、かすれ状態値)を算出し、その正常に行われた画像データについての評価値に基づいて得られる印字品質情報をメモリ35(記録手段)に記録している。なお、S404においてこのような印字品質情報を液晶表示器46などで表示してユーザに通知してもよい。
本実施形態でも、制御回路40が、特定部分検出手段、輝度検出手段、コントラスト算出手段、太さ状態値算出手段、かすれ状態値算出手段、の一例に相当しうることとなる。
As described above, in the present embodiment, among the image data for each lighting pattern, an evaluation value (for example, contrast, thickness state value, blurred state value) is calculated for image data that has been normally decoded. Print quality information obtained based on the evaluation value of the image data that has been normally performed is recorded in the memory 35 (recording means). In S404, such print quality information may be displayed on the liquid crystal display 46 or the like to notify the user.
Also in the present embodiment, the control circuit 40 can correspond to an example of a specific part detecting unit, a luminance detecting unit, a contrast calculating unit, a thickness state value calculating unit, and a blurred state value calculating unit.

さらに、S405において印字判定処理(S404)の判定結果が判定基準を超えたか否かを判断する。ここでは、得られた画像データの印字状態が判定基準を超える良好状態であるか否かを判断しており、例えば、S404においてコントラスト及び余裕度を算出する方法を用いる場合には、例えば余裕度が所定の閾値(余裕度閾値)を超える場合に印字判定基準を超えたと判断する。また、S404において太さ状態値Daおよび判定値Ddを算出する方法を用いる場合には、例えば判定値Ddが所定の第1閾値以上で、所定の第2閾値未満である場合に印字判定基準を超えたと判断する。また、S404においてかすれ状態値Ea及び判定値Edを算出する方法を用いる場合には、例えば判定値Edが所定の閾値(判定値閾値)を超える場合に印字判定基準を超えたと判断する。   Further, in S405, it is determined whether or not the determination result of the print determination process (S404) exceeds the determination criterion. Here, it is determined whether or not the printing state of the obtained image data is in a good state exceeding the determination criterion. For example, when using the method of calculating the contrast and margin in S404, for example, margin Is greater than a predetermined threshold (margin threshold), it is determined that the print determination criterion has been exceeded. When the method of calculating the thickness state value Da and the determination value Dd is used in S404, for example, when the determination value Dd is greater than or equal to a predetermined first threshold and less than the predetermined second threshold, the print determination criterion is used. Judge that it exceeded. Further, when the method of calculating the blurred state value Ea and the determination value Ed is used in S404, for example, when the determination value Ed exceeds a predetermined threshold value (determination value threshold value), it is determined that the print determination criterion is exceeded.

S404で得られた印字品質情報が判定基準を超えたと判断される場合にはS405にてYesに進む。S405にてYesに進む場合には、他の情報コードについての読み取り操作を待って他の情報コードについてのS401以降の処理を行い得るようにしてもよく、そのまま当該評価処理を終了してもよい。   If it is determined that the print quality information obtained in S404 exceeds the determination criterion, the process proceeds to Yes in S405. When the process proceeds to Yes in S405, the process after S401 for other information codes may be performed after the reading operation for other information codes may be performed, or the evaluation process may be terminated as it is. .

S405にて判定基準を超えていないと判断される場合、S405にてNoに進み、S406にて点灯パターンの設定変更を行う。例えば、前回の点灯パターンが図16に示す第1番目の点灯パターンであった場合、その次の第2番目の点灯パターンを使用パターンとして新たに設定する。   If it is determined in S405 that the determination criterion is not exceeded, the process proceeds to No in S405, and the lighting pattern setting is changed in S406. For example, when the previous lighting pattern is the first lighting pattern shown in FIG. 16, the second lighting pattern after that is newly set as the usage pattern.

一方、S403にて解読が成功でないと判断される場合、S403にてNoに進み、S406と同様に点灯パターンの設定変更を行う(S407)。   On the other hand, if it is determined in S403 that the decoding is not successful, the process proceeds to No in S403 and changes the lighting pattern setting in the same manner as in S406 (S407).

S406、S407の後には、登録されている全パターンを実施したかを判断する(S408)。即ち、S406、S407の設定変更前に既に全パターンが完了し、S406、S407で新たな設定パターンができない場合にはS408にてYesに進み当該評価処理を終了する。一方、全パターンが完了していない場合にはS408にてNoに進み、新たに設定された使用パターンを用いてS402以降の処理を繰り返す。   After S406 and S407, it is determined whether all registered patterns have been implemented (S408). That is, if all patterns have already been completed before the setting change in S406 and S407, and a new setting pattern cannot be created in S406 and S407, the process proceeds to Yes in S408 and the evaluation process is terminated. On the other hand, if all the patterns have not been completed, the process proceeds to No in S408, and the processes after S402 are repeated using the newly set usage pattern.

ところで、本実施形態では上述したように、S404において得られた印字品質情報を点灯パターンと対応付けてメモリ35に記憶しており、この印字品質情報と点灯パターンとを対応付けた対応データは、消去処理を行わない限り、S404の処理を行う度に蓄積されてゆくこととなる。このようにして得られる過去の対応データ(過去得られた複数の印字品質情報と、各々の印字品質情報の取得の際に用いられた点灯パターンとをそれぞれ対応付けたデータ)は、後に用いられる新たな点灯パターンの設定に利用してもよく、それら過去の対応データにおける過去の印字品質情報は、点灯パターンの順序設定に利用してもよい。以下では、このような過去の対応データを有効利用する方法について説明する。   In the present embodiment, as described above, the print quality information obtained in S404 is stored in the memory 35 in association with the lighting pattern, and the correspondence data in which the print quality information and the lighting pattern are associated with each other is as follows. Unless the erasing process is performed, the data is accumulated every time the process of S404 is performed. The past correspondence data obtained in this way (data in which a plurality of pieces of print quality information obtained in the past are associated with the lighting patterns used in acquiring each print quality information) are used later. You may use for the setting of a new lighting pattern, and you may use the past print quality information in those past corresponding data for the order setting of a lighting pattern. Hereinafter, a method for effectively using such past correspondence data will be described.

過去の対応データを有効利用する方法としては、例えば、メモリ35に蓄積される複数の過去の印字品質情報に対応付けられたそれぞれの点灯パターンを、それら複数の過去の印字品質情報の印字品質の良い順に順序化し、S402において、その順序化された点灯パターンの順序で点灯を行うように照明光源21を制御する。この場合、S402では、それら順序化された各点灯パターンごとの画像データについてデコード処理が行われることとなる。   As a method of effectively using past correspondence data, for example, each lighting pattern associated with a plurality of past print quality information stored in the memory 35 is used for the print quality of the plurality of past print quality information. The illumination light source 21 is controlled to perform lighting in the order of the ordered lighting patterns in S402. In this case, in S402, decoding processing is performed on the image data for each of the ordered lighting patterns.

図17(a)は、過去の対応データの蓄積例を示しており、過去得られたコントラストの余裕度(印字品質情報)を、その余裕度を取得したときの点灯パターンと対応付けて記憶したものを示している。なお、点灯パターンAについての余裕度が複数取得されている場合には、それら余裕度の平均値を点灯パターンAについての過去の余裕度として記憶してもよく、点灯パターンAについて過去複数得られた余裕度のうちの最も印字品質の良い値、或いは最も印字品質の悪い値を過去の余裕度として記憶してもよい。このような記憶方法は他の点灯パターンB〜E等についても同様である。   FIG. 17A shows an example of accumulation of past correspondence data, and the degree of contrast margin (print quality information) obtained in the past is stored in association with the lighting pattern when the margin is obtained. Shows things. When a plurality of margins for the lighting pattern A are acquired, an average value of the margins may be stored as a past margin for the lighting pattern A, and a plurality of past margins for the lighting pattern A are obtained. Of the margins, the value with the best print quality or the value with the worst print quality may be stored as the past margin. Such a storage method is the same for the other lighting patterns B to E.

このような過去の対応データが得られている場合には、図17(b)のように、余裕度の値の良い順に点灯パターンを順序化し、その順序に従ってS402の解読処理を行うことができる。この場合、メモリ35に蓄積される過去の点灯パターン(即ち、過去の印字品質情報に対応付けられている過去用いられた点灯パターン)が照明光源21に用いる新たな点灯パターンとして設定されることとなる。なお、上記のような順序化処理は、図13の評価処理とは別途に行うこともでき、図13の評価処理の一部として行うこともできる。   When such past correspondence data is obtained, as shown in FIG. 17B, lighting patterns can be ordered in order of good margin value, and the decoding process of S402 can be performed in accordance with the order. . In this case, a past lighting pattern (that is, a previously used lighting pattern associated with past print quality information) stored in the memory 35 is set as a new lighting pattern used for the illumination light source 21. Become. Note that the ordering process as described above can be performed separately from the evaluation process of FIG. 13, or can be performed as a part of the evaluation process of FIG.

また、S402において、上記のように順序化された各点灯パターンごとの画像データについてそれぞれデコード処理を行ったときに、それら各点灯パターンごとの画像データ全てについて読取不良が生じた場合、それら順序化された複数の点灯パターン以外の点灯パターンを新規点灯パターンとして設定することができる。即ち、図17(b)のように過去の点灯パターンが蓄積されている場合には、これら過去の点灯パターンについて優先的に解読処理を行い、過去の点灯パターン全てについて解読が成功しなかった場合には、過去の点灯パターンのデータとは別途に記憶されている点灯パターンのデータ(例えば図16のようなデータ)を用い、既に解読処理が行われた過去の点灯パターン以外の点灯パターンを新規点灯パターンとして設定する方法を用いることができる。この場合、S402では、照明光源21を新規点灯パターンで点灯させて得られた画像データについてデコード処理を行い、S404では、新規点灯パターンで点灯させて得られた画像データについてのデコード処理が正常に行われた場合、当該画像データについて評価値(コントラスト、太さ状態値、かすれ状態値等)を算出し、その正常に行われた画像データについての評価値に基づいて得られる印字品質情報をユーザに通知又はメモリ35に記録することとなる。   Further, in S402, when the decoding processing is performed on the image data for each lighting pattern ordered as described above, if reading failure occurs for all the image data for each lighting pattern, the ordering is performed. A lighting pattern other than the plurality of lighting patterns that have been set can be set as a new lighting pattern. That is, when past lighting patterns are accumulated as shown in FIG. 17B, the past lighting patterns are preferentially decoded, and the past lighting patterns are not successfully decoded. The lighting pattern data stored separately from the past lighting pattern data (for example, data as shown in FIG. 16) is used to newly turn on lighting patterns other than the past lighting patterns that have already been decoded. A method of setting as a lighting pattern can be used. In this case, in S402, the decoding process is performed on the image data obtained by lighting the illumination light source 21 with the new lighting pattern. In S404, the decoding process on the image data obtained by lighting with the new lighting pattern is normally performed. If it is performed, an evaluation value (contrast, thickness state value, blurred state value, etc.) is calculated for the image data, and print quality information obtained based on the evaluation value for the image data that has been normally performed is displayed by the user. Or is recorded in the memory 35.

以上説明した本実施形態の構成によれば、例えば以下のような効果を奏する。
本実施形態では、「点灯パターン設定手段」により設定された点灯パターンで照明光源21の点灯が行われるように制御がなされる構成となっている。このようにすれば、照明光源21の点灯パターンを切り替えて使用でき、点灯パターンに応じた印字品質情報を取得、利用できる。
According to the configuration of the present embodiment described above, for example, the following effects can be obtained.
In the present embodiment, the illumination light source 21 is controlled to be turned on with the lighting pattern set by the “lighting pattern setting means”. If it does in this way, the lighting pattern of the illumination light source 21 can be switched and used, and the print quality information according to the lighting pattern can be acquired and used.

また、各点灯パターンごとの画像データのうち、デコード処理が正常に行われた画像データについて評価値を算出し、その評価値に基づいて得られる印字品質情報をユーザに通知又は記録手段に記録している。このようにすると、ある点灯パターンでデコード処理が正常に行われない場合であっても点灯パターンを変更してデコード処理成功の確率を高めることができる。更に、ある点灯パターンでは印字品質情報が得られなくても、点灯パターンを変更して印字品質情報を取得できる可能性を高めることができ、印字品質情報を取得及び利用する上でより一層有利となる。   Further, among the image data for each lighting pattern, the evaluation value is calculated for the image data that has been normally decoded, and the print quality information obtained based on the evaluation value is notified to the user or recorded in the recording means. ing. In this way, even if the decoding process is not normally performed with a certain lighting pattern, the lighting pattern can be changed to increase the probability of a successful decoding process. Furthermore, even if the print quality information cannot be obtained with a certain lighting pattern, it is possible to increase the possibility of acquiring the print quality information by changing the lighting pattern, which is more advantageous in obtaining and using the print quality information. Become.

また、「点灯パターン設定手段」により、複数の照明光源における点灯位置を設定し、その設定された点灯位置で点灯を行うように照明光源21を制御している。このようにすると、点灯位置の変更によって画像状態が変わりやすい場合(例えばダイレクトマーキングによって得られた情報コードを読み取る場合等)にデコード成功の可能性を効果的に高めることができ、このような場合により有利となる。   In addition, the “lighting pattern setting means” sets lighting positions in a plurality of illumination light sources, and controls the illumination light source 21 to perform lighting at the set lighting positions. In this case, the possibility of successful decoding can be effectively increased when the image state is easily changed by changing the lighting position (for example, when reading an information code obtained by direct marking). More advantageous.

また、「点灯パターン設定手段」により、複数色の照明光源21における点灯色を設定し、その設定された点灯色で点灯を行うように照明光源21を制御している。このようにすると、点灯色の変更によって画像状態が変わりやすい場合にデコード成功の可能性を効果的に高めることができ、このような読み取りの場合により有利となる。   Further, the “lighting pattern setting means” sets lighting colors in the illumination light sources 21 of a plurality of colors, and the illumination light source 21 is controlled so as to perform lighting with the set lighting colors. This makes it possible to effectively increase the possibility of successful decoding when the image state is easily changed by changing the lighting color, which is more advantageous for such reading.

また、過去得られた複数の印字品質情報を、各々の印字品質情報の取得の際に用いられた点灯パターンとそれぞれ対応付けてメモリ35に蓄積しておき、その蓄積される過去の点灯パターンを、新たな点灯パターンとして設定するようにしている。このようにすると、どの点灯パターンで過去どのような印字品質情報が得られたかを把握した上で点灯パターンを設定できるため、期待する印字品質を得られやすい点灯パターンを設定しやすくなる。   In addition, a plurality of print quality information obtained in the past is stored in the memory 35 in association with the lighting patterns used at the time of acquiring each print quality information, and the stored past lighting patterns are stored. The new lighting pattern is set. In this way, since it is possible to set the lighting pattern after grasping what kind of printing quality information has been obtained in the past with which lighting pattern, it becomes easy to set the lighting pattern that makes it easy to obtain the expected printing quality.

また、複数の過去の印字品質情報に対応付けられたそれぞれの点灯パターンを、それら複数の過去の印字品質情報の印字品質の良い順に順序化し、その順序で点灯を行うように照明光源21を制御している。このようにすると、より良好な印字品質が得られやすい点灯パターンを優先的に点灯を行うことができ、デコードが正常に行われる可能性の高い画像データをより迅速に取得できる。更に、このように順序化された各点灯パターンごとの画像データについてそれぞれデコード処理を行うようにしているため、情報コードについての正常な解読がより迅速に行われ、更には、正常に解読された画像データについての印字品質情報をより迅速に取得、利用できるようになる。   In addition, the lighting patterns associated with the plurality of past print quality information are ordered in the order of good print quality of the plurality of past print quality information, and the illumination light source 21 is controlled to perform lighting in that order. is doing. In this way, it is possible to preferentially turn on a lighting pattern in which better print quality is easily obtained, and it is possible to more quickly acquire image data that is likely to be decoded normally. In addition, since the image data for each lighting pattern thus ordered is decoded, the normal decoding of the information code is performed more quickly, and further the normal decoding is performed. Printing quality information about image data can be acquired and used more quickly.

また、順序化された各点灯パターンごとの画像データ全てについて読取不良が生じた場合、それら順序化された複数の点灯パターン以外の新規点灯パターンを設定している。このようにすると、過去蓄積された点灯パターンによって望ましい結果が得られなくても、それら以外の点灯パターンを新たに試すことができる。更に、その新規点灯パターンで点灯させて得られた画像データについてデコード処理が正常に行われた場合、その画像データについての印字品質情報をユーザに通知又は記録手段に記録するようにしている。このようにすると、次善策として新規点灯パターンを試行した上で、その新規点灯パターンについての結果をより有効に利用できるようになる。   Further, when a reading failure occurs for all the image data for each ordered lighting pattern, a new lighting pattern other than the plurality of ordered lighting patterns is set. In this way, even if a desired result cannot be obtained by the previously accumulated lighting patterns, other lighting patterns can be tried anew. Further, when the decoding process is normally performed on the image data obtained by lighting with the new lighting pattern, the print quality information about the image data is notified to the user or recorded in the recording means. If it does in this way, after trying a new lighting pattern as a next best measure, the result about the new lighting pattern can be used more effectively.

[他の実施形態]
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような実施形態も本発明の技術的範囲に含まれる。
[Other Embodiments]
The present invention is not limited to the embodiments described with reference to the above description and drawings. For example, the following embodiments are also included in the technical scope of the present invention.

上記第1〜第4実施形態では情報コードの例としてQRコードQを例示したが、複数の明色セル及び複数の暗色セルからなる情報コードであればこれに限られない。例えばバーコード等の一次元コードであってもよい。この場合、情報コードリーダ20を単一種類のコード(即ちバーコードのみ)を読み取るリーダとして機能させてもよく、複数種類のコード(即ち、バーコードと他種の情報コード)を共に読み取りうるリーダとして機能させてもよい。この場合には、例えばスタートキャラクタを構成する部分やストップキャラクタを構成する部分を「特定部分」とすることができる。
また、情報コードはデータマトリックス等の他の二次元コードであってもよい。この場合も同様であり、単一種類の情報コードのみを読み取る構成であってもよく、複数種類の情報コードを読み取りうる構成であってもよい。データマトリックス等を読み取る場合には例えばアライメントパターンを「特定部分」とすることができる。
In the first to fourth embodiments, the QR code Q is illustrated as an example of the information code. However, the information code is not limited to this as long as it is an information code including a plurality of bright cells and a plurality of dark cells. For example, it may be a one-dimensional code such as a barcode. In this case, the information code reader 20 may function as a reader that reads a single type of code (that is, only a barcode), or a reader that can read a plurality of types of codes (that is, a barcode and another type of information code) together. It may be made to function as. In this case, for example, the part constituting the start character and the part constituting the stop character can be set as the “specific part”.
The information code may be another two-dimensional code such as a data matrix. The same applies to this case, and only one type of information code may be read, or a plurality of types of information code may be read. When reading a data matrix or the like, for example, the alignment pattern can be a “specific portion”.

上記第1〜第4実施形態では、QRコードの「特定部分」として位置検出パターンを例示したが、これに限定されず、例えばタイミングパターンや位置合わせパターンを「特定部分」としてもよい。   In the first to fourth embodiments, the position detection pattern is exemplified as the “specific part” of the QR code. However, the present invention is not limited to this. For example, the timing pattern or the alignment pattern may be the “specific part”.

第1実施形態では、各位置検出パターンに配される明色セルの複数位置の輝度を抽出し、かつ各位置検出パターンに配される暗色セルの複数位置の輝度を抽出することで、各位置検出パターンの明色セル及び暗色セルの輝度をそれぞれ検出していたが、この方法に限られない。例えば、各位置検出パターンに配される明色セルの一位置(例えば中心位置)の輝度を抽出し、かつ各位置検出パターンに配される暗色セルの一位置(例えば中心位置)の輝度を抽出することで、各位置検出パターンの明色セル及び暗色セルの輝度をそれぞれ検出するようにしてもよい。   In the first embodiment, by extracting the luminance at a plurality of positions of bright color cells arranged in each position detection pattern and extracting the luminance at a plurality of positions of dark cells arranged in each position detection pattern, The brightness of the light color cell and the dark color cell of the detection pattern is detected, but the present invention is not limited to this method. For example, the luminance at one position (for example, the center position) of the light cell arranged in each position detection pattern is extracted, and the luminance at one position (for example, the center position) of the dark cell arranged in each position detection pattern is extracted. Thus, the brightness of the light color cell and the dark color cell of each position detection pattern may be detected.

第1実施形態では、「印字品質情報」として、閾値と、算出したコントラストと、の差からなる「余裕度」を例示したが、コントラストと基準情報とを反映して得られる情報であればこれに限定されない。例えば、3つの位置検出パターンのコントラストのばらつき度合いを示す値と、閾値と、に基づく印字品質情報を生成し、記憶又は通知するようにしてもよい。具体的には、S3にて検出される複数の位置検出パターンの各コントラスト(例えば上記C1,C2,C3)について最大値と最小値との差Cnを求め、予め定められた閾値Cm(基準情報)と、この差Cnとの差(Cm−Cn)を印字品質情報として記憶又は通知するようにしてもよい。この場合、コントラストのばらつきの程度を把握して有効利用できるようになる。   In the first embodiment, the “margin” that is the difference between the threshold value and the calculated contrast is exemplified as the “print quality information”. However, any information obtained by reflecting the contrast and the reference information may be used. It is not limited to. For example, print quality information based on a value indicating the degree of contrast variation of three position detection patterns and a threshold value may be generated, stored, or notified. Specifically, a difference Cn between the maximum value and the minimum value is obtained for each contrast (for example, C1, C2, C3) of the plurality of position detection patterns detected in S3, and a predetermined threshold Cm (reference information) is obtained. ) And the difference Cn (Cm−Cn) may be stored or notified as print quality information. In this case, the degree of contrast variation can be grasped and used effectively.

第2実施形態では、太さ状態値の一例を示したが、特定部分の太さ状態を示す値であれば、他の算出方法で算出されたものを太さ状態値としてもよい。一例としては、例えば、抽出された特定部分の全領域の面積に占める暗色部領域の割合、或いは、抽出された特定部分の全領域の面積に占める明色部領域の割合を太さ状態値を示す値としてもよい。即ち、QRコードの位置検出パターンなどに代表される特定部分は、正規の形状である場合、特定部分の全領域の面積に占める暗色部領域の割合が一定値となり、例えば暗色部が太りが生じていると、この割合が増加する傾向がある。そこで、このような割合を太さ状態値とすれば、特定部分の暗色部の太りの程度を定量的に示すことができる。   In the second embodiment, an example of the thickness state value is shown. However, as long as the value indicates the thickness state of the specific portion, the thickness state value may be calculated by another calculation method. As an example, for example, the ratio of the dark color area to the total area of the extracted specific part or the ratio of the light color area to the area of the extracted specific area is set to the thickness state value. It is good also as a value to show. That is, when the specific part represented by the QR code position detection pattern has a regular shape, the ratio of the dark color area to the total area of the specific part becomes a constant value. For example, the dark color part becomes fat. This ratio tends to increase. Therefore, if such a ratio is used as a thickness state value, the degree of thickening of the dark portion of the specific portion can be quantitatively indicated.

第3実施形態では、かすれ状態値の一例を示したが、特定部分のかすれ状態を示す値であれば、他の算出方法で算出されたものをかすれ状態値としてもよい。一例としては、例えば、抽出された特定部分の全領域の面積に占める暗色部領域の割合をかすれ状態値としてもよい。即ち、QRコードの位置検出パターンなどに代表される特定部分は、正規の形状である場合、特定部分の全領域の面積に占める暗色部領域の割合が一定値となり、暗色部がかすれているとこの割合が低下する傾向がある。そこで、このような割合をかすれ状態値とすれば、特定部分のかすれの程度を定量的に示すことができる。   In the third embodiment, an example of the fading state value is shown. However, as long as the value indicates the fading state of the specific portion, a value calculated by another calculation method may be used as the fading state value. As an example, for example, the ratio of the dark-colored portion area in the total area of the extracted specific portion may be used as the blurred state value. That is, if the specific portion represented by the QR code position detection pattern has a regular shape, the ratio of the dark color portion area to the total area of the specific portion is a constant value, and the dark color portion is blurred. This ratio tends to decrease. Therefore, if such a ratio is used as a blurred state value, the degree of blurring of a specific portion can be quantitatively indicated.

第1実施形態では、S3において位置検出パターンが検出され、検出数が3未満だった場合には、QRコードQの画像全体に対して画像処理を行っていたが、これに限られない。例えば、S7においてNoと判断されるような場合に、S10の画像処理において、検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行うようにしてもよい。そして、その後のS5又はS8においては、その画像処理がなされた後のデータ(画像処理済データ)について位置検出パターンのコントラストを算出し、このコントラスト(即ち、画像処理がなされた後の位置検出パターンのコントラスト)に基づいて余裕度(印字品質情報)を生成し、メモリ35に記憶したり、液晶表示器46等を用いてユーザに通知するように構成できる。
このように、このようにQRコードQ全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して行い、その画像処理後の位置検出パターンのコントラストを算出するようにすれば、画像処理の迅速化を図りつつ、画像処理後の位置検出パターンのコントラスト算出結果を利用できるようになる。
In the first embodiment, when the position detection pattern is detected in S3 and the number of detection is less than 3, the image processing is performed on the entire image of the QR code Q. However, the present invention is not limited to this. For example, when it is determined No in S7, the image processing is performed on the detected position detection pattern or on the detected position detection pattern and the quiet zone in the image processing of S10. May be. In subsequent S5 or S8, the contrast of the position detection pattern is calculated for the data after the image processing (image processed data), and this contrast (that is, the position detection pattern after the image processing is performed). The margin (print quality information) is generated on the basis of the (contrast) and stored in the memory 35 or notified to the user using the liquid crystal display 46 or the like.
In this way, the image processing is not performed on the entire QR code Q in this way, but the position detection pattern or the position detection pattern and the quiet zone are performed, and the contrast of the position detection pattern after the image processing is calculated. By doing so, it is possible to use the contrast calculation result of the position detection pattern after the image processing while speeding up the image processing.

第2実施形態では、S203における位置検出パターンの検出数が3未満だった場合には、QRコードQの画像全体に対して画像処理を行っていたが、これに限られない。例えば、S207においてNoと判断されるような場合に、S210の画像処理において、検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行うようにしてもよい。そして、その後のS205又はS208においては、その画像処理がなされた後のデータ(画像処理済データ)について、位置検出パターンの太さ状態値や、この太さ状態値(即ち、画像処理がなされた後の位置検出パターンの太さ状態値)に基づく判定値などを印字品質情報として生成し、メモリ35に記憶したり、液晶表示器46等を用いてユーザに通知するように構成できる。このようにQRコードQ全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して選択的に行うようにすれば、太さ状態値を得るために必要な領域に対して効率的に画像処理を行うことができ、画像処理を適切かつ迅速に行うことができる。更に、その画像処理がなされた後の位置検出パターンの太さ状態値に基づいて印字品質情報を生成し、当該印字品質情報を通知又は記録しているため、画像処理後の位置検出パターンの太さ状態値を有効利用できるようになる。   In the second embodiment, when the number of position detection patterns detected in S203 is less than 3, image processing is performed on the entire QR code Q image. However, the present invention is not limited to this. For example, when it is determined No in S207, the image processing is performed on the detected position detection pattern or on the detected position detection pattern and the quiet zone in the image processing of S210. May be. In subsequent S205 or S208, the thickness state value of the position detection pattern and the thickness state value (that is, image processing has been performed) on the data after the image processing (image processed data). A determination value or the like based on the subsequent position detection pattern thickness state value) is generated as print quality information and stored in the memory 35 or notified to the user using the liquid crystal display 46 or the like. Thus, if image processing is not performed on the entire QR code Q, but is selectively performed on the position detection pattern or the position detection pattern and the quiet zone, an area necessary for obtaining the thickness state value is obtained. Image processing can be performed efficiently, and image processing can be performed appropriately and quickly. Further, since the print quality information is generated based on the thickness state value of the position detection pattern after the image processing and the print quality information is notified or recorded, the thickness of the position detection pattern after the image processing is recorded. The state value can be used effectively.

第3実施形態では、S303における位置検出パターンの検出数が3未満だった場合に、QRコードQの画像全体に対して画像処理を行っていたが、これに限られない。例えば、S307においてNoと判断されるような場合に、S310の画像処理において、検出された位置検出パターンに対して、又はその検出された位置検出パターンとクワイエットゾーンに対して画像処理を行うようにしてもよい。そして、その後のS305又はS308においては、その画像処理がなされた後のデータ(画像処理済データ)について、位置検出パターンのかすれ状態値や、このかすれ状態値(即ち、画像処理がなされた後の位置検出パターンのかすれ状態値)に基づく判定値などを印字品質情報として生成し、メモリ35に記憶したり、液晶表示器46等を用いてユーザに通知するように構成できる。このようにQRコードQ全体に画像処理を行うのではなく、位置検出パターン、又は位置検出パターンとクワイエットゾーンに対して選択的に行うようにすれば、かすれ状態値を得るために必要な領域に対して効率的に画像処理を行うことができ、画像処理を適切かつ迅速に行うことができる。更に、その画像処理がなされた後の位置検出パターンのかすれ状態値に基づいて印字品質情報を生成し、当該印字品質情報を通知又は記録しているため、画像処理後の位置検出パターンのかすれ状態値を有効利用できるようになる。   In the third embodiment, when the number of position detection patterns detected in S303 is less than 3, image processing is performed on the entire QR code Q image. However, the present invention is not limited to this. For example, when it is determined No in S307, the image processing is performed on the detected position detection pattern or on the detected position detection pattern and the quiet zone in the image processing of S310. May be. In subsequent S305 or S308, the data after the image processing (image processed data) is applied to the blurred state value of the position detection pattern and the blurred state value (that is, after the image processing is performed). A determination value or the like based on the position detection pattern fading state value) is generated as print quality information and stored in the memory 35 or notified to the user using the liquid crystal display 46 or the like. Thus, if image processing is not performed on the entire QR code Q, but is selectively performed on the position detection pattern or the position detection pattern and the quiet zone, the area necessary for obtaining the blurred state value is obtained. On the other hand, image processing can be performed efficiently, and image processing can be performed appropriately and quickly. Further, since the print quality information is generated based on the blurred state value of the position detection pattern after the image processing is performed and the print quality information is notified or recorded, the blurred state of the position detection pattern after the image processing is performed. The value can be used effectively.

第4実施形態では、1回の解読処理において1つの点灯パターンを用いているが(即ち、1回の画像データの取得において1つの点灯パターンを用いているが)、1回の解読処理において複数の点灯パターンを切り替えて使用してもよい。なお、図18の中段の例は第4実施形態で説明した例についてのものであり、1回の解読処理において1つの点灯パターを用いた場合を示している。一方、図18の下段の例は、1回の解読処理において複数の点灯パターンを使用する例を示すものであり、受光センサ23の露光中に照明光源21の点灯パターンの切り替えている。この例では、「点灯パターン設定手段」として機能するメモリ35及び制御回路40によって複数の照明光源21a〜21dの各々の点灯時間を設定しており、制御回路40は、その設定された各々の点灯時間に対応した点灯を行うように照明光源21a〜21dを制御している。
具体的には、露光期間の前半に点灯パターンA(第1の照明光源21aのみを点灯させる点灯パターン)を用いて照明光源21による照射を行い、露光期間の後半に点灯パターンB(第2の照明光源21bのみを点灯させる点灯パターン)を用いて照明光源21による照射を行っている。なお、露光期間中に複数の点灯パターンを切り替えて使用する方法はこの方法に限られることはなく、例えば3以上の点灯パターンを切り替えて使用してもよい。
また、このような方法でも、図16のようなデータを用いて点灯の順序を設定でき、例えば、1回目のS402の解読処理では順序1,2の点灯パターンを用いて解読処理を行い、次に到来する2回目の解読処理では順序3、4の点灯パターンを用いて解読処理を行うといった方法が挙げられる。
このようにすると、点灯パターンを簡易且つ良好に切り替えることができると共に、短時間でより多くの点灯パターンを用いることができるようになる。また、単一の露光期間において複数の点灯パターンを複合的に使用でき、点灯のバリエーションを一層増加させることができる。
In the fourth embodiment, one lighting pattern is used in one decoding process (that is, one lighting pattern is used in one acquisition of image data). The lighting pattern may be switched and used. The middle example in FIG. 18 is for the example described in the fourth embodiment, and shows a case where one lighting pattern is used in one decoding process. On the other hand, the lower example in FIG. 18 shows an example in which a plurality of lighting patterns are used in one decoding process, and the lighting pattern of the illumination light source 21 is switched during the exposure of the light receiving sensor 23. In this example, the lighting time of each of the plurality of illumination light sources 21a to 21d is set by the memory 35 and the control circuit 40 functioning as “lighting pattern setting means”, and the control circuit 40 sets each of the set lightings. The illumination light sources 21a to 21d are controlled to perform lighting corresponding to time.
Specifically, irradiation with the illumination light source 21 is performed using the lighting pattern A (lighting pattern for turning on only the first illumination light source 21a) in the first half of the exposure period, and the lighting pattern B (second pattern) in the second half of the exposure period. Irradiation by the illumination light source 21 is performed using a lighting pattern that turns on only the illumination light source 21b. Note that the method of switching and using a plurality of lighting patterns during the exposure period is not limited to this method. For example, three or more lighting patterns may be switched and used.
Also in such a method, the lighting order can be set using data as shown in FIG. 16, for example, in the first decoding process of S402, the decoding process is performed using the lighting patterns of order 1 and 2, and the next In the second decoding process arriving at, there is a method of performing the decoding process using the lighting patterns of order 3 and 4.
In this way, the lighting patterns can be switched easily and satisfactorily, and more lighting patterns can be used in a short time. In addition, a plurality of lighting patterns can be used in combination in a single exposure period, and lighting variations can be further increased.

図1は本発明の光学情報読取装置の第1実施形態に係る情報コードリーダ20を概略的に例示するブロック図である。FIG. 1 is a block diagram schematically illustrating an information code reader 20 according to the first embodiment of the optical information reading apparatus of the present invention. 図2は評価処理の流れを例示するフローチャートである。FIG. 2 is a flowchart illustrating the flow of the evaluation process. 図3は、位置検出パターンにおけるコントラスト算出を説明する説明図である。FIG. 3 is an explanatory diagram for explaining the contrast calculation in the position detection pattern. 図4は、位置検出パターンの各セルにおける輝度抽出を説明する説明図である。FIG. 4 is an explanatory diagram illustrating luminance extraction in each cell of the position detection pattern. 図5(a)は、S6においてメモリに記憶されるデータ構成例を示す説明図であり、図5(b)は、S6及びS9においてメモリに記憶されるデータ構成例を示す説明図である。FIG. 5A is an explanatory diagram showing an example of the data configuration stored in the memory in S6, and FIG. 5B is an explanatory diagram showing an example of the data configuration stored in the memory in S6 and S9. 図6(a)画像処理前における情報コードの画像データを説明する説明図であり、図6(b)は図6(a)の画像データに画像処理を施した例を説明する説明図である。FIG. 6A is an explanatory diagram for explaining image data of an information code before image processing, and FIG. 6B is an explanatory diagram for explaining an example in which image processing is performed on the image data of FIG. 6A. . 図7は、第2実施形態で行われる評価処理の流れを例示するフローチャートである。FIG. 7 is a flowchart illustrating the flow of evaluation processing performed in the second embodiment. 図8は、位置検出パターンにおける太さ状態値の算出を説明する説明図である。FIG. 8 is an explanatory diagram for explaining the calculation of the thickness state value in the position detection pattern. 図9(a)は、S206においてメモリに記憶されるデータ構成例を示す説明図であり、図9(b)は、S206及びS209においてメモリに記憶されるデータ構成例を示す説明図である。FIG. 9A is an explanatory diagram illustrating an example of the data configuration stored in the memory in S206, and FIG. 9B is an explanatory diagram illustrating an example of the data configuration stored in the memory in S206 and S209. 図10は、第3実施形態で行われる評価処理の流れを例示するフローチャートである。FIG. 10 is a flowchart illustrating the flow of the evaluation process performed in the third embodiment. 図11は、位置検出パターンにおけるかすれ状態値の算出を説明する説明図である。FIG. 11 is an explanatory diagram for explaining the calculation of the blurred state value in the position detection pattern. 図12(a)は、S306においてメモリに記憶されるデータ構成例を示す説明図であり、図12(b)は、S306及びS309においてメモリに記憶されるデータ構成例を示す説明図である。12A is an explanatory diagram illustrating an example of a data configuration stored in the memory in S306, and FIG. 12B is an explanatory diagram illustrating an example of a data configuration stored in the memory in S306 and S309. 図13は、第4実施形態で行われる評価処理の流れを例示するフローチャートである。FIG. 13 is a flowchart illustrating the flow of evaluation processing performed in the fourth embodiment. 図14は、第4実施形態の情報コードリーダの内部を読取口側から見た図である。FIG. 14 is a view of the inside of the information code reader of the fourth embodiment as viewed from the reading port side. 図15は、点灯パターンの例を説明する説明図である。FIG. 15 is an explanatory diagram illustrating an example of a lighting pattern. 図16は、点灯パターンの設定データ例を説明する説明図である。FIG. 16 is an explanatory diagram for explaining an example of setting data of a lighting pattern. 図17(a)は、過去の対応データのデータ例を説明する説明図であり、図17(b)は、過去の対応データを順序化したデータ例を説明する説明図である。FIG. 17A is an explanatory diagram illustrating an example of past correspondence data, and FIG. 17B is an explanatory diagram illustrating an example of data obtained by ordering past correspondence data. 図18は、露光中に点灯パターンを切り替える方法を説明する説明図である。FIG. 18 is an explanatory diagram illustrating a method of switching the lighting pattern during exposure.

符号の説明Explanation of symbols

20…情報コードリーダ(光学的情報読取装置)
21…照明光源(照明手段)
23…受光センサ(受光手段)
35…メモリ(算出結果利用手段、点灯パターン設定手段)
40…制御回路(生成手段、デコード手段、特定部分検出手段、輝度検出手段、コントラスト算出手段、算出結果利用手段、画像処理手段、変更手段、太さ状態値算出手段、かすれ状態値算出手段、点灯パターン設定手段)
46…液晶表示器(算出結果利用手段)
Q…QRコード(情報コード)
20. Information code reader (optical information reader)
21 ... Illumination light source (illumination means)
23. Light receiving sensor (light receiving means)
35. Memory (calculation result utilization means, lighting pattern setting means)
40... Control circuit (generating means, decoding means, specific part detecting means, luminance detecting means, contrast calculating means, calculation result using means, image processing means, changing means, thickness state value calculating means, blurred state value calculating means, lighting Pattern setting means)
46 ... Liquid crystal display (calculation result utilization means)
Q ... QR code (information code)

Claims (40)

複数の明色セル及び複数の暗色セルからなる情報コードからの反射光を受光する受光手段と、
前記受光手段による受光結果に基づいて前記情報コードの画像データを生成する生成手段と、
前記生成手段にて生成された前記画像データに基づいてデコード処理を行うデコード手段と、
を備えた光学的情報読取装置であって、
前記受光手段による受光結果に基づき前記情報コードの一部を構成する特定部分を検出する特定部分検出手段と、
前記特定部分検出手段にて検出された前記特定部分における前記明色セル及び暗色セルの少なくともいずれかに基づき、前記特定部分の画像状態を示す評価値を、所定の評価方法に従って算出する算出手段と、
前記算出手段によって得られた前記評価値に基づき、当該評価値を反映して得られる前記情報コードの印字品質情報を、ユーザに通知又は記録手段に記録する算出結果利用手段と、
を備えたことを特徴とする光学的情報読取装置。
A light receiving means for receiving reflected light from an information code comprising a plurality of light-colored cells and a plurality of dark-colored cells;
Generating means for generating image data of the information code based on a light reception result by the light receiving means;
Decoding means for performing decoding processing based on the image data generated by the generating means;
An optical information reader comprising:
Specific part detecting means for detecting a specific part constituting a part of the information code based on a light reception result by the light receiving means;
Calculating means for calculating an evaluation value indicating an image state of the specific portion based on at least one of the light color cell and dark color cell in the specific portion detected by the specific portion detection means according to a predetermined evaluation method; ,
Based on the evaluation value obtained by the calculation means, the calculation result utilization means for notifying the user of the print quality information of the information code obtained by reflecting the evaluation value or recording it in the recording means;
An optical information reading apparatus comprising:
前記算出手段は、
前記特定部分検出手段にて検出された前記特定部分における前記明色セル及び前記暗色セルの輝度を求める輝度検出手段と、
前記輝度検出手段による検出結果に基づき、前記特定部分の前記評価値として当該特定部分のコントラストを算出するコントラスト算出手段と、
からなり、
前記算出結果利用手段は、
前記コントラスト算出手段にて算出された前記特定部分のコントラストと、当該コントラストを評価する上での基準となるコントラスト基準値と、を反映して得られる前記情報コードの前記印字品質情報を、ユーザに通知又は前記記録手段に記録することを特徴とする請求項1に記載の光学的情報読取装置。
The calculating means includes
Luminance detection means for determining the brightness of the light cell and the dark cell in the specific part detected by the specific part detection means;
Contrast calculation means for calculating the contrast of the specific part as the evaluation value of the specific part based on the detection result by the luminance detection means;
Consists of
The calculation result utilization means includes:
The print quality information of the information code obtained by reflecting the contrast of the specific portion calculated by the contrast calculation means and the contrast reference value that is a reference for evaluating the contrast, to the user The optical information reader according to claim 1, wherein the optical information reader is recorded in the notification or the recording unit.
前記コントラスト基準値は、予め定められた閾値であり、
前記算出結果利用手段は、前記コントラスト算出手段によって算出された前記特定部分のコントラストを前記閾値と比較し、前記特定部分のコントラストと前記閾値との差を前記印字品質情報として通知することを特徴とする請求項2に記載の光学的情報読取装置。
The contrast reference value is a predetermined threshold value,
The calculation result utilization unit compares the contrast of the specific part calculated by the contrast calculation unit with the threshold value, and notifies the difference between the contrast of the specific part and the threshold value as the print quality information. The optical information reader according to claim 2.
前記コントラスト算出手段は、
前記特定部分における前記明色セルの輝度をXとし、
前記特定部分における前記暗色セルの輝度をYとした場合に、以下の式、
(X−Y)/X
にて得られる値を前記特定部分のコントラストとして算出することを特徴とする請求項2又は請求項3に記載の光学的情報読取装置。
The contrast calculating means includes
The brightness of the light cell in the specific part is X,
When the luminance of the dark cell in the specific portion is Y, the following formula:
(XY) / X
4. The optical information reading apparatus according to claim 2, wherein the value obtained in (2) is calculated as a contrast of the specific part.
前記輝度検出手段は、
前記特定部分に配される前記明色セルの少なくとも一位置の輝度を抽出し、かつ前記特定部分に配される前記暗色セルの少なくとも一位置の輝度を抽出することで、前記特定部分の前記明色セル及び前記暗色セルの輝度をそれぞれ検出することを特徴とする請求項2から請求項4のいずれか一項に記載の光学的情報読取装置。
The luminance detecting means includes
The brightness of at least one position of the light color cell arranged in the specific portion is extracted, and the brightness of at least one position of the dark color cell arranged in the specific portion is extracted, thereby the light of the specific portion is extracted. The optical information reader according to any one of claims 2 to 4, wherein the luminance of each of the color cell and the dark cell is detected.
前記輝度検出手段は、
前記特定部分に配される、いずれかの前記明色セル及びいずれかの前記暗色セルの各々のセル内において、所定の中心位置及び当該中心位置を挟んだ両側位置の輝度をそれぞれ抽出し、
前記特定部分の前記明色セルの輝度を、単一明色セル内の前記中心位置及び前記両側位置での輝度抽出結果に基づいて検出し、
前記特定部分の前記暗色セルの輝度を、単一暗色セル内の前記中心位置及び前記両側位置での輝度抽出結果に基づいて検出することを特徴とする請求項2から請求項5のいずれかに記載の光学的情報読取装置。
The luminance detecting means includes
In each cell of any one of the light cells and any one of the dark cells arranged in the specific part, extract the luminance of a predetermined center position and both side positions sandwiching the center position, respectively.
Detecting the brightness of the light cell of the specific part based on the brightness extraction results at the center position and the both side positions in a single light cell;
6. The brightness of the dark cell in the specific portion is detected based on a brightness extraction result at the center position and the both side positions in a single dark cell. The optical information reading device described.
前記情報コードは、QRコードであり、
前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする請求項2から請求項6のいずれか一項に記載の光学的情報読取装置。
The information code is a QR code,
The optical information reader according to any one of claims 2 to 6, wherein the specific part detecting unit detects a position detection pattern of the QR code as the specific part.
前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、
前記コントラスト算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎にコントラストを算出し、
前記算出結果利用手段は、前記コントラスト算出手段にて算出された前記位置検出パターン毎のコントラストに基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする請求項7に記載の光学的情報読取装置。
The specific part detection means is configured to try to detect all the position detection patterns in the QR code,
The contrast calculation means calculates a contrast for each of the position detection patterns detected by the specific part detection means,
The calculation result utilization unit generates the print quality information based on the contrast for each position detection pattern calculated by the contrast calculation unit, and notifies or records the print quality information. Item 8. The optical information reader according to Item 7.
前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記コントラスト算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎にコントラストを算出し、
前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記コントラストの算出結果と、を対応付けて通知又は記録することを特徴とする請求項8に記載の光学的情報読取装置。
Image processing that performs one or more image processing on the image data of the QR code based on one or more predetermined processing settings when all the position detection patterns are not detected by the specific part detection unit With means,
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The contrast calculation means calculates a contrast for each position detection pattern in each image processed data corresponding to each processing setting,
The calculation result utilization means notifies or records each processing setting in association with the detection result of the position detection pattern and the calculation result of the contrast in each image processed data corresponding to each processing setting. The optical information reader according to claim 8, wherein
前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記コントラスト算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎にコントラストを算出し、
前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンのコントラストが最も大きくなる前記画像処理済データと、複数の前記位置検出パターンにおけるコントラストのばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、
前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする請求項8に記載の光学的情報読取装置。
Image processing means for performing a plurality of image processing on the image data of the QR code according to a plurality of predetermined processing settings;
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The contrast calculation means calculates a contrast for each position detection pattern in each image processed data corresponding to each processing setting,
The decoding means includes, among the plurality of image processed data, the image processed data in which the position detection pattern is detected most frequently, the image processed data in which the contrast of the position detection pattern is maximized, Each of the image-processed data with the smallest contrast variation in the position detection pattern, and a decoding process,
The calculation result utilization means selects the image processed data having the smallest number of error corrections from the plurality of image processed data subjected to the decoding process, and obtains the image processed data. 9. The optical information reader according to claim 8, wherein the setting is notified or recorded.
前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、
前記コントラスト算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンのコントラストを算出し、
前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンのコントラストに基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする請求項7又は請求項8に記載の光学的情報読取装置。
Image processing means for performing one or more image processing on the image data of the QR code based on one or more predetermined processing settings;
When the position detection pattern is detected by the specific part detection unit, the image processing unit is configured to detect the detected position detection pattern, or detect the detected position detection pattern and the quiet zone. Image processing,
The contrast calculating means calculates a contrast of the position detection pattern after the image processing by the image processing means;
The calculation result utilization unit generates the print quality information based on the contrast of the position detection pattern after the image processing is performed by the image processing unit, and notifies or records the print quality information. The optical information reading device according to claim 7 or 8.
前記算出手段は、前記特定部分の前記評価値として、当該特定部分における前記明色セル及び前記暗色セルの少なくともいずれかの太さ状態を定量化した値である太さ状態値を、所定の太さ状態値算出方法に従って算出する太さ状態値算出手段からなり、
前記算出結果利用手段は、前記太さ状態値算出手段にて算出された前記特定部分の前記太さ状態値に基づいて、前記太さ状態値を反映した前記印字品質情報を生成し、当該印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする請求項1に記載の光学的情報読取装置。
The calculation means uses a thickness state value, which is a value obtained by quantifying the thickness state of at least one of the light color cell and the dark color cell in the specific portion, as the evaluation value of the specific portion. The thickness state value calculating means for calculating according to the thickness state value calculating method,
The calculation result utilization unit generates the print quality information reflecting the thickness state value based on the thickness state value of the specific portion calculated by the thickness state value calculation unit, and performs the printing The optical information reading apparatus according to claim 1, wherein the quality information is notified to the user or recorded in the recording unit.
前記算出結果利用手段は、前記太さ状態値を評価する上での基準となる太さ基準値が予め定められており、前記太さ状態値算出手段によって算出された前記特定部分の前記太さ状態値と前記太さ基準値との差を示す値、又は前記太さ基準値に対する前記太さ状態値の割合を示す値を前記印字品質情報として通知することを特徴とする請求項12に記載の光学的情報読取装置。   In the calculation result utilization means, a thickness reference value serving as a reference for evaluating the thickness state value is determined in advance, and the thickness of the specific portion calculated by the thickness state value calculation means is determined. The value indicating a difference between the state value and the thickness reference value or a value indicating a ratio of the thickness state value to the thickness reference value is notified as the print quality information. Optical information reader. 前記太さ状態値算出手段は、
前記特定部分における前記明色セル及び前記暗色セルのいずれか一方の幅値をW1とし、他方の幅値をW2としたときの、W1とW2との加算値に対する一方の幅値W1の割合を示す値を、前記特定部分の前記太さ状態値として算出することを特徴とする請求項12又は請求項13に記載の光学的情報読取装置。
The thickness state value calculating means includes
The ratio of one width value W1 to the added value of W1 and W2 when the width value of one of the light color cell and the dark color cell in the specific portion is W1 and the other width value is W2. The optical information reading apparatus according to claim 12, wherein a value to be indicated is calculated as the thickness state value of the specific portion.
前記太さ状態値算出手段は、
前記特定部分に配される前記明色セルの1セル分の幅値と、前記特定部分に配される前記暗色セルの1セル分の幅値とを抽出し、前記明色セルの1セル分の幅値及び前記暗色セルの1セル分の幅値に基づいて前記太さ状態値を算出することを特徴とする請求項12から請求項14のいずれか一項に記載の光学的情報読取装置。
The thickness state value calculating means includes
A width value for one cell of the light color cell arranged in the specific portion and a width value for one cell of the dark color cell arranged in the specific portion are extracted, and one cell portion of the light color cell is extracted. 15. The optical information reading device according to claim 12, wherein the thickness state value is calculated based on a width value of the dark cell and a width value of one cell of the dark color cell. .
前記情報コードは、QRコードであり、
前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする請求項12から請求項15のいずれか一項に記載の光学的情報読取装置。
The information code is a QR code,
16. The optical information reading apparatus according to claim 12, wherein the specific part detection unit detects a position detection pattern of the QR code as the specific part.
前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、
前記太さ状態値算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎に前記太さ状態値を算出し、
前記算出結果利用手段は、前記太さ状態値算出手段にて算出された前記位置検出パターン毎の前記太さ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする請求項16に記載の光学的情報読取装置。
The specific part detection means is configured to try to detect all the position detection patterns in the QR code,
The thickness state value calculating unit calculates the thickness state value for each of the position detection patterns detected by the specific part detecting unit,
The calculation result utilization unit generates the print quality information based on the thickness state value for each of the position detection patterns calculated by the thickness state value calculation unit, and notifies or records the print quality information. The optical information reader according to claim 16, wherein the optical information reader is performed.
前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記太さ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記太さ状態値を算出し、
前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記太さ状態値の算出結果と、を対応付けて通知又は記録することを特徴とする請求項17に記載の光学的情報読取装置。
Image processing that performs one or more image processing on the image data of the QR code based on one or more predetermined processing settings when all the position detection patterns are not detected by the specific part detection unit With means,
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The thickness state value calculating means calculates the thickness state value for each position detection pattern in each image processed data corresponding to each processing setting,
The calculation result utilization unit notifies or records each processing setting in association with the detection result of the position detection pattern and the calculation result of the thickness state value in each image processed data corresponding to each processing setting. The optical information reader according to claim 17.
前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記太さ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記太さ状態値を算出し、
前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンの前記太さ状態値が最も適切値に近づく前記画像処理済データと、複数の前記位置検出パターンにおける前記太さ状態値のばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、
前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする請求項18に記載の光学的情報読取装置。
Image processing means for performing a plurality of image processing on the image data of the QR code according to a plurality of predetermined processing settings;
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The thickness state value calculating means calculates the thickness state value for each position detection pattern in each image processed data corresponding to each processing setting,
The decoding means includes: the image processed data in which the position detection pattern is detected most frequently among the plurality of image processed data; and the image in which the thickness state value of the position detection pattern is closest to an appropriate value. Each of the processed data and the image processed data with the smallest variation in the thickness state value in the plurality of position detection patterns is decoded,
The calculation result utilization means selects the image processed data having the smallest number of error corrections from the plurality of image processed data subjected to the decoding process, and obtains the image processed data. The optical information reading device according to claim 18, wherein the setting is notified or recorded.
前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、
前記太さ状態値算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記太さ状態値を算出し、
前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記太さ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする請求項16又は請求項17に記載の光学的情報読取装置。
Image processing means for performing one or more image processing on the image data of the QR code based on one or more predetermined processing settings;
When the position detection pattern is detected by the specific part detection unit, the image processing unit is configured to detect the detected position detection pattern, or detect the detected position detection pattern and the quiet zone. Image processing,
The thickness state value calculating unit calculates the thickness state value of the position detection pattern after the image processing is performed by the image processing unit,
The calculation result utilization unit generates the print quality information based on the thickness state value of the position detection pattern after the image processing is performed by the image processing unit, and notifies or records the print quality information. The optical information reading device according to claim 16 or claim 17, wherein:
前記算出手段は、前記特定部分の前記評価値として、当該特定部分のかすれ状態を定量化した値であるかすれ状態値を、所定のかすれ状態値算出方法に従って算出するかすれ状態値算出手段からなり、
前記算出結果利用手段は、前記かすれ状態値算出手段にて算出された前記特定部分の前記かすれ状態値に基づいて、当該かすれ状態値を反映した前記印字品質情報を生成し、当該印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする請求項1に記載の光学的情報読取装置。
The calculating means comprises a blurred state value calculating means for calculating a blurred state value that is a value obtained by quantifying the blurred state of the specific part as the evaluation value of the specific part, according to a predetermined blurred state value calculating method,
The calculation result utilization unit generates the print quality information reflecting the blur state value based on the blur state value of the specific portion calculated by the blur state value calculation unit, and uses the print quality information. The optical information reader according to claim 1, wherein the optical information reader is notified to a user or recorded in the recording unit.
前記算出結果利用手段は、前記かすれ状態値を評価する上での基準となるかすれ基準値が予め定められており、前記かすれ状態値算出手段によって算出された前記特定部分の前記かすれ状態値と前記かすれ基準値との差を示す値、又は前記かすれ基準値に対する前記かすれ状態値の割合を示す値を前記印字品質情報として通知することを特徴とする請求項21に記載の光学的情報読取装置。   The calculation result utilization unit has a predetermined blur reference value as a reference for evaluating the blur state value, and the blur state value of the specific portion calculated by the blur state value calculation unit and the The optical information reading apparatus according to claim 21, wherein a value indicating a difference from a blurred reference value or a value indicating a ratio of the blurred state value to the blurred reference value is notified as the print quality information. 前記かすれ状態値算出手段は、前記特定部分における前記暗色セル又は前記明色セルが連続して並ぶべき領域において暗色部と明色部とを抽出し、前記暗色部と前記明色部との配置割合を示す値を、前記特定部分の前記かすれ状態値として算出することを特徴とする請求項21又は請求項22に記載の光学的情報読取装置。   The faint state value calculating means extracts a dark color portion and a light color portion in a region where the dark color cell or the light color cell in the specific portion should be continuously arranged, and arrangement of the dark color portion and the light color portion 23. The optical information reading apparatus according to claim 21, wherein a value indicating a ratio is calculated as the blurred state value of the specific portion. 前記かすれ状態値算出手段は、前記暗色セル又は前記明色セルが連続して並ぶべき領域において、前記暗色部又は前記明色部が配される配置間隔と、前記暗色部又は前記明色部の幅値とを抽出し、前記配置間隔に対する前記暗色部又は前記明色部の幅値の割合を示す値を、前記特定部分の前記かすれ状態値として算出することを特徴とする請求項23に記載の光学的情報読取装置。   The faint state value calculating means includes an arrangement interval in which the dark color portion or the light color portion is arranged in an area where the dark color cell or the light color cell should be continuously arranged, and the dark color portion or the light color portion. The width value is extracted, and a value indicating a ratio of the width value of the dark color portion or the light color portion to the arrangement interval is calculated as the blurred state value of the specific portion. Optical information reader. 前記情報コードは、QRコードであり、
前記特定部分検出手段は、前記QRコードの位置検出パターンを前記特定部分として検出することを特徴とする請求項21から請求項24のいずれか一項に記載の光学的情報読取装置。
The information code is a QR code,
25. The optical information reading apparatus according to claim 21, wherein the specific part detection unit detects a position detection pattern of the QR code as the specific part.
前記特定部分検出手段は、前記QRコードにおける全ての前記位置検出パターンの検出を試みる構成をなし、
前記かすれ状態値算出手段は、前記特定部分検出手段にて検出された前記位置検出パターン毎に前記かすれ状態値を算出し、
前記算出結果利用手段は、前記かすれ状態値算出手段にて算出された前記位置検出パターン毎の前記かすれ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報の通知又は記録を行うことを特徴とする請求項25に記載の光学的情報読取装置。
The specific part detection means is configured to try to detect all the position detection patterns in the QR code,
The blurred state value calculating unit calculates the blurred state value for each of the position detection patterns detected by the specific part detecting unit,
The calculation result utilization unit generates the print quality information based on the blur state value for each position detection pattern calculated by the blur state value calculation unit, and notifies or records the print quality information. The optical information reading device according to claim 25.
前記特定部分検出手段により全ての位置検出パターンが検出されない場合に、前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記かすれ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記かすれ状態値を算出し、
前記算出結果利用手段は、各処理設定と、各処理設定に対応する各画像処理済データでの前記位置検出パターンの検出結果及び前記かすれ状態値の算出結果と、を対応付けて通知又は記録することを特徴とする請求項26に記載の光学的情報読取装置。
Image processing that performs one or more image processing on the image data of the QR code based on one or more predetermined processing settings when all the position detection patterns are not detected by the specific part detection unit With means,
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The blurred state value calculating means calculates the blurred state value for each position detection pattern in each image processed data corresponding to each processing setting,
The calculation result utilization means notifies or records each processing setting in association with the detection result of the position detection pattern and the calculation result of the blurred state value in each image processed data corresponding to each processing setting. 27. The optical information reading apparatus according to claim 26.
前記QRコードの前記画像データに対し、予め定められた複数の処理設定に従って複数の画像処理を行う画像処理手段を備え、
前記特定部分検出手段は、各処理設定に従って前記画像処理がなされた後の各画像処理済データに対して前記位置検出パターンの検出を再度試み、
前記かすれ状態値算出手段は、各処理設定に対応した各画像処理済データにおいて前記位置検出パターン毎に前記かすれ状態値を算出し、
前記デコード手段は、複数の前記画像処理済データのうち、前記位置検出パターンが最も多く検出される前記画像処理済データと、前記位置検出パターンの前記かすれ状態値が最も適切値に近づく前記画像処理済データと、複数の前記位置検出パターンにおける前記かすれ状態値のばらつきが最も小さくなる前記画像処理済データと、についてそれぞれデコード処理を行い、
前記算出結果利用手段は、前記デコード処理が行われた複数の前記画像処理済データの中から最も誤り訂正数が少ない前記画像処理済データを選択し、その画像処理済データを得るための前記処理設定を通知又は記録することを特徴とする請求項27に記載の光学的情報読取装置。
Image processing means for performing a plurality of image processing on the image data of the QR code according to a plurality of predetermined processing settings;
The specific part detecting means tries again the detection of the position detection pattern for each image processed data after the image processing is performed according to each processing setting,
The blurred state value calculating means calculates the blurred state value for each position detection pattern in each image processed data corresponding to each processing setting,
The decoding means includes: the image processed data in which the position detection pattern is detected most frequently among the plurality of image processed data; and the image processing in which the blur state value of the position detection pattern is closest to an appropriate value. Each of the processed data and the image-processed data with the smallest variation in the blurred state value in the plurality of position detection patterns,
The calculation result utilization means selects the image processed data having the smallest number of error corrections from the plurality of image processed data subjected to the decoding process, and obtains the image processed data. The optical information reading device according to claim 27, wherein the setting is notified or recorded.
前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記画像処理手段は、前記特定部分検出手段により前記位置検出パターンが検出された場合、その検出された前記位置検出パターンに対して、又はその検出された前記位置検出パターンとクワイエットゾーンに対して前記画像処理を行い、
前記かすれ状態値算出手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記かすれ状態値を算出し、
前記算出結果利用手段は、前記画像処理手段により前記画像処理がなされた後の前記位置検出パターンの前記かすれ状態値に基づいて前記印字品質情報を生成し、当該印字品質情報を通知又は記録することを特徴とする請求項25又は請求項26に記載の光学的情報読取装置。
Image processing means for performing one or more image processing on the image data of the QR code based on one or more predetermined processing settings;
When the position detection pattern is detected by the specific part detection unit, the image processing unit is configured to detect the detected position detection pattern, or detect the detected position detection pattern and the quiet zone. Image processing,
The blurred state value calculating unit calculates the blurred state value of the position detection pattern after the image processing is performed by the image processing unit,
The calculation result utilization unit generates the print quality information based on the blurred state value of the position detection pattern after the image processing is performed by the image processing unit, and notifies or records the print quality information. 27. The optical information reader according to claim 25 or claim 26.
前記QRコードの前記画像データに対し、予め定められた1又は複数の処理設定に基づいて1又は複数の画像処理を行う画像処理手段を備え、
前記算出結果利用手段は、前記処理設定に従って前記画像処理がなされた後の画像処理済データに対して前記位置検出パターンの検出又は前記デコード処理が行われたときに、「画像処理前よりも前記位置検出パターンの検出数が増加」、「画像処理前よりも誤り訂正数が減少」、「デコード処理が成功」、のいずれかに該当する場合にはその結果をユーザに通知することを特徴とする請求項9から請求項11、請求項18から請求項20、請求項27から請求項29のいずれか一項に記載の光学的情報読取装置。
Image processing means for performing one or more image processing on the image data of the QR code based on one or more predetermined processing settings;
When the position detection pattern is detected or the decoding process is performed on the image-processed data after the image processing is performed according to the processing setting, the calculation result utilization unit is If the number of detected position detection patterns increases, the number of error corrections decreases before image processing, or the decoding process succeeds, the result is notified to the user. An optical information reader according to any one of claims 9 to 11, 18 to 20, and 27 to 29.
前記画像処理手段は、前記画像データのダイナミックレンジを変更する変更手段を有することを特徴とする請求項9から請求項11、請求項18から請求項20、請求項27から請求項30のいずれか一項に記載の光学的情報読取装置。   The said image processing means has a change means to change the dynamic range of the said image data, The any one of Claims 9-11, Claims 18-20, and Claims 27-30 The optical information reader according to one item. 前記情報コードに向けて照明光を照射する照明手段と、
前記照明手段を制御する照明制御手段と、
前記照明手段の点灯パターンを設定する点灯パターン設定手段と、
を備え、
前記照明制御手段は、前記点灯パターン設定手段により設定された前記点灯パターンで点灯を行うように前記照明手段を制御することを特徴とする請求項1から請求項31のいずれか一項に記載の光学的情報読取装置。
Illumination means for irradiating illumination light toward the information code;
Illumination control means for controlling the illumination means;
Lighting pattern setting means for setting a lighting pattern of the illumination means;
With
The said illumination control means controls the said illumination means to perform lighting with the said lighting pattern set by the said lighting pattern setting means, The Claim 1 to Claim 31 characterized by the above-mentioned. Optical information reader.
前記生成手段は、前記点灯パターン設定手段により設定変更される各点灯パターンごとの前記受光結果に基づき、前記情報コードの前記画像データを各点灯パターンごとに生成し、
前記デコード手段は、各点灯パターンごとの前記画像データについてそれぞれ前記デコード処理を行う構成をなしており、
前記算出手段は、各点灯パターンごとの前記画像データのうち、前記デコード手段による前記デコード処理が正常に行われた前記画像データについて前記評価値を算出し、
前記算出結果利用手段は、その正常に行われた前記画像データについての前記評価値に基づいて得られる前記印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする請求項32に記載の光学的情報読取装置。
The generation means generates the image data of the information code for each lighting pattern based on the light reception result for each lighting pattern that is changed by the lighting pattern setting means,
The decoding means is configured to perform the decoding process for the image data for each lighting pattern,
The calculation means calculates the evaluation value for the image data in which the decoding process by the decoding means is normally performed among the image data for each lighting pattern,
The calculation result utilization unit notifies the user of the print quality information obtained based on the evaluation value of the image data that has been normally performed or records the print quality information on the recording unit. The optical information reading device described.
前記照明手段は、複数の照明光源を有してなり、
前記点灯パターン設定手段は、少なくともそれら複数の照明光源における点灯位置を設定し、
前記照明制御手段は、前記点灯パターン設定手段によって設定された前記点灯位置で点灯を行うように前記照明手段を制御することを特徴とする請求項32又は請求項33に記載の光学的情報読取装置。
The illumination means includes a plurality of illumination light sources,
The lighting pattern setting means sets at least lighting positions in the plurality of illumination light sources,
34. The optical information reader according to claim 32 or 33, wherein the illumination control unit controls the illumination unit to perform lighting at the lighting position set by the lighting pattern setting unit. .
前記照明手段は、複数色の発光部を有してなり、
前記点灯パターン設定手段は、少なくともそれら複数色の発光部における点灯色を設定し、
前記照明制御手段は、前記点灯パターン設定手段によって設定された前記点灯色で点灯を行うように前記照明手段を制御することを特徴とする請求項32から請求項34のいずれか一項に記載の光学的情報読取装置。
The illuminating means has a plurality of color light emitting portions,
The lighting pattern setting means sets at least lighting colors in the light emitting portions of the plurality of colors,
The said illumination control means controls the said illumination means so that it lights with the said lighting color set by the said lighting pattern setting means, The Claim 31 to 34 characterized by the above-mentioned. Optical information reader.
前記照明手段は、複数の照明光源を有してなり、
前記点灯パターン設定手段は、それら複数の照明光源の各々の点灯時間を設定し、
前記照明制御手段は、前記点灯パターン設定手段によって設定された複数の前記照明光源の各々の点灯時間に対応した点灯を行うように前記照明手段を制御することを特徴とする請求項32から請求項35のいずれか一項に記載の光学的情報読取装置。
The illumination means includes a plurality of illumination light sources,
The lighting pattern setting means sets the lighting time of each of the plurality of illumination light sources,
The lighting control unit controls the lighting unit to perform lighting corresponding to the lighting time of each of the plurality of illumination light sources set by the lighting pattern setting unit. 36. The optical information reading device according to any one of 35.
前記照明制御手段は、前記受光手段の露光中に前記照明手段の前記点灯パターンの切り替えを行うことを特徴とする請求項32から請求項36のいずれか一項に記載の光学的情報読取装置。   37. The optical information reader according to claim 32, wherein the illumination control unit switches the lighting pattern of the illumination unit during exposure of the light receiving unit. 前記算出結果利用手段は、過去得られた複数の前記印字品質情報を、各々の前記印字品質情報の取得の際に用いられた前記点灯パターンとそれぞれ対応付けて前記記憶手段に蓄積する構成をなしており、
前記点灯パターン設定手段は、前記記憶手段に蓄積される過去の前記印字品質情報に対応付けられた過去の前記点灯パターンを、前記照明手段に用いる新たな前記点灯パターンとして設定することを特徴とする請求項32から請求項37のいずれか一項に記載の光学的情報読取装置。
The calculation result utilization unit is configured to store a plurality of print quality information obtained in the past in the storage unit in association with the lighting patterns used when acquiring the print quality information. And
The lighting pattern setting unit sets the past lighting pattern associated with the past print quality information stored in the storage unit as a new lighting pattern used for the lighting unit. The optical information reading device according to any one of claims 32 to 37.
前記点灯パターン設定手段は、前記記憶手段に蓄積される複数の過去の前記印字品質情報に対応付けられたそれぞれの前記点灯パターンを、それら複数の過去の前記印字品質情報の印字品質の良い順に順序化し、
前記照明制御手段は、前記点灯パターン設定手段によって順序化された前記点灯パターンの順序で点灯を行うように前記照明手段を制御し、
前記デコード手段は、それら順序化された各点灯パターンごとの前記画像データについて前記デコード処理を行うことを特徴とする請求項38に記載の光学的情報読取装置。
The lighting pattern setting means sequentially orders the lighting patterns associated with a plurality of past print quality information accumulated in the storage means in order of good print quality of the plurality of past print quality information. And
The illumination control means controls the illumination means to perform lighting in the order of the lighting patterns ordered by the lighting pattern setting means,
39. The optical information reading apparatus according to claim 38, wherein the decoding unit performs the decoding process on the image data for each of the ordered lighting patterns.
前記点灯パターン設定手段は、当該点灯パターン設定手段により順序化された各点灯パターンごとの前記画像データについてそれぞれ前記デコード手段により前記デコード処理を行ったときに、それら各点灯パターンごとの前記画像データ全てについて読取不良が生じた場合、それら順序化された複数の前記点灯パターン以外の前記点灯パターンを新規点灯パターンとして設定し、
前記デコード手段は、前記照明手段を前記新規点灯パターンで点灯させて得られた前記画像データについて前記デコード処理を行い、
前記算出手段は、前記新規点灯パターンで点灯させて得られた前記画像データについての前記デコード処理が正常に行われた場合、当該画像データについて前記評価値を算出し、 前記算出結果利用手段は、その正常に行われた前記画像データについての前記評価値に基づいて得られる前記印字品質情報をユーザに通知又は前記記録手段に記録することを特徴とする請求項39に記載の光学的情報読取装置。
The lighting pattern setting means, when the decoding process is performed by the decoding means for the image data for each lighting pattern ordered by the lighting pattern setting means, all the image data for each lighting pattern. When a reading failure occurs, the lighting pattern other than the ordered lighting patterns is set as a new lighting pattern,
The decoding means performs the decoding process on the image data obtained by lighting the illumination means with the new lighting pattern,
The calculation means calculates the evaluation value for the image data when the decoding process is normally performed on the image data obtained by lighting with the new lighting pattern, and the calculation result utilization means includes: 40. The optical information reading apparatus according to claim 39, wherein the print quality information obtained based on the evaluation value of the image data performed normally is notified to a user or recorded in the recording means. .
JP2008156841A 2007-12-20 2008-06-16 Optical information reader Expired - Fee Related JP5007960B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008156841A JP5007960B2 (en) 2007-12-20 2008-06-16 Optical information reader

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007328332 2007-12-20
JP2007328332 2007-12-20
JP2008156841A JP5007960B2 (en) 2007-12-20 2008-06-16 Optical information reader

Publications (2)

Publication Number Publication Date
JP2009169931A true JP2009169931A (en) 2009-07-30
JP5007960B2 JP5007960B2 (en) 2012-08-22

Family

ID=40970979

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008156841A Expired - Fee Related JP5007960B2 (en) 2007-12-20 2008-06-16 Optical information reader

Country Status (1)

Country Link
JP (1) JP5007960B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076519A (en) * 2009-10-01 2011-04-14 Keyence Corp Imaging condition setting device and imaging condition setting method of optical information reader
JP7553823B2 (en) 2021-08-20 2024-09-19 株式会社デンソーウェーブ Information code reader
US12118428B2 (en) 2022-08-25 2024-10-15 Omron Corporation Using distance sensor delta to determine when to enter presentation mode
JP7582401B2 (en) 2022-08-25 2024-11-13 オムロン株式会社 Scanning device that utilizes distinct light pattern sequences based on the measured distance to the scanned object

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184449A (en) * 1999-12-22 2001-07-06 Denso Corp Lens adjusting device for optical information reader
JP2004054645A (en) * 2002-07-19 2004-02-19 Keyence Corp Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium
JP2004078896A (en) * 2002-06-18 2004-03-11 Omron Corp Method and device for reading optical information code
JP2004110668A (en) * 2002-09-20 2004-04-08 Denso Wave Inc Optical information reader
JP2004206687A (en) * 2002-12-10 2004-07-22 Omron Corp Optical code reading method and device
JP2005018391A (en) * 2003-06-26 2005-01-20 Casio Comput Co Ltd Code reader and program
JP2006338193A (en) * 2005-05-31 2006-12-14 Hitachi Global Storage Technologies Netherlands Bv Two-dimensional code evaluation program, two-dimensional code evaluation data processing method, and two-dimensional code evaluation apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184449A (en) * 1999-12-22 2001-07-06 Denso Corp Lens adjusting device for optical information reader
JP2004078896A (en) * 2002-06-18 2004-03-11 Omron Corp Method and device for reading optical information code
JP2004054645A (en) * 2002-07-19 2004-02-19 Keyence Corp Two-dimensional code reader, two-dimensional code reading method, two-dimensional code reading program and computer-readable recording medium
JP2004110668A (en) * 2002-09-20 2004-04-08 Denso Wave Inc Optical information reader
JP2004206687A (en) * 2002-12-10 2004-07-22 Omron Corp Optical code reading method and device
JP2005018391A (en) * 2003-06-26 2005-01-20 Casio Comput Co Ltd Code reader and program
JP2006338193A (en) * 2005-05-31 2006-12-14 Hitachi Global Storage Technologies Netherlands Bv Two-dimensional code evaluation program, two-dimensional code evaluation data processing method, and two-dimensional code evaluation apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076519A (en) * 2009-10-01 2011-04-14 Keyence Corp Imaging condition setting device and imaging condition setting method of optical information reader
JP7553823B2 (en) 2021-08-20 2024-09-19 株式会社デンソーウェーブ Information code reader
US12118428B2 (en) 2022-08-25 2024-10-15 Omron Corporation Using distance sensor delta to determine when to enter presentation mode
JP7582401B2 (en) 2022-08-25 2024-11-13 オムロン株式会社 Scanning device that utilizes distinct light pattern sequences based on the measured distance to the scanned object

Also Published As

Publication number Publication date
JP5007960B2 (en) 2012-08-22

Similar Documents

Publication Publication Date Title
US10311274B2 (en) Reader for optical indicia presented under two or more imaging conditions within a single frame time
CN105740746B (en) Visual feedback for code readers
JP5018382B2 (en) Two-dimensional code and its reading device
JP5007960B2 (en) Optical information reader
JP6624318B2 (en) Optical information reader
JP5904077B2 (en) Information code and information code reading system
JP4058478B2 (en) Optical information reading method
JP2008134989A (en) Information code, information code reader, and information code reading method
JP5104557B2 (en) Optical information reader
JP2021015489A (en) Image analysis device, image analysis system, image analysis method and image analysis program
JP2011008574A (en) Optical information reader
JP5780192B2 (en) Information code reader
JP2010182057A (en) Optical information reading device
JP5293853B1 (en) Bar code reader
JP4175358B2 (en) Optical information reader
JP5240124B2 (en) Optical information reader
JP5282559B2 (en) Information code reader
JP2006134303A (en) Optical information reader
JP4378491B2 (en) Code image output device
JP4466522B2 (en) Optical information reader
JP5724771B2 (en) Optical information reader
JP4650138B2 (en) Optical information reader
JP2014071719A (en) Bar code reader
US20240193388A1 (en) Barcode with Built-in Chemical Indicators
JP2019046330A (en) Optical type information reading device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120412

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120507

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

R150 Certificate of patent or registration of utility model

Ref document number: 5007960

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120520

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150608

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150608

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees