JP5240161B2 - Optical information reader - Google Patents

Optical information reader Download PDF

Info

Publication number
JP5240161B2
JP5240161B2 JP2009252801A JP2009252801A JP5240161B2 JP 5240161 B2 JP5240161 B2 JP 5240161B2 JP 2009252801 A JP2009252801 A JP 2009252801A JP 2009252801 A JP2009252801 A JP 2009252801A JP 5240161 B2 JP5240161 B2 JP 5240161B2
Authority
JP
Japan
Prior art keywords
width value
group
value
width
normal
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.)
Expired - Fee Related
Application number
JP2009252801A
Other languages
Japanese (ja)
Other versions
JP2011100192A (en
Inventor
学 神坂
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 JP2009252801A priority Critical patent/JP5240161B2/en
Publication of JP2011100192A publication Critical patent/JP2011100192A/en
Application granted granted Critical
Publication of JP5240161B2 publication Critical patent/JP5240161B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、バーコードの読み取りを行う光学的情報読取装置に関するものである。   The present invention relates to an optical information reading apparatus that reads a barcode.

従来、バーコードの読み取りを行う光学的情報読取装置として、例えば、下記特許文献1に示すバーコード読み取り装置が知られている。この特許文献1のバーコード読み取り装置は、バーコードからの反射光を電気信号に変換する光電変換手段と、この光電変換手段で生成される電気信号から白及び黒の変換点を検出する変換点検出手段とを有しており、検出された複数の変換点に基づいてバーコードを読み取っている。そして、変換点検出手段にて検出される複数の変換点から、白及び黒の変換点と共にフレネル回折の影響により誤って検出される可能性のある変換点の真偽を判別手段により判別し、判別された偽の変換点を補正手段により真の変換点に補正している。   2. Description of the Related Art Conventionally, as an optical information reading device that reads a barcode, for example, a barcode reading device disclosed in Patent Document 1 below is known. The bar code reading apparatus disclosed in Patent Document 1 includes photoelectric conversion means for converting reflected light from a bar code into an electric signal, and conversion inspection for detecting white and black conversion points from the electric signal generated by the photoelectric conversion means. And a bar code is read based on a plurality of detected conversion points. Then, from the plurality of conversion points detected by the conversion point detection means, the determination means determines the truth of the conversion points that may be erroneously detected due to the influence of Fresnel diffraction along with the white and black conversion points, The determined false conversion point is corrected to a true conversion point by the correcting means.

また、下記特許文献2には、1つのキャラクタを構成するモジュールの数が固定されているバーコード体系のバーコードシンボルの復号方式に関する技術が記載されている。この復号方式では、まず、バー幅検出手段により検出されたバーコードシンボルの各バーのバー幅をモジュールに分類するための閾値を閾値設定手段によりキャラクタ毎に設定する。そして、基準値設定手段によりバーのそれぞれに対する基準値をキャラクタ毎に設定し、誤差算出手段により基準値に対するバーのそれぞれの誤差を算出する。さらに、補正値算出手段により、誤差算出手段により算出された(i−1)番目のキャラクタにおけるバー幅の誤差と、(i−1)番目のキャラクタで用いた補正値との平均値を、i番目のキャラクタの補正値として算出し、この補正値を用いてバーをそれぞれモジュールに分類して、その組み合わせによって復号手段によりバーコードシンボルを復号している。   Patent Document 2 below describes a technique related to a barcode symbol decoding method of a barcode system in which the number of modules constituting one character is fixed. In this decoding method, first, a threshold for classifying the bar width of each bar of the barcode symbol detected by the bar width detecting means into modules is set for each character by the threshold setting means. Then, a reference value for each bar is set for each character by the reference value setting means, and each error of the bar with respect to the reference value is calculated by the error calculation means. Further, the correction value calculating means calculates the average value of the error of the bar width in the (i-1) th character calculated by the error calculating means and the correction value used in the (i-1) th character as i. The correction value is calculated as the correction value of the second character, the bars are classified into modules using the correction value, and the barcode symbol is decoded by the decoding means based on the combination.

また、下記特許文献3には、バーコードのスペースの幅値のバラツキを小さくするようにこの幅値を操作してデコードするバーコード読み取り装置が記載されている。このバーコード読み取り装置では、まず、スペース幅をいくつかの小さな区間に分け、読み込んだ順序ごとにどの区間に属するかを探し、所属区間に累積して、各区間のスペースの本数を数える。次に、データ数が極大となる区間のスペース幅の値を求め、そのスペース幅の値を中心として±A%の範囲内にある全てのデータを1つのグループとする。そして、1つのグループ内にあるデータをこのグループで中心としたスペース幅の値に全て置き換え、この置き換えたデータを基にデコードしている。   Patent Document 3 below describes a barcode reading apparatus that manipulates and decodes the width value so as to reduce the variation in the width value of the barcode space. In this barcode reading apparatus, first, the space width is divided into several small sections, the sections belonging to each section are searched for, and accumulated in the belonging sections to count the number of spaces in each section. Next, the value of the space width of the section in which the number of data is maximized is obtained, and all the data within the range of ± A% centering on the value of the space width is taken as one group. Then, all the data in one group is replaced with a space width value centered in this group, and decoding is performed based on the replaced data.

特開平11−96284号公報Japanese Patent Laid-Open No. 11-96284 特開平9−6885号公報JP-A-9-6885 特開平3−206582号公報Japanese Patent Laid-Open No. 3-206582

ところで、例えば、印刷機の不良などにより対象物にバーコードが滲んだり擦れたりして印字されてしまうことがある。このため、一部のバー幅が本来の幅値よりも太くなるようにバーコードに滲みが生じて印刷されたり、一部のバー幅が本来の幅値よりも細くなるようにバーコードに擦れが生じて印刷されてしまう場合がある。このような印刷ムラが生じたバーコードを読み取る場合には、上述のように本来の幅値に対して変化したバー幅が誤読されてデコード処理に不具合が生じやすいといった問題があった。   By the way, for example, a barcode may be smeared or rubbed on an object due to a defective printing machine or the like. For this reason, the barcode is blurred and printed so that some bar widths are thicker than the original width value, or rubbed against the barcode so that some bar widths are thinner than the original width value. May occur and be printed. When reading a barcode with such printing unevenness, there has been a problem that the bar width changed with respect to the original width value is misread as described above, and the decoding process is likely to be defective.

また、上記特許文献1は、バーコードから反射された反射光の信号のうち、フレネル回折の影響によって誤って検出された信号を補正することはできるものの、印字されたバーコードのバー幅自体の太りや細りを本来の幅値に補正することができなかった。   Moreover, although the said patent document 1 can correct | amend the signal detected accidentally by the influence of Fresnel diffraction among the signals of the reflected light reflected from the barcode, it is the barcode width itself of the printed barcode. It was not possible to correct fatness or thinness to the original width value.

そして、上記特許文献2は、1つのキャラクタを構成するモジュールの数が固定されているバーコードについては補正することができるものの、1つのキャラクタを構成するモジュール数が固定でないバーコードではバーの太りや細りを補正することができないという問題があった。   The above-mentioned patent document 2 can correct a barcode in which the number of modules constituting one character is fixed, but it is thick in a barcode in which the number of modules constituting one character is not fixed. There was a problem that it was not possible to correct the thinness.

さらに、上記特許文献3では、バーコードのスペースの幅値をいくつかのグループに分け、その全てのグループの各最頻値を用いて補正しているが、本来の幅値とはかけ離れた幅値(すなわち異常な幅値)で構成されたグループが存在していても、そのグループの最頻値も正常であるとして補正に用いるため、読取精度が低下してしまう虞があった。   Further, in Patent Document 3, the width value of the bar code space is divided into several groups and corrected using the mode values of all the groups, but the width is far from the original width value. Even if there is a group composed of values (that is, an abnormal width value), since the mode value of the group is normal and used for correction, there is a possibility that the reading accuracy may be lowered.

本発明は、上述した課題を解決するためになされたものであり、その目的とするところは、読取精度の低下を抑制し得る光学的情報読取装置を提供することにある。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide an optical information reading apparatus capable of suppressing a decrease in reading accuracy.

上記目的を達成するため、特許請求の範囲に記載の請求項1の光学的情報読取装置では、1または2以上の単位モジュールからなる暗色系および明色系の各領域が複数配列されて構成されるキャラクタを複数有するバーコードを読み取り可能な光学的情報読取装置であって、前記バーコードからの反射光を受光する受光手段と、前記受光手段から出力される受光信号に基づいて前記各領域の幅値をそれぞれ演算する幅値演算手段と、前記各幅値に基づいて前記各キャラクタをデコードするデコード手段と、前記各領域のうち前記幅値が近似する領域のみから構成される集団を複数作成する集団作成手段と、前記集団作成手段により作成された各集団のうち、前記各領域の総数が前記バーコードを構成する同一幅値の領域の総数とみなされる所定数以上の集団を正常幅値集団と判定し、前記各領域の総数が前記所定数未満の集団を少数幅値集団と判定する第1判定手段と、前記各少数幅値集団のうち、前記各正常幅値集団の前記各領域の幅値との差に基づいて異常な幅値と判断される領域で構成される集団を異常幅値集団と判定する第2判定手段と、前記異常幅値集団を構成する前記各領域の幅値を、前記各正常幅値集団の少なくともいずれか1つを構成する前記各領域の幅値との差に基づいて補正する補正手段と、を備え、前記デコード手段は、前記幅値演算手段により演算された前記各領域の前記幅値に基づく前記キャラクタのデコードが失敗した場合に、前記補正手段により補正した補正幅値を用いて再デコードすることを特徴とする。   In order to achieve the above object, the optical information reading apparatus according to claim 1 described in the claims is configured by arranging a plurality of dark color systems and light color systems each including one or more unit modules. An optical information reader capable of reading a barcode having a plurality of characters, a light receiving means for receiving reflected light from the barcode, and a light receiving signal output from the light receiving means A plurality of groups composed only of width value calculating means for calculating the width value, decoding means for decoding the characters based on the width values, and areas where the width values are approximated among the areas are created. And the group creation means, and among the groups created by the group creation means, the total number of the areas is regarded as the total number of areas of the same width value constituting the barcode. A group having a number equal to or greater than a normal width value group, and a first determination unit that determines a group having a total number of each region less than the predetermined number as a minority width value group; Second determination means for determining, as the abnormal width value group, a group composed of regions determined to be abnormal width values based on a difference between the width value of each region of the normal width value group, and the abnormal width value group Correction means for correcting a width value of each region constituting the image based on a difference from a width value of each region constituting at least one of the respective normal width value groups, and the decoding means Is characterized in that, when decoding of the character based on the width value of each area calculated by the width value calculation means fails, re-decoding is performed using the correction width value corrected by the correction means. .

請求項2の発明は、請求項1に記載の光学的情報読取装置において、前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、前記各正常幅値集団の少なくともいずれか1つを構成する前記各領域の平均幅値との差に基づいて補正することを特徴とする。   According to a second aspect of the present invention, in the optical information reading apparatus according to the first aspect, the correction means determines the width value of each region constituting the abnormal width value group as at least one of the normal width value groups. Correction is performed based on a difference from an average width value of each of the regions constituting one of them.

請求項3の発明は、請求項1または2に記載の光学的情報読取装置において、前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、当該幅値との差が小さい平均幅値の領域から構成される正常幅値集団であって、当該幅値よりも小さい平均幅値の正常幅値集団である第1正常幅値集団と当該幅値よりも大きい平均幅値の正常幅値集団である第2正常幅値集団が存在し、これら第1正常幅値集団および第2正常幅値集団の平均幅値を第1平均幅値および第2平均幅値とするとき、前記第2平均幅値との差よりも前記第1平均幅値との差が小さい場合に当該第1平均幅値に等しくなるように補正し、前記第1平均幅値との差よりも前記第2平均幅値との差が小さい場合に当該第2平均幅値に等しくなるように補正することを特徴とする。   According to a third aspect of the present invention, in the optical information reading device according to the first or second aspect, the correction means determines the width value of each region constituting the abnormal width value group by a difference from the width value. A normal width value group composed of regions having a small average width value, and a first normal width value group that is a normal width value group having an average width value smaller than the width value and an average width value larger than the width value When there is a second normal width value group that is a normal width value group, and the average width values of the first normal width value group and the second normal width value group are the first average width value and the second average width value. When the difference from the first average width value is smaller than the difference from the second average width value, the correction is made to be equal to the first average width value, and the difference from the first average width value is larger than the difference from the first average width value. When the difference from the second average width value is small, the correction is made to be equal to the second average width value. That.

請求項4の発明は、請求項3に記載の光学的情報読取装置において、前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、当該幅値に対して前記第1正常幅値集団および前記第2正常幅値集団のいずれか一方のみが存在する場合には、存在する一方の正常幅値集団の平均幅値と、この平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて補正することを特徴とする。   According to a fourth aspect of the present invention, in the optical information reading apparatus according to the third aspect, the correction means sets the width value of each region constituting the abnormal width value group to the first value with respect to the width value. When only one of the normal width value group and the second normal width value group exists, the average width value of the one normal width value group that exists and the other normal value in which the difference between the average width value is small Correction is performed based on the average width value of the width value group.

請求項5の発明は、請求項3に記載の光学的情報読取装置において、前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、当該幅値に対する前記第1平均幅値の差と当該幅値に対する前記第2平均幅値の差とが近似する場合には、当該幅値の領域を含むキャラクタの規定幅値と、当該キャラクタに含まれる他の領域の幅値とに基づいて補正することを特徴とする。   According to a fifth aspect of the present invention, in the optical information reading device according to the third aspect, the correction means determines the width value of each region constituting the abnormal width value group as the first average width with respect to the width value. If the difference between the values and the difference between the second average width value and the width value are approximate, the specified width value of the character including the width value area and the width values of the other areas included in the character It corrects based on this.

請求項1の発明では、デコードに失敗すると、演算された幅値が近似する領域のみから構成される集団が集団作成手段により複数作成される。さらに、第1判定手段により、集団作成手段により作成された各集団のうち、各領域の総数がバーコードを構成する同一幅値の領域の総数とみなされる所定数以上の集団が正常幅値集団と判定され、各領域の総数が所定数未満の集団が少数幅値集団と判定される。また、第2判定手段により、各少数幅値集団のうち、各正常幅値集団の各領域の幅値との差に基づいて異常な幅値と判断される領域で構成される集団が異常幅値集団と判定される。そして、異常幅値集団を構成する各領域の幅値が、各正常幅値集団の少なくともいずれか1つを構成する各領域の幅値との差に基づいて補正手段により補正され、この補正された補正幅値を用いてデコード手段により再デコードされる。   According to the first aspect of the present invention, if decoding fails, a plurality of groups composed only of regions where the calculated width values are approximated are created by the group creating means. Further, among the groups created by the group creation unit by the first determination unit, a group having a predetermined number or more in which the total number of each region is regarded as the total number of the same width value regions constituting the barcode is a normal width value group And a group in which the total number of each region is less than a predetermined number is determined as a minority width value group. Further, among the minority width value groups, a group composed of areas determined to be abnormal width values based on a difference from the width value of each area of each normal width value group by the second determination unit is an abnormal width. Judged as a value group. Then, the width value of each area constituting the abnormal width value group is corrected by the correcting means based on the difference from the width value of each area constituting at least one of the respective normal width value groups. Re-decoding is performed by the decoding means using the corrected width value.

これにより、印刷ムラ等により本来の幅値が変化した領域(以下、異常領域という)を含むバーコードのデコードに失敗した場合には、上記異常領域はその幅値に近似する幅値の領域が少ないことから異常幅値集団に含まれて、正常幅値集団の各領域の幅値との差に基づいて補正される。これにより、印刷ムラ等により変化した幅値が本来の幅値に適正に補正されて、読取精度の低下を抑制することができる。
また、本発明では、暗色系および明色系の各領域の幅値の総数に関わらず、各幅値のみを相対的に比較することで異常領域の幅値を補正している。そのため、モジュール数に依存せず補正を行うことができ、1つのキャラクタを構成するモジュール数が固定されているバーコード(例えば、EAN−13やEAN−8、UPC−Aなど)はもちろんのこと、モジュール数が固定されていないバーコードにおいても補正することができる。
As a result, when decoding of a barcode including an area in which the original width value has changed due to uneven printing (hereinafter referred to as an abnormal area) fails, the abnormal area has an area with a width value that approximates the width value. Since it is small, it is included in the abnormal width value group and corrected based on the difference from the width value of each region of the normal width value group. Thereby, the width value changed due to printing unevenness or the like is appropriately corrected to the original width value, and a decrease in reading accuracy can be suppressed.
In the present invention, the width value of the abnormal area is corrected by relatively comparing only the width values, regardless of the total number of width values of the dark color system and the light color system. Therefore, correction can be performed without depending on the number of modules, as well as barcodes in which the number of modules constituting one character is fixed (for example, EAN-13, EAN-8, UPC-A, etc.) It is possible to correct even a barcode whose number of modules is not fixed.

請求項2の発明では、異常幅値集団を構成する各異常領域の幅値を、各正常幅値集団の少なくともいずれか1つを構成する各領域の平均幅値との差に基づいて補正手段により補正するように構成されている。このように、各正常幅値集団の各領域の平均幅値を用いることで、各正常幅値集団の各領域の幅値にバラツキがあっても、異常幅値集団を構成する各異常領域の幅値が適切に補正され、読取精度の低下を抑制することができる。   In the invention of claim 2, the correcting means corrects the width value of each abnormal area constituting the abnormal width value group from the average width value of each area constituting at least one of each normal width value group. It is comprised so that it may correct | amend by. In this way, by using the average width value of each region of each normal width value group, even if there is variation in the width value of each region of each normal width value group, each abnormal region constituting the abnormal width value group The width value is appropriately corrected, and a decrease in reading accuracy can be suppressed.

請求項3の発明では、異常幅値集団に対して第1正常幅値集団および第2正常幅値集団が存在するとき、当該異常幅値集団を構成する各異常領域の幅値が、第2平均幅値との差よりも第1平均幅値との差が小さい場合に当該第1平均幅値に等しくなるように補正され、第1平均幅値との差よりも第2平均幅値との差が小さい場合に当該第2平均幅値に等しくなるように補正される。これにより、異常幅値集団を構成する各異常領域の幅値を、当該各幅値にもっとも近い正常幅値集団の平均幅値を用いてそれぞれ適切に補正することができる。   In the invention of claim 3, when the first normal width value group and the second normal width value group exist for the abnormal width value group, the width value of each abnormal region constituting the abnormal width value group is the second value. When the difference from the first average width value is smaller than the difference from the average width value, the second average width value is corrected to be equal to the first average width value. When the difference is small, the correction is made to be equal to the second average width value. Thereby, the width value of each abnormal region constituting the abnormal width value group can be appropriately corrected using the average width value of the normal width value group closest to the respective width value.

請求項4の発明では、異常幅値集団を構成する各異常領域の幅値に対して第1正常幅値集団および第2正常幅値集団のいずれか一方のみが存在する場合には、当該各異常領域の幅値が、存在する一方の正常幅値集団の平均幅値とこの平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて補正される。これにより、例えば、各異常領域の幅値が各正常幅値集団の平均幅値よりも大きいことから第2正常幅値集団が存在せず第1正常幅値集団のみが存在する場合でも、この第1正常幅値集団の平均幅値とこの平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて異常領域の幅値を適切に補正することができる。   In the invention of claim 4, when only one of the first normal width value group and the second normal width value group exists for the width value of each abnormal region constituting the abnormal width value group, The width value of the abnormal region is corrected based on the average width value of one normal width value group that exists and the average width value of another normal width value group in which the difference between the average width values is small. Thereby, for example, even if the second normal width value group does not exist and only the first normal width value group exists because the width value of each abnormal region is larger than the average width value of each normal width value group, The width value of the abnormal region can be appropriately corrected based on the average width value of the first normal width value group and the average width value of another normal width value group in which the difference between the average width values is small.

請求項5の発明では、異常幅値集団を構成する各異常領域の幅値を、当該幅値に対する第1平均幅値の差と当該幅値に対する第2平均幅値の差とが近似する場合には、当該幅値の異常領域を含むキャラクタの規定幅値と、当該キャラクタに含まれる他の領域の幅値とに基づいて補正手段により補正するように構成されている。これにより、異常領域の幅値に対する両平均幅値の差が近似していることから、当該異常領域の幅値が両平均幅値のどちらにも補正されうる可能性がある場合であっても、異常領域の幅値を、当該異常領域を含むキャラクタの規定幅値とこのキャラクタに含まれる他の領域の幅値とに基づいて、第1平均幅値もしくは第2平均幅値のいずれか一方に適切に補正することができる。   In the invention of claim 5, when the width value of each abnormal region constituting the abnormal width value group is approximated by the difference between the first average width value with respect to the width value and the difference between the second average width values with respect to the width value Is configured to be corrected by the correcting means based on the prescribed width value of the character including the abnormal region of the width value and the width value of the other region included in the character. Thereby, since the difference between the two average width values with respect to the width value of the abnormal region is approximate, even if there is a possibility that the width value of the abnormal region can be corrected to either of the two average width values. The width value of the abnormal area is set to either the first average width value or the second average width value based on the specified width value of the character including the abnormal area and the width value of the other area included in the character. Can be corrected appropriately.

本実施形態に係る光学的情報読取装置10の電気的構成を示すブロック図である。1 is a block diagram showing an electrical configuration of an optical information reading apparatus 10 according to the present embodiment. 図1の制御回路40における読取処理の流れを例示するフローチャートの一部である。2 is a part of a flowchart illustrating the flow of a reading process in the control circuit 40 of FIG. 1. 図1の制御回路40における読取処理の流れを例示するフローチャートの一部である。2 is a part of a flowchart illustrating the flow of a reading process in the control circuit 40 of FIG. 1. 本実施形態における第1補正処理のサブルーチンを例示するフローチャートである。It is a flowchart which illustrates the subroutine of the 1st correction process in this embodiment. 本実施形態における個別補正処理のサブルーチンを例示するフローチャートである。It is a flowchart which illustrates the subroutine of the individual correction process in this embodiment. 昇順配列処理、集団作成処理および正常幅値補正処理を説明するための図である。It is a figure for demonstrating an ascending order arrangement | sequence process, a group creation process, and a normal width value correction process. 第2補正処理を説明するための図である。It is a figure for demonstrating a 2nd correction process. 本実施形態における第1異常幅値補正処理を説明するための図であり、図8(A)は第1補正処理前のキャラクタを例示する図であり、図8(B)は第1補正処理後のキャラクタを例示する図である。It is a figure for demonstrating the 1st abnormal width value correction process in this embodiment, FIG. 8 (A) is a figure which illustrates the character before a 1st correction process, FIG.8 (B) is a 1st correction process. It is a figure which illustrates the back character. 本実施形態における第2異常幅値補正処理を説明するための図であり、図9(A)はキャラクタのモジュールパターンを例示する図であり、図9(B)は第2補正処理前のキャラクタを例示する図であり、図9(C)は第2補正処理後のキャラクタを例示する図である。FIG. 9A is a diagram for explaining a second abnormal width value correction process in the present embodiment, FIG. 9A is a diagram illustrating a module pattern of a character, and FIG. 9B is a character before the second correction process; FIG. 9C is a diagram illustrating the character after the second correction process. 本実施形態における第3異常幅値補正処理を説明するための図であり、図10(A)はキャラクタのモジュールパターンを例示する図であり、図10(B)は第3補正処理前のキャラクタを例示する図であり、図10(C)は第3補正処理後のキャラクタを例示する図である。It is a figure for demonstrating the 3rd abnormal width value correction process in this embodiment, FIG. 10 (A) is a figure which illustrates the module pattern of a character, FIG.10 (B) is a character before a 3rd correction process. FIG. 10C is a diagram illustrating the character after the third correction process. 本実施形態における第4異常幅値補正処理を説明するための図であり、図11(A)は第4補正処理前のキャラクタを例示する図であり、図11(B)は第4補正処理後のキャラクタを例示する図である。It is a figure for demonstrating the 4th abnormal width value correction process in this embodiment, FIG. 11 (A) is a figure which illustrates the character before a 4th correction process, FIG.11 (B) is a 4th correction process. It is a figure which illustrates the back character.

以下、本発明に係る光学的情報読取装置の一実施形態について図を参照して説明する。
図1に示すように、光学的情報読取装置10は、対象物に表示されたバーコードBを読み取る装置として構成されている。ここで、バーコードBは、1または2以上の単位モジュールからなる暗色系(以下「黒バー」ともいう)および明色系(以下「白バー」ともいう)の各領域が複数配列されて構成されるキャラクタを複数有するコードである。
Hereinafter, an embodiment of an optical information reading device according to the present invention will be described with reference to the drawings.
As shown in FIG. 1, the optical information reading device 10 is configured as a device that reads a barcode B displayed on an object. Here, the barcode B is configured by arranging a plurality of dark color system (hereinafter also referred to as “black bar”) and light color system (hereinafter also referred to as “white bar”) areas composed of one or more unit modules. It is a code having a plurality of characters.

この光学的情報読取装置10は、図示しないケースの内部に回路部20が収容されてなるものであり、回路部20は、主に、照明光源21、受光センサ28、結像レンズ27等の光学系と、メモリ35、制御回路40、トリガースイッチ42等のマイクロコンピュータ(以下「マイコン」という)系と、から構成されている。   The optical information reading apparatus 10 includes a circuit unit 20 housed in a case (not shown). The circuit unit 20 mainly includes an illumination light source 21, a light receiving sensor 28, an imaging lens 27, and the like. And a microcomputer (hereinafter referred to as “microcomputer”) system such as a memory 35, a control circuit 40, and a trigger switch 42.

光学系は、投光光学系と、受光光学系とに分かれている。投光光学系を構成する照明光源21は、照明光Lfを発光可能な照明光源として機能するもので、例えば、赤色のLEDとこのLEDの出射側に設けられるレンズとから構成されている。なお、図1では、バーコードBが表示された対象物Rに向けて照明光Lfを照射する例を概念的に示している。   The optical system is divided into a light projecting optical system and a light receiving optical system. The illumination light source 21 constituting the light projecting optical system functions as an illumination light source capable of emitting the illumination light Lf, and includes, for example, a red LED and a lens provided on the emission side of the LED. In addition, in FIG. 1, the example which irradiates the illumination light Lf toward the target object R with which the barcode B was displayed is shown notionally.

受光光学系は、受光センサ28、結像レンズ27、反射鏡(図示略)などによって構成されている。受光センサ28は、CCDエリアセンサとして構成されるものであり、バーコードBまたは対象物Rに照射されて反射した反射光Lrを受光可能に構成されている。この受光センサ28は、結像レンズ27を介して入射する入射光を受光可能にプリント配線板(図示略)に実装されている。なお、受光センサ28は、特許請求の範囲に記載の「受光手段」の一例に相当する。   The light receiving optical system includes a light receiving sensor 28, an imaging lens 27, a reflecting mirror (not shown), and the like. The light receiving sensor 28 is configured as a CCD area sensor, and is configured to receive the reflected light Lr irradiated and reflected on the barcode B or the object R. The light receiving sensor 28 is mounted on a printed wiring board (not shown) so as to be able to receive incident light incident through the imaging lens 27. The light receiving sensor 28 corresponds to an example of a “light receiving unit” recited in the claims.

結像レンズ27は、外部から読取口(図示略)を介して入射する入射光を集光して受光センサ28の受光面28aに像を結像可能な結像光学系として機能するものである。本実施形態では、照明光源21から照射された照明光LfがバーコードBにて反射した後、この反射光Lrを結像レンズ27で集光し、受光センサ28の受光面28aにコード像を結像させている。   The imaging lens 27 functions as an imaging optical system capable of condensing incident light incident from the outside via a reading port (not shown) and forming an image on the light receiving surface 28a of the light receiving sensor 28. . In the present embodiment, after the illumination light Lf emitted from the illumination light source 21 is reflected by the barcode B, the reflected light Lr is condensed by the imaging lens 27 and a code image is formed on the light receiving surface 28 a of the light receiving sensor 28. The image is formed.

マイコン系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、トリガースイッチ42、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等から構成されている。   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, a trigger switch 42, a light emitting unit 43, a buzzer 44, a vibrator 45, and a liquid crystal display. 46, a communication interface 48, and the like.

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

制御回路40は、光学的情報読取装置10全体を制御可能なマイコンによって構成されており、CPU、システムバス、入出力インタフェース等を有するとともに、情報処理機能を備えており、メモリ35とともに情報処理装置を構成している。本実施形態では、制御回路40に対し、トリガースイッチ42、発光部43、ブザー44、バイブレータ45、液晶表示器46、通信インタフェース48等が接続されている。   The control circuit 40 is configured by a microcomputer that can control the entire optical information reader 10, has a CPU, a system bus, an input / output interface, and the like, has an information processing function, and has an information processing device together with the memory 35. Is configured. In the present embodiment, a trigger switch 42, a light emitting unit 43, a buzzer 44, a vibrator 45, a liquid crystal display 46, a communication interface 48, and the like are connected to the control circuit 40.

これにより、制御回路40は、例えば、トリガースイッチ42の監視や管理、バーコードBの読み取りに関する情報を報知するインジケータとして機能する発光部43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、当該光学的情報読取装置10の使用者に伝達し得る振動を発生可能なバイブレータ45の駆動制御、液晶表示器46の表示制御や外部装置とのシリアル通信を可能にする通信インタフェース48の通信制御等を可能にしている。   Thereby, for example, the control circuit 40 can turn on / off the light emitting unit 43 that functions as an indicator for notifying information related to monitoring and management of the trigger switch 42 and reading of the barcode B, and a buzzer that can generate a beep sound and an alarm sound. Communication that enables ON / OFF of ringing 44, drive control of the vibrator 45 capable of generating vibration that can be transmitted to the user of the optical information reader 10, display control of the liquid crystal display 46, and serial communication with an external device Communication control of the interface 48 is enabled.

次に、上述のように構成される光学的情報読取装置10において、バーコードBを読み取る場合に制御回路40により実施される読取処理について図2〜図5のフローチャートを参照して説明する。なお、本実施形態では、バーの幅値が全部で4種であって、1キャラクタあたり黒バー(暗色系の領域)と白バー(明色系の領域)とが各2つずつからなる合計7つのモジュールで構成されるEAN−13のバーコードに対する読取処理を一例に挙げて主に説明する。   Next, in the optical information reading apparatus 10 configured as described above, reading processing performed by the control circuit 40 when reading the barcode B will be described with reference to the flowcharts of FIGS. In the present embodiment, there are four types of bar width values in total, and a total of two black bars (dark color regions) and two white bars (light color regions) per character. A reading process for an EAN-13 barcode composed of seven modules will be mainly described as an example.

まず、図2のステップS101において撮像処理がなされ、作業者のトリガースイッチ42の操作に応じて照明光源21から照明光Lfが、バーコードBが表示された対象物Rに向けて照射される。そして、図1に示すように、対象物Rにて反射された反射光Lrが受光センサ28にて受光されることにより受光センサ28から出力される受光信号に基づいて、ステップS103にて幅値演算処理がなされ、各キャラクタを構成する黒バーおよび白バーの幅値がそれぞれ演算される。この幅値演算処理では、具体的には、受光信号の信号波形と所定の閾値と比較に応じて黒バーおよび白バーに区別してそれぞれの幅値を演算している。なお、ステップS103の幅値演算処理を実行する制御回路40は、特許請求の範囲に記載の「幅値演算手段」の一例に相当する。   First, an imaging process is performed in step S101 of FIG. 2, and the illumination light Lf is emitted from the illumination light source 21 toward the object R on which the barcode B is displayed in accordance with the operation of the trigger switch 42 by the operator. Then, as shown in FIG. 1, based on the light reception signal output from the light receiving sensor 28 when the reflected light Lr reflected by the object R is received by the light receiving sensor 28, the width value is determined in step S103. Arithmetic processing is performed, and the width values of the black bar and the white bar constituting each character are respectively calculated. In this width value calculation process, specifically, the respective width values are calculated by distinguishing between a black bar and a white bar according to the comparison between the signal waveform of the received light signal and a predetermined threshold value. The control circuit 40 that executes the width value calculation process in step S103 corresponds to an example of “width value calculation means” recited in the claims.

次に、ステップS105にてデコード処理がなされる。この処理では、ステップS103にて演算された黒バーおよび白バーの各幅値に基づいてデコードが実施される。そして、このデコード処理が成功した場合には、ステップS107にてYesと判定されて、後述するステップS109からの処理が行われることなく当該読取処理を終了する。一方、ステップS105にてデコード処理が失敗した場合にはステップS107にてNoと判定されて、幅値演算処理にて演算された幅値のなかに、印刷ムラ等が生じたために本来の幅値に対して変化した異常な幅値(すなわちバーの太りや細りが生じた幅値)が含まれるとみなされて、ステップS109からの処理が実行される。なお、ステップS105のデコード処理を実行する制御回路40は、特許請求の範囲に記載の「デコード手段」の一例に相当する。   Next, a decoding process is performed in step S105. In this process, decoding is performed based on the width values of the black bar and white bar calculated in step S103. If the decoding process is successful, it is determined Yes in step S107, and the reading process is terminated without performing the process from step S109 described later. On the other hand, if the decoding process fails in step S105, it is determined No in step S107, and the original width value is generated because printing unevenness or the like occurs in the width value calculated in the width value calculation process. The abnormal width value (that is, the width value in which the bar is thickened or thinned) is considered to be included, and the processing from step S109 is executed. The control circuit 40 that executes the decoding process in step S105 corresponds to an example of a “decoding unit” recited in the claims.

次に、ステップS109にて昇順配列処理がなされ、幅値演算処理にて演算された各幅値が、黒バー、白バーの種別にかかわらず、昇順に配列される。具体的には、例えば、図6に示すように、幅値が順番に小さい値から大きい値に並べられる。ここで、図6の縦軸は幅値(相対値)である。   Next, ascending order arrangement processing is performed in step S109, and the width values calculated in the width value calculation processing are arranged in ascending order regardless of the types of black bars and white bars. Specifically, for example, as shown in FIG. 6, the width values are arranged in order from a small value to a large value. Here, the vertical axis in FIG. 6 is the width value (relative value).

そして、この昇順配列処理により作成されたグラフを基に、ステップS111にて集団作成処理がなされる。この集団作成処理では、図6に示すように、幅値同士が近似する当該幅値の配列を1つの集団とみなし、この集団(図6の一点鎖線内)を複数作成する。本実施形態では、隣接する幅値同士の差が10%以内である配列を1つの集団とみなすように設定されているが、読み取りを行うバーコードの種別等に応じてこの値は適宜変更することができる。なお、ステップS111の集団作成処理を実行する制御回路40は、特許請求の範囲に記載の「集団作成手段」の一例に相当する。   Based on the graph created by this ascending order array processing, group creation processing is performed in step S111. In this group creation process, as shown in FIG. 6, the array of width values that approximate the width values is regarded as one group, and a plurality of groups (inside the one-dot chain line in FIG. 6) are created. In this embodiment, an array in which the difference between adjacent width values is within 10% is set to be regarded as one group, but this value is appropriately changed according to the type of barcode to be read. be able to. The control circuit 40 that executes the group creation processing in step S111 corresponds to an example of “group creation means” recited in the claims.

次に、集団作成処理にて作成された各集団に対して、ステップS113にて第1判定処理がなされる。本実施形態ではEAN−13のバーコードを読取対象としていることから、バーコードを構成するバーの幅値は4種類に限定されるので、この4種類の幅値のバーが少なくとも所定数以上それぞれ存在することとなる。そこで、ステップS113の判定処理ではこの性質を利用している。具体的に、本実施形態では、ステップS111にて作成された各集団のうち、当該各集団を構成する各バーの総数が上記所定数以上であれば、当該集団が正常幅値集団と判定されるように設定されている。また、各バーの総数が上記所定数未満の集団は、少数幅値集団と判定されるように設定されている。ここで、本実施形態では、上記所定数は例えば5に設定されているが、これに限らず、読み取りを行うバーコードの種別等に応じて適宜変更することができる。なお、ステップS113の判定処理を実行する制御回路40は、特許請求の範囲に記載の「第1判定手段」の一例に相当する。   Next, a first determination process is performed in step S113 for each group created by the group creation process. In this embodiment, since the barcode of EAN-13 is targeted for reading, the width values of the bars constituting the barcode are limited to four types. Therefore, at least a predetermined number or more of these four types of width values of the bar are provided. Will exist. Therefore, this property is used in the determination process in step S113. Specifically, in the present embodiment, among the groups created in step S111, if the total number of bars constituting each group is equal to or greater than the predetermined number, the group is determined to be a normal width value group. Is set to In addition, a group in which the total number of bars is less than the predetermined number is set to be determined as a minority width value group. Here, in the present embodiment, the predetermined number is set to 5, for example, but is not limited thereto, and can be appropriately changed according to the type of barcode to be read. The control circuit 40 that executes the determination process in step S113 corresponds to an example of a “first determination unit” recited in the claims.

次に、ステップS115において、正常幅値補正処理がなされる。この正常幅値補正処理では、まず、各正常幅値集団の各バーの幅値の平均値(以下「平均幅値」ともいう)が、当該正常幅値集団ごとに算出される。ここで、平均幅値とは、正常幅値集団の各幅値を足し合わせた値を、正常幅値集団を構成するバーの総数で割った値のことをいう。そして、各バーの幅値が、上述のように算出された平均値に全て等しくなるように補正される。   Next, in step S115, normal width value correction processing is performed. In this normal width value correction process, first, an average value of width values of each bar of each normal width value group (hereinafter also referred to as “average width value”) is calculated for each normal width value group. Here, the average width value is a value obtained by dividing a value obtained by adding the width values of the normal width value group by the total number of bars constituting the normal width value group. Then, the width value of each bar is corrected so as to be all equal to the average value calculated as described above.

次に、ステップS117にて、少数幅値集団抽出処理がなされる。この処理では、少数幅値集団と判定された集団が複数ある場合、これら各集団のうち各バーの幅値が最も小さい集団が抽出されて第1少数幅値集団として設定される。また、少数幅値集団と判定された集団が1つのみの場合には、その集団が第1少数幅値集団として設定される。   Next, in step S117, a minority width value group extraction process is performed. In this process, when there are a plurality of groups determined to be the minority width value group, a group having the smallest width value of each bar is extracted and set as the first minority width value group. When there is only one group determined as the minority value group, that group is set as the first minority value group.

そして、図3のステップS119にて、上記ステップS117にて抽出された第1少数幅値集団の各バーの幅値に対して小さな平均幅値(第1平均幅値W)の正常幅値集団(第1正常幅値集団C)と大きな平均幅値(第2平均幅値W)の正常幅値集団(第2正常幅値集団C)との双方が存在するか否かについて判定される。ここで、例えば、第1少数幅値集団が図6に示す少数幅値集団Sである場合に、この少数幅値集団Sに対して第1正常幅値集団Cおよび第2正常幅値集団Cが存在する場合にはステップS119にてYesと判定される。 Then, in step S119 of FIG. 3, the normal width value having a smaller average width value (first average width value W a ) than the width value of each bar of the first minority width value group extracted in step S117. Whether or not both a group (first normal width value group C 1 ) and a large average width value (second average width value W b ) normal width value group (second normal width value group C 2 ) exist Determined. Here, for example, when the first few width value population is small width value population S 1 shown in FIG. 6, the first normal width value population C 1 and the second normal range for this small width values populations S 1 is determined as Yes at step S119 if the value population C 2 exists.

次に、ステップS120にて第2判定処理がなされる。この処理では、第1正常幅値集団Cの第1平均幅値Wと第2正常幅値集団Cの第2平均幅値Wとに基づいて、第1少数幅値集団が、各バーの幅値が異常(以下「異常幅値」ともいう)である異常幅値集団であるか否かについて判定される。本実施形態ではEAN−13のバーコードを読取対象としており、このバーコードを構成する4種類のバーの幅値が1:2:3:4の比率に規定されている。ここで、例えば、第1平均幅値Wと第2平均幅値Wとの比の関係から、両平均幅値の間に存在する幅値が規定の比率でない異常幅値であると判定されると、当該第1少数幅値集団が異常幅値集団であるとして、ステップS120にてYesと判定される。なお、ステップS120の判定処理を実行する制御回路40は、特許請求の範囲に記載の「第2判定手段」の一例に相当する。 Next, a second determination process is performed in step S120. In this process, based on the first and the first average width value W a normal width values population C 1 and the second average width value W b of the second normal width value population C 2, the first few width value population, It is determined whether or not the width value of each bar is an abnormal width value group that is abnormal (hereinafter also referred to as “abnormal width value”). In this embodiment, an EAN-13 bar code is to be read, and the width values of the four types of bars constituting the bar code are defined at a ratio of 1: 2: 3: 4. Here, for example, from the relationship of the ratio between the first average width value W a and the second average width value W b , it is determined that the width value existing between both average width values is an abnormal width value that is not a specified ratio. Then, it is determined as Yes in step S120, assuming that the first minority width value group is an abnormal width value group. The control circuit 40 that executes the determination process in step S120 corresponds to an example of a “second determination unit” recited in the claims.

上述のように第1少数幅値集団が異常幅値集団であると判定されると、ステップS121にて第1補正処理のサブルーチンが実行される。なお、ステップS121の第1補正処理を実行する制御回路40は、特許請求の範囲に記載の「補正手段」の一例に相当する。この第1補正処理のサブルーチンでは、まず、図4のステップS201において、初期条件設定処理がなされる。この処理では、異常幅値集団を構成する各バーの総数nと、第1閾値Wth1および第2閾値Wth2とが設定される。本実施形態では、第1平均幅値Wを0%、第2平均幅値Wを100%とした百分率のうち、35%の値が第1閾値Wth1、65%の値が第2閾値Wth2に設定される。なお、第1閾値Wth1および第2閾値Wth2の値は、読み取りを行うバーコードBの種別等に応じて適宜変更することができる。また、異常幅値集団を構成するn個のバーのうち、幅値の小さいものからk番目のバーの幅値をWとして処理するため、本初期条件設定処理では、k=1に設定される。 If it is determined that the first minority width value group is an abnormal width value group as described above, a first correction processing subroutine is executed in step S121. The control circuit 40 that executes the first correction processing in step S121 corresponds to an example of “correction means” recited in the claims. In the subroutine of the first correction process, first, an initial condition setting process is performed in step S201 of FIG. In this process, the total number n of each bar constituting the abnormal width value group, the first threshold value W th1 and the second threshold value W th2 are set. In the present embodiment, of the percentages where the first average width value W a is 0% and the second average width value W b is 100%, the value of 35% is the first threshold value W th1 and the value of 65% is the second value. The threshold value Wth2 is set. Note that the values of the first threshold value W th1 and the second threshold value W th2 can be changed as appropriate according to the type of the barcode B to be read. In addition, in this initial condition setting process, k = 1 is set in order to process the width value of the k-th bar from the smallest bar value among the n bars constituting the abnormal width value group as W k. The

次に、ステップS203にて、異常幅値集団のバーの幅値Wが第1閾値Wth1以下であるか否かについて判定される。この段階ではk=1であるため、異常幅値集団を構成する最も小さなバーの幅値Wが第1閾値Wth1以下であるか否かについて判定されることとなる。そして、幅値Wが第1閾値Wth1以下と判定される場合には(S203でYes)、当該幅値Wは第2平均幅値Wとの差よりも第1平均幅値Wとの差が小さいとして、ステップS205にて、この幅値Wが第1平均幅値Waに等しくなるように設定される。一方、幅値Wが第1閾値Wth1より大きいと判定されると(S203でNo)、ステップS207にてこの幅値Wが第2閾値Wth2以上であるか否かについて判定される。そして、幅値Wが第2閾値Wth2以上と判定される場合には(S207でYes)、当該幅値Wは第1平均幅値Wとの差よりも第2平均幅値Wとの差が小さいとして、ステップS209にて、この幅値Wが第2平均幅値Wに等しくなるように設定される。一方、幅値Wが第2閾値Wth2未満と判定されると(S207でNo)、ステップS211にて後述する個別補正処理のサブルーチンが実行される。 Next, in step S203, the width value W k bars abnormal width value population is determined whether it is less than the first threshold value W th1. Since at this stage it is k = 1, so that the smallest bar width value W 1 of constituting the abnormality width value population is determined whether it is less than the first threshold value W th1. Then, (Yes in S203), if the width value W 1 is determined that the first threshold value W th1 or less, the width value W 1 the first average width value W than the difference between the second average width value W b as the difference between a small, at step S205, the width value W 1 is set to be equal to the first average width value W a. On the other hand, it is determined if the width value W 1 is determined to be larger than the first threshold value W th1 (at S203 No), at step S207 the width value W 1 is about whether or not the second threshold value W th2 or more . Then, (Yes in S207), if the width value W 1 is determined with a second threshold value W th2 or more, the width value W 1 and the second average width value W than the difference between the first average width value W a as the difference between b is small, in step S209, the width value W 1 is set to be equal to the second average width value W b. On the other hand, the width value W 1 when it is determined that the second less than the threshold value W th2 (No in S207), the subroutine of individual correction processing described below at step S211 is executed.

上述のように、異常幅値集団のバーの幅値WがステップS205、S209、S211のいずれかにて補正されると、ステップS213にてk≧nであるか否かについて判定される。すなわち、異常幅値集団のバーの幅値Wすべてについて本第1補正処理がなされていなければ、ステップS213にてNoと判定されて、ステップS215にてkに1が加算されて、ステップS203からの処理が繰り返される。この段階では、k=1であるため、nが2以上であればステップS213にてNoと判定されて、ステップS215にてk=2に設定されて、ステップS203からの処理が繰り返されることとなる。一方、第1少数幅値集団のバーの幅値Wすべてについて本第1補正処理がなされたことからk≧nとなると(S213でYes)、本第1補正処理のサブルーチンが終了する。 As described above, the width value W 1 of the bars abnormal width value population when corrected by one of steps S205, S209, S211, a determination is made whether k ≧ n at step S213. That is, if the first correction process has not been performed for all the bar width values W k of the abnormal width value group, it is determined No in step S213, 1 is added to k in step S215, and step S203. The process from is repeated. At this stage, since k = 1, if n is 2 or more, it is determined No in step S213, k = 2 is set in step S215, and the processing from step S203 is repeated. Become. On the other hand, since the first correction process has been performed for all the bar width values W k of the first minority width value group, if k ≧ n (Yes in S213), the subroutine of the first correction process ends.

ここで、上述した個別補正処理について、図5のフローチャートを用いて説明する。
この個別補正処理では、異常幅値Wのバーを含むキャラクタの予め規定された幅値(以下、規定幅値ともいう)と、当該キャラクタに含まれる他の正常なバーの幅値とに基づいて、異常幅値集団のバーの幅値Wが補正される。具体的に、この個別補正処理のサブルーチンでは、まず、図5のステップS301において、キャラクタ抽出処理がなされ、幅値Wのバーが含まれるキャラクタが1つ抽出される。次に、ステップS303にて、この抽出キャラクタを構成する各バーのうち異常幅値のバーが1つあるか否かが判定される。そして、この抽出キャラクタ内に異常幅値のバーが幅値Wのバー1つのみ存在する場合には、ステップS303にてYesと判定され、ステップS305にて第1異常幅値補正処理がなされる。
Here, the individual correction process described above will be described with reference to the flowchart of FIG.
In this individual correction processing, predefined width value of characters including a bar abnormal width value W k (hereinafter, also referred to as prescribed width value), based on the width values of the other normal bar included in the character Thus, the width value W k of the bar of the abnormal width value group is corrected. Specifically, in the subroutine of individual correction processing, first, in step S301 of FIG. 5, the character extraction processing is performed, characters are extracted one that includes bar width value W k. Next, in step S303, it is determined whether or not there is one abnormal width value bar among the bars constituting the extracted character. When the bar abnormality width values within the extraction character exists bars only one width value W k is determined as Yes at step S303, the first abnormal width value correction process is performed at step S305 The

この第1異常幅値補正処理では、幅値Wが、1キャラクタを構成する規定の総モジュール数から、抽出キャラクタ内の正常幅値(すなわち非補正対象である規定幅値)の各バーを構成するモジュール数の総和を減算した値に等しくなるように補正される。具体的な数値を基に説明すると、例えば、図8(A)に示すように、異常幅値のモジュール数に相当する値が0.6であり、正常幅値のモジュール数に相当する値が4,1,1の3つであるとすると、異常幅値集団のバーの幅値Wのモジュール数に相当する値は、7(1キャラクタを構成する総モジュール数)から6(正常幅値のバーを構成するモジュールの総数)を引いた値である1に補正されることとなる(図8(B)参照)。 In this first abnormal width value correction process, the width value W k is calculated from each of the normal width values (that is, the specified width value to be uncorrected) in the extracted character from the specified total number of modules constituting one character. Correction is made to be equal to a value obtained by subtracting the sum of the number of modules constituting the module. To explain based on specific numerical values, for example, as shown in FIG. 8A, the value corresponding to the number of modules of the abnormal width value is 0.6, and the value corresponding to the number of modules of the normal width value is When 4, 1, 1 is three, a value corresponding to the number of modules in width value W k bars abnormal width value population, 7 (1 total number of modules constituting the character) from 6 (normal width value This is corrected to 1 which is a value obtained by subtracting the total number of modules constituting the bar (see FIG. 8B).

一方、ステップS303にてNoと判定されると、ステップS307にて、抽出キャラクタを構成する各バーのうち異常幅値のバーが2つあるか否かが判定される。そして、この抽出キャラクタ内に異常幅値のバーが2つ存在する場合には、ステップS307にてYesと判定され、ステップS309にて第2異常幅値補正処理がなされる。   On the other hand, if it is determined No in step S303, it is determined in step S307 whether or not there are two bars having abnormal width values among the bars constituting the extracted character. If there are two abnormal width value bars in the extracted character, “Yes” is determined in step S307, and second abnormal width value correction processing is performed in step S309.

この第2異常幅値補正処理では、まず、1キャラクタを構成する規定の総モジュール数から、抽出キャラクタ内の正常幅値の各バーを構成するモジュール数の総和を減算し、補正対象の2つのバーのモジュール数の総和を求める。補正対象のバーのモジュール数の総和から想定される補正後のモジュールパターンが図9(A)に示すように限定されることから、このモジュールパターンに従い、補正対象のモジュール数の総和が2である場合には、それぞれの異常幅値をモジュール数で1に相当する値に補正する。補正対象のモジュール数の総和が3である場合には、2つの異常幅値のうち小さいほうをモジュール数で1に相当する値に、大きいほうをモジュール数で2に相当する値に補正する。また、補正対象のモジュール数の総和が4である場合には、この2つの異常幅値の差がモジュール数で1に相当する値未満であればそれぞれモジュール数で2に相当する値に、2つの異常幅値の差がモジュール数で1に相当する値以上であれば小さいほうをモジュール数で1に相当する値に大きいほうをモジュール数で3に相当する値に補正する。さらに、補正対象のモジュール数の総和が5である場合には、この2つの異常幅値の差がモジュール数で2に相当する値未満であれば小さいほうをモジュール数で2に相当する値に大きいほうをモジュール数で3に相当する値に補正し、2つの異常幅値の差がモジュール数で2に相当する値以上であれば小さいほうをモジュール数で1に相当する値に大きいほうをモジュール数で4に相当する値に補正する。   In this second abnormal width value correction process, first, the sum of the number of modules constituting each bar of the normal width value in the extracted character is subtracted from the prescribed total number of modules constituting one character, and two correction target two values are subtracted. Find the total number of modules in the bar. Since the corrected module pattern assumed from the total number of modules of the correction target bar is limited as shown in FIG. 9A, the total number of correction target modules is 2 according to this module pattern. In this case, each abnormal width value is corrected to a value corresponding to 1 in terms of the number of modules. When the total number of modules to be corrected is 3, the smaller one of the two abnormal width values is corrected to a value corresponding to 1 in the number of modules, and the larger one is corrected to a value corresponding to 2 in the number of modules. When the sum of the number of modules to be corrected is 4, if the difference between the two abnormal width values is less than the value corresponding to 1 in the number of modules, the number corresponding to 2 in the number of modules is set to 2 respectively. If the difference between the two abnormal width values is greater than or equal to the value corresponding to 1 in the number of modules, the smaller one is corrected to a value corresponding to 1 in the number of modules, and the larger one is corrected to a value corresponding to 3 in the number of modules. Further, when the sum of the number of modules to be corrected is 5, if the difference between the two abnormal width values is less than the value corresponding to 2 in the number of modules, the smaller one is set to a value corresponding to 2 in the number of modules. The larger one is corrected to the value corresponding to 3 in the number of modules, and if the difference between the two abnormal width values is greater than or equal to the value corresponding to 2 in the number of modules, the smaller one is larger in the value corresponding to 1 in the number of modules. The number of modules is corrected to a value corresponding to 4.

具体的な数値を基に説明すると、例えば、図9(B)に示すように、異常幅値をモジュール数に換算した値が1.6と2.4であり、正常幅値をモジュール数に換算した値が2,1の2つであるとすると、まず、補正対象のモジュール数の総和は7から3を減算して4となる。そして、補正対象のモジュール数の総和が4なので、想定される補正後のモジュールパターンは、1:3か2:2となる。ここで、2つの異常幅値の差をモジュール数に換算した値は0.8であり1未満であるので、この2つの異常幅値は、それぞれモジュール数で2に相当する値に補正される(図9(C)参照)。   For example, as shown in FIG. 9B, the values obtained by converting the abnormal width value into the number of modules are 1.6 and 2.4, and the normal width value is set as the number of modules. Assuming that the converted values are 2 and 2, first, the total number of modules to be corrected is 4 by subtracting 3 from 7. Since the total number of modules to be corrected is 4, the assumed corrected module pattern is 1: 3 or 2: 2. Here, since the value obtained by converting the difference between the two abnormal width values into the number of modules is 0.8 and less than 1, the two abnormal width values are corrected to values corresponding to 2 in the number of modules, respectively. (See FIG. 9C).

一方、ステップS307にてNoと判定されると、ステップS311にて、抽出キャラクタを構成する各バーのうち異常幅値のバーが3つあるか否かが判定される。そして、この抽出キャラクタ内に異常幅値のバーが3つ存在する場合には、ステップS311にてYesと判定され、ステップS313にて第3異常幅値補正処理がなされる。   On the other hand, if it is determined No in step S307, it is determined in step S311 whether or not there are three abnormal width value bars among the bars constituting the extracted character. If there are three bars with abnormal width values in the extracted character, “Yes” is determined in step S311 and third abnormal width value correction processing is performed in step S313.

この第3異常幅値補正処理では、まず、上述した第2異常幅値補正処理と同様に、1キャラクタを構成する規定の総モジュール数から、抽出キャラクタ内の正常幅値の各バーを構成するモジュール数の総和を減算し、補正対象の3つのバーのモジュール数の総和を求める。補正対象のバーのモジュール数の総和から想定される補正後のモジュールパターンが図10(A)に示すように限定されることから、このモジュールパターンに従い、補正対象のモジュール数の総和が3である場合には、それぞれの異常幅値をモジュール数で1に相当する値に補正する。補正対象の総モジュール数が4である場合には、3つの異常幅値のうち一番大きいものをモジュール数で2に相当する値に、それ以外をモジュール数で1に相当する値に補正する。補正対象の総モジュール数が5である場合には、3つの異常幅値のうち一番大きい値と2番目に大きい値との差がモジュール数で1に相当する値未満なら、一番小さい値をモジュール数で1に相当する値に補正しそれ以外の値をモジュール数で2に相当する値に補正する。また、3つの異常幅値のうち一番大きい値と2番目に大きい値との差がモジュール数で1に相当する値以上なら、一番大きい値をモジュール数で3に相当する値に補正し、それ以外の値をモジュール数で1に相当する値に補正する。さらに、補正対象の総モジュール数が6である場合には、3つの異常幅値のうち一番大きい値と一番小さい値との差がモジュール数で1に相当する値未満なら、すべての値をモジュール数で2に相当する値に補正する。また、3つの異常幅値のうち一番大きい値と一番小さい値との差がモジュール数で1に相当する値以上であって一番大きい値と二番目に大きい値との差がモジュール数で2に相当する値未満なら、一番大きい値をモジュール数で3に相当する値に、2番目に大きい値をモジュール数で2に相当する値に、一番小さい値をモジュール数で1に相当する値に補正する。さらに、3つの異常幅値のうち一番大きい値と2番目に大きい値との差がモジュール数で2に相当する値以上なら、一番大きい値をモジュール数で4に相当する値に、それ以外の値をモジュール数で1に相当する値に補正する。   In the third abnormal width value correction process, first, each bar of the normal width value in the extracted character is formed from the specified total number of modules constituting one character, as in the second abnormal width value correction process described above. The total number of modules is subtracted to obtain the total number of modules of the three bars to be corrected. Since the corrected module pattern assumed from the total number of modules of the correction target bar is limited as shown in FIG. 10A, the total number of correction target modules is 3 according to this module pattern. In this case, each abnormal width value is corrected to a value corresponding to 1 in terms of the number of modules. When the total number of modules to be corrected is 4, the largest one of the three abnormal width values is corrected to a value corresponding to 2 in the number of modules, and the other is corrected to a value corresponding to 1 in the number of modules. . When the total number of modules to be corrected is 5, if the difference between the largest value and the second largest value among the three abnormal width values is less than the value corresponding to 1 in the number of modules, the smallest value Is corrected to a value corresponding to 1 in the number of modules, and other values are corrected to a value corresponding to 2 in the number of modules. If the difference between the largest value and the second largest value among the three abnormal width values is greater than or equal to 1 in terms of the number of modules, the largest value is corrected to a value corresponding to 3 in the number of modules. The other values are corrected to a value corresponding to 1 in the number of modules. Furthermore, when the total number of modules to be corrected is 6, if the difference between the largest value and the smallest value among the three abnormal width values is less than the value corresponding to 1 in the number of modules, all values Is corrected to a value corresponding to 2 in the number of modules. In addition, the difference between the largest value and the smallest value among the three abnormal width values is equal to or greater than 1 in terms of the number of modules, and the difference between the largest value and the second largest value is the number of modules. If the value is less than 2, the largest value is equivalent to 3 in the number of modules, the second largest value is equivalent to 2 in the number of modules, and the smallest value is 1 in the number of modules. Correct to the corresponding value. Furthermore, if the difference between the largest value and the second largest value among the three abnormal width values is greater than or equal to 2 in the number of modules, the largest value is changed to a value corresponding to 4 in the number of modules. A value other than is corrected to a value corresponding to 1 in terms of the number of modules.

具体的な数値を基に説明すると、例えば、図10(B)に示すように、異常幅値をモジュール数に換算した値が1.4、2.4、2.6の3つであり、正常幅値をモジュール数に換算した値が1つのみでその値が1であるとすると、まず、補正対象のモジュール数の総和は7から1を減算して6となる。そして、補正対象のモジュール数の総和が6なので、想定される補正後のモジュールパターンは、1:1:4か2:2:2か1:2:3のいずれかとなる。ここで、3つの異常幅値のうち、一番大きい値と一番小さい値との差をモジュール数に換算した値が1.2であり、一番大きい値と二番目に大きい値との差をモジュール数に換算した値が0.2であるので、3つの異常幅値は、モジュール数に換算した値で1.4が1に、2.4が2に、2.6が3にそれぞれ補正される(図10(C)参照)。   If it demonstrates based on a specific numerical value, as shown in FIG.10 (B), for example, the value which converted the abnormal width | variety value into the number of modules is three of 1.4, 2.4, 2.6, If there is only one value obtained by converting the normal width value into the number of modules and the value is 1, first, the total number of modules to be corrected is 6 by subtracting 1 from 7. Since the total number of modules to be corrected is 6, the assumed corrected module pattern is either 1: 1: 4, 2: 2: 2, or 1: 2: 3. Here, out of the three abnormal width values, the value obtained by converting the difference between the largest value and the smallest value into the number of modules is 1.2, and the difference between the largest value and the second largest value. Since the value converted into the number of modules is 0.2, the three abnormal width values are the values converted into the number of modules: 1.4 is 1, 2.4 is 2, and 2.6 is 3, respectively. It is corrected (see FIG. 10C).

一方、ステップS311にてNoと判定されると、ステップS315にて第4異常幅値補正処理がなされる。ここで、ステップS311でのNoとの判定は、抽出キャラクタ内には正常幅値が存在せず、異常幅値しか存在しないことを意味する。そして、この第4異常幅値補正処理では、4つの異常幅値についてそれぞれ四捨五入した値に補正する。具体的な数値を基に説明すると、例えば、図11(A)に示すように、異常幅値がモジュール数に換算した値で0.6、1.6、3.4、4.4の4つであるとすると、それぞれの値を四捨五入して、0.6が1に、1.6が2に、3.4が3に、4.4が4に補正される(図11(B)参照)。
このように、異常幅値Wが各異常幅値補正処理のいずれかにて補正されることにより、個別補正処理のサブルーチンが終了する。
On the other hand, if it is determined No in step S311, the fourth abnormal width value correction process is performed in step S315. Here, the determination of No in step S311 means that there is no normal width value and only an abnormal width value in the extracted character. In the fourth abnormal width value correction process, the four abnormal width values are corrected to rounded values. Explaining based on specific numerical values, for example, as shown in FIG. 11A, the abnormal width value is a value converted into the number of modules, which is 4 of 0.6, 1.6, 3.4, and 4.4. Assuming that the value is one, each value is rounded off, and 0.6 is corrected to 1, 1.6 is corrected to 2, 3.4 is corrected to 3, and 4.4 is corrected to 4 (FIG. 11B). reference).
In this way, the abnormal width value Wk is corrected in any of the abnormal width value correction processes, whereby the individual correction process subroutine ends.

一方、上述した図3のステップS119において、上述のように抽出された第1少数幅値集団の各バーの幅値に対して大きな平均幅値の正常幅値集団と小さな平均幅値の正常幅値集団とのいずれか一方のみが存在する場合には、ステップS119にてNoと判定されてステップS123にて第2補正処理がなされることとなる。この第2補正処理では、第1少数幅値集団の一方に存在する正常幅値集団の平均幅値と、この平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて第1少数幅値集団の各バーの幅値が補正される。具体的には、例えば、図7に示す少数幅値集団Sのように、大きな平均幅値の第2正常幅値集団Cが存在せず小さな平均幅値の第1正常幅値集団Cのみが存在する場合には、この少数幅値集団Sが、第1正常幅値集団Cの第1平均幅値Wと、この第1平均幅値Wとの差が小さい他の正常幅値集団の平均幅値(図7に示す正常幅値集団Cの平均幅値W)とに基づいて補正される。 On the other hand, in step S119 of FIG. 3 described above, the normal width value group having a large average width value and the normal width having a small average width value with respect to the width value of each bar of the first minority width value group extracted as described above. If only one of the value groups exists, it is determined No in step S119, and the second correction process is performed in step S123. In the second correction processing, based on the average width value of the normal width value group existing in one of the first minority width value groups and the average width value of another normal width value group having a small difference between the average width values. Thus, the width value of each bar of the first minority width value group is corrected. Specifically, for example, as small width values populations S 2 shown in FIG. 7, the first normal width value population C of the second small average width value absent the normal width value population C 2 large average width value When only 1 exists, this minority width value group S 2 has a small difference between the first average width value W a of the first normal width value group C 1 and the first average width value W a. Is corrected based on the average width value of the normal width value group (average width value W c of the normal width value group C 3 shown in FIG. 7).

また、上述したステップS120において、第1少数幅値集団の各バーの幅値が異常でないと判定されると(S120でNo)、ステップS124にて第3補正処理がなされ、全てのバーの幅値が両平均幅値W,Wとの関係において想定される正常な幅値に等しくなるように設定される。 If it is determined in step S120 described above that the width value of each bar of the first minority width value group is not abnormal (No in S120), a third correction process is performed in step S124, and the widths of all bars are determined. The value is set to be equal to the normal width value assumed in relation to both average width values W a and W b .

このように、ステップS121、S123、S124の処理において第1少数幅値集団の各バーの幅値が補正されると、ステップS125にて全ての少数幅値集団について補正が終了したか否かについて判定される。そして、全ての少数幅値集団について補正が終了していない場合には、ステップS125にてNoと判定され、ステップS127にて未だ補正されていない少数幅値集団が1つ抽出されて、この抽出された少数幅値集団に対してステップS119からの処理が繰り返されることとなる。   Thus, when the width value of each bar of the first minority width value group is corrected in the processing of steps S121, S123, and S124, whether or not the correction is completed for all the minority width value groups in step S125. Determined. If correction has not been completed for all of the minority value group, it is determined No in step S125, and one minority value group that has not been corrected yet is extracted in step S127. The process from step S119 is repeated for the set minority value group.

一方、全ての少数幅値集団について補正が終了した場合には、ステップS125にてYesと判定されて、上述したステップS109からステップS125までの処理において補正された幅値に基づき、ステップS129にて再デコード処理がなされて当該読取処理が終了する。この再デコード処理では、上述のように異常幅値W等が適切に補正されているので、印刷ムラ等により本来の幅値が変化したバーを含むバーコードであっても確実にデコードを成功することができる。 On the other hand, when the correction has been completed for all the minority width value groups, it is determined Yes in step S125, and in step S129, based on the width value corrected in the processing from step S109 to step S125 described above. Re-decoding processing is performed, and the reading processing ends. In this re-decoding process, the abnormal width value W k and the like are appropriately corrected as described above, so that even a barcode including a bar whose original width value has changed due to uneven printing or the like has been successfully decoded. can do.

以上説明したように、本実施形態に係る光学的情報読取装置10では、デコードに失敗すると、演算された幅値が近似するバーのみから構成される集団が集団作成処理により複数作成される。さらに、第1判定処理により、集団作成処理により作成された各集団のうち、各バーの総数が上記所定数以上の集団が正常幅値集団と判定され、各バーの総数が所定数未満の集団が少数幅値集団と判定される。また、第2判定手段により、各少数幅値集団のうち、各正常幅値集団の各バーの幅値との差に基づいて異常な幅値と判断されるバーで構成される集団が異常幅値集団と判定される。そして、異常幅値集団を構成する各バーの異常幅値Wが、各正常幅値集団の各バーの幅値との差に基づいて補正され、この補正された補正幅値を用いてデコード手段により再デコードされる。 As described above, in the optical information reading apparatus 10 according to the present embodiment, when decoding fails, a plurality of groups composed only of bars whose calculated width values are approximated are created by the group creation process. Furthermore, among the groups created by the group creation process in the first determination process, a group in which the total number of bars is equal to or greater than the predetermined number is determined as a normal width value group, and the total number of bars is less than the predetermined number. Is determined to be a minority value group. In addition, among the minority width value groups, a group composed of bars determined to be abnormal width values based on a difference from the width value of each bar of each normal width value group by the second determination unit is an abnormal width. Judged as a value group. Then, the abnormal width value W k of each bar constituting the abnormal width value group is corrected based on the difference from the width value of each bar of each normal width value group, and is decoded using the corrected correction width value. Re-decoded by means.

これにより、印刷ムラ等により本来の幅値が変化した異常幅値Wのバーを含むバーコードのデコードに失敗した場合には、上記異常幅値Wのバーはその幅値に近似する幅値のバーが少ないことから異常幅値集団に含まれて、正常幅値集団の各バーの幅値との差に基づいて補正される。これにより、印刷ムラ等により変化した幅値が本来の幅値に適正に補正されて、読取精度の低下を抑制することができる。
また、本発明では、各黒バーおよび各白バーの幅値の総数に関わらず、各幅値のみを相対的に比較することで異常幅値Wを補正している。そのため、モジュール数に依存せず補正を行うことができ、1つのキャラクタを構成するモジュールの数が固定されているバーコード(例えば、EAN−13やEAN−8、UPC−Aなど)はもちろんのこと、モジュール数が固定されていないバーコードにおいても補正することができる。
As a result, when decoding of a barcode including a bar having an abnormal width value W k whose original width value has changed due to uneven printing or the like has failed, the bar having the abnormal width value W k has a width that approximates the width value. Since the value bar is small, it is included in the abnormal width value group and is corrected based on the difference between the width value of each bar in the normal width value group. Thereby, the width value changed due to printing unevenness or the like is appropriately corrected to the original width value, and a decrease in reading accuracy can be suppressed.
In the present invention, regardless of the total number of the width values of the black bars and Kakushiro bars, it is corrected abnormal width value W k By only the width value a relative comparison. Therefore, correction can be performed without depending on the number of modules, not to mention barcodes in which the number of modules constituting one character is fixed (for example, EAN-13, EAN-8, UPC-A, etc.) In addition, it is possible to correct even a barcode whose number of modules is not fixed.

そして、異常幅値集団を構成する各バーの異常幅値Wを、各正常幅値集団を構成する各バーの平均幅値W,Wとの差に基づいて補正処理により補正するように構成されている。このように、各正常幅値集団の各バーの平均幅値W,Wを用いることで、各正常幅値集団の各バーの幅値にバラツキがあっても、異常幅値集団を構成する各バーの異常幅値Wが適切に補正され、読取精度の低下を抑制することができる。 Then, the abnormal width value W k of each bar constituting the abnormal width value group is corrected by a correction process based on the difference between the average width values W a and W b of each bar constituting each normal width value group. It is configured. Thus, by using the average width values W a and W b of each bar of each normal width value group, even if the width values of each bar of each normal width value group vary, an abnormal width value group is formed. abnormal width value W k of each bar is properly corrected, it is possible to suppress the reduction in reading accuracy.

さらに、異常幅値集団に対して第1正常幅値集団Cおよび第2正常幅値集団Cが存在するとき、当該異常幅値集団を構成する各バーの異常幅値Wが、第2平均幅値Wとの差よりも第1平均幅値Wとの差が小さい場合に当該第1平均幅値Wに等しくなるように補正され、第1平均幅値Wとの差よりも第2平均幅値Wとの差が小さい場合に当該第2平均幅値Wに等しくなるように補正される。これにより、異常幅値集団を構成する各バーの異常幅値Wを、当該各幅値にもっとも近い正常幅値集団の平均幅値を用いてそれぞれ適切に補正することができる。 Further, when the first normal width value population C 1 and the second normal width value population C 2 exists for the abnormal width value population, abnormal width value W k of each bar constituting the abnormality width value population, the than the difference between the 2 average width value W b is corrected to be equal to the first average width value W a when the difference between the first average width value W a is small, the first average width value W a It is corrected to be equal the to the second average width value W b when the difference between the second average width value W b is smaller than the difference. Thereby, the abnormal width value W k of each bar constituting the abnormal width value group can be appropriately corrected using the average width value of the normal width value group closest to the respective width value.

また、少数幅値集団に対して第1正常幅値集団Cおよび第2正常幅値集団Cのいずれか一方のみが存在する場合には、当該少数幅値集団の各バーの幅値が、存在する一方の正常幅値集団の平均幅値とこの平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて補正される。これにより、例えば、少数幅値集団の各バーの幅値が各正常幅値集団の平均幅値よりも大きいことから第2正常幅値集団Cが存在せず第1正常幅値集団Cのみが存在する場合でも、この第1正常幅値集団Cの第1平均幅値Wとこの第1平均幅値Wとの差が小さい他の正常幅値集団の平均幅値とに基づいて少数幅値集団の各バーの幅値を適切に補正することができる。 In the case of either one only first normal width value population C 1 and the second normal width value population C 2 exists for the minority width value population, the width values of the bars of the small width value population The correction is made based on the average width value of one normal width value group that exists and the average width value of another normal width value group in which the difference between the average width values is small. Thereby, for example, since the width value of each bar of the minor width value group is larger than the average width value of each normal width value group, the second normal width value group C 2 does not exist and the first normal width value group C 1 Even when only the first average width value W a is present, the first average width value W a of the first normal width value group C 1 and the average width value of another normal width value group having a small difference between the first average width value W a Based on this, the width value of each bar of the minority width value group can be appropriately corrected.

そして、異常幅値集団を構成する各バーの異常幅値Wを、当該異常幅値Wに対する第1平均幅値Wの差と当該異常幅値Wに対する第2平均幅値Wの差とが近似する場合には、当該異常幅値Wのバーを含むキャラクタの規定幅値と、当該キャラクタに含まれる他のバーの幅値とに基づいて個別補正処理により補正するように構成されている。これにより、異常幅値Wに対する両平均幅値W,Wの差が近似していることから、当該異常幅値Wが両平均幅値W,Wのどちらにも補正されうる可能性がある場合であっても、異常幅値Wを、当該異常幅値Wのバーを含むキャラクタの規定幅値とこのキャラクタに含まれる他のバーの幅値とに基づいて、第1平均幅値Wもしくは第2平均幅値Wのいずれか一方に適切に補正することができる。 Then, the abnormal width value W k of each bar constituting the abnormality width value population, the abnormal width value W first average width for the k-value W second average width value for the difference and the abnormal width value W k of a W b if the difference is approximated, as corrected by the individual correction processing based on the the specified width value of the character comprising a bar of abnormal width value W k, the width values of the other bar included in the character It is configured. Thus, since the difference between the average width values W a and W b with respect to the abnormal width value W k is approximate, the abnormal width value W k is corrected to both the average width values W a and W b. Even if there is a possibility, the abnormal width value W k is calculated based on the specified width value of the character including the bar of the abnormal width value W k and the width values of other bars included in the character. It is possible to appropriately correct either the first average width value W a or the second average width value W b .

なお、本発明は上記実施形態に限定されるものではなく、以下のように具体化してもよく、その場合でも、上記実施形態と同等の作用・効果が得られる。
上記実施形態では、EAN−13のバーコードを一例に挙げて説明したが、読み取り対象のバーコードはこれに限らず、EAN−8、UPC−A、CODE−39、CODE−128などのバーコードにおいても上記作用効果を奏する。このようにEAN−13と異なる規格のバーコードを読み取り対象とする場合には、上記ステップS211における個別補正処理では、その規定幅値等の規格に応じた補正が実施される。
In addition, this invention is not limited to the said embodiment, You may actualize as follows, and even in that case, an effect | action and effect equivalent to the said embodiment are acquired.
In the above embodiment, the barcode of EAN-13 has been described as an example. However, the barcode to be read is not limited to this, and barcodes such as EAN-8, UPC-A, CODE-39, and CODE-128 are used. Also has the above-mentioned effects. In this way, when a barcode with a standard different from EAN-13 is to be read, in the individual correction process in step S211, correction according to the standard such as the specified width value is performed.

10…光学的情報読取装置
28…受光センサ(受光手段)
40…制御回路(幅値演算手段,デコード手段,集団作成手段,第1判定手段,第2判定手段、補正手段)
,C…正常幅値集団
,S…少数幅値集団(異常幅値集団)
B…バーコード
R…対象物
…第1平均幅値
…第2平均幅値
…異常幅値
DESCRIPTION OF SYMBOLS 10 ... Optical information reader 28 ... Light receiving sensor (light receiving means)
40. Control circuit (width value calculation means, decoding means, group creation means, first determination means, second determination means, correction means)
C 1 , C 2 ... normal width value group S 1 , S 2 ... minority width value group (abnormal width value group)
B ... Barcode R ... object W a ... first average width value W b ... second average width value W k ... abnormal width value

Claims (5)

1または2以上の単位モジュールからなる暗色系および明色系の各領域が複数配列されて構成されるキャラクタを複数有するバーコードを読み取り可能な光学的情報読取装置であって、
前記バーコードからの反射光を受光する受光手段と、
前記受光手段から出力される受光信号に基づいて前記各領域の幅値をそれぞれ演算する幅値演算手段と、
前記各幅値に基づいて前記各キャラクタをデコードするデコード手段と、
前記各領域のうち前記幅値が近似する領域のみから構成される集団を複数作成する集団作成手段と、
前記集団作成手段により作成された各集団のうち、前記各領域の総数が前記バーコードを構成する同一幅値の領域の総数とみなされる所定数以上の集団を正常幅値集団と判定し、前記各領域の総数が前記所定数未満の集団を少数幅値集団と判定する第1判定手段と、
前記各少数幅値集団のうち、前記各正常幅値集団の前記各領域の幅値との差に基づいて異常な幅値と判断される領域で構成される集団を異常幅値集団と判定する第2判定手段と、
前記異常幅値集団を構成する前記各領域の幅値を、前記各正常幅値集団の少なくともいずれか1つを構成する前記各領域の幅値との差に基づいて補正する補正手段と、
を備え、
前記デコード手段は、前記幅値演算手段により演算された前記各領域の前記幅値に基づく前記キャラクタのデコードが失敗した場合に、前記補正手段により補正した補正幅値を用いて再デコードすることを特徴とする光学的情報読取装置。
An optical information reading apparatus capable of reading a barcode having a plurality of characters each formed by arranging a plurality of dark color and light color regions composed of one or more unit modules,
A light receiving means for receiving reflected light from the barcode;
Width value calculating means for calculating the width value of each region based on a light receiving signal output from the light receiving means;
Decoding means for decoding each character based on each width value;
A group creating means for creating a plurality of groups composed of only the regions of which the width value approximates among the regions;
Among the groups created by the group creating means, a group of a predetermined number or more that is regarded as the total number of the regions of the same width value constituting the barcode is determined as a normal width value group, First determination means for determining a group in which the total number of each region is less than the predetermined number as a minority width value group;
Among the minority width value groups, a group composed of regions determined to be abnormal width values based on the difference between the width values of the respective regions of the normal width value groups is determined as an abnormal width value group. A second determination means;
Correction means for correcting the width value of each region constituting the abnormal width value group based on a difference from the width value of each region constituting at least one of the normal width value group,
With
The decoding means re-decodes using the correction width value corrected by the correction means when decoding of the character based on the width value of each area calculated by the width value calculation means fails. An optical information reading device.
前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、前記各正常幅値集団の少なくともいずれか1つを構成する前記各領域の平均幅値との差に基づいて補正することを特徴とする請求項1に記載の光学的情報読取装置。   The correction means corrects the width value of each region constituting the abnormal width value group based on a difference from the average width value of each region constituting at least one of the normal width value groups. The optical information reader according to claim 1. 前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、
当該幅値との差が小さい平均幅値の領域から構成される正常幅値集団であって、当該幅値よりも小さい平均幅値の正常幅値集団である第1正常幅値集団と当該幅値よりも大きい平均幅値の正常幅値集団である第2正常幅値集団が存在し、これら第1正常幅値集団および第2正常幅値集団の平均幅値を第1平均幅値および第2平均幅値とするとき、
前記第2平均幅値との差よりも前記第1平均幅値との差が小さい場合に当該第1平均幅値に等しくなるように補正し、前記第1平均幅値との差よりも前記第2平均幅値との差が小さい場合に当該第2平均幅値に等しくなるように補正することを特徴とする請求項1または2に記載の光学的情報読取装置。
The correction means, the width value of each region constituting the abnormal width value group,
A first normal width value group, which is a normal width value group composed of areas of average width values having a small difference from the width value, and is a normal width value group having an average width value smaller than the width value, and the width There is a second normal width value group that is a normal width value group having an average width value larger than the value, and the average width values of the first normal width value group and the second normal width value group are set as the first average width value and the first normal width value group. 2 When setting the average width value
When the difference from the first average width value is smaller than the difference from the second average width value, the correction is made to be equal to the first average width value, and the difference from the first average width value is more than the difference from the first average width value. 3. The optical information reading apparatus according to claim 1, wherein when the difference from the second average width value is small, correction is performed so as to be equal to the second average width value. 4.
前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、当該幅値に対して前記第1正常幅値集団および前記第2正常幅値集団のいずれか一方のみが存在する場合には、存在する一方の正常幅値集団の平均幅値と、この平均幅値との差が小さい他の正常幅値集団の平均幅値とに基づいて補正することを特徴とする請求項3に記載の光学的情報読取装置。   The correction means includes only one of the first normal width value group and the second normal width value group for the width value of each region constituting the abnormal width value group. In this case, the correction is performed based on the average width value of one existing normal width value group and the average width value of another normal width value group in which a difference between the average width value is small. 4. The optical information reading device according to 3. 前記補正手段は、前記異常幅値集団を構成する前記各領域の幅値を、当該幅値に対する前記第1平均幅値の差と当該幅値に対する前記第2平均幅値の差とが近似する場合には、当該幅値の領域を含むキャラクタの規定幅値と、当該キャラクタに含まれる他の領域の幅値とに基づいて補正することを特徴とする請求項3に記載の光学的情報読取装置。   The correction means approximates the width value of each region constituting the abnormal width value group by a difference between the first average width value with respect to the width value and a difference between the second average width value with respect to the width value. 4. The optical information reading according to claim 3, wherein the correction is performed based on a prescribed width value of the character including the area of the width value and a width value of another area included in the character. apparatus.
JP2009252801A 2009-11-04 2009-11-04 Optical information reader Expired - Fee Related JP5240161B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009252801A JP5240161B2 (en) 2009-11-04 2009-11-04 Optical information reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009252801A JP5240161B2 (en) 2009-11-04 2009-11-04 Optical information reader

Publications (2)

Publication Number Publication Date
JP2011100192A JP2011100192A (en) 2011-05-19
JP5240161B2 true JP5240161B2 (en) 2013-07-17

Family

ID=44191332

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009252801A Expired - Fee Related JP5240161B2 (en) 2009-11-04 2009-11-04 Optical information reader

Country Status (1)

Country Link
JP (1) JP5240161B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2738098B2 (en) * 1990-01-08 1998-04-08 株式会社デンソー Optical scanning device
JP3550807B2 (en) * 1995-06-16 2004-08-04 株式会社デンソー Barcode decoding method

Also Published As

Publication number Publication date
JP2011100192A (en) 2011-05-19

Similar Documents

Publication Publication Date Title
JP2007079781A (en) Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
US8718370B2 (en) Optical information-reading apparatus and optical information-reading method
JP2010086182A (en) Optical information reader
JP5240161B2 (en) Optical information reader
JP5195539B2 (en) Optical information reader
JP2011081832A (en) Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
JP5187382B2 (en) Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus
JP5585400B2 (en) Optical information reader
JP5379626B2 (en) Stack bar code information reading method and stack bar code information reading device
JP4957616B2 (en) Two-dimensional code reader
JP2011008574A (en) Optical information reader
JP5195264B2 (en) Bar code reading method and bar code reading apparatus
JP2009076031A (en) Optical information reader
JP5218316B2 (en) Optical information reader
JP5240124B2 (en) Optical information reader
JP5644633B2 (en) Optical information reader
US20110220721A1 (en) Method and apparatus for reading barcode information
JP5104557B2 (en) Optical information reader
JP5724771B2 (en) Optical information reader
JP5152086B2 (en) Bar code reading method and bar code reading apparatus
JP2766768B2 (en) Barcode decoder decoding method
JP4155156B2 (en) Bar code reader and bar code discrimination method
JP2012123501A (en) Optical information reading apparatus
JP2010049321A (en) Optical information reader
JP5895340B2 (en) Optical information reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120131

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130222

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130318

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

Free format text: PAYMENT UNTIL: 20160412

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5240161

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees