WO2015098241A1 - コード読取装置およびコード読取用プログラム - Google Patents

コード読取装置およびコード読取用プログラム Download PDF

Info

Publication number
WO2015098241A1
WO2015098241A1 PCT/JP2014/077189 JP2014077189W WO2015098241A1 WO 2015098241 A1 WO2015098241 A1 WO 2015098241A1 JP 2014077189 W JP2014077189 W JP 2014077189W WO 2015098241 A1 WO2015098241 A1 WO 2015098241A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
region
unit
barcode
areas
Prior art date
Application number
PCT/JP2014/077189
Other languages
English (en)
French (fr)
Inventor
甲 島澤
健太 中山
Original Assignee
ウイングアーク1st株式会社
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 ウイングアーク1st株式会社 filed Critical ウイングアーク1st株式会社
Priority to CN201480021863.5A priority Critical patent/CN105900111A/zh
Priority to US14/888,142 priority patent/US9582703B2/en
Publication of WO2015098241A1 publication Critical patent/WO2015098241A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1491Methods for optical code recognition the method including quality enhancement steps the method including a reconstruction step, e.g. stitching two pieces of bar code together to derive the full bar code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06018Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking one-dimensional coding
    • G06K19/06028Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking one-dimensional coding using bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1447Methods for optical code recognition including a method step for retrieval of the optical code extracting optical codes from image or text carrying said optical code

Definitions

  • the present invention relates to a code reading device and a code reading program, and is particularly suitable for use in a code reading device that reads a barcode from a photographed image.
  • these bar codes and two-dimensional codes are attached to product packages and used for recognizing products in the distribution process.
  • the code is read by a dedicated code reader, a camera or the like, and decoded into information consisting of numerical values and characters.
  • a technology has also been provided in which a code is displayed on the screen of a mobile terminal such as a mobile phone or a smartphone, and is read and decoded by a dedicated code reader.
  • the QR code (registered trademark; the same applies hereinafter) displayed on the screen is accurate even if the screen of the mobile terminal is specularly reflected or the screen is scratched or dirty.
  • a technique that enables decoding to be performed see, for example, Patent Document 1.
  • an image of the same QR code is displayed on a screen a plurality of times with a time interval, and the images displayed a plurality of times are rotated 90 degrees each time. To display. In this way, even if there is a portion that cannot be read in a part of the QR code, the portion that cannot be read in the first display of the QR code can be read in the second and subsequent displays.
  • this Patent Document 1 also describes that one QR code is divided into a plurality of pieces and images of the divided codes are sequentially displayed on the screen at time intervals.
  • each divided code is read and decoded by a code reader, and a plurality of pieces of data decoded from the respective codes are combined to obtain decoded data of the original QR code.
  • Patent Document 1 can solve the problem that a part of the code displayed on the screen of the mobile terminal cannot be read due to screen dirt or specular reflection.
  • the problem that the code itself in the image taken with the camera cannot be read due to dirt on the code itself attached to the product package or the reflection of the illumination light on the photographed image can be solved. Can not.
  • the present invention has been made to solve such a problem, and the code itself attached to the product package or the like is soiled, or the illumination light is superimposed on the code in the photographed image.
  • the purpose is to be able to read the code accurately even if it is intrusive.
  • a barcode image is divided into a plurality of horizontal areas, a readable area is extracted from each horizontal area, and the extracted areas are combined. By doing so, the entire barcode is restored.
  • the code itself attached to the product package or the like is soiled, or the illumination light is superimposed on the code in the photographed image, and the bar Even if a portion that cannot be read occurs in a part of the code, a plurality of readable areas are partially extracted, and these areas are combined to restore a readable barcode as a whole. As a result, accurate reading can be performed even for barcodes that are partially contaminated or have reflected illumination light.
  • FIG. 1 is a block diagram illustrating a functional configuration example of the code reading apparatus according to the present embodiment.
  • the code reading device 10 according to the present embodiment is mounted on a mobile terminal such as a smartphone or a tablet, for example, and includes an image input unit 1, a region extraction unit 2, a region selection unit 3, and a region combination unit 4 as functional configurations. And a decoding unit 5.
  • the above functional blocks 1 to 5 can be configured by any of hardware, DSP (Digital Signal Processor), and software.
  • DSP Digital Signal Processor
  • each of the functional blocks 1 to 5 is actually configured by including a CPU, RAM, ROM, etc. of a computer, and code stored in a recording medium such as RAM, ROM, hard disk, or semiconductor memory. This is realized by the operation of the reading program.
  • the image input unit 1 inputs a barcode image captured by the camera 15 included in the mobile terminal. For example, when a user captures a barcode attached to a product package with the camera 15, the image input unit 1 inputs the captured image from the camera 15 to the code reading device 10.
  • the area extraction unit 2 divides the bar code photographed image input by the image input unit 1 into a plurality of horizontal areas, and extracts a readable area from each horizontal area.
  • FIG. 2 is a diagram for explaining the operation of the region extraction unit 2.
  • FIG. 2A shows a photographed image of a barcode attached to a product package, and shows a state in which dirt 20 is attached on the barcode.
  • FIG. 2B shows a state where a bar code image with a stain 20 is divided into three equal areas 21, 22, and 23.
  • FIG. 2C shows each horizontal area 21, 22, and 22.
  • 23 shows a state in which readable areas 24 to 28 are extracted from 23, respectively.
  • the readable areas 24 to 28 are, for example, areas where the dirt 20 is not attached at all over the entire length of the black line and the white line.
  • the area extraction unit 2 extracts areas in which the intermediate color is not included in the total length of the black line and the white line as readable areas 24 to 28.
  • the region extraction unit 2 determines whether or not the white area width exceeds the maximum width of the white line, and if so, divides the region there. That is, in the middle horizontal area 22, the area is divided and two readable areas 25 and 26 are extracted. In the lowermost horizontal area 23, the area is divided and two readable areas 27 and 28 are extracted. To do.
  • the region selection unit 3 selects a region suitable for combination by the region combination unit 4 from the plurality of readable regions 24 to 28 extracted by the region extraction unit 2.
  • FIG. 3 is a diagram for explaining the operation of the area selection unit 3.
  • the region suitable for the combination is a minimum region where the entire original barcode can be restored when the combination is performed by the region combining unit 4.
  • the area sorting unit 3 sorts at least the first area 24 including the left end of the barcode and the second area 28 including the right end of the barcode.
  • the region having the longest horizontal width is selected from among the regions. That is, the region 24 having the longest horizontal width is selected from the three readable regions 24, 25, and 27 including the left end.
  • a region having the longest horizontal width is selected from among the regions. That is, the region 28 having the longest horizontal width is selected from the two readable regions 26 and 28 including the right end.
  • the area selection unit 3 determines whether or not there is an overlapping area in the first area 24 and the second area 28 extracted as described above. If there is an overlapping area, the area selecting unit 3 does not select any other area. Since this is the case in FIG. 3, only the first region 24 and the second region 28 are selected by the region selection unit 3.
  • the region selecting unit 3 determines that the first region 31 One or more third regions 33 in an intermediate position connecting the second region 32 are further selected.
  • the third region 33 selected at this time has an overlapping region with the first region 31 and also overlaps with the second region 32. It is preferable that the region has This is because the minimum number of third regions 33 to be selected is sufficient.
  • the third region 33-1 and the third region 33 -2 having an overlapping region at least between the second region 32 are selected. Note that in order to be able to select a plurality of the third regions 33 in this way, the number of divisions of the horizontal area needs to be four or more.
  • the two third regions 33 -1 and 33 -2 to be selected preferably have regions that overlap each other. This is because only two third regions 33 -1 and 33 -2 need to be selected.
  • the area selecting unit 3 further selects another third area at an intermediate position connecting the third areas 33 -1 and 33 -2. .
  • the region combining unit 4 restores the entire barcode by combining the regions selected by the region selecting unit 3. Specifically, the region combining unit 4 combines the line segments in the regions while shifting the positions of the plurality of regions, and adopts the combined state at the position where the degree of matching of the line segments in the plurality of regions is the highest. .
  • FIG. 5 is a diagram for explaining the operation of the region coupling unit 4.
  • 5A to 5C show three states when the positional relationship between the first region 24 and the second region 28 selected by the region selecting unit 3 is shifted in the horizontal direction by one dot. Is shown as a representative.
  • FIG. 5B shows a state in which the degree of matching between the black line in the first region 24 and the black line in the second region 28 is the highest.
  • the region coupling unit 4 adopts the coupling state when the positional relationship of FIG. 5B is used, and the black line in the first region 24 and the black line in the second region 28 are connected. Combine. Specifically, the image of the first area 24 and the image of the second area 28 are combined so that the matching line segments (line segments of the overlapping area) are overlapped with each other. The result is shown in FIG.
  • the entire barcode is restored by performing the above-described processing between two areas having overlapping areas.
  • the entire barcode is restored by performing the above-described processing between two areas having overlapping areas.
  • three regions 31 to 33 are selected as shown in FIG. 4A, line segments are combined between the first region 31 and the third region 33, and the second region 31 A line segment is connected between the region 32 and the third region 33.
  • the decoding unit 5 decodes the barcode restored by the region combining unit 4 and outputs information such as a numerical string and a character string obtained thereby.
  • the barcode restored by the region combination unit 4 has a shorter vertical length (the length of the black and white lines) than the original barcode.
  • the horizontal stripe pattern is completely restored. Since the barcode is read based on the horizontal stripe pattern, the barcode can be correctly decoded even if the length in the vertical direction is shortened as shown in FIG.
  • the captured image of the barcode is divided into a plurality of horizontal areas 21 to 23, and readable areas 24 to 28 are extracted from the horizontal areas 21 to 23, respectively. Further, the regions 24 and 28 suitable for coupling are selected. The entire bar code is restored by combining the selected areas 22 and 28.
  • the barcode itself attached to the product package or the like has dirt 20, and a part of the barcode cannot be read. Even in this case, a barcode image that can be read as a whole can be generated as shown in FIG. As a result, even a barcode that is partially contaminated 20 can be read accurately. Similarly, accurate reading can be performed even if the illumination light is superimposed on the barcode in the captured image.
  • the example in which the areas 24 and 28 suitable for the combination are selected from the plurality of readable areas 24 to 28 and the selected areas 24 and 28 are combined has been described. It is not limited to this.
  • the entire barcode may be restored by combining a plurality of regions 24 to 28 extracted by the region extraction unit 2.
  • the example in which the bar code is divided into three equal horizontal areas 21 to 23 has been described.
  • the number of divisions is merely an example.
  • the region suitable for combining by the region combining unit 4 tends to be long. Therefore, the region may be divided into more than three horizontal areas.
  • the number of divisions may be increased to three when the area selection unit 3 does not have two or less areas from each horizontal area. Then, if the number of areas selected by the area selecting unit 3 from the three horizontal areas is not less than two, the number of areas selected by the area selecting unit 3 is 2 so that the number of divisions is further increased to four. You may make it increase the division
  • the region combining unit 4 always has to combine two or less regions (when only one region is selected by the region selecting unit 3, the connection itself is not necessary). Can reduce the processing load.
  • the criterion for determining whether or not to increase the number of divisions in the horizontal area may be whether or not the number of areas selected by the area selection unit 3 is three or less.
  • the number of divisions is set. You may make it increase to three. If the area including the left end of the barcode or the area including the right end is not extracted by the area extraction unit 2 even if the number of divisions of the horizontal area is increased to 3, the number of divisions is further increased to 4. The number of divisions of the horizontal area may be increased until both the area including the left end of the barcode and the area including the right end are extracted by the area extracting unit 2.
  • the area extracting unit 2 has described an example in which the area that does not include any intermediate color in the entire length of the black line and the white line is extracted as the readable areas 24 to 28. It is not limited. For example, even if the stain 20 is attached to a part of the entire length, a readable area including an area where at least a part of the black line is not contaminated 20 may be extracted. However, in this case, after extracting the readable area, the process of removing the dirt 20 is performed.
  • the process for removing the dirt 20 can be performed as follows, for example. That is, by scanning a region with a neutral color in the vertical direction (black line or white line length direction) one dot at a time in the horizontal direction, and determining whether black or white dots are included in the column, It is determined for each column whether the black line or the white line has the stain 20. Then, for the column with the stain 20 on the black line, the intermediate color of the stain 20 is replaced with black. On the other hand, for the column with the stain 20 on the white line, the intermediate color of the stain 20 is replaced with white.
  • the length in the horizontal direction of the readable area extracted by the area extracting unit 2 becomes longer, and there is a possibility that the number of areas selected by the area selecting unit 3 can be reduced as much as possible. Get higher. Thereby, the processing load at the time of performing line
  • bond part 4 can be reduced.
  • the region extraction unit 2 extracts a readable region, it is possible to easily extract a region including the left end or right end of the barcode.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Character Input (AREA)

Abstract

 バーコードの撮影画像を複数の水平エリアに分割し、各水平エリアの中から読み取り可能な領域をそれぞれ抽出する領域抽出部2と、抽出した複数の領域を結合することによってバーコードの全体を復元する領域結合部4とを備え、バーコードの一部に読み取れない箇所が生じていても、読み取り可能な複数の領域を部分的に抽出し、それらの領域を結合して全体として読み取り可能なバーコードを復元することにより、部分的に汚れや照明光の写り込みがあるバーコードであっても正確な読み取りを行うことができるようにする。

Description

コード読取装置およびコード読取用プログラム
 本発明は、コード読取装置およびコード読取用プログラムに関し、特に、撮影した画像からバーコードの読み取りを行うコード読取装置に用いて好適なものである。
 従来、あらかじめ規定された白線と種々の太さの黒線との組み合せから成る縞模様によって各種の情報を表すバーコードや、複数のドットを縦横に配列してより多くの情報を表すことを可能にした二次元コードは、その読み取りとコード認識が容易であるため、広い分野に利用されている。
 例えば、これらのバーコードや二次元コード(以下、これらをまとめて単にコードという)は、商品のパッケージ等に付され、流通過程において商品を認識するために使われる。この場合、コードは専用のコードリーダやカメラ等によって読み取られ、数値や文字からなる情報にデコードされる。また、最近では、携帯電話やスマートフォン等のモバイル端末の画面上にコードを表示させ、これを専用のコードリーダで読み取ってデコードするようにした技術も提供されている。
 しかしながら、商品のパッケージ等に付されたコードをカメラで読み取る場合、コード自体に汚れが付いていたり、カメラで撮影した画像のコード上に照明光が重なって写り込んでしまったりしていると、コードの正確な読み取りができなくなってしまうという問題があった。
 また、モバイル端末の表示画面に表示させたコードを読み取る場合、表示画面に傷や汚れがあったり、コードリーダからの照明光の入射角度によって表示画面が部分的に鏡面反射を起こしたりすると、コードの正確な読み取りができなくなってしまうという問題があった。
 後者のような問題に鑑みて、モバイル端末の画面に鏡面反射が生じたり、画面に傷や汚れなどが付いていたりしても、画面に表示されたQRコード(登録商標。以下同様)を正確にデコードすることを可能にした技術が提案されている(例えば、特許文献1参照)。この特許文献1に記載の技術では、同一のQRコードの画像を画面上に時間間隔を置いて複数回表示するようにし、かつ、その複数回表示する画像は、各回で互いに90度回転した状態に表示するようにする。このようにすれば、QRコードの一部に読み取れない箇所が生じていても、1回目のQRコードの表示で読み取り不能となった部分が2回目以降の表示で読み取り可能となる。
 また、この特許文献1には、1つのQRコードを複数個に分割し、その分割された各コードの画像を画面上に時間間隔を置いて順に表示することも記載されている。この場合、分割された各コードをコードリーダで読み取ってデコードし、各コードからデコードされた複数のデータを合成することによって、元のQRコードのデコードデータとするようになされている。
特開2004-54581号公報
 上記特許文献1に記載の技術では、モバイル端末の画面上に表示させたコードの一部が画面の汚れや鏡面反射などによって読み取れない場合の問題は解消することが可能である。しかしながら、カメラで撮影された画像内に写ったコードそのものが、商品のパッケージ等に付されたコード自体の汚れや撮影画像への照明光の写り込みなどによって読み取れない場合の問題は解消することができない。
 本発明は、このような問題を解決するために成されたものであり、商品のパッケージ等に付されたコード自体に汚れが付いていたり、撮影画像内のコード上に照明光が重なって写り込んでしまったりしている場合でも、コードの正確な読み取りを行うことができるようにすることを目的とする。
 上記した課題を解決するために、本発明では、バーコードの撮影画像を複数の水平エリアに分割し、各水平エリアの中から読み取り可能な領域をそれぞれ抽出し、抽出した複数の領域を結合することによってバーコードの全体を復元するようにしている。
 上記のように構成した本発明によれば、商品のパッケージ等に付されたコード自体に汚れが付いていたり、撮影画像内のコード上に照明光が重なって写り込んでしまったりして、バーコードの一部に読み取れない箇所が生じていても、読み取り可能な複数の領域が部分的に抽出され、それらの領域が結合されて全体として読み取り可能なバーコードが復元される。これにより、部分的に汚れや照明光の写り込みがあるバーコードであっても正確な読み取りを行うことができる。
本実施形態によるコード読取装置の機能構成例を示すブロック図である。 本実施形態による領域抽出部の動作を説明するための図である。 本実施形態による領域選別部の動作を説明するための図である。 本実施形態による領域選別部の動作を説明するための図である。 本実施形態による領域結合部の動作を説明するための図である。
 以下、本発明の一実施形態を図面に基づいて説明する。図1は、本実施形態によるコード読取装置の機能構成例を示すブロック図である。本実施形態のコード読取装置10は、例えばスマートフォンやタブレット等のモバイル端末に実装されるものであり、その機能構成として、画像入力部1、領域抽出部2、領域選別部3、領域結合部4およびデコード部5を備えている。
 上記各機能ブロック1~5は、ハードウェア、DSP(Digital Signal Processor)、ソフトウェアの何れによっても構成することが可能である。例えばソフトウェアによって構成する場合、上記各機能ブロック1~5は、実際にはコンピュータのCPU、RAM、ROMなどを備えて構成され、RAMやROM、ハードディスクまたは半導体メモリ等の記録媒体に記憶されたコード読取用プログラムが動作することによって実現される。
 画像入力部1は、モバイル端末が備えるカメラ15により撮影されたバーコードの画像を入力する。例えば、商品のパッケージに付されたバーコードをユーザがカメラ15で撮影すると、画像入力部1はその撮影画像をカメラ15からコード読取装置10に入力する。
 領域抽出部2は、画像入力部1により入力されたバーコードの撮影画像を複数の水平エリアに分割し、各水平エリアの中から読み取り可能な領域をそれぞれ抽出する。図2は、この領域抽出部2の動作を説明するための図である。図2(a)は、商品のパッケージに付されたバーコードの撮影画像を示すものであり、バーコード上に汚れ20が付いた状態を示している。
 図2(b)は、汚れ20の付いたバーコードの撮影画像を3つの水平エリア21,22,23に3等分した状態を示し、図2(c)は、各水平エリア21,22,23の中から読み取り可能な領域24~28をそれぞれ抽出した状態を示している。読み取り可能な領域24~28とは、例えば、黒線および白線の全長において汚れ20が全く付着していない領域である。バーコードに汚れ20が付着していると、その汚れ20の部分は黒色でも白色でもない中間色となる。そこで、領域抽出部2は、黒線および白線の全長の中に中間色が含まれていないエリアを読み取り可能な領域24~28として抽出する。
 また、バーコードでは通常、白線として採り得る最大幅が規定されている。そこで、領域抽出部2は、白色のエリア幅が白線の最大幅を超えるかどうかを判定し、超える場合にはそこで領域を分断する。すなわち、真ん中の水平エリア22では領域を分断して2つの読み取り可能な領域25,26を抽出し、一番下の水平エリア23でも領域を分断して2つの読み取り可能な領域27,28を抽出する。
 領域選別部3は、領域抽出部2により抽出された複数の読み取り可能な領域24~28の中から、領域結合部4による結合に適した領域を選別する。図3は、この領域選別部3の動作を説明するための図である。結合に適した領域とは、領域結合部4によって結合を行ったときに元のバーコードの全体を復元可能な最小限の領域である。
 具体的には、領域選別部3は、バーコードの左端を含む第1の領域24と、バーコードの右端を含む第2の領域28とを少なくとも選別する。左端を含む領域が複数ある場合は、その中から横幅が最も長いものを選別する。すなわち、左端を含む3つの読み取り可能な領域24,25,27の中から、横幅が最も長い領域24を選別する。同様に、右端を含む領域が複数ある場合は、その中から横幅が最も長いものを選別する。すなわち、右端を含む2つの読み取り可能な領域26,28の中から、横幅が最も長い領域28を選別する。
 領域選別部3は、以上のようにして抽出した第1の領域24と第2の領域28とに重複領域が存在するか否かを判定する。重複領域が存在する場合、領域選別部3はそれ以外に領域の選別を行わない。図3の場合はこれに該当するので、領域選別部3が選別する領域は第1の領域24および第2の領域28のみである。
 一方、図4に示すように、バーコードの左端を含む第1の領域31と右端を含む第2の領域32とに重複領域が存在しない場合、領域選別部3は、第1の領域と31第2の領域32との間を繋ぐ中間の位置にある1以上の第3の領域33をさらに選別する。このとき選別する第3の領域33は、図4(a)に示すように、第1の領域31との間に重複領域を有し、かつ、第2の領域32との間にも重複領域を有する領域であるのが好ましい。選別する第3の領域33が最小限の1個で済むからである。
 ただし、第1の領域31と第2の領域32との両方に重複する領域が存在しない場合は、図4(b)に示すように、少なくとも第1の領域31との間で重複領域を有する第3の領域33-1と、少なくとも第2の領域32との間で重複領域を有する第3の領域33-2とを選別する。なお、このように第3の領域33を複数選別できるようにするには、水平エリアの分割数を4つ以上とする必要がある。
 図4(b)のように選別する2つの第3の領域33-1,33-2は、互いが重複する領域を持つものであるのが好ましい。選別する第3の領域33-1,33-2が2個で済むからである。なお、2つの第3の領域33-1,33-2との間にも重複領域が存在しない場合、領域選別部3はその間を繋ぐ中間の位置にある別の第3の領域をさらに選別する。
 領域結合部4は、領域選別部3により選別された領域を結合することにより、バーコードの全体を復元する。具体的には、領域結合部4は、複数の領域の位置をずらしながら領域内の線分を結合させていき、複数の領域内の線分の合致度が最も高い位置の結合状態を採用する。
 図5は、この領域結合部4の動作を説明するための図である。図5(a)~(c)は、領域選別部3により選別された第1の領域24と第2の領域28との位置関係を1ドットずつ水平方向にずらしていったときの3つの状態を代表として示している。このうち、図5(b)が、第1の領域24内にある黒線と第2の領域28内にある黒線との合致度が最も高い状態を示している。
 この場合、領域結合部4は、図5(b)の位置関係にあるときの結合状態を採用し、第1の領域24内にある黒線と第2の領域28内にある黒線とを結合させる。具体的には、合致している線分(重複領域の線分)どうしが1つに重ね合されるように、第1の領域24の画像と第2の領域28の画像とを合成する。その結果を示したものが図5(d)である。
 なお、図4のように3つ以上の領域が選別されている場合は、互いに重複領域を有する2つの領域間で上述の処理を行うことによって、バーコードの全体を復元する。例えば、図4(a)のように3つの領域31~33が選別されている場合は、第1の領域31と第3の領域33との間で線分の結合を行うとともに、第2の領域32と第3の領域33との間で線分の結合を行う。
 デコード部5は、領域結合部4により復元されたバーコードをデコードし、それによって得られた数値列や文字列などの情報を出力する。図5(d)に示したように、領域結合部4により復元されたバーコードは、垂直方向の長さ(黒線と白線の長さ)が本来のバーコードよりも短くなっている。ただし、水平方向の縞模様は完全に復元されている。バーコードの読み取りは水平方向の縞模様に基づき行われるので、図5(d)のように垂直方向の長さが短くなっていても、正しくデコードを行うことが可能である。
 以上詳しく説明したように、本実施形態では、バーコードの撮影画像を複数の水平エリア21~23に分割し、各水平エリア21~23の中から読み取り可能な領域24~28をそれぞれ抽出し、さらに結合に適した領域24,28を選別する。そして、選別した領域22,28を結合することによってバーコードの全体を復元するようにしている。
 このように構成した本実施形態によれば、図2(a)のように商品のパッケージ等に付されたバーコード自体に汚れ20が付いていて、バーコードの一部に読み取れない箇所が生じていても、図5(d)のように全体として読み取り可能なバーコードの画像を生成することができる。これにより、部分的に汚れ20があるバーコードであっても、正確な読み取りを行うことができる。同様に、撮影画像内のバーコード上に照明光が重なって写り込んでしまっていても、正確な読み取りを行うことができる。
 なお、上記実施形態では、複数の読み取り可能な領域24~28の中から結合に適した領域24,28を選別し、当該選別した領域24,28を結合する例について説明したが、本発明はこれに限定されない。例えば、領域抽出部2により抽出された複数の領域24~28を結合することによってバーコードの全体を復元するようにしてもよい。ただし、結合させる領域の選別を行った方が結合の際の処理負荷を減らすことができる点で好ましい。
 また、上記実施形態では、バーコードを3つの水平エリア21~23に3等分する例について説明したが、この分割数は単なる例示に過ぎない。分割数を多くした方が、領域結合部4による結合に適した領域が長くなりやすいので、3つより多い水平エリアに分割するようにしてもよい。
 また、最初は2つの水平エリアに分割し、それぞれの水平エリア内から領域選別部3により選別される領域が2つ以下とならない場合に、分割数を3つに増やすようにしてもよい。そして、3つの水平エリア内から領域選別部3により選別される領域が2つ以下とならない場合には、分割数をさらに4つに増やすというように、領域選別部3により選別される領域が2つ以下となるまで水平エリアの分割数を増やしていくようにしてもよい。
 このようにすれば、領域結合部4では常に2つ以下の領域を結合すれば良くなるので(領域選別部3により選別される領域が1つのみの場合は結合自体が不要となる)、結合の際の処理負荷を減らすことができる。なお、水平エリアの分割数を増やすか否かの判断基準は、領域選別部3により選別される領域が3つ以下となるか否かとしてもよい。
 また、最初は2つの水平エリアに分割し、それぞれの水平エリアから領域抽出部2により抽出される読み取り可能な領域の何れにおいてもバーコードの左端または右端が含まれていない場合に、分割数を3つに増やすようにしてもよい。そして、水平エリアの分割数を3つに増やしても、バーコードの左端を含む領域または右端を含む領域が領域抽出部2により抽出されない場合には、分割数をさらに4つに増やすというように、バーコードの左端を含む領域と右端を含む領域との両方が領域抽出部2により抽出されるまで水平エリアの分割数を増やしていくようにしてもよい。
 また、上記実施形態では、領域抽出部2は、黒線および白線の全長において中間色が全く含まれていないエリアを読み取り可能な領域24~28として抽出する例について説明したが、本発明はこれに限定されない。例えば、全長の中の一部に汚れ20が付いていても、黒線の少なくとも一部が汚れ20のない状態となっているエリアも含めて読み取り可能な領域を抽出するようにしてもよい。ただし、この場合は、読み取り可能な領域を抽出した後、汚れ20を除去する処理を行う。
 汚れ20を除去する処理は、例えば以下のようにして行うことが可能である。すなわち、中間色のある領域を水平方向1ドットずつ垂直方向(黒線または白線の長さ方向)にスキャンして、列内に黒色または白色のどちらのドットが含まれているかを判断することにより、黒線または白線のどちらに汚れ20が付いているのかを列ごとに判別する。そして、黒線に汚れ20が付いている列については汚れ20の中間色を黒色に置換する。一方、白線に汚れ20が付いている列については汚れ20の中間色を白色に置換する。
 このようにすれば、領域抽出部2により抽出される読み取り可能な領域の水平方向の長さがより長くなり、領域選別部3により選別される領域の数をできるだけ少なくすることができる可能性が高くなる。これにより、領域結合部4によって線分の結合を行う際の処理負荷を減らすことができる。また、領域抽出部2が読み取り可能な領域を抽出する際に、バーコードの左端または右端を含む領域を抽出しやすくすることもできる。
 その他、上記実施形態は、何れも本発明を実施するにあたっての具体化の一例を示したものに過ぎず、これによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその要旨、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。
 1 画像入力部
 2 領域抽出部
 3 領域選別部
 4 領域結合部
 5 デコード部
 10 コード読取装置

Claims (6)

  1.  バーコードの撮影画像を複数の水平エリアに分割し、各水平エリアの中から読み取り可能な領域をそれぞれ抽出する領域抽出部と、
     上記領域抽出部により抽出された複数の領域を結合することによって上記バーコードの全体を復元する領域結合部と、
     上記領域結合部により復元された上記バーコードをデコードするデコード部とを備えたことを特徴とするコード読取装置。
  2.  上記領域抽出部により抽出された複数の領域の中から、上記領域結合部による結合に適した領域を選別する領域選別部をさらに備え、
     上記領域結合部は、上記領域選別部により選別された領域を結合することによって上記バーコードの全体を復元することを特徴とする請求項1に記載のコード読取装置。
  3.  上記領域選別部は、上記バーコードの左端を含む第1の領域および上記バーコードの右端を含む第2の領域を少なくとも選別し、上記第1の領域と上記第2の領域とに重複領域が存在しない場合は、上記第1の領域と上記第2の領域との間を繋ぐ中間の位置にある1以上の第3の領域をさらに選別することを特徴とする請求項2に記載のコード読取装置。
  4.  上記領域結合部は、上記複数の領域の位置をずらしながら領域内の線分を結合させていき、上記複数の領域内の線分の合致度が最も高い位置の結合状態を採用することを特徴とする請求項1~3の何れか1項に記載のコード読取装置。
  5.  バーコードの撮影画像を複数の水平エリアに分割し、各水平エリアの中から読み取り可能な領域をそれぞれ抽出する領域抽出手段、
     上記領域抽出手段により抽出された複数の領域を結合することによって上記バーコードの全体を復元する領域結合手段、および
     上記領域結合手段により復元された上記バーコードをデコードするデコード手段
    としてコンピュータを機能させるためのコード読取用プログラム。
  6.  上記領域抽出手段により抽出された複数の領域の中から、上記領域結合手段による結合に適した領域を選別する領域選別手段を更に備え、
     上記領域結合手段は、上記領域選別手段により選別された領域を結合することによって上記バーコードの全体を復元することを特徴とする請求項5に記載のコード読取用プログラム。
PCT/JP2014/077189 2013-12-25 2014-10-10 コード読取装置およびコード読取用プログラム WO2015098241A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480021863.5A CN105900111A (zh) 2013-12-25 2014-10-10 代码读取装置和代码读取用程序
US14/888,142 US9582703B2 (en) 2013-12-25 2014-10-10 Code reading device and code reading program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013266474A JP5819925B2 (ja) 2013-12-25 2013-12-25 コード読取装置およびコード読取用プログラム
JP2013-266474 2013-12-25

Publications (1)

Publication Number Publication Date
WO2015098241A1 true WO2015098241A1 (ja) 2015-07-02

Family

ID=53478120

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/077189 WO2015098241A1 (ja) 2013-12-25 2014-10-10 コード読取装置およびコード読取用プログラム

Country Status (4)

Country Link
US (1) US9582703B2 (ja)
JP (1) JP5819925B2 (ja)
CN (1) CN105900111A (ja)
WO (1) WO2015098241A1 (ja)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6455832B2 (ja) * 2014-12-02 2019-01-23 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation バーコード検出方法、バーコード検出システムおよびそのためのプログラム
TWI560620B (en) 2016-01-20 2016-12-01 Qisda Corp Barcode decoding method
US10083334B2 (en) * 2016-12-06 2018-09-25 Datalogic Ip Tech S.R.L. Barcode reconstruction utilizing a sequence alignment matrix
KR102638707B1 (ko) * 2018-10-31 2024-02-21 삼성전자주식회사 바코드를 판독하는 방법 및 전자 장치
JP7419084B2 (ja) * 2020-01-28 2024-01-22 東芝テック株式会社 リーダ、方法、プログラム
KR20230064213A (ko) 2021-11-03 2023-05-10 한화비전 주식회사 바코드 인식 장치 및 방법

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105304A (ja) * 1992-07-13 1995-04-21 Olympus Optical Co Ltd バーコード走査接合方法
JP2001043300A (ja) * 1999-07-29 2001-02-16 Nec Data Terminal Ltd バーコード読み取り装置及びその方法
JP2001167226A (ja) * 1999-10-26 2001-06-22 Datalogic Spa 連続走査によりバーコードを復元する方法
JP2003036416A (ja) * 2002-07-01 2003-02-07 Fujitsu Ltd バーコード読取装置
US20050224581A1 (en) * 2004-04-08 2005-10-13 Sick Ag Method and an apparatus to read a barcode
JP2009099099A (ja) * 2007-10-19 2009-05-07 Denso Wave Inc 光学的情報読取装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7128266B2 (en) * 2003-11-13 2006-10-31 Metrologic Instruments. Inc. Hand-supportable digital imaging-based bar code symbol reader supporting narrow-area and wide-area modes of illumination and image capture
JP3876783B2 (ja) 2002-07-19 2007-02-07 株式会社デンソーウェーブ 情報コード読取方法
CN100553281C (zh) * 2004-09-20 2009-10-21 王赋琛 摄影成像扫描法
US7344080B2 (en) * 2006-03-31 2008-03-18 Symbol Technologies, Inc. Imaging-based bar code reader utilizing stitching method and swipe guide
DE602008006482D1 (de) * 2007-03-27 2011-06-09 Casio Computer Co Ltd Strichcode-Lesegerät und computerlesbares Medium
WO2011132416A1 (ja) * 2010-04-23 2011-10-27 パナソニック株式会社 撮像装置及び画像復元方法
US8439260B2 (en) * 2010-10-18 2013-05-14 Jiazheng Shi Real-time barcode recognition using general cameras
KR101748877B1 (ko) * 2010-12-16 2017-06-19 엘지이노텍 주식회사 바코드 인식 장치 및 방법
JP5800525B2 (ja) * 2011-02-21 2015-10-28 株式会社オプトエレクトロニクス 光学情報読取装置、光学情報読取方法、コンピュータが読み取り可能なプログラム及び記録媒体

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105304A (ja) * 1992-07-13 1995-04-21 Olympus Optical Co Ltd バーコード走査接合方法
JP2001043300A (ja) * 1999-07-29 2001-02-16 Nec Data Terminal Ltd バーコード読み取り装置及びその方法
JP2001167226A (ja) * 1999-10-26 2001-06-22 Datalogic Spa 連続走査によりバーコードを復元する方法
JP2003036416A (ja) * 2002-07-01 2003-02-07 Fujitsu Ltd バーコード読取装置
US20050224581A1 (en) * 2004-04-08 2005-10-13 Sick Ag Method and an apparatus to read a barcode
JP2009099099A (ja) * 2007-10-19 2009-05-07 Denso Wave Inc 光学的情報読取装置

Also Published As

Publication number Publication date
CN105900111A (zh) 2016-08-24
US9582703B2 (en) 2017-02-28
JP2015122015A (ja) 2015-07-02
JP5819925B2 (ja) 2015-11-24
US20160110580A1 (en) 2016-04-21

Similar Documents

Publication Publication Date Title
WO2015098241A1 (ja) コード読取装置およびコード読取用プログラム
JP7460728B2 (ja) 多数の復号可能な証印を処理するための方法
US8469274B2 (en) Method for fast locating decipherable pattern
DE202014011491U1 (de) Mobile Vorrichtung mit verbesserter Benutzerschnittstelle zum Lesen von Codesymbolen
JP4792421B2 (ja) 商品販売登録データ処理装置
WO2015049186A1 (en) Data transmission using optical codes
AU2014331291A1 (en) Data transmission using optical codes
EP1805689A4 (en) METHOD AND DEVICES FOR DYNAMIC SIGNAL PROCESSING
US9721133B2 (en) Imaging barcode scanner for enhanced document capture
JP5808211B2 (ja) バーコードシンボル読取装置及びバーコードシンボル読取方法
WO2016166914A1 (ja) 二次元コード,二次元コード記録担体,二次元コード読取り方法,二次元コード読取用プログラムおよび二次元コード読取り装置
WO2016121126A1 (ja) 二次元コード、二次元コード読取装置、及び符号化方法
JP5250670B2 (ja) 商品販売登録データ処理装置
TW201601068A (zh) 影像式高速條碼掃描方法
CN111507120A (zh) 二维码定位框识别方法、装置、电子设备及存储介质
US9129171B2 (en) Code reading device and code reading method
US11423273B2 (en) Detection of machine-readable tags with high resolution using mosaic image sensors
JP2010182219A (ja) 画像処理装置
JP5636523B1 (ja) 画像処理装置、画像処理方法、及びプログラム
JP6008333B2 (ja) 光学式認識コード読取装置、光学式認識コード読取方法、プログラム及び光学式認識コード
US20240143960A1 (en) Method for recognizing 2d code information
JP6742568B2 (ja) 複製防止コード生成方法
TWM488690U (zh) 交互式投光二維條碼掃描裝置
JP5762190B2 (ja) バーコードシンボル及びその読取方法並びに読取装置
JP2018055304A (ja) 符号読取装置、制御プログラムおよび制御方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14873379

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14888142

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14873379

Country of ref document: EP

Kind code of ref document: A1