JP2007034546A - Optical reader - Google Patents

Optical reader Download PDF

Info

Publication number
JP2007034546A
JP2007034546A JP2005215263A JP2005215263A JP2007034546A JP 2007034546 A JP2007034546 A JP 2007034546A JP 2005215263 A JP2005215263 A JP 2005215263A JP 2005215263 A JP2005215263 A JP 2005215263A JP 2007034546 A JP2007034546 A JP 2007034546A
Authority
JP
Japan
Prior art keywords
code
image data
area
negative
positive
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
JP2005215263A
Other languages
Japanese (ja)
Inventor
Kenji Ota
憲司 大田
Yusuke Otsubo
祐介 大坪
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.)
Keyence Corp
Original Assignee
Keyence Corp
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 Keyence Corp filed Critical Keyence Corp
Priority to JP2005215263A priority Critical patent/JP2007034546A/en
Publication of JP2007034546A publication Critical patent/JP2007034546A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an optical reader for preventing an occurrence of a large difference in average time until the code is read both by a positive code and by a negative code. <P>SOLUTION: When an auto mode capable of reading both the positive code and negative code is selected, the optical reader generates combination image data in which original image data captured by imaging and inverted image data generated by black-and-white-inverting the original image data. A code area extraction part 17 extracts a code area from the generated combination image data, a decode processing part 18 applies decode processing to the extracted code area, based on either a positive recognizing algorithm or negative algorithm. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、光学読取装置に係り、更に詳しくは、1次元コードや2次元コードなどのコードに対してデコード処理(読取処理)を行う方法の改良に関する。   The present invention relates to an optical reading apparatus, and more particularly to an improvement in a method for performing decoding processing (reading processing) on a code such as a one-dimensional code or a two-dimensional code.

従来から、工場における生産ライン等では、搬送される物品(部品など)や物品を保持するパレットにバーコードが表記された被写体を付与しておいて、バーコードから識別情報を読み取ることにより、物品の種類を識別するシステムが利用されている。バーコードは、発光素子及び受光素子を備えた光学読取装置により光学的に読み取られ、光学読取装置は、読み取ったバーコードに対してデコード処理を行うことにより、そのバーコードが表す識別情報を認識する(例えば、特許文献1)。   2. Description of the Related Art Conventionally, in a production line or the like in a factory, an article with a barcode is given to an article to be conveyed (parts etc.) or a pallet that holds the article, and the identification information is read from the barcode. A system is used to identify the type. The barcode is optically read by an optical reader having a light emitting element and a light receiving element, and the optical reader recognizes the identification information represented by the barcode by performing a decoding process on the read barcode. (For example, Patent Document 1).

光学読取装置により読み取り可能なコードとしては、バーコードのような1次元コードの他に、QRコードなどの2次元コードが一般的に知られている。このような一般的なコードにおいては、白地に黒色でコード領域が表記されることにより、コード領域の明度が地色の明度よりも低くなっている。この種のコードを読み取る際には、所定の閾値よりも明度が低い領域をコード領域と判定し、そのコード領域のパターンに基づいてコードを読み取ることができる。   As codes that can be read by the optical reader, two-dimensional codes such as QR codes are generally known in addition to one-dimensional codes such as barcodes. In such a general code, since the code area is written in black on a white background, the lightness of the code area is lower than the lightness of the ground color. When reading this type of code, it is possible to determine an area having a lightness lower than a predetermined threshold value as a code area and read the code based on the pattern of the code area.

最近では、コード領域とその周囲の領域とが白黒反転されたコードが利用される場合もある。このようなコードは、例えば、黒色のシートに対していわゆるレーザマーキング方式によりレーザ光を選択的に照射して、コード領域を白色で表記することにより作成され、コード領域の明度が地色の明度よりも高くなっている。この種のコードを読み取る際には、所定の閾値よりも明度が高い領域をコード領域と判定し、そのコード領域のパターンに基づいてコードを読み取ることができる。   Recently, a code in which a code area and its surrounding area are reversed in black and white may be used. Such a code is created, for example, by selectively irradiating a black sheet with a laser beam by a so-called laser marking method and marking the code area in white, and the code area has a lightness of the ground color. Higher than. When reading this type of code, it is possible to determine an area having a lightness higher than a predetermined threshold value as a code area and read the code based on the pattern of the code area.

光学読取装置の中には、コード領域が黒色で表記されることによりポジティブに表された通常のコード(以下、「ポジティブコード」と呼ぶ。)を読み取ることもできるし、白黒反転されることによりネガティブに表されたコード(以下、「ネガティブコード」と呼ぶ。)を読み取ることもできるようになっているものがある。この種の光学読取装置は、例えば、ポジティブコードのみを読み取ることができるノーマルモードと、ネガティブコードのみを読み取ることができるネガモードと、ポジティブコード及びネガティブコードのいずれも読み取ることができるオートモードとを実行でき、いずれのモードを実行するかをユーザが選択することができる。   In an optical reader, a normal code (hereinafter referred to as “positive code”) that is positively expressed by the code area being written in black can be read, or by being reversed in black and white. Some codes can be read negatively (hereinafter referred to as “negative codes”). This type of optical reader performs, for example, a normal mode in which only a positive code can be read, a negative mode in which only a negative code can be read, and an auto mode in which both a positive code and a negative code can be read. The user can select which mode to execute.

図7は、コード読取処理の第1の従来例を示すフローチャートである。この従来例の光学読取装置は、まず、被写体を撮像することによりオリジナル画像データを生成し(ステップS201)、そのオリジナル画像データをメモリに記憶した後、選択されているモードに応じて異なる処理を行う。メモリには、ポジティブコードを認識するためのアルゴリズム(ポジ認識アルゴリズム)が記憶されている。ポジ認識アルゴリズムは、所定の閾値よりも明度が低い領域をコード領域と判定し、そのコード領域のパターンに基づいてコードを読み取るための手順を表すプログラムである。   FIG. 7 is a flowchart showing a first conventional example of the code reading process. The optical reading apparatus of this conventional example first generates original image data by imaging a subject (step S201), stores the original image data in a memory, and then performs different processing depending on the selected mode. Do. The memory stores an algorithm (positive recognition algorithm) for recognizing a positive code. The positive recognition algorithm is a program that represents a procedure for determining an area having lightness lower than a predetermined threshold value as a code area and reading the code based on the pattern of the code area.

デコード処理の際には、被写体からコード領域と思われる対象領域(例えば、矩形領域)を抽出する。そして、抽出した対象領域がコード領域であると判定した場合に、そのコード領域に対してデコード処理を行う。より具体的には、デコード処理部は、抽出した対象領域に対して、その対象領域がコード領域であるか否かについて2種類の判定処理を順番に行う。1回目の判定処理(第1判定処理)では、抽出したすべての対象領域に対して、対象領域がコード領域であると判定される可能性の高い判定処理を行う。被写体にコード領域が含まれていれば、通常は、第1判定処理でコード領域が抽出される。   In the decoding process, a target area (for example, a rectangular area) that is considered to be a code area is extracted from the subject. When it is determined that the extracted target area is a code area, a decoding process is performed on the code area. More specifically, the decoding processing unit sequentially performs two types of determination processing on the extracted target area as to whether or not the target area is a code area. In the first determination process (first determination process), a determination process with a high possibility of determining that the target area is the code area is performed on all the extracted target areas. If the subject includes a code area, the code area is usually extracted in the first determination process.

しかし、コード領域に付着した汚れなどの各種要因により、被写体にコード領域が含まれている場合でも、稀に、第1判定処理でコード領域が抽出できない場合がある。このような場合を想定して、第1判定処理でコード領域が抽出できなかった場合には、その後の2回目の判定処理(第2判定処理)において、抽出したすべての対象領域に対して、対象領域がコード領域であると判定される可能性の高い判定処理、すなわち、第1判定処理よりも多くの判定基準を用いて判定を行う処理が実行されることにより、多面的なアプローチがなされる。第2判定処理では、第1判定処理よりも多くの判定基準を用いて判定を行うので、判定処理に要する時間が第1判定処理よりも長くなる。   However, in some rare cases, the code area cannot be extracted by the first determination process even when the subject includes the code area due to various factors such as dirt adhering to the code area. Assuming such a case, if the code area cannot be extracted in the first determination process, in the subsequent second determination process (second determination process), for all the extracted target areas, A multifaceted approach is made by executing a determination process that is highly likely to be determined to be a code area, that is, a process that performs determination using more determination criteria than the first determination process. The In the second determination process, the determination is performed using more determination criteria than in the first determination process, so that the time required for the determination process is longer than that in the first determination process.

ノーマルモードが選択されている場合には(ステップS202)、メモリに記憶されているポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS203)。したがって、被写体から読み取った画像の中にポジティブコードが含まれていれば、そのポジティブコードが読み取られる。しかし、被写体から読み取った画像の中にポジティブコードが含まれていなければ、いかなるコードも読み取られない。   When the normal mode is selected (step S202), the decoding process is performed based on the positive recognition algorithm stored in the memory (step S203). Therefore, if a positive code is included in the image read from the subject, the positive code is read. However, any code cannot be read unless the positive code is included in the image read from the subject.

ノーマルモードでは、例えば、ステップS201の撮像時間Tiが70msec、ステップS203のデコード処理時間Tdが26msecであり、処理の開始からポジティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである。デコード処理では、被写体におけるコード領域の位置によって、コード領域が抽出されるまでに要する時間に誤差が生じるが、ここでのデコード処理時間Tdは、コード領域の位置が異なる場合の平均時間を示している。   In the normal mode, for example, the imaging time Ti in step S201 is 70 msec, the decoding processing time Td in step S203 is 26 msec, and the time Tt from the start of processing until the positive code is read is Tt = Ti + Td = 96 msec. In the decoding process, an error occurs in the time required until the code area is extracted depending on the position of the code area in the subject. The decoding process time Td here indicates an average time when the positions of the code areas are different. Yes.

ネガモードが選択されている場合には(ステップS202)、メモリに記憶されているオリジナル画像データの明度が反転されることにより反転画像データが生成される(ステップS204)。これにより、被写体から読み取った画像の中にネガティブコードが含まれている場合には、そのネガティブコードがポジティブコードに変換される。したがって、その後にポジ認識アルゴリズムに基づいて反転画像データに対するデコード処理を行うことにより(ステップS205)、ポジティブコードに変換されたネガティブコードを読み取ることができる。しかし、被写体から読み取った画像の中にネガティブコードが含まれていなければ、いかなるコードも読み取られない。   When the negative mode is selected (step S202), the inverted image data is generated by inverting the brightness of the original image data stored in the memory (step S204). Thereby, when a negative code is included in the image read from the subject, the negative code is converted into a positive code. Therefore, the negative code converted into the positive code can be read by performing the decoding process on the reverse image data based on the positive recognition algorithm thereafter (step S205). However, any code cannot be read unless the negative code is included in the image read from the subject.

ネガモードでは、例えば、ステップS201の撮像時間Tiが70msec、ステップS204の反転処理時間Trが5msec、ステップS205のデコード処理時間Tdが26msecであり、処理の開始からネガティブコードが読み取られるまでの時間Ttは、Tt=Ti+Tr+Td=101msecである。   In the negative mode, for example, the imaging time Ti in step S201 is 70 msec, the inversion processing time Tr in step S204 is 5 msec, the decoding processing time Td in step S205 is 26 msec, and the time Tt from the start of processing until the negative code is read is Tt = Ti + Tr + Td = 101 msec.

オートモードが選択されている場合には(ステップS202)、まず、ポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS206)。したがって、被写体から読み取った画像の中にポジティブコードが含まれていれば(ステップS207でYes)、そのポジティブコードが読み取られる。ポジティブコードが読み取られなかった場合には(ステップS207でNo)、メモリに記憶されているオリジナル画像データの明度が反転されることにより反転画像データが生成された後(ステップS208)、ポジ認識アルゴリズムに基づいて反転画像データに対するデコード処理が行われる(ステップS209)。   When the auto mode is selected (step S202), first, decoding processing is performed based on the positive recognition algorithm (step S206). Therefore, if a positive code is included in the image read from the subject (Yes in step S207), the positive code is read. If the positive code has not been read (No in step S207), after the inverted image data is generated by inverting the brightness of the original image data stored in the memory (step S208), the positive recognition algorithm Based on the above, a decoding process is performed on the inverted image data (step S209).

図8は、オートモードにおけるコード読取処理に要する時間について説明するためのタイムチャートであり、(a)は第1の従来例の場合、(b)は本発明の場合を示している。第1の従来例におけるオートモードでは、例えば、ステップS201の撮像時間Tiが70msec、ステップS206のデコード処理時間Tdが26msecであり、被写体から読み取った画像の中にポジティブコードが含まれていれば、処理の開始からポジティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである(図8(a)参照)。この例では、第1判定処理でコード領域が抽出された場合を示しているが、稀に、第1判定処理では抽出できず、その後の第2判定処理で抽出される場合がある。このような場合には、破線で示すように、その分の遅延時間Tn(例えば、270msec)を要する。   FIG. 8 is a time chart for explaining the time required for the code reading process in the auto mode. FIG. 8A shows the case of the first conventional example, and FIG. 8B shows the case of the present invention. In the auto mode in the first conventional example, for example, if the imaging time Ti in step S201 is 70 msec and the decoding processing time Td in step S206 is 26 msec, and a positive code is included in the image read from the subject, The time Tt from the start of processing until the positive code is read is Tt = Ti + Td = 96 msec (see FIG. 8A). In this example, the code area is extracted in the first determination process, but in rare cases, the code area cannot be extracted in the first determination process and may be extracted in the subsequent second determination process. In such a case, as shown by a broken line, a corresponding delay time Tn (for example, 270 msec) is required.

被写体から読み取った画像の中にポジティブコードではなくネガティブコードが含まれている場合には、ステップS206のデコード処理ではコード領域が抽出されず、反転処理が行われた後(ステップS208)、生成された反転画像データに対するデコード処理が行われる(ステップS209)。この場合、ステップS206のデコード処理において、常に第1判定処理及び第2判定処理が行われることとなり、その分の遅延時間Tn(=270msec)に加えて、ステップS208の反転処理時間Tr(=5msec)、及びステップS209のデコード処理時間Td(=26msec)を要する。したがって、被写体の画像の中にネガティブコードが含まれている場合、処理の開始からネガティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td+Tn+Tr+Td=396msecとなる(図8(a)参照)。   If the image read from the subject contains a negative code instead of a positive code, the code area is not extracted in the decoding process of step S206, and is generated after the inversion process (step S208). The decoded image data is decoded (step S209). In this case, the first determination process and the second determination process are always performed in the decoding process in step S206, and in addition to the corresponding delay time Tn (= 270 msec), the inversion process time Tr (= 5 msec) in step S208. ) And the decoding processing time Td (= 26 msec) of step S209 is required. Therefore, when a negative code is included in the subject image, the time Tt from the start of processing until the negative code is read is Tt = Ti + Td + Tn + Tr + Td = 396 msec (see FIG. 8A).

図9は、コード読取処理の第2の従来例を示すフローチャートである。この従来例の光学読取装置は、第1の従来例と同様に、まず、被写体を撮像することによりオリジナル画像データを生成し(ステップS301)、そのオリジナル画像データをメモリに記憶した後、選択されているモードに応じて異なる処理を行う。メモリには、ポジティブコードを認識するためのアルゴリズム(ポジ認識アルゴリズム)と、ネガティブコードを認識するためのアルゴリズム(ネガ認識アルゴリズム)とが記憶されている。ネガ認識アルゴリズムは、ポジ認識アルゴリズムとは異なるアルゴリズムであり、所定の閾値よりも明度が高い領域をコード領域と判定し、そのコード領域のパターンに基づいてコードを読み取るための手順を表すプログラムである。   FIG. 9 is a flowchart showing a second conventional example of the code reading process. As in the first conventional example, this conventional optical reading apparatus first generates original image data by imaging a subject (step S301), stores the original image data in a memory, and then is selected. Different processing is performed depending on the mode. The memory stores an algorithm for recognizing a positive code (positive recognition algorithm) and an algorithm for recognizing a negative code (negative recognition algorithm). The negative recognition algorithm is an algorithm different from the positive recognition algorithm, and is a program representing a procedure for determining a region having a lightness higher than a predetermined threshold as a code region and reading the code based on the pattern of the code region. .

ノーマルモードが選択されている場合には(ステップS302)、メモリに記憶されているポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS303)。したがって、被写体から読み取った画像の中にポジティブコードが含まれていれば、そのポジティブコードが読み取られる。しかし、被写体から読み取った画像の中にポジティブコードが含まれていなければ、いかなるコードも読み取られない。ノーマルモードでは、例えば、ステップS301の撮像時間Tiが70msec、ステップS303のデコード処理時間Tdが26msecであり、処理の開始からポジティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである。   When the normal mode is selected (step S302), the decoding process is performed based on the positive recognition algorithm stored in the memory (step S303). Therefore, if a positive code is included in the image read from the subject, the positive code is read. However, any code cannot be read unless the positive code is included in the image read from the subject. In the normal mode, for example, the imaging time Ti in step S301 is 70 msec, the decoding processing time Td in step S303 is 26 msec, and the time Tt from the start of processing until the positive code is read is Tt = Ti + Td = 96 msec.

ネガモードが選択されている場合には(ステップS302)、メモリに記憶されているネガ認識アルゴリズムに基づいてデコード処理が行われる(ステップS304)。したがって、被写体から読み取った画像の中にネガティブコードが含まれていれば、そのネガティブコードが読み取られる。しかし、被写体から読み取った画像の中にネガティブコードが含まれていなければ、いかなるコードも読み取られない。ネガモードでは、例えば、ステップS301の撮像時間Tiが70msec、ステップS304のデコード処理時間Tdが26msecであり、処理の開始からネガティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである。   When the negative mode is selected (step S302), the decoding process is performed based on the negative recognition algorithm stored in the memory (step S304). Therefore, if a negative code is included in the image read from the subject, the negative code is read. However, any code cannot be read unless the negative code is included in the image read from the subject. In the negative mode, for example, the imaging time Ti in step S301 is 70 msec, the decoding processing time Td in step S304 is 26 msec, and the time Tt from the start of processing until the negative code is read is Tt = Ti + Td = 96 msec.

オートモードが選択されている場合には(ステップS302)、ポジティブコード及びネガティブコードの両方を読み取ることができるようなデコード処理が行われる(ステップS305)。このようなデコード処理を行うためには、ポジティブコード及びネガティブコードの両方を認識するための認識アルゴリズムが必要となるが、このような認識アルゴリズムを作成するためには、既存のソフトウェアに相当の設計変更を加えなければならず、手間がかかる。また、ステップS305のデコード処理には、ポジティブコード又はネガティブコードの一方のみを読み取るためのデコード処理時間Td(=26msec)を単純に2倍した時間(=52msec)よりも相当長い処理時間を要するため、処理の開始からポジティブコード又はネガティブコードが読み取られるまでの時間Ttは、Tt>>Ti+2Td=122msecとなる。
特開2003−6569号公報
When the auto mode is selected (step S302), a decoding process is performed so that both the positive code and the negative code can be read (step S305). In order to perform such a decoding process, a recognition algorithm for recognizing both positive code and negative code is required. In order to create such a recognition algorithm, a design equivalent to existing software is required. You have to make changes and it takes time. Further, the decoding process in step S305 requires a considerably longer processing time than the time (= 52 msec) obtained by simply doubling the decoding processing time Td (= 26 msec) for reading only one of the positive code and the negative code. The time Tt from the start of processing until the positive code or negative code is read is Tt >> Ti + 2Td = 122 msec.
Japanese Patent Laid-Open No. 2003-669

上記第1の従来例では、図8(a)に示すように、オートモードでポジティブコードが読み取られるまでの時間Ttが96msecであり、比較的短時間であるのに対して、オートモードでネガティブコードが読み取られるまでの時間Ttが396msecと長く、それらの差が非常に大きい。したがって、被写体にポジティブコードが含まれる場合とネガティブコードが含まれる場合とで、コードが読み取られるまでの平均時間に大きな差が生じ、生産ラインに適用しにくい場合がある。   In the first conventional example, as shown in FIG. 8A, the time Tt until the positive code is read in the auto mode is 96 msec, which is a relatively short time, while the negative in the auto mode. The time Tt until the code is read is as long as 396 msec, and the difference between them is very large. Therefore, there may be a large difference in the average time until the code is read between when the subject includes a positive code and when a negative code is included, which may be difficult to apply to a production line.

一方、上記第2の従来例では、上述の通り、既存のソフトウェアに相当の設計変更を加えて、ポジティブコード及びネガティブコードの両方を認識するための認識アルゴリズムを作成しなければならない。しかも、そのような認識アルゴリズムを用いてデコード処理を行っても、コードが読み取られるまでの時間を効果的に短縮することはできない。また、第2の従来例では、ポジ認識アルゴリズム及びネガ認識アルゴリズムの両方を用意する必要がある。   On the other hand, in the second conventional example, as described above, a recognition algorithm for recognizing both the positive code and the negative code must be created by making a considerable design change to the existing software. Moreover, even when decoding is performed using such a recognition algorithm, the time until the code is read cannot be effectively shortened. In the second conventional example, it is necessary to prepare both a positive recognition algorithm and a negative recognition algorithm.

本発明は、上記の事情に鑑みてなされたものであり、ポジティブコードとネガティブコードとでコードが読み取られるまでの平均時間に大きな差が生じるのを防止できる光学読取装置を提供することを目的とする。さらに、本発明は、既存のソフトウェアを用いて、ポジティブコード及びネガティブコードに対する読取処理を行うことができる光学読取装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an optical reading device that can prevent a large difference in average time until a code is read between a positive code and a negative code. To do. Furthermore, an object of the present invention is to provide an optical reading apparatus capable of performing reading processing on positive codes and negative codes using existing software.

本発明による光学読取装置は、読取対象物を撮影し、オリジナル画像データを生成する撮像手段と、上記オリジナル画像データの明度を反転させた反転画像データを生成する明度反転手段と、上記オリジナル画像データ及び上記反転画像データを結合し、結合画像データを生成する画像結合手段と、上記結合画像データに対し、ポジティブ表記されたコード及びネガティブ表記されたコードのいずれか一方を対象とする読取処理を行うコード読取手段とを備えて構成される。   An optical reading apparatus according to the present invention includes an imaging unit that shoots an object to be read and generates original image data, a brightness reversing unit that generates inverted image data obtained by inverting the brightness of the original image data, and the original image data. And an image combining unit that combines the inverted image data to generate combined image data, and performs a reading process on the combined image data with respect to one of a positive code and a negative code. And a code reading means.

このような構成によれば、オリジナル画像データ及び反転画像データを結合することにより生成された結合画像データに対して、ポジティブ表記されたコード(ポジティブコード)及びネガティブ表記されたコード(ネガティブコード)のいずれか一方を対象とする読取処理を行うことにより、ポジティブコード及びネガティブコードのいずれを読み取る場合でも、コードが読み取られるまでの平均時間に大きな差が生じるのを防止できる。   According to such a configuration, positive code (positive code) and negative code (negative code) are generated for the combined image data generated by combining the original image data and the inverted image data. By performing the reading process for either one, it is possible to prevent a large difference in the average time until the code is read, regardless of whether the positive code or the negative code is read.

例えば、ポジ認識アルゴリズムを用いた場合には、読取対象にポジティブコードが含まれていれば、オリジナル画像データからポジティブコードを読み取ることができ、読取対象にネガティブコードが含まれていれば、反転画像データからポジティブコードに変換されたネガティブコードを読み取ることができる。一方、ネガ認識アルゴリズムを用いた場合には、読取対象にネガティブコードが含まれていれば、オリジナル画像データからネガティブコードを読み取ることができ、読取対象にポジティブコードが含まれていれば、反転画像データからネガティブコードに変換されたポジティブコードを読み取ることができる。したがって、既存のソフトウェアを用いて、ポジティブコード及びネガティブコードに対する読取処理を行うことができ、ポジ認識アルゴリズム及びネガ認識アルゴリズムの両方を用意する必要がない。   For example, when a positive recognition algorithm is used, a positive code can be read from the original image data if the reading target includes a positive code, and an inverted image can be read if the reading target includes a negative code. A negative code converted from data to a positive code can be read. On the other hand, when the negative recognition algorithm is used, the negative code can be read from the original image data if the read target includes a negative code, and the reverse image is read if the read target includes a positive code. A positive code converted from data to a negative code can be read. Therefore, it is possible to read the positive code and the negative code using existing software, and it is not necessary to prepare both a positive recognition algorithm and a negative recognition algorithm.

本発明による光学読取装置は、上記コード読取手段は、上記結合画像データから上記コードが表記された領域をコード領域として抽出するコード領域抽出手段と、抽出された上記コード領域に基づいて読取データを生成するデータ抽出手段とを備え、上記コード領域抽出手段は、第1判定基準に基づいてコード領域を抽出する第1領域抽出手段と、上記第1領域抽出手段によりコード領域が抽出されなかった場合に、上記第1判定基準とは異なる第2判定基準に基づいてコード領域を抽出する第2領域抽出手段とを備えて構成される。   In the optical reading apparatus according to the present invention, the code reading means extracts a code area extracting means for extracting an area where the code is written from the combined image data as a code area, and reads the read data based on the extracted code area. A data extraction means for generating, wherein the code area extraction means is a first area extraction means for extracting a code area based on a first determination criterion; and a code area is not extracted by the first area extraction means. And a second region extracting means for extracting a code region based on a second determination criterion different from the first determination criterion.

例えば、上記第2領域抽出手段による判定処理時間は、上記第1領域抽出手段による判定処理時間よりも長い。したがって、第1領域抽出手段によりコード領域が抽出された場合と、第1領域抽出手段ではコード領域が抽出されず、第2領域抽出手段でコード領域が抽出された場合とでは、コードが読み取られるまでの時間の差が大きくなる。しかし、本発明のように、結合画像データの中からポジティブコード及びネガティブコードを同時に読み取るような構成であれば、ポジティブコード及びネガティブコードのいずれが含まれているかによってコードが読み取られるまでの平均時間に大きな差が生じるのを効果的に防止できる。   For example, the determination processing time by the second region extraction unit is longer than the determination processing time by the first region extraction unit. Therefore, the code is read when the code area is extracted by the first area extracting means and when the code area is not extracted by the first area extracting means and the code area is extracted by the second area extracting means. The difference in time until becomes larger. However, if the configuration is such that the positive code and the negative code are simultaneously read from the combined image data as in the present invention, the average time until the code is read depending on whether the positive code or the negative code is included. It is possible to effectively prevent a large difference from occurring.

本発明による光学読取装置において、上記画像結合手段は、上記オリジナル画像データ及び上記反転画像データをオーバーラップさせることなく配置して上記結合画像データを生成する。このような構成によれば、オーバーラップさせることなく配置されたオリジナル画像データ及び反転画像データに対して、読取処理を順次に行うことができる。   In the optical reading apparatus according to the present invention, the image combining means arranges the original image data and the inverted image data without overlapping so as to generate the combined image data. According to such a configuration, the reading process can be sequentially performed on the original image data and the inverted image data arranged without being overlapped.

本発明による光学読取装置において、上記オリジナル画像データは矩形形状からなり、上記画像結合手段は、上記オリジナル画像データ及び上記反転画像データを隣接させて配置する。このような構成によれば、オリジナル画像データ及び反転画像データを隣接させて配置するので、読取処理を連続的に行うことができ、オリジナル画像データ及び反転画像データの間に一定の領域が形成されている場合と比較して、コードが読み取られるまでの時間を短縮できる。   In the optical reading apparatus according to the present invention, the original image data has a rectangular shape, and the image combining means arranges the original image data and the inverted image data adjacent to each other. According to such a configuration, since the original image data and the inverted image data are arranged adjacent to each other, the reading process can be continuously performed, and a certain area is formed between the original image data and the inverted image data. Compared to the case where the code is read, the time until the code is read can be shortened.

本発明によれば、オリジナル画像データ及び反転画像データを結合することにより生成された結合画像データに対して、ポジティブコード及びネガティブコードのいずれか一方を対象とする読取処理を行うことにより、ポジティブコード及びネガティブコードのいずれを読み取る場合でも、コードが読み取られるまでの平均時間に大きな差が生じるのを防止できる。また、既存のソフトウェアを用いて、ポジティブコード及びネガティブコードに対する読取処理を行うことができ、ポジ認識アルゴリズム及びネガ認識アルゴリズムの両方を用意する必要がない。   According to the present invention, a positive code is obtained by performing a reading process on either a positive code or a negative code on the combined image data generated by combining the original image data and the inverted image data. When reading either of the negative code and the negative code, it is possible to prevent a large difference in the average time until the code is read. In addition, it is possible to read the positive code and the negative code using existing software, and it is not necessary to prepare both a positive recognition algorithm and a negative recognition algorithm.

図1は、本発明の実施の形態による光学読取装置1の一構成例を示すブロック図である。この光学読取装置1は、例えば、工場における生産ラインに適用され、生産ラインの搬送経路上を搬送される物品(部品など)又はその物品を保持するパレットに予め取り付けられている被写体(読取対象物)2に表されたコードを光学的に読み取るものである。この光学読取装置1は、ケーブルを介して、撮影画像及び解析結果をリアルタイムに画面表示させるためのモニタや、画像データ及び解析データを取り込んで各種制御を行うパーソナルコンピュータなどの外部機器に接続される。   FIG. 1 is a block diagram showing a configuration example of an optical reading device 1 according to an embodiment of the present invention. The optical reading device 1 is applied to a production line in a factory, for example, and an object (reading object) attached in advance to an article (part or the like) conveyed on the conveyance path of the production line or a pallet holding the article. ) Optically reading the code shown in 2. The optical reading device 1 is connected via a cable to an external device such as a monitor for displaying a captured image and an analysis result on a screen in real time, and a personal computer that takes in image data and analysis data and performs various controls. .

この光学読取装置1は、CPU(Central Processing Unit:中央処理装置)を含む制御部3の他、この制御部3に対してそれぞれ電気的に接続されたCMOS(Complementary Metal Oxide Semiconductor:相補型金属酸化膜半導体)イメージセンサ4、ポインタ用LD(Laser Diode:レーザダイオード)5、照明用LED(Light Emitting Diode:発光ダイオード)6、FPGA(Field Programming Gate Array)7、反転回路8、メモリ9、モード選択スイッチ10及び反転処理部14を備えている。   The optical reading device 1 includes a control unit 3 including a CPU (Central Processing Unit) and a CMOS (Complementary Metal Oxide Semiconductor) electrically connected to the control unit 3. Membrane semiconductor) Image sensor 4, LD (Laser Diode) 5 for pointer, LED (Light Emitting Diode) 6 for lighting, FPGA (Field Programming Gate Array) 7, inverting circuit 8, memory 9, mode selection A switch 10 and an inversion processing unit 14 are provided.

ポインタ用LD5は、ポインタ11となる照射光を発生させる発光素子であり、読み取り可能な矩形エリア及びその中心位置を被写体2上に表示することができる。照明用LED6は、被写体2の読み取り対象を照明するための照射光を発生させる発光素子である。   The pointer LD 5 is a light emitting element that generates irradiation light to be the pointer 11, and can display a readable rectangular area and its center position on the subject 2. The illumination LED 6 is a light emitting element that generates irradiation light for illuminating a reading target of the subject 2.

CMOSイメージセンサ(撮像手段)4は、撮像回路12及びA/D(Analog/Digital)変換回路13を備えている。撮像回路12は、受光量に応じた画素信号を出力する矩形の半導体チップからなり、受光素子として多数のフォトダイオードがマトリックス状に配置されている。各受光素子には、受光量に応じて生成される画素信号を受光素子ごとに電力増幅する増幅素子が配置され、受光素子及び増幅素子から1つの画素が構成される。照明用LED6から照射された光の被写体2における反射光を各受光素子で受光することにより、撮像回路12において画像データ(アナログデータ)が生成される。撮像回路12において生成されたアナログデータは、所定の補正処理が施された後、A/D変換回路13に入力される。   The CMOS image sensor (imaging means) 4 includes an imaging circuit 12 and an A / D (Analog / Digital) conversion circuit 13. The imaging circuit 12 is composed of a rectangular semiconductor chip that outputs a pixel signal corresponding to the amount of received light, and a large number of photodiodes are arranged in a matrix as light receiving elements. Each light receiving element is provided with an amplifying element for amplifying the power of a pixel signal generated according to the amount of received light for each light receiving element, and one pixel is constituted by the light receiving element and the amplifying element. Image data (analog data) is generated in the imaging circuit 12 when each light receiving element receives reflected light from the illumination LED 6 on the subject 2. The analog data generated in the imaging circuit 12 is input to the A / D conversion circuit 13 after being subjected to a predetermined correction process.

A/D変換回路13は、入力されたアナログデータをMビットのデジタルデータに変換する画像データの量子化回路である。ここでは、電圧値が10ビット(bit)に量子化されるものとし、受光量が1024階調の明度により表される。   The A / D conversion circuit 13 is a quantization circuit for image data that converts input analog data into M-bit digital data. Here, it is assumed that the voltage value is quantized to 10 bits, and the amount of received light is represented by the brightness of 1024 gradations.

FPGA7は、量子化された画像データをビット数がより小さな画像データに変換する画像データ圧縮回路である。すなわち、FPGA7は、CMOSイメージセンサ4のA/D変換回路13から入力されるMビットのデジタルデータをNビット(N<M)のデジタルデータに変換して出力する。ここでは、10ビットの画像データをビット数がより小さい8ビットのデジタルデータに変換するものとする。つまり、1024階調の明度で表された画像データは、情報量が変換前の画像データの1/4となる256階調の明度で表された画像データに変換される。   The FPGA 7 is an image data compression circuit that converts quantized image data into image data having a smaller number of bits. That is, the FPGA 7 converts the M-bit digital data input from the A / D conversion circuit 13 of the CMOS image sensor 4 into N-bit (N <M) digital data and outputs it. Here, it is assumed that 10-bit image data is converted into 8-bit digital data having a smaller number of bits. That is, the image data represented by the lightness of 1024 gradations is converted into image data represented by the lightness of 256 gradations, whose information amount is ¼ of the image data before conversion.

反転回路8は、FPGA7から入力された画像データの各画素をビット反転する処理(反転処理)を行うことにより、明度が反転された反転画像データを生成する。すなわち、8ビットの画像データにおける各ビットについて、「0」又は「1」のデータを相互に反転することにより、256階調における明度レベルKで表された画像データを、明度レベル(255−K)の画像データに変換する。例えば、明度レベル「0」の画像データは明度レベル「255」の画像データに変換され、明度レベル「10」の画像データは明度レベル「245」の画像データに変換される。これにより、黒色の画素は白色に変換され、白色の画素は黒色に変換されることとなる。   The inversion circuit 8 generates inverted image data in which the brightness is inverted by performing a bit inversion process (inversion process) on each pixel of the image data input from the FPGA 7. That is, for each bit of 8-bit image data, the data of “0” or “1” is inverted with respect to each other, thereby converting the image data represented by the lightness level K in 256 gradations into the lightness level (255-K ) Image data. For example, image data with a lightness level “0” is converted into image data with a lightness level “255”, and image data with a lightness level “10” is converted into image data with a lightness level “245”. As a result, black pixels are converted to white, and white pixels are converted to black.

反転回路8で生成された反転画像データは、制御部3に入力される。制御部3は、反転回路8において反転処理を行うべき旨の指示信号を出力し、反転回路8は、その指示信号を受信した場合にのみ反転処理を行う。したがって、制御部3から指示信号が出力されなければ、反転回路8における反転処理は行われず、FPGA7から出力された画像データがそのまま制御部3に入力される。制御部3から反転回路に指示信号を出力するか否かは、後述する複数のモード(ノーマルモード、ネガモード及びオートモード)のうちいずれのモードが実行されるかに応じて決定される。複数のモードのうちいずれのモードを実行するかは、ユーザがモード選択スイッチ10を操作することにより選択できる。   The inverted image data generated by the inverting circuit 8 is input to the control unit 3. The control unit 3 outputs an instruction signal indicating that inversion processing should be performed in the inversion circuit 8, and the inversion circuit 8 performs inversion processing only when the instruction signal is received. Therefore, if the instruction signal is not output from the control unit 3, the inversion process in the inversion circuit 8 is not performed, and the image data output from the FPGA 7 is input to the control unit 3 as it is. Whether to output the instruction signal from the control unit 3 to the inverting circuit is determined depending on which mode is executed among a plurality of modes (normal mode, negative mode, and auto mode) described later. The user can select which mode to execute among the plurality of modes by operating the mode selection switch 10.

反転処理部(明度反転手段)14は、反転回路8を介さずに制御部3に入力された画像データに対して、反転回路8と同様の反転処理をソフト処理により実行し、明度が反転された反転画像データを生成する。制御部3は、ユーザが選択したモードに応じて、反転処理部14による反転処理を実行する。   The inversion processing unit (brightness inversion means) 14 performs the same inversion processing as that of the inversion circuit 8 on the image data input to the control unit 3 without going through the inversion circuit 8 by software processing, and the brightness is inverted. Inverted image data is generated. The control unit 3 executes a reversal process by the reversal processing unit 14 in accordance with the mode selected by the user.

メモリ9は、オリジナル画像データ記憶部9A、反転画像データ記憶部9B及び認識アルゴリズム記憶部9Dを備えている。オリジナル画像データ記憶部9Aは、FPGA7から反転回路8を介さずに制御部3に入力された画像データ、すなわち、反転処理が施されていない画像データ(オリジナル画像データ)を記憶する。反転画像データ記憶部9Bは、FPGA7から反転回路8を介して制御部3に入力された画像データ、すなわち、反転処理が施された画像データ(反転画像データ)を記憶する。   The memory 9 includes an original image data storage unit 9A, an inverted image data storage unit 9B, and a recognition algorithm storage unit 9D. The original image data storage unit 9A stores image data input from the FPGA 7 to the control unit 3 without going through the inversion circuit 8, that is, image data not subjected to inversion processing (original image data). The inverted image data storage unit 9B stores image data input from the FPGA 7 via the inversion circuit 8 to the control unit 3, that is, image data that has been subjected to inversion processing (inverted image data).

メモリ9におけるオリジナル画像データ記憶部9A及び反転画像データ記憶部9Bは、連続する領域として予め決定されており、それぞれにオリジナル画像データ及び反転画像データが記憶されることにより、連続した結合画像データ9Cが生成されるようになっている。したがって、反転回路8を介さずに制御部3に入力されたオリジナル画像データをオリジナル画像データ記憶部9Aに記憶しつつ、そのオリジナル画像データに対して反転処理部14で反転処理を施し、反転画像データを反転画像データ記憶部9Bに記憶することにより、結合画像データ9Cを生成することができる。   The original image data storage unit 9A and the reverse image data storage unit 9B in the memory 9 are determined in advance as continuous regions, and the original image data and the reverse image data are stored in the respective regions, whereby continuous combined image data 9C. Is generated. Therefore, the original image data input to the control unit 3 without passing through the inversion circuit 8 is stored in the original image data storage unit 9A, and the original image data is subjected to inversion processing by the inversion processing unit 14 so that the inverted image is obtained. By storing the data in the inverted image data storage unit 9B, the combined image data 9C can be generated.

ただし、このような構成に限らず、メモリ9に結合画像データ記憶部を設けて、オリジナル画像データ記憶部9Aに記憶されているオリジナル画像データと、反転画像データ記憶部9Bに記憶されている反転画像データとを結合する処理を行うことにより結合画像データを生成し、その結合画像データを結合画像データ記憶部に記憶するような構成であってもよい。   However, the present invention is not limited to this configuration, and the combined image data storage unit is provided in the memory 9, and the original image data stored in the original image data storage unit 9A and the inversion stored in the inverted image data storage unit 9B. A configuration may be employed in which combined image data is generated by performing processing for combining image data, and the combined image data is stored in the combined image data storage unit.

この光学読取装置1は、デコード処理において、コード領域が黒色で表されることによりポジティブ表記された通常のコード(ポジティブコード)を読み取ることもできるし、白黒反転されることによりネガティブ表記されたコード(ネガティブコード)を読み取ることもできる。メモリ9の認識アルゴリズム記憶部9Dには、デコード処理を行う際に用いる認識アルゴリズムが記憶されている。この認識アルゴリズムは、ポジティブコードを認識するための手順を表すプログラムである。   The optical reading device 1 can read a normal code (positive code) that is positively expressed by displaying the code area in black in the decoding process, or a code that is negatively expressed by reversing black and white. (Negative code) can also be read. The recognition algorithm storage unit 9D of the memory 9 stores a recognition algorithm used when performing the decoding process. This recognition algorithm is a program representing a procedure for recognizing a positive code.

図2は、光学読取装置1により読み取り可能なコードの構成例を示す図であり、(a)は1次元コードの一例であるバーコード20の概略図、(b)は2次元コードの一例であるQRコード30の概略図を示している。   2A and 2B are diagrams illustrating a configuration example of a code that can be read by the optical reading device 1, in which FIG. 2A is a schematic diagram of a barcode 20 that is an example of a one-dimensional code, and FIG. 2B is an example of a two-dimensional code. A schematic diagram of a QR code 30 is shown.

図2(a)に示すバーコード20では、幅の異なる複数の棒状のコード領域21が黒色で表記されている。複数のコード領域21はそれぞれ同じ長さを有し、互いに所定間隔を隔てて平行に延びている。これにより、両端のコード領域21で挟まれた矩形の領域(コード配置領域22)内に複数のコード領域21が1次元的に配置されている。コード領域21の周囲の領域、すなわち、コード配置領域22内におけるコード領域21以外の領域及びコード配置領域22の外側の領域は、白色領域とされている。コード配置領域22の外側における左右両側の白色領域は、いわゆるクワイエットゾーン23であり、コード配置領域22を検知することができるように所定幅を有している。   In the barcode 20 shown in FIG. 2A, a plurality of bar-shaped code regions 21 having different widths are written in black. The plurality of code regions 21 have the same length, and extend in parallel at a predetermined interval. Thus, a plurality of code areas 21 are arranged one-dimensionally in a rectangular area (code arrangement area 22) sandwiched between the code areas 21 at both ends. An area around the code area 21, that is, an area other than the code area 21 in the code arrangement area 22 and an area outside the code arrangement area 22 are white areas. The white areas on the left and right sides outside the code arrangement area 22 are so-called quiet zones 23 and have a predetermined width so that the code arrangement area 22 can be detected.

図2(b)に示すQRコード30では、矩形のコード配置領域31内に所定のパターンで黒色のコード領域32が2次元的に配置されている。図2(b)では、コード領域32の詳細を省略し、コード配置領域31内にハッチングを施しているが、コード配置領域31には所定のパターンでコード領域32が表記され、コード領域32の周囲の領域、すなわち、コード配置領域31内におけるコード領域32以外の領域及びコード配置領域31の外側の領域は、白色領域とされている。   In the QR code 30 shown in FIG. 2B, black code areas 32 are two-dimensionally arranged in a predetermined pattern in a rectangular code arrangement area 31. In FIG. 2B, details of the code area 32 are omitted, and hatching is performed in the code arrangement area 31, but the code area 32 is represented in a predetermined pattern in the code arrangement area 31. The surrounding area, that is, the area other than the code area 32 in the code arrangement area 31 and the area outside the code arrangement area 31 are white areas.

コード配置領域31の外側を取り囲む白色領域はクワイエットゾーン33であり、コード配置領域31を検知することができるように所定幅を有している。図2(b)に示すように、QRコード30の4隅のうちの3隅には、ファインダーパターンと呼ばれる矩形のパターン34が配置されており、これらのファインダーパターン34により、そのコードがQRコード30である旨を表すとともに、QRコード30の指向性を規定している。   A white area surrounding the outside of the code arrangement area 31 is a quiet zone 33, and has a predetermined width so that the code arrangement area 31 can be detected. As shown in FIG. 2B, a rectangular pattern 34 called a finder pattern is arranged at three of the four corners of the QR code 30, and the code is converted into a QR code by the finder pattern 34. 30 and the directivity of the QR code 30 is defined.

このように、1次元コードや2次元コードなどの一般的なコードでは、コード領域が矩形のコード配置領域内に配置されているので、被写体2から矩形領域を検出することにより、コード領域と思われる矩形領域を抽出することができる。しかし、被写体2によっては、コード以外の矩形領域を有している場合があるので、抽出した矩形領域がコード領域であるか否かを判定する必要がある。   In this way, in a general code such as a one-dimensional code or a two-dimensional code, the code area is arranged in a rectangular code arrangement area, so that it is considered as a code area by detecting the rectangular area from the subject 2. The rectangular area to be extracted can be extracted. However, since some subjects 2 may have a rectangular area other than the code, it is necessary to determine whether or not the extracted rectangular area is a code area.

図3は、制御部3の主な動作について示した機能ブロック図である。制御部3は、CPUがプログラムを実行することにより、モード選択部15、矩形領域抽出部16、コード領域抽出部17及びデコード処理部18として機能する。コード領域抽出部17は、第1判定処理部17A及び第2判定処理部17Bからなる。矩形領域抽出部16、コード領域抽出部17及びデコード処理部18は、コード読取処理を行うためのコード読取手段を構成している。   FIG. 3 is a functional block diagram illustrating main operations of the control unit 3. The control unit 3 functions as a mode selection unit 15, a rectangular region extraction unit 16, a code region extraction unit 17, and a decoding processing unit 18 when the CPU executes a program. The code area extraction unit 17 includes a first determination processing unit 17A and a second determination processing unit 17B. The rectangular area extraction unit 16, the code area extraction unit 17, and the decoding processing unit 18 constitute code reading means for performing code reading processing.

モード選択スイッチ10の操作に基づくモード選択信号は、モード選択部15に入力される。オートモードが選択されている場合には、オリジナル画像データ及び反転画像データが結合画像データとして矩形領域抽出部16に入力される。ノーマルモードが選択されている場合には、オリジナル画像データが矩形領域抽出部16に入力される。ネガモードが選択されている場合には、反転画像データが矩形領域抽出部16に入力される。   A mode selection signal based on the operation of the mode selection switch 10 is input to the mode selection unit 15. When the auto mode is selected, the original image data and the inverted image data are input to the rectangular area extraction unit 16 as combined image data. When the normal mode is selected, the original image data is input to the rectangular area extraction unit 16. When the negative mode is selected, the reverse image data is input to the rectangular area extraction unit 16.

矩形領域抽出部16は、被写体2から矩形領域を抽出し、その抽出された矩形領域から、コード領域抽出部17においてコード領域が抽出される。そして、コード領域抽出部17で抽出されたコード領域に基づいて、デコード処理部(データ抽出手段)18がデコード処理を行うことにより、読取データが生成される。コード領域抽出部(コード領域抽出手段)17は、矩形領域抽出部16で抽出した矩形領域に対して、その矩形領域がコード領域であるか否かについて2種類の判定処理を順番に行う。第1判定処理部(第1領域抽出手段)17Aが行う1回目の判定処理(第1判定処理)では、抽出したすべての矩形領域に対して、所定の第1判定基準に基づいて矩形領域がコード領域であると判定される可能性の高い判定処理を行う。被写体2にコード領域が含まれていれば、通常は、第1判定処理でコード領域が抽出される。   The rectangular area extraction unit 16 extracts a rectangular area from the subject 2, and the code area extraction unit 17 extracts a code area from the extracted rectangular area. Then, based on the code area extracted by the code area extraction unit 17, the decode processing unit (data extraction unit) 18 performs a decoding process to generate read data. The code area extraction unit (code area extraction unit) 17 sequentially performs two types of determination processing on the rectangular area extracted by the rectangular area extraction unit 16 as to whether or not the rectangular area is a code area. In the first determination process (first determination process) performed by the first determination processing unit (first area extraction unit) 17A, rectangular areas are extracted from all the extracted rectangular areas based on a predetermined first determination criterion. A determination process that is highly likely to be determined as a code area is performed. If the subject 2 includes a code area, the code area is usually extracted in the first determination process.

しかし、コード領域に付着した汚れなどの各種要因により、被写体2にコード領域が含まれている場合でも、稀に、第1判定処理でコード領域が抽出できない場合がある。このような場合を想定して、第1判定処理でコード領域が抽出できなかった場合には、その後に第2判定処理部(第2領域抽出手段)17Bが行う2回目の判定処理(第2判定処理)において、抽出したすべての矩形領域に対して、所定の第2判定基準に基づいて矩形領域がコード領域であると判定される可能性の高い判定処理、すなわち、第1判定処理よりも多くの判定基準を用いて判定を行う処理が実行されることにより、多面的なアプローチがなされる。第2判定処理では、第1判定処理よりも多くの判定基準を用いて判定を行うので、判定処理に要する時間が第1判定処理よりも長くなる。   However, even if the subject 2 includes a code area due to various factors such as dirt attached to the code area, the code area may not be extracted by the first determination process. Assuming such a case, if the code area could not be extracted in the first determination process, the second determination process (second area) performed by the second determination processing unit (second area extraction means) 17B thereafter In the determination process), for all the extracted rectangular areas, a determination process that is highly likely to be determined as a code area based on a predetermined second determination criterion, that is, more than the first determination process. A multi-faceted approach is made by executing a process of making a judgment using many judgment criteria. In the second determination process, the determination is performed using more determination criteria than in the first determination process, so that the time required for the determination process is longer than that in the first determination process.

図4は、コード読取処理の態様を示すフローチャートである。本実施の形態では、図7及び図9に示したような従来例とは異なり、ノーマルモード及びオートモードの場合と、ネガモードの場合とで、異なる態様で撮像を行う。すなわち、ノーマルモードが選択されている場合、及びオートモードが選択されている場合には、図1に示すFPGA7から出力された画像データがそのまま制御部3に入力されることにより、オリジナル画像データがメモリ9に記憶される。一方、ネガモードが選択されている場合には、制御部3から反転回路8に指示信号が入力されることにより、FPGA7から出力された画像データが反転回路8を介して制御部3に入力され、生成された反転画像データがメモリ9に記憶される。   FIG. 4 is a flowchart showing an aspect of the code reading process. In the present embodiment, unlike the conventional example shown in FIGS. 7 and 9, imaging is performed in different modes in the normal mode and the auto mode, and in the negative mode. That is, when the normal mode is selected and when the auto mode is selected, the image data output from the FPGA 7 shown in FIG. Stored in the memory 9. On the other hand, when the negative mode is selected, an instruction signal is input from the control unit 3 to the inverting circuit 8, whereby image data output from the FPGA 7 is input to the control unit 3 via the inverting circuit 8, The generated reverse image data is stored in the memory 9.

このように、ネガモードでは、撮像と同時に(並行して)反転画像データが生成されるので、メモリ9に一旦記憶されたオリジナル画像データが白黒反転されて反転画像データが生成されるような構成と比較して、反転画像データを生成するのに要する時間を短縮できる。ただし、このような構成に限らず、被写体2を撮像することによりメモリ9にオリジナル画像データを一旦記憶し、そのオリジナル画像データを白黒反転することにより反転画像データを生成するような構成であってもよい。   As described above, in the negative mode, the inverted image data is generated simultaneously with the imaging (in parallel). Therefore, the original image data once stored in the memory 9 is inverted in black and white to generate the inverted image data. In comparison, the time required to generate the inverted image data can be shortened. However, the present invention is not limited to this configuration, and the original image data is temporarily stored in the memory 9 by imaging the subject 2 and the inverted image data is generated by reversing the original image data in black and white. Also good.

ノーマルモードが選択されている場合には(ステップS101)、CMOSイメージセンサ4から出力されたオリジナル画像データが反転回路8を介さずに制御部3に入力されてメモリ9に記憶されることにより撮像が行われる(ステップS102)。そして、メモリ9に記憶されたオリジナル画像データに対して、ポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS103)。したがって、被写体2から読み取った画像の中にポジティブコードが含まれていれば、そのポジティブコードが読み取られる。しかし、被写体2から読み取った画像の中にポジティブコードが含まれていなければ、いかなるコードも読み取られない。   When the normal mode is selected (step S101), the original image data output from the CMOS image sensor 4 is input to the control unit 3 without passing through the inversion circuit 8 and stored in the memory 9, thereby capturing an image. Is performed (step S102). Then, the original image data stored in the memory 9 is decoded based on the positive recognition algorithm (step S103). Therefore, if a positive code is included in the image read from the subject 2, the positive code is read. However, if the image read from the subject 2 does not include a positive code, no code can be read.

ノーマルモードでは、例えば、ステップS102の撮像時間Tiが70msec、ステップS103のデコード処理時間Tdが26msecであり、処理の開始からポジティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである。デコード処理では、被写体2におけるコード領域の位置によって、コード領域が抽出されるまでに要する時間に誤差が生じるが、ここでのデコード処理時間Tdは、コード領域の位置が異なる場合の平均時間を示している。   In the normal mode, for example, the imaging time Ti in step S102 is 70 msec, the decoding processing time Td in step S103 is 26 msec, and the time Tt from the start of processing until the positive code is read is Tt = Ti + Td = 96 msec. In the decoding process, an error occurs in the time required until the code area is extracted depending on the position of the code area in the subject 2. The decoding process time Td here indicates an average time when the positions of the code areas are different. ing.

ネガモードが選択されている場合には(ステップS101)、CMOSイメージセンサ4から出力されたオリジナル画像データが反転回路8で反転され、生成された反転画像データが制御部3に入力されてメモリ9に記憶されることにより撮像が行われる(ステップS104)。そして、メモリ9に記憶された反転画像データに対して、ポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS105)。被写体2から読み取った画像の中にネガティブコードが含まれている場合には、オリジナル画像データが白黒反転されて反転画像データが生成されることにより、そのネガティブコードがポジティブコードに変換される。したがって、ポジ認識アルゴリズムに基づいて反転画像データに対するデコード処理を行うことにより、ポジティブコードに変換されたネガティブコードを読み取ることができる。しかし、被写体2から読み取った画像の中にネガティブコードが含まれていなければ、いかなるコードも読み取られない。   When the negative mode is selected (step S101), the original image data output from the CMOS image sensor 4 is inverted by the inversion circuit 8, and the generated inverted image data is input to the control unit 3 and stored in the memory 9. Imaging is performed by storing (step S104). Then, decoding processing is performed on the reverse image data stored in the memory 9 based on the positive recognition algorithm (step S105). When a negative code is included in the image read from the subject 2, the original image data is inverted in black and white to generate inverted image data, whereby the negative code is converted into a positive code. Therefore, the negative code converted into the positive code can be read by performing the decoding process on the inverted image data based on the positive recognition algorithm. However, if the image read from the subject 2 does not include a negative code, no code can be read.

ネガモードでは、例えば、ステップS104の撮像時間Tiが70msec、ステップS105のデコード処理時間Tdが26msecであり、処理の開始からネガティブコードが読み取られるまでの時間Ttは、Tt=Ti+Td=96msecである。   In the negative mode, for example, the imaging time Ti in step S104 is 70 msec, the decoding processing time Td in step S105 is 26 msec, and the time Tt from the start of processing until the negative code is read is Tt = Ti + Td = 96 msec.

オートモードが選択されている場合には(ステップS101)、CMOSイメージセンサ4から出力されたオリジナル画像データが反転回路8を介さずに制御部3に入力されることにより撮像が行われる(ステップS106)。そして、制御部3に入力されたオリジナル画像データ及び反転処理部14により反転された反転画像データがメモリ9に記憶されることにより結合画像データが生成され(ステップS107)、その生成された結合画像データに対して、ポジ認識アルゴリズムに基づいてデコード処理が行われる(ステップS108)。   When the auto mode is selected (step S101), the original image data output from the CMOS image sensor 4 is input to the control unit 3 without passing through the inversion circuit 8, and imaging is performed (step S106). ). Then, the original image data input to the control unit 3 and the inverted image data inverted by the inversion processing unit 14 are stored in the memory 9 to generate combined image data (step S107), and the generated combined image is generated. The data is decoded based on the positive recognition algorithm (step S108).

ステップS107の処理では、反転処理部14による反転処理を行い、生成された反転画像データをそのままオリジナル画像データに結合するだけなので、その処理に要する時間Trは反転処理に要する時間と同じであり、例えば5msecである。ステップS108のデコード処理は、オリジナル画像データ及び反転画像データを結合した結合画像データに対して行われるので、その処理に要する時間TDは、オリジナル画像データに対するデコード処理に要する時間又は反転画像データに対するデコード処理に要する時間を単純に2倍した時間(Td×2)となり、例えば52msecである。   In the process of step S107, the inversion process by the inversion processing unit 14 is performed and the generated inverted image data is simply combined with the original image data as it is, so the time Tr required for the process is the same as the time required for the inversion process. For example, 5 msec. Since the decoding process of step S108 is performed on the combined image data obtained by combining the original image data and the inverted image data, the time TD required for the process is the time required for the decoding process on the original image data or the decoding on the inverted image data. The time required for processing is simply doubled (Td × 2), for example, 52 msec.

図5は、結合画像データに基づく画像50の一例を示す概略図である。結合画像データに基づく画像50は、図5に示すように、それぞれ矩形形状からなるオリジナル画像データに基づく画像51と反転画像データに基づく画像52とが並べて結合された画像である。図5に示す例では、オリジナル画像データに基づく画像51と反転画像データに基づく画像52とがオーバーラップしないように隣接して配置されている。   FIG. 5 is a schematic diagram illustrating an example of an image 50 based on the combined image data. As shown in FIG. 5, the image 50 based on the combined image data is an image in which an image 51 based on the original image data each having a rectangular shape and an image 52 based on the inverted image data are combined side by side. In the example shown in FIG. 5, the image 51 based on the original image data and the image 52 based on the reverse image data are arranged adjacent to each other so as not to overlap.

各画像51,52をオーバーラップさせることなく配置することにより、各画像51,52に対する読取処理を順次に行うことができる。また、各画像51,52を隣接して配置することにより、読取処理を連続的に行うことができ、各画像51,52の間に一定の領域が形成されている場合と比較して、コードが読み取られるまでの時間を短縮できる。ただし、このような態様に限らず、各画像51,52の間に一定の領域が形成されていてもよい。また、図5に示すように各画像51,52が上下に並べて結合されるのではなく、左右に並べて結合されてもよい。また、各画像51,52がコードの読み取りに影響を与えない範囲でオーバーラップしていてもよい。   By arranging the images 51 and 52 without overlapping, the reading processing for the images 51 and 52 can be sequentially performed. Further, by arranging the images 51 and 52 adjacent to each other, the reading process can be performed continuously, and compared with the case where a certain area is formed between the images 51 and 52, the code It is possible to shorten the time until the is read. However, the present invention is not limited to this mode, and a certain area may be formed between the images 51 and 52. In addition, as shown in FIG. 5, the images 51 and 52 may be combined side by side instead of being aligned side by side. Further, the images 51 and 52 may overlap in a range that does not affect the code reading.

図5に示す例において、オリジナル画像データに基づく画像51には、ポジティブコードからなるQRコード30の他に、所定の文字を含む矩形領域41と、黒色領域からなる矩形領域42が含まれている。工場における生産ラインで搬送される物品に付与される被写体2には、通常、コード以外に作業者が視認可能な品番等の文字情報が表記されており、これらの文字情報を矩形の枠で囲むなどして矩形領域が表記されている場合が多い。   In the example shown in FIG. 5, the image 51 based on the original image data includes a rectangular area 41 including a predetermined character and a rectangular area 42 including a black area, in addition to the QR code 30 including a positive code. . In the subject 2 attached to the article conveyed on the production line in the factory, character information such as a part number that can be visually recognized by the worker is usually written in addition to the code, and the character information is surrounded by a rectangular frame. In many cases, a rectangular area is described.

この図5に示すような結合画像データに対してデコード処理を行った場合には、オリジナル画像データに対応する画像51から、QRコード30に対応する矩形領域31及び他の2つの矩形領域41,42が抽出され、反転画像データに対応する画像52から、上記3つの矩形領域31,41,42にそれぞれ対応する反転画像からなる3つの矩形領域43,44,45が抽出される。そして、それらの抽出された矩形領域31,41,42,43,44,45の中から、QRコード30に対応する矩形領域のみがコード配置領域31であると判定され、そのコード配置領域31内に配置されたコード領域32に対してデコード処理が行われる。   When decoding processing is performed on the combined image data as shown in FIG. 5, from the image 51 corresponding to the original image data, the rectangular area 31 corresponding to the QR code 30 and the other two rectangular areas 41, 42 is extracted, and from the image 52 corresponding to the inverted image data, three rectangular regions 43, 44, and 45 made of inverted images respectively corresponding to the three rectangular regions 31, 41, and 42 are extracted. Then, it is determined that only the rectangular area corresponding to the QR code 30 is the code arrangement area 31 from the extracted rectangular areas 31, 41, 42, 43, 44, 45. Decoding processing is performed on the code area 32 arranged in the area.

図6は、結合画像データに基づく画像50の他の例を示す概略図である。被写体2にネガティブコードが表記されている場合には、図6に示すように、オリジナル画像データに基づく画像51には、ネガティブコードに対応する矩形領域43及び他の矩形領域44,45が含まれる。これに対して、反転画像データに基づく画像52には、ネガティブコードを白黒反転することにより得られたポジティブコードからなるQRコード30が含まれるとともに、矩形領域44,45にそれぞれ対応する矩形領域41,42が含まれる。   FIG. 6 is a schematic diagram illustrating another example of the image 50 based on the combined image data. When a negative code is written on the subject 2, as shown in FIG. 6, the image 51 based on the original image data includes a rectangular area 43 corresponding to the negative code and other rectangular areas 44 and 45. . On the other hand, the image 52 based on the inverted image data includes the QR code 30 composed of the positive code obtained by reversing the negative code in black and white, and the rectangular areas 41 corresponding to the rectangular areas 44 and 45, respectively. , 42 are included.

この図6に示すような結合画像データに対してデコード処理を行った場合には、反転画像データに対応する画像52から、QRコード30に対応する矩形領域31及び他の2つの矩形領域41,42が抽出され、オリジナル画像データに対応する画像51から、上記3つの矩形領域31,41,42にそれぞれ対応する3つの矩形領域43,44,45が抽出される。そして、それらの抽出された矩形領域31,41,42,43,44,45の中から、QRコード30に対応する矩形領域のみがコード配置領域31であると判定され、そのコード配置領域31内に配置されたコード領域32に対してデコード処理が行われる。   When decoding processing is performed on the combined image data as shown in FIG. 6, the rectangular area 31 corresponding to the QR code 30 and the other two rectangular areas 41, from the image 52 corresponding to the inverted image data, 42 is extracted, and from the image 51 corresponding to the original image data, three rectangular regions 43, 44, and 45 respectively corresponding to the three rectangular regions 31, 41, and 42 are extracted. Then, it is determined that only the rectangular area corresponding to the QR code 30 is the code arrangement area 31 from the extracted rectangular areas 31, 41, 42, 43, 44, 45. Decoding processing is performed on the code area 32 arranged in the area.

本実施の形態では、オリジナル画像データ及び反転画像データを結合することにより生成された結合画像データに対して、既存のポジ認識アルゴリズムに基づくデコード処理を行うことにより、ポジティブコード及びネガティブコードのいずれも読み取ることができる。すなわち、被写体2にポジティブコードが含まれていれば、オリジナル画像データからポジティブコードを読み取ることができ、被写体2にネガティブコードが含まれていれば、反転画像データからポジティブコードに変換されたネガティブコードを読み取ることができる。したがって、図9に示した第2の従来例とは異なり、既存のソフトウェアを用いて、ポジティブコード及びネガティブコードに対するデコード処理を行うことができるとともに、ポジ認識アルゴリズム及びネガ認識アルゴリズムの両方を用意する必要がない。   In the present embodiment, both the positive code and the negative code are obtained by performing a decoding process based on an existing positive recognition algorithm on the combined image data generated by combining the original image data and the inverted image data. Can be read. That is, if the subject 2 includes a positive code, the positive code can be read from the original image data, and if the subject 2 includes a negative code, the negative code converted from the inverted image data to the positive code. Can be read. Therefore, unlike the second conventional example shown in FIG. 9, the existing code can be used to decode the positive code and the negative code, and both the positive recognition algorithm and the negative recognition algorithm are prepared. There is no need.

ただし、デコード処理は、ポジ認識アルゴリズムに基づいて行われるような構成に限らず、ネガ認識アルゴリズムに基づいて行われるような構成であってもよい。このような構成の場合には、被写体2にネガティブコードが含まれていれば、オリジナル画像データからネガティブコードを読み取ることができ、被写体2にポジティブコードが含まれていれば、反転画像データからネガティブコードに変換されたポジティブコードを読み取ることができる。したがって、既存のネガ認識アルゴリズムに基づくデコード処理を行うことにより、ポジティブコード及びネガティブコードのいずれも読み取ることができる。   However, the decoding process is not limited to the configuration that is performed based on the positive recognition algorithm, but may be configured to be performed based on the negative recognition algorithm. In such a configuration, if the subject 2 contains a negative code, the negative code can be read from the original image data. If the subject 2 contains a positive code, the negative image can be read from the inverted image data. A positive code converted into a code can be read. Therefore, by performing a decoding process based on an existing negative recognition algorithm, both a positive code and a negative code can be read.

また、本実施の形態では、結合画像データの中からポジティブコード及びネガティブコードを同時にデコード処理するので、ポジティブコード及びネガティブコードのいずれが含まれているかによって、図7に示した第1の従来例のようにコードが読み取られるまでの平均時間に大きな差が生じるのを防止できる。すなわち、第1の従来例では、図8(a)に示すように、被写体2に含まれるコードがポジティブコード及びネガティブコードのいずれであるかによって、コードが読み取られるまでの平均時間に大きな差Tgが生じるが、本実施の形態では、図8(b)に示すように、被写体2に含まれるコードがポジティブコード及びネガティブコードのいずれであっても、コードが読み取られるまでの平均時間は一定である。本実施の形態では、ポジティブコード又はネガティブコードが読み取られるのに要する時間Ttは、被写体2にポジティブコード及びネガティブコードのいずれが含まれている場合であっても、例えば、Tt=Ti+Tr+TD=127msecである。ただし、稀に、コード領域が第1判定処理では抽出できず、その後の第2判定処理で抽出される場合があり、このような場合には、破線で示すように、その分の遅延時間TN(例えば、540msec)を要する。   In the present embodiment, since the positive code and the negative code are simultaneously decoded from the combined image data, the first conventional example shown in FIG. 7 depends on which of the positive code and the negative code is included. Thus, it is possible to prevent a large difference from occurring in the average time until the code is read. That is, in the first conventional example, as shown in FIG. 8A, a large difference Tg in the average time until the code is read depends on whether the code included in the subject 2 is a positive code or a negative code. However, in this embodiment, as shown in FIG. 8B, regardless of whether the code included in the subject 2 is a positive code or a negative code, the average time until the code is read is constant. is there. In the present embodiment, the time Tt required for reading the positive code or the negative code is, for example, Tt = Ti + Tr + TD = 127 msec, regardless of whether the subject 2 includes a positive code or a negative code. is there. However, in rare cases, the code area cannot be extracted in the first determination process, and may be extracted in the subsequent second determination process. In such a case, as shown by the broken line, the corresponding delay time TN (For example, 540 msec) is required.

上記実施の形態では、2次元コードの一例としてQRコード30について説明したが、本発明の光学読取装置1は、QRコード30以外の各種2次元コード、例えば、いわゆるコード49、コード16K、コーダブロック、PDF417、スーパーコード、ウルトラコード、ベリコード、CPコード、データマトリックス、コード1、マキシコード、アレイタグ、アズテックコードにも適用可能である。また、本発明の光学読取装置1は、1次元コードや2次元コードに限らず、他のコードにも適用可能である。   In the above embodiment, the QR code 30 has been described as an example of a two-dimensional code. However, the optical reading apparatus 1 of the present invention can use various two-dimensional codes other than the QR code 30, such as a so-called code 49, code 16K, and coder block. , PDF417, super code, ultra code, veri code, CP code, data matrix, code 1, maxi code, array tag, and aztec code. Further, the optical reading device 1 of the present invention is not limited to a one-dimensional code or a two-dimensional code, and can be applied to other codes.

また、被写体2からコードを読み取る手段は、CMOSイメージセンサ4に限らず、例えばラインセンサなどの他の手段であってもよい。また、上記実施の形態では、被写体2にコードが1つだけ含まれる場合について説明したが、被写体2に2つ以上のコードが含まれていてもよい。この場合、被写体2に種類の異なるコードが含まれていてもよい。   The means for reading the code from the subject 2 is not limited to the CMOS image sensor 4 and may be other means such as a line sensor. In the above embodiment, the subject 2 includes only one code. However, the subject 2 may include two or more codes. In this case, the subject 2 may include different types of codes.

本発明は、以上の実施の形態の内容に限定されるものではなく、請求項記載の範囲内において種々の変更が可能である。   The present invention is not limited to the contents of the above-described embodiment, and various modifications can be made within the scope of the claims.

本発明の実施の形態による光学読取装置の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the optical reader by embodiment of this invention. 光学読取装置により読み取り可能なコードの構成例を示す図であり、(a)は1次元コードの一例であるバーコードの概略図、(b)は2次元コードの一例であるQRコードの概略図を示している。It is a figure which shows the structural example of the code which can be read by an optical reader, (a) is the schematic of the barcode which is an example of a one-dimensional code, (b) is the schematic of the QR code which is an example of a two-dimensional code Is shown. 制御部の主な動作について示した機能ブロック図である。It is the functional block diagram shown about the main operation | movement of the control part. コード読取処理の態様を示すフローチャートである。It is a flowchart which shows the aspect of a code reading process. 結合画像データに基づく画像の一例を示す概略図である。It is the schematic which shows an example of the image based on combined image data. 結合画像データに基づく画像の他の例を示す概略図である。It is the schematic which shows the other example of the image based on combined image data. コード読取処理の第1の従来例を示すフローチャートである。It is a flowchart which shows the 1st prior art example of a code reading process. オートモードにおけるコード読取処理に要する時間について説明するためのタイムチャートであり、(a)は第1の従来例の場合、(b)は本発明の場合を示している。It is a time chart for demonstrating the time which the code reading process in an auto mode requires, (a) is the case of a 1st prior art example, (b) has shown the case of this invention. コード読取処理の第2の従来例を示すフローチャートである。It is a flowchart which shows the 2nd prior art example of a code reading process.

符号の説明Explanation of symbols

1 光学読取装置
2 被写体
3 制御部
4 CMOSイメージセンサ
5 ポインタ用LD
6 照明用LED
7 FPGA
8 反転回路
9 メモリ
10 モード選択スイッチ
14 反転処理部
15 モード選択部
16 矩形領域抽出部
17 コード領域抽出部
17A 第1判定処理部
17B 第2判定処理部
18 デコード処理部
20 バーコード
21 コード領域
22 コード配置領域
30 QRコード
31 コード配置領域
32 コード領域
41,42,43,44,45 矩形領域
DESCRIPTION OF SYMBOLS 1 Optical reader 2 Subject 3 Control part 4 CMOS image sensor 5 LD for pointers
6 LED for lighting
7 FPGA
8 Inversion circuit 9 Memory 10 Mode selection switch 14 Inversion processing unit 15 Mode selection unit 16 Rectangular region extraction unit 17 Code region extraction unit 17A First determination processing unit 17B Second determination processing unit 18 Decoding processing unit 20 Barcode 21 Code region 22 Code arrangement area 30 QR code 31 Code arrangement area 32 Code areas 41, 42, 43, 44, 45 Rectangular area

Claims (4)

読取対象物を撮影し、オリジナル画像データを生成する撮像手段と、
上記オリジナル画像データの明度を反転させた反転画像データを生成する明度反転手段と、
上記オリジナル画像データ及び上記反転画像データを結合し、結合画像データを生成する画像結合手段と、
上記結合画像データに対し、ポジティブ表記されたコード及びネガティブ表記されたコードのいずれか一方を対象とする読取処理を行うコード読取手段とを備えたことを特徴とする光学読取装置。
An imaging means for photographing a reading object and generating original image data;
Brightness inversion means for generating inverted image data obtained by inverting the brightness of the original image data;
Image combining means for combining the original image data and the inverted image data to generate combined image data;
An optical reading apparatus, comprising: a code reading unit that performs a reading process on the combined image data with respect to either a positive code or a negative code.
上記コード読取手段は、上記結合画像データから上記コードが表記された領域をコード領域として抽出するコード領域抽出手段と、
抽出された上記コード領域に基づいて読取データを生成するデータ抽出手段とを備え、
上記コード領域抽出手段は、第1判定基準に基づいてコード領域を抽出する第1領域抽出手段と、
上記第1領域抽出手段によりコード領域が抽出されなかった場合に、上記第1判定基準とは異なる第2判定基準に基づいてコード領域を抽出する第2領域抽出手段とを備えたことを特徴とする請求項1に記載の光学読取装置。
The code reading means, a code area extracting means for extracting an area where the code is written from the combined image data as a code area;
Data extraction means for generating read data based on the extracted code area,
The code area extraction means includes first area extraction means for extracting a code area based on a first determination criterion;
And a second region extraction unit that extracts a code region based on a second determination criterion different from the first determination criterion when a code region is not extracted by the first region extraction unit. The optical reading device according to claim 1.
上記画像結合手段は、上記オリジナル画像データ及び上記反転画像データをオーバーラップさせることなく配置して上記結合画像データを生成することを特徴とする請求項1に記載の光学読取装置。   2. The optical reading apparatus according to claim 1, wherein the image combining unit generates the combined image data by arranging the original image data and the inverted image data without overlapping. 上記オリジナル画像データは矩形形状からなり、
上記画像結合手段は、上記オリジナル画像データ及び上記反転画像データを隣接させて配置することを特徴とする請求項3に記載の光学読取装置。
The original image data has a rectangular shape,
4. The optical reader according to claim 3, wherein the image combining unit arranges the original image data and the inverted image data adjacent to each other.
JP2005215263A 2005-07-26 2005-07-26 Optical reader Pending JP2007034546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005215263A JP2007034546A (en) 2005-07-26 2005-07-26 Optical reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005215263A JP2007034546A (en) 2005-07-26 2005-07-26 Optical reader

Publications (1)

Publication Number Publication Date
JP2007034546A true JP2007034546A (en) 2007-02-08

Family

ID=37793757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005215263A Pending JP2007034546A (en) 2005-07-26 2005-07-26 Optical reader

Country Status (1)

Country Link
JP (1) JP2007034546A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250408A (en) * 2009-04-13 2010-11-04 Denso Wave Inc Optical information reader
JP2012181705A (en) * 2011-03-01 2012-09-20 Sharp Corp Bar code reader
JP2017162211A (en) * 2016-03-09 2017-09-14 株式会社東芝 Automatic ticket examination machine, program, ticket, and ticket sheet
CN111914973A (en) * 2020-06-29 2020-11-10 卓书芳 Two-dimensional code and encoding and decoding method thereof
CN115081467A (en) * 2022-07-22 2022-09-20 深圳市成为信息股份有限公司 Method for collecting original image by handset, handset and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250408A (en) * 2009-04-13 2010-11-04 Denso Wave Inc Optical information reader
JP2012181705A (en) * 2011-03-01 2012-09-20 Sharp Corp Bar code reader
JP2017162211A (en) * 2016-03-09 2017-09-14 株式会社東芝 Automatic ticket examination machine, program, ticket, and ticket sheet
CN111914973A (en) * 2020-06-29 2020-11-10 卓书芳 Two-dimensional code and encoding and decoding method thereof
CN111914973B (en) * 2020-06-29 2022-07-01 福建信息职业技术学院 Two-dimensional code decoding method
CN115081467A (en) * 2022-07-22 2022-09-20 深圳市成为信息股份有限公司 Method for collecting original image by handset, handset and storage medium
CN115081467B (en) * 2022-07-22 2023-02-03 深圳市成为信息股份有限公司 Method for collecting original image by handset, handset and storage medium

Similar Documents

Publication Publication Date Title
US5949052A (en) Object sensor system for stationary position optical reader
JP4058529B2 (en) Optical information reader
JP4059173B2 (en) Optical information reading apparatus and optical information reading method
US8162222B2 (en) System and method for identifying erasures in a 2D symbol
WO2006049704A2 (en) Methods and apparatus for dynamic signal processing
JPH06309485A (en) Optical information reader
JP2007034546A (en) Optical reader
JP5808211B2 (en) Bar code symbol reading apparatus and bar code symbol reading method
TW201601068A (en) Image type high-speed barcode scanning method
US20060138234A1 (en) Methods and apparatus for improving direct part mark scanner performance
JP4337597B2 (en) Code symbol reader and program
EP3989180A1 (en) Methods and systems of harvesting data for training machine learning (ml) model
US8960550B2 (en) Minimizing misdecodes in electro-optical readers
JP2009076031A (en) Optical information reader
JP2011197856A (en) Optical information reading device
JP4378491B2 (en) Code image output device
JP5104557B2 (en) Optical information reader
JP5282559B2 (en) Information code reader
JP2010250408A (en) Optical information reader
JP2011048561A (en) Optical information read device
JP5168245B2 (en) Optical information reader
JP4873312B2 (en) Optical information reader
JPH07262301A (en) Data symbol reader
JP2012194853A (en) Optical information reader
JP2020154908A (en) Information code reading device, information code reading system, information code reading method and information code reading program