JP2014010536A - Ticket printer and code reading program in ticket printer - Google Patents
Ticket printer and code reading program in ticket printer Download PDFInfo
- Publication number
- JP2014010536A JP2014010536A JP2012145257A JP2012145257A JP2014010536A JP 2014010536 A JP2014010536 A JP 2014010536A JP 2012145257 A JP2012145257 A JP 2012145257A JP 2012145257 A JP2012145257 A JP 2012145257A JP 2014010536 A JP2014010536 A JP 2014010536A
- Authority
- JP
- Japan
- Prior art keywords
- ticket
- unit
- signal
- mark
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明の実施形態は、チケットプリンタ、チケットプリンタにおけるコード読取りプログラムに関する。 Embodiments described herein relate generally to a ticket printer and a code reading program in the ticket printer.
イベント等のチケットは、街中にある店舗で売られていることが多い。チケットを販売する店舗では、チケットの販売が求められたら通常、センターのサーバに希望するイベントなどの空席等があるかセンターのサーバに問い合わせる。問合せに対してイベントの空席があった場合には、その空席を印刷したチケットの発券をプリンタで行う。発券するチケットは通常、連続紙としてロール状になっており、発券時にはそれらの一枚を切り取る。チケットが正しいかどうかを確認するためにこれらのチケットには固有のチケットIDが予め印刷されている。 Tickets for events and the like are often sold at stores in the city. In a store that sells tickets, when a ticket is requested to be sold, the center server is usually inquired about whether there is a vacant seat for a desired event in the center server. If there is an event vacancy in response to the inquiry, the printer issues a ticket on which the vacancy is printed. Tickets to be issued are usually rolled as continuous paper, and one of them is cut out at the time of ticketing. In order to confirm whether the ticket is correct, a unique ticket ID is printed in advance on these tickets.
このチケットIDは白黒の2値のコードで印刷され、これを読み取ることによりチケットIDが認識される。また、発券するときにもロール紙に印字されたマークにしたがってロール紙が切断される。 The ticket ID is printed with a black and white binary code, and the ticket ID is recognized by reading the ticket ID. Also, when issuing a ticket, the roll paper is cut according to the mark printed on the roll paper.
しかしこの種のチケットプリンタは、当然、印刷機構も必要であって高価で高精度の認識機構を設けることができず、収納されるロール紙にゴミなどが付着している場合も多く上記チケットID等の読み取り精度が低いという問題があった。 However, this type of ticket printer naturally requires a printing mechanism, cannot be provided with an expensive and highly accurate recognition mechanism, and there are many cases where dust or the like adheres to the roll paper to be stored. There is a problem that the reading accuracy is low.
この発明は、このような問題について考慮し、チケットIDなどを良好に検知することが可能な、チケットプリンタ、チケットプリンタにおけるコード読取りプログラムを提供する。 In consideration of such a problem, the present invention provides a ticket printer and a code reading program in the ticket printer that can detect a ticket ID and the like satisfactorily.
一形態のチケットプリンタは、チケットが連続紙として巻かれたロール紙の搬送方向に、白黒として設けられたマークに対して、前記搬送方向に走査を行うマーク走査部と、このマーク走査部により走査され得られた信号波形を比較して2値信号を得る所定の閾値を、前記黒のレベルよりも前記白のレベルの方の近くに設定する閾値設定部と、この閾値設定部により設定された閾値により前記マークを走査し、2値信号を得る信号2値化部と、この2値化部により2値化された信号をチケットIDに変換するID変換部と、を有する。 In one form of ticket printer, a mark scanning unit that scans a mark provided as black and white in the transport direction of a roll paper in which a ticket is wound as continuous paper, and the mark scan unit scans the mark in the transport direction. A threshold value setting unit that sets a predetermined threshold value for obtaining a binary signal by comparing the obtained signal waveforms closer to the white level than the black level, and the threshold value setting unit A signal binarization unit that scans the mark with a threshold value to obtain a binary signal, and an ID conversion unit that converts the signal binarized by the binarization unit into a ticket ID.
以下本発明の実施形態について図面を用いて説明する。一実施形態のチケットプリンタを中心とする構成例を図1に示す。 Embodiments of the present invention will be described below with reference to the drawings. An example of a configuration centering on a ticket printer according to an embodiment is shown in FIG.
チケットプリンタ10は、店舗にて、商品の渡し及び現金等代金の収受など商品の販売処理を行うPOS端末11に接続され、このPOS端末11は商品販売の情報管理を行う中央の販売管理サーバ11Sに接続されている。
The ticket printer 10 is connected to a
チケットプリンタ10は、例えば裏面にマークを印字されたチケットロール紙TRを搬送駆動するロール紙搬送駆動部12と、チケットロール紙TRの裏面のコードを検出するマーク検出部13と、マーク検出部13において検出されたマークのうちのコードからチケットIDを認識するチケットID認識部14と、POS端末11から送られてきた発券情報を記憶しておく発券情報記憶部15と、チケットロール紙TRの表面にチケットIDやチケットの内容などを印字する印字部16と、マーク検出部13で検出された制御マークに基づいてロール紙の切断を行うロール紙切断部17と、を有する。
The ticket printer 10 includes, for example, a roll paper
マーク検出部13において検出されたマークの情報はロール紙搬送駆動部12にも送られ、ロール紙搬送駆動部12はモータMを駆動して、チケットロール紙TRを回転させて搬送する。
The mark information detected by the
このチケットプリンタ10の簡略的な構造図を図2に示す。チケットプリンタ10は、下カバー22aに対して、上カバー22bが、支軸23を中心に上方に回動して開閉可能に取り付けられている。チケットロール紙TRは、裏面が内側になるような状態で巻軸24に回転可能に巻回されて設置される。巻回されているチケットロール紙TRは、その下流にある一対のフィードローラ25a,25bと、このフィードローラ25a,25bに対して用紙搬送路26を挟んで対向配置されているアイドラローラ26a,26bとの間に挟まれて図面の左側(下流)に搬送される。
A simplified structural diagram of the ticket printer 10 is shown in FIG. In the ticket printer 10, an
フィードローラ25aの下流には、チケットロール紙TRの裏面に印字されているマークを認識する第1センサ27a及び第2センサ27b、第3センサ27cが用紙搬送路26に近接し、チケットロール紙の搬送方向に直交方向に並置して設けられている。この第1センサ27b、第2センサ27b及び第3センサ27cは、図1に示すマーク検出部13の一部を構成しており、例えばチケットロール紙TRに光源から照射した光の反射光を検出することによって、チケットロール紙TR裏面上に印字されているマークを検出する。第1センサ27b、第2センサ27b及び第3センサ27cは、センサ部27を構成する。
Downstream of the
これらのセンサの更に下流には、チケットロール紙TRの表面に印字を行うことができるように、例えばサーマル印字ヘッド28aが設けられ、対向して裏面に近接してプラテンローラ28bが設けられる。このサーマル印字ヘッド28a及びプラテンローラ28bが図1に示す印字部16を構成する。
Further downstream of these sensors, for example, a
用紙搬送路26のサーマル印字ヘッド28aとプラテンローラ28bの更に下流には、固定刃29aと可動刃29bから成るカッタ29が設けられている。固定刃29aがチケットロール紙TRの裏面に当てられ、可動刃29bが上方から下方にスライド移動することによりチケットロール紙TRがカットされ、チケットとして排出口OUTから外部に出される。なお、このカッタは固定刃に対して可動刃が回転してチケットロール紙を切る機構を有するロータリ式のカッタであってもよい。
A
上カバー22bの上面には、例えば液晶ディスプレイにより構成される表示部DSPが設けられており、チケット発券時の情報を表示したり、チケット用紙の紙詰まりやロール紙切れ等のエラー表示などを行うようにすることができる。
On the upper surface of the
ここで、チケットロール紙TRの一例を図5(a)(b)により説明する。図5(a)はこのチケットロール紙TRの表面を示し、図5(b)は裏面を示す。直線50はチケットロール紙TRのカット位置を示す。チケットロール紙TRの搬送方向の所定位置に、チケットが発行されたとき顧客に渡すチケットとその控えを分離するためのミシン目51が設けられている。チケットロール紙TRの裏面には、搬送方向に対して白地に3列の黒マークが設けられている。チケットロール紙TRの搬送方向に対して裏面からみて左側のA列には、チケット発行時にチケットロール紙TRを切断するための位置を示す、幅が比較的広いブラックマーク52a,52bが設けられている。ここでは、ブラックマークを2つしか示していないが、実際にはチケットロール紙はもっと長いので、搬送方向にもっと多くのブラックマークを有する。
Here, an example of the ticket roll paper TR will be described with reference to FIGS. FIG. 5A shows the front surface of the ticket roll paper TR, and FIG. 5B shows the back surface. A straight line 50 indicates the cut position of the ticket roll paper TR. A
また、チケットロール紙TRの搬送方向に対して裏面からみて右側には、近接した2つのB列及びC列として、比較的幅が狭いマークが設けられている。この2列には、キャラクタ情報が入れられており、具体的にはチケットIDがコードとして設けられている。各チケットIDを示すキャラクタ情報の前後には、スタートマーク53sとエンドマーク53eが設けられている。スタートマーク53sの前には、カットマーク54が設けられている。スタートマーク53sとエンドマーク53eの間にキャラクタ情報が印字されている。
In addition, on the right side when viewed from the back surface with respect to the transport direction of the ticket roll paper TR, marks having a relatively narrow width are provided as two adjacent B rows and C rows. Character information is entered in these two columns, and specifically, a ticket ID is provided as a code. A
ここで用いるマークとコード、印字と印刷について説明する。マークは例えば白地に黒色で描かれたものをいい、コードは、上記黒のマークと白色のマークの組合せによりキャラクタ情報などの意味を持たせた場合のマークをいう。したがって、マークにはコードが含まれる。後で述べるコードの例では、2列×3(行)の白黒のコードによりキャラクタを表し、これらコードの組合せをコードブロックという。一連のキャラクタを表すコードの終わりには、例えばパリティチェックのためのチェックコードが付加される。 Marks and codes used here, and printing and printing will be described. For example, the mark is drawn in black on a white background, and the code is a mark when the meaning of character information or the like is given by a combination of the black mark and the white mark. Therefore, the mark includes a code. In an example of a code described later, a character is represented by a black and white code of 2 columns × 3 (rows), and a combination of these codes is called a code block. For example, a check code for parity check is added to the end of the code representing a series of characters.
ここで述べる印刷は、型を押す(刻印する)ように、印字することをいい、印字は上記印刷のほか、インクジェット記録や、サーマル記録、静電記録など、型を用いないで文字などを可視化する場合を含む。したがって、ここでは印字は印刷を含む広い概念である。 The printing described here refers to printing by pressing (marking) a mold. In addition to the above-mentioned printing, printing can be used to visualize characters without using a mold, such as inkjet recording, thermal recording, and electrostatic recording. Including the case of Therefore, here, printing is a broad concept including printing.
印刷は、チケットロール紙TRに位置に関して精度よく印字することができる特徴がある反面、型により印字するので、印字する形状は制限される。一方、印刷以外の印字は、印字位置に関して印刷ほど精度はよくないが、通常、ドット単位で印字するので、印字形状は自由であり、図形などを印字することも容易である。 Printing has the feature that it can be printed accurately on the ticket roll paper TR with respect to the position. However, since printing is performed by a mold, the shape to be printed is limited. On the other hand, printing other than printing is not as accurate as printing with respect to the printing position. However, since printing is usually performed in dot units, the printing shape is free, and graphics and the like can be printed easily.
上記図5(b)の説明に戻ると、ブラックマーク52a,52bや、カットマーク54は、上記の印刷により黒色のマークがチケットロール紙TRに設けられている。一方、スタートマーク、エンドマーク及びその間のコードは、印刷以外の印字によりなされる。
Returning to the description of FIG. 5B, the
カットマーク54は、チケットロール紙TRの切断の際に検知されるマークであり正確な位置でなされることが好ましい反面、このマークの形状を変える必要は、通常、ないので印刷が用いられる。ブラックマークはチケットにおいて最初に位置検知されるマークであり、このマークも正確であることが望ましいので印刷されることが好ましい。
The
一方、スタートマークとエンドマークの間のコードの組合せはキャラクタ情報に応じて変えることが必要なので、印刷以外の印字が用いられることが好ましい。スタートマークとエンドマークは、形状を変える必要はないので印刷でもよいが、通常、それらの間のコードと一緒に印字されるので、印刷以外の印字が用いられる。 On the other hand, since the combination of codes between the start mark and the end mark needs to be changed according to the character information, it is preferable to use printing other than printing. Since the start mark and the end mark need not be changed in shape, they may be printed. However, since they are usually printed together with a code between them, printing other than printing is used.
次に、図1のマーク検出部13とチケットID認識部14の構成例を図3に示す。図3において、マーク検出部13は、図5(b)に示すマークを例えば反射光により検出するセンサ部27と、3つのセンサから得たアナログ信号波形を記憶するメモリ部30と、センサ部27により検出された反射光のアナログ信号の波形を取得するアナログ波形取得部31とを有する。またチケットID認識部14は、アナログ波形取得部31により得た各列のアナログ信号の所定期間の波形を時間的にサンプリングして、各最大値と最小値を記憶する最大最小値記憶部32と、この最大最小値記憶部32に記憶された値から閾値を計算し設定する閾値計算設定部33と、この閾値計算設定部33により設定された閾値に基づいてアナログ信号波形を2値信号として得る信号2値化部34と、信号2値化部34により得られた2値信号が正しいかどうか(採用し得るものかどうか)を判定する信号判定部35と、2値信号が採用できる場合、信号2値化部34から2値信号を受けてチケットIDに変換するID変換部36と、を有する。
Next, FIG. 3 shows a configuration example of the
センサ部27は、上述のように第1センサ27a,第2センサ27b,第3センサ27cから成り、これらのセンサで得られたアナログ信号はメモリ部30のAメモリ、Bメモリ、Cメモリに一旦、記憶される。
The
信号判定部35は、信号2値化部34において生成された2値信号が、正しい2値信号として採用してよいかどうか判定する回路である。信号判定部35において採用してよい信号か否かの判定については後述する。信号判定部35において採用してよい2値信号と判定された場合には、信号2値化部34から出力された信号がID変換部36でチケットIDに変換されて印字部16に送られる。一方、信号2値化部34において生成された2値信号が採用するに不適当な場合には、信号判定部35は、マーク検出部13のメモリ部30に各メモリに記憶されているアナログ信号を読み出すための制御信号を送る。
The
メモリ部30に各メモリから読みだされたアナログ信号は、アナログ波形取得部31、信号2値化部34において再度、2値信号を生成する元信号として用いられる。
The analog signal read from each memory to the
次に、スタートマーク53sとエンドマーク53e及びこれら両マークの間に印字されるマークについて図6及び図7を用いて説明する。
Next, the
複数のマークからなるコードブロックにより形成されるキャラクタについて図6により説明する。1キャラクタは、図6に示すコード1からコード6の2列×3の単位コードブロックにより構成される。コード1〜コード6には、黒マーク又は白マークが置かれる。この単位コードブロックの連続によりキャラクタ情報が示される。図7はこの連続するコードブロックの一例である。
A character formed by a code block composed of a plurality of marks will be described with reference to FIG. One character is composed of 2 columns × 3 unit code blocks of
図7のコードブロック71は、コード1,コード4が黒マークであり、他のコードが白マークのキャラクタを表す。同様にコードブロック72は、コード2,コード3,コード5が黒マークで他は白マークで構成されるキャラクタを表す。これらのコードブロックはチケットロール紙の搬送方向に対して所定間隔あけて印字されている。これらの黒マーク、白マークは、図3に示す第2センサ27b及び第3センサ27cにより検知される。
In the
チケットロール紙TRの搬送に伴い第1,第2,第3センサ27a,27b,27cでなされる走査により、例えば図8(a)(b)(c)に示すような各アナログ信号波形が得られる。なお、スタートマーク53sとエンドマーク53eは、2列×2のコードから成る異なるコードブロックであり、カットマーク54も2列×2のコードブロックから成っている。
Scanning performed by the first, second, and
図8(a)は、第1センサ27aにより得られる信号波形であり、図8(b)は第2センサ27bにより得られる信号波形であり、図8(c)は第3センサにより得られる信号波形であり、図3に示すアナログ波形取得部31にて電気信号として取得される。波形81は、ブラックマークを検出したときの波形であり、波形82は、黒マークが2つ続くときの波形を示し、波形83は、黒マークが1つのときの波形例を示している。
FIG. 8A shows a signal waveform obtained by the
値が小さい方はチケットロール紙TRの白の部分から得られる出力値を示しており、以下の説明において、単に白レベルともいう。値が大きい方は黒マークが印字されている方から得られる出力値を示しており、以降の説明において、単に黒レベルともいう。この波形図から明らかなように、走査の環境の変動や、付着しているゴミなどの影響によって白レベルも黒レベルもかなり変動が大きい。実際には、これらの波形に更にノイズが加わっているから、もっと変動の多い波形となるが図では、これらのノイズ成分を省略して示している。 The smaller value indicates the output value obtained from the white portion of the ticket roll paper TR, and is simply referred to as a white level in the following description. The larger value indicates the output value obtained from the one on which the black mark is printed, and is simply referred to as the black level in the following description. As is apparent from this waveform diagram, both the white level and the black level vary considerably due to fluctuations in the scanning environment and the influence of adhering dust. Actually, since more noise is added to these waveforms, the waveform is more varied, but these noise components are omitted in the figure.
これらのアナログ信号波形は、時間的にサンプリングされ、その最大値と最小値が、最大最小値記憶部32に記憶される。閾値計算設定部33において、最大値と最小値から所定の閾値が算出されるので、この閾値も変化する。図8(a)(b)(c)において、一点鎖線は、最大値と最小値の中間の平均値(中閾値)Sm(Sm1,Sm2,Sm3)であり、実線は平均値よりも白に近いレベルとしたときの閾値(白閾値)Sw(Sw1,Sw2,Sw3)を表し、点線は平均値よりも黒レベルに近い値としたときの閾値(黒閾値)Sb(Sb1,Sb2,Sb3)を表す。実際には、アナログ信号波形のサンプリング値の直前のいくつかの最大値及び最小値から閾値を決めるので、閾値の値はこのように直線にはならないが、図では最大値と最小値に対する大体のレベルを表している。
These analog signal waveforms are sampled in time, and the maximum and minimum values are stored in the maximum / minimum
本発明のこの実施形態の特徴の1つは、白レベルに近い値即ち、図8(a)(b)(c)において実線で示す値を最も重要な閾値とする点である。信号2値化部34では、この閾値Swを用いて2値化を行う。通常、アナログ信号は白レベルから立ち上がることや、レベル変動は白レベルの方が少ない。したがってこのように閾値として白レベルに近い方のレベルを用いると、黒レベルが小さくても、確実に上述のコードを検出できる利点がある。
One of the features of this embodiment of the present invention is that a value close to the white level, that is, a value indicated by a solid line in FIGS. 8A, 8B, and 8C is the most important threshold value. The
万が一、白に近い閾値Swにおいてコードが検知できないときには、平均値Smにより2値化し更にこの閾値によっても正確な2値信号が得られないときに限り、黒レベルに近い閾値Sbを用いて2値化する。 In the unlikely event that a code cannot be detected at the threshold value Sw close to white, binarization is performed using the average value Sm, and the binary value is obtained using the threshold value Sb close to the black level only when an accurate binary signal cannot be obtained by this threshold value. Turn into.
信号判定部35では、種々の手段により2値化された信号を採用すべきか否かの判断をする。例えば信号2値化部34において得られた2値信号の幅が黒マーク、白マークの幅に比して非常に小さいときなどの場合にこの信号を修正する。更にこの修正した2値信号をパリティチェックのマークにより検出することなどにより、誤り検出を行う。そのほかの方法により2値信号が正しいか否かを判断することも可能である。
The
次に、この実施形態の動作を図4に示すフローチャートにしたがって説明する。まず、スタートすると、ステップS401にてチケットロール紙TRを搬送させ、センサ部27の第1,第2,第3センサ27a,27b,27cにより3列の走査を行い、アナログ波形取得部31で、図8(a)(b)(c)に波形を示すようなアナログ信号を得る。これらの波形からステップS402で、サンプリングされ、最大最小値記憶部32に最大値、最小値が記憶され、閾値計算設定部33で白閾値Swが計算される。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG. First, when started, the ticket roll paper TR is transported in step S401, three rows are scanned by the first, second, and
一方、第1、第2、第3センサ27a,27b,27cで得られたアナログ信号はステップS403で、メモリ部30の3つのメモリに記憶される。
On the other hand, analog signals obtained by the first, second, and
次のステップS404では、閾値計算設定部33において白閾値Sw(Sw1,Sw2,Sw3)が計算され、この白閾値に基づいて、アナログ信号は2値化される。ステップS406では、信号判定部35において、この2値信号が例えばその幅や、パリティコードにより採用してよいかどうか判定される。
In next step S404, the threshold
ステップS406で採用されないと評価された(S407;N)ならば、ステップS408に移る。このステップでは、信号判定部35は、メモリ部30に制御信号を送り、3つのメモリから走査され記憶されていたアナログ信号をアナログ波形取得部31におくる。
If it is evaluated that it is not adopted in step S406 (S407; N), the process proceeds to step S408. In this step, the
そして最大最小値記憶部32、閾値計算設定部33にて閾値として中閾値Sm(Sm1,Sm2,Sm3)を計算する。再びステップS405に戻って、上記中閾値Smを用いて3列の2値信号を得る。
Then, the medium threshold Sm (Sm1, Sm2, Sm3) is calculated as a threshold by the maximum / minimum
ステップS406で、信号判定部35において、再び2値信号を採用できるか判定し、ステップS407で採用することが決定されれば、ステップS410に移る。
In step S406, the
中閾値Smによって得た2値信号が採用できないものであれば、再びステップS408に移り、メモリ部30から走査により得られた信号を読み出し、ステップS409、S405、S406で次に黒閾値Sbにより2値信号を得る。
If the binary signal obtained by the middle threshold value Sm cannot be adopted, the process proceeds to step S408 again, the signal obtained by scanning is read out from the
このようにして、採用可能な2値信号が得られれば、ステップS410でID変換部36においてチケットIDに変換し、ステップS411で、このチケットIDが、図1に示す印字部16及び発券情報記憶部15に送られる。
In this way, if an employable binary signal is obtained, the
次のステップS412では、POS端末11から販売管理サーバ11Sにチケットの問合せを行い、その結果を受けてPOS端末11から発券情報記憶部15にデータが入ってくる。このチケットの内容が印字部16に送られて、サーマル印字ヘッド28aにより上記チケットIDとチケットの内容が、チケットロール紙TRの表面に印字される(ステップS413)。
In the next step S412, the ticket is inquired from the
なお、チケットIDが発券情報記憶部15に送られ、POS端末11に送られる。POS端末11は更にそのチケット番号を販売管理サーバ11Sに送る。販売管理サーバ11Sにおいて、チケット番号と予め記憶されていたチケットIDと突合せ、そのチケットIDの用紙が正規のものであることを確認するようにすることもできる。チケットIDの突合せ及び確認は、POS端末11において行ってもよい。
The ticket ID is sent to the ticket issue
その後、ステップS414で、ロール紙切断部17内のカッタ29によりチケットTCがカットされ排出される。
Thereafter, in step S414, the ticket TC is cut and discharged by the
上述の実施形態では、2値信号を得るための閾値を白レベルに近い白閾値にし、その後平均値に近い中閾値により、2値信号を得、更にその後にチケットの黒レベルに近い黒閾値により2値信号を得ていた。このように3段階で2値信号を得ればチケットIDが検知できない場合を非常に少なくすることが可能である。 In the above-described embodiment, the threshold value for obtaining the binary signal is set to the white threshold value close to the white level, and then the binary signal is obtained by the medium threshold value close to the average value, and then the black threshold value close to the black level of the ticket. A binary signal was obtained. Thus, if a binary signal is obtained in three stages, the number of cases where the ticket ID cannot be detected can be greatly reduced.
しかし、通常、白レベルに近い閾値を用いて、2値信号を得れば、多くの場合、適切な2値信号が得られる。したがって、白閾値のみにより2値信号を得ることも可能である。また、白閾値と中閾値により2値信号を得ることも可能である。少なくとも白レベルに近い閾値により2値信号を得れば多くの場合、実用的にチケットIDの検出は可能となる。 However, usually, if a binary signal is obtained using a threshold value close to the white level, an appropriate binary signal can be obtained in many cases. Therefore, it is possible to obtain a binary signal using only the white threshold. It is also possible to obtain a binary signal using a white threshold value and a medium threshold value. In many cases, a ticket ID can be detected practically if a binary signal is obtained with a threshold value at least close to the white level.
上記実施形態では、図8(a)(b)(c)に示すように、3列の走査により得られた信号毎に白閾値を決めていた。しかし、これらの総和の信号により平均値よりも白レベルに近い閾値を求め、白閾値とするようにしてもよい。 In the above embodiment, as shown in FIGS. 8A, 8B, and 8C, the white threshold value is determined for each signal obtained by scanning in three rows. However, a threshold value closer to the white level than the average value may be obtained from the signal of the sum, and set as the white threshold value.
上記実施形態では、2列×3の白黒マークによりコードブロックを構成していた。しかし、列が3以上であってもよいし、搬送方向に2または4以上のマークによりコードブロックを構成してもよい。 In the above embodiment, the code block is constituted by 2 rows × 3 monochrome marks. However, the number of rows may be 3 or more, and the code block may be constituted by 2 or 4 or more marks in the transport direction.
上記実施形態では、閾値を求めるためにサンプリングを行った後、最大値最小値を求めて閾値を計算していた。しかしアナログ回路により、閾値を白レベルに近い値とするようにしてもよい。 In the above embodiment, the sampling is performed to obtain the threshold value, and then the threshold value is calculated by obtaining the maximum value and the minimum value. However, the threshold value may be a value close to the white level by an analog circuit.
上記実施形態では、チケットロール紙の表面の印字はサーマルヘッドにより行っていた。しかし、インクジェット印字や、トナー印字など他の印字方法により、ロール紙の表面の印字を行ってもよい。 In the above embodiment, the printing on the surface of the ticket roll paper is performed by the thermal head. However, the surface of the roll paper may be printed by other printing methods such as ink jet printing or toner printing.
上記実施形態では、認識したチケットIDを表面に印字していた。しかし、チケットIDは表面に印字しなくてもよい。 In the above embodiment, the recognized ticket ID is printed on the surface. However, the ticket ID does not have to be printed on the surface.
また、上記実施形態では、裏面に制御のためのカットマークや、チケットIDとなるコード(マーク)を印字し、表面にチケットの内容を印字するようにしていた。しかし、制御のためのカットマークや、チケットIDとなるコードを表面に印字し、裏面にチケット内容を印字するようにしてもよい。 In the above embodiment, a cut mark for control and a code (mark) serving as a ticket ID are printed on the back surface, and the contents of the ticket are printed on the front surface. However, a cut mark for control or a code serving as a ticket ID may be printed on the front surface, and the ticket content may be printed on the back surface.
上記実施形態によれば、平均値より白に近いレベルの値を閾値として2値信号を得ているので、チケットプリンタにおいてチケットIDを良好に検知することが可能となる。 According to the above-described embodiment, the binary signal is obtained using a value closer to white than the average value as a threshold value, so that the ticket ID can be detected well in the ticket printer.
本発明のいくつかの実施形態を説明したがこれらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
10・・・・チケットプリンタ
11・・・・POS端末
11S・・・・販売管理サーバ
12・・・・ロール紙搬送駆動部
13・・・・マーク検出部
14・・・・チケットID認識部
15・・・・発券情報記憶部
16・・・・印字部
17・・・・ロール紙切断部
24・・・・巻軸
25a,25b・・・・フィードローラ
26a,26b・・・・アイドラローラ
26・・・・用紙搬送路
27・・・・センサ部
28a・・・・サーマル印字ヘッド
28b・・・・プラテンローラ
29・・・・カッタ
30・・・・メモリ部
31・・・・アナログ波形取得部
32・・・・最大最小値記憶部
33・・・・閾値計算設定部
34・・・・信号2値化部
35・・・・信号判定部
36・・・・ID変換部
TR・・・・チケットロール紙
DESCRIPTION OF SYMBOLS 10 ...
Claims (7)
このマーク走査部により走査され得られた信号波形を比較して2値信号を得る所定の閾値を、前記黒のレベルよりも前記白のレベルの方の近くに設定する閾値設定部と、
この閾値設定部により設定された閾値により前記マークを走査し、2値信号を得る信号2値化部と、
この2値化部により2値化された信号をチケットIDに変換するID変換部と、
を有するチケットプリンタ。 A mark scanning unit that scans in the transport direction with respect to a mark provided as black and white in the transport direction of the roll paper on which the ticket is wound as continuous paper;
A threshold value setting unit for setting a predetermined threshold value for obtaining a binary signal by comparing signal waveforms obtained by scanning by the mark scanning unit, closer to the white level than the black level;
A signal binarization unit that scans the mark with a threshold set by the threshold setting unit to obtain a binary signal;
An ID conversion unit that converts the signal binarized by the binarization unit into a ticket ID;
Having a ticket printer.
このマーク走査部により走査され得られた信号波形を比較して2値信号を得る所定の閾値を、前記黒のレベルよりも前記白のレベルの方の近くの第1の閾値と、前記黒のレベルと前記白のレベルの中間又は前記白のレベルよりも前記黒のレベルの方の近くの第2のレベルを設定する閾値設定部と、
この閾値設定部により設定された前記第1の閾値及び前記第2の閾値により前記コードブロックを走査して得られた第1の2値信号及び前記第2の閾値により前記コードブロックを走査して得られた第2の2値信号を記憶する2値信号記憶部と、
この2値信号記憶部により記憶された前記第1の2値信号が、所定の条件を満たしていないとき前記第2の2値信号を採用する信号2値化部と、
を有するチケットプリンタ。 A mark scanning unit that scans in the transport direction with respect to a code block composed of a plurality of codes provided in a plurality of rows in parallel as black and white in the transport direction of the roll paper on which the ticket is wound as continuous paper;
A predetermined threshold value for obtaining a binary signal by comparing signal waveforms obtained by scanning by the mark scanning unit is set to a first threshold value closer to the white level than the black level, and the black threshold value. A threshold value setting unit for setting a second level that is intermediate between the level of white and the level of white or the black level rather than the level of white;
The code block is scanned with the first binary signal and the second threshold obtained by scanning the code block with the first threshold and the second threshold set by the threshold setting unit. A binary signal storage unit for storing the obtained second binary signal;
A signal binarization unit that adopts the second binary signal when the first binary signal stored by the binary signal storage unit does not satisfy a predetermined condition;
Having a ticket printer.
この走査され得られた信号波形を比較して2値信号を得る所定の閾値を、前記黒のレベルよりも前記白のレベルの方の近くに設定し、
この設定された閾値により前記コードを走査し、2値信号を得、
前記2値信号をキャラクタ情報に変換することを、コンピュータに行わせるチケットプリンタにおけるコード読取りプログラム。 In the transport direction of the roll paper on which the ticket is wound as continuous paper, scanning is performed in the transport direction with respect to the code provided as black and white,
A predetermined threshold value for obtaining a binary signal by comparing the signal waveforms obtained by scanning is set closer to the white level than the black level;
The code is scanned with the set threshold value to obtain a binary signal,
A code reading program in a ticket printer that causes a computer to convert the binary signal into character information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012145257A JP2014010536A (en) | 2012-06-28 | 2012-06-28 | Ticket printer and code reading program in ticket printer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012145257A JP2014010536A (en) | 2012-06-28 | 2012-06-28 | Ticket printer and code reading program in ticket printer |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014010536A true JP2014010536A (en) | 2014-01-20 |
Family
ID=50107228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012145257A Pending JP2014010536A (en) | 2012-06-28 | 2012-06-28 | Ticket printer and code reading program in ticket printer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014010536A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015142975A (en) * | 2014-01-31 | 2015-08-06 | 東芝テック株式会社 | Image formation apparatus |
-
2012
- 2012-06-28 JP JP2012145257A patent/JP2014010536A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015142975A (en) * | 2014-01-31 | 2015-08-06 | 東芝テック株式会社 | Image formation apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9962975B2 (en) | Printer, and detection method for a detection area on a sheet | |
US9290023B2 (en) | Printing apparatus, control method, and storage medium | |
JP5023476B2 (en) | Label with release paper and label printer | |
JP2023099579A (en) | Information processing device, recording device, information processing method and program | |
JP2007173912A (en) | Print inspection apparatus | |
JP4149867B2 (en) | Printer and its control method | |
US9128651B2 (en) | Printing apparatus, method of controlling printing apparatus, and storage medium | |
JP2014010536A (en) | Ticket printer and code reading program in ticket printer | |
JP5419205B2 (en) | Label detection device | |
JP4725148B2 (en) | Printing apparatus and program | |
JP2009020766A (en) | Test chart and test pattern | |
JP2014006705A (en) | Ticket printer, code-reading program, and ticket-issuing roll paper | |
JP2014006704A (en) | Ticket printer, code-reading program, and ticket-issuing roll paper | |
US10084938B2 (en) | Reading apparatus and non-transitory storage medium storing instructions executable by reading apparatus | |
JP7313858B2 (en) | Information processing device, recording device, information processing method and program | |
US9216596B1 (en) | Printing apparatus and commodity information processing apparatus | |
JP2004058337A (en) | Printer | |
JP6503846B2 (en) | Ink jet printer and position information management method | |
JP4830704B2 (en) | Recording apparatus and recording program | |
JP2013065128A (en) | Bankbook printer | |
JP3079466U (en) | Receipt paper | |
JP2002230645A (en) | Receipt printing device and receipt issuing method | |
KR101884997B1 (en) | Method for controlling printer and the printer therefore | |
JP2021194773A (en) | Printer | |
JP6181008B2 (en) | Paper sheet presence / absence detection device and paper sheet presence / absence detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131126 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140115 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140325 |