JP2849781B2 - Method of determining the last printed line in the media processing device - Google Patents

Method of determining the last printed line in the media processing device

Info

Publication number
JP2849781B2
JP2849781B2 JP3109726A JP10972691A JP2849781B2 JP 2849781 B2 JP2849781 B2 JP 2849781B2 JP 3109726 A JP3109726 A JP 3109726A JP 10972691 A JP10972691 A JP 10972691A JP 2849781 B2 JP2849781 B2 JP 2849781B2
Authority
JP
Japan
Prior art keywords
data
line
black
value
white
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.)
Expired - Fee Related
Application number
JP3109726A
Other languages
Japanese (ja)
Other versions
JPH04314572A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP3109726A priority Critical patent/JP2849781B2/en
Publication of JPH04314572A publication Critical patent/JPH04314572A/en
Application granted granted Critical
Publication of JP2849781B2 publication Critical patent/JP2849781B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Handling Of Cut Paper (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、主として金融機関で使
用される通帳に印字を行う通帳処理装置等の媒体処理装
置において、特に媒体の最終印字済行を解析する最終印
字済行判定方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a medium processing apparatus such as a passbook processing apparatus for printing on a passbook mainly used by financial institutions, and more particularly to a final printed line determination method for analyzing the last printed line of a medium. .

【0002】[0002]

【従来の技術】一般に、金融機関等で用いられる通帳記
帳装置等の媒体処理装置では、通帳の印字済行を認識
し、この印字済行の次の行から印字を継続するようにし
ている。
2. Description of the Related Art Generally, a medium processing device such as a passbook entry device used in a financial institution recognizes a printed line of a passbook and continues printing from the line following the printed line.

【0003】図2は、このような媒体処理装置としての
通帳記帳装置の構成図である。図の装置は、通帳の走行
路1に沿って設けられたインサータユニット2と、光学
式頁・行読取ユニット3と、プリンタユニット4と、タ
ーンページユニット5と、通帳発行部6と、制御部7と
からなる。インサータユニット2は、走行路1の入口に
設けられ、顧客が通帳を挿入する挿入口8と、通帳に設
けられた磁気ストライプにデータを書き込んだり読み取
ったりする磁気ヘッド9を備えた磁気ストライプリード
ライトユニット10とで構成されている。
FIG. 2 is a configuration diagram of a passbook entry device as such a medium processing device. The apparatus shown in the figure comprises an inserter unit 2, an optical page / line reading unit 3, a printer unit 4, a turn page unit 5, a passbook issuing unit 6, a control unit, 7 The inserter unit 2 is provided at an entrance of the traveling path 1 and has a slot 8 for a customer to insert a passbook and a magnetic stripe read / write having a magnetic head 9 for writing and reading data on a magnetic stripe provided on the passbook. And a unit 10.

【0004】図3に、通帳100 を示す。即ち、通帳100
の表紙には磁気ストライプ101 が設けられ、口座番号等
のデータが記録されている。また、通帳100 の中紙102
には頁マーク103 と印字文字104 が印刷されている。
FIG. 3 shows a passbook 100. That is, passbook 100
The cover has a magnetic stripe 101 on which data such as an account number is recorded. Also, the inner paper 102 of the passbook 100
Has a page mark 103 and a print character 104 printed thereon.

【0005】光学式頁・行読取ユニット3は、後述する
ように、通帳100 の中紙102 に印刷された頁マーク103
と印字文字104 とを光学的に読取る光学読取部である。
プリンタユニット4は、印字ヘッド11と、プラテン1
2とを有し、通帳100に印字を行う印字装置である。タ
ーンページユニット5は、通帳100 の頁めくりを自動的
に行う機構を有する装置である。通帳発行部6は、取引
が終了して挿入口8に排出した通帳100 を顧客が取り忘
れた場合、その通帳100 を引き込んで取り込み、保管す
るための通帳取り込み箱、通帳繰越が発生した場合、新
しい通帳100 の発行を行うまでの間、旧通帳を一時保管
しておくための通帳保管部、新しく発行する通帳100 を
複数冊格納しておく通帳スタッカ等から構成されてい
る。
The optical page / line reading unit 3 includes a page mark 103 printed on an inner sheet 102 of the passbook 100 as described later.
And an optical reading unit for optically reading the print characters 104.
The printer unit 4 includes a print head 11 and a platen 1
2 and a printing device for printing on the passbook 100. The turn page unit 5 is a device having a mechanism for automatically turning pages of the passbook 100. When the customer forgets to take the passbook 100 discharged to the insertion slot 8 after the transaction is completed, the passbook issuing unit 6 reads the passbook 100, retrieves the passbook 100, stores the passbook in a storage box for storing the passbook 100, Until the new passbook 100 is issued, the passbook 100 includes a passbook storage section for temporarily storing the old passbook, a passbook stacker for storing a plurality of newly issued passbooks 100, and the like.

【0006】制御部7は、通帳100 の走行を制御した
り、磁気ストライプリードライトユニット10で読み書
きするデータの編集、解析を行い、かつ光学式頁・行読
取ユニット3で読取ったデータの解析や、プリンタユニ
ット4で印字するデータの編集等を行う制御装置であ
る。また、インサータユニット2、プリンタユニット4
およびターンページユニット5の走行路1上下には、図
示しないモータにより回転し、走行路1上の通帳を走行
させるための走行ローラ13が複数個設けられている。
The control unit 7 controls the travel of the passbook 100, edits and analyzes data read and written by the magnetic stripe read / write unit 10, and analyzes and reads data read by the optical page / line reading unit 3. And a control device for editing data to be printed by the printer unit 4. The inserter unit 2 and the printer unit 4
In addition, a plurality of traveling rollers 13 are provided above and below the traveling path 1 of the turn page unit 5 for rotating a passbook on the traveling path 1 by being rotated by a motor (not shown).

【0007】図4に、光学式頁・行読取ユニット3と制
御部7とからなる頁・行読取方式を示す。この図4にお
いて、光学式頁・行読取ユニット3は、CCDセンサ1
4と増幅器15とからなり、増幅器15の出力が制御部
7に入力されるよう構成されている。また、走行ローラ
13は、パルスモータ16によって駆動されるよう構成
され、走行路1上の通帳100 を搬送するようになってい
る。
FIG. 4 shows a page / line reading system including the optical page / line reading unit 3 and the control unit 7. In FIG. 4, the optical page / row reading unit 3 includes a CCD sensor 1
4 and an amplifier 15. The output of the amplifier 15 is input to the control unit 7. The traveling roller 13 is configured to be driven by a pulse motor 16 so as to convey the passbook 100 on the traveling path 1.

【0008】制御部7は、中央処理装置(CPU)17
と、白/黒判定回路18と、CCDセンサクロック回路
19と、同期回路20と、パルスモータドライバ21と
を備えている。中央処理装置17は、光学式頁・行読取
ユニット3からの出力に基づき各種の処理を行うと共
に、パルスモータ16を制御して通帳100 の搬送制御を
行うプロセッサである。白/黒判定回路18は光学式頁
・行読取ユニット3からの出力に基づき、その出力レベ
ルで白/黒の判定を行う判定回路である。CCDセンサ
クロック回路19は、CCDセンサ14に対し、所定の
クロック信号を送出するクロック発生回路である。同期
回路20は、パルスモータドライバ21の制御による通
帳100 の走行量とCCDセンサ14の走査を同期させる
ための回路である。また、パルスモータドライバ21
は、中央処理装置17から出力されるパルスに従い、所
定のパルスをパルスモータ16に送出する制御回路であ
る。
The control unit 7 includes a central processing unit (CPU) 17
, A white / black determination circuit 18, a CCD sensor clock circuit 19, a synchronization circuit 20, and a pulse motor driver 21. The central processing unit 17 is a processor that performs various processes based on the output from the optical page / line reading unit 3 and controls the pulse motor 16 to control the transport of the passbook 100. The white / black determination circuit 18 is a determination circuit that determines white / black based on the output from the optical page / row reading unit 3 based on the output level. The CCD sensor clock circuit 19 is a clock generation circuit that sends a predetermined clock signal to the CCD sensor 14. The synchronization circuit 20 is a circuit for synchronizing the travel of the passbook 100 under the control of the pulse motor driver 21 with the scanning of the CCD sensor 14. Also, the pulse motor driver 21
Is a control circuit for sending a predetermined pulse to the pulse motor 16 in accordance with the pulse output from the central processing unit 17.

【0009】次に、このような構成による頁・行の読取
り方法を説明する。先ず、通帳100 は、走行ローラ13
がパルスモータ16によって矢印方向に駆動されること
によって、矢印方向(媒体走行方向)に搬送される。こ
こで、パルスモータ16は、パルスモータドライバ21
に与えられるパルスに同期して、パルスモータの種類に
より固有の角度だけ回転するモータである。従って、パ
ルスモータ16に与える1パルス毎に通帳100 が移動す
る距離が決定される。また、中央処理装置17からの指
示によりパルスモータ16の回転・停止が行われる。更
に、中央処理装置17からパルスモータドライバ21に
与えられるパルスは、同期回路20を介してCCDセン
サクロック回路19にも与えられる。これにより、CC
Dセンサクロック回路19はパルスモータ16の回転に
同期したクロックをCCDセンサ14に対して出力し、
従って、CCDセンサ14の走査開始クロックと通帳10
0 の走行とを同期させることができる。
Next, a method of reading pages / rows with such a configuration will be described. First, the passbook 100 includes the traveling roller 13.
Is driven in the direction of the arrow by the pulse motor 16 to be transported in the direction of the arrow (medium running direction). Here, the pulse motor 16 is a pulse motor driver 21
The motor rotates by a specific angle depending on the type of the pulse motor in synchronization with the pulse given to the motor. Therefore, the distance the passbook 100 moves for each pulse given to the pulse motor 16 is determined. In addition, the rotation and stop of the pulse motor 16 are performed according to an instruction from the central processing unit 17. Further, the pulse supplied from the central processing unit 17 to the pulse motor driver 21 is also supplied to the CCD sensor clock circuit 19 via the synchronization circuit 20. This allows CC
The D sensor clock circuit 19 outputs a clock synchronized with the rotation of the pulse motor 16 to the CCD sensor 14,
Therefore, the scanning start clock of the CCD sensor 14 and the passbook 10
0 running can be synchronized.

【0010】CCDセンサ14は、走査開始クロックが
与えられた後、シフトクロックに同期して1画素毎の出
力を画素の順番に従って出力する。これを走査(スキャ
ン)と呼び、1ラインの走査方向を主走査方向と呼ぶ。
そして、CCDセンサ14は、CCDセンサ14内に複
数個設けられている各画素にチャージされた電荷をシフ
トクロックに同期して出力する。この時、各画素の真下
の通帳面に印字が存在する場合(黒データの場合)、チ
ャージされる電荷が少ないため、その出力レベルは低
く、逆に印字が無い場合(白データの場合)は、チャー
ジされる電荷が多くなり、出力レベルは高くなる。この
CCDセンサ14からの出力は増幅器15で増幅され、
制御部7に入力される。
After the scanning start clock is supplied, the CCD sensor 14 outputs an output for each pixel in accordance with the order of the pixels in synchronization with the shift clock. This is called scanning, and the scanning direction of one line is called a main scanning direction.
Then, the CCD sensor 14 outputs electric charges charged to each of a plurality of pixels provided in the CCD sensor 14 in synchronization with the shift clock. At this time, if there is a print on the passbook surface immediately below each pixel (in the case of black data), the output level is low because there is little charge, and conversely, if there is no print (in the case of white data), , And the output level increases. The output from the CCD sensor 14 is amplified by an amplifier 15,
It is input to the control unit 7.

【0011】制御部7では、白/黒判定回路18にて、
光学式頁・行読取ユニット3の出力レベルから各画素の
出力があるレベルより高いか低いかを先ず判定し、この
判定により各画素毎に白/黒を判断する。次に、各画素
の白/黒判断結果を基に、CCDセンサ14が1回主走
査方向に走査した結果から、黒と判断した画素の並び方
や画素数等から、所定のプロトコル(例えば、予め決定
された画素数以上の画素がある場合等のプロトコル)に
基づいて、1走査したときの1ラインの白/黒判定を行
う。
In the control section 7, the white / black determination circuit 18
It is first determined from the output level of the optical page / row reading unit 3 whether the output of each pixel is higher or lower than a certain level, and white / black is determined for each pixel by this determination. Next, based on the white / black determination result of each pixel, a predetermined protocol (for example, in advance, based on the arrangement of the pixels determined to be black and the number of pixels based on the result of one scan in the main scanning direction by the CCD sensor 14). Based on a protocol such as a case where there are more pixels than the determined number of pixels, white / black determination is performed for one line when one scan is performed.

【0012】図5に白/黒判定の説明図を示す。即ち、
図5(a)に走査開始クロック、(b)にシフトクロッ
ク、(c)(c)にCCDセンサ14の出力レベルを示
す。また、CCDセンサ14の1ライン方向を主走査方
向、通帳100の搬送方向を副走査方向とする。出力レベ
ルは、CCDセンサ14で通帳100 の中紙102 の印字部
分を主走査方向に走査した場合のレベル変化であり、ス
ライスレベルを超えた場合に白データ、スライスレベル
以下の場合に黒データ(文字有りデータ)と判定する。
このような構成において、例えば、3画素以上黒データ
がある場合にそのラインは黒と判定する。従って、図5
(c)に示す出力信号が得られた場合、そのラインは黒
と判定される。また、上述したように、CCDセンサ1
4の走査速度とパルスモータ16の1パルス当りの回転
角度が同期していることから、CCDセンサ14の1走
査の1ライン毎、即ち、パルスモータ16の1パルス毎
の白/黒データを、通帳100 の頁マーク103 部分および
印字行104 部分に対応させて、中央処理装置17にて所
定のプロトコルに基づいて解析し、印字済行数および頁
数を判定する。
FIG. 5 is an explanatory diagram of the white / black determination. That is,
5A shows a scanning start clock, FIG. 5B shows a shift clock, and FIGS. 5C and 5C show output levels of the CCD sensor 14. The one-line direction of the CCD sensor 14 is defined as a main scanning direction, and the transport direction of the passbook 100 is defined as a sub-scanning direction. The output level is a level change when the print portion of the inner paper 102 of the passbook 100 is scanned by the CCD sensor 14 in the main scanning direction. (Data with characters).
In such a configuration, for example, if there is black data of three or more pixels, the line is determined to be black. Therefore, FIG.
When the output signal shown in (c) is obtained, the line is determined to be black. Also, as described above, the CCD sensor 1
4 and the rotation angle per pulse of the pulse motor 16 are synchronized, so that the white / black data for each line of one scan of the CCD sensor 14, that is, for each pulse of the pulse motor 16, is The central processing unit 17 performs analysis based on a predetermined protocol in correspondence with the page mark 103 portion and the print line 104 portion of the passbook 100, and determines the number of printed lines and the number of pages.

【0013】次に、その行解析プロトコルについて説明
する。図6は、行解析プロトコルを説明するための図で
ある。図中、黒丸は上述した1ラインの白/黒判定結果
から黒と判定された部分(印字有りデータ部分)を示
し、白丸は同様に白と判定された部分(印字無しデータ
部分)を示している。ところで、通帳100 の日付欄にて
行解析を行う場合、日付欄の印字パターンとして図6
(a)に示すように、日付の数字を印字するパターンが
多いが、ページ繰越後の繰越印字や定期通帳等の特定科
目の通帳に対して図6(b)に示すようにハイフォンマ
ークしか印字しない場合がある。そこで、ハイフォンマ
ークのみの印字を解析しなければならないが、印字フォ
ントの種類により、ハイフォンマークの太さはまちまち
であるため(図では、4個分の太さで示している)、一
番細い印字フォントで行印字の有無を判断しなければな
らない。ここでは、仮に一番細い印字フォントで黒デー
タが判断される個数をn個とする。更に、データ解析は
説明の都合上、図6に示す例の場合下方向から順番に解
析していくものとする。
Next, the row analysis protocol will be described. FIG. 6 is a diagram for explaining the row analysis protocol. In the figure, a black circle indicates a portion (data portion with print) determined to be black from the above-described white / black determination result of one line, and a white circle indicates a portion (data portion without print) also determined to be white. I have. By the way, when line analysis is performed in the date column of the passbook 100, the print pattern of the date column shown in FIG.
As shown in FIG. 6A, there are many patterns for printing date numbers, but only a hyphen mark is printed as shown in FIG. May not. Therefore, it is necessary to analyze the printing of only the hyphen mark, but since the thickness of the hyphen mark varies depending on the type of the printing font (in the figure, the thickness of the four hyphen marks is shown), the thinnest is shown. The print font must be used to determine the presence or absence of line printing. Here, it is assumed that the number of black data determined to be the thinnest print font is n. Further, for the sake of explanation, the data analysis is performed sequentially from the bottom in the case of the example shown in FIG.

【0014】図7に行解析のフローチャートを示す。先
ず、最初に、1ラインの白黒判定結果を順次白か黒かを
見ながら取り出し(ステップS1)、黒データがあった
場合は(ステップS2)、黒データカウント(図中KC
Tと略す)を一つカウントアップする(ステップS
3)。また、白データであった場合は、黒データカウン
トを0として(ステップS4)、ステップS1に戻る。
そして、黒データがn個以上連続した場合(ステップS
5)は、白黒データの取り出しを継続し(ステップS
6)、更に黒データが検出された場合は(ステップS
7)、黒データカウントを一つずつアップし(ステップ
S8)、ステップS6に戻って白黒データの取り出しを
継続する。また、ステップS5において、黒データがn
個以上連続しなかった場合は、ステップS1に戻って、
白黒データの取り出しを継続する。ステップS7におい
て、白データが検出された場合、即ち連続した黒データ
が途切れた場合、今までの黒データの個数の1/2 を中心
値(CNT)として判定する(ステップS9)。そし
て、この中心値のある行を印字済行と判定する(ステッ
プS10)。
FIG. 7 shows a flowchart of the row analysis. First, the black-and-white determination result of one line is sequentially extracted while checking whether it is white or black (step S1). If there is black data (step S2), the black data count (KC in the figure) is obtained.
T) (step S).
3). If the data is white data, the black data count is set to 0 (step S4), and the process returns to step S1.
Then, when n or more pieces of black data continue (step S
5) Continue extracting black and white data (step S)
6) If further black data is detected (step S)
7) The black data count is incremented one by one (step S8), and the process returns to step S6 to continue extracting black and white data. In step S5, the black data is n
If not, the process returns to step S1 and
Continue extracting black and white data. If white data is detected in step S7, that is, if continuous black data is interrupted, half of the number of black data so far is determined as the center value (CNT) (step S9). Then, the line having the center value is determined as a printed line (step S10).

【0015】即ち、従来の行解析は、n=4とした場
合、図6の(c)に示すように、黒データ4個の連続
があるため、印字有りと判断。更に黒データを取り出
し、連続の最後を検出する。連続の中心を求め、中心
のある行を印字済行とする。のように行うものである。
また、この時、図6の下方向から解析しているため、こ
れを通帳100 の中紙102 に置き換えると、中紙102 の下
端(行数の多い方)から解析していることになり、最初
に検出した連続n個以上の中心が存在する行が最終印字
済行(一番最後の印字がされている行)と解析される。
That is, according to the conventional line analysis, when n = 4, as shown in FIG. 6C, there is a continuation of four black data, so that it is determined that there is printing. Further, black data is extracted, and the end of the sequence is detected. The center of the continuation is obtained, and the line with the center is set as a printed line. It is done as follows.
Also, at this time, since the analysis is performed from the downward direction in FIG. 6, if this is replaced with the middle paper 102 of the passbook 100, the analysis is performed from the lower end (the one with the larger number of lines) of the middle paper 102, The line that has the center of n or more consecutive lines detected first is analyzed as the last printed line (the last printed line).

【0016】[0016]

【発明が解決しようとする課題】しかしながら、上記従
来の最終印字済行判定方法では、通帳100 の中紙102 に
印字されている文字に位置ずれや印字かすれまたは汚れ
や書き込み等があった場合、正確に印字済行を検出する
ことができない恐れがあった。
However, according to the above-mentioned conventional method of determining a final printed line, when characters printed on the inner paper 102 of the passbook 100 are misaligned, printed faintly, stained or written, etc. There is a possibility that a printed line cannot be detected accurately.

【0017】図8は、印字位置ずれおよび印字かすれが
発生した場合の白黒判定結果の例を示す図である。ここ
で、図中の数字「2」にかすれ部分があり、かつ印字文
字が行境界線を越えて下方にずれていたとする。この
時、連続したn個の黒データが検出された後に、印字か
すれによる白データが検出されると、上述したように、
最初に検出したn個の黒の中心を検出する。その結果、
この通帳100 の余白部分と印字かすれの間にあるn個の
黒の中心が、行境界線を越えて次の行に入り込んでいる
と、その入り込んだ行を印字済行と判定し、結果的に1
行分飛ばして新たな位置に印字されてしまう。
FIG. 8 is a diagram showing an example of a black-and-white determination result when a print position shift and a print blur occur. Here, it is assumed that the numeral "2" in the drawing has a blurred portion, and that the print character is shifted downward beyond the line boundary. At this time, if white data due to fading printing is detected after n consecutive black data are detected, as described above,
The center of the first detected n blacks is detected. as a result,
If the center of the n blacks between the blank portion of the passbook 100 and the print fading crosses the line boundary and enters the next line, the entered line is determined as a printed line, and the resulting line is determined. 1 in
Lines are skipped and printed at new positions.

【0018】また、中紙102 に、鉛筆等で線が引いてあ
ったり、汚れがあった場合でも、1ライン読取った時
に、その汚れ等が黒データのカウント値の規定数以上の
長さの場合は、そのラインを黒と判定し、印字済行解析
を誤ることがあった。例えば、図5の場合で説明する
と、汚れ等の黒データのカウント値が3画素以上あった
場合は、そのラインは黒と判定されてしまい、このよう
な誤判定によっても最終印字済行の解析に誤りが生じ、
1行分飛ばして印字が行われてしまう恐れがあった。
Further, even if a line is drawn on the inner paper 102 with a pencil or the like or there is dirt, when one line is read, the dirt or the like has a length equal to or more than the specified number of black data count values. In such a case, the line was determined to be black, and the analysis of the printed line was sometimes erroneous. For example, in the case of FIG. 5, if the count value of black data such as dirt is 3 pixels or more, the line is determined to be black. Makes an error,
There is a risk that printing is skipped by one line.

【0019】このような現象は、通帳印字において、見
た目も不快なものであり、甚だしい場合は、通帳100 の
終了を早めてしまうなど、通帳使用者にとって、手間や
迷惑をかけてしまう等の問題点を有していた。
Such a phenomenon is unpleasant in the appearance of passbook printing, and in a severe case, the passbook 100 may be terminated earlier, and the passbook user may be troubled and troublesome. Had a point.

【0020】本発明は、上記従来の問題点を解決するた
めになされたもので、最終印字済行の解析が正確に行え
る媒体処理装置の最終印字済行判定方法を提供すること
を目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problems, and has as its object to provide a final printed line determination method for a medium processing apparatus which can accurately analyze a final printed line. .

【0021】[0021]

【課題を解決するための手段】本発明の媒体処理装置の
最終印字済行判定方法において、第1の発明は、媒体を
走査し、該媒体の印字済行を光学的に読取る光学読取部
と、前記光学読取部の出力から最終印字済行を判定し、
該最終印字済行の次の行から印字を行う制御部とを備え
た媒体処理装置の最終印字済行判定方法において、前記
媒体の文字配列方向を主走査方向、行配列方向を副走査
方向とし、かつ前記媒体の文字有り部の主走査方向への
走査で得られるデータを文字有りデータとした場合、前
記副走査方向の所定の範囲内で、前記文字有りデータの
予め設定された値以上連続するグループを検出し、その
グループの文字有りデータの下限値と上限値から中心値
を算出し、この中心値の位置する行を最終印字済行と判
定することを特徴とするものである。第2の発明は、第
1の発明において、文字有りデータの予め設定された値
以上連続するグループを検出する場合、該グループ中、
文字有りデータの途切れが所定値以下の時は、文字有り
データが連続していると判断することを特徴とするもの
である。第3の発明は、媒体を走査し、該媒体の印字済
行を光学的に読取る光学読取部と、前記光学読取部の出
力から最終印字済行を判定し、該最終印字済行の次の行
から印字を行う制御部とを備えた媒体処理装置の最終印
字済行判定方法において、前記媒体の文字配列方向を主
走査方向、行配列方向を副走査方向とし、かつ前記媒体
の文字有り部の主走査方向への走査で得られる文字有り
画素のデータを文字有りデータとした場合、前記主走査
方向の規定範囲内で、所定数連続した前記文字有り画素
のグループが、所定個数あった場合に、その主走査方向
のラインを前記文字有りデータと判定し、前記文字有り
データに基づき、最終印字済行を判定することをを特徴
とするものである。
According to a first aspect of the present invention, there is provided a method for determining a finally printed line of a medium processing apparatus, comprising: an optical reading unit for scanning a medium and optically reading a printed line of the medium; Determining the last printed line from the output of the optical reading unit,
In the method for determining the last printed line of the medium processing device, comprising a control unit that performs printing from the next line after the last printed line, the character arrangement direction of the medium is a main scanning direction, and the line arrangement direction is a sub-scanning direction. When the data obtained by scanning the character-containing portion of the medium in the main scanning direction is character-containing data, the character-containing data continuously exceeds a preset value within a predetermined range in the sub-scanning direction. A center value is calculated from the lower limit value and the upper limit value of the data with characters of the group, and the line where the center value is located is determined as the last printed line. According to a second aspect of the present invention, in the first aspect, when a group that is continuous with a predetermined value or more of the data with characters is detected, in the group,
When the interruption of the character-containing data is equal to or smaller than a predetermined value, it is determined that the character-containing data is continuous. According to a third aspect of the present invention, an optical reading unit that scans a medium and optically reads a printed line of the medium, determines a last printed line from an output of the optical reading unit, and determines a last printed line next to the last printed line. A final printed line determination method for a medium processing apparatus having a control unit that performs printing from a line, wherein a character arrangement direction of the medium is a main scanning direction, a line arrangement direction is a sub-scanning direction, and a character-containing portion of the medium is provided. In the case where the data of the pixels with characters obtained by scanning in the main scanning direction is the data with characters, the predetermined number of the groups of the pixels with character are within a predetermined range in the main scanning direction. Preferably, the line in the main scanning direction is determined to be the character-present data, and the last printed line is determined based on the character-present data.

【0022】[0022]

【作用】本発明の媒体処理装置の最終印字済行判定方法
は、例えば第1の発明では、媒体の文字配列方向を主走
査方向、行配列方向を副走査方向とし、文字有り部の主
走査方向への走査で得られるデータを文字有りデータと
した場合、先ず、副走査方向の所定の範囲内における文
字有りデータの連続するグループを検出する。次に、検
出されたグループの下限値と上限値から中心値を算出
し、この中心値の位置する行を最終印字済行と判定す
る。従って、印字位置ずれや印字かすれ等があっても媒
体の最終印字済行を正確に判定することができ、その結
果、次行印字で行飛び等が生じるのを防止することがで
きる。
According to the first invention, for example, in the first invention, the character arrangement direction of the medium is the main scanning direction, the line arrangement direction is the sub-scanning direction, and the main scanning of the portion with characters is performed. When data obtained by scanning in the direction is data with characters, first, a continuous group of data with characters within a predetermined range in the sub-scanning direction is detected. Next, a center value is calculated from the detected lower limit value and upper limit value of the group, and the line where the center value is located is determined as the last printed line. Therefore, the last printed line of the medium can be accurately determined even if the printing position is shifted or the printing is blurred, and as a result, line skipping or the like in the next line printing can be prevented.

【0023】[0023]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。図1は本発明の第1の実施例としての媒体処
理装置の最終印字済行判定方法の説明図である。図中、
黒丸・白丸は、図6、8に示した従来の場合と同様に、
それぞれ1ライン(主走査方向)の白/黒判定結果から
黒と判定された部分(印字有りデータ部分)および白と
判定された部分(印字無しデータ部分)である。また、
光学式頁・行読取ユニット3におけるデータの検出方法
や制御部7におけるデータの白黒判定手順は従来と同様
であるため、ここでの詳細な説明は省略する。更に、図
中nは、予め規定された行検出を行うために最低限必要
な黒データの連続の個数であり、n個以上の黒データの
連続を副走査方向の1グループと呼ぶことにする。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is an explanatory diagram of a final printed line determination method of a medium processing apparatus according to a first embodiment of the present invention. In the figure,
Black and white circles are similar to the conventional case shown in FIGS.
These are a portion determined as black (data portion with print) and a portion determined as white (data portion without print) from the white / black determination result of one line (main scanning direction). Also,
The method for detecting data in the optical page / line reading unit 3 and the procedure for determining whether data is black and white in the control unit 7 are the same as those in the related art, and a detailed description thereof is omitted. Further, in the figure, n is the minimum number of consecutive black data required to perform a predetermined line detection, and the consecutive n or more black data is referred to as one group in the sub-scanning direction. .

【0024】次に、上記実施例の解析方法をフローチャ
ートに沿って説明する。図9、10にその行解析のフロ
ーチャートを示す。最初に、黒データの連続するグルー
プが複数有る図1(a)の場合を例にとって説明する。
先ず、図1(a)の範囲A、図9のステップS1からS
8に示すように、黒データが連続する第1のグループを
検出する。即ち、行解析を行う場合、最初にスタート値
レジスタとエンド値レジスタをクリアする(ステップS
1,2)。このスタート値レジスタおよびエンド値レジ
スタは制御部7内に設けられ(図示省略)、スタート値
レジスタは、第1のグループAの最初の黒データの値α
をストアするレジスタ、エンド値レジスタは、最後のグ
ループB(図1(a)の場合)の黒データの値βをスト
アするレジスタである。尚、本実施例でも、解析する方
向は図1の下から行うものとする。次いで、1ラインの
白/黒データ取り出しを行い(ステップS3)、この1
ライン分の白/黒データ判定を行う(ステップS4)。
この判定で白データであった場合はステップS1に戻
り、上述した処理を繰り返し行う。また、黒データであ
った場合は、スタート値レジスタが0であるか否か、即
ち行解析を開始してから黒データがまだストアされてい
ないかを判定し(ステップS5)、ストアされていない
場合は、スタート値レジスタにαをストアする(ステッ
プS6)。そして、黒データカウンタ(KCT)を一つ
カウントアップし(ステップS7)、この黒データカウ
ンタの値がn個であるかを判断する(ステップS8)。
ここで、黒データカウンタの値がn個に満たない場合
は、上述したステップS3の1ライン白/黒データ取り
出し処理からのステップを繰り返し行う。以上で、第1
のグループAの検出が行われる(図1(a)のの処理
に対応している)。
Next, the analysis method of the above embodiment will be described with reference to flowcharts. 9 and 10 show flowcharts of the row analysis. First, the case of FIG. 1A in which there are a plurality of continuous groups of black data will be described as an example.
First, a range A in FIG. 1A, steps S1 to S in FIG.
As shown in FIG. 8, a first group of continuous black data is detected. That is, when performing row analysis, first, the start value register and the end value register are cleared (step S
1,2). The start value register and the end value register are provided in the control unit 7 (not shown), and the start value register stores the value α of the first black data of the first group A.
And the end value register is a register for storing the value β of the black data of the last group B (in the case of FIG. 1A). In this embodiment, the analysis is performed from the bottom of FIG. Next, one line of white / black data is extracted (step S3).
The white / black data determination for the line is performed (step S4).
If the data is white data in this determination, the process returns to step S1, and the above-described processing is repeated. If the data is black data, it is determined whether or not the start value register is 0, that is, whether or not the black data has been stored yet after starting the row analysis (step S5). In this case, α is stored in the start value register (step S6). Then, the black data counter (KCT) is counted up by one (step S7), and it is determined whether the value of the black data counter is n (step S8).
Here, when the value of the black data counter is less than n, the steps from the one-line white / black data extraction processing in step S3 described above are repeated. With the above, the first
Is detected (corresponding to the processing in FIG. 1A).

【0025】その後、黒データカウンタの値がn個であ
った場合は、ポインタの値をnとする(ステップS
9)。尚、このポインタは、第1のグループAから戻る
量をカウントするポインタである。更に、黒データカウ
ンタをクリアし(ステップS10)、上述したステップ
S3と同様に1ライン白/黒データ取り出しを行う(ス
テップS11)。次に、ポインタの値が18になってい
るか否かを判定し(ステップS12)、18になってい
ない場合はポインタの値を一つカウントアップし(ステ
ップS13)、次の白/黒判定を行う(ステップS1
4)。ここでポインタの値が18であるか否かの判定と
は、最初の黒データの値αから予め規定された値である
18個戻る処理(図1において上方向に移動する処理
)を行うことを意味している。
Thereafter, when the value of the black data counter is n, the value of the pointer is set to n (step S).
9). Note that this pointer is a pointer that counts the amount returned from the first group A. Further, the black data counter is cleared (step S10), and one line of white / black data is extracted similarly to step S3 described above (step S11). Next, it is determined whether or not the value of the pointer is 18 (step S12). If not, the value of the pointer is incremented by one (step S13), and the next white / black determination is performed. Perform (Step S1
4). Here, the determination as to whether or not the value of the pointer is 18 is to perform a process of returning a predetermined value of 18 from the value α of the first black data (a process of moving upward in FIG. 1). Means

【0026】ステップS14の白/黒判定で、黒データ
が検出された場合は黒データカウンタを一つカウントア
ップし(ステップS15)、この黒データカウンタの値
がn個になるまで、ステップS11の1ライン白/黒デ
ータ取り出しからの処理を繰り返し行う(ステップS1
6)。このステップS16において、黒データがn個に
なった場合は、エンド値レジスタにn個目の値βをセッ
トし(ステップS17)、ステップS10に戻る。ま
た、ステップS14の白/黒判定で白データが検出され
た場合もステップS10に戻る。以上、ステップS14
〜17の処理により、第2のグループBを検出する処理
が行われる(図1(a)中、の処理に対応する)。
If black data is detected in the white / black determination in step S14, the black data counter is incremented by one (step S15). Until the value of the black data counter becomes n, the process proceeds to step S11. The processing from one line white / black data extraction is repeated (step S1).
6). If the number of black data becomes n in step S16, the n-th value β is set in the end value register (step S17), and the process returns to step S10. Also, when white data is detected in the white / black determination in step S14, the process returns to step S10. Step S14
The processing of detecting the second group B is performed by the processing of to 17 (corresponding to the processing in FIG. 1A).

【0027】そして、上記ステップS12において、ポ
インタの値が18になった場合、即ち、αから18個戻
った場合、その時点の黒データの最後の値βをエンド値
レジスタにストアし(ステップS18)、スタート値レ
ジスタの値αとエンド値レジスタの値βから中心(α+
β/2)を求める(ステップS19)。そして、この中
心値α+β/2の位置する行を印字済行と判定する(ス
テップS20)。これが図1(a)のの処理に対応す
る。
If the value of the pointer becomes 18 in step S12, that is, if it returns 18 from α, the last value β of the black data at that time is stored in the end value register (step S18). ), The center (α +) from the value α of the start value register and the value β of the end value register
β / 2) is obtained (step S19). Then, the line at which the center value α + β / 2 is located is determined as a printed line (step S20). This corresponds to the processing in FIG.

【0028】尚、図1(a)では、グループの数が2個
の場合を示しているが、18個戻る規定範囲内に3個以
上のN個のグループが存在した場合には、1番目のグル
ープの最初の黒データの値αと、N番目のグループの最
後の黒データの値βとから、複数のグループの中心値
(α+β/2)を算出し、この中心値から印字済行を判
定する。
FIG. 1A shows a case where the number of groups is two. However, if there are three or more N groups within the specified range in which 18 groups are returned, the first group is first. The center value (α + β / 2) of a plurality of groups is calculated from the value α of the first black data of the group and the value β of the last black data of the N-th group, and the printed line is determined from the center value. judge.

【0029】次に、規定範囲内に連続するグループが一
つしかない図1(b)の場合を説明する。この場合、前
述した図9、10のフローチャートに沿って説明する
と、スタート値レジスタに値α′がストアされるが、連
続する黒データの個数がn個未満であるため、この部分
は無視される。そして、次のグループの最初の黒データ
の値αがストアされ、この部分は、黒データがn個以上
連続するため第1のグループとなる(図中)。その後
は、上述した処理と同様に、グループの検出が行われる
が、このαから18個戻った中に黒データの連続部分が
検出されないため(図中,)、一つのグループの下
限値αと上限値βとから中心値(α+β/2)を算出す
る(図中)。そして、この中心値の位置する行を印字
済行と判定する。
Next, the case of FIG. 1B in which there is only one continuous group within the specified range will be described. In this case, according to the flowcharts of FIGS. 9 and 10 described above, the value α ′ is stored in the start value register. However, since the number of continuous black data is less than n, this portion is ignored. . Then, the value α of the first black data of the next group is stored, and this portion becomes the first group because n or more black data are continuous (in the figure). Thereafter, the group is detected in the same manner as in the above-described processing. However, since the continuous portion of the black data is not detected during the return of 18 from α (in the figure), the lower limit value α of one group is A central value (α + β / 2) is calculated from the upper limit value β (in the figure). Then, the line in which the center value is located is determined as a printed line.

【0030】また、上記解析処理で、最初の連続の黒デ
ータαから戻る値が18個である意味としては、通常印
字文字1文字の上下方向の長さが28個分のデータに相
当するため、下からおよそ半分の位置まで解析すること
を考えると、28/2+a(aは所定の定数)の値とし
て18個としたものである。従って、この18個という
値は固定されたものではなく、また、この18個という
値や、n等の数値を変化させることで、印字パターン、
印字位置ずれ、印字かすれ等に対する印字済行解析のマ
ージンを増加させることが可能となる。
In the above analysis processing, the value returned from the first continuous black data α is 18 meaning that the length of one normal printing character in the vertical direction is equivalent to 28 data. Considering that the analysis is performed from the bottom to about a half position, the value of 28/2 + a (a is a predetermined constant) is set to 18 values. Therefore, the value of 18 is not fixed, and by changing the value of 18 or a numerical value such as n, the print pattern,
It is possible to increase the margin of the printed line analysis for the printing position deviation, the printing blur, and the like.

【0031】次に、第2の実施例を説明する。図11
は、第2の実施例の説明図である。この実施例では、黒
データ検出後の白データが予め設定した値未満であれ
ば、黒データが連続していると判定するようにしたもの
である。また、図中、黒丸・白丸は、上記実施例と同様
に、それぞれ1ライン(主走査方向)の白/黒判定結果
から黒と判定された部分(印字有りデータ部分)および
白と判定された部分(印字無しデータ部分)を示し、更
に、光学式頁・行読取ユニット3におけるデータの検出
方法や制御部7におけるデータの白黒判定手順も従来と
同様であるため、ここでの詳細な説明は省略する。ここ
で、nは、上記実施例と同様に、予め規定された行検出
を行うために最低限必要な黒データの連続の個数であ
り、n個以上の黒データの連続を副走査方向の1グルー
プと呼ぶ。また、mは黒データと黒データとの間に白デ
ータが有っても黒データの連続が途切れたと見なさない
白データの値とする。即ち、m個未満の白データの連続
は無視され、黒データの連続としてグループに数えられ
る。尚、この実施例では、説明上、n=4、m=3とす
る。
Next, a second embodiment will be described. FIG.
FIG. 4 is an explanatory diagram of the second embodiment. In this embodiment, if white data after black data detection is less than a preset value, it is determined that black data is continuous. In the drawing, black circles and white circles are determined to be black (data portion with print) and white from the white / black determination result of one line (main scanning direction), respectively, as in the above embodiment. A portion (data portion without printing) is shown, and a method for detecting data in the optical page / line reading unit 3 and a procedure for determining whether data is black and white in the control section 7 are the same as those in the related art. Omitted. Here, n is the minimum number of black data continuations necessary for performing a predetermined line detection, similarly to the above-described embodiment, and n or more continuations of black data are set to 1 in the sub-scanning direction. Call a group. In addition, m is a value of white data that is not regarded as a continuation of black data even if white data exists between the black data. That is, the continuation of white data of less than m is ignored, and is counted as a continuation of black data in the group. In this embodiment, n = 4 and m = 3 for explanation.

【0032】次に、上記第2の実施例の解析方法をフロ
ーチャートに沿って説明する。図12、13に、その行
解析のフローチャートを示す。ここでも、上記実施例と
同様に図11(a)の場合を最初に説明する。先ず、図
12のステップS1からS6に示すように、最初の黒デ
ータを検出する。即ち、行解析を行う場合、最初にポイ
ンタ、黒データカウンタ(KCT)および白データカウ
ンタ(SCT)をクリアする(ステップS1,2,
3)。次いで、1ラインの白/黒データ取り出しを行い
(ステップS4)、この1ライン分の白/黒データ判定
を行う(ステップS5)。この判定で白データであった
場合はステップS1に戻り、上述した処理を繰り返し行
う。また、黒データであった場合は、スタート値レジス
タに値αをストアする(ステップS6)。
Next, an analysis method according to the second embodiment will be described with reference to a flowchart. 12 and 13 show flowcharts of the row analysis. Here, as in the above embodiment, the case of FIG. 11A will be described first. First, as shown in steps S1 to S6 in FIG. 12, first black data is detected. That is, when performing row analysis, first, the pointer, the black data counter (KCT), and the white data counter (SCT) are cleared (steps S1, S2, and S3).
3). Next, white / black data of one line is extracted (step S4), and white / black data of this one line is determined (step S5). If the data is white data in this determination, the process returns to step S1, and the above-described processing is repeated. If the data is black data, the value α is stored in the start value register (step S6).

【0033】次に、ステップS7〜S15に示すよう
に、黒データのn個の連続(第1のグループ)を検出す
る。先ず、ポインタの値および黒データカウンタの値を
1とし(ステップS7、8)、上記ステップS4、S5
と同様に1ライン白/黒データ取り出しおよび白/黒デ
ータ判定を行う(ステップS9、S10)。ここで、白
データが検出された場合、白データカウンタを一つカウ
ントアップし(ステップS11)、この白データカウン
タの値がmであるか否かを判定する(ステップS1
2)。判定の結果、mでなければ黒データカウンタおよ
びポインタを一つカウントアップする(ステップS1
3、14)。そして、このような処理を黒データカウン
タの値がnになるまで行う(ステップS15)。例え
ば、図11(a)の場合、最初の黒データα検出後の白
データは1個であるため無視され、黒データが連続して
いると見なされる。
Next, as shown in steps S7 to S15, n consecutive black data (first group) are detected. First, the value of the pointer and the value of the black data counter are set to 1 (steps S7 and S8), and the above steps S4 and S5
In the same manner as described above, one line white / black data extraction and white / black data determination are performed (steps S9 and S10). Here, when white data is detected, the white data counter is incremented by one (step S11), and it is determined whether or not the value of the white data counter is m (step S1).
2). If the result of the determination is not m, the black data counter and pointer are incremented by one (step S1).
3, 14). Then, such processing is performed until the value of the black data counter becomes n (step S15). For example, in the case of FIG. 11A, the number of white data after the first detection of the black data α is one, so that the white data is ignored and is regarded as continuous black data.

【0034】次いで、黒データカウンタの値がn個に達
した場合(ステップS15)、上記実施例の場合と同様
に第2のグループを検出する。先ず、上記第1のグルー
プ検出時と同様に、黒データカウンタ、白データカウン
タをクリアし(ステップS16、17)、1ラインの白
/黒データ取り出しを行うと共に(ステップS18)、
ポインタの値が18になっているか否かを判断する(ス
テップS19)。ポインタの値が18でない場合は、デ
ータの白/黒判定を行い(ステップS20)、黒データ
であった場合は、黒データカウンタを一つカウントアッ
プし(ステップS21)、更に1ライン白/黒データ取
り出しを行う(ステップS22)。その後は、上述した
第1のグループ検出時と同様に、検出データの白/黒判
断を行い(ステップS23)、そのデータが白であった
場合は、白データカウンタを一つカウントアップし(ス
テップS24)、このカウント値がmにならなければ
(ステップS25)黒データカウンタをカウントアップ
する(ステップS26)。次いで、ポインタの値が18
になっているかを判定し(ステップS27)、18にな
っていなければ、その値をカウントアップし(ステップ
S28)、黒データカウンタの値がnであるかを判定す
る(ステップS29)。ここで、黒データカウンタの値
がnになっていなければ、ステップS22に戻り、ポイ
ンタの値が18になるまで黒データのグループの検出を
行う。黒データカウンタの値がnになった場合は第2の
グループの最後の黒データの値βをエンド値レジスタに
ストアし(ステップS30)、ステップS16に戻る。
また、上記の処理でポインタの値が18になった場合は
(ステップS19、27)、それまでのグループの最後
の黒データの値βをエンド値レジスタにストアする(ス
テップS31)。
Next, when the value of the black data counter has reached n (step S15), the second group is detected as in the above embodiment. First, as in the case of the first group detection, the black data counter and the white data counter are cleared (steps S16 and S17), and one line of white / black data is extracted (step S18).
It is determined whether or not the value of the pointer is 18 (step S19). If the value of the pointer is not 18, white / black determination of the data is performed (step S20). If the data is black data, the black data counter is counted up by one (step S21), and one line white / black is further determined. Data is extracted (step S22). Thereafter, similarly to the above-described first group detection, white / black determination of the detected data is performed (step S23). If the data is white, the white data counter is counted up by one (step S23). S24) If this count value does not reach m (step S25), the black data counter is counted up (step S26). Next, when the value of the pointer is 18
Is determined (step S27), and if it is not 18, the value is counted up (step S28), and it is determined whether the value of the black data counter is n (step S29). If the value of the black data counter is not n, the process returns to step S22, and the group of black data is detected until the value of the pointer becomes 18. When the value of the black data counter becomes n, the value β of the last black data of the second group is stored in the end value register (step S30), and the process returns to step S16.
When the value of the pointer becomes 18 in the above processing (steps S19 and S27), the value β of the last black data of the group up to that point is stored in the end value register (step S31).

【0035】その後は、上記第1の実施例の場合と同様
にスタート値α、エンド値βから中心値α+β/2を求
め(ステップS32)、この中心値の位置する行を印字
済行と判定する(ステップS33)。即ち、図11
(a)の第2番目のグループBにおいても、黒データ以
降の白データは3個未満であるため、この白データは無
視され、黒データの連続として見なされる。
Thereafter, as in the case of the first embodiment, a center value α + β / 2 is obtained from the start value α and the end value β (step S32), and the line where the center value is located is determined as a printed line. (Step S33). That is, FIG.
Also in the second group B of (a), since the number of white data after the black data is less than three, the white data is ignored and regarded as a continuation of the black data.

【0036】次に、規定範囲内に連続するグループが一
つしかない図11(b)の場合を説明する。この場合に
おいても、図11(a)と同様に第1のグループの検出
が行われるが(図中)、18個戻った中にn個以上の
連続がないため(図中、,)、第1のグループのス
タート値αとエンド値βとにより中心値が求められる
(図中、)。即ち、第1のグループ検出以降の黒デー
タは2つあり、かつこれら黒データ間の白データは1個
であるため黒データカウンタの値は2個となる(ステッ
プS29)。しかしながら、それ以降のデータは白デー
タが連続するため、白データカウンタの値が3個となり
(ステップS25)、更に白データが連続するためポイ
ンタの値が18となる(ステップS19)。従って、第
1のグループの最後の黒データの値βにより中心値を求
める。
Next, the case of FIG. 11B in which there is only one continuous group within the specified range will be described. In this case as well, the detection of the first group is performed in the same manner as in FIG. 11A (in the figure). The center value is obtained from the start value α and the end value β of one group (in the figure). That is, since there are two black data after the first group detection and one white data between these black data, the value of the black data counter becomes two (step S29). However, since the subsequent data is continuous white data, the value of the white data counter is three (step S25), and the pointer value is 18 because white data is continuous (step S19). Therefore, the center value is obtained from the value β of the last black data of the first group.

【0037】このように、上記第2の実施例では、黒デ
ータの所定値以下の途切れは黒データの連続と見なすた
め、僅かの印字かすれがあった場合でも正確な印字済行
の判定を行うことができる。
As described above, in the second embodiment, the interruption of the black data below a predetermined value is regarded as the continuation of the black data. Therefore, even if there is a slight blurring of the print, the printed line is accurately determined. be able to.

【0038】次に、第3の実施例として、主走査方向の
白/黒データ判定の実施例を説明する。図14は、第3
の実施例の説明図である。ここで、先ず(a)の通常の
印字例の場合から説明する。図において、CCDセンサ
14は、複数の画素14a、14b、14c…を有して
いる。また、 201は通帳100の中紙102 に印字された印
字であり、 202が読取位置を示している。そして、読取
位置202 をCCDセンサ14で読取った時の出力波形を
203 に示し、白/黒判定を行うために、出力波形を白と
黒とに切り分けるためのスライスレベルを204 示す。更
に、 205はスライスレベル204 にて切り分けられた白と
黒を示す波形で、ハイレベルは黒、ロウレベルは白を示
している。 206は、CCDセンサ14の各画素14a、
14b、14c…の出力を取出すためのシフトクロック
であり1画素に対して1クロック出力され、 207は画素
に対応した黒画素データを示している。更に、 208は、
黒画素データ207 のカウント値を示している。
Next, as a third embodiment, an embodiment for determining white / black data in the main scanning direction will be described. FIG.
FIG. 4 is an explanatory diagram of the embodiment. Here, the case of the normal printing example (a) will be described first. In the figure, the CCD sensor 14 has a plurality of pixels 14a, 14b, 14c. Reference numeral 201 denotes printing printed on the inner paper 102 of the passbook 100, and reference numeral 202 denotes a reading position. The output waveform when the reading position 202 is read by the CCD sensor 14 is
Reference numeral 203 denotes a slice level for separating the output waveform into white and black for performing white / black determination. Further, reference numeral 205 denotes a waveform indicating white and black separated at the slice level 204, with the high level indicating black and the low level indicating white. 206 is each pixel 14a of the CCD sensor 14,
Are shift clocks for extracting the outputs of 14b, 14c,..., And one clock is output for one pixel. Reference numeral 207 denotes black pixel data corresponding to the pixel. In addition, 208
The count value of the black pixel data 207 is shown.

【0039】また、(b)は通常印字以外の汚れの場合
であり、上記(a)の場合と同様に、 301は汚れ、 302
は読取位置、 303はCCDセンサ14の出力波形、 304
はスライスレベル、 305は白/黒判定波形、 306はシフ
トクロック、 307は黒画素データ、 308は黒画素データ
307 のカウント値を示している。
(B) shows the case of stains other than the normal printing. Similar to the above (a), 301 is a stain and 302 is a stain.
Is the reading position, 303 is the output waveform of the CCD sensor 14, 304
Is a slice level, 305 is a white / black determination waveform, 306 is a shift clock, 307 is black pixel data, 308 is black pixel data
307 is shown.

【0040】次に上記第3の実施例の白/黒判定方法を
説明する。図15は、その白/黒判定方法のフローチャ
ートである。ここで、nは黒画素(画素に対応した黒デ
ータ)の連続数を規定した値であり、nCTはこの連続
数をカウントするカウンタである。また、Nは黒画素デ
ータのグループ数を規定した値であり、この黒画素グル
ープがN個以上あった場合にその読取った1ラインを黒
と判定する値である。NCTはこの黒画素グループの数
をカウントするカウンタである。
Next, a description will be given of a white / black determination method according to the third embodiment. FIG. 15 is a flowchart of the white / black determination method. Here, n is a value that defines the number of continuations of black pixels (black data corresponding to the pixels), and nCT is a counter that counts this number of continuations. N is a value defining the number of groups of black pixel data, and when there are N or more black pixel groups, one read line is determined to be black. NCT is a counter for counting the number of the black pixel groups.

【0041】1ラインの白/黒判定を行う場合、先ず黒
画素カウンタnCT、黒画素グループカウンタNCTを
クリアする(ステップS1,2)。次に、規定の範囲は
終了していないため(ステップS3)、1画素の取出し
を行い(ステップS4)、この白/黒判定を行う(ステ
ップS5)。白/黒判定の結果が黒であった場合は、黒
画素カウンタnCTをカウントアップし(ステップS
6)、白であった場合はステップS2に戻って黒画素カ
ウンタnCTをクリアする。そして、黒画素カウンタn
CTの値がnであるかを判定し(ステップS7)、n以
上またはn以下である場合はステップS3に戻って1画
素の取出し処理を継続する。即ち、黒画素カウンタnC
T=nになる前に白画素データがある場合、黒画素カウ
ンタnCTはクリアされ、n個以下の黒画素データは無
視されることになる。
When performing the white / black determination of one line, first, the black pixel counter nCT and the black pixel group counter NCT are cleared (steps S1 and S2). Next, since the specified range is not completed (step S3), one pixel is extracted (step S4), and the white / black determination is performed (step S5). If the result of the white / black determination is black, the black pixel counter nCT is counted up (step S).
6) If it is white, the process returns to step S2 to clear the black pixel counter nCT. And a black pixel counter n
It is determined whether the value of CT is n (step S7). If the value is not less than n or not more than n, the process returns to step S3 to continue the process of taking out one pixel. That is, the black pixel counter nC
If there is white pixel data before T = n, the black pixel counter nCT is cleared, and n or less black pixel data is ignored.

【0042】ステップS7において、黒画素カウンタn
CT=nになると黒画素グループカウンタNCTはカウ
ントアップされ(ステップS8)、その後、これがN個
になったか否かが判定される(ステップS9)。黒画素
グループカウンタNCTの値がN個にならない場合は、
ステップS3に戻って上記の1画素ずつの取出しを行
う。従って、この場合は次の白画素データがあるまで黒
画素データは無視されることになる。即ち、黒画素デー
タによって黒画素カウンタnCTの値はカウントアップ
されるが(ステップS6)、nCT>nであるため、黒
画素データが続く限りはステップS3〜S7の処理を繰
り返して行うだけである。また、このような処理によっ
て規定の範囲が終了した場合(ステップS3)は、その
1ラインは白と判定される。即ち、規定範囲内が全て黒
画素データであった場合等は、その1ラインの読取り結
果は白となる。このように、順次画素データを取出し
て、白/黒判定を行い、黒画素カウンタnCTがn、黒
画素グループカウンタNCTがNの値を満たした場合の
み、その1ラインの読取り結果を黒と判定する。
In step S7, the black pixel counter n
When CT = n, the black pixel group counter NCT is counted up (step S8), and thereafter, it is determined whether or not the number becomes N (step S9). If the value of the black pixel group counter NCT does not reach N,
Returning to step S3, the above-described pixel-by-pixel extraction is performed. Therefore, in this case, the black pixel data is ignored until there is the next white pixel data. That is, the value of the black pixel counter nCT is counted up by the black pixel data (step S6), but since nCT> n, as long as the black pixel data continues, the processes of steps S3 to S7 are simply repeated. . In addition, when the specified range ends by such processing (step S3), the one line is determined to be white. That is, for example, when the black pixel data is entirely within the specified range, the reading result of one line is white. As described above, the pixel data is sequentially extracted and white / black determination is performed. Only when the black pixel counter nCT satisfies the value n and the black pixel group counter NCT satisfies the value N, the read result of one line is determined as black. I do.

【0043】例えば、図14における(a)の場合で説
明する。ここで上記のn、Nをn=2、N=3とする
と、黒画素データ207 のカウント値208 は、2、3、2
であり、2画素以上連続の黒画素グループは3個あるた
め、1ライン黒と判定される。しかしながら、(b)の
場合は、黒画素データ307 のカウント値308 は7で、上
記値nを満たすが、黒画素グループ数は1個であるた
め、規定の数Nを満たさず、この場合は1ライン黒とは
判定されない。即ち、通常の印字であれば、1ライン上
の規定範囲内には必ず連続した黒画素データのグループ
が複数存在するが、汚れや単なる鉛筆等の書き込みでは
1ライン上に複数の黒画素グループが存在することは稀
だからである。
For example, the case of FIG. 14A will be described. Here, assuming that n and N are n = 2 and N = 3, the count value 208 of the black pixel data 207 is 2, 3, 2
Since there are three black pixel groups that are continuous with two or more pixels, it is determined that one line is black. However, in the case of (b), the count value 308 of the black pixel data 307 is 7, which satisfies the above value n, but the number of black pixel groups is 1, so that the prescribed number N is not satisfied. It is not determined that one line is black. That is, in normal printing, a plurality of groups of continuous black pixel data always exist within a specified range on one line, but in the case of writing with a dirt or a simple pencil or the like, a plurality of black pixel groups are formed on one line. Because it is rarely present.

【0044】尚、上記値n、Nは、印字済行読取りパタ
ーン、例えば日付欄の数字印字、残高欄のアスタリスク
印字、日付欄のハイフォン印字等によって、個々に設定
可能とし、それぞれの印字字体の太さや印字済行検出の
ための文字数により適切な値に設定することが可能であ
る。また、上記第3の実施例における白/黒判定処理
は、制御部7で行われるが、これを実現するには、白/
黒判定回路18にて回路的に構成する手段と、中央処理
装置17にてプログラム的に実施する手段があり、いず
れの手段であっても同様の効果を奏する。
The values n and N can be individually set by a printed line reading pattern, for example, a numeral print in the date column, an asterisk print in the balance column, a hyphen print in the date column, and the like. An appropriate value can be set according to the thickness and the number of characters for detecting a printed line. The white / black determination processing in the third embodiment is performed by the control unit 7. To realize this, the white / black determination processing is performed.
There are means configured as a circuit in the black determination circuit 18 and means implemented as a program in the central processing unit 17, and any of the means has the same effect.

【0045】尚、上記各実施例では、媒体処理装置とし
て通帳記帳装置を例にとり、かつ印字済行を判定する媒
体を通帳としたが、このような構成に限定されるもので
はなく、媒体として単票や帳票等でも同様の効果を奏
し、かつ媒体処理装置においても媒体の印字済行を光学
的の読取る構成を備えたものであれば、どの様な媒体処
理装置であってもよい。また、上記第1、2の実施例で
は、中心値の算出を下限値から上限値までの1/2 とした
が、この値に限定されるものでなく、例えば、ある程度
下限値または上限値側に偏った値にする等、適宜選択が
可能である。
In each of the above embodiments, a passbook entry device is taken as an example of a medium processing device, and a medium passbook for determining printed lines is used. However, the present invention is not limited to such a configuration. Any type of media processing device may be used as long as the same effect can be obtained for a single form or a form, and the media processing device has a configuration for optically reading a printed line of a medium. In the first and second embodiments, the calculation of the center value is set to 1/2 of the lower limit to the upper limit. However, the present invention is not limited to this value. The value can be selected as appropriate, for example, a value biased toward.

【0046】[0046]

【発明の効果】以上説明したように、本発明の媒体処理
装置の最終印字済行判定方法によれば、第1の発明で
は、媒体の文字配列方向を主走査方向、行配列方向を副
走査方向とした場合、副走査方向の所定の範囲内に、予
め設定した文字有りデータのグループがあった場合、そ
の下限値と上限値から中心値を算出し、この中心値の位
置する行を最終印字済行と判定するようにしたので、媒
体に印字ずれや印字かすれがあっても最終印字済行を正
確に検出できる。従って、次行印字で行飛び等を生じる
こともなく、信頼性の高い媒体処理装置を提供すること
が可能となる。また、第2の発明においては、文字有り
データのグループ中、所定値以下の途切れは無視するよ
うにしたので、僅かな印字かすれがあった場合等でも正
確な印字済行判定が行え、特にハイフォンマーク等の印
字部分の少ないデータでの印字済行判定でも正確な印字
済行判定を行うことができる。更に、第3の発明におい
ては、主走査方向の読取りにおいて、所定数連続した文
字有り画素のグループが所定個数あった場合に、その主
走査方向のラインを文字有りデータと判定するようにし
たので、汚れ等による印字済行の誤解析を防止すること
ができ、従って、次行印字での行飛び等を防止すること
ができる。
As described above, according to the method for determining the last printed line of the medium processing apparatus of the present invention, in the first invention, the character arrangement direction of the medium is the main scanning direction, and the line arrangement direction is the sub-scanning direction. In the case where the direction is set to the direction, if there is a group of data with characters set in a predetermined range in the sub-scanning direction, a center value is calculated from the lower limit value and the upper limit value, and the line in which the center value is located is finally set. Since it is determined that the line is a printed line, the final printed line can be accurately detected even if the medium is misaligned or printed. Therefore, it is possible to provide a highly reliable medium processing apparatus without causing line skipping or the like in the next line printing. Further, in the second invention, in the group of character-containing data, breaks of a predetermined value or less are ignored, so that even when there is slight printing fading, accurate printed line determination can be performed. Accurate printed line determination can be performed even with printed line determination using data with a small number of printed portions such as marks. Further, in the third invention, in the reading in the main scanning direction, when a predetermined number of consecutive groups of pixels with characters are present in a predetermined number, the line in the main scanning direction is determined to be data with characters. In addition, it is possible to prevent erroneous analysis of a printed line due to dirt or the like, and thus to prevent line skipping in the next line printing.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の媒体処理装置の最終印字済行判定方法
における第1の実施例の説明図である。
FIG. 1 is an explanatory diagram of a first embodiment in a method of determining a finally printed line in a medium processing apparatus according to the present invention.

【図2】媒体処理装置の構成図である。FIG. 2 is a configuration diagram of a medium processing apparatus.

【図3】通帳の斜視図である。FIG. 3 is a perspective view of a passbook.

【図4】頁・行読取方式の説明図である。FIG. 4 is an explanatory diagram of a page / line reading method.

【図5】媒体処理装置における白黒判定の説明図であ
る。
FIG. 5 is an explanatory diagram of black / white determination in the medium processing device.

【図6】従来の行解析の説明図である。FIG. 6 is an explanatory diagram of a conventional row analysis.

【図7】従来の行解析のフローチャートである。FIG. 7 is a flowchart of a conventional row analysis.

【図8】印字位置ずれおよび印字かすれが発生した場合
の白黒判定の説明図である。
FIG. 8 is an explanatory diagram of black-and-white determination when a print position shift and a print blur occur.

【図9】本発明の媒体処理装置の最終印字済行判定方法
における第1の実施例の行解析のフローチャートであ
る。
FIG. 9 is a flowchart of the line analysis of the first embodiment in the method of determining the last printed line in the medium processing apparatus of the present invention.

【図10】本発明の媒体処理装置の最終印字済行判定方
法における第1の実施例の行解析のフローチャートであ
る。
FIG. 10 is a flowchart of the line analysis of the first embodiment in the method of determining the last printed line in the medium processing apparatus of the present invention.

【図11】本発明の媒体処理装置の最終印字済行判定方
法における第2の実施例の説明図である。
FIG. 11 is an explanatory view of a second embodiment of the method for determining the last printed line of the medium processing apparatus according to the present invention.

【図12】本発明の媒体処理装置の最終印字済行判定方
法における第2の実施例の行解析のフローチャートであ
る。
FIG. 12 is a flowchart of a line analysis of a second embodiment in the method of determining a finally printed line in the medium processing apparatus of the present invention.

【図13】本発明の媒体処理装置の最終印字済行判定方
法における第2の実施例の行解析のフローチャートであ
る。
FIG. 13 is a flowchart of a line analysis of a second embodiment in the method of determining a finally printed line in the medium processing apparatus of the present invention.

【図14】本発明の媒体処理装置の最終印字済行判定方
法における第3の実施例の説明図である。
FIG. 14 is an explanatory diagram of a third embodiment of the final printed line determination method of the medium processing apparatus according to the present invention.

【図15】本発明の媒体処理装置の最終印字済行判定方
法における第3の実施例の解析フローチャートである。
FIG. 15 is an analysis flowchart of a third embodiment of the method for determining the last printed line in the medium processing apparatus of the present invention.

【符号の説明】[Explanation of symbols]

3 光学式頁・行読取ユニット 4 プリンタユニット 7 制御部 3 Optical page / line reading unit 4 Printer unit 7 Control unit

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) B41J 29/46 B41J 13/26 B41J 29/16──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) B41J 29/46 B41J 13/26 B41J 29/16

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 媒体を走査し、該媒体の印字済行を光学
的に読取る光学読取部と、前記光学読取部の出力から最
終印字済行を判定し、該最終印字済行の次の行から印字
を行う制御部とを備えた媒体処理装置の最終印字済行判
定方法において、前記媒体の文字配列方向を主走査方
向、行配列方向を副走査方向とし、かつ前記媒体の文字
有り部の主走査方向への走査で得られるデータを文字有
りデータとした場合、前記副走査方向の所定の範囲内
で、前記文字有りデータの予め設定された値以上連続す
るグループを検出し、そのグループの文字有りデータの
下限値と上限値から中心値を算出し、この中心値の位置
する行を最終印字済行と判定することを特徴とする媒体
処理装置の最終印字済行判定方法。
An optical reading unit that scans a medium and optically reads a printed line of the medium; a final printed line is determined from an output of the optical reading unit; and a line next to the final printed line is determined. And a control unit that performs printing from the final printed line determination method of the medium processing device, wherein the character arrangement direction of the medium is a main scanning direction, the line arrangement direction is a sub-scanning direction, and When the data obtained by scanning in the main scanning direction is data with characters, within a predetermined range in the sub-scanning direction, a group that is continuous with a predetermined value or more of the data with characters is detected, and the group of the group is detected. A final printed line determination method for a medium processing apparatus, wherein a center value is calculated from a lower limit value and an upper limit value of data with characters, and a line where the center value is located is determined as a last printed line.
【請求項2】 文字有りデータの予め設定された値以上
連続するグループを検出する場合、該グループ中、文字
有りデータの途切れが所定値以下の時は、文字有りデー
タが連続していると判断する請求項1記載の媒体処理装
置の最終印字済行判定方法。
2. When detecting a group in which data with characters continue at a predetermined value or more, if the interruption of the data with characters in the group is less than a predetermined value, it is determined that the data with characters is continuous. 2. The method according to claim 1, wherein the line is already printed.
【請求項3】 媒体を走査し、該媒体の印字済行を光学
的に読取る光学読取部と、前記光学読取部の出力から最
終印字済行を判定し、該最終印字済行の次の行から印字
を行う制御部とを備えた媒体処理装置の最終印字済行判
定方法において、前記媒体の文字配列方向を主走査方
向、行配列方向を副走査方向とし、かつ前記媒体の文字
有り部の主走査方向への走査で得られる文字有り画素の
データを文字有りデータとした場合、前記主走査方向の
規定範囲内で、所定数連続した前記文字有り画素のグル
ープが、所定個数あった場合に、その主走査方向のライ
ンを前記文字有りデータと判定し、前記文字有りデータ
に基づき、最終印字済行を判定することをを特徴とする
媒体処理装置の最終印字済行判定方法。
3. An optical reading unit that scans a medium and optically reads a printed line of the medium, a final printed line is determined from an output of the optical reading unit, and a line next to the final printed line is determined. And a control unit that performs printing from the final printed line determination method of the medium processing device, wherein the character arrangement direction of the medium is a main scanning direction, the line arrangement direction is a sub-scanning direction, and When the data of the character-existing pixels obtained by the scanning in the main scanning direction is the character-existing data, when a predetermined number of the groups of the character-existing pixels are in a predetermined number within the specified range in the main scanning direction, A line in the main scanning direction is determined to be the character-present data, and a final printed line is determined based on the character-present data.
JP3109726A 1991-04-15 1991-04-15 Method of determining the last printed line in the media processing device Expired - Fee Related JP2849781B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3109726A JP2849781B2 (en) 1991-04-15 1991-04-15 Method of determining the last printed line in the media processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3109726A JP2849781B2 (en) 1991-04-15 1991-04-15 Method of determining the last printed line in the media processing device

Publications (2)

Publication Number Publication Date
JPH04314572A JPH04314572A (en) 1992-11-05
JP2849781B2 true JP2849781B2 (en) 1999-01-27

Family

ID=14517677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3109726A Expired - Fee Related JP2849781B2 (en) 1991-04-15 1991-04-15 Method of determining the last printed line in the media processing device

Country Status (1)

Country Link
JP (1) JP2849781B2 (en)

Also Published As

Publication number Publication date
JPH04314572A (en) 1992-11-05

Similar Documents

Publication Publication Date Title
US4430563A (en) Data processing form
US9008431B2 (en) Character string extraction method and character string extraction device
JP2849781B2 (en) Method of determining the last printed line in the media processing device
JP3498653B2 (en) Mark entry field reading device for forms and method for reading the mark entry field
JP3116622B2 (en) Printed line detection method
JPS58211287A (en) Printing device of bankbook or the like
JP3381803B2 (en) Tilt angle detector
JP3564987B2 (en) Optical character reader
JPH07319997A (en) Method for detecting image and medium processor
JPS61179654A (en) Mark sheet for facsimile equipment
JP3334369B2 (en) Selection item recognition device
JPH01202472A (en) Detector for character and mark
JPH1148560A (en) Bankbook handling machine
JPH09185670A (en) Medium processor
JP2010114567A (en) Image reader having dirt detecting function
JP2999022B2 (en) Printed line judgment device
JPH09267531A (en) Printer equipped with position correcting function
JPH08129607A (en) Optical character recognizing method
JPS6137676B2 (en)
JPS5943319B2 (en) Passbook printing device
JPS60714B2 (en) Form printing device
JPH0793479A (en) Optical character reader
JPH0461395B2 (en)
JPH08161588A (en) Slip processor and method for deciding last printed line of slip
JPH0816703A (en) Medium processor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081113

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20081113

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091113

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20091113

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101113

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees