JP5007388B2 - Medium surface detection program and medium surface detection method applied to code reader - Google Patents

Medium surface detection program and medium surface detection method applied to code reader Download PDF

Info

Publication number
JP5007388B2
JP5007388B2 JP2006126135A JP2006126135A JP5007388B2 JP 5007388 B2 JP5007388 B2 JP 5007388B2 JP 2006126135 A JP2006126135 A JP 2006126135A JP 2006126135 A JP2006126135 A JP 2006126135A JP 5007388 B2 JP5007388 B2 JP 5007388B2
Authority
JP
Japan
Prior art keywords
image
medium surface
code
monitoring
blocks
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.)
Active
Application number
JP2006126135A
Other languages
Japanese (ja)
Other versions
JP2007299168A (en
Inventor
幸枝 橋本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MARS TOHKEN SOLUTION CO., LTD.
Original Assignee
MARS TOHKEN SOLUTION 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 MARS TOHKEN SOLUTION CO., LTD. filed Critical MARS TOHKEN SOLUTION CO., LTD.
Priority to JP2006126135A priority Critical patent/JP5007388B2/en
Publication of JP2007299168A publication Critical patent/JP2007299168A/en
Application granted granted Critical
Publication of JP5007388B2 publication Critical patent/JP5007388B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)

Description

本発明は、撮像手段の撮像領域内に進入する媒体面を自動的に検知する手段等としてコンピュータを機能させるプログラム及び方法に関し、特に、媒体面に表記されたバーコードやQRコード(登録商標)等のコード読取機能を有する装置に適用される媒体面検知プログラム及び媒体面検知方法に関する。   The present invention relates to a program and a method for causing a computer to function as a means for automatically detecting a medium surface entering an imaging area of an imaging means, and more particularly to a barcode or QR code (registered trademark) written on the medium surface. The present invention relates to a medium surface detection program and a medium surface detection method applied to an apparatus having a code reading function such as the above.

従来より、製品や部品の管理情報を短時間で認識するために、製品や部品の番号、商品名、価格その他の情報を白黒等のしま模様で記号化した1次元又は2次元コードが広く用いられている。これらの異なる反射率又は正反射、拡散射光の差で形成されるコードで表わされる1次元コードや2次元コードなどのコード(「ラベル」若しくは「シンボル」とも言う)は、例えば1次元コードにおいては、線の幅の比の組合せで一連の数字を表しており、製品や部品の番号等の各種の情報が上記数字に置き換えられている。このような1次元のバーから成る1次元コードや2次元のセルから成る2次コードを光学的に読み取るコード読取装置としては、操作者が装置を手に持って利用する手持ち式のタイプ(ハンディタイプ)と(例えば特許文献1参照)、搬送路の所定の位置に固設される定置式のタイプ(定置型とも言う)がある(例えば特許文献2参照)。   Conventionally, in order to recognize management information of products and parts in a short time, one-dimensional or two-dimensional codes in which product and part numbers, product names, prices and other information are symbolized with black and white stripes are widely used. It has been. A code such as a one-dimensional code or a two-dimensional code (also referred to as a “label” or “symbol”) represented by a code formed by the difference between these different reflectances, specular reflection, and diffused light is, for example, a one-dimensional code. A series of numbers is represented by a combination of line width ratios, and various types of information such as product and part numbers are replaced with the above numbers. Such a code reader that optically reads a one-dimensional code composed of a one-dimensional bar or a secondary code composed of a two-dimensional cell is a hand-held type (handheld type) that an operator uses while holding the device. Type) (see, for example, Patent Document 1), and a stationary type (also referred to as a stationary type) fixed at a predetermined position on the conveyance path (see, for example, Patent Document 2).

手持ち式のコード読取装置は、例えばPOS(販売時点情報管理)システムとしてスーパーマーケットやデパート等のレジで多用されており、製造及び流通段階においても使用されている。   Hand-held code readers are widely used at supermarkets and department stores as a POS (point-of-sale information management) system, for example, and are also used in the manufacturing and distribution stages.

一方、定置式のコード読取装置は、物流配送センター等において使用されている。例えば、物流配送センターにおいては、届け先や種類がランダムに投入された物品をベルトコンベヤ等の搬送手段によって搬送し、搬送される物品の表面に付されたラベルの情報を撮像手段によって撮像し、その画像を処理してコードを読み取り、その情報に基づいて各種の物品を仕分装置によって自動的に仕分けることが行われている。また、近年では、QRコード(登録商標)の読取機能を有する携帯電話機も実現されている。   On the other hand, stationary code readers are used in distribution distribution centers and the like. For example, in a distribution center, an article with a random destination and type is conveyed by a conveying means such as a belt conveyor, and information on a label attached to the surface of the conveyed article is imaged by an imaging means. A code is read by processing an image, and various articles are automatically sorted by a sorting device based on the information. In recent years, mobile phones having a QR code (registered trademark) reading function have also been realized.

特開2001−52105号公報JP 2001-52105 A 特開2005−148786号公報JP 2005-148786 A

従来のハンディタイプのコード読取装置は、人が手に持ってコードを読み取る際に、読取スイッチの操作などにより自らトリガをかけるか、連続読取モードによって常時読取動作を行うよう設定し、適宜コードを読み取るという方法が採られている。前者は、自ら読取可能な位置にコード又はコード読取装置を置き、トリガを入れる動作を読み取りが完了するまで繰り返す必要がある。後者は、連続読取モードは常に読取動作を行うので、読み取りを行わない場合でも、読み取るためにモードの切替え操作や照明の制御など不必要な動作を行うことになる。また、コード読取機能を有する携帯電話機などの個人用の携帯型情報処理装置においては、表示部の画像を見ながらコードを捉えて操作する必要がある。そのため、いずれのコード読取装置も操作が容易ではなく、効率的に読取作業を行うことが困難であった。   Conventional hand-held type code readers are set so that when a person reads a code with his / her hand, he / she triggers himself by operating a reading switch, etc., or always performs a reading operation in continuous reading mode. The method of reading is taken. In the former, it is necessary to place a code or a code reader at a position where it can be read by itself and repeat the operation of triggering until the reading is completed. The latter always performs a reading operation in the continuous reading mode. Therefore, even when reading is not performed, unnecessary operations such as a mode switching operation and illumination control are performed for reading. In addition, in a portable information processing apparatus for personal use such as a mobile phone having a code reading function, it is necessary to operate by capturing a code while viewing an image on a display unit. Therefore, any of the code reading devices is not easy to operate, and it is difficult to perform the reading operation efficiently.

本発明は上述のような事情から成されたものであり、本発明の目的は、コードを読み取る際の操作性向上やコード読取作業の効率向上を安価に実現することが可能な、コード読取装置に適用される媒体面検知プログラム及び媒体面検知方法を提供することにある   The present invention has been made in the circumstances as described above, and an object of the present invention is to provide a code reading apparatus capable of improving operability when reading a code and improving the efficiency of code reading work at low cost. It is to provide a medium surface detection program and a medium surface detection method applied to

本発明は、コード読取装置に適用される媒体面検知プログラム及び媒体面検知方法に関するものであり、本発明の上記目的は、媒体面検知プログラムに関しては、画像を撮像する撮像手段と、前記撮像手段により撮像された画像を処理して媒体面に表記されたコードを読取るコード読取手段とを備えたコード読取装置に適用される媒体面検知プログラムであって、前記コード読取装置を、前記コードの読取待機時に前記撮像手段を作動して撮像範囲内の画像を定期的に取込む画像取込手段と、前記画像取込手段により取込まれた画像の中央部の画像領域内を所定数のブロックに分割し、分割したブロックのうちの1つ以上の特定ブロックのみを監視ブロックとして、前記定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分を比較して前記監視ブロックでの画像成分の変化量を監視すると共に、画像変化した監視ブロックの各ブロックの位置を監視する監視手段と、前記コードの読取待機時に前記画像成分の変化量の検出情報及び前記監視手段からの位置情報に基づいて前記媒体面が前記撮像手段の撮像範囲内の中央部に存在していることを検知する進入検知手段と、前記媒体面が前記中央部に存在していることが検知された時点で、前記コードの読取動作を開始させるためのトリガ指令を出力するトリガ指令出力手段として機能させることによって達成される。 The present invention relates to a medium surface detection program and a medium surface detection method applied to a code reader. The above object of the present invention relates to an image capturing unit that captures an image and the image capturing unit with respect to the medium surface detection program. A medium surface detection program that is applied to a code reading device that includes a code reading unit that processes an image captured by the image processing unit and reads a code written on the medium surface, wherein the code reading device reads the code. An image capturing unit that operates the imaging unit during standby to periodically capture an image within the imaging range, and a predetermined number of blocks in an image area at the center of the image captured by the image capturing unit divided, as one or more specific blocks only monitoring block of the divided blocks, the image between the corresponding monitoring blocks before and after the image in which the regularly scheduled preparative written Compared minute while monitoring the variation of the image components in the monitoring block, the image changes to a monitoring means for monitoring the position of each block of the monitoring blocks, the variation of the image component during the reading stand of the code Based on detection information and position information from the monitoring means, an entry detection means for detecting that the medium surface is present in the center of the imaging range of the imaging means, and the medium surface is present in the center This is accomplished by functioning as a trigger command output means for outputting a trigger command for starting the code reading operation when it is detected.

また、前記進入検知手段は、前記監視ブロック間の画像成分を同一ブロック位置に対応するブロック毎に比較して、少なくとも1ブロックの画像成分の変化の状態が変化無しから変化有りの状態に遷移し且つ前記同一ブロック位置に対応する各ブロックの画像成分の変化の状態が全ブロックで同一と判定した場合は、前記媒体面が前記撮像手段の撮像範囲内の中央部に静止して存在していると検知し、前記トリガ指令出力手段は、前記媒体面が前記中央部に静止して存在していることが検知された時点で、前記コードの読取動作を開始させるためのトリガ指令を出力すること、記コードの読取動作の開始時点からの経過時間が前記媒体面の離脱判別時間として設定されたタイムアウト時間を経過したのであれば、前記媒体面前記撮像範囲内から離していると検知すると共に、次のコードに対する読取待機状態に遷移させる離脱検知手段として、前記コード読取装置を更に機能させること、前記画像成分の変化量は、前記監視ブロック間の輝度値の標準偏差又は平均輝度値の変化量であること、前記画像取込手段は、前記画像を取込む際に映像信号の利得とシャッタースピードの設定を複数のパターンに変化させて各パターンの画像を取込み、前記監視手段は、前記監視ブロック間の画像成分を比較する際に前記各パターンでの画像成分の変化量を監視すること、によってそれぞれ一層効果的に達成される。 Further, the entry detection means compares the image components between the monitoring blocks for each block corresponding to the same block position, and the change state of the image component of at least one block changes from no change to a change state. In addition, when it is determined that the state of change in the image component of each block corresponding to the same block position is the same in all blocks, the medium surface is present at the center in the imaging range of the imaging unit. And the trigger command output means outputs a trigger command for starting the code reading operation when it is detected that the medium surface is stationary at the central portion. , if the elapsed time from the start of the reading operation of the previous SL code had elapsed set timeout period as the leaving determination time of the medium surface, the medium surface is the imaging range Thereby detecting the pressurizing et al are away de, as the leaving detection means for transitioning to a wait state read for the next code, the code reading device to be further feature, the variation of the image components, between the monitoring block The standard deviation of the luminance value or the amount of change in the average luminance value, the image capturing means changes the gain of the video signal and the shutter speed to a plurality of patterns when capturing the image, and The image capturing is performed, and the monitoring unit is more effectively achieved by monitoring the amount of change of the image component in each pattern when comparing the image components between the monitoring blocks.

さらに、前記監視手段は、前記監視ブロックを設定する際に、前記分割の対象とする画像範囲、前記ブロックの形状、大きさ、及び分割数のうちの少なくとも1つの要素を可変すること、前記監視手段は、前記コード読取装置の動作モードに応じて前記要素を可変すること、前記進入検知手段は、前記画像成分の変化量が閾値の範囲外となっているブロックの数を媒体面検知の判定要素として前記媒体面の進入を検知すること、前記コード読取手段が前記コードの解読機能を有する場合、前記離脱検知手段は、前記コードの解読状況に応じて前記タイムアウト時間を設定すること、前記検知の対象となる媒体面が、印刷媒体、画像表示媒体、及び前記コードがダイレクトマーキングされた媒体の面を含むこと、によってそれぞれ一層効果的に達成される。 Further, the monitoring means, when setting the monitoring block, varies at least one element of the image range to be divided, the shape and size of the block, and the number of divisions, The means varies the element in accordance with the operation mode of the code reading device, and the entry detection means determines the number of blocks in which the amount of change in the image component is outside the threshold range in the medium surface detection. Detecting entry of the medium surface as an element, and when the code reading means has a function of decoding the code, the separation detecting means sets the timeout time according to the decoding status of the code, the detection The medium surface to be subjected to the printing includes the surface of the print medium, the image display medium, and the medium on which the code is directly marked. It is made.

また、媒体面検知方法に関しては、画像を撮像する撮像手段と、前記撮像手段により撮像された画像を処理して媒体面に表記されたコードを読取るコード読取手段とを備えたコード読取装置における媒体面検知方法であって、前記コードの読取待機時に前記撮像手段を作動して撮像範囲内の画像を定期的に取込むステップと、前記画像取込手段により取込まれた画像の中央部の画像領域内を所定数のブロックに分割し、分割したブロックのうちの1つ以上の特定ブロックのみを監視ブロックとして、前記定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分を比較して前記監視ブロックでの画像成分の変化量を監視すると共に、画像変化した監視ブロックの各ブロックの位置を監視するステップと、前記コードの読取待機時に前記画像成分の変化量の検出情報及び前記監視手段からの位置情報に基づいて前記媒体面が前記撮像手段の撮像範囲内の中央部に存在していることを検知すると同時に前記コードの読取動作を開始させるステップと、前記画像成分の変化量及び前記コードの読取動作の開始時点からの経過時間の情報に基づいて前記媒体面の前記撮像範囲内からの離脱を検知すると共に、次のコードに対する読取待機状態に遷移させるステップと、を有することによって達成される。 In addition, regarding a medium surface detection method, a medium in a code reading device including an image pickup unit that picks up an image and a code reading unit that processes an image picked up by the image pickup unit and reads a code written on the medium surface A method for detecting a surface, the step of operating the image pickup means at the time of waiting for reading the code to periodically take an image in the image pickup range, and an image of a central portion of the image taken by the image capture means The area is divided into a predetermined number of blocks, and only one or more specific blocks among the divided blocks are set as monitoring blocks, and image components between corresponding monitoring blocks are compared in the images before and after the periodic capture. and monitors the change amount of the image components in the monitoring block, the steps of monitoring the position of each block of the monitoring blocks image change, reading of the code waiting Sometimes the detection to the said code reading operation simultaneously be present in the central portion of the imaging range of the medium surface is the image pickup means on the basis of the position information from the change amount of the detected information and said monitoring means of said image component And detecting the separation of the medium surface from the imaging range based on the information on the change amount of the image component and the elapsed time from the start time of the code reading operation, and for the next code Transitioning to a read standby state.

本発明によれば、コードの読取待機時に取込んだ画像を処理して自動的に媒体面を検知すると共にコードの読取動作を自動的に開始させるようにしているので、読取スイッチを自らが操作したり媒体検知センサを設けたりすることなく、自動的に媒体面を検知してコードを読み取ることが可能となる。そのため、コードを読み取る際の操作性向上やコード読取作業の効率向上を安価に実現することができるなどの優れた効果を有する。   According to the present invention, the image captured during the code reading standby time is processed to automatically detect the medium surface and automatically start the code reading operation. It is possible to automatically detect the surface of the medium and read the code without providing a medium detection sensor. Therefore, there are excellent effects such as improvement in operability when reading a code and improvement in the efficiency of code reading work at a low cost.

本発明は、手持ち式のコード読取装置に限らずに適用可能であるが、以下の実施形態においては、手持ち式と定置式兼用のハンディタイプのコード読取装置に適用した場合を例として説明する。なお、本発明で言う「媒体面」とは、コードが印刷された印刷媒体の面に限らず、コードが表示されるディスプレイ等の画像表示媒体の表示面、コードのラベルが添着された商品等の物体の面など、コードが表記された全ての物体の面(曲面を含む)を言う。また、本発明で言う「コード」とは、所定の情報が符号化されたコードであり、白黒等の模様で符号化された一般的な1次元コードや2次元コード(QRコード(登録商標)を含む各種2次元コード)の他に、金属やセラミックス、高分子化合物などの物体表面(例えば半導体のウエハー,エンジンブロックなどの物体表面)に直接形成されたマークを含む各種のコードを言う。また、印章や指紋等のシンボルを読取対象として良い。   The present invention can be applied not only to a hand-held type code reader, but in the following embodiments, a case where the present invention is applied to a hand-held type and a hand-held type code reader will be described as an example. The “medium surface” as used in the present invention is not limited to the surface of the print medium on which the code is printed, the display surface of an image display medium such as a display on which the code is displayed, the product with the code label attached, etc. This refers to the surfaces (including curved surfaces) of all objects on which codes are written, such as the surfaces of objects. The “code” referred to in the present invention is a code in which predetermined information is encoded, and is a general one-dimensional code or two-dimensional code (QR code (registered trademark)) encoded in a pattern such as black and white. And various codes including marks directly formed on the surface of an object such as metal, ceramics, or a polymer compound (for example, an object surface such as a semiconductor wafer or an engine block). Further, symbols such as seals and fingerprints may be read.

図1(A)及び(B)は、本発明に係る媒体面検知機能を有するコード読取装置の一例を示す外観図であり、図1(A)が手持ち式コード読取装置として使用する場合の例、図1(B)が定置式コード読取装置として使用する場合の例をそれぞれ示している。本例のコード読取装置10は、媒体面1に表記されたコード2(例えば商品に貼着するラベルに印刷されたコード)の画像読取機能を有する携帯型の情報処理装置であり、POSレジスタ装置を備えた店舗等において好適に利用される。   FIGS. 1A and 1B are external views showing an example of a code reading device having a medium surface detection function according to the present invention, and FIG. 1A is an example in the case of being used as a handheld code reading device. FIG. 1B shows an example in the case of using as a stationary code reader. A code reading device 10 of this example is a portable information processing device having an image reading function of a code 2 (for example, a code printed on a label attached to a product) written on a medium surface 1, and a POS register device. It is preferably used in stores equipped with

コード読取装置10を手持ち式の装置として使用する場合は、使用者がコード読取装置10を手で持ち、図1(A)に示すように、読取面10a(撮像手段の撮像面)に媒体面1を近づける。この動作により、読取スイッチ10b等の操作をすることなく、撮像範囲内への媒体面1の進入が自動的に検知され、媒体面1上のコード2の画像が読み取られてコード2の解読処理が実行される。また、媒体面1が撮像範囲内から抜け出ると自動的に待機状態となる。なお、本発明で言う「撮像範囲」とは、ピンボケ等が生じない三次元の撮像範囲(コードの解読が可能な撮像範囲)のことを言う。   When the code reading device 10 is used as a hand-held device, the user holds the code reading device 10 by hand and, as shown in FIG. 1A, the reading surface 10a (the image pickup surface of the image pickup means) has a medium surface. Bring 1 closer. By this operation, the entry of the medium surface 1 into the imaging range is automatically detected without operating the reading switch 10b or the like, and the image of the code 2 on the medium surface 1 is read to decode the code 2. Is executed. Further, when the medium surface 1 comes out of the imaging range, it automatically enters a standby state. Note that the “imaging range” in the present invention refers to a three-dimensional imaging range (an imaging range in which a code can be decoded) in which no blur is generated.

他方、定置式のコード読取装置として使用する場合は、図1(B)に示すように、コード読取装置10を支持台10cに装着しておく。支持台10cは、支点を中心として傾斜及び回動自在に支持する支持台であり、支持台10cに設置されたコード読取装置10の撮像手段の位置から所定の距離と画角の範囲内が撮像範囲となる。そして、媒体面1が近づくと、手持ち式の場合と同様に、媒体面1上のコード2の画像が自動的に読み取られてコード2が解読される。そして、媒体面1が撮像範囲内から抜き取られると自動的に待機状態となる。また、次の媒体をコード読取装置10の撮像範囲内に適宜抜き差しすることで、読取スイッチ10b等の操作をすることなく、複数の媒体面1にそれぞれ付されたコードを連続的に読み取らせることができる。例えば、POSシステムにおいて、商品に貼着するラベル1を対象として、各ラベル1に印刷されたコード2(商品の価格等を示す情報)をコード読取装置10によって適宜読み取り、コード2の解読データをPOSシステムのコンピュータへ送信して、各商品の価格情報などをデータベースに登録することができる。   On the other hand, when used as a stationary code reader, the code reader 10 is mounted on the support 10c as shown in FIG. The support base 10c is a support base that is tiltably and pivotally supported around a fulcrum, and images within a predetermined distance and angle of view range from the position of the imaging means of the code reader 10 installed on the support base 10c. It becomes a range. When the medium surface 1 approaches, the image of the code 2 on the medium surface 1 is automatically read and the code 2 is decoded as in the case of the hand-held type. Then, when the medium surface 1 is extracted from the imaging range, it automatically enters a standby state. In addition, by appropriately inserting / removing the next medium into / from the imaging range of the code reader 10, the codes attached to the plurality of medium surfaces 1 can be continuously read without operating the reading switch 10b or the like. Can do. For example, in a POS system, for a label 1 to be attached to a product, a code 2 (information indicating the price of the product) printed on each label 1 is appropriately read by a code reading device 10, and the decoded data of the code 2 is read. The price information of each product can be registered in the database by transmitting it to the computer of the POS system.

このように、本発明に係るコード読取装置10は、いずれの使用形態においても読取スイッチ10bの操作(又は操作部や上位システムからのコマンド入力など)をすることなく、また、進入検知センサや離脱検知センサ等のハードウェアを設けることなく、媒体面1上のコード2の読取動作を自動的に開始/終了するようにしている。   As described above, the code reading device 10 according to the present invention does not operate the reading switch 10b (or input a command from the operation unit or the host system) in any use form, and also includes an entry detection sensor and a detachment. The reading operation of the code 2 on the medium surface 1 is automatically started / finished without providing hardware such as a detection sensor.

次に、コード読取装置10の構成について説明する。   Next, the configuration of the code reading device 10 will be described.

図2は、本発明に係るコード読取装置の構成例を示すブロック図であり、コード読取装置10は、被写体の画像を撮像する撮像手段11と、撮像手段11によって撮像された画像を処理して媒体面1に表記されたコード2の画像を読み取ると共に、符号化されている情報を解読(デコード)する機能を有するコード読取手段12(以下「コード解読手段」とする)と、媒体面1に対して照明光を出射する照明手段13と、撮像手段11の撮像範囲内への媒体面1の進入や撮像範囲内からの媒体面1の離脱を検知する媒体面検知手段14と、各手段11〜14を含む装置全体の動作を制御する制御手段15とを備えている。   FIG. 2 is a block diagram illustrating a configuration example of the code reading device according to the present invention. The code reading device 10 processes an image captured by the imaging unit 11 and an imaging unit 11 that captures an image of a subject. Code reading means 12 (hereinafter referred to as “code decoding means”) having a function of reading an image of the code 2 written on the medium surface 1 and decoding (decoding) the encoded information; On the other hand, the illuminating means 13 for emitting illumination light, the medium surface detecting means 14 for detecting the entry of the medium surface 1 into the imaging range of the imaging means 11 and the detachment of the medium surface 1 from the imaging range, and each means 11 And control means 15 for controlling the operation of the entire apparatus including -14.

撮像手段11は、本例では媒体面1に表記されたコード2を被写体として、そのコード2を含む領域内の画像を撮像するための手段であり、撮像デバイスとしては、白黒又はカラーの像を撮像する撮像素子及びレンズ等から成る撮像デバイス、例えばCCD型又はCMOS型の撮像カメラ、又はカラーイメージ素子を直線状に配列したラインセンサ等が使用される。   In this example, the image pickup means 11 is a means for picking up an image in an area including the code 2 using the code 2 written on the medium surface 1 as a subject. As the image pickup device, a monochrome or color image is used. An image pickup device including an image pickup element and a lens for picking up an image, for example, a CCD type or CMOS type image pickup camera, or a line sensor in which color image elements are arranged in a straight line is used.

コード解読手段12は、ソフトウェア(コンピュータプログラム及び解読用データ)又はハードウェアで構成され、コード2の画像データを処理してコード情報を解読する。このコード解読手段12は、コード2の画像を読み取るだけの手段としても良いが、本実施の形態では、コード解読機能を有するものとして説明する。   The code decoding means 12 is configured by software (computer program and decoding data) or hardware, and processes the image data of the code 2 to decode the code information. The code decoding unit 12 may be a unit that only reads the image of the code 2, but in the present embodiment, the code decoding unit 12 will be described as having a code decoding function.

照明手段13は、光源からの光をコード2に対して照射する手段(付加的な構成要素)であり、LED(発光ダイオード)アレイ等から構成され、例えば、暗い環境の下で使用されるコード読取装置や、様々な場所で使用される携帯式のコード読取装置などに搭載される。   The illumination means 13 is a means (additional component) for irradiating the light from the light source to the cord 2, and is composed of an LED (light emitting diode) array or the like, for example, a cord used in a dark environment. It is mounted on a reader or a portable code reader used in various places.

媒体面検知手段14は、本発明に係る媒体面検知機能を有するコード読取装置を実現するための手段であり、本実施の形態においては、コンピュータに媒体面検知機能を実現させるためのソフトウェア(プログラム、制御データ等)で構成される。本発明においては、撮像手段11の撮像範囲内への媒体面1の進入及び撮像範囲内からの離脱を検知する際、進入検知センサや離脱検知センサなどのハードウェアを用いることなく、媒体面検知手段14によって進入/離脱を自動的に検知し、コードの読取動作の開始/終了を制御するようにしている。また、照明手段13を有する装置においては、読取待機時に撮像した画像データを基に検出した周囲の光量に応じて、照明手段13の点灯/消灯、光量等を制御する機能を有している。   The medium surface detecting means 14 is means for realizing the code reader having the medium surface detecting function according to the present invention. In the present embodiment, software (program for causing the computer to realize the medium surface detecting function) , Control data, etc.). In the present invention, when detecting the entry of the medium surface 1 into the imaging range of the imaging unit 11 and the departure from the imaging range, the medium surface detection is performed without using hardware such as an entry detection sensor or a separation detection sensor. The entry / exit is automatically detected by the means 14 to control the start / end of the code reading operation. In addition, the apparatus having the illumination unit 13 has a function of controlling lighting / extinction of the illumination unit 13, the amount of light, and the like according to the ambient light amount detected based on image data captured during the reading standby.

この媒体面検知手段14の機能構成や動作例については具体例を示して後述する。   A functional configuration and an operation example of the medium surface detection unit 14 will be described later with a specific example.

制御手段15は、各手段を制御するためのCPU15a,メモリ15b,入出力インターフェイス等から構成される。その他の手段としては、通信ケーブル若しくは無線通信ネットワーク等を介して上位システム20との間でリアルタムにデータを伝送する通信手段や、コードの解読データ(若しくは生画像データ)をメモリ若しくは、PCカード,フラッシュメモリ等の受渡し可能な記憶媒体に蓄積して記録するデータ蓄積手段等が搭載される。   The control means 15 includes a CPU 15a for controlling each means, a memory 15b, an input / output interface, and the like. Other means include communication means for transmitting data to and from the host system 20 via a communication cable or a wireless communication network, code decoding data (or raw image data) in a memory, a PC card, Data storage means for storing and recording in a transferable storage medium such as a flash memory is mounted.

次に、媒体面検知手段14が有する機能について説明する。以下、媒体面検知手段14が有する「機能」を「手段」と称して説明する。   Next, functions of the medium surface detection unit 14 will be described. Hereinafter, the “function” of the medium surface detection means 14 will be referred to as “means”.

図3は、媒体面検知手段14の構成の一例を示す機能ブロック図であり、媒体面検知手段14は、読取待機時に撮像手段11を作動して撮像範囲内の画像を定期的に取込む画像取込手段14aと、この画像取込手段14aから時系列的に取込まれた前後の画像の画像成分を比較して、読取待機時における画像領域内の画像成分の変化量を監視する監視手段14bと、画像成分(例えば輝度値)の変化量と閾値とを比較して媒体面1の撮像範囲内への進入を検知する進入検知手段14cと、進入が検知された時点で、コードの読取動作を開始させるためのトリガ指令(読取開始指令)を出力するトリガ指令出力手段14dと、進入が検知された後、画像成分の変化量と閾値とを比較して媒体面1の撮像範囲内からの離脱を検知すると共に、次のコードに対する読取待機状態に遷移させる離脱検知手段14eとを備えている。   FIG. 3 is a functional block diagram illustrating an example of the configuration of the medium surface detection unit 14. The medium surface detection unit 14 operates the image pickup unit 11 during reading standby and periodically captures an image within the image pickup range. The capturing means 14a and the monitoring means for monitoring the amount of change of the image component in the image area during the standby for reading by comparing the image components of the images before and after being captured in time series from the image capturing means 14a. 14b, an entry detection means 14c for comparing the amount of change in the image component (for example, luminance value) and a threshold value to detect entry into the imaging range of the medium surface 1, and reading of the code when entry is detected The trigger command output means 14d for outputting a trigger command (reading start command) for starting the operation, and after the entry is detected, the amount of change of the image component is compared with the threshold value, and from within the imaging range of the medium surface 1 Detecting the withdrawal of And a separation detection means 14e for transitioning to a read standby state for over de.

上記監視手段14bによる監視は、画像取込手段14aにより取込まれた画像領域内の全て又は特定範囲内の画像を所定数のブロックに分割し、1つ以上の特定ブロック(例えば画像領域をn個に分割したブロック群中の外周縁側の環状ブロック)を監視ブロックとして、その監視ブロックでの画像成分の変化量を監視する形態とするのが好ましい。以下、この監視形態で処理する場合を例として説明する。   The monitoring by the monitoring unit 14b is performed by dividing an image within the image area captured by the image capturing unit 14a or an image within a specific range into a predetermined number of blocks and dividing one or more specific blocks (for example, the image area into n It is preferable that the amount of change in the image component in the monitoring block is monitored by using the monitoring block as an annular block on the outer peripheral edge side in the block group divided into pieces. Hereinafter, the case of processing in this monitoring mode will be described as an example.

なお、上記手段14a〜14eは、説明の便宜上、本発明に係る媒体面検知手段14の機能構成を示すために、構成要素に手段名を付けて機能的に分類したものであり、ソフトウェアの構成等を限定するものではない。   The means 14a to 14e are functionally classified by assigning means names to the constituent elements in order to show the functional configuration of the medium surface detecting means 14 according to the present invention for convenience of explanation, and the software configuration It does not limit etc.

上述のような構成において、本発明に係る媒体面検知処理について、その概要を図4及び図5のフローチャートを用いて説明する。   The outline of the medium surface detection processing according to the present invention having the above-described configuration will be described with reference to the flowcharts of FIGS.

媒体面検知手段14は、先ず、画像取込手段14aにより、コードの読取待機時に撮像手段11を作動して撮像範囲内の画像を定期的に取込む(ステップS1)。   First, the medium surface detection unit 14 periodically captures an image within the imaging range by operating the imaging unit 11 during the code reading standby by the image capturing unit 14a (step S1).

媒体面検知処理(ステップS2)としては、監視手段14bにより、ステップS1で取込んだ画像の画像領域内を一定ブロックに分割し(図5のステップS2a)、分割ブロック内の1つ以上の特定ブロックを監視ブロックとして、上記ステップS1により定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分の変化を監視する。   In the medium surface detection process (step S2), the monitoring unit 14b divides the image area of the image captured in step S1 into fixed blocks (step S2a in FIG. 5), and specifies one or more specified blocks. Using the block as a monitoring block, the change in the image component between the corresponding monitoring blocks is monitored in the images before and after being periodically captured in step S1.

図6(A)〜(D)は監視ブロックの例を示しており、分割ブロック内の斜線部のブロック3が監視ブロックを示している。図6(A)は、分割した9ブロックの全てを監視ブロックとする例、図6(B)は、中心のブロックのみを監視ブロックとする例、図6(C)は周囲のブロックを監視ブロックとする例、図6(D)は四隅を監視ブロックとする例をそれぞれ示している。   FIGS. 6A to 6D show examples of monitoring blocks, and the shaded block 3 in the divided block indicates the monitoring block. 6A shows an example in which all nine divided blocks are used as monitoring blocks, FIG. 6B shows an example in which only the central block is used as a monitoring block, and FIG. 6C shows monitoring blocks in the surrounding blocks. FIG. 6D shows an example in which four corners are monitored blocks.

監視ブロックは固定的であっても良く、可変にしても良い。例えば、ブロックの形状、大きさ、分割数、取込んだ画像の分割領域内でのブロック位置や向きなど(それらのうちの少なくとも1つの要素)は、例えばコード読取装置の動作モード(読取待機モード、読取動作モード、進入検知モード、離脱検知モード等)や、撮像手段の画角、画像処理によって検出した媒体の進入方向などの情報に応じてリアルタイムに決定される。   The monitoring block may be fixed or variable. For example, the block shape, size, number of divisions, block position and orientation in the divided area of the captured image (at least one of them), for example, the operation mode of the code reader (reading standby mode) , A reading operation mode, an entry detection mode, a separation detection mode, etc.), an angle of view of an imaging unit, and an entry direction of a medium detected by image processing.

監視手段14bでは、上記のような監視ブロック毎に画像成分(例えば標準偏差、平均輝度)を求め、画像成分の変化を監視する(ステップS2b)。そして、例えば画像成分の変化が有るブロックの数を判定要素として、画像成分の変化を検出したブロックの数が指定ブロック数(媒体面検知用の判定基準値)以上あるか否かを判定し(ステップS2c)、指定ブロック数未満であれば「変化なし」(ステップS2d)、指定ブロック数以上に変化があれば「変化あり」と判定する(ステップS2e)。   The monitoring unit 14b obtains an image component (for example, standard deviation, average luminance) for each monitoring block as described above, and monitors a change in the image component (step S2b). Then, for example, using the number of blocks having a change in the image component as a determination element, it is determined whether or not the number of blocks in which the change in the image component has been detected is equal to or greater than the specified number of blocks (determination reference value for medium surface detection) ( In step S2c), if there is less than the specified number of blocks, “no change” is determined (step S2d), and if there is a change beyond the specified number of blocks, it is determined that “changed” (step S2e).

媒体面検知手段14(進入検知手段14c)では、待機時における上記判定結果が「変化あり」であれば、媒体面1が撮像範囲内へ進入したと判断し、進入検知手段14cから自動的にトリガ指令(コードの読取動作の開始指令)を送出してコード2の読取動作を開始させる。例えば、図7(A)の模式図に示すように、時系列的に前の取込画像の監視ブロックB1(i)(本例では、取込画像を9分割した9ブロックが監視ブロックであり、i=1〜9)と、後の取込画像の監視ブロックB2(i)とを比較して画像成分の変化が無ければ、読取動作を開始せずに待機状態のままとする。また、図7(B)に示すように、監視ブロックにおいて指定ブロック数(例えば3ブロック)以上に変化があれば、「変化あり」の判定結果を監視手段14bから受けて進入検知と判断し、コード2の読取動作を開始させる(ステップS3)。   The medium surface detection means 14 (entrance detection means 14c) determines that the medium surface 1 has entered the imaging range if the determination result at the time of standby is “changed”, and automatically enters from the entry detection means 14c. A trigger command (code reading operation start command) is sent to start the code 2 reading operation. For example, as shown in the schematic diagram of FIG. 7A, the monitoring block B1 (i) of the previous captured image in time series (in this example, 9 blocks obtained by dividing the captured image into 9 are monitoring blocks. , I = 1 to 9) and the subsequent captured image monitoring block B2 (i), and if there is no change in the image component, the reading operation is not started and the standby state is maintained. Also, as shown in FIG. 7B, if there is a change in the number of designated blocks (for example, 3 blocks) or more in the monitoring block, the determination result of “with change” is received from the monitoring means 14b and it is determined that the entry is detected, The code 2 reading operation is started (step S3).

媒体面検知手段14は、コード解読手段12によるコード2の読取動作中も媒体面検知処理を継続する(ステップS4〜S6)。そして、離脱検知手段14eでは、図7(C)に示すように、監視ブロックにおいて画像の変化が無い状態が一定時間経過(後述するタイムアウト時間を超過)したと判定したのであれば、媒体面1が撮像範囲内から離脱したと判断し(ステップS7)、コード2の読取動作を停止させて再び読取待機状態に入る。   The medium surface detection unit 14 continues the medium surface detection process even during the code 2 reading operation by the code decoding unit 12 (steps S4 to S6). Then, in the separation detection unit 14e, as shown in FIG. 7C, if it is determined that a state in which there is no change in the image in the monitoring block has passed a certain time (exceeded a timeout time described later), the medium surface 1 Is separated from the imaging range (step S7), the reading operation of the code 2 is stopped, and the reading standby state is entered again.

以上の動作を繰り返すことにより、読取スイッチの操作をしたり、媒体進入検知センサを設けたりすることなく、自動的に媒体面を検知してコードを読み取ることが可能となる。また、連続読取モードなども読取動作モードの切替え操作をすることなく、自動的に複数のコードを読み取ることが可能となる。   By repeating the above operation, it is possible to automatically detect the medium surface and read the code without operating the reading switch or providing a medium entry detection sensor. In addition, in the continuous reading mode or the like, it is possible to automatically read a plurality of codes without switching the reading operation mode.

次に、本発明を適用したコード読取装置の動作例と媒体面検知処理の詳細について、図8のフローチャートの流れに沿って説明する。
<読取待機時の画像取込処理>
先ず、画像取込手段14aにより、コードの読取待機時に撮像手段11を作動して撮像範囲内の画像(媒体面検知用の画像)を定期的に取込む。その際、一定条件、例えば映像信号の利得、シャッタースピード、及び内部照明を可変せずに同一設定として撮像範囲内の画像を定期的に取込み、記憶手段に時系列に記憶する。ここで取込む画像は、撮像範囲内の全ての画像を対象としても良いが、本実施の形態では、画像領域より小さな特定範囲内の画像(例えば縦横半分(面積比が1/4)の領域の画像)を対象としている(ステップS11)。
Next, an operation example of the code reading apparatus to which the present invention is applied and details of the medium surface detection process will be described along the flow of the flowchart of FIG.
<Image capture processing during reading standby>
First, the image capturing means 14a periodically captures an image (image for medium surface detection) within the imaging range by operating the image capturing means 11 during the code reading standby. At that time, images within the imaging range are periodically taken as the same setting without changing certain conditions, for example, the gain of the video signal, the shutter speed, and the internal illumination, and are stored in the storage means in time series. The images to be captured here may be all images within the imaging range, but in the present embodiment, images within a specific range smaller than the image region (for example, an area having a vertical and horizontal half (area ratio is 1/4)) Image) (step S11).

なお、照明手段13を有する装置の場合は、照明は一定以上の周囲光があるときは点灯せず、暗いときは点灯させる。この照明制御は、媒体面検知手段14が、読取待機時に取込んだ画像データを基に周囲の光量を検出し、コード解読手段12によるコード読み取り時、光量に応じて点灯制御等を行う。好ましい実施の形態では、上記ステップS11において、画像を定期的に取込む際には、照明手段13による内部照明をつけなくてもある程度の範囲の照度に対応できるように、例えば、映像信号の利得とシャッタースピードの設定を複数(例えば、設定A,設定B,設定Cの3パターン)設定しておき、画像を取込む際に、設定A(t1)→設定B(t2)→設定C(t3)→設定A(t4)→設定B(t5)→設定C(t6)・・・というように、映像信号の利得とシャッタースピードを順番に変化させる。そして、図8中に示すように、各設定パターンに対応する画像データ(GA(t1)、GB(t2)、GC(t3)、・・・)を媒体面記憶エリアに取込み、媒体面の検知処理(媒体面有無の判定処理)を行うときには、同じ明るさの直前の画像と比較(同一設定パターンの時系列的に連続する前後の画像をそれぞれ比較)する処理方式とするのが好ましい。あるいは、照明手段13を有する装置の場合は、照明手段13を作動すると共に照明光の光量を制御し、明るさが複数種類の画像を順次取込み、同じ明るさの直前の画像と比較する処理方式としても良い。   In the case of a device having the illumination means 13, the illumination is not turned on when there is a certain amount of ambient light, and is turned on when it is dark. In this illumination control, the medium surface detecting means 14 detects the amount of ambient light based on the image data captured during reading standby, and performs lighting control or the like according to the light quantity when the code decoding means 12 reads the code. In the preferred embodiment, in step S11, when images are taken in regularly, for example, the gain of the video signal is set so as to correspond to a certain range of illuminance without the internal illumination by the illumination means 13. And a plurality of shutter speed settings (for example, three patterns of setting A, setting B, and setting C), and when capturing an image, setting A (t1) → setting B (t2) → setting C (t3) ) → Setting A (t4) → Setting B (t5) → Setting C (t6)... The video signal gain and the shutter speed are sequentially changed. Then, as shown in FIG. 8, image data (GA (t1), GB (t2), GC (t3),...) Corresponding to each setting pattern is taken into the medium surface storage area, and the medium surface is detected. When performing processing (medium surface presence / absence determination processing), it is preferable to use a processing method in which comparison is made with an immediately preceding image of the same brightness (comparing images before and after the same set pattern in chronological order). Alternatively, in the case of an apparatus having the illuminating means 13, a processing method in which the illuminating means 13 is operated and the amount of illumination light is controlled so that a plurality of types of images are sequentially captured and compared with the immediately preceding image having the same brightness. It is also good.

また、他の処理形態としては、(1)上記映像信号の利得とシャッタースピードの設定パターンの数を変化させる形態、(2)取込んだ画像の平均輝度や最高輝度を基に映像信号の利得が基準値(最適値)となるように制御して、同じ条件(調整後の映像信号の利得)の画像を取込む形態、(3)各パターンの2つの画像データ(設定Aに対応する画像データGA(t1)→GA(t2)、設定Bに対応する画像データGB(t3)→GB(t4)・・・)を順次取込む形態、のうちのいずれか1つの形態、又は組み合わせた形態を採用するようにしても良い。
<媒体面検知処理>
印刷媒体や画像表示媒体等の媒体面(本例では紙面)を検知する際には、画像取込手段14aにより取込まれた画像の画像領域内を、監視手段14bにより所定数のブロックに分割し、1つ以上の特定ブロックを監視ブロックとし、定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分を比較して上記監視ブロックでの画像成分の変化量を監視する。その際、処理高速化のため、例えば監視ブロック内の画素群のうち、所定の割合の画素を間引き、その画素群から成る各ブロックの画像成分を比較する形態とするのが好ましい。なお、本実施の形態では、例えば紙面の進入検知時は1/2画素、紙面が抜けたときの検知時は1/4画素を間引くというように、進入検知時と離脱検知とで間引率を変えるようにしている。その際、間引く画素数を1、2、3、4・・・というように、画像の大きさに応じて間引く画素数を変えるようにしても良い。
As other processing forms, (1) a form in which the number of setting patterns of the video signal gain and shutter speed is changed, and (2) a video signal gain based on the average brightness and maximum brightness of the captured image. Is controlled so that becomes a reference value (optimum value), and an image of the same condition (adjusted video signal gain) is taken in. (3) Two image data of each pattern (image corresponding to setting A) Data GA (t1) → GA (t2), image data GB (t3) → GB (t4).. May be adopted.
<Media surface detection processing>
When detecting the surface of a medium such as a print medium or an image display medium (paper surface in this example), the image area of the image captured by the image capturing unit 14a is divided into a predetermined number of blocks by the monitoring unit 14b. Then, one or more specific blocks are set as monitoring blocks, and image components between corresponding monitoring blocks are compared in images before and after being periodically captured, and the amount of change in the image components in the monitoring block is monitored. At this time, in order to increase the processing speed, for example, it is preferable that a predetermined ratio of pixels in the pixel group in the monitoring block is thinned out, and the image components of the blocks including the pixel group are compared. In the present embodiment, for example, 1/2 pixel is thinned when entering the paper, and 1/4 pixel is thinned when the paper is removed. I try to change it. At that time, the number of pixels to be thinned out may be changed according to the size of the image, such as 1, 2, 3, 4.

ここで、ブロックの分割形態と上記監視ブロックの設定形態について具体例を示して説明する。   Here, the block division mode and the monitoring block setting mode will be described with specific examples.

媒体面1の撮像範囲内への進入の検知処理においては、例えば、取込んだ画像範囲の中心から50%の領域内を9ブロック(3×3)に分割する。ここで言う50%は辺の長さに対する割合である(面積では25%の領域内を分割)。一方、撮像範囲からの離脱の検知処理においては、例えば取込んだ画像範囲の100%を9ブロック(3×3)に分割する。複数のブロックに分割する理由は、画像の部分的な変化を監視した方が、全体の画像の変化を監視する場合と比較して、高い精度で画像の変化を検知できるからである。   In the detection processing of the entry into the imaging range of the medium surface 1, for example, an area of 50% from the center of the captured image range is divided into 9 blocks (3 × 3). Here, 50% is a ratio to the length of the side (in the area, the area of 25% is divided). On the other hand, in the detection process of leaving from the imaging range, for example, 100% of the captured image range is divided into 9 blocks (3 × 3). The reason for dividing into a plurality of blocks is that monitoring a partial change in the image can detect the change in the image with higher accuracy than monitoring the change in the entire image.

監視手段14bでは、分割したブロック群のうちの1つ以上の特定ブロックを監視ブロックとする。上記特定ブロックは、例えば、n、mを2以上の整数として、(1)n×n、(2)n×m、(3)n×nのブロックの中の周囲(外周縁側の環状ブロック)のみ、(4)m×nのブロックの中の周囲のみ、(5)中心の1ブロック又は複数ブロックのみ、(6)対角線で分けた4ブロックの中のいずれか1つのブロック(又は、いずれか2つ若しくは3つのブロック)である。なお、ブロックの形状は、正方形に限るものではなく、上記(1)〜(5)の分割領域に長方形や円形、多角形などでも良く、それらの形状を、コードが付された媒体面の形状やコードの種類、媒体の進入方向などに応じて設定するようにしても良い。   In the monitoring unit 14b, one or more specific blocks in the divided block group are set as monitoring blocks. The specific block is, for example, the circumference of (1) n × n, (2) n × m, (3) n × n blocks (annular block on the outer peripheral side), where n and m are integers of 2 or more. Only, (4) only around the m × n block, (5) only one or more blocks in the center, (6) any one of the four blocks separated by diagonal lines (or either 2 or 3 blocks). The shape of the block is not limited to a square, and the divided areas (1) to (5) may be a rectangle, a circle, a polygon, or the like, and these shapes are the shapes of a medium surface to which a code is attached. Alternatively, it may be set according to the type of code, the direction of entry of the medium, and the like.

さらに、これらの特定ブロックのパターンを、媒体の進入時、抜けたときの検知で可変にしたり、画像範囲によって可変にしたりする形態としても良い。例えば対象を小さくすれば処理速度が速くなるので、デコードに適している画角中心のみで進入を検知するのであれば、中心部分1ブロックのみの検知で充分である。また、検知した画角内の位置や動きを詳細に検知するのであれば、画角全体に対してブロック分割数を増やして検知することが有効である。このように検知したい部分、検知対象の大きさや画角の大きさにより分割するブロック数や形状を変化させることで、処理速度や精度を向上させることができる。   Furthermore, the pattern of these specific blocks may be made variable upon detection when the medium enters or leaves, or may be made variable depending on the image range. For example, if the target is made smaller, the processing speed becomes faster. Therefore, if the approach is detected only at the center of the angle of view suitable for decoding, it is sufficient to detect only one block at the center. If the position and movement within the detected angle of view are to be detected in detail, it is effective to increase the number of block divisions for the entire angle of view. The processing speed and accuracy can be improved by changing the number of blocks and the shape to be divided according to the part to be detected, the size of the detection target, and the angle of view.

監視手段14bでは、上記特定ブロックを監視ブロックとして画像成分の変化量を監視する。媒体面を検知する際に、画像成分として例えば輝度値の標準偏差又は平均輝度値を用いる。すなわち、明るさの変化やパターンの変化を捉えることで媒体面を検知する。あるいは、標準偏差、平均輝度値の他に、輝度(又は濃度)の最大値、最小値、中央値、平均偏差、最大値と最小値の差分の1/2(大まかな誤差が求められる)、標準偏差/平均輝度、微分量、積分量、X,Yプロファイル、コントラスト、周波数成分、ヒストグラムの歪度、尖度等をパラメータとして、それらのパラメータのうちの少なくとも1つ、又は組み合わせたものを上記画像成分として、その変化量を監視するようにしても良い(ステップS12)。   The monitoring unit 14b monitors the change amount of the image component using the specific block as a monitoring block. When detecting the medium surface, for example, a standard deviation of luminance values or an average luminance value is used as an image component. That is, the medium surface is detected by capturing a change in brightness and a change in pattern. Alternatively, in addition to the standard deviation and the average luminance value, the maximum value, minimum value, median value, average deviation, and 1/2 of the difference between the maximum value and the minimum value (a rough error is obtained), Standard deviation / average luminance, derivative, integral, X, Y profile, contrast, frequency component, histogram skewness, kurtosis, etc. as parameters, at least one of those parameters, or a combination thereof The amount of change may be monitored as an image component (step S12).

進入検知手段14cでは、定期的に取込まれる前後の画像において、対応する監視ブロック間の画像成分の変化量と閾値とを比較して、媒体面の撮像範囲内への進入を検知する。例えば、判定対象のブロック数(指定ブロック数)が1の場合、監視ブロックのブロック群の中で、変化量(前後の画像における標準偏差や平均輝度の変化量)が閾値の範囲外となっているブロックが1つ以上あるか否かを判定し(ステップS13)、1つ以上あると判定した場合に媒体面が進入したと判断し、媒体面検知に係る動作を待機状態にすると共に、コードの読取動作を開始させるためのトリガ指令をトリガ指令出力手段14dにより出力し、コードの読取動作を開始させる。   The approach detection means 14c compares the amount of change in the image component between corresponding monitoring blocks and the threshold value in the images before and after being captured periodically, and detects the entry into the imaging range on the medium surface. For example, when the number of blocks to be determined (the number of designated blocks) is 1, the amount of change (the amount of change in standard deviation or average luminance in the preceding and following images) is outside the threshold range in the block group of the monitoring blocks. It is determined whether or not there is one or more blocks (step S13). If it is determined that there is one or more blocks, it is determined that the medium surface has entered, and the operation related to the medium surface detection is set to the standby state, and the code A trigger command for starting the reading operation is output by the trigger command output means 14d to start the code reading operation.

なお、上記ステップS13における媒体面進入検知(及び媒体面離脱検知)の判定に用いる閾値は固定とするのではなく、画像を取込む際の環境などに応じて可変とするのが好ましい。本実施の形態では、閾値のレベルは、背景と媒体面の色やパターンの差を考慮して5段階に分けている。例えば、媒体面の検知前に取込んだ画像を背景画像として、その背景画像の画像成分と画像成分の変化を検出した時の画像成分との差分量に応じて閾値のレベルを可変する。この閾値のレベルは5段階でなくても、簡単に感度を調整するのであればより段階数を小さく、環境に合わせて精度よく調整するのであればより段階数を増やすようにすれば良い。また、進入検知手段14cでは、進入の検知の他に進入方向を検知するようにしても良い。例えば、標準偏差、平均輝度以外の前述のパラメータの変化を利用し、変化したブロック位置、変化した順番を記憶することで媒体面の進入した方向を検知し、その進入方向検知情報を、監視ブロックの形状などを設定するに使用したり、コード画像の抽出処理で利用したりするようにしても良い。
<コード読取用の画像取込処理>
トリガ指令を受けた制御手段15では、撮像手段11(及び照明手段13)の動作を制御して、一定条件で画像を取込む(ステップS14)。なお、環境に自動的に適用できるように、上記ステップS14において、前記ステップS11で検知した映像信号の利得(調整後の映像信号の利得)及びシャッターのパターンを用いて画像を取込む形態とするのが望ましい。また、<読取待機時の画像取込処理>において説明した「他の処理形態(1)〜(3)」を採用するようにしても良い。
<デコード処理>
コード解読手段12では、ステップS14で取込んだ画像を処理して、媒体面に表記されたコードの画像を抽出すると共にコードを解読し、解読した結果をデコードエリアに格納する。このデコード処理については公知の技術であるため、詳細な説明を省略する。なお、業務用のコード読取装置の場合、読み取ったコードのデータ(本例ではコード解読後のデータ)は、例えばリアルタイムに伝送するモードのときには、通信用ケーブル若しくは無線通信手段を介して上位システム20(POSシステムのコンピュータ等)に送信され、バッチ処理方式のモードのときには、当該データが記憶媒体18に蓄積されて記憶される(ステップS15)。
<離脱検知処理>
監視手段14bは、上記コードの読取動作中(ステップS14、S15コードの処理中)、離脱検知用の監視ブロック(特定ブロック)を対象として、読み取り動作中に取込んだ画像の監視ブロックでの画像成分の変化量の監視処理(前述の<媒体面検知処理>における監視処理と同様)を継続しており、離脱検知手段14eでは、監視中の画像成分の変化量と閾値(離脱判定用の閾値)とを比較して媒体面の撮像範囲内からの離脱を検知し、その検知結果(離脱の有無=媒体面の有無を示す情報)を媒体面検知エリアに記憶する。本実施の形態では、上記閾値は判定用の範囲(下限値0〜上限値L)を示す閾値であり、離脱検知手段14eでは、画像成分の変化量が一定時間継続して上記範囲内の変化量となっていれば、すなわち、一定時間以上前後の画像に変化がなければ、移動がなく媒体面が抜けたものと判断し、次のコードに対する読取待機状態に遷移させる(ステップS16)。以降、ステップS11〜ステップS16の動作を繰り返すことにより自動的に媒体面の検知及びコード解読が可能となる。
Note that the threshold value used for the determination of the medium surface approach detection (and medium surface departure detection) in step S13 is not fixed, but is preferably variable according to the environment when the image is captured. In the present embodiment, the threshold level is divided into five levels in consideration of the difference in color and pattern between the background and the medium surface. For example, an image captured before detecting the medium surface is used as a background image, and the threshold level is varied according to the difference between the image component of the background image and the image component when a change in the image component is detected. Even if the threshold level is not five steps, the number of steps may be reduced if the sensitivity is easily adjusted, and the number of steps may be increased if the sensitivity is adjusted accurately according to the environment. Further, the approach detection means 14c may detect the approach direction in addition to the entry detection. For example, using the change of the above-mentioned parameters other than the standard deviation and the average brightness, the changed block position and the changed order are stored to detect the direction in which the medium surface has entered, and the approach direction detection information is monitored block It may be used to set the shape of the image, or may be used in the code image extraction process.
<Image reading process for code reading>
In response to the trigger command, the control means 15 controls the operation of the imaging means 11 (and the illumination means 13) to capture an image under a certain condition (step S14). Note that, in order to be automatically applicable to the environment, in step S14, an image is captured using the gain of the video signal (adjusted video signal gain) detected in step S11 and the shutter pattern. Is desirable. Further, “other processing modes (1) to (3)” described in <Image capture processing during reading standby> may be employed.
<Decoding process>
The code decoding means 12 processes the image captured in step S14, extracts the image of the code written on the medium surface, decodes the code, and stores the decoded result in the decoding area. Since this decoding process is a known technique, a detailed description thereof will be omitted. In the case of a business code reader, the read code data (data after decoding the code in this example) is, for example, in the real-time transmission mode, via a communication cable or wireless communication means, the host system 20 In the batch processing mode, the data is accumulated and stored in the storage medium 18 (step S15).
<Leave detection processing>
The monitoring unit 14b targets the monitoring block for detecting separation (specific block) during the code reading operation (steps S14 and S15), and the image captured by the monitoring block during the reading operation. The component change amount monitoring process (similar to the above-described monitoring process in the <medium surface detection process>) is continued, and the separation detection unit 14e detects the amount of change in the image component being monitored and the threshold value (the threshold value for separation determination). ) Is detected from the imaging range of the medium surface, and the detection result (information indicating presence / absence = information indicating presence / absence of the medium surface) is stored in the medium surface detection area. In the present embodiment, the threshold value is a threshold value indicating a determination range (lower limit value 0 to upper limit value L), and in the separation detection unit 14e, the change amount of the image component continues for a certain period of time and changes within the above range. If it is the amount, that is, if there is no change in the image before and after a certain time, it is determined that there is no movement and the medium surface has been removed, and the state is shifted to a reading standby state for the next code (step S16). Thereafter, it is possible to automatically detect the medium surface and decode the code by repeating the operations in steps S11 to S16.

なお、本発明に係るコード読取装置では、同一コードの二度読み防止のために、図8のフローチャートのステップS17〜S27に示すように、デコード結果及び媒体面の検知結果に応じて読取動作時間(タイムアウト時間)を設定し、コード読取処理と媒体面離脱検知処理を行うようにしている。   In the code reading apparatus according to the present invention, in order to prevent the same code from being read twice, as shown in steps S17 to S27 in the flowchart of FIG. 8, the reading operation time depends on the decoding result and the detection result of the medium surface. (Timeout time) is set, and the code reading process and the medium surface separation detection process are performed.

以下、二度読み防止に係る処理(二度読み禁止制御)について、ステップS17〜S27に示す処理の流れに沿って説明する。   Hereinafter, the process relating to the twice reading prevention (double reading prohibition control) will be described along the flow of the processes shown in steps S17 to S27.

離脱検知手段14eでは、媒体面の離脱判別時間として用いる読取動作時間(以下「タイムアウト時間」と呼ぶ)の初期値を設定すると共に(ステップS17)、コード解読手段12のデコード結果をデコードエリアから読み出し、読取成功、二度読み状態、及び読取不成功(コードが読めない)のいずれであるかをデコード結果により判定する(ステップS18)。そして、読取成功(本例ではデコード成功)と判定したのであれば、二度読み禁止時間を設定する(ステップS19)。一方、上記ステップS18において二度読み状態と判定したのであれば、二度読み禁止時間を延長すると共に(ステップS20)、ステップS16の媒体面検知処理における画像変化の判定結果をチェックし(ステップS21)、「変化有り」と判定していたのであれば、タイムアウト時間を延長する(ステップS22)。他方、上記ステップS18において読取不成功と判定したのであれば、二度読み時間(本例では1.5秒)を経過したか否かを判定し(ステップS23)、経過してれば、デコードしたコードが同一コードか(二度読み状態か)を照合するバッファを初期化する(ステップS24)。続いて、ステップS16の媒体面検知処理における画像変化の判定結果をチェックし(ステップS25)、「変化有り」と判定していたのであれば、タイムアウト時間を延長する(ステップS26)。   The separation detection unit 14e sets an initial value of a reading operation time (hereinafter referred to as “timeout time”) used as a medium surface separation determination time (step S17), and reads the decoding result of the code decoding unit 12 from the decoding area. Whether the reading is successful, the twice reading state, or the reading failure (the code cannot be read) is determined based on the decoding result (step S18). If it is determined that the reading is successful (decoding is successful in this example), a reading prohibition time is set twice (step S19). On the other hand, if it is determined in step S18 that the reading state is twice, the twice reading prohibition time is extended (step S20), and the image change determination result in the medium surface detection process in step S16 is checked (step S21). ), If it is determined that there is a change, the timeout time is extended (step S22). On the other hand, if it is determined in step S18 that reading is unsuccessful, it is determined whether or not the reading time (1.5 seconds in this example) has elapsed (step S23). A buffer for collating whether the codes are the same code (reading state twice) is initialized (step S24). Subsequently, the image change determination result in the medium surface detection process in step S16 is checked (step S25). If it is determined that there is a change, the timeout time is extended (step S26).

以上のステップS17〜ステップS26のように、離脱検知手段14eでは、コードの読取状態(デコード結果)及び画像の変化状態(前後画像の変化の有無)に応じてタイムアウト時間を調整する。続いて、コードの読取動作の開始時点からの時間とタイムアウト時間とを比較し、タイムアウト時間を経過したか否かを判定する(ステップS27)。そして、タイムアウト時間を経過していないのであればステップS14に戻り、コードの読取動作を繰り返し、タイムアウト時間を経過したのであれば、次のコードに対する読取待機状態とし、コードの読取動作を終了する。   As in steps S17 to S26 described above, the separation detection unit 14e adjusts the time-out time according to the code reading state (decoding result) and the image change state (presence / absence of changes in the preceding and following images). Subsequently, the time from the start time of the code reading operation is compared with the timeout time to determine whether or not the timeout time has elapsed (step S27). If the time-out time has not elapsed, the process returns to step S14, and the code reading operation is repeated. If the time-out time has elapsed, the next code is placed in a reading standby state, and the code reading operation is terminated.

図9は、上述した離脱検知処理に用いる動作時間(媒体面離脱判別時間)設定テーブル()の一例を示す図であり、図9中の「A」は読取タイムアウト時間延長なしを示すフラグ、「B」は二度読み禁止時間延長なしを示すフラグ、「C」は同一コードかを照合するバッファの初期化を示すフラグ、「X」は読取タイムアウト時間の延長を示すフラグ、「Y」は二度読み禁止時間の延長を示すフラグを示している。X,Yの時間は段階的に変えることができる。   FIG. 9 is a diagram illustrating an example of the operation time (medium surface separation determination time) setting table () used for the above-described separation detection processing, where “A” in FIG. 9 is a flag indicating that the reading timeout time is not extended, “ “B” is a flag indicating that the reading prohibition time is not extended twice, “C” is a flag indicating initialization of a buffer for checking whether the code is the same, “X” is a flag indicating an extension of the reading timeout time, and “Y” is two A flag indicating the extension of the reading prohibition time is shown. The X and Y times can be changed in stages.

コード解読手段12は、上記のような制御テーブルを用いて、コードの読取状態及び画像の変化状態に応じて読取動作時間を調整し、前述のステップS14〜S27に示したコードの読取処理を実行するようにしている。   Using the control table as described above, the code decoding unit 12 adjusts the reading operation time according to the code reading state and the image change state, and executes the code reading process shown in steps S14 to S27 described above. Like to do.

なお、媒体面の離脱を検知する他の方法としては、図10のフローチャートに示すように、図8に示したフローチャートのステップS15(デコード処理)の後に、画像取込みを行うステップS15Aを設け、コード読取待機時と同じ撮像条件で画像を取込んで、媒体面の離脱を検知しても良い。または、同様に、コード読取待機時と同じ撮像条件で画像を取込んで、媒体面の進入検知時に、最初に撮影しておいた画像(ステップS14で取込んだ画像)とデコード処理後に取込んだ画像(ステップS15Aで取込んだ画像)とを比較し、似た画像が得られるかあるいは一定時間以上画像に変化が無ければ、撮像範囲内から離脱したものと判断する方法があり、この方法を採用するようにしても良い。   As another method for detecting the separation of the medium surface, as shown in the flowchart of FIG. 10, step S15A for capturing an image is provided after step S15 (decoding process) of the flowchart shown in FIG. It is also possible to detect the detachment of the medium surface by capturing an image under the same imaging conditions as in the reading standby. Or, similarly, an image is captured under the same imaging conditions as when waiting for code reading, and the first captured image (the image captured in step S14) and the captured image are captured when the medium surface is detected to enter. There is a method of comparing with an image (the image captured in step S15A) and determining that the image is out of the imaging range if a similar image is obtained or if the image has not changed for a certain period of time. May be adopted.

次に、撮像手段の視野(撮像範囲)の中央部に媒体面が存在していること(若しくは静止していること)を検知し、その時点で、媒体面に表記されたコードのデコード処理を開始させる実施形態について説明する。なお、全体の動作は上述した実施の形態と同様のため、説明を省略もしくは簡略化して説明する。   Next, it is detected that the medium surface exists (or is stationary) at the center of the field of view (imaging range) of the image pickup means, and at that time, the code displayed on the medium surface is decoded. An embodiment to be started will be described. Since the overall operation is the same as that of the above-described embodiment, the description will be omitted or simplified.

上述した実施の形態においては、監視手段14bの「変化あり」の条件は、画像変化を検出した監視ブロックの数が指定ブロック数以上であるか否かだけであるが、本実施の形態では、監視手段14bの監視機能として、「変化あり」の監視の他に、画像変化した監視ブロックの各ブロックの位置を監視する機能を備える。また、進入検知手段14cの検知機能として、監視手段14bからの位置情報(「変化あり」のブロックの位置情報)に基づいて、媒体面が撮像手段11の撮像範囲内の中央部に存在していることを検知する機能を備える。なお、好ましい実施の形態では、媒体面が、(a)撮像範囲内の中央部に存在していること、(b)撮像範囲内の中央部に静止していること(略中央部に静止状態)のいずれも検知できる機能を備えている。その場合、トリガ指令は状況に応じて、上記(a)又は(b)のどちらかを選択可能としている。例えば、高速シャッターやストロボ照明使用時は、(a)の検知形態とすることができる。そして、トリガ指令出力手段14dでは、媒体面が撮像範囲内の中央部に存在していること、あるいは静止していることが検知された時点で、コードの読取動作を開始させるためのトリガ指令を出力する形態とする。なお、上記の各手段による一連の処理は、媒体面検知手段14の処理であり、ソフトウェアの構成等を限定するものではない。以下に、具体例を示して本実施の形態を説明する。以下の具体例では、(b)の検知形態とした場合を例として説明する。   In the above-described embodiment, the condition of “with change” of the monitoring unit 14b is only whether or not the number of monitoring blocks in which an image change has been detected is equal to or greater than the specified number of blocks. As a monitoring function of the monitoring unit 14b, a function of monitoring the position of each block of the monitoring block whose image has changed is provided in addition to the “changed” monitoring. Further, as a detection function of the entry detection unit 14c, the medium surface exists in the center of the imaging range of the imaging unit 11 based on the positional information from the monitoring unit 14b (position information of the “changed” block). The function to detect that there is. In a preferred embodiment, the medium surface is present at (a) the central portion within the imaging range, and (b) is stationary at the central portion within the imaging range (stationary at substantially the central portion). ) Has a function that can be detected. In that case, either (a) or (b) can be selected as the trigger command depending on the situation. For example, when using a high-speed shutter or strobe lighting, the detection mode (a) can be used. Then, the trigger command output means 14d issues a trigger command for starting the code reading operation when it is detected that the medium surface exists in the center of the imaging range or is stationary. It is set as the form which outputs. Note that the series of processing by each of the above means is the processing of the medium surface detecting means 14, and does not limit the software configuration or the like. Hereinafter, the present embodiment will be described with specific examples. In the following specific example, the case of the detection mode (b) will be described as an example.

図11及び図12(A)〜(F)は、本実施形態における媒体面検知手段の処理形態を説明するための模式図である。ここでは、図11に示すように、撮像範囲4(取込んだ画像範囲)の中心から50%の領域内を9ブロック(3×3)に分割し、分割した9ブロックの全てを監視ブロック3とした場合を例として説明する。   FIG. 11 and FIGS. 12A to 12F are schematic views for explaining the processing mode of the medium surface detection means in the present embodiment. Here, as shown in FIG. 11, the area of 50% from the center of the imaging range 4 (captured image range) is divided into 9 blocks (3 × 3), and all of the divided 9 blocks are monitored block 3. The case will be described as an example.

媒体面検知手段14では、画像変化した監視ブロックの位置を監視し、媒体面1が撮像範囲4内の中央部に静止していることを検知した時点でコードの読取動作を開始させる。例えば、図12(A)の状態は、「変化あり」の監視ブロックが1ブロックも無いので、「媒体無し」と判定し、例えば図12(A)→ (B)→ (C)というように、前後の画像において対応する監視ブロック間の画像成分を比較して、各ブロックの位置における「変化の有無」の状態が遷移している場合は、「媒体面接近中」と判定する。なお、図12中の「0」は「変化なし」、「1」は「変化あり」を示している。媒体面検知手段14では、例えば監視ブロックの位置情報に対応させて変化の有無を記憶するテーブルを用いて、「変化あり」を検知したブロックの位置に「1」を書込み、画像変化した監視ブロックの位置を監視することによって媒体面の動きを認識する。   The medium surface detection means 14 monitors the position of the monitoring block whose image has changed, and starts the code reading operation when it is detected that the medium surface 1 is stationary at the center of the imaging range 4. For example, in the state of FIG. 12A, since there is no monitoring block with “changed”, it is determined that there is no medium, and for example, FIG. 12A → B → C. The image components between corresponding monitoring blocks in the preceding and following images are compared, and if the “change presence / absence” state at the position of each block transitions, it is determined that “medium surface approaching”. In FIG. 12, “0” indicates “no change” and “1” indicates “change”. The medium surface detection means 14 writes “1” to the position of the block where “changed” is detected, for example, using a table that stores the presence or absence of the change in correspondence with the position information of the monitoring block, and the monitoring block whose image has changed The movement of the medium surface is recognized by monitoring the position of the medium.

そして、前後の画像において対応する監視ブロック間の画像成分を比較して、各ブロックの位置における「変化の有無」の状態が遷移せずに固定している場合、例えば、図12(C)、(D)に示すように、監視ブロック群のうち、同一のブロック位置の「変化あり」の状態が変化していなければ、「媒体が撮像範囲内の中央部付近で静止している」と判定する。また、図12(E)、(F)に示すように、例えば、前後の画像において監視ブロックの全てのブロックが「変化あり」であれば、「媒体が撮像範囲内の中央部で静止している」と判定する。その際、監視ブロックが図6(B)の形態(中心のブロックのみを監視ブロックとする形態)を採用している場合は、中心位置のブロックの状態が「変化あり」のまま遷移していないときは、「媒体が撮像範囲内の中央部付近で静止している」と認識することになる。このように、媒体面検知手段14では、当該位置における監視ブロックの変化の状態を監視することによって媒体面の動きを推定し、媒体面が静止状態か移動状態かを判定する。そして、中央部付近又は中央部で静止していると判定した場合に、デコード処理を実行させる。なお、媒体面1の大きさ、コード2の大きさと媒体面上での表記位置、ブロック分割数等の可変要素により、静止状態を監視するブロック数(図12中の「1」のブロック数)は異なる。但し、このブロック数は、少なくとも読取対象のコード2が撮像範囲4の内部にあること(撮像手段11の視野内に捉えられること)を条件として、可変要素に応じて変更可能に設定される。   Then, when comparing the image components between corresponding monitoring blocks in the preceding and following images and the state of “presence or absence of change” at the position of each block is fixed without transition, for example, FIG. As shown in (D), if the “changed” state of the same block position in the monitoring block group has not changed, it is determined that “the medium is stationary near the center in the imaging range”. To do. Also, as shown in FIGS. 12E and 12F, for example, if all of the monitoring blocks are “changed” in the preceding and following images, “the medium is stationary at the center in the imaging range. Is determined. At that time, if the monitoring block adopts the form of FIG. 6B (the form in which only the central block is the monitoring block), the state of the block at the central position remains “changed” and has not changed. At this time, it is recognized that “the medium is stationary near the center in the imaging range”. As described above, the medium surface detection unit 14 estimates the movement of the medium surface by monitoring the change state of the monitoring block at the position, and determines whether the medium surface is stationary or moving. When it is determined that the camera is stationary near or near the center, the decoding process is executed. It should be noted that the number of blocks for monitoring the stationary state by the variable factors such as the size of the medium surface 1, the size of the code 2, the notation position on the medium surface, the number of block divisions, etc. Is different. However, the number of blocks is set to be changeable according to a variable element on condition that at least the code 2 to be read is within the imaging range 4 (captured within the field of view of the imaging means 11).

以上のように、画像変化したブロック位置を監視することにより、媒体位置の動きがわかるので、媒体面が画像の中央に来たこと、及び、静止していることを検出することができる。その結果、視野の中央部で媒体面を捉えてデコード処理するので、視野外にコードがはみ出した不完全な画像をデコードすることが減り、また、視野中央部付近の画像品質(画像歪、分解能)の優れたコードを読むので、読取精度が向上する。   As described above, by monitoring the block position where the image has changed, the movement of the medium position can be known, so that it is possible to detect that the medium surface has come to the center of the image and is stationary. As a result, the media plane is captured at the center of the field of view and decoding is performed, so that incomplete images with codes outside the field of view are reduced, and image quality (image distortion, resolution near the center of the field of view) is reduced. ), The reading accuracy is improved.

また、カードの媒体面や携帯電話機の表示面などに表記されているコードを読み取る定置式のコード読取装置(例えば、机上にコード読取装置が下向きに配置されたコード読取装置)に適用した場合には、従来のコード読取装置の場合は次のような問題が生じるが、本発明を適用したコード読取装置の場合は問題が生じない。   In addition, when applied to a stationary code reading device (for example, a code reading device in which a code reading device is arranged downward on a desk) that reads a code written on a medium surface of a card or a display surface of a mobile phone. However, in the case of the conventional code reader, the following problems occur, but in the case of the code reader to which the present invention is applied, no problem occurs.

従来の定置式のコード読取装置では、例えば、読取面(装置の真下)にコードの表記された媒体面(価格等が符号化されたコードが表記されたラベル等)を人が差し入れて、コードが装置の視野の中央辺りで静止させ、読み取りできるまで待つことになる。この過程において、単純に、撮像−デコード−撮像−デコード・・・と処理すると、読取装置のデコード時間が長いため、紙面を差し入れしつつある画像(視野にコードが一部しか入っていない画像)を基に紙面を検知してデコード処理してしまうと、デコードが失敗するのみならず、デコード処理時間がロスされることになる。最終的に、媒体面に表記されているコード部分が視野中心付近の画像は得られるが、時間的なロスが、操作者のイライラや効率低下の原因になる。   In a conventional stationary type code reader, for example, a person inserts a medium surface (a label on which a code encoded with a price etc.) is written on a reading surface (below the device) Will rest around the center of the field of view of the device and wait until it can be read. In this process, if you simply process “Imaging-Decoding-Imaging-Decoding ...”, the decoding time of the reader is long, so the image that is being inserted into the page (an image with a partial code in the field of view) If the paper surface is detected based on this and the decoding process is performed, the decoding will not only fail, but the decoding process time will be lost. Eventually, an image in which the code portion written on the medium surface is near the center of the visual field can be obtained, but the time loss causes the operator to become frustrated and to reduce efficiency.

本発明を適用したコード読取装置の場合、媒体面が中央視野に来るタイミングを検知することが可能であり、接近途中の画像(コードの一部が撮像範囲外にある画像)をデコードしてしまう無駄をなくすことが可能になるなど、優れた効果を奏する。   In the case of the code reading apparatus to which the present invention is applied, it is possible to detect the timing when the medium surface comes to the central visual field, and an image in the middle of approaching (an image in which part of the code is outside the imaging range) is decoded. It has excellent effects such as eliminating waste.

なお、上述した実施の形態では、スーパーマーケットやデパートのレジなどで使用されるハンディタイプの業務用コード読取装置に適用した場合を例として主に説明したが、本発明は、上記のように、読取面が筐体上面部に設けられており、カードの媒体面や携帯電話機の表示面などに表記されているコードを読み取る定置式のコード読取装置にも適用可能であり、さらに、業務用に限らず、コード読取機能を有する携帯電話機やPDA(Personal Digital Assistants)などの個人用の各種情報処理装置にも適用することができる。   In the above-described embodiment, the case where the present invention is mainly applied to a handy type business code reader used at a supermarket or a department store cash register has been mainly described as an example. However, the present invention can be read as described above. The surface is provided on the upper surface of the housing, and can be applied to a stationary code reading device that reads codes written on the medium surface of a card or the display surface of a mobile phone, and for business use only. In addition, the present invention can also be applied to various personal information processing apparatuses such as a mobile phone having a code reading function and PDA (Personal Digital Assistants).

本発明に係る媒体面検知機能を有するコード読取装置の一例を示す外観図である。It is an external view which shows an example of the code reader which has a medium surface detection function based on this invention.

本発明に係るコード読取装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the code reader which concerns on this invention.

本発明に係る媒体面検知手段の構成の一例を示す機能ブロック図である。It is a functional block diagram which shows an example of a structure of the medium surface detection means which concerns on this invention.

本発明の概要を説明するためのフローチャートである。It is a flowchart for demonstrating the outline | summary of this invention.

図4のフローチャートの分図である。FIG. 5 is a partial view of the flowchart of FIG. 4.

本発明に係る媒体面検知処理に用いる監視ブロックの例を示す模式図である。It is a schematic diagram which shows the example of the monitoring block used for the medium surface detection process based on this invention.

本発明に係る媒体面検知処理の概要を説明するための模式図である。It is a schematic diagram for demonstrating the outline | summary of the medium surface detection process based on this invention.

本発明を適用したコード読取装置の動作例と媒体面検知処理の詳細を説明するためのフローチャートである。It is a flowchart for demonstrating the operation example of the code reader to which this invention is applied, and the detail of a medium surface detection process.

媒体面の離脱検知処理に用いる動作時間設定テーブルの一例を示す図である。It is a figure which shows an example of the operation time setting table used for the separation detection process of a medium surface.

本発明に係る媒体面検知処理の他の例を説明するためのフローチャートである。It is a flowchart for demonstrating the other example of the medium surface detection process based on this invention.

本発明に係る媒体面検知手段の他の処理形態を説明するための第1の図である。It is a 1st figure for demonstrating the other processing form of the medium surface detection means based on this invention.

本発明に係る媒体面検知手段の他の処理形態を説明するための第2の図である。It is a 2nd figure for demonstrating the other processing form of the medium surface detection means based on this invention.

符号の説明Explanation of symbols

1 媒体
2 読取対象(コード)
3 監視ブロック
4 撮像範囲
10 コード読取装置
10a 読取面
10b 読取スイッチ
10c 支持台
11 撮像手段
12 コード解読手段
13 照明手段
14 媒体面検知手段
14a 画像取込手段
14b 監視手段
14c 進入検知手段
14d トリガ指令出力手段
14e 離脱検知手段
15 制御手段
15a CPU
15b メモリ
20 上位システム
1 Medium 2 Reading target (code)
3 Monitoring block 4 Imaging range 10 Code reader 10a Reading surface 10b Reading switch 10c Support base 11 Imaging means 12 Code decoding means 13 Illuminating means 14 Medium surface detecting means 14a Image capturing means 14b Monitoring means 14c Intrusion detecting means 14d Trigger command output Means 14e Detachment detection means 15 Control means 15a CPU
15b Memory 20 Host system

Claims (11)

画像を撮像する撮像手段と、前記撮像手段により撮像された画像を処理して媒体面に表記されたコードを読取るコード読取手段とを備えたコード読取装置に適用される媒体面検知プログラムであって、
前記コード読取装置を、
前記コードの読取待機時に前記撮像手段を作動して撮像範囲内の画像を定期的に取込む画像取込手段と、
前記画像取込手段により取込まれた画像の中央部の画像領域内を所定数のブロックに分割し、分割したブロックのうちの1つ以上の特定ブロックのみを監視ブロックとして、前記定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分を比較して前記監視ブロックでの画像成分の変化量を監視すると共に、画像変化した監視ブロックの各ブロックの位置を監視する監視手段と、
前記コードの読取待機時に前記画像成分の変化量の検出情報及び前記監視手段からの位置情報に基づいて前記媒体面が前記撮像手段の撮像範囲内の中央部に存在していることを検知する進入検知手段と、
前記媒体面が前記中央部に存在していることが検知された時点で、前記コードの読取動作を開始させるためのトリガ指令を出力するトリガ指令出力手段
として機能させることを特徴とする媒体面検知プログラム。
A medium surface detection program applied to a code reading device including an image pickup means for picking up an image and a code reading means for processing an image picked up by the image pickup means and reading a code written on the medium surface. ,
The code reader;
An image capturing means for operating the imaging means during standby to read the code and periodically capturing an image within the imaging range;
The image area in the center of the image captured by the image capturing means is divided into a predetermined number of blocks, and only one or more specific blocks among the divided blocks are captured as the monitoring blocks periodically. Monitoring means for comparing the image components between the corresponding monitoring blocks in the images before and after being inserted to monitor the amount of change in the image components in the monitoring block, and for monitoring the position of each block of the monitoring block in which the image has changed ,
An approach for detecting that the medium surface is present in the center of the imaging range of the imaging unit based on detection information of the change amount of the image component and position information from the monitoring unit during the code reading standby Detection means;
When detecting that the medium surface is present in the central portion, the medium surface detection is made to function as a trigger command output means for outputting a trigger command for starting the code reading operation. program.
前記進入検知手段は、前記監視ブロック間の画像成分を同一ブロック位置に対応するブロック毎に比較して、少なくとも1ブロックの画像成分の変化の状態が変化無しから変化有りの状態に遷移し且つ前記同一ブロック位置に対応する各ブロックの画像成分の変化の状態が全ブロックで同一と判定した場合は、前記媒体面が前記撮像手段の撮像範囲内の中央部に静止して存在していると検知し、前記トリガ指令出力手段は、前記媒体面が前記中央部に静止して存在していることが検知された時点で、前記コードの読取動作を開始させるためのトリガ指令を出力することを特徴とする請求項1に記載の媒体面検知プログラム。 The entry detection means compares the image components between the monitoring blocks for each block corresponding to the same block position, and the change state of the image component of at least one block transitions from no change to a change state, and When it is determined that the state of change in the image component of each block corresponding to the same block position is the same in all blocks, it is detected that the medium surface is present at the center in the imaging range of the imaging means. The trigger command output means outputs a trigger command for starting the code reading operation when it is detected that the medium surface is stationary at the central portion. The medium surface detection program according to claim 1. 記コードの読取動作の開始時点からの経過時間が前記媒体面の離脱判別時間として設定されたタイムアウト時間を経過したのであれば、前記媒体面前記撮像範囲内から離していると検知すると共に、次のコードに対する読取待機状態に遷移させる離脱検知手段として、前記コード読取装置を更に機能させることを特徴とする請求項1又は2に記載の媒体面検知プログラム。 If the elapsed time from the start of the reading operation of the previous SL code has passed the set timeout period as the leaving determination time of the medium surface, when the medium surface is removed either within et away the imaging range 3. The medium surface detection program according to claim 1, wherein the code reader further functions as a departure detection unit that detects and shifts to a reading standby state for the next code. 4. 前記画像成分の変化量は、前記監視ブロック間の輝度値の標準偏差又は平均輝度値の変化量であることを特徴とする請求項1乃至3のいずれかに記載の媒体面検知プログラム。 The medium surface detection program according to any one of claims 1 to 3, wherein the change amount of the image component is a change amount of a standard deviation or an average luminance value of the luminance values between the monitoring blocks. 前記画像取込手段は、前記画像を取込む際に映像信号の利得とシャッタースピードの設定を複数のパターンに変化させて各パターンの画像を取込み、前記監視手段は、前記監視ブロック間の画像成分を比較する際に前記各パターンでの画像成分の変化量を監視することを特徴とする請求項1乃至4のいずれかに記載の媒体面検知プログラム。 The image capturing means captures the image of each pattern by changing the gain and shutter speed setting of the video signal into a plurality of patterns when capturing the image, and the monitoring means captures image components between the monitoring blocks. 5. The medium surface detection program according to claim 1, wherein a change amount of an image component in each of the patterns is monitored when comparing the two. 前記監視手段は、前記監視ブロックを設定する際に、前記分割の対象とする画像範囲、前記ブロックの形状、大きさ、及び分割数のうちの少なくとも1つの要素を可変することを特徴とする請求項1乃至5のいずれかに記載の媒体面検知プログラム。 The monitoring unit, when setting the monitoring block, varies at least one of an image range to be divided, a shape and size of the block, and a number of divisions. Item 6. The medium surface detection program according to any one of Items 1 to 5. 前記監視手段は、前記コード読取装置の動作モードに応じて前記要素を可変することを特徴とする請求項6に記載の媒体面検知プログラム。 7. The medium surface detection program according to claim 6, wherein the monitoring unit varies the element according to an operation mode of the code reader. 前記進入検知手段は、前記画像成分の変化量が閾値の範囲外となっているブロックの数を媒体面検知の判定要素として前記媒体面の進入を検知することを特徴とする請求項1乃至7のいずれかに記載の媒体面検知プログラム。 The said approach detection means detects the approach of the said medium surface by using the number of the blocks from which the variation | change_quantity of the said image component is outside the range of a threshold value as a determination element of a medium surface detection. The medium surface detection program according to any one of the above. 前記コード読取手段が前記コードの解読機能を有する場合、前記離脱検知手段は、前記コードの解読状況に応じて前記タイムアウト時間を設定することを特徴とする請求項3に記載の媒体面検知プログラム。 4. The medium surface detection program according to claim 3, wherein when the code reading unit has a function of decoding the code, the separation detection unit sets the time- out period according to a decoding state of the code. 前記検知の対象となる媒体面が、印刷媒体、画像表示媒体、及び前記コードがダイレクトマーキングされた媒体の面を含むことを特徴とする請求項1乃至9のいずれかに記載の媒体面検知プログラム。 10. The medium surface detection program according to claim 1, wherein the medium surface to be detected includes a surface of a print medium, an image display medium, and a medium on which the code is directly marked. . 画像を撮像する撮像手段と、前記撮像手段により撮像された画像を処理して媒体面に表記されたコードを読取るコード読取手段とを備えたコード読取装置における媒体面検知方法であって、
前記コードの読取待機時に前記撮像手段を作動して撮像範囲内の画像を定期的に取込むステップと、
前記画像取込手段により取込まれた画像の中央部の画像領域内を所定数のブロックに分割し、分割したブロックのうちの1つ以上の特定ブロックのみを監視ブロックとして、前記定期的に取込まれる前後の画像において対応する監視ブロック間の画像成分を比較して前記監視ブロックでの画像成分の変化量を監視すると共に、画像変化した監視ブロックの各ブロックの位置を監視するステップと、
前記コードの読取待機時に前記画像成分の変化量の検出情報及び前記監視手段からの位置情報に基づいて前記媒体面が前記撮像手段の撮像範囲内の中央部に存在していることを検知すると同時に前記コードの読取動作を開始させるステップと、
前記画像成分の変化量及び前記コードの読取動作の開始時点からの経過時間の情報に基づいて前記媒体面の前記撮像範囲内からの離脱を検知すると共に、次のコードに対する読取待機状態に遷移させるステップと、
を有することを特徴とする媒体面検知方法。
A medium surface detection method in a code reading apparatus comprising: an image pickup unit that picks up an image; and a code reading unit that processes an image picked up by the image pickup unit and reads a code written on the medium surface,
Activating the imaging means at the time of waiting for reading the code to periodically capture an image within the imaging range;
The image area in the center of the image captured by the image capturing means is divided into a predetermined number of blocks, and only one or more specific blocks among the divided blocks are captured as the monitoring blocks periodically. Comparing the image components between corresponding monitoring blocks in the images before and after being loaded, monitoring the amount of change in the image components in the monitoring block, and monitoring the position of each block of the monitoring block where the image has changed ,
At the same time as detecting that the medium surface is present in the center of the imaging range of the imaging unit based on the detection information of the change amount of the image component and the positional information from the monitoring unit during the code reading standby. Starting the reading operation of the code;
Based on the change amount of the image component and the information on the elapsed time from the start time of the code reading operation, the separation of the medium surface from the imaging range is detected, and a transition to the reading standby state for the next code is made. Steps,
A medium surface detection method comprising:
JP2006126135A 2006-04-28 2006-04-28 Medium surface detection program and medium surface detection method applied to code reader Active JP5007388B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006126135A JP5007388B2 (en) 2006-04-28 2006-04-28 Medium surface detection program and medium surface detection method applied to code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006126135A JP5007388B2 (en) 2006-04-28 2006-04-28 Medium surface detection program and medium surface detection method applied to code reader

Publications (2)

Publication Number Publication Date
JP2007299168A JP2007299168A (en) 2007-11-15
JP5007388B2 true JP5007388B2 (en) 2012-08-22

Family

ID=38768616

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006126135A Active JP5007388B2 (en) 2006-04-28 2006-04-28 Medium surface detection program and medium surface detection method applied to code reader

Country Status (1)

Country Link
JP (1) JP5007388B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5075866B2 (en) * 2009-03-26 2012-11-21 東芝テック株式会社 Code symbol reader
JP5250002B2 (en) * 2010-09-01 2013-07-31 東芝テック株式会社 Reading apparatus and program
JP5790068B2 (en) * 2010-11-30 2015-10-07 株式会社デンソーウェーブ Information code reading system and information code reading device
EP2458527A3 (en) 2010-11-30 2014-03-26 Denso Wave Incorporated System for reading information code and medium on which information code is formed
JP7215879B2 (en) * 2018-11-01 2023-01-31 ヤマト運輸株式会社 Information processing system and information processing method
CN117572818B (en) * 2024-01-09 2024-03-29 西安中科慧远视觉技术有限公司 Precise detection equipment for plate size and control method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0695008B2 (en) * 1987-12-11 1994-11-24 株式会社東芝 Monitoring device
JP3302057B2 (en) * 1991-11-11 2002-07-15 オリンパス光学工業株式会社 Symbol information reader
JPH0660214A (en) * 1992-08-06 1994-03-04 Nippon Dry Chem Co Ltd Data code reader for high speed mobile object
JPH0954883A (en) * 1995-08-11 1997-02-25 Toshiba Corp Method for detecting approach of known object and device therefor
JPH11205773A (en) * 1998-01-20 1999-07-30 Fujitsu General Ltd Monitoring video recording system
JP2002042052A (en) * 2000-07-28 2002-02-08 Olympus Optical Co Ltd Symbol information reading device
JP2004282162A (en) * 2003-03-12 2004-10-07 Minolta Co Ltd Camera, and monitoring system
JP4059173B2 (en) * 2003-06-27 2008-03-12 株式会社デンソーウェーブ Optical information reading apparatus and optical information reading method
JP3877171B2 (en) * 2004-06-18 2007-02-07 船井電機株式会社 Security device control system and control method thereof

Also Published As

Publication number Publication date
JP2007299168A (en) 2007-11-15

Similar Documents

Publication Publication Date Title
US8573497B2 (en) Adaptive data reader and method of operating
CN108073845B (en) Reader of optical marks
EP2638505B1 (en) Adaptive data reader and method of operating
EP2422294B1 (en) A multiple barcode detection system and method
US7478753B2 (en) System and method for aiming an optical code scanning device
JP5007388B2 (en) Medium surface detection program and medium surface detection method applied to code reader
US9147095B2 (en) Optical code scanner optimized for reading 2D optical codes
EP1805689A2 (en) Methods and apparatus for dynamic signal processing
US8899484B2 (en) Imaging reader and method with enhanced aiming pattern detection
EP4181012A1 (en) Method for reading indicia off a display of a mobile device
US20130248602A1 (en) Apparatus for and method of controlling imaging exposure of targets to be read
US11853842B2 (en) Interleaved frame types optimized for vision capture and barcode capture
EP2588993B1 (en) Adaptive data reader system and method of operating
US9710686B2 (en) Data collection system and method that detect electronic device displays via fresnel patterns
US11960959B1 (en) Location based vision camera application settings for handheld scanners
US9367721B2 (en) Imaging optical code scanner with camera regions
JP2002042052A (en) Symbol information reading device
US8511559B2 (en) Apparatus for and method of reading targets by image captured by processing captured target images in a batch or free-running mode of operation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090402

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120124

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

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

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120327

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120426

R150 Certificate of patent or registration of utility model

Ref document number: 5007388

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250