[go: up one dir, main page]

JP2008021009A - Bar code recognition device, method and program - Google Patents

Bar code recognition device, method and program Download PDF

Info

Publication number
JP2008021009A
JP2008021009A JP2006190552A JP2006190552A JP2008021009A JP 2008021009 A JP2008021009 A JP 2008021009A JP 2006190552 A JP2006190552 A JP 2006190552A JP 2006190552 A JP2006190552 A JP 2006190552A JP 2008021009 A JP2008021009 A JP 2008021009A
Authority
JP
Japan
Prior art keywords
character
barcode
characters
bar
decoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006190552A
Other languages
Japanese (ja)
Inventor
Riyouko Usuha
亮子 薄葉
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2006190552A priority Critical patent/JP2008021009A/en
Publication of JP2008021009A publication Critical patent/JP2008021009A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To raise possibility of decoding as much as possible even if there exist partly thick parts or thin parts in each bar of a read bar code. <P>SOLUTION: A plurality of scan lines are set to a bar code image, and decoding is performed along with each of these scan lines. Then a majority is taken for every character in the decoding result. The most common decoding result value is adopted as a decoding result of the character concerned. When there is a character which cannot be decided by majority, a scan line is added and the character is decoded along with the added scan lines, and the decoding result is added and the majority is taken again. The scan line is added until the decoding result is decided by majority. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、1次元バーコードの認識のための装置に関する。   The present invention relates to an apparatus for recognition of a one-dimensional barcode.

1次元バーコード(以下、単に「バーコード」と呼ぶ)を認識しやすくするため、バーコード読取結果を最適な閾値で二値化する手法は数多く提案されている。しかし近年、大量の紙文書の電子化が進むにつれ、データ量を小さくするために、帳票などの画像は二値・低解像度でスキャンされる場合が多い。このように二値化されて入ってくる画像の場合、文字や写真などに最適化される場合が多く、バーコードに適した閾値で二値化をされているとは限らない。その場合、個々のバーが部分的に太ったり細ったりしていることが多い。   In order to make it easy to recognize a one-dimensional bar code (hereinafter simply referred to as “bar code”), many methods for binarizing a bar code reading result with an optimum threshold have been proposed. However, in recent years, as a large amount of paper documents have been digitized, images such as forms are often scanned with binary and low resolution in order to reduce the amount of data. In the case of an image that has been binarized in this way, it is often optimized for characters, photographs, etc., and binarization is not always performed with a threshold suitable for barcodes. In that case, the individual bars are often partially thick or thin.

二値化されている場合に限ることではないが、このように部分的に太りや細りのあるバーコードの認識では、認識精度を上げるために多数決の手法を採る従来技術が知られている。   Although not limited to the case of binarization, there is known a conventional technique in which a majority vote method is used to increase recognition accuracy in the recognition of barcodes that are partially thick or thin.

例えば、特許文献1に示される装置は、二値で入力されたバーコード画像において、バー長さ方向の各ラインを、それぞれそのライン上の所定画素数のうち予め設定した割合以上の画素が黒画素なら黒ラインとし、それに満たない場合は白ラインとしている。黒ラインがバー配列方向に連続する数によりその黒バーの太さが判定され、同様にして白バーの太さが判定される。これは、多数決により各ラインの白黒を判定するものである。   For example, in the apparatus disclosed in Patent Document 1, in a barcode image input in binary, each line in the bar length direction has black pixels that are equal to or greater than a predetermined ratio of a predetermined number of pixels on each line. If it is a pixel, it is a black line, otherwise it is a white line. The thickness of the black bar is determined by the number of continuous black lines in the bar arrangement direction, and the thickness of the white bar is determined in the same manner. This is to determine the black and white of each line by majority vote.

また特許文献2に示される手法では、複数個の同一のバーコードを読み取った後、バーコード認識手段にて前記読み取ったバーコードから文字コードを認識する。その後、文字コード正否判断手段において認識された複数の文字コードを比較し、過半数の文字コードが同一であるとき、その同一の文字コードを正しいと判断する。   In the method disclosed in Patent Document 2, after a plurality of identical barcodes are read, a character code is recognized from the read barcode by a barcode recognition means. Thereafter, a plurality of character codes recognized by the character code correctness determination means are compared, and when the majority of the character codes are the same, it is determined that the same character code is correct.

また特許文献3に示される装置は、バーの配列方向に延びる走査ラインを複数設定し、各走査ラインに沿ってバーコードをデコードし、各走査ラインのデコード結果の多数決を採る。また、走査ライン単位でチェックディジットによるバーコード検査し、バーコードの成立条件が満たされない場合、2つの走査ラインを組み合わせ、バーコード規格の成立条件によって検査し、2つの走査ラインの対応するブロックの間で、成立条件を満たしていない不成立ブロックを満たしている成立ブロックに置き換えてバーコードイメージを合成し、バーコード成立条件による検査を施す。   The apparatus disclosed in Patent Document 3 sets a plurality of scanning lines extending in the bar arrangement direction, decodes a barcode along each scanning line, and takes the majority of the decoding results of each scanning line. Also, if the bar code is inspected in units of scan lines and the bar code establishment condition is not satisfied, the two scan lines are combined and inspected according to the bar code standard establishment condition, and the corresponding block of the two scan lines In the meantime, the barcode image is synthesized by replacing the established block that does not satisfy the establishment condition with the establishment block that satisfies the establishment condition, and the inspection is performed according to the barcode establishment condition.

特許文献4には、バーコード・シンボルのバーとスペースに実質的に平行な第1の走査線を選択するステップと、上記第1の走査線に沿って上記シンボルを走査して第1の値を発生するステップと、バーコード・シンボルのバーとスペースに実質的に平行で、且つ上記第1の走査線との距離がイメージのピクセルの幅よりも小さい第2の走査線を選択するステップと、上記第2の走査線に沿って上記シンボルを走査して第2の値を発生するステップと、上記第1の値と第2の値に従って上記シンボルをデコードするステップと、からなるピクセル・イメージのバーコード・シンボルを読み取る方法、が記載されている。   Patent Document 4 discloses a step of selecting a first scanning line substantially parallel to a bar and space of a bar code symbol, and scanning the symbol along the first scanning line to obtain a first value. And selecting a second scan line that is substantially parallel to the bar and space of the bar code symbol and that has a distance from the first scan line that is less than the width of the image pixels. A pixel image comprising: scanning the symbol along the second scan line to generate a second value; and decoding the symbol according to the first value and the second value. A method for reading a bar code symbol is described.

特許文献5には、バーコード読取り装置と関連部品が、異なる光反射率の一連の直線要素から成るバーコード記号を走査し、前記バーコード記号の表現を生成し、前記バーコード記号の表現を復号して復号可能な合法文字(復号不能な文字は全て非合法)を含む合法文字メッセージを作ろうと試みるためにバーコード記号を復号する方法であって、前記記号を横切る第1走査経路に対応するバーコード記号の第1表現を保存すること、前記記号を横切る第2走査経路に対応するバーコード記号の第2表現を保存すること、および前記第1表現の非合法文字の少なくとも1個の要素を前記第2表現の対応する文字の少なくとも1個の要素で置換することにより、改善された表現を作ること、の諸ステップから成る方法、が開示されている。   In Patent Document 5, a barcode reader and related components scan a barcode symbol composed of a series of linear elements having different light reflectances, generate a representation of the barcode symbol, and represent the representation of the barcode symbol. A method of decoding a bar code symbol to attempt to create a legal character message containing legal characters that can be decoded and decoded (all undecipherable characters are illegal), corresponding to a first scanning path across the symbol Storing a first representation of the barcode symbol to be stored, storing a second representation of the barcode symbol corresponding to a second scanning path across the symbol, and at least one illegal character of the first representation A method comprising the steps of creating an improved representation by replacing an element with at least one element of the corresponding character of the second representation is disclosed.

特開2005−165948号公報JP 2005-165948 A 特開2000−251011号公報JP 2000-251111 A 特開2001−043300号公報JP 2001-043300 A 特開平10−187876号公報Japanese Patent Laid-Open No. 10-187876 特開平03−189787号公報Japanese Patent Laid-Open No. 03-189787

特許文献1の方式では、図1のバー100のようにバーの長手方向に沿った大半の部分でバーが細っている場合(あるいは過半数で太っている場合)、その影響を受けてバーの太さが誤判定されてしまい、これがデコードの失敗に繋がる。特に、バーコード画像が低解像度である場合、このような太りや細りの悪影響を受けやすい。   In the method disclosed in Patent Document 1, when the bar is thin (or thick in the majority) in the most part along the longitudinal direction of the bar as in the bar 100 of FIG. 1, the thickness of the bar is affected by the influence. Is erroneously determined, which leads to decoding failure. In particular, when the barcode image has a low resolution, it is easy to be adversely affected by such thickening and thinning.

また、特許文献2のように文字コードごとの多数決を採る方式では、各バーの太り、細りにより、走査ラインをどのようにとってもバーコード全体をデコードできない場合がある。例えば、図2に示すバーコードでは、例えばバー100とバー102とは、それぞれバーの長手方向における異なる位置で細っているため、走査ラインをA,Bいずれのラインにとっても、走査ラインに沿ってバーコード全体をデコードすることはできない。例えばラインAでは左から4つ目のキャラクタがデコード不可となっており、ラインBでは左端のキャラクタがデコード不可となっている。各バーの太りや細りの組合せが悪いと、走査ラインをどのようにとってもバーコード全体をデコードできなくなる。特に、低解像度の画像ほど、そのような不具合が顕著になる。   Further, in the method of adopting the majority vote for each character code as in Patent Document 2, there are cases where the entire bar code cannot be decoded regardless of the scanning line due to the thickness or thinness of each bar. For example, in the barcode shown in FIG. 2, for example, the bar 100 and the bar 102 are thin at different positions in the longitudinal direction of the bar, so that the scanning line is along the scanning line for both the A and B lines. The entire barcode cannot be decoded. For example, in line A, the fourth character from the left cannot be decoded, and in line B, the leftmost character cannot be decoded. If the combination of the thickness and thinness of each bar is bad, the entire barcode cannot be decoded regardless of the scanning line. In particular, such a problem becomes more prominent in a low-resolution image.

また、特許文献3の技術では、成立ブロックは、同文献の段落(0002)や(0015)、(0016)の記載からすれば、バー(黒バー)及びスペース(白バー)の幅が適切か否かにより判別している。そして、段落(0014)によれば、不成立ブロックを成立ブロックに入れ換えた後、更にチェックディジットによりバーコード全体での成立性を判定している。結局、特許文献3の技術は、チェックディジットが含まれるバーコードでないと、最終的に適切なコード認識ができない。   Further, in the technique of Patent Document 3, according to the description in paragraphs (0002), (0015), and (0016) of the document, whether the width of the bar (black bar) and the space (white bar) is appropriate. It is determined by whether or not. Then, according to paragraph (0014), after the non-established block is replaced with the established block, the feasibility of the entire barcode is further determined by the check digit. After all, the technique of Patent Document 3 cannot finally recognize a proper code unless it is a bar code including a check digit.

特許文献4及び5の方法では、2つの走査ラインにおいて同じ文字がそれぞれ異なる値にデコードされた場合に、どちらが適切かを決定することができない。   In the methods of Patent Documents 4 and 5, when the same character is decoded into different values in two scanning lines, it is impossible to determine which one is appropriate.

本発明は、チェックディジット等の付加的な情報が含まれていないバーコードについても、デコードできる可能性を高めることを目的とする。   An object of the present invention is to increase the possibility of decoding a barcode that does not include additional information such as a check digit.

(1)本発明の1つの側面では、複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードするデコード部と、前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する決定部と、を備えるバーコード認識装置を提供する。 (1) In one aspect of the present invention, a decoding unit that decodes an image of a barcode including a plurality of characters along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar; For each character position of the barcode image, in the decoding result of each scanning line obtained by the decoding unit for the code part at that character position, the code part of the code part is based on the character that occupies the maximum proportion of the characters successfully decoded. There is provided a bar code recognition device comprising: a determination unit that determines a character string by determining a character string.

(2)1つの態様では、上記構成(1)において、前記決定部は、前記複数の走査ラインにおいて、あるキャラクタ位置のコード部分についての各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合のキャラクタが複数存在する場合、そのキャラクタ位置について、最大割合を占めるキャラクタが1つになるまで、前記複数の走査ラインとは前記バーの長手方向について異なる位置に更なる1以上の走査ラインを追加して、追加した走査ラインについて前記コード部分のデコードを前記デコード部に行わせる。 (2) In one aspect, in the configuration (1), the determination unit includes, among the plurality of scanning lines, in the decoding result of each scanning line for the code portion at a certain character position, When there are a plurality of characters with the maximum proportion, one or more further scanning lines at different positions in the longitudinal direction of the bar until the number of characters occupying the maximum proportion is one for the character position. And the decoding unit decodes the code portion of the added scanning line.

(3)別の態様では、上記構成(1)において、前記決定部は、前記デコード部による前記複数の走査ラインの各々についてのデコード結果のキャラクタ数をそれぞれ求め、前記各走査ラインについてのキャラクタ数のうちの最大頻度のキャラクタ数に対応する走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定する。 (3) In another aspect, in the configuration (1), the determination unit obtains the number of characters as a result of decoding for each of the plurality of scanning lines by the decoding unit, and determines the number of characters for each scanning line. In the decoding result of the scanning line corresponding to the maximum number of characters, the character of the code portion is determined based on the character that occupies the maximum proportion of the characters that have been successfully decoded.

(4)本発明の別の側面では、複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードし、前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する、バーコード認識方法を提供する。 (4) In another aspect of the present invention, a barcode image including a plurality of characters is decoded along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar, and the barcode For each character position in the image, the character of the code portion is determined based on the character that occupies the maximum proportion of the characters successfully decoded in the decoding result of each scanning line obtained by the decoding portion for the code portion of the character position. Thus, a barcode recognition method for determining a character string represented by the barcode is provided.

(5)本発明の更に別の側面では、複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードし、前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する、処理をコンピュータに実行させるためのプログラムを提供する。 (5) In still another aspect of the present invention, a bar code image including a plurality of characters is decoded along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar. For each character position of the code image, in the decoding result of each scanning line obtained by the decoding unit for the code part of the character position, the character of the code part is determined based on the character that occupies the maximum proportion of the characters successfully decoded. By determining, a program for determining the character string represented by the barcode and causing the computer to execute processing is provided.

上記構成(1)、(4)及び(5)によれば、チェックディジット等の付加的な情報が含まれていないバーコードについても、デコードできる可能性を高めることができる。   According to the above configurations (1), (4), and (5), it is possible to increase the possibility of decoding a barcode that does not include additional information such as a check digit.

上記構成(2)によれば、最初に用いた走査ラインだけではデコード結果を決定できないコード部分に対しても、デコード結果の決定が可能になる。   According to the configuration (2), it is possible to determine the decoding result even for the code portion where the decoding result cannot be determined only by the scan line used first.

上記構成(3)によれば、例えばバーコードの画像が走査ラインに対して傾いている場合でも、適切なデコードが可能になる。   According to the configuration (3), for example, even when the barcode image is inclined with respect to the scanning line, appropriate decoding can be performed.

以下、バーコード認識のための本実施形態の処理手順を、図3を参照して説明する。   Hereinafter, the processing procedure of this embodiment for barcode recognition will be described with reference to FIG.

まず、本実施形態のバーコード認識装置に対してバーコードを含む画像が入力される(S1)。バーコード認識装置は、バーコードを含む領域を切り出す(S2)。バーコードを含む領域の切り出しは、公知の手法を含む様々な手法を用いて行うことができる。例えば、画像全体の中でバーコードを含む領域をユーザがあらかじめ指定しておいてもよい。また、一方向に白黒が所定の周波数範囲で繰り返されている領域を、バーコードを含む領域として切り出してもよい。また、特開平5−324896号公報又は特開平8−96059号公報などに示される手法を用いてもよい。   First, an image including a barcode is input to the barcode recognition apparatus of the present embodiment (S1). The barcode recognition device cuts out an area including the barcode (S2). The region including the barcode can be cut out using various methods including a known method. For example, the user may previously specify an area including a barcode in the entire image. In addition, an area where black and white is repeated in one direction in a predetermined frequency range may be cut out as an area including a barcode. Further, a technique disclosed in Japanese Patent Laid-Open No. 5-324896 or Japanese Patent Laid-Open No. 8-96059 may be used.

次にバーコード認識装置は、あらかじめ設定された複数の走査ラインから1つを選び、その走査ラインに沿ってバーコード領域の画像をデコードする(S3)。ここでバーコード認識装置には、バーコード領域の縦方向に沿って異なる所定数(例えば8個)の位置が、走査ラインの位置として登録されている。走査ラインは、そのように登録された各位置から、それぞれ横方向に延びるラインである。   Next, the barcode recognition apparatus selects one of a plurality of preset scanning lines, and decodes the image of the barcode area along the scanning lines (S3). Here, in the barcode recognition apparatus, a predetermined number (for example, eight) different positions along the vertical direction of the barcode area are registered as the positions of the scanning lines. The scanning line is a line extending in the horizontal direction from each of the registered positions.

なお、ここでいう縦方向は、原理的にはバーコードを構成するバーの長手方向であり、横方向は原理的にはそれらバーが配列する方向(バー配列方向と呼ぶ)である。ただし、現実には、バーコードが印刷された紙を読み取る際の紙の傾きなどによる誤差があるので、縦方向、横方向は、バーの長手方向、バー配列方向に厳密に等しくなるとは限らず、その誤差の分だけ異なった方向になることもある。   The vertical direction here is in principle the longitudinal direction of the bars constituting the barcode, and the horizontal direction is in principle the direction in which these bars are arranged (referred to as the bar arrangement direction). However, in reality, there is an error due to the inclination of the paper when reading the paper on which the barcode is printed, so the vertical direction and the horizontal direction are not necessarily exactly equal to the longitudinal direction of the bar and the bar arrangement direction. Depending on the error, the direction may be different.

ステップS3で用いる、各走査ラインの縦方向についての位置は、隣り合う走査ライン同士の距離を所定値以上になるようにあらかじめ定めておく。走査ライン同士があまり近いと、後述する多数決の際に偏りが生じる可能性が高くなるからである。走査ラインは、例えば、バーコード領域の縦方向について均等な間隔で分布するようにする。   The position of each scanning line in the vertical direction used in step S3 is determined in advance so that the distance between adjacent scanning lines is equal to or greater than a predetermined value. This is because if the scanning lines are too close to each other, there is a high possibility that deviation will occur in the majority decision described later. For example, the scanning lines are distributed at equal intervals in the vertical direction of the barcode area.

バーコード認識装置は、あらかじめ設定された複数の走査ラインのすべてについて、S3のデコード処理を繰り返す(S4)。   The bar code recognition apparatus repeats the decoding process of S3 for all of a plurality of preset scanning lines (S4).

デコード処理の具体例を、図4に示す。図4の例では、(a)に示すように、S3及びS4で5つの走査ラインについてデコードを行っている。それら5ラインについてのデコード結果は、(b)に示すようなものとなる。ここで、“*”はスタートコード及びストップコードを示し、“?”はデコード不可能であることを示す。キャラクタがデコード不可能であるとは、バーコード画像のうちそのキャラクタの位置に該当する部分において、太いバーと細いバーの配列パターンが、バーコードで用いるどのキャラクタ(例えば「1,2,3,4,5,6,7,8,9,0,*」)にも対応しないことである。   A specific example of the decoding process is shown in FIG. In the example of FIG. 4, as shown in (a), decoding is performed for five scanning lines in S3 and S4. The decoding results for these five lines are as shown in (b). Here, “*” indicates a start code and a stop code, and “?” Indicates that decoding is impossible. The character cannot be decoded means that in the portion corresponding to the position of the character in the barcode image, the arrangement pattern of the thick bar and the thin bar indicates which character (for example, “1,2,3, 4,5,6,7,8,9,0, * ").

また図4の例では、バーコードが走査ラインの方向に対して少し傾いているので、縦方向についての上端近傍に設定された1番目の走査ラインでは、5キャラクタ目(スタートコードを含む)までしかデコードされていない。これに対し、残りの2〜5番目の走査ラインについては、11キャラクタ(スタートコード及びストップコードを含む)がデコードされている。   In the example of FIG. 4, since the barcode is slightly inclined with respect to the direction of the scanning line, up to the fifth character (including the start code) in the first scanning line set near the upper end in the vertical direction. Only decoded. On the other hand, 11 characters (including a start code and a stop code) are decoded for the remaining second to fifth scan lines.

バーコード認識装置は、S3及びS4で求めた所定数の走査ラインのデコード結果において、最大頻度のキャラクタ数を求め、これを入力されたバーコードのキャラクタ数であると判定する(S5)。図4の例では、11が最大頻度である。バーコード認識装置は、この最大頻度のキャラクタ数に対応する走査ラインを抽出し(S6)、それら抽出した走査ラインのデコード結果の間で、キャラクタごとにデコード結果の多数決を取る(S7)。S7の多数決では、デコード不可能(“?”)となったものは除き、デコードできたキャラクタ値の中で、最大数となるキャラクタ値を最終的に当該キャラクタのデコード結果とする。図4の例では、2〜4番目の走査ラインのデコード結果について、キャラクタごとの多数決を取ることになる。左から1〜5番目、7〜11番目のキャラクタについては、多数決でデコード結果が1つに確定できる。例えば左から5番目のキャラクタは、“4”が3回、“2”が1回なので、デコード結果は“4”に決定される。   The barcode recognition apparatus obtains the maximum number of characters in the decoding result of the predetermined number of scanning lines obtained in S3 and S4, and determines that this is the number of characters of the inputted barcode (S5). In the example of FIG. 4, 11 is the maximum frequency. The bar code recognition device extracts the scanning line corresponding to the maximum number of characters (S6), and takes the majority of the decoding results for each character among the decoding results of the extracted scanning lines (S7). In the majority decision of S7, the character value that becomes the maximum number among the decoded character values is finally set as the decoding result of the character except for those that cannot be decoded ("?"). In the example of FIG. 4, the majority of each character is taken for the decoding results of the second to fourth scanning lines. For the 1st to 5th characters and the 7th to 11th characters from the left, a single decoding result can be determined by majority vote. For example, since the fifth character from the left is “4” three times and “2” once, the decoding result is determined to be “4”.

これに対し左から6番目のキャラクタは、“5”が1回、“8”が1回と同数なので、多数決ではデコード結果を決定することができない。   On the other hand, the sixth character from the left has the same number as “5” once and “8” once, so the decoding result cannot be determined by majority vote.

バーコード認識装置は、S7におけるキャラクタごとの多数決の結果において、すべてのキャラクタがデコードできたかどうかを判定する(S8)。そして、デコードできなかったキャラクタが存在する場合は、そのような未解決のキャラクタに対し、走査ラインを追加して多数決によるデコードを試みる(S9)。追加する走査ラインは、S3及びS4で用いた走査ライン同士の間に追加してもよいし、図4の(a)に「追加ライン」として示したようにそれら走査ラインの分布域の外側に設定してもよい。S9で追加する走査ラインの数は、1本でも、あらかじめ定められた複数本でもよい。走査ラインを追加する位置(縦方向についての位置)は、あらかじめバーコード認識装置に設定されている。走査ラインを追加する位置は、例えば既存の走査ラインに対してあらかじめ定められた距離以上離れた位置となるように定めておく。   The bar code recognition apparatus determines whether all characters have been decoded in the result of the majority decision for each character in S7 (S8). If there is a character that could not be decoded, a scan line is added to such an unresolved character to try decoding by majority vote (S9). The scan lines to be added may be added between the scan lines used in S3 and S4, or as shown as "additional lines" in FIG. It may be set. The number of scan lines added in S9 may be one or a plurality of predetermined lines. The position for adding the scanning line (position in the vertical direction) is set in advance in the barcode recognition device. The position at which the scan line is added is determined so as to be a position separated by a predetermined distance or more from the existing scan line, for example.

図4の例では、追加ラインに沿った6番目のキャラクタのデコード結果は5となる。したがって、既存の各走査ラインに沿った6番目のキャラクタのデコード結果も合わせて、デコードできたキャラクタ値の多数決を取ると(S7)、“5”が6番目のキャラクタの最終的なデコード結果として決定される。図4の例では、これで全11個のキャラクタがデコードできたのでS8の判定結果が肯定(Yes)となり、バーコードのデコードを終了する。   In the example of FIG. 4, the decoding result of the sixth character along the additional line is 5. Therefore, when the majority result of the decoded character value is taken together with the decoding result of the sixth character along each existing scanning line (S7), "5" is the final decoding result of the sixth character. It is determined. In the example of FIG. 4, since all 11 characters have been decoded in this way, the determination result in S8 becomes affirmative (Yes), and the decoding of the barcode ends.

S9で走査ラインを追加してデコードを行っても、未解決のキャラクタがデコードできなかった場合は、再度S9で更に走査ラインを追加して、その未解決キャラクタのデコードを試みる。未解決のすべてのキャラクタのデコードが完了するまで、S7〜S9の処理を繰り返す。   If an unresolved character cannot be decoded even after adding a scan line in S9 and decoding, an additional scan line is added again in S9 and an attempt is made to decode the unresolved character. The processes of S7 to S9 are repeated until decoding of all unresolved characters is completed.

以上の例では、各走査ラインでのキャラクタのデコード結果のうち最も多いキャラクタ値をそのキャラクタの最終的なデコード結果に採用したが、単に最大数となるものを採用するのではなく、その最大数がデコードできたものの中で所定割合(例えば過半数)以上である場合にのみ、その最大数のキャラクタ値をデコード結果として採用してもよい。   In the above example, the largest character value among the decoding results of the characters on each scanning line is adopted as the final decoding result of the character. However, the maximum number is not used instead of the maximum number. The maximum number of character values may be adopted as a decoding result only when a predetermined ratio (for example, a majority) or more among those that can be decoded.

以上に説明したバーコード認識の処理は、典型的には、コンピュータにて上述の各ステップの処理内容を記述したプログラムを実行することにより実現される。コンピュータは、例えば、ハードウエアとして、CPU(中央演算装置)、メモリ(一次記憶)、各種I/O(入出力)インタフェース等がバスを介して接続された回路構成を有する。また、そのバスに対し、例えばI/Oインタフェース経由で、ハードディスクドライブや、CDやDVD、フラッシュメモリなどの各種規格の可搬型の不揮発性記録媒体を読み取るためのディスクドライブが接続される。このようなドライブは、メモリに対する外部記憶装置として機能する。実施形態の処理内容が記述されたプログラムがCDやDVD等の記録媒体を経由して、又はネットワーク経由で、ハードディスクドライブ又は他の方式の不揮発性記憶装置などの固定記憶装置に保存され、コンピュータにインストールされる。固定記憶装置に記憶されたプログラムがメモリに読み出されCPUにより実行されることにより、上記実施形態の処理が実現される。   The barcode recognition process described above is typically realized by executing a program that describes the processing content of each step described above on a computer. The computer has, for example, a circuit configuration in which a CPU (Central Processing Unit), a memory (primary storage), various I / O (input / output) interfaces and the like are connected via a bus as hardware. Also, a hard disk drive and a disk drive for reading portable nonvolatile recording media of various standards such as a CD, a DVD, and a flash memory are connected to the bus via, for example, an I / O interface. Such a drive functions as an external storage device for the memory. A program in which the processing content of the embodiment is described is stored in a fixed storage device such as a hard disk drive or other type of nonvolatile storage device via a recording medium such as a CD or a DVD, or via a network, and is stored in a computer. Installed. The program stored in the fixed storage device is read into the memory and executed by the CPU, whereby the processing of the above embodiment is realized.

本実施形態のバーコード認識装置は、例えば、そのようなプログラムがインストールされたコンピュータとして実現することができる。この装置は、スキャナからスキャンされた画像を受け取り、この画像に対して図3に示したような処理を行えばよい。また、デジタル複写機又はデジタル複合機等のように、スキャナ機能とプリンタ機能とを兼ね備えた装置に対し、上述のようなプログラムをインストールして実行させてもよい。   The barcode recognition apparatus according to the present embodiment can be realized as a computer in which such a program is installed, for example. This apparatus may receive the scanned image from the scanner and perform the processing as shown in FIG. 3 on this image. Further, the above-described program may be installed and executed in an apparatus having both a scanner function and a printer function, such as a digital copying machine or a digital multifunction machine.

実施形態のバーコード認識装置の機能ブロック図は、例えば、図5に示すようなものとなる。このバーコード認識装置20は、スキャナ10が読み取った画像を受け取り、バーコード抽出部21が、その画像に対しS2の処理を施す。走査ライン設定部22は、S3及びS4で用いる初期の複数の走査ラインと、S9で追加する走査ラインの位置を決めるための情報(例えば位置そのもの、又は位置を決めるためのルールの情報)を持っている。デコード部23は、S3〜S9までのデコード処理を行う。このデコード処理において、デコード部23は、走査ライン設定部22を参照して、S3、S9での走査ラインを設定する。バーコード認識装置20の各部は、プログラムにより実現することができる。   A functional block diagram of the barcode recognition apparatus according to the embodiment is, for example, as shown in FIG. The barcode recognition device 20 receives the image read by the scanner 10, and the barcode extraction unit 21 performs the process of S2 on the image. The scanning line setting unit 22 has information for determining the positions of the initial scanning lines used in S3 and S4 and the scanning lines to be added in S9 (for example, the position itself or rule information for determining the position). ing. The decoding unit 23 performs a decoding process from S3 to S9. In this decoding process, the decoding unit 23 refers to the scanning line setting unit 22 and sets the scanning lines in S3 and S9. Each unit of the barcode recognition device 20 can be realized by a program.

部分的な太りや細りのあるバーコードを説明するための図である。It is a figure for demonstrating the barcode with partial weight and thinness. 部分的な太りや細りのあるバーコードが、1つの走査ラインではデコードできないことを説明するための図である。It is a figure for demonstrating that the barcode with a partial thickness or thin cannot be decoded by one scanning line. 実施形態のバーコード認識の処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence of barcode recognition of embodiment. 実施形態の処理手順によるバーコード認識の様子を具体例を用いて示す図である。It is a figure which shows the mode of the barcode recognition by the process sequence of embodiment using a specific example. バーコード認識装置の機能ブロック図である。It is a functional block diagram of a barcode recognition apparatus.

符号の説明Explanation of symbols

10 スキャナ、20 バーコード認識装置、21 バーコード抽出部、22 走査ライン設定部、23 デコード部。   10 scanner, 20 barcode recognition device, 21 barcode extraction unit, 22 scanning line setting unit, 23 decoding unit.

Claims (5)

複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードするデコード部と、
前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する決定部と、
を備えるバーコード認識装置。
A decoding unit that decodes a barcode image including a plurality of characters along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar;
For each character position of the barcode image, in the decoding result of each scanning line obtained by the decoding unit for the code part of the character position, the code part By determining a character, a determination unit that determines a character row represented by the barcode,
A barcode recognition device comprising:
前記決定部は、前記複数の走査ラインにおいて、あるキャラクタ位置のコード部分についての各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合のキャラクタが複数存在する場合、そのキャラクタ位置について、最大割合を占めるキャラクタが1つになるまで、前記複数の走査ラインとは前記バーの長手方向について異なる位置に更なる1以上の走査ラインを追加して、追加した走査ラインについて前記コード部分のデコードを前記デコード部に行わせる、
ことを特徴とする請求項1記載のバーコード認識装置。
In the plurality of scanning lines, when the decoding result of each scanning line for the code portion at a certain character position in the plurality of scanning lines includes a plurality of the maximum proportion of characters that have been successfully decoded, Until one character occupies the maximum ratio, one or more additional scan lines are added at positions different from the plurality of scan lines in the longitudinal direction of the bar, and the code portion is decoded for the added scan lines. To the decoding unit,
The bar code recognition apparatus according to claim 1.
前記決定部は、前記デコード部による前記複数の走査ラインの各々についてのデコード結果のキャラクタ数をそれぞれ求め、前記各走査ラインについてのキャラクタ数のうちの最大頻度のキャラクタ数に対応する走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定する、
ことを特徴とする請求項1記載のバーコード認識装置。
The determination unit obtains the number of characters of the decoding result for each of the plurality of scanning lines by the decoding unit, and decodes the scanning line corresponding to the maximum number of characters among the number of characters for each scanning line. In the result, the character of the code portion is determined based on the character that occupies the maximum proportion of the characters that have been successfully decoded.
The bar code recognition apparatus according to claim 1.
複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードし、
前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する、
バーコード認識方法。
A barcode image including a plurality of characters is decoded along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar,
For each character position of the barcode image, in the decoding result of each scanning line obtained by the decoding unit for the code part of the character position, the code part By determining the character, the character string represented by the barcode is determined.
Bar code recognition method.
複数のキャラクタを含んだバーコードの画像を、バーの長手方向について異なる位置に設定された複数の走査ラインの各々に沿ってそれぞれデコードし、
前記バーコードの画像のキャラクタ位置ごとに、そのキャラクタ位置のコード部分について前記デコード部が求めた各走査ラインのデコード結果において、デコードが成功したキャラクタのうち最大割合を占めるキャラクタに基づきそのコード部分のキャラクタを決定することで、前記バーコードが表すキャラクタの列を決定する、
処理をコンピュータに実行させるためのプログラム。
A barcode image including a plurality of characters is decoded along each of a plurality of scanning lines set at different positions in the longitudinal direction of the bar,
For each character position of the barcode image, in the decoding result of each scanning line obtained by the decoding unit for the code part of the character position, the code part By determining the character, the character string represented by the barcode is determined.
A program that causes a computer to execute processing.
JP2006190552A 2006-07-11 2006-07-11 Bar code recognition device, method and program Pending JP2008021009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006190552A JP2008021009A (en) 2006-07-11 2006-07-11 Bar code recognition device, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006190552A JP2008021009A (en) 2006-07-11 2006-07-11 Bar code recognition device, method and program

Publications (1)

Publication Number Publication Date
JP2008021009A true JP2008021009A (en) 2008-01-31

Family

ID=39076900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006190552A Pending JP2008021009A (en) 2006-07-11 2006-07-11 Bar code recognition device, method and program

Country Status (1)

Country Link
JP (1) JP2008021009A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009096608A1 (en) 2008-01-31 2009-08-06 Canon Kabushiki Kaisha Thin film transistor using an oxide semiconductor and display
JP2011008344A (en) * 2009-06-23 2011-01-13 Toshiba Tec Corp Code symbol reading device and control program thereof
JP2011248930A (en) * 2011-09-14 2011-12-08 Toshiba Tec Corp Code symbol reading device
JP2019049967A (en) * 2017-07-12 2019-03-28 ジック アーゲー Photoelectric code reader and method of reading optical code

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009096608A1 (en) 2008-01-31 2009-08-06 Canon Kabushiki Kaisha Thin film transistor using an oxide semiconductor and display
JP2011008344A (en) * 2009-06-23 2011-01-13 Toshiba Tec Corp Code symbol reading device and control program thereof
JP2011248930A (en) * 2011-09-14 2011-12-08 Toshiba Tec Corp Code symbol reading device
JP2019049967A (en) * 2017-07-12 2019-03-28 ジック アーゲー Photoelectric code reader and method of reading optical code
US11176454B2 (en) 2017-07-12 2021-11-16 Sick Ag Optoelectronic code reader and method for reading optical codes

Similar Documents

Publication Publication Date Title
TWI693551B (en) Two-dimensional code generation method, decoding method and device
US7478746B2 (en) Two-dimensional color barcode and method of generating and decoding the same
JP3592545B2 (en) Image processing apparatus, image processing method, and information recording medium
US8196836B2 (en) Image processing apparatus, image processing method and computer-readable medium
US10621470B2 (en) Methods for optical character recognition (OCR)
US9367782B2 (en) High capacity 2D color barcode and method for decoding the same
TW201432576A (en) Two-dimensional code, system for creation of two-dimensional code, and analysis program
US20070246542A1 (en) Document element repair
KR20160135841A (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
JP2008236200A (en) Image processing apparatus, image processing method, and program
JP6607122B2 (en) Image analysis device
JP4893643B2 (en) Detection method and detection apparatus
JP2008021009A (en) Bar code recognition device, method and program
JP2017191420A (en) Two-dimensional code recording medium and two-dimensional code reading method
JP5470734B2 (en) Image processing apparatus and image processing program
US7969618B2 (en) Image forming apparatus, image forming system, computer readable recording medium, and image forming method
JP2008009907A (en) Bar code recognition device, method and program
JP4032236B2 (en) Image processing apparatus, image processing method, and image processing program
JP2008020947A (en) Bar code area determination device, method, and program
JP4832996B2 (en) Information detection device
JP5176940B2 (en) Image processing apparatus and program
JP4973540B2 (en) Image processing apparatus and image processing program
JP2008513849A (en) Method for decoding bar code symbols using a plurality of scanning lines
JP2005165949A (en) Bar code reading method and bar code reading device
JP2008301115A (en) Image processing apparatus, identifying method, and program