JP2008134710A - Optical information reader and optical information reading method - Google Patents

Optical information reader and optical information reading method Download PDF

Info

Publication number
JP2008134710A
JP2008134710A JP2006318834A JP2006318834A JP2008134710A JP 2008134710 A JP2008134710 A JP 2008134710A JP 2006318834 A JP2006318834 A JP 2006318834A JP 2006318834 A JP2006318834 A JP 2006318834A JP 2008134710 A JP2008134710 A JP 2008134710A
Authority
JP
Japan
Prior art keywords
image
optical information
information
scanning
scans
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006318834A
Other languages
Japanese (ja)
Other versions
JP5028582B2 (en
Inventor
Takayuki Nagai
隆行 長井
Kazuto Kimura
一人 木村
Kazukuni Hosoi
一邦 細井
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.)
University of Electro Communications NUC
Optoelectronics Co Ltd
Original Assignee
University of Electro Communications NUC
Optoelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electro Communications NUC, Optoelectronics Co Ltd filed Critical University of Electro Communications NUC
Priority to JP2006318834A priority Critical patent/JP5028582B2/en
Publication of JP2008134710A publication Critical patent/JP2008134710A/en
Application granted granted Critical
Publication of JP5028582B2 publication Critical patent/JP5028582B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To extract information by using maximum a posteriori probability estimation, and to reduce computational complexity at that time. <P>SOLUTION: An input image photographed by an input device (CCD103) is stored in an input image buffer 171 of a memory 107 installed on a decode substrate 106. Data stored in an input image buffer 171, an extraction bar code image buffer 172, a pre-processing bar code image buffer 173, a M-scan line buffer 174, a high resolution scan line buffer 176, an edge emphasis high resolution scan line buffer 177 of the memory 107 are supplied to a bar code area extraction part 151, an image correction part 153 and a scan line acquisition part 154 of a pre-processing part 152, a high resolution execution part 155, a post-processing part 156, and a bar code reading part 157 of a CPU part 105. Furthermore, the identified characters are stored in a bar code reading result buffer 178 of the memory 107, and extracted to an output device 109. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、例えばバーコードリーダーに使用して好適な光学的情報読取装置及び光学的情報読取方法に関する。詳しくは、最大事後確率推定を用いて装置の解像度以上の情報の取り出しを可能にするものであって、さらに、その際の計算量を削減してCPU(Central Processing Unit)での処理を可能にすることができるものである。   The present invention relates to an optical information reading apparatus and an optical information reading method suitable for use in, for example, a bar code reader. Specifically, it is possible to extract information that exceeds the resolution of the device using maximum posterior probability estimation, and further, the amount of calculation at that time can be reduced and processing in a CPU (Central Processing Unit) can be performed. Is something that can be done.

流通、物流、郵便、医療・化学検査などの広範な分野で、物品や書類、材料、被検体、その他各種の物の認識手段として、光反射率の異なる部分で情報を表記したバーコード記号や二次元コード記号が広く使用されている。このようなバーコード記号や二次元コード記号等を読取対象とするバーコードスキャナや二次元コードスキャナ等には、従来から光学的情報読取装置が使用される。   In a wide range of fields such as distribution, logistics, postal mail, medical / chemical inspection, etc., as barcodes that represent information on parts with different light reflectivities as means for recognizing articles, documents, materials, specimens, and other various objects Two-dimensional code symbols are widely used. Conventionally, an optical information reader is used for a barcode scanner, a two-dimensional code scanner, or the like that reads such a barcode symbol or a two-dimensional code symbol.

ところが、このようなバーコード記号や二次元コード記号等の情報を光学的情報読取装置で読み取る場合には、バーコード記号や二次元コード記号等自体の汚損や、バーコード記号や二次元コード記号等の記載される紙面の状態などによって、読み取った信号にノイズが混入することが避けられない。そこで、このようなノイズを除去するために種々の技術が開発されている。   However, when reading information such as a bar code symbol or a two-dimensional code symbol with an optical information reader, the bar code symbol or the two-dimensional code symbol itself is contaminated, the bar code symbol or the two-dimensional code symbol, etc. It is inevitable that noise will be mixed in the read signal depending on the state of the paper described. Therefore, various techniques have been developed to remove such noise.

すなわち、例えばハイパスフィルタとローパスフィルタとを組み合わせて用いることにより、ノイズを除去する技術が開発されている(例えば、特許文献1参照。)。
あるいは、フィルタリングの際に、ラプラス演算子等を用いた伝達関数を実現することにより、紙面ノイズを除去しているものもある(例えば、特許文献2参照。)。
さらに、最大事後確率(MAP)推定を用いて低解像度の画像を高解像度化する研究も行われている(例えば、非特許文献1参照。)。
That is, for example, a technique for removing noise has been developed by using a combination of a high-pass filter and a low-pass filter (see, for example, Patent Document 1).
Alternatively, in some cases, a paper transfer noise is removed by realizing a transfer function using a Laplace operator or the like during filtering (see, for example, Patent Document 2).
Furthermore, studies have been conducted to increase the resolution of low-resolution images using maximum posterior probability (MAP) estimation (see, for example, Non-Patent Document 1).

特許第2752870号公報Japanese Patent No. 2752870 特開2005−293327号公報JP 2005-293327 A Hardie et al. ,“Joint MAP Registration and High-Resolution Image Estimation Using a Sequence of Undersampled Images”, IEEE Trans. on Image Proc., VOL.6, NO.12, pp.1621-1633 Dec.1997Hardie et al., “Joint MAP Registration and High-Resolution Image Estimation Using a Sequence of Undersampled Images”, IEEE Trans. On Image Proc., VOL.6, NO.12, pp.1621-1633 Dec.1997

従来から光学的情報読取装置においては、特許文献1,2にも開示されているように、情報の正確な読み取りを行うための種々の技術が開発されている。しかしながら、これら特許文献1,2に開示された技術の目的は、汚損や表示面の状態によって生じるノイズの除去であって、例えば装置の解像度以上の情報の取り出しを行うものではない。   Conventionally, as disclosed in Patent Documents 1 and 2, various techniques for accurately reading information have been developed in optical information readers. However, the purpose of the techniques disclosed in these Patent Documents 1 and 2 is to remove noise caused by contamination and the state of the display surface, and does not extract information that exceeds the resolution of the apparatus, for example.

ところで、撮像装置を用いてバーコードの読み取りを行う場合に、バーコードに収納できる情報量は、撮像装置の性能や撮像位置などによる影響を受ける。また、撮像位置が遠い場合にバーコードが読み取れないという問題が生じる。特に、撮像装置の画素数が少ない場合にこの問題は顕著となるが、画素数が多い場合でも、より多くの情報を一度に読み込むためには、より遠くからバーコードが正確に読み取れる必要がある。   By the way, when reading a barcode using an imaging device, the amount of information that can be stored in the barcode is affected by the performance of the imaging device, the imaging position, and the like. Further, there arises a problem that the barcode cannot be read when the imaging position is far. In particular, this problem becomes significant when the number of pixels of the imaging device is small, but even when the number of pixels is large, in order to read more information at a time, it is necessary to accurately read the barcode from a distance. .

一方、従来の技術では、バーコードの細いエレメントが画像上で1ピクセル程度の幅がなければ読み取ることが不可能であると考えられていた。これに対して、非特許文献1に開示された技術のように、画像処理の技術を利用して撮影された画像の解像度を上げることは考えられるが、従来の技術でバーコードの画像処理を行うには膨大な計算量が必要となり、通常のCPUの処理では実施が困難であるか、非常に時間が掛かってしまう。   On the other hand, in the prior art, it was considered that a thin barcode element could not be read unless it had a width of about 1 pixel on the image. On the other hand, like the technique disclosed in Non-Patent Document 1, it is conceivable to increase the resolution of an image photographed using an image processing technique. To do this, a huge amount of calculation is required, which is difficult to implement with ordinary CPU processing, or takes a long time.

この発明はこのような問題点に鑑みて成されたものであって、本発明の目的は、最大事後確率推定を用いて装置の解像度以上の情報の取り出しを可能とすることであって、さらに、その際の計算量を削減して、通常のCPUでも処理が行えるようにすることである。   The present invention has been made in view of such problems, and an object of the present invention is to enable retrieval of information at a resolution higher than that of the apparatus using maximum a posteriori probability estimation, and This is to reduce the amount of calculation at that time so that processing can be performed even with a normal CPU.

上記の課題を解決し、本発明の目的を達成するため、請求項1に記載された発明は、画像の明部及び/または暗部の長さにより情報を形成すると共に、情報の配列方向に対して直交する方向に任意の幅を有してなる2値画像を読み取る光学的情報読取装置であって、任意の幅の範囲を互いに位相を違えて複数回走査する画像走査手段と、複数回の走査で読み取った信号に対して最大事後確率推定を用いて情報を取り出す情報抽出手段と、を設けることを特徴とする光学的情報読取装置である。   In order to solve the above-mentioned problems and achieve the object of the present invention, the invention described in claim 1 forms information according to the length of the bright part and / or dark part of the image, and also in the arrangement direction of the information. An optical information reading device for reading a binary image having an arbitrary width in a direction orthogonal to each other, an image scanning means for scanning a range of an arbitrary width a plurality of times with different phases, and a plurality of times An optical information reading apparatus comprising: information extracting means for extracting information from a signal read by scanning using maximum posterior probability estimation.

請求項2に記載の光学的情報読取装置においては、互いに位相を違えて複数回走査する画像走査手段は、筐体に対して所定の角度を傾けて配置された撮像装置からなることを特徴とするものである。   The optical information reading device according to claim 2, wherein the image scanning means for scanning a plurality of times with different phases from each other comprises an imaging device arranged at a predetermined angle with respect to the housing. To do.

請求項3に記載の光学的情報読取装置においては、互いに位相を違えて複数回走査する画像走査手段は、撮像装置で撮像された任意の走査線に対して光学的情報1画素分ずれて同じになる走査線を判別し、その間を等分した走査線を複数回走査した信号として取り出す手段を含むことを特徴とするものである。   In the optical information reading device according to claim 3, the image scanning means for scanning a plurality of times with different phases from each other is the same by shifting one pixel of the optical information with respect to an arbitrary scanning line imaged by the imaging device. And a means for taking out a scanning line equally divided between the scanning lines as a signal obtained by scanning a plurality of times.

請求項4に記載の光学的情報読取装置においては、最大事後確率推定を用いて情報を取り出す情報抽出手段は、複数回の走査で読み取った信号に対して画像の明部及び暗部の変わり目における重み付けを用いて行列演算を行うと共に、重み付けの値を予め設定して計算量を削減する演算手段を含むことを特徴とするものである。   5. The optical information reading apparatus according to claim 4, wherein the information extracting means for extracting information using maximum posterior probability estimation is weighted at the transition between bright and dark portions of an image with respect to a signal read by a plurality of scans. And a calculation means for reducing a calculation amount by setting a weighting value in advance.

また、請求項5に記載された発明は、画像の明部及び/または暗部の長さにより情報を形成すると共に、情報の配列方向に対して直交する方向に任意の幅を有してなる2値画像を読み取るための光学的情報読取方法であって、任意の幅の範囲を互いに位相を違えて複数回走査するステップと、複数回の走査で読み取った信号に対して最大事後確率推定を用いて情報を取り出すステップと、を備えることを特徴とする光学的情報読取方法である。   Further, the invention described in claim 5 forms information by the length of the bright part and / or dark part of the image, and has an arbitrary width in the direction orthogonal to the information arrangement direction. An optical information reading method for reading a value image, wherein a range of an arbitrary width is scanned a plurality of times out of phase with each other, and a maximum posterior probability estimation is performed on a signal read by the plurality of scans An optical information reading method comprising the steps of:

請求項6に記載の光学的情報読取方法においては、複数回の走査で読み取った信号に対して、任意の走査線と光学的情報1画素分ずれて同じになる走査線とを判別するステップと、判別された走査線の間を等分した走査線を取り出すステップと、取り出された信号に対して最大事後確率推定を用いて情報を取り出すステップと、を備えることを特徴とするものである。   In the optical information reading method according to claim 6, a step of discriminating an arbitrary scanning line and a scanning line that is the same by shifting by one pixel of optical information with respect to a signal read by a plurality of scans; A step of extracting scanning lines equally divided between the determined scanning lines, and a step of extracting information from the extracted signals using maximum a posteriori probability estimation.

請求項7に記載の光学的情報読取方法においては、最大事後確率推定は、複数回の走査で読み取った信号に対して画像の明及び暗部の変わり目における重み付けを用いて行列演算を行うと共に、重み付けの値を予め設定して計算量を削減することを特徴とするものである。   In the optical information reading method according to claim 7, the maximum posterior probability estimation is performed by performing a matrix operation on a signal read by a plurality of scans using weighting at a transition between bright and dark portions of an image and weighting. The value is set in advance to reduce the amount of calculation.

本発明の光学的情報読取装置及び光学的情報読取方法によれば、最大事後確率推定を用いて装置の解像度以上の情報の取り出しを可能にすることができる。また、その際の計算量を削減してCPUでの処理を可能にすることができる。   According to the optical information reading apparatus and the optical information reading method of the present invention, it is possible to extract information that exceeds the resolution of the apparatus by using the maximum posterior probability estimation. In addition, the amount of calculation at that time can be reduced and processing by the CPU can be made possible.

本発明は、バーコード読み取りシステムにおけるセンサ(CCD:Charge Coupled Device)の配置と、センサによって得られる信号の処理に関するものである。バーコード読み取りシステムは、流通や製造など様々な場面で用いられている。また携帯電話のカメラを用いた情報取得など個人的利用も増えており、ここでは、こうしたバーコードを利用しうる全ての状況を想定している。   The present invention relates to an arrangement of a sensor (CCD: Charge Coupled Device) in a barcode reading system and processing of signals obtained by the sensor. Bar code reading systems are used in various situations such as distribution and manufacturing. In addition, personal use such as information acquisition using a mobile phone camera is increasing, and here, all situations in which such bar codes can be used are assumed.

想定されるシステム全体の構成例を図1のAに示す。システムは、バーコードを撮像する素子(CCD)及びその情報を処理してバーコード情報のデコード(読み取り)を行うCPUを含むスキャナ部100と、デコードされた情報が転送される端末200からなっている。但し、情報を処理するCPU部分が端末200に存在する場合や、図1のBのように端末200からは独立して、デコードされた情報をスキャナ部100に直接貯蔵したり、処理したりする場合もある。   A configuration example of the assumed system as a whole is shown in FIG. The system includes an element (CCD) for imaging a barcode, a scanner unit 100 including a CPU that processes the information and decodes (reads) the barcode information, and a terminal 200 to which the decoded information is transferred. Yes. However, when the CPU part which processes information exists in the terminal 200, or independently of the terminal 200 as shown in FIG. 1B, the decoded information is directly stored or processed in the scanner unit 100. In some cases.

このようなバーコード読み取りシステムにおいて、本発明は、まずスキャナ部100に存在するCCDの配置に関するものである。すなわち、図2にはスキャナ部100の具体的な構成を示し、ここでは発光素子101からの光線がバーコード300に照射され、その反射光がレンズ102を介してCCD103で撮像される。そしてこの場合に、CCD103を筐体104に対して若干傾けて配置することで、読み取りの際に非常に有用な情報を取得することが可能となる。   In such a barcode reading system, the present invention first relates to the arrangement of CCDs present in the scanner unit 100. That is, FIG. 2 shows a specific configuration of the scanner unit 100. Here, the light beam from the light emitting element 101 is irradiated onto the barcode 300, and the reflected light is imaged by the CCD 103 via the lens 102. In this case, by disposing the CCD 103 slightly inclined with respect to the housing 104, it is possible to acquire very useful information at the time of reading.

このようにCCD103を若干傾けて配置することができるのは、バーコード300において縦方向に同じ情報が並んでいるためである。すなわち、縦方向に同じ情報が並んでいるバーコード300に対して、CCD103が傾けて配置されることで、CCD103からはバーコード300の異なった位置の情報が得られる。なお、スキャナ部100は人間の手で保持されるので、バーコード300に対しては通常でも傾くことが多いと考えられるが、CCD103を筐体104に対して傾けて配置することで、確実に傾くことになるものである。   The reason why the CCD 103 can be arranged slightly tilted in this way is that the same information is arranged in the vertical direction in the barcode 300. In other words, information on different positions of the barcode 300 can be obtained from the CCD 103 by tilting the CCD 103 with respect to the barcode 300 in which the same information is arranged in the vertical direction. Since the scanner unit 100 is held by a human hand, it is considered that the scanner unit 100 is often inclined even with respect to the barcode 300. It will be inclined.

そして、このCCD103によって得られた情報は、CPU部105を含むデコード基板106に供給される。すなわち、このCCD103によって得られた情報をCPU部105で処理する手法も本発明の主要な点となるものである。この処理は、バーコード300の情報を高解像度化するものであり、デコードをより高精度に行うことを可能とする。なお、バーコードには様々な種類が存在するが、本発明は、基本的には既存のどの種類のバーコードに対しても適用可能とされる。   Information obtained by the CCD 103 is supplied to a decode board 106 including a CPU unit 105. That is, the method of processing the information obtained by the CCD 103 by the CPU unit 105 is also a main point of the present invention. This process increases the resolution of the information of the barcode 300, and enables decoding to be performed with higher accuracy. There are various types of barcodes, but the present invention is basically applicable to any existing type of barcode.

図3には、上述したデコード基板106の構成を模式的なブロック図で示す。図3において、入力装置としてのCCD103で撮影された入力画像はデコード基板106上に設けられるメモリ107の入力画像バッファ171に記憶される。   FIG. 3 is a schematic block diagram showing the configuration of the decoding substrate 106 described above. In FIG. 3, an input image taken by the CCD 103 as an input device is stored in an input image buffer 171 of a memory 107 provided on the decode board 106.

この入力画像バッファ171に記憶された入力画像がCPU部105のバーコード領域抽出部151に供給される。バーコード領域抽出部151では、図4のAに示すように、例えば画像の二値化(ステップS1)、エッジの抽出(ステップS2)、画像をブロックに分割(ステップS3)、ブロック内のエッジ数カウント(ステップS4)、バーコードの存在領域候補決定(ステップS5)、ラベリングによるバーコード領域抽出(ステップS6)等の処理が行われる。そして抽出されたバーコード領域の画像が、メモリ107の抽出バーコード画像バッファ172に記憶される。   The input image stored in the input image buffer 171 is supplied to the barcode area extraction unit 151 of the CPU unit 105. As shown in FIG. 4A, the barcode area extraction unit 151, for example, binarizes an image (step S1), extracts edges (step S2), divides the image into blocks (step S3), and edges in the block Processing such as number counting (step S4), determination of a barcode existing area candidate (step S5), extraction of a barcode area by labeling (step S6), and the like are performed. The extracted bar code area image is stored in the extracted bar code image buffer 172 of the memory 107.

抽出バーコード画像バッファ172に記憶された抽出バーコード画像は、CPU部105の前処理部152の画像補正部153に供給される。画像補正部153では、図4のBに示すように、例えば輝度正規化(ステップS7)、エッジ強調(ステップS8)等の処理が行われて、メモリ107の前処理後バーコード画像バッファ173に記憶される。   The extracted barcode image stored in the extracted barcode image buffer 172 is supplied to the image correction unit 153 of the preprocessing unit 152 of the CPU unit 105. In the image correction unit 153, as shown in FIG. 4B, for example, luminance normalization (step S7), edge enhancement (step S8), and the like are performed, and the pre-processed barcode image buffer 173 in the memory 107 is stored. Remembered.

前処理後バーコード画像バッファ173に記憶された前処理後バーコード画像は、CPU部105の前処理部152のスキャンライン取得部154に供給される。スキャンライン取得部154では、図4のCに示すように、例えば基本ラインのスキャン(ステップS9)、ブロックマッチング手法による1ピクセルずれたスキャンラインの探索(ステップS10)、M倍の高解像度化を行う場合には、基本スキャンラインと1ピクセルずれたスキャンライン間をM等分するスキャンラインを取得(ステップS11)等の処理が行われる。そして取得された計M本のスキャンラインが、メモリ107の計M本のスキャンラインバッファ174に記憶される。   The preprocessed barcode image stored in the preprocessed barcode image buffer 173 is supplied to the scan line acquisition unit 154 of the preprocessing unit 152 of the CPU unit 105. In the scan line acquisition unit 154, as shown in FIG. 4C, for example, scanning of the basic line (step S9), search of the scan line shifted by one pixel by the block matching method (step S10), and increasing the resolution by M times. In the case of performing, processing such as obtaining a scan line that equally divides the scan line shifted by 1 pixel from the basic scan line by M (step S11) is performed. The acquired total M scan lines are stored in the total M scan line buffers 174 in the memory 107.

また、例えば外部記憶装置108にあらかじめ設定されているずれ/ボケを表現する行列の逆行列が、メモリ107のずれ/ボケを表現する行列の逆行列バッファ175に読み込まれる。そして、計M本のスキャンラインバッファ174に記憶された信号がCPU部105の高解像度化実行部155に供給され、図4のDに示すように、例えば高速化のためのスキャンライン分割(ステップS12)、重み計算(ステップS13)、ずれ/ボケを表現する行列の逆行列バッファ175からずれ/ボケを表現する行列の逆行列が入力されて、ずれ/ボケを表現する行列の逆行列から繰り返し演算がスタート(ステップS14)等の処理が行われる。   Further, for example, an inverse matrix of a matrix that expresses deviation / blur set in advance in the external storage device 108 is read into an inverse matrix buffer 175 of a matrix that expresses deviation / blur in the memory 107. Then, the signals stored in the M scan line buffers 174 in total are supplied to the high resolution execution unit 155 of the CPU unit 105, and, for example, as shown in FIG. S12), weight calculation (step S13), an inverse matrix of a matrix expressing shift / blur is input from the inverse matrix buffer 175 of the matrix expressing shift / blur, and the repetition is performed from the inverse matrix of the matrix expressing shift / blur. Processing such as calculation start (step S14) is performed.

さらに高解像度化実行部155では、逆行列の補助定理を用いた繰り返しによる逆行列演算(ステップS15)が行われて、重み計算に変化があるか否か判断(ステップS16)される。このステップS16で変化があるとき(Yes)はステップS14に戻される。また、ステップS16で変化がないとき(No)は、高解像度化スキャンライン結果取得(ステップS17)等の処理が行われる。そして取得された高解像度化スキャンラインが、メモリ107の高解像度化スキャンラインバッファ176に記憶される。   Further, the resolution enhancement execution unit 155 performs an inverse matrix calculation (step S15) by repetition using the inverse matrix auxiliary theorem, and determines whether there is a change in the weight calculation (step S16). When there is a change in step S16 (Yes), the process returns to step S14. Further, when there is no change in step S16 (No), processing such as high resolution scan line result acquisition (step S17) is performed. The acquired high resolution scan line is stored in the high resolution scan line buffer 176 of the memory 107.

高解像度化スキャンラインバッファ176に記憶された高解像度化スキャンラインは、CPU部105の後処理部156に供給される。後処理部156では、図4のEに示すように、例えばエッジ強調(ステップS18)等の処理が行われる。そしてエッジ強調されたエッジ強調高解像度化スキャンラインが、メモリ107のエッジ強調高解像度化スキャンラインバッファ177に記憶される。   The high resolution scan line stored in the high resolution scan line buffer 176 is supplied to the post-processing unit 156 of the CPU unit 105. In the post-processing unit 156, as shown in E of FIG. 4, for example, processing such as edge enhancement (step S18) is performed. Then, the edge-enhanced and enhanced resolution scan line subjected to edge enhancement is stored in the edge-enhanced and enhanced resolution scan line buffer 177 of the memory 107.

エッジ強調高解像度化スキャンラインバッファ177に記憶されたエッジ強調高解像度化スキャンラインは、CPU部105のバーコード読み取り部157に供給される。バーコード読み取り部157では、図4のFに示すように、例えば分割されたスキャンラインを結合(ステップS19)、スキャンライン二値化(ステップS20)、太エレメントと細エレメントの同定(ステップS21)、エレメントの補正(ステップS22)、キャラクタの同定(ステップS23)等の処理が行われる。そして同定されたキャラクタが、メモリ107のバーコード読み取り結果バッファ178に記憶される。さらに、バーコード読み取り結果バッファ178に記憶された情報が出力装置109に取り出される。   The edge-enhanced high-resolution scan line stored in the edge-enhanced high-resolution scan line buffer 177 is supplied to the barcode reading unit 157 of the CPU unit 105. In the barcode reading unit 157, as shown in FIG. 4F, for example, the divided scan lines are combined (step S19), the scan line is binarized (step S20), and the thick element and the thin element are identified (step S21). Element correction (step S22), character identification (step S23), and the like are performed. The identified character is stored in the barcode reading result buffer 178 of the memory 107. Further, the information stored in the barcode reading result buffer 178 is extracted to the output device 109.

これによって、上述の装置によれば、例えば図5に示すように、手順1としてバーコード画像の撮影を行い、手順2ではバーコード領域の抽出として画像中のバーコードを抜き出し、手順3の前処理で画像の補正、エッジ強調処理、正規化を行うことでレンズやCCDの特性を補正する。なお、前処理に必要なパラメータは使用するカメラ(CCD)によって変更する。さらに、手順4として高解像度化を行い、手順5の後処理としてエッジ強調処理行い、手順6のデコードで全処理を終えた結果をデコードする。   As a result, according to the above-described apparatus, as shown in FIG. 5, for example, a barcode image is taken as step 1, and in step 2, the barcode in the image is extracted as a barcode area extraction. The characteristics of the lens and the CCD are corrected by performing image correction, edge enhancement processing, and normalization in the processing. The parameters required for preprocessing are changed depending on the camera (CCD) used. Further, the resolution is increased as the procedure 4, the edge emphasis processing is performed as the post-processing of the procedure 5, and the result of the completion of all the processes in the decoding of the procedure 6 is decoded.

上述の手順1でバーコードをカメラで撮影する際にはバーコードを傾けて撮影する。ユーザが意識する必要なく傾けて撮像するために、CCD自体を水平に対して傾けて配置しておく。もしくは、ユーザが撮像した際に自動的に必要な傾きになるようにセンサ部を可動式にしておく。これによって、読み取りの際に非常に有用な情報を取得することが可能となる。   When the barcode is photographed with the camera in the above-described procedure 1, the barcode is tilted and photographed. In order to take an image without tilting the user, the CCD itself is tilted with respect to the horizontal. Alternatively, the sensor unit is made movable so that a necessary inclination is automatically obtained when the user takes an image. This makes it possible to acquire very useful information at the time of reading.

さらに手順4の高解像度化では、最大事後確率(MAP:Maximum a posteriori)推定を用いて高解像度化を行う。またこの際に、バーコードをブロック化すると共に、以下に提案する逆行列演算を用いることで、高速に演算を行うことを可能とする。また適切な重みの計算を行う。以下は、この手順4の高解像度化について説明する。   Further, in the higher resolution in the procedure 4, the higher resolution is performed by using a maximum a posteriori (MAP) estimation. At this time, the barcode is made into a block and the inverse matrix operation proposed below can be used to perform the operation at high speed. In addition, an appropriate weight is calculated. In the following, the increase in resolution in this procedure 4 will be described.

図6のAには、従来のMAP推定を用いた画像高解像度化の手法を示し、図6のBには本発明による従来のMAP推定を用いた画像高解像度化の手法を示す。   FIG. 6A shows a conventional image enhancement technique using MAP estimation, and FIG. 6B shows a conventional image enhancement technique using MAP estimation according to the present invention.

ここで図6のAの従来の手法では、適当にずれのある画像を入力とする(ステップS31)。次に、補間により高解像度画像の初期値を決定(ステップS32)し、さらに画像のずれを推定する(ステップS33)。そして、重みを画像全体で一定として高解像度画像を推定する(ステップS34)。さらに収束したかを判断し(ステップS35)、収束していないとき(No)はステップS33に戻される。また収束していたとき(Yes)は終了される(ステップS36)。   Here, in the conventional method of FIG. 6A, an image having an appropriate shift is input (step S31). Next, the initial value of the high resolution image is determined by interpolation (step S32), and the image shift is estimated (step S33). Then, the high-resolution image is estimated with the weight set constant throughout the image (step S34). Further, it is determined whether or not it has converged (step S35), and when it has not converged (No), the process returns to step S33. Moreover, when it has converged (Yes), it is complete | finished (step S36).

これに対して、図6のBの本発明による手法では、基準のラインからずれが(1/倍率)の倍数となるラインを入力とする(ステップS41)。次に、重みを画像全体で一定として高解像度画像を推定(ステップS42)し、画素ごとに最適な重みを決定する(ステップS43)。そして、ステップS43で求めた重みを用いて高解像度画像化する(ステップS44)。さらに収束したかを判断し(ステップS45)、収束していないとき(No)はステップS43に戻される。また収束していたとき(Yes)は終了される(ステップS46)。   On the other hand, in the method according to the present invention shown in FIG. 6B, a line whose deviation from the reference line is a multiple of (1 / magnification) is input (step S41). Next, a high-resolution image is estimated with the weights constant for the entire image (step S42), and an optimum weight is determined for each pixel (step S43). Then, a high resolution image is formed using the weight obtained in step S43 (step S44). Further, it is determined whether or not it has converged (step S45), and when it has not converged (No), the process returns to step S43. Moreover, when it has converged (Yes), it ends (step S46).

以上の手法の違いにおいて、従来のMAP推定を用いた画像高解像度化では、画像のずれと高解像度画像を交互に何度も繰り返し計算するために時間が非常にかかるものであった。しかし、本発明の手法では、バーコードは縦に同じデータが並んでいるという特性を利用し、傾けて撮影することにより最初に全ての画像(ライン)のずれを推定することが可能であり、必要最低限の画像を使用して高解像度化が可能である。   Due to the difference in the above methods, in the conventional high image resolution using MAP estimation, it takes a long time to calculate the image shift and the high resolution image alternately and repeatedly. However, in the method of the present invention, it is possible to estimate the deviation of all images (lines) at first by taking advantage of the characteristic that the same data is arranged vertically in the barcode, and shooting at an inclination, High resolution can be achieved by using the minimum necessary image.

すなわち、一般的な画像と違い、バーコード画像は輝度の差が大きい点が多く見られるため重みを画素ごとに変更することが望ましい。そこで、重みを画像によって変更し高解像度画像と重みを交互に繰り返し計算する。重みを変更することで、従来のMAP推定を用いた高解像度化と同様に繰り返し処理が必要となるが、演算方法を工夫し処理の高速化を行うことで少ない計算量で計算することが可能である。   That is, unlike a general image, since a barcode image often has a large difference in luminance, it is desirable to change the weight for each pixel. Therefore, the weight is changed depending on the image, and the high resolution image and the weight are repeatedly calculated alternately. By changing the weight, it is necessary to repeat processing as in the case of high resolution using conventional MAP estimation, but it is possible to calculate with a small amount of computation by devising the calculation method and speeding up the processing It is.

また、初期値を決める際にずれが予め判っており、重みを全体で一定とすると、処理に時間のかかる行列演算を予め行っておくことが可能となる。これによって、短い処理時間で、従来の手法による補間の場合より良い画像が計算される。   Further, when the initial value is determined, the deviation is known in advance, and if the weight is constant as a whole, it is possible to perform in advance a matrix operation that takes time. As a result, in a short processing time, a better image is calculated than in the case of interpolation by the conventional method.

さらに以下には、MAP推定を用いた高解像度化について具体的に説明する。ここでは、バーコード画像の高解像度化にはMAP推定を用いた方法として非特許文献1に開示された手法を使用する。   In the following, the resolution enhancement using MAP estimation will be specifically described. Here, the method disclosed in Non-Patent Document 1 is used as a method using MAP estimation for increasing the resolution of a barcode image.

MAP推定を用いた高解像度化とは、低解像度画像yが与えられたときの事後確率Pr(z,s|y)を最大とする高解像度画像zとレジストレーションパラメータsを推定する方法である。Pr(z,s|y)は、対数を取りベイズの定理を用いることで事前確率の対数logPr(z)と条件付確率の対数logPr(y|z,s)の和によって表される。従ってMAP推定の問題は、次のように書くことができる。(なお、以下の説明で、数式ではベクトルを太字で表すが、説明文では太字を使用できないため、通常の文字で表記している)   High resolution using MAP estimation is a method of estimating the high resolution image z and the registration parameter s that maximize the posterior probability Pr (z, s | y) when the low resolution image y is given. . Pr (z, s | y) is expressed by the sum of logarithm logPr (z) of prior probability and logPr (y | z, s) of conditional probability by taking the logarithm and using Bayes' theorem. Thus, the problem of MAP estimation can be written as: (Note that in the following explanation, vectors are shown in bold in mathematical formulas, but are not shown in bold because they cannot be used in explanations.)

上式は二つの重みσ、λによって制御される。二つの重みの比をw=σ/λとするとwが大きければ隣り合う画素の輝度が近い値になる。しかし、バーコードは黒から白へと輝度が急激に変わる部分があるため、そこではwの値を小さくする必要がある。提案手法では、白が続く場合(輝度200以上が3ピクセル以上続いている場合)と、黒が続いている場合(輝度50以下が3ピクセル以上続いている場合)はw=w1、それ以外の場合はw=w2というように輝度によってwの値を変化させた。重みを変更したときの結果を図7に示す。 The above equation is controlled by two weights σ and λ. Assuming that the ratio of the two weights is w = σ 2 / λ, if w is large, the luminance of adjacent pixels becomes a close value. However, since the barcode has a portion where the luminance changes abruptly from black to white, it is necessary to reduce the value of w there. In the proposed method, w = w1 when white continues (when luminance of 200 or more continues for 3 pixels or more) and black continues (when luminance of 50 or less continues for 3 pixels or more). In this case, the value of w was changed depending on the luminance such that w = w2. FIG. 7 shows the result when the weight is changed.

次に、スキャンラインの取得について説明する。1次元バーコードは横1行にデータが配置されており、同じデータが縦に並んでいる。よって、水平に1ラインとしてスキャン出来れば良い。図8に示したものは1次元バーコードの例Aとそれがスキャンされる様子Bである。図6Bに示した3本のスキャンラインから得られるデータはすべて同一となるため、一次元バーコードを高解像度化された結果として必要となるのは横一列の一次元のデータであり、二次元画像を高解像度化する必要はない。   Next, acquisition of a scan line will be described. In the one-dimensional barcode, data is arranged in one horizontal row, and the same data is arranged vertically. Therefore, it is only necessary to scan as one line horizontally. FIG. 8 shows an example A of a one-dimensional barcode and a state B in which it is scanned. Since the data obtained from the three scan lines shown in FIG. 6B are all the same, what is required as a result of increasing the resolution of the one-dimensional barcode is one-dimensional data in a horizontal row and two-dimensional data. There is no need to increase the resolution of the image.

そこで本発明の手法では、低解像度なバーコード画像より、複数のスキャンラインのデータを用いて一つの高解像度化された一次元データを推定する。なお、2次元のコードであっても、エレメントの水平方向のデータの並びが同じとなる範囲を複数スキャンできるようにすれば、本発明は実施可能となるものである。   Therefore, according to the method of the present invention, one high-resolution one-dimensional data is estimated from a low-resolution barcode image using data of a plurality of scan lines. Even in the case of a two-dimensional code, the present invention can be implemented if a plurality of ranges where the arrangement of data in the horizontal direction of the elements is the same can be scanned.

以下の説明では、画像を4倍に高解像度化するものであり、その場合に、正しく高解像度化するためには画像を高解像度化した状態で1ピクセル(低解像度で4分の1ピクセル)ずつずれたラインが4本必要である。スキャンラインの取得方法を以下に示す。
手順1:画像の撮影
図9に示すようにわざと位置ずれが発生するように撮影する。これは、カメラセンサ部を若干水平より傾けておくことで自然に実現可能である。
In the following description, the resolution of an image is increased by a factor of four. In that case, in order to increase the resolution correctly, one pixel (one-fourth pixel at a lower resolution) in a state where the image is increased in resolution. Four lines shifted from each other are required. The scan line acquisition method is shown below.
Procedure 1: Shooting an image Shoot as shown in FIG. 9 so that a position shift occurs intentionally. This can be naturally realized by slightly tilting the camera sensor unit from the horizontal.

手順2:1ピクセルずれたラインの取得
図9のライン(a)のような基本となるラインを1つ決定し、1ピクセルずらしたものと他のラインと差をとり、一番差が小さいライン(図9のライン(b))を探し出す。
手順3:ラインの取得
従って、ライン(a)と(b)を4等分するライン(c)が4分の1ずつずれた必要となるスキャンラインである。これらのライン(a)と(c)の計4本のスキャンラインを用いて高解像度化を行う。
Procedure 2: Obtain a line shifted by 1 pixel Determine one basic line as shown in line (a) of Fig. 9, take the difference from the line shifted by 1 pixel from the other lines, and make the smallest difference. Find (line (b) in FIG. 9).
Procedure 3: Line acquisition Therefore, the line (c) that divides the lines (a) and (b) into four equal parts is a scan line that needs to be shifted by a quarter. Using these four lines (a) and (c), the resolution is increased.

すなわち、スキャンラインを取得する際に横一列のデータを単純に取得するのではなく上下一列を含めた3列の平均を取ったものを一本のスキャンラインとすることでより高い認識率を実現した。スキャンラインを1列から得たものと3列の平均を用いたものの結果の例を図10、11に示す。1列では輝度の差がほとんど見られなかった部分が、3列用いることで輝度の差がはっきり出る部分があることがわかる。   That is, when acquiring a scan line, instead of simply acquiring a single horizontal row of data, the average of three rows including the upper and lower rows is taken as a single scan line to achieve a higher recognition rate. did. FIGS. 10 and 11 show examples of the results obtained when the scan line is obtained from one row and the average of the three rows is used. It can be seen that there is a portion where the difference in luminance is clearly seen by using three rows, while the portion where the luminance difference is hardly seen in one row is used.

さらに、高速化について説明する。ここではまず高速化のためのブロック化について検討する。高解像度化における問題は計算量である。問題は次の二つに集約される。
(1)大きなサイズの行列演算であること
(2)逆行列の演算が伴うこと
Furthermore, speeding up will be described. Here, we first consider blocking for speedup. The problem in increasing the resolution is the amount of calculation. The problems can be summarized into the following two.
(1) It must be a large matrix operation
(2) Inverse matrix operation

ここでは、まず(1)の問題について考える。演算する行列のサイズを小さくするには、単純に信号をブロックに分割することで、大きなサイズの行列演算を小さなサイズの複数の行列演算に置き換えればよい。但し、単に信号をブロックに分割すると分割した境界での誤差が大きくなり問題となる。そこでここでは、隣り合うブロックが重複するように分割することでこの問題を回避する。ブロックのサイズは、実験的に高解像度化後の60ピクセル分とした。また、ブロック間の重複は、20ピクセルとした。   Here, the problem (1) is first considered. In order to reduce the size of the matrix to be calculated, a large-size matrix operation may be replaced with a plurality of matrix operations having a small size by simply dividing the signal into blocks. However, if the signal is simply divided into blocks, the error at the divided boundary becomes large and becomes a problem. Therefore, here, this problem is avoided by dividing adjacent blocks so that they overlap. The block size was set to 60 pixels after high resolution experimentally. The overlap between blocks was 20 pixels.

次に、(2)の逆行列の演算の高速化について考える。高解像度画像zは式(3)で表される。
ここで逆行列の演算が必要となり、最低でも60×60の逆行列の演算が必要となる。
Next, consider speeding up of the inverse matrix operation (2). The high-resolution image z is expressed by equation (3).
Here, an inverse matrix operation is required, and at least a 60 × 60 inverse matrix operation is required.

この式(3)でCは滑らかさを表すものであり、式(4)で表される。
In this equation (3), C represents smoothness and is represented by equation (4).

そこで、Ws Ts=Aとおき、d=[d1,d・・・dN]とすると、式(3)のカッコ内の逆行列は式(5)で表される。
Therefore, assuming that W s T W s = A and d = [d 1 , d 2 ... D N ], the inverse matrix in parentheses in equation (3) is expressed by equation (5).

さらに、式(5)の逆行列は式(6)で表される。
逆行列は式(6)の演算をN回(60回)行う必要がある。
Further, the inverse matrix of Equation (5) is expressed by Equation (6).
For the inverse matrix, it is necessary to perform the calculation of Equation (6) N times (60 times).

ここで、Wiは0.002と1.0の2種類である。そこで、Aの対角行列に0.002を足すとWiは0と0.998の2種類に変更できる。一方、Wiの比率はおよそ(0.002):(1.0)=3:1であるので、0.002を足すことで演算量を約4分の1に減らすことができる。さらに、最終的に必要となるデータは以上の方法で求めた逆行列にWs Tyをかけた高解像度化画像▲z▼(zの上に^)である。 Here, W i is the two kinds of 0.002 and 1.0. Therefore, W i when adding 0.002 to the diagonal matrix A can be changed to two kinds of 0 and 0.998. On the other hand, since the ratio of W i is approximately (0.002) :( 1.0) = 3: 1, adding 0.002 can reduce the calculation amount to about one-fourth. Furthermore, finally required data is a high resolution image ▲ z ▼ (^ on z) obtained by multiplying the inverse matrix obtained by the above method by W s T y.

そこで、Ws Ts=bとおき、式(6)の両辺に右からbをかけると式(7)のようになる。
Therefore, when W s T W s = b is set and b is applied to both sides of Expression (6) from the right, Expression (7) is obtained.

ここで、AN-1 -1Nが計算できていれば式(7)で▲z▼(zの上に^)を計算することが可能である。式(6)では60×60の行列を求める計算だったが、式(7)を用いるとベクトルの計算となり計算量の減少が期待できる。AN-1 -1Nは式(6)を用いて式(8)のように表される。
Here, if A N-1 −1 C N can be calculated, it is possible to calculate (z) (^ on z) by Equation (7). In equation (6), the calculation is to obtain a 60 × 60 matrix, but if equation (7) is used, it will be a vector calculation and a reduction in the amount of calculation can be expected. A N-1 −1 C N is expressed as in equation (8) using equation (6).

さらに、AN-2 -1Nも同様に式(9)で表される。
Further, A N-2 −1 C N is similarly expressed by the formula (9).

この計算をA0 -1Nが計算されるまで繰り返すことでAN -1Nbは計算される。この場合の60×60の大きさの行列の計算量の比較を表1に示す。なお、画像全体の計算量はバーコードの幅が600ピクセルのとき計算量である。 By repeating this calculation until A 0 −1 C N is calculated, A N −1 C N b is calculated. Table 1 shows a comparison of the calculation amount of the 60 × 60 matrix in this case. Note that the calculation amount of the entire image is the calculation amount when the barcode width is 600 pixels.

この表1において、従来の方法であるLU分解を用いた方法と比べ、本発明の手法を用いることで計算量は約5分の1となった。逆行列を計算するためには従来では40,824,000回計算が必要であったが、本発明の方法を用いることで2,952,000回に減らすことが可能となる。   In Table 1, the amount of calculation is reduced to about one fifth by using the method of the present invention, compared with the conventional method using LU decomposition. In the past, 40,824,000 calculations were required to calculate the inverse matrix, but the number can be reduced to 2,952,000 using the method of the present invention.

さらに、9種類のバーコードを200mmから25mmずつ300mmまで離して撮影した画像を用いて、重みw2を変化させながら高解像度化を行った。実験結果を表2に示す。
Furthermore, the resolution was increased while changing the weight w2 using images obtained by shooting 9 types of barcodes from 200 mm to 25 mm apart by 300 mm. The experimental results are shown in Table 2.

この表2において、w2の値を変更した結果を見ると、距離によって最適なw2の値は違うことがわかった。つまり、距離によってw2の値を変更することでより高い認識率が実現できる。今回の場合撮影距離が250mmまでのときはw2を0.05、それよりも離したときは0.02を用いることで高い認識率を実現できる。撮影距離によってw2を変更し、後処理としてアンシャープ処理を行うことで250mmまでは9枚すべて275mmは8枚、300mmについても7枚認識することが出来た。   In Table 2, the result of changing the value of w2 shows that the optimum value of w2 differs depending on the distance. That is, a higher recognition rate can be realized by changing the value of w2 according to the distance. In this case, a high recognition rate can be achieved by using w2 of 0.05 when the shooting distance is up to 250 mm and 0.02 when the shooting distance is more than that. By changing w2 depending on the shooting distance and performing unsharp processing as post-processing, all 9 sheets up to 250mm were able to recognize 8 sheets of 275mm and 7 sheets of 300mm.

さらに、300mmから10mmずつ離して撮影し、読み取れる距離の限界を調べた。カメラとバーコードの距離は従来法では215mmが限界であるが、提案法では330mmとなった。これらを文字数に換算すると、従来法の読み取り限界は42文字、提案手法では63文字となり、より多くの情報を保持できることが分かる。なお、MAP推定を用いて高解像度化した結果を図12に示す。図12(c)を見ると、線形補間により計算したもの(b)に比べ、良い結果が得られていることが分かる。   In addition, the distance from 300mm to 10mm was taken and the limit of the distance that could be read was examined. The distance between the camera and the barcode is 215 mm in the conventional method, but 330 mm in the proposed method. When these are converted to the number of characters, the reading limit of the conventional method is 42 characters, and the proposed method is 63 characters, indicating that more information can be held. FIG. 12 shows the result of increasing the resolution using MAP estimation. From FIG. 12 (c), it can be seen that a better result is obtained as compared with that calculated by linear interpolation (b).

以下さらに、2倍の高解像度化を行う際の実施形態について、図13を用いて具体的に説明する。この図13における問題点は、低解像度入力から高解像度の1ライン(ここでは1番上の基準ラインxとする)を推定することである。   Hereinafter, an embodiment in which the resolution is doubled will be described in detail with reference to FIG. The problem in FIG. 13 is that one line of high resolution (here, the uppermost reference line x) is estimated from the low resolution input.

そこで、手順1の前処理では、
(1)入力画像全体を0から255の範囲に正規化する(ここでは便宜上0から1の範囲とする)
(2)画像中のエッジを強調する(ここでは説明の便宜上強調は行わない)
(3)入力における赤の基準スキャンラインを1ピクセルずらしたものと、それ以降のスキャンラインを比較することで、一ピクセルずれたスキャンラインを検索する。
Therefore, in the pre-processing in step 1,
(1) Normalize the whole input image in the range of 0 to 255 (here, it is in the range of 0 to 1 for convenience)
(2) Emphasize edges in the image (no emphasis is given here for convenience of explanation)
(3) A scan line shifted by one pixel is searched by comparing the red reference scan line at the input by one pixel with the subsequent scan lines.

ここでは、
y0を1ピクセルずらしたもの⇒[0 0 0.5 0.9](左端は折り返すことで生成する)
y1⇒[0.1 0 1.1 0.9]
y2⇒[0 0 0.4 1]
とする。
here,
y0 shifted by 1 pixel => [0 0 0.5 0.9] (generated by folding the left edge)
y1⇒ [0.1 0 1.1 0.9]
y2⇒ [0 0 0.4 1]
And

これらの2乗誤差を計算すると、y2がy0の1ピクセルに相当するものであることが分かる。よって、y0とこれが1/2ピクセル(高解像度画像上で1ピクセル)ずれたy1を用いて高解像度化の計算を行う。   When these square errors are calculated, it can be seen that y2 corresponds to one pixel of y0. Therefore, y0 and y1 which is shifted by 1/2 pixel (1 pixel on the high-resolution image) are used to calculate high resolution.

次に、手順2の高解像度化処理では、
(1)スキャンラインの分割(実際にはスキャンラインが300やそれ以上の長さを持っているため、これを手ごろな長さで分割するが、ここでの例は十分短いため分割しない)。
(2)重みの計算をするために入力y0を補間する⇒[0 0.25 0.5 0.75 1 1 1 1]
各ピクセルに対する滑らかさの重みを補間した情報により決定する。
⇒w=[w0 w1 w2 w3 w4 w5 w6 w7]=[0 0 0 0 1 11 1]
Next, in the high resolution processing in step 2,
(1) Dividing the scan line (in fact, since the scan line has a length of 300 or more, it is divided into reasonable lengths, but in this example, it is not divided because it is sufficiently short).
(2) Interpolate input y0 to calculate weight ⇒ [0 0.25 0.5 0.75 1 1 1 1]
The smoothness weight for each pixel is determined by the interpolated information.
⇒ w = [w0 w1 w2 w3 w4 w5 w6 w7] = [0 0 0 0 1 11 1]

この重みは、エレメントの切り替わりが起っている位置では滑らかさの拘束を課さないために必要となる。また、繰り返しによって、高解像度画像が得られるたびに更新する。
(ここでは便宜上、隣との差が大きい場合は0小さい場合は1とするが、実際には輝度200以上が3ピクセル以上続いている場合か、輝度50以下が3ピクセル以上続いている場合に1、それ以外の場合に0.002とする)
This weight is necessary so as not to impose a smoothness constraint at the position where the element switching occurs. Further, it is updated every time a high-resolution image is obtained by repetition.
(Here, for convenience, when the difference from the neighbor is large, it is 0 when it is small. However, when the luminance is 200 or more continues for 3 pixels or more, or the luminance 50 or less continues for 3 pixels or more. 1; 0.002 otherwise)

(3)求めたい高解像度情報をx=[x0 x1 x2 x3 x4 x5 x6 x7]とおくと、
が等しくなるようにxを求めればよい。
(3) If the high resolution information to be obtained is x = [x0 x1 x2 x3 x4 x5 x6 x7] T ,
What is necessary is just to obtain x so that becomes equal.

ただし、y0とy1にはノイズがのっているため、単純に連立方程式を解いてしまうと正しい結果が得られない可能性がある。そこで、自乗誤差の和が最小になるようにxを決定する。   However, since y0 and y1 have noise, correct results may not be obtained if the simultaneous equations are simply solved. Therefore, x is determined so that the sum of square errors is minimized.

これらは、行列で書くと
であり、これらの和であるから
⇒x(W0 0+W1 1)x−2(W0 0+W1 1)x+(y0 0+y1 1
となる。
These are written in a matrix
, And the because it is the sum of these ⇒x T (W 0 T W 0 + W 1 T W 1) x-2 (W 0 T W 0 + W 1 T W 1) x + (y 0 T y 0 + y 1 T y 1 )
It becomes.

さらに滑らかさの拘束条件(隣り合うピクセル同士が近い値をとる)を考えると、
も小さくなる必要があり、これを足すと問題は、x(W0 0+W1 1)x−2(W0 0+W1 1)x+(y0 0+y1 1)を最小にするxを求めることである。
Furthermore, considering the smoothness constraint condition (neighboring pixels take close values)
Must also become smaller, the problem when adding this, x T (W 0 T W 0 + W 1 T W 1) x-2 (W 0 T W 0 + W 1 T W 1) x + (y 0 T y 0 + Y 1 T y 1 ) to minimize x.

そこで、上式を微分して0とおくと
を解けばよい。
So, if you differentiate the above equation and set it to 0,
Can be solved.

この逆行列をそのまま解くと計算量が問題となるため、逆行列の補助定理と
なる関係を用いる。
If the inverse matrix is solved as it is, the amount of computation becomes a problem, so the inverse matrix theorem and
Is used.

またA0 -1は何倍に高解像度化するかにのみ依存するため、事前に計算しておくことが可能である。これらより解はベクトル計算のみによって再帰的に計算可能であり、また重みwiがゼロの位置では計算する必要がなく、非常に効率的である。 A 0 -1 depends only on how many times the resolution is increased, and can be calculated in advance. From these, the solution can be calculated recursively only by vector calculation, and it is not necessary to calculate at a position where the weight w i is zero, which is very efficient.

実際に解く手順は次の通り。
a) 準備として、A0 -1をメモリにロードする。またbを計算する。
b)-1-1 A0 -11を計算。A0 -11=[2 -6 6 -6 6 -6 6 -6]
b)-1-2 A1 -1bを計算。A1 -1b=[0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
b)-2-1 A0 -12を計算。A0 -12=[-2 10 -14 14 -14 14 -14 14]
b)-2-2 A1 -12を計算。A1 -12=[-2 10 -14 14 -14 14 -14 14]
b)-2-3 A2 -1bを計算。A2 -1b=[0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
b)-3-1 A1 -13を計算。
The actual procedure is as follows.
a) As preparation, load A 0 -1 into memory. B is calculated.
b) -1-1 Calculate A 0 -1 C 1 . A 0 -1 C 1 = [2 -6 6 -6 6 -6 6 -6]
b) -1-2 Calculate A 1 -1 b. A 1 -1 b = [0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
b) -2-1 Calculate A 0 -1 C 2 . A 0 -1 C 2 = [-2 10 -14 14 -14 14 -14 14]
b) -2-2 Calculate A 1 -1 C 2 . A 1 -1 C 2 = [-2 10 -14 14 -14 14 -14 14]
b) -2-3 Calculate A 2 -1 b. A 2 -1 b = [0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
b) -3-1 Calculate A 1 -1 C 3 .

同様に繰り返し
b)-3-3 A2 -12まで計算。
b)-3-4 A3 -1bを計算。A3 -1b=[0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
同様に繰り返し(実際にはwiがゼロとなるところは計算する必要がない)
b)-8-9 A8 -1bを計算。
8 -1b=[0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103]
Repeat as well
b) -3-3 Calculate up to A 2 -1 C 2 .
b) -3-4 Calculate A 3 -1 b. A 3 -1 b = [0.1 -0.1 0.1 0.9 1.3 0.5 1.3 1.1]
Repeat as well (actually, it is not necessary to calculate where w i is zero)
b) -8-9 Calculate A 8 -1 b.
A 8 -1 b = [0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103]

よって、設定した重みに対する最終的な解は、
x=[0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103]
となる。b)におけるステップ数はxの長さによって決まる。
Therefore, the final solution for the set weight is
x = [0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103]
It becomes. The number of steps in b) depends on the length of x.

(4)上述の(3)で得られた結果に対して重みを計算する。重みに変化がなければ終了して次の手順へ移る。変化した場合は、新たな重みで再び(3)の計算を行う。例では、x=[0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103]であるから、w=[1 1 0 1 1 11 1]となり、前回の重みと異なるため、もう一度(3)に戻る。 (4) The weight is calculated for the result obtained in the above (3). If there is no change in the weight, the process ends and proceeds to the next procedure. If changed, the calculation of (3) is performed again with a new weight. In the example, since x = [0.079 0.003 -0.085 1.167 0.950 0.956 1.038 1.103] T , w = [1 1 0 1 1 11 1], which is different from the previous weight and returns to (3) again.

2度目の繰り返し後は解が
8 -1b=[0.050 0.016 0.002 1.034 1.003 0.974 1.044 1.107]
となり、重みも前回と変化がないため、これが最終的な解となる。
After the second iteration, the solution is A 8 −1 b = [0.050 0.016 0.002 1.034 1.003 0.974 1.044 1.107] T
Since the weight is not changed from the previous time, this is the final solution.

さらに、手順3の後処理では、エッジを強調し、手順4のバーコードのデコードでは、バーコードを読み取ることが行われるが、これらは従来の技術と同様であるので、説明は省略する。   Further, in the post-processing of the procedure 3, the edge is emphasized, and in the decoding of the barcode in the procedure 4, the barcode is read. However, since these are the same as those in the conventional technique, the description is omitted.

こうして、本発明によれば、MAP推定を用いたバーコード画像の高解像度化により遠距離からのバーコードの読み取りを実現し、収納できる情報量の増加が可能であることを示した。   Thus, according to the present invention, it has been shown that the barcode can be read from a long distance by increasing the resolution of the barcode image using MAP estimation, and the amount of information that can be stored can be increased.

また、従来の技術では、細エレメント幅が約1.0ピクセルであるときが限界であったが、本発明の技術を用いることで約0.66ピクセルまで正しく読むことができる。これを640×480の解像度のカメラを使用したとすると、文字数にして従来法では42文字が限界だったが、63文字まで読み取ることが可能である。また、29文字収納されたバーコードを読み取るには従来法だと最低でも横幅が420ピクセルの解像度が必要であったが、提案法を用いると横幅が285ピクセルで読み取ることが出来る。   In the conventional technique, the narrow element width is limited to about 1.0 pixel, but by using the technique of the present invention, it is possible to correctly read up to about 0.66 pixel. Assuming that a camera with a resolution of 640 × 480 is used, it is possible to read up to 63 characters, although 42 characters was the limit in the conventional method. Also, in order to read a barcode containing 29 characters, the conventional method required a resolution with a width of 420 pixels at the minimum, but using the proposed method, it can be read with a width of 285 pixels.

これによりバーコード読み取り機のセンサ部の小型化もしくは、コスト低減を図ることができる。また、ユーザは、バーコードを読み取る際のセンサとバーコードとの位置に関する自由度が高くなり、より使い勝手の良いバーコード読み取り装置を実現できる。   As a result, it is possible to reduce the size or cost of the sensor unit of the barcode reader. In addition, the user has a high degree of freedom regarding the position of the sensor and the barcode when reading the barcode, and a more convenient barcode reading apparatus can be realized.

なお本発明は、上述の説明した実施形態に限定されるものではなく、特許請求の範囲の記載を逸脱しない範囲において、種々の変形が可能とされるものである。   The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the claims.

本発明の適用されるシステム全体の構成を示す模式図である。It is a schematic diagram which shows the structure of the whole system to which this invention is applied. そのスキャナ部100の具体的な構成を示す図である。2 is a diagram showing a specific configuration of the scanner unit 100. FIG. そのデコード基板106の構成を示す模式的なブロック図である。3 is a schematic block diagram showing a configuration of the decode substrate 106. FIG. その説明のためのフローチャート図である。It is a flowchart figure for the description. その説明のためのフローチャート図である。It is a flowchart figure for the description. その説明のためのフローチャート図である。It is a flowchart figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description. その説明のための図である。It is a figure for the description.

符号の説明Explanation of symbols

100…スキャナ部、200…端末、300…バーコード、101…発光素子、102…レンズ、103…CCD、104…筐体、105…CPU部、106…デコード基板、107…メモリ、108…外部記憶装置、109…出力装置   DESCRIPTION OF SYMBOLS 100 ... Scanner part, 200 ... Terminal, 300 ... Bar code, 101 ... Light emitting element, 102 ... Lens, 103 ... CCD, 104 ... Housing, 105 ... CPU part, 106 ... Decoding board, 107 ... Memory, 108 ... External storage Device 109 ... output device

Claims (7)

画像の明部及び/または暗部の長さにより情報を形成すると共に、前記情報の配列方向に対して直交する方向に任意の幅を有してなる2値画像を読み取る光学的情報読取装置であって、
前記任意の幅の範囲を互いに位相を違えて複数回走査する画像走査手段と、
前記複数回の走査で読み取った信号に対して最大事後確率推定を用いて情報を取り出す情報抽出手段と、
を設けることを特徴とする光学的情報読取装置。
An optical information reader for reading a binary image having an arbitrary width in a direction orthogonal to the arrangement direction of the information while forming information by the length of a bright part and / or dark part of the image. And
Image scanning means for scanning the range of the arbitrary width a plurality of times out of phase with each other;
Information extracting means for extracting information using a maximum posterior probability estimation for the signal read in the plurality of scans;
An optical information reading apparatus comprising:
前記互いに位相を違えて複数回走査する画像走査手段は、筐体に対して所定の角度を傾けて配置された撮像装置からなる
ことを特徴とする請求項1記載の光学的情報読取装置。
The optical information reader according to claim 1, wherein the image scanning unit that scans a plurality of times with different phases from each other includes an imaging device disposed at a predetermined angle with respect to the housing.
前記互いに位相を違えて複数回走査する画像走査手段は、前記撮像装置で撮像された任意の走査線に対して前記光学的情報1画素分ずれて同じになる走査線を判別し、その間を等分した走査線を前記複数回走査した信号として取り出す手段を含む
ことを特徴とする請求項2記載の光学的情報読取装置。
The image scanning unit that scans a plurality of times with different phases from each other determines a scanning line that is the same by shifting by one pixel of the optical information with respect to an arbitrary scanning line captured by the imaging device, and the like between them The optical information reader according to claim 2, further comprising means for taking out the divided scanning lines as a signal obtained by scanning the plurality of times.
前記最大事後確率推定を用いて情報を取り出す情報抽出手段は、前記複数回の走査で読み取った信号に対して前記画像の明部及び暗部の変わり目における重み付けを用いて行列演算を行うと共に、前記重み付けの値を予め設定して計算量を削減する演算手段を含む
ことを特徴とする請求項1〜3のいずれか一つに記載の光学的情報読取装置。
The information extraction means for extracting information using the maximum posterior probability estimation performs matrix calculation on the signal read by the plurality of scans using weighting at the transition between bright and dark portions of the image, and the weighting The optical information reading apparatus according to claim 1, further comprising a calculation unit that sets a value of the value in advance to reduce a calculation amount.
画像の明部及び/または暗部の長さにより情報を形成すると共に、前記情報の配列方向に対して直交する方向に任意の幅を有してなる2値画像を読み取るための光学的情報読取方法であって、
前記任意の幅の範囲を互いに位相を違えて複数回走査するステップと、
前記複数回の走査で読み取った信号に対して最大事後確率推定を用いて情報を取り出すステップと、
を備えることを特徴とする光学的情報読取方法。
Optical information reading method for reading a binary image having an arbitrary width in a direction orthogonal to the information arrangement direction while forming information by the length of the bright part and / or dark part of the image Because
Scanning the range of the arbitrary width a plurality of times out of phase with each other;
Retrieving information using a maximum posterior probability estimate for the signal read in the plurality of scans;
An optical information reading method comprising:
前記複数回の走査で読み取った信号に対して、任意の走査線と前記光学的情報1画素分ずれて同じになる走査線とを判別するステップと、
前記判別された走査線の間を等分した走査線を取り出すステップと、
前記取り出された信号に対して最大事後確率推定を用いて情報を取り出すステップと、
を備えることを特徴とする請求項5記載の光学的情報読取方法。
Discriminating an arbitrary scanning line and a scanning line that is the same by shifting by one pixel of the optical information with respect to the signal read by the plurality of scans;
Taking out the scanning lines equally divided between the determined scanning lines;
Retrieving information using a maximum posterior probability estimate for the retrieved signal;
The optical information reading method according to claim 5, further comprising:
前記最大事後確率推定は、前記複数回の走査で読み取った信号に対して前記画像の明及び暗部の変わり目における重み付けを用いて行列演算を行うと共に、前記重み付けの値を予め設定して計算量を削減する
ことを特徴とする請求項5または6のいずれかに記載の光学的情報読取方法。
In the maximum posterior probability estimation, matrix calculation is performed on the signal read by the plurality of scans using weighting at the transition between bright and dark portions of the image, and the weighting value is set in advance to calculate the amount of calculation. The optical information reading method according to claim 5, wherein the optical information reading method is reduced.
JP2006318834A 2006-11-27 2006-11-27 Optical information reading apparatus and optical information reading method Active JP5028582B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006318834A JP5028582B2 (en) 2006-11-27 2006-11-27 Optical information reading apparatus and optical information reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006318834A JP5028582B2 (en) 2006-11-27 2006-11-27 Optical information reading apparatus and optical information reading method

Publications (2)

Publication Number Publication Date
JP2008134710A true JP2008134710A (en) 2008-06-12
JP5028582B2 JP5028582B2 (en) 2012-09-19

Family

ID=39559542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006318834A Active JP5028582B2 (en) 2006-11-27 2006-11-27 Optical information reading apparatus and optical information reading method

Country Status (1)

Country Link
JP (1) JP5028582B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186777A (en) * 2010-03-09 2011-09-22 Toshiba Corp Bar-code reading device and bar-code reading method
JP2015210570A (en) * 2014-04-24 2015-11-24 Necプラットフォームズ株式会社 Communication apparatus, system, and erroneous connection prevention method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077789B (en) * 2014-07-14 2017-01-25 上海电力学院 Horizon detection method based on probability statistics model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5285420A (en) * 1976-01-09 1977-07-15 Tsubakimoto Chain Co Method of optically reading bar code perpendicular to moving direction
JPH10322702A (en) * 1997-05-16 1998-12-04 Nippon Telegr & Teleph Corp <Ntt> Picture decoding method and device therefor
JP2005100058A (en) * 2003-09-24 2005-04-14 Konica Minolta Business Technologies Inc Image measuring device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5285420A (en) * 1976-01-09 1977-07-15 Tsubakimoto Chain Co Method of optically reading bar code perpendicular to moving direction
JPH10322702A (en) * 1997-05-16 1998-12-04 Nippon Telegr & Teleph Corp <Ntt> Picture decoding method and device therefor
JP2005100058A (en) * 2003-09-24 2005-04-14 Konica Minolta Business Technologies Inc Image measuring device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186777A (en) * 2010-03-09 2011-09-22 Toshiba Corp Bar-code reading device and bar-code reading method
JP2015210570A (en) * 2014-04-24 2015-11-24 Necプラットフォームズ株式会社 Communication apparatus, system, and erroneous connection prevention method

Also Published As

Publication number Publication date
JP5028582B2 (en) 2012-09-19

Similar Documents

Publication Publication Date Title
EP2415015B1 (en) Barcode processing
US8469274B2 (en) Method for fast locating decipherable pattern
US7245780B2 (en) Group average filter algorithm for digital image processing
JP5262869B2 (en) Image processing system, image processing server, MFP, and image processing method
EP0669593A2 (en) Two-dimensional code recognition method
JPH0612515A (en) Method and apparatus for decoding two-dimensional bar code using ccd/cmd camera
EP0685809A2 (en) Method and apparatus for decoding two-dimensional bar code
JPH07200712A (en) Method and apparatus for readout of bar code
CN1734500A (en) Computing a higher resolution image using model-based, robust bayesian estimation
JP2004054530A (en) Device, method, and program for reading two-dimensional code and recording medium for this program
EP1894141B1 (en) System and method for locating a predetermined pattern within an image
JP5028582B2 (en) Optical information reading apparatus and optical information reading method
JP2010102584A (en) Image processor and image processing method
KR100404306B1 (en) Coded pattern and method for the extraction of code from the same
Park et al. An example-based prior model for text image super-resolution
US7545535B2 (en) Robust automatic page size detection algorithm for scan application
CN107609448B (en) Bar code decoding method and bar code decoding device
Liyanage Efficient decoding of blurred, pitched, and scratched barcode images
JPH06266879A (en) Bar code detector
JP6815274B2 (en) Image reader and image reading method
EP3982286A1 (en) Computer-implemented method and device for reconstructing a barcode
JPH10124665A (en) Method for processing picture and device therefor
He High-speed edge-detection algorithm for bar-code scanners
Oktem et al. A superresolution approach for Bar Code Reading
JP2004086305A (en) Method for detecting bar code tilt angle and bar code reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120412

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120515

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120521

R150 Certificate of patent or registration of utility model

Ref document number: 5028582

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150706

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350