JPH064244A - Print format creation device - Google Patents

Print format creation device

Info

Publication number
JPH064244A
JPH064244A JP4160970A JP16097092A JPH064244A JP H064244 A JPH064244 A JP H064244A JP 4160970 A JP4160970 A JP 4160970A JP 16097092 A JP16097092 A JP 16097092A JP H064244 A JPH064244 A JP H064244A
Authority
JP
Japan
Prior art keywords
print
ruled line
horizontal ruled
unit
printable area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP4160970A
Other languages
Japanese (ja)
Other versions
JP2863671B2 (en
Inventor
Takaharu Iwasaki
隆治 岩崎
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.)
Toshiba Tec Corp
Original Assignee
Tokyo Electric 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 Tokyo Electric Co Ltd filed Critical Tokyo Electric Co Ltd
Priority to JP4160970A priority Critical patent/JP2863671B2/en
Publication of JPH064244A publication Critical patent/JPH064244A/en
Application granted granted Critical
Publication of JP2863671B2 publication Critical patent/JP2863671B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Record Information Processing For Printing (AREA)
  • Document Processing Apparatus (AREA)

Abstract

(57)【要約】 【目的】印字位置や印字パラメータの設定を自動的に行
い、オペレータの作業負担を軽減するとともに印字フォ
ーマットの作成能率を向上する。 【構成】印字フォーマットが印刷された帳票や伝票を読
取りデジタル画像データを出力する用紙読取部1と、こ
の用紙読取部からの画像データを取込み水平罫線を検出
する水平罫線検出部2と、この水平罫線検出部による水
平罫線の検出結果に基づいて水平罫線毎にその水平罫線
の直上で印字文字の大きさに対応したウィンドウを水平
方向に走査し、ウィンドウ内が空白であれば印字可能領
域と判断する印字可能領域探索部4と、この印字可能領
域探索部により得られる印字可能領域情報から印字開始
位置、印字文字サイズ、桁数、ピッチ等の印字パラメー
タを算出する印字パラメータ算出部5とを設けている。
(57) [Summary] [Purpose] The print position and print parameters are set automatically to reduce the operator's work load and improve the efficiency of creating print formats. [Structure] A paper reading unit 1 that reads a form or slip printed with a print format and outputs digital image data, a horizontal ruled line detection unit 2 that takes in image data from the paper reading unit and detects horizontal ruled lines, and a horizontal ruled line detecting unit. Based on the detection result of the horizontal ruled line by the ruled line detection unit, for each horizontal ruled line, the window corresponding to the size of the print character is horizontally scanned immediately above the horizontal ruled line, and if the window is blank, it is determined as the printable area. And a print parameter calculation unit 5 for calculating print parameters such as print start position, print character size, number of digits, and pitch from printable region information obtained by the printable region search unit. ing.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、予め罫線等により印字
フォーマットが印刷された帳票等から印字フォーマット
を読取り、印字フォーマットをデータとして作成する印
字フォーマット作成装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a print format creating apparatus for reading a print format from a form or the like on which the print format has been printed beforehand by ruled lines and creating the print format as data.

【0002】[0002]

【従来の技術】例えば市販されている帳票を読取って印
字フォーマットをデータとして作成する帳票作成装置
は、対象となる帳票をイメージスキャナーで読取ってデ
ジタル画像データとし、その画像データに基づいてディ
スプレイ装置の画面上に帳票を表示させ、この状態でオ
ペレータがキー操作によりカーソルを移動させつつ印字
位置の設定を行い、それぞれの印字位置で印字すべきデ
ータ(文字列や数字等)、印字文字の種類、桁数、ピッ
チ等の印字パラメータを入力し、この作業が終了する
と、実際に印字する帳票を装置の印字部にセットして印
字開始を指令する。これにより帳票に対して印字パラメ
ータに従って印字が行われるようになっていた。
2. Description of the Related Art For example, a form creating apparatus which reads a commercially available form and creates a print format as data reads an object form with an image scanner to obtain digital image data, and a display device based on the image data is used. The form is displayed on the screen, and in this state the operator sets the print position while moving the cursor by key operation, and the data (character string or number) to be printed at each print position, the type of print character, After inputting print parameters such as the number of digits and pitch, and when this work is completed, the form to be actually printed is set in the printing section of the device and a command to start printing is issued. As a result, the form is printed according to the print parameters.

【0003】[0003]

【発明が解決しようとする課題】しかしこのように印字
パラメータの設定を、オペレータがキー操作によりカー
ソルを移動させつつ印字位置や印字パラメータの設定を
行ったのでは設定作業が面倒となり、これを多種多様の
印字フォーマットを持った帳票に対して個々に行ったの
ではオペレータの作業量が膨大となり、帳票作成能率が
極めて悪い問題があった。
However, if the operator sets the print position and the print parameter while moving the cursor by the key operation as described above, the setting work becomes troublesome, and the setting of the print parameter is complicated. Performing each of the forms with various print formats would entail a huge amount of work by the operator, resulting in extremely poor form creation efficiency.

【0004】そこで本発明は、帳票等印字フォーマット
が印刷された用紙から印字フォーマットを読取って印字
位置や印字パラメータを設定するのを自動的に行うこと
ができ、従ってオペレータの作業負担を軽減できるとと
もに印字フォーマットの作成能率を向上できる印字フォ
ーマット作成装置を提供しようとするものである。
Therefore, according to the present invention, the print format can be automatically read from the paper on which the print format is printed and the print position and the print parameters can be set, thus reducing the work load on the operator. An object of the present invention is to provide a print format creation device that can improve the efficiency of print format creation.

【0005】[0005]

【課題を解決するための手段】本発明は、帳票等印字フ
ォーマットが印刷された用紙を読取りデジタル画像デー
タを出力する用紙読取手段と、この用紙読取手段からの
画像データを取込み印字フォーマットから水平罫線を検
出する水平罫線検出手段と、この水平罫線検出手段によ
る水平罫線の検出結果に基づいて水平罫線毎にその水平
罫線の直上で印字文字の大きさに対応したウィンドウを
水平方向に走査し、ウィンドウ内が空白であれば印字可
能領域と判断する印字可能領域検出手段と、この印字可
能領域検出手段により得られる印字可能領域情報から印
字開始位置、印字文字サイズ、桁数、ピッチ等の印字パ
ラメータを算出する印字パラメータ算出手段とを設けた
ものである。
According to the present invention, there is provided a paper reading means for reading a paper on which a print format such as a form is printed and outputting digital image data, and horizontal ruled lines based on the print format for taking in the image data from the paper reading means. And a horizontal ruled line detecting means for detecting the horizontal ruled line, and a window corresponding to the size of the print character is horizontally scanned immediately above the horizontal ruled line based on the detection result of the horizontal ruled line by the horizontal ruled line detecting means. If the inside is blank, the printable area detection means determines that it is a printable area, and print parameters such as the print start position, print character size, number of digits, and pitch are determined from the printable area information obtained by this printable area detection means. A print parameter calculating means for calculating is provided.

【0006】[0006]

【作用】このような構成の本発明においては、帳票等印
字フォーマットが印刷された用紙が用紙読取手段により
読取られてデジタル画像データが出力され、この画像デ
ータから水平罫線検出手段により印字フォーマットの水
平罫線の検出が行われ、さらに印字可能領域検出手段に
より印字可能領域の検出が行われる。そして得られる印
字可能領域情報により印字開始位置、印字文字サイズ、
桁数、ピッチ等の印字パラメータが算出され、印字フォ
ーマットがデータとして作成される。
In the present invention having such a configuration, the paper on which the printing format such as a form is printed is read by the paper reading means and digital image data is output, and the horizontal ruled line detecting means outputs the horizontal format of the printing format from the image data. The ruled lines are detected, and the printable area detection means further detects the printable area. The print start position, print character size, and
Print parameters such as the number of digits and pitch are calculated, and a print format is created as data.

【0007】[0007]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0008】図1において1はイメージスキャナーを有
する用紙読取部(用紙読取手段)で、この用紙読取部1
により例えば市販されている印字フォーマットが印刷さ
れた帳票や伝票の読取りが行われてデジタル画像データ
が出力されるようになっている。
In FIG. 1, reference numeral 1 denotes a sheet reading unit (sheet reading unit) having an image scanner.
Thus, for example, a form or slip printed with a commercially available print format is read and digital image data is output.

【0009】前記用紙読取部1からのデジタル画像デー
タは水平罫線検出部(水平罫線検出手段)2に供給され
ている。前記水平罫線検出部2は水平方向については印
字文字幅程度、垂直方向については水平罫線幅程度の細
長いウィンドウを画像データ全体にわたって走査し、ウ
ィンドウ内の黒画素数が閾値以上存在した場合はそのウ
ィンドウ内の画素すべてが水平罫線であると判断する。
そしてウインドウ走査終了後、水平罫線として検出され
た画素のうち水平方向に連続する数が閾値以上の画素を
水平罫線画素として出力するようになっている。この検
出処理により帳票や伝票中に印刷されている文字の部分
などの誤検出が排除された水平罫線領域が検出されるこ
とになる。
The digital image data from the paper reading section 1 is supplied to a horizontal ruled line detecting section (horizontal ruled line detecting means) 2. The horizontal ruled line detection unit 2 scans a narrow window having a print character width in the horizontal direction and a horizontal ruled line width in the vertical direction over the entire image data, and if the number of black pixels in the window exceeds a threshold value, the window is scanned. It is determined that all the pixels inside are horizontal ruled lines.
After the window scanning is completed, pixels that are detected as horizontal ruled lines and have a number of consecutive horizontal lines equal to or greater than a threshold value are output as horizontal ruled line pixels. By this detection processing, a horizontal ruled line area in which erroneous detection of a character portion printed on a form or slip is eliminated is detected.

【0010】前記水平罫線検出部2から出力され水平罫
線画素を代表水平罫線決定部3に供給している。前記代
表水平罫線決定部3は各水平罫線領域で代表水平罫線と
して1ライン決定するようになっている。前記代表水平
罫線決定部3では図2の(a)に示すような水平罫線領域
が入力されると、その領域の境界をトレースして図2の
(b) に示すように領域の左端位置、右端位置、領域の上
側の最も長い水平境界ラインLを探索し、最も長い水平
境界ラインLを図2の(c) に示すように左端位置及び右
端位置まで延長し、このラインをその水平罫線領域の代
表水平罫線として決定するようになっている。例えば伝
票について図3に太線で示すような水平罫線領域が入力
されると、各水平罫線領域毎に代表水平罫線決定を行
う。
The horizontal ruled line pixels output from the horizontal ruled line detecting unit 2 are supplied to the representative horizontal ruled line determining unit 3. The representative horizontal ruled line determining unit 3 determines one line as a representative horizontal ruled line in each horizontal ruled line area. When the horizontal ruled line area as shown in FIG. 2A is input, the representative horizontal ruled line determination unit 3 traces the boundary of the area and traces the boundary of the area.
As shown in (b), the left edge position and right edge position of the area, and the longest horizontal boundary line L above the area are searched, and the longest horizontal boundary line L is searched for at the left edge position and the right edge position as shown in (c) of FIG. The line is extended to the position, and this line is determined as the representative horizontal ruled line of the horizontal ruled line area. For example, when a horizontal ruled line area indicated by a thick line in FIG. 3 is input for a slip, a representative horizontal ruled line is determined for each horizontal ruled line area.

【0011】前記代表水平罫線決定部3で決定された代
表水平罫線データを印字可能領域探索部(印字可能領域
検出手段)4に供給している。前記印字可能領域探索部
4は印字可能領域を探索し印字可能領域を検出するもの
で、各代表水平罫線の直上で印字文字程度の大きさのウ
ィンドウを代表水平罫線の左端位置から右端位置まで水
平方向に走査し、ウィンドウ内の黒画素が存在しなけれ
ば空白領域であるので、その領域を印字可能領域として
検出するようになっている。
The representative horizontal ruled line data determined by the representative horizontal ruled line determining section 3 is supplied to a printable area searching section (printable area detecting means) 4. The printable area search unit 4 searches for a printable area and detects a printable area. A window having a size of a print character is horizontally located just above each representative horizontal ruled line from the left end position to the right end position of the representative horizontal ruled line. If the black pixels in the window do not exist, it is a blank area, so that area is detected as a printable area.

【0012】ウィンドウの走査は図4の(a) に示すよう
に現在のウィンドウ(図中斜線部分)が印字可能領域で
あった場合、そのウィンドウに隣接する位置(図中白抜
きの部分)に走査する。また図4の(b) に示すように現
在のウィンドウが印字可能領域でなかった場合は、ウィ
ンドウを1画素左に戻す。そしてこれを図4の(c) に示
すように印字可能領域が見付かるまで繰返す。但し、こ
の繰返しはウィンドウ幅までとする。次にウィンドウを
1画素右に進め、これを図4の(d) に示すように印字可
能領域が見付かるまで繰返す。この繰返しもウィンドウ
幅までとする。
As shown in FIG. 4A, when the current window (hatched portion in the figure) is a printable area, the window is scanned at a position adjacent to the window (white portion in the figure). To scan. If the current window is not the printable area as shown in FIG. 4B, the window is returned to the left by one pixel. This is repeated until a printable area is found, as shown in FIG. 4 (c). However, this repetition is limited to the window width. Next, the window is moved to the right by one pixel, and this process is repeated until a printable area is found, as shown in FIG. This repetition is limited to the window width.

【0013】前記印字可能領域探索部4による印字可能
領域の検出が終了すると、その検出結果を印字パラメー
タ算出部(印字パラメータ算出手段)5に供給してい
る。前記印字パラメータ算出部5は各印字可能領域に印
字するための印字パラメータを算出するもので、たとえ
ば1つの代表水平罫線上で図5に示すような印字可能領
域が検出されていると、座標(XS ,YS )を印字開始
位置とし、印字可能領域の幅W、印字可能領域の数N、
印字可能領域の間隔Pを求め、これらを印字パラメータ
とする。但し、すべての印字可能領域が全く同じ幅や間
隔で検出されることはほとんど無く、実際には各領域の
平均値を求めてW、Pとしている。
When the printable area search unit 4 completes the detection of the printable area, the detection result is supplied to the print parameter calculation unit (print parameter calculation means) 5. The print parameter calculation unit 5 calculates print parameters for printing in each printable area. For example, when a printable area as shown in FIG. 5 is detected on one representative horizontal ruled line, coordinates ( XS, YS) as the print start position, the width W of the printable area, the number N of printable areas,
The interval P between the printable areas is obtained and these are used as print parameters. However, it is rare that all printable areas are detected with exactly the same width and interval, and in practice, the average value of each area is obtained and set as W and P.

【0014】こうして例えば伝票に対して図6に斜線で
示すように各印字可能領域の検出が行われ、この各領域
毎に印字パラメータが求められることになる。
In this way, for example, the printable area is detected for the slip as shown by the diagonal lines in FIG. 6, and the print parameters are obtained for each area.

【0015】こうして求められた印字パラメータは印字
パラメータ算出部5から出力されメモリに格納される。
The print parameters thus obtained are output from the print parameter calculator 5 and stored in the memory.

【0016】以後は装置の印字部に読取った伝票と同一
の伝票をセットしオペレータは各印字位置に印字するデ
ータ、例えば金額や数量等をキー入力するのみで伝票の
所定位置に対する所定のデータ印字が可能となる。
After that, the same slip as the read slip is set in the printing section of the apparatus, and the operator prints predetermined data at a predetermined position on the slip simply by keying in the data to be printed at each printing position, for example, the amount and quantity. Is possible.

【0017】このように予め罫線等が印刷された市販の
帳票や伝票をイメージスキャナで読取る作業を行うのみ
で、自動的に帳票や伝票から水平罫線や垂直罫線等を検
出して各印字可能領域を判断し、さらに各印字可能領域
から印字開始位置の座標、印字可能領域の幅W、印字可
能領域の数N、印字可能領域の間隔P等の印字フォーマ
ットに対応した印字パラメータを求めることができるの
で、オペレータによる印字フォーマットの作成作業の負
担を軽減できるとともに印字フォーマットの作成能率を
向上できる。
As described above, only the work of reading a commercially available form or slip on which the ruled lines or the like are printed in advance is read by an image scanner, and horizontal ruled lines or vertical ruled lines or the like are automatically detected from the form or the slip and each printable area is detected. Further, the print parameters corresponding to the print format such as the coordinates of the print start position, the width W of the printable area, the number N of the printable areas, and the interval P of the printable areas can be obtained from each printable area. Therefore, it is possible to reduce the burden on the operator of creating the print format and improve the efficiency of creating the print format.

【0018】[0018]

【発明の効果】以上詳述したように本発明によれば、帳
票等印字フォーマットが印刷された用紙から印字フォー
マットを読取って印字位置や印字パラメータを設定する
のを自動的に行うことができ、従ってオペレータの作業
負担を軽減できるとともに印字フォーマットの作成能率
を向上できるものである。
As described above in detail, according to the present invention, it is possible to automatically read the print format from the paper on which the print format is printed and set the print position and the print parameter. Therefore, the work load on the operator can be reduced and the efficiency of creating the print format can be improved.

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

【図1】本発明の一実施例を示す要部ブロック図。FIG. 1 is a block diagram of essential parts showing an embodiment of the present invention.

【図2】同実施例における代表水平罫線の決定処理を説
明するための図。
FIG. 2 is a diagram for explaining a process of determining a representative horizontal ruled line in the embodiment.

【図3】同実施例における水平罫線領域の検出例を示す
図。
FIG. 3 is a diagram showing an example of detection of a horizontal ruled line area in the embodiment.

【図4】同実施例における印字可能領域の検出処理を説
明するための図。
FIG. 4 is a diagram for explaining a printable area detection process in the embodiment.

【図5】同実施例における印字可能領域の印字パラメー
タを説明するための図。
FIG. 5 is a diagram for explaining print parameters of a printable area in the embodiment.

【図6】同実施例における印字可能領域の検出例を示す
図。
FIG. 6 is a diagram showing an example of detection of a printable area in the embodiment.

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

1…用紙読取部、2…水平罫線検出部、3…代表水平罫
線決定部、4…印字可能領域探索部、5…印字パラメー
タ算出部。
1 ... Paper reading unit, 2 ... Horizontal ruled line detection unit, 3 ... Representative horizontal ruled line determination unit, 4 ... Printable area search unit, 5 ... Print parameter calculation unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 帳票等印字フォーマットが印刷された用
紙を読取りデジタル画像データを出力する用紙読取手段
と、この用紙読取手段からの画像データを取込み印字フ
ォーマットから水平罫線を検出する水平罫線検出手段
と、この水平罫線検出手段による水平罫線の検出結果に
基づいて水平罫線毎にその水平罫線の直上で印字文字の
大きさに対応したウィンドウを水平方向に走査し、ウィ
ンドウ内が空白であれば印字可能領域と判断する印字可
能領域検出手段と、この印字可能領域検出手段により得
られる印字可能領域情報から印字開始位置、印字文字サ
イズ、桁数、ピッチ等の印字パラメータを算出する印字
パラメータ算出手段とを設けたことを特徴とする印字フ
ォーマット作成装置。
1. A paper reading means for reading paper printed with a printing format such as a form and outputting digital image data, and a horizontal ruled line detecting means for taking in image data from the paper reading means and detecting horizontal ruled lines from the print format. , Based on the detection result of the horizontal ruled line by this horizontal ruled line detecting means, the window corresponding to the size of the print character is horizontally scanned immediately above the horizontal ruled line, and if the window is blank, printing is possible. A printable area detection unit that determines the area and a print parameter calculation unit that calculates print parameters such as the print start position, the print character size, the number of digits, and the pitch from the printable area information obtained by the printable area detection unit. A print format creation device characterized by being provided.
JP4160970A 1992-06-19 1992-06-19 Print format creation device Expired - Fee Related JP2863671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4160970A JP2863671B2 (en) 1992-06-19 1992-06-19 Print format creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4160970A JP2863671B2 (en) 1992-06-19 1992-06-19 Print format creation device

Publications (2)

Publication Number Publication Date
JPH064244A true JPH064244A (en) 1994-01-14
JP2863671B2 JP2863671B2 (en) 1999-03-03

Family

ID=15726104

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4160970A Expired - Fee Related JP2863671B2 (en) 1992-06-19 1992-06-19 Print format creation device

Country Status (1)

Country Link
JP (1) JP2863671B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01186361A (en) * 1988-01-20 1989-07-25 Ricoh Co Ltd Data processing equipment printing device
JPH02178765A (en) * 1988-12-29 1990-07-11 Canon Inc document creation device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01186361A (en) * 1988-01-20 1989-07-25 Ricoh Co Ltd Data processing equipment printing device
JPH02178765A (en) * 1988-12-29 1990-07-11 Canon Inc document creation device

Also Published As

Publication number Publication date
JP2863671B2 (en) 1999-03-03

Similar Documents

Publication Publication Date Title
EP0081767B1 (en) Character and image processing apparatus
JP3756719B2 (en) Document modification apparatus and image processing apparatus
JPH03122773A (en) Image forming device
JP2967309B2 (en) Image processing device
JPH08287184A (en) Image cropping device and character recognition device
JP3571128B2 (en) Method and apparatus for recognizing dimensions of drawings
US5649028A (en) Connect-the-dots drawing production device
JP2845370B2 (en) Character recognition method
JP2863671B2 (en) Print format creation device
JP2734628B2 (en) Character recognition device
JP2954218B2 (en) Image processing method and apparatus
JPH08321942A (en) Image processing apparatus and image joining method for divided drawings
KR100202268B1 (en) Reading area establishment method using grid chart
JPH11224259A (en) Image processing apparatus, image processing method, and storage medium
JPH0661112B2 (en) Pattern recognition method
JP2667958B2 (en) Character pattern recognition and correction device
JP2931041B2 (en) Character recognition method in table
JPH04262660A (en) Image recognition output device
JPH0762859B2 (en) Character pattern recognition and correction device
JPH08129607A (en) Optical character recognition method
JPH0793479A (en) Optical character reader
JP2001285617A (en) Image processing device
JPH06261203A (en) Terminal device
JPS60254284A (en) character recognition device
JPH07296108A (en) Character recognition method and character recognition device

Legal Events

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

Free format text: PAYMENT UNTIL: 20081211

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees