JP2002157573A - Method for correcting inclination of drawing file, filing method and medium for storing its program - Google Patents

Method for correcting inclination of drawing file, filing method and medium for storing its program

Info

Publication number
JP2002157573A
JP2002157573A JP2000350782A JP2000350782A JP2002157573A JP 2002157573 A JP2002157573 A JP 2002157573A JP 2000350782 A JP2000350782 A JP 2000350782A JP 2000350782 A JP2000350782 A JP 2000350782A JP 2002157573 A JP2002157573 A JP 2002157573A
Authority
JP
Japan
Prior art keywords
data
file
drawing file
line segment
filing
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
Application number
JP2000350782A
Other languages
Japanese (ja)
Inventor
Shunichi Kaneko
俊一 金子
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.)
Mutoh Industries Ltd
Original Assignee
Mutoh Industries 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 Mutoh Industries Ltd filed Critical Mutoh Industries Ltd
Priority to JP2000350782A priority Critical patent/JP2002157573A/en
Publication of JP2002157573A publication Critical patent/JP2002157573A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a drawing file inclination correcting method for correcting the drawing data inclination of a raster data drawing file without a complicated arithmetic processing, etc., and for performing filing, a filing method and a medium for storing its program. SOLUTION: The drawing file consisting of raster data which are generated by reading a drawing, etc., by a picture reader is temporarily converted into vector data, the longest segment in the converted drawing file is detected and adopted as reference, whole vector data are moved, etc., so as to permit one of previously arranged horizontal and vertical segments to be in parallel with the detected longest segment and, then, the inclination is corrected. Then the corrected vector data are converted into raster data again and filed in a prescribed output destination so as to perform the inclination correcting processing and the filing processing of the drawing file which consists of raster data without the complicated inclination detecting processing and a correction arithmetic processing. Then an inclination correcting processing time and a filing processing time of the drawing file are drastically shortened.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、図面ファイルの
ファイリング方法に関し、特に、ラスタデータからなる
図面データを含む複数の図面ファイルの傾きを補正し、
連続的にファイリングを行うのに適した図面ファイルの
傾き補正方法、ファイリング方法及びそのプログラムを
記憶してなる媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of filing a drawing file, and more particularly, to correcting inclinations of a plurality of drawing files including drawing data composed of raster data.
The present invention relates to a drawing file inclination correction method suitable for performing continuous filing, a filing method, and a medium storing the program.

【0002】[0002]

【従来の技術】従来より、例えば、地図や設計図等の従
前の紙図面をスキャナ等の画像読取装置で読み取り、ラ
スタデータ化した図面データを含む図面ファイルを作成
し、適宜編集処理を施してハードディスク装置等の記憶
媒体にラスタデータのままデータベースとして蓄積する
ファイリング装置が知られている。
2. Description of the Related Art Conventionally, for example, a conventional paper drawing such as a map or a design drawing is read by an image reading device such as a scanner, and a drawing file including drawing data converted into raster data is created and appropriately edited. A filing apparatus that stores raster data as a database in a storage medium such as a hard disk device is known.

【0003】一般に、このようなファイリング装置に用
いられる画像読取装置の読取方法としては、原稿台の上
に紙図面等を人手により載置して原稿を読み取る方法
と、自動原稿供給装置(オートドキュメントフィーダ:
ADF)を用い連続して自動的に原稿を読み取る方法と
が知られている。これらいずれの読取方法においても、
読み取られる原稿が画像読取装置の読取方向に対して傾
いてしまうと、ファイリング装置において作成された図
面ファイルの図面データも傾いてしまうことになるた
め、この傾きを補正する種々の方法が提案されている。
In general, as an image reading apparatus used in such a filing apparatus, a method of reading a document by manually placing a paper drawing or the like on a document table and an automatic document feeding apparatus (auto document feeding apparatus) feeder:
A method of continuously and automatically reading a document using ADF) is known. In any of these reading methods,
If the document to be read is tilted with respect to the reading direction of the image reading device, the drawing data of the drawing file created in the filing device will also be tilted. Therefore, various methods for correcting the tilt have been proposed. I have.

【0004】例えば、特開平11−252351号公報
に開示されている画像読取装置のように、読み込んだ原
稿のエッジを複数検出し、これらのエッジに基づき原稿
の傾きを演算し、この演算結果に基づき原稿の傾きを補
正する方法等が知られている。
For example, as in an image reading apparatus disclosed in Japanese Patent Application Laid-Open No. H11-252351, a plurality of edges of a read original are detected, and the inclination of the original is calculated based on these edges. A method for correcting the inclination of a document based on the document is known.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、例えば
ADFで大量の原稿を読み込んでファイリングを行うと
きに、上記画像読取装置のように複雑な傾き検出処理や
補正演算処理を伴う傾き補正処理を行うと、ファイリン
グ処理時間が大幅にかかってしまい、迅速なファイリン
グを行うことが困難となる。
However, for example, when a large number of originals are read by the ADF and filing is performed, if a complicated inclination detection process and a tilt correction process involving a correction operation process are performed as in the above-described image reading apparatus, In addition, the filing processing time is greatly increased, and it is difficult to perform quick filing.

【0006】この発明は、上記のような点に鑑みてなさ
れたもので、複雑な演算処理等を伴わないラスタデータ
図面ファイルの図面データの傾き補正及びファイリング
が可能となる図面ファイルの傾き補正方法、ファイリン
グ方法及びそのプログラムを記憶してなる媒体を提供す
ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and has a method for correcting the inclination of a drawing data of a raster data drawing file and filing without complicated arithmetic processing. , A filing method and a medium storing the program.

【0007】[0007]

【課題を解決するための手段】この発明に係る図面ファ
イルの傾き補正方法は、ラスタデータからなる図面デー
タをベクタデータに変換するステップと、このステップ
で変換されたベクタデータの直線線分のうち、垂直又は
水平方向に対して所定の角度範囲内で最も長い直線線分
を検出するステップと、このステップで検出された前記
直線線分を基準とし、予めメモリ内のデータ処理領域に
構築された水平垂直線分のいずれか一方の線分と前記直
線線分とが平行となるように前記ベクタデータ全体を移
動して傾き補正処理をするステップと、このステップで
傾き補正されたベクタデータをラスタデータの図面デー
タに変換するステップとを備えたことを特徴とする。
According to the present invention, there is provided a method for correcting the inclination of a drawing file, comprising the steps of converting drawing data consisting of raster data into vector data; Detecting the longest straight line segment within a predetermined angle range with respect to the vertical or horizontal direction, and using the straight line segment detected in this step as a reference, the line segment is previously constructed in a data processing area in a memory. Moving the entire vector data so that one of the horizontal and vertical line segments and the straight line segment are parallel to each other, and performing a tilt correction process; Converting the data into drawing data.

【0008】この発明に係る図面ファイルのファイリン
グ方法は、ラスタデータからなる図面データを含む図面
ファイルを取り込むステップと、このステップで取り込
まれた前記図面ファイルを記憶するステップと、このス
テップで記憶された前記図面ファイルのうち、オペレー
タにより選択された図面ファイルをメモリに読み込むス
テップと、このステップでメモリに読み込まれた図面フ
ァイルの図面データをベクタデータに変換するステップ
と、このステップで変換されたベクタデータの直線線分
のうち、垂直又は水平方向に対して所定の角度範囲内で
最も長い直線線分を検出するステップと、このステップ
で検出された前記直線線分を基準とし、予め前記メモリ
内のデータ処理領域に構築された水平垂直線分のいずれ
か一方の線分と前記直線線分とが平行となるように前記
ベクタデータ全体を移動して傾き補正処理をするステッ
プと、このステップで傾き補正されたベクタデータをラ
スタデータの図面データに変換するステップと、このス
テップで変換された図面データを含む前記図面ファイル
を予め設定された出力先へ出力し保存するステップとを
備えたことを特徴とする。
[0008] A method for filing a drawing file according to the present invention includes a step of taking in a drawing file containing drawing data composed of raster data, a step of storing the drawing file taken in in this step, and a step of storing the drawing file. Reading the drawing file selected by the operator from the drawing files into the memory, converting the drawing data of the drawing file read into the memory in this step into vector data, and converting the vector data in this step Detecting the longest straight line segment within a predetermined angle range with respect to the vertical or horizontal direction, of the straight line segments, and based on the straight line segment detected in this step, One of the horizontal and vertical line segments constructed in the data processing area Moving the entire vector data so that the straight line segments are parallel to each other, and performing a tilt correction process; converting the vector data whose tilt has been corrected in this step into raster drawing data; Outputting the drawing file including the converted drawing data to a preset output destination and storing the drawing file.

【0009】前記ラスタデータからなる図面データをベ
クタデータに変換するステップは、前記図面データのう
ちの所定範囲のラスタデータのみをベクタデータに変換
するステップであることが望ましい。
Preferably, the step of converting the drawing data composed of raster data into vector data is a step of converting only raster data in a predetermined range of the drawing data into vector data.

【0010】前記所定範囲は、好ましくは前記図面デー
タの外周範囲である。
The predetermined range is preferably an outer peripheral range of the drawing data.

【0011】この発明に係る媒体は、ラスタデータから
なる図面データを含む図面ファイルを取り込む処理と、
この処理で取り込まれた前記図面ファイルを記憶する処
理と、この処理で記憶された前記図面ファイルのうち、
オペレータにより選択された図面ファイルをメモリに読
み込む処理と、この処理でメモリに読み込まれた図面フ
ァイルの図面データをベクタデータに変換する処理と、
この処理で変換されたベクタデータの直線線分のうち、
垂直又は水平方向に対して所定の角度範囲内で最も長い
直線線分を検出する処理と、この処理で検出された前記
直線線分を基準とし、予め前記メモリ内のデータ処理領
域に構築された水平垂直線分のいずれか一方の線分とと
前記直線線分とが平行となるように前記ベクタデータ全
体を移動して傾き補正をする処理と、この処理で傾き補
正されたベクタデータをラスタデータの図面データに変
換する処理と、この処理で変換された図面データを含む
前記図面ファイルを予め設定された出力先へ出力し保存
する処理とを備えた図面ファイルのファイリング処理プ
ログラムを記憶してなる。
[0011] A medium according to the present invention includes a process for loading a drawing file including drawing data consisting of raster data;
A process of storing the drawing file captured in this process; and, among the drawing files stored in the process,
A process of reading the drawing file selected by the operator into the memory, a process of converting drawing data of the drawing file read into the memory by this process into vector data,
Of the straight line segments of the vector data converted by this process,
A process of detecting the longest straight line segment within a predetermined angle range with respect to the vertical or horizontal direction, and, based on the straight line segment detected in this process, being pre-established in a data processing area in the memory A process of correcting the inclination by moving the entire vector data so that one of the horizontal and vertical line segments and the straight line segment are parallel to each other; Storing a drawing file filing processing program comprising: a process of converting data into drawing data; and a process of outputting and saving the drawing file including the drawing data converted by this process to a preset output destination. Become.

【0012】この発明によれば、図面等を画像読取装置
で読み込んで作成されたラスタデータからなる図面デー
タを一旦ベクタデータに変換し、変換したベクタデータ
の直線線分のうち、垂直又は水平方向に対して所定の角
度範囲内で最も長い直線線分(以下、「最長線分」とい
う。)を検出して基準とし、予めメモリ内に構築された
水平垂直線分のいずれか一方の線分と最長線分とが平行
となるようにベクタデータ全体を移動して傾きを補正す
る図面ファイルの傾き補正方法と、これら補正したベク
タデータを再びラスタデータに変換してから所定の出力
先へファイリングするファイリング方法を実現してい
る。このため、複雑な傾き検出処理や補正演算処理を伴
わずにラスタデータからなる図面データ(図面ファイ
ル)の傾き補正処理を行いながらファイリングをするこ
とが可能となる。これにより、図面ファイルの傾き補正
処理時間やファイリング処理時間を大幅に短縮すること
が可能となる。
According to the present invention, drawing data consisting of raster data created by reading a drawing or the like by an image reading device is temporarily converted into vector data, and the linear or linear segments of the converted vector data are used in the vertical or horizontal direction. , A longest straight line segment within a predetermined angle range (hereinafter, referred to as a “longest line segment”) is detected and used as a reference, and any one of the horizontal and vertical line segments previously constructed in the memory is used. For correcting the tilt of a drawing file by moving the entire vector data so that the and the longest line are parallel, and converting the corrected vector data to raster data again and filing it to a predetermined output destination Filing method. Therefore, filing can be performed while performing the inclination correction processing of the drawing data (drawing file) composed of raster data without complicated inclination detection processing and correction calculation processing. As a result, it becomes possible to greatly reduce the time required for the inclination correction processing and the filing processing of the drawing file.

【0013】[0013]

【発明の実施の形態】以下、図面を参照して、この発明
の実施例を説明する。図1は、この発明の一実施例に係
る図面ファイルの傾き補正方法及びファイリング方法を
実現するファイリング装置の基本構成の一部を示す機能
ブロック図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a functional block diagram showing a part of a basic configuration of a filing apparatus for realizing a drawing file inclination correcting method and a filing method according to an embodiment of the present invention.

【0014】このファイリング装置は、主に文字・座標
入力手段としてのマウスやキーボード等の入力デバイ
ス、他のシステム等からの図面ファイルなどを入力する
入力インターフェイス、地図や設計図等の図面を読み取
るためのスキャナやOCR装置等で構成された入力部1
と、CPU、ROM及び所定のアプリケーション・ソフ
トウェア等で構成されたデータ処理部2と、図面ファイ
ルを記憶するハードディスク装置等の記憶媒体からなる
ファイル記憶部3と、図面データを表示するカラーCR
Tディスプレイ装置又はカラー液晶ディスプレイ装置等
の表示装置からなる表示部4と、図面データの演算処理
等のデータ処理領域及び図面データの一時格納領域等を
提供するRAM等のメモリ5とを備えて構成されてい
る。
This filing apparatus is mainly for input devices such as a mouse and a keyboard as character / coordinate input means, an input interface for inputting drawing files from other systems and the like, and for reading drawings such as maps and design drawings. Input unit 1 composed of a scanner or OCR device
A data processing unit 2 including a CPU, a ROM, predetermined application software, etc., a file storage unit 3 including a storage medium such as a hard disk device for storing drawing files, and a color CR for displaying drawing data.
A display unit 4 comprising a display device such as a T display device or a color liquid crystal display device, and a memory 5 such as a RAM for providing a data processing area for arithmetic processing of drawing data and a temporary storage area for drawing data. Have been.

【0015】データ処理部2は、ラスタデータ処理部
6、ベクタデータ処理部7、ファイル処理部8及び表示
制御部9を備えて構成されている。ラスタデータ処理部
6は、主にメモリ5に一時格納された図面ファイルのう
ちのラスタデータからなる図面データの処理を担当す
る。一方、ベクタデータ処理部7は、メモリ5に一時格
納された図面ファイルのうちのベクタデータからなる図
面データの処理を担当する。このベクタデータ処理部7
は、図面データの新規作成や移動等の編集過程でラスタ
データから変換されたベクタデータやCADシステムに
よって付加されたベクタデータ等の処理を担当するもの
で、このベクタデータ処理部7から他の各部への出力デ
ータ形式は、ラスタデータ形式が採用されている。
The data processing section 2 includes a raster data processing section 6, a vector data processing section 7, a file processing section 8, and a display control section 9. The raster data processing unit 6 is mainly responsible for processing drawing data composed of raster data in the drawing file temporarily stored in the memory 5. On the other hand, the vector data processing unit 7 is responsible for processing drawing data composed of vector data in the drawing file temporarily stored in the memory 5. This vector data processing unit 7
Is responsible for processing vector data converted from raster data in the editing process such as new creation and movement of drawing data, vector data added by a CAD system, and the like. A raster data format is adopted as the output data format to the printer.

【0016】ファイル処理部8は、上記ラスタデータ処
理部6及びベクタデータ処理部7で処理された図面デー
タからなる図面ファイルをラスタデータ形式の図面ファ
イルとしてファイル記憶部3に書き込み保存したり、保
存してある図面ファイルをメモリ5に読み込むためにフ
ァイル記憶部3に記憶されている図面ファイルを読み出
したりする、いわゆるファイリングを行うためのファイ
ルアクセス処理全般を担当する。表示制御部9は、入力
部1の操作に基づいて、メモリ5上の図面データやオペ
レーションに必要な各種情報を表示部4に表示するため
の制御を実行する。なお、このデータ処理部2の各ブロ
ックの機能を実現するためのプログラムは、例えばCD
−ROM、DVD−ROM及びMO等の適当な媒体に記
録されて提供されるものである。
The file processing unit 8 writes and saves a drawing file composed of the drawing data processed by the raster data processing unit 6 and the vector data processing unit 7 in the file storage unit 3 as a drawing file in a raster data format. It is in charge of file access processing for performing so-called filing, such as reading out a drawing file stored in the file storage unit 3 in order to read the drawing file into the memory 5. The display control unit 9 executes control for displaying drawing data on the memory 5 and various information necessary for the operation on the display unit 4 based on the operation of the input unit 1. A program for realizing the function of each block of the data processing unit 2 is, for example, a CD.
-Provided on a suitable medium such as ROM, DVD-ROM and MO.

【0017】図2は、ファイル処理部8内の傾き補正処
理部10の基本構成を示すブロック図である。ラスタデ
ータ処理部6、ベクタデータ処理部7又はメモリ5から
出力された図面ファイルは、通常、ファイル処理部8に
入力されラスタデータ形式の図面ファイルとしてファイ
ル記憶部3に出力されるが、オペレータによりファイリ
ング処理の際に傾き補正を施す旨の選択がなされると、
その指示が入力部1よりファイル処理部8に伝送されフ
ァイル処理部8内の傾き補正処理部10が傾き補正処理
を実行する。即ち、傾き補正処理部10内では、まず、
ファイル処理部8に入力された図面ファイルのうち、オ
ペレータにより選択されたファイリングすべき図面ファ
イルがラスタ/ベクタ変換部11に入力される。ラスタ
/ベクタ変換部11に入力された図面ファイルはベクタ
データ形式の図面ファイルに変換され、最長線分検出部
12に出力される。最長線分検出部12では、入力した
図面ファイルのベクタデータからなる直線線分のうち、
水平又は垂直方向に対して所定の角度範囲内で最も長い
直線を構成する直線線分をそれぞれの図面ファイルにつ
いて検出する。なお、この最直線分検出の際、例えば、
予めメモリ5内に構築され設定された水平垂直基準線に
対して±5°以内の傾きを持った直線線分のみを検出す
るようにしたり、検出対象範囲を図面ファイルの所定位
置から所定範囲内に限定したりすることにより、検出処
理の高速化を図ることができる。
FIG. 2 is a block diagram showing a basic configuration of the inclination correction processing unit 10 in the file processing unit 8. The drawing file output from the raster data processing unit 6, the vector data processing unit 7, or the memory 5 is usually input to the file processing unit 8 and output to the file storage unit 3 as a raster data format drawing file. If you choose to perform tilt correction during the filing process,
The instruction is transmitted from the input unit 1 to the file processing unit 8, and the inclination correction processing unit 10 in the file processing unit 8 executes the inclination correction processing. That is, in the inclination correction processing unit 10, first,
The drawing file to be filed selected by the operator among the drawing files input to the file processing unit 8 is input to the raster / vector conversion unit 11. The drawing file input to the raster / vector conversion unit 11 is converted into a drawing file in a vector data format, and is output to the longest line segment detection unit 12. In the longest line segment detection unit 12, among the straight line segments composed of the vector data of the input drawing file,
A straight line segment forming the longest straight line within a predetermined angle range with respect to the horizontal or vertical direction is detected for each drawing file. In addition, at the time of detection of the most straight line component, for example,
Only a straight line segment having an inclination within ± 5 ° with respect to the horizontal and vertical reference lines constructed and set in the memory 5 in advance is detected, or the detection target range is set within a predetermined range from a predetermined position in the drawing file. The speed of the detection process can be increased by limiting the number of the detection processes.

【0018】この最長線分検出部12で検出された直線
線分を含む図面ファイルは、次に傾き検出部13に入力
され、水平垂直基準線に対してどのくらいの角度で傾い
ているかが検出される。この傾きの検出に関しては、一
般に知られている傾き検出の演算処理がファイリング装
置のCPU(図示せず)で行われる。傾き検出部13で
検出された傾きに基づき、例えばアフィン変換等の公知
の傾き補正手法により傾き補正部14で図面ファイル全
体の図面データを回転移動や平行移動させ、図面ファイ
ルの傾きの補正が実行される。傾き補正部14で傾き補
正がなされた図面ファイルは、ベクタ/ラスタ変換部1
5に入力され、ベクタデータ形式の図面ファイルから再
びラスタデータ形式の図面ファイルに変換された後、フ
ァイル処理部8から、例えば予め設定されている出力先
としてのファイル記憶部3の所定のディレクトリに出力
されファイリングされる。
The drawing file containing the straight line segment detected by the longest line segment detection unit 12 is then input to the inclination detection unit 13 to detect the angle of inclination with respect to the horizontal and vertical reference lines. You. Regarding the detection of the tilt, a generally known calculation process of the tilt detection is performed by a CPU (not shown) of the filing apparatus. Based on the inclination detected by the inclination detection unit 13, the inclination correction unit 14 rotates and translates the drawing data of the entire drawing file by a known inclination correction method such as affine transformation, and executes the correction of the inclination of the drawing file. Is done. The drawing file whose inclination has been corrected by the inclination correction unit 14 is stored in the vector / raster conversion unit 1.
5 and converted from the drawing file in the vector data format into the drawing file in the raster data format again, and then transferred from the file processing unit 8 to, for example, a predetermined directory of the file storage unit 3 as a preset output destination. Output and filed.

【0019】次に、このファイル処理部8によるファイ
リング処理について詳しく説明する。図3は、ファイル
処理部8のファイリング処理のフローチャートである。
まず、ファイル処理部8は、入力部1からの指示によ
り、ファイリングする入力ファイルの選択を行い(S
1)、この選択された入力ファイルをメモリ5、ラスタ
データ処理部6、ベクタデータ処理部7又はファイル記
憶部3から読み込む(S2)。読み込まれた図面ファイ
ルに対してオペレータにより傾き補正処理を行わないと
の選択がされた場合(S3)、ファイル処理部8は、読
み込んだ図面ファイルを、例えばファイル記憶部3の所
定出力先ディレクトリへ出力し(S7)、入力ファイル
の読込が終了したか否かを判断する(S8)。入力ファ
イルの読込が終了していればファイリング処理は終了す
るが、入力ファイルの読込が終了していない場合は、ス
テップS2に戻り順次選択された入力ファイルを読み込
む。
Next, the filing process by the file processing unit 8 will be described in detail. FIG. 3 is a flowchart of the filing process of the file processing unit 8.
First, the file processing unit 8 selects an input file to be filed in accordance with an instruction from the input unit 1 (S
1) The selected input file is read from the memory 5, the raster data processing unit 6, the vector data processing unit 7, or the file storage unit 3 (S2). When the operator selects not to perform the inclination correction process on the read drawing file (S3), the file processing unit 8 transfers the read drawing file to, for example, a predetermined output destination directory of the file storage unit 3. The output is performed (S7), and it is determined whether the reading of the input file is completed (S8). If the reading of the input file has been completed, the filing process is completed, but if the reading of the input file has not been completed, the process returns to step S2 and the sequentially selected input files are read.

【0020】一方、ステップS3にて、読み込まれた図
面ファイルに対して傾き補正処理を行うとの選択がオペ
レータによりなされた場合、上述したように図面ファイ
ルはファイル処理部8内の傾き補正処理部10に入力さ
れ、ラスタ/ベクタ変換部11でラスタデータ形式の図
面ファイルからベクタデータ形式の図面ファイルに変換
される(S4)。変換された図面ファイルは、最長線分
検出部12にてメモリ5内のワークエリアに構築された
水平垂直基準線に対して、所定の角度範囲内、例えば±
5°以内の範囲において最も長い直線を構成する線分が
検出され(S5)、この最長線分と水平垂直基準線とが
なす傾きが検出された後、傾き補正部14において最長
線分を基準とした図面データ全体が、検出された傾き分
だけ水平垂直基準線と平行となるように移動され、傾き
補正が行われる(S6)。傾き補正がなされた図面ファ
イルは、上記と同様に、例えばファイル記憶部3の所定
出力先ディレクトリへ出力されてファイリングされる
(S7)。その後、ファイル処理部8は、入力ファイル
の読込の有無を判断し(S8)、読込が終了していれば
ファイリング処理も終了となるが、読込が終了していな
ければステップS2から選択された入力ファイルの読込
を順次再開してファイリング処理をする。
On the other hand, if the operator selects to perform the skew correction processing on the read drawing file in step S3, the drawing file is stored in the skew correction processing unit in the file processing unit 8 as described above. The raster / vector conversion unit 11 converts the drawing file in the raster data format into a drawing file in the vector data format (S4). The converted drawing file is within a predetermined angle range, for example, ±, with respect to the horizontal and vertical reference lines constructed in the work area in the memory 5 by the longest line segment detection unit 12.
A line segment constituting the longest straight line within the range of 5 ° is detected (S5), and an inclination between the longest line segment and the horizontal / vertical reference line is detected. Is moved so as to be parallel to the horizontal and vertical reference lines by the detected inclination, and inclination correction is performed (S6). The drawing file subjected to the inclination correction is output to, for example, a predetermined output destination directory of the file storage unit 3 for filing in the same manner as described above (S7). Thereafter, the file processing unit 8 determines whether or not the input file has been read (S8). If the reading has been completed, the filing process is also completed. If the reading has not been completed, the input selected from step S2. File reading is resumed sequentially to perform filing processing.

【0021】次に、上述したファイリング装置での傾き
補正処理を伴うファイリング動作について説明する。こ
のファイリング装置では、表示部4の表示画面上に表示
されている操作画面上の「ファイル」メニューから「ラ
スタバッチ処理」の項目を選択する、又は「タスクバ
ー」にある「スタート」メニューから「プログラム」の
項目を選択すると、図4に示すように、「ラスタデータ
編集バッチ処理」の設定ダイアログ16が表示される。
ファイリング処理を行うために、まず、この設定ダイア
ログ16にあるファイル指定ボックス17内の登録ボタ
ン18を入力部1のマウス等を用いてクリックすると、
図5(a)に示すように、開くダイアログ19が表示さ
れる。オペレータは、この開くダイアログ19の表示ウ
ィンドウ20に表示された入力対象ファイルを所望によ
り選択することができ、選択した後に開くボタン21を
クリックすることにより選択を確定することができる。
一方、ファイル指定ボックス17内の出力先入力エリア
22に直接ディレクトリ名を入力部1のキーボード等に
よりキー入力するか、又は参照ボタン23をクリック
し、図5(b)に示すようなディレクトリ選択ダイアロ
グ24を表示させてからディレクトリ表示ウィンドウ2
5内に表示された所定のディレクトリを指定するか等し
て図面ファイルの出力先を選択指定することもできる。
Next, the filing operation involving the inclination correction processing in the filing apparatus described above will be described. In this filing apparatus, select the item “raster batch processing” from the “file” menu on the operation screen displayed on the display screen of the display unit 4, or select “program” from the “start” menu in the “task bar”. ", A setting dialog 16 for" raster data editing batch processing "is displayed as shown in FIG.
In order to perform the filing process, first, the registration button 18 in the file designation box 17 in the setting dialog 16 is clicked using the mouse of the input unit 1 or the like.
As shown in FIG. 5A, an open dialog 19 is displayed. The operator can select the input target file displayed on the display window 20 of the open dialog 19 as desired, and can confirm the selection by clicking the open button 21 after the selection.
On the other hand, a directory name is directly input to the output destination input area 22 in the file designation box 17 by a key or the like of the keyboard of the input unit 1 or the reference button 23 is clicked, and a directory selection dialog as shown in FIG. Directory display window 2 after displaying 24
It is also possible to select and specify the output destination of the drawing file by specifying the predetermined directory displayed in 5.

【0022】ファイル指定ボックス17での設定が終了
したら、次に編集設定ボックス26内にある傾き補正チ
ェックボックス27にマウス等でチェックマークを付し
て傾き補正処理を伴うファイリングを行う旨の選択をす
る。オペレータによりこの選択がなされると、ファイル
処理部8に傾き補正処理を行う信号が伝送され、上述し
たようにファイル処理部8内の傾き補正処理部10がス
タンバイされる。このように各項目を選択した後、設定
ダイアログ16の変換ボタン28をクリックすることに
より、選択された入力対象ファイルが同じく選択された
出力先ディレクトリに傾き補正されてファイリングされ
る。このファイリング処理は、傾き補正に関する複雑な
演算処理等が伴わないため高速に行われ、たとえ複数の
入力対象ファイルを選択したときでも、一度の設定動作
のみでそれぞれの図面ファイルの傾きが補正された図面
ファイルをファイリングすることができるため、図面フ
ァイルのファイリング処理時間を大幅に短縮することが
可能となる。なお、このファイリング処理に伴う傾き補
正処理は、簡単に説明すると図6に示すようなものとな
る。
When the setting in the file designation box 17 is completed, a check mark is added to the inclination correction check box 27 in the edit setting box 26 with a mouse or the like to select filing with inclination correction processing. I do. When this selection is made by the operator, a signal for performing the inclination correction processing is transmitted to the file processing section 8, and the inclination correction processing section 10 in the file processing section 8 is put on standby as described above. After selecting each item in this manner, by clicking the conversion button 28 of the setting dialog 16, the selected input target file is corrected in inclination to the selected output destination directory and filed. This filing process is performed at high speed because it does not involve complicated arithmetic processing related to tilt correction. Even when multiple input target files are selected, the tilt of each drawing file is corrected by a single setting operation. Since the drawing file can be filed, it is possible to greatly reduce the time for filing the drawing file. In addition, the inclination correction processing accompanying the filing processing is as briefly shown in FIG.

【0023】即ち、例えばファイリング装置において、
画像読取装置の読取領域をそのまま図面ファイル30と
して取り扱う場合、画像読取装置において傾いて読み取
られた図面データの原稿31は、図6(a)に示すよう
に、概念上図面ファイル30内で傾いていることにな
る。そこで、この図面ファイル30全体をベクタデータ
に変換し、その中で所定の条件(角度範囲、線分長さ
等)に最も近い原稿31の最長線分を検出し、同図
(b)に示すように、その最長線分を基準として原稿3
1全体を図面ファイル30の水平垂直基準線(この場
合、外枠線)A〜Dに対して平行となるように回転・移
動等して図面ファイル30内の原稿31の傾きを補正
し、同図(c)に示すように、補正した図面ファイル3
0を再びラスタデータに変換することで複雑な演算処理
等を伴わない傾き補正付きファイリング処理を施すこと
ができる。例えば、傾き補正処理は、図7に示すよう
に、原稿31内のそれぞれの直線線分R〜Vのうちの水
平垂直基準線A〜Dとのなす角度が±5°以内の最長線
分Tを基準とし、この最長線分Tと水平垂直基準線A〜
D(この場合C´又はD´)とがなす角度θを演算によ
り算出して、この算出された傾きに基づき原稿31を回
転・移動等するだけなので、従来の傾き補正処理のよう
に複雑な演算処理が必要なく、処理すべき図面ファイル
量が増大しても、高速に傾き補正を行うことができる。
That is, for example, in a filing apparatus,
When the reading area of the image reading apparatus is handled as it is as the drawing file 30, the original 31 of the drawing data read while being tilted in the image reading apparatus is conceptually tilted in the drawing file 30 as shown in FIG. Will be. Therefore, the entire drawing file 30 is converted into vector data, and the longest line segment of the document 31 which is closest to a predetermined condition (angle range, line segment length, etc.) is detected, and is shown in FIG. As shown in FIG.
1 is rotated and moved so as to be parallel to the horizontal and vertical reference lines (in this case, outer frame lines) A to D of the drawing file 30 to correct the inclination of the original 31 in the drawing file 30; As shown in FIG.
By converting 0 into raster data again, it is possible to perform filing processing with inclination correction that does not involve complicated arithmetic processing. For example, as shown in FIG. 7, the inclination correction process is performed on the longest line segment T within ± 5 ° between the horizontal and vertical reference lines A to D among the straight line segments R to V in the document 31. , The longest line segment T and the horizontal and vertical reference lines A to
D (in this case, C ′ or D ′) is calculated by calculation, and the document 31 is simply rotated / moved based on the calculated tilt, which is complicated as in the conventional tilt correction processing. Even if the arithmetic processing is not required and the amount of drawing files to be processed increases, the inclination can be corrected at high speed.

【0024】なお、上述したファイリング処理に伴う傾
き補正処理においては、例えば原稿31の直線線分が原
稿31の外枠近傍に多いという経験的事実に基づき、ベ
クタデータに変換する図面ファイル30のデータ量を図
面ファイル30の外枠から10〜20%のみにする。あ
るいは、外枠交換領域を上下左右オペレータが選択可能
に決定し、その変換したデータの中で最長線分を検出す
るようにすれば、更に傾き補正処理を伴うファイリング
処理の高速化を実現することが可能となる。
In the inclination correction processing accompanying the filing processing described above, the data of the drawing file 30 to be converted into vector data is converted based on the empirical fact that, for example, a straight line segment of the document 31 is near the outer frame of the document 31. The amount is only 10-20% from the outer frame of the drawing file 30. Alternatively, if the outer frame exchange area is determined to be selectable by the operator in the up / down / left / right direction, and the longest line segment is detected in the converted data, the filing processing with the inclination correction processing can be further speeded up. Becomes possible.

【0025】[0025]

【発明の効果】以上述べたように、この発明によれば、
図面等を画像読取装置で読み込んで作成されたラスタデ
ータからなる図面データを一旦ベクタデータに変換し、
変換したベクタデータの直線線分のうち、垂直又は水平
方向に対して所定の角度範囲内で最も長い直線線分を検
出して基準とし、予めメモリ内に構築された水平垂直線
分のいずれか一方の線分と最長線分とが平行となるよう
にベクタデータ全体を移動して傾きを補正する図面ファ
イルの傾き補正方法と、これら補正したベクタデータを
再びラスタデータに変換してから所定の出力先へファイ
リングするファイリング方法を実現している。このた
め、複雑な傾き検出処理や補正演算処理を伴わずにラス
タデータからなる図面データ(図面ファイル)の傾き補
正処理を行いながらファイリングをすることが可能とな
る。これにより、図面ファイルの傾き補正処理時間やフ
ァイリング処理時間を大幅に短縮することが可能となる
という効果を奏する。
As described above, according to the present invention,
Drawing data consisting of raster data created by reading drawings etc. with an image reading device is temporarily converted to vector data,
Among the straight line segments of the converted vector data, the longest straight line segment within a predetermined angle range with respect to the vertical or horizontal direction is detected and used as a reference, and any of the horizontal and vertical line segments previously constructed in the memory is used. A method of correcting the inclination of a drawing file in which the entire vector data is moved so that one of the line segments and the longest line segment are parallel to each other, and a method of correcting the inclination of a drawing file. A filing method for filing to an output destination is realized. Therefore, filing can be performed while performing the inclination correction processing of the drawing data (drawing file) composed of raster data without complicated inclination detection processing and correction calculation processing. As a result, it is possible to greatly reduce the time required for the inclination correction processing and the filing processing of the drawing file.

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

【図1】 この発明の一実施例に係る図面ファイルの傾
き補正方法及びファイリング方法を実現するファイリン
グ装置の基本構成の一部を示す機能ブロック図である。
FIG. 1 is a functional block diagram showing a part of a basic configuration of a filing apparatus for realizing a drawing file inclination correction method and a filing method according to an embodiment of the present invention.

【図2】 同ファイリング装置のファイル処理部内の傾
き補正処理部の基本構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a basic configuration of a tilt correction processing unit in a file processing unit of the filing apparatus.

【図3】 同ファイル処理部のファイリング処理のフロ
ーチャートである。
FIG. 3 is a flowchart of a filing process of the file processing unit.

【図4】 表示部の表示画面上に表示されたラスタデー
タ編集バッチ処理の設定ダイアログを示す図である。
FIG. 4 is a diagram showing a setting dialog of a raster data editing batch process displayed on a display screen of a display unit.

【図5】 同処理の開くダイアログを示す図である。FIG. 5 is a diagram showing a dialog box for opening the process.

【図6】 ファイリング処理に伴う傾き補正処理を簡単
に説明するための図である。
FIG. 6 is a diagram for simply explaining a tilt correction process accompanying the filing process.

【図7】 同傾き補正処理の一例を説明するための図で
ある。
FIG. 7 is a diagram illustrating an example of the inclination correction processing.

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

1…入力部、2…データ処理部、3…ファイル記憶部、
4…表示部、5…メモリ、6…ラスタデータ処理部、7
…ベクタデータ処理部、8…ファイル処理部、9…表示
制御部、10…傾き補正処理部、11…ラスタ/ベクタ
変換部、12…最長線分検出部、13…傾き検出部、1
4…傾き補正部、15…ベクタ/ラスタ変換部。
DESCRIPTION OF SYMBOLS 1 ... Input part, 2 ... Data processing part, 3 ... File storage part,
4 display unit, 5 memory, 6 raster data processing unit, 7
... Vector data processing unit, 8 file processing unit, 9 display control unit, 10 inclination correction processing unit, 11 raster / vector conversion unit, 12 longest line segment detection unit, 13 inclination detection unit, 1
4 ... inclination correction unit, 15 ... vector / raster conversion unit.

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B050 BA06 BA17 EA03 EA12 FA02 FA19 5B057 AA13 CA16 CA17 CB16 CB17 CD03 DC08 5C076 AA24 AA40 BA03 BA04 BA06 5L096 BA12 EA23 FA03 FA64 FA67 LA01 MA03  ────────────────────────────────────────────────── ─── Continued on the front page F term (reference) 5B050 BA06 BA17 EA03 EA12 FA02 FA19 5B057 AA13 CA16 CA17 CB16 CB17 CD03 DC08 5C076 AA24 AA40 BA03 BA04 BA06 5L096 BA12 EA23 FA03 FA64 FA67 LA01 MA03

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ラスタデータからなる図面データをベク
タデータに変換するステップと、 このステップで変換されたベクタデータの直線線分のう
ち、垂直又は水平方向に対して所定の角度範囲内で最も
長い直線線分を検出するステップと、 このステップで検出された前記直線線分を基準とし、予
めメモリ内のデータ処理領域に構築された水平垂直線分
のいずれか一方の線分と前記直線線分とが平行となるよ
うに前記ベクタデータ全体を移動して傾き補正処理をす
るステップと、 このステップで傾き補正されたベクタデータをラスタデ
ータの図面データに変換するステップとを備えたことを
特徴とする図面ファイルの傾き補正方法。
1. A step of converting drawing data consisting of raster data into vector data, and the longest linear line segment of the vector data converted in this step within a predetermined angle range with respect to the vertical or horizontal direction. A step of detecting a straight line segment; and any one of a horizontal and vertical line segment previously constructed in a data processing area in a memory, based on the straight line segment detected in this step, and the straight line segment. Moving the entire vector data so as to be parallel, and performing a tilt correction process, and converting the vector data corrected in tilt in this step into drawing data of raster data. To correct the inclination of the drawing file.
【請求項2】 ラスタデータからなる図面データを含む
図面ファイルを取り込むステップと、 このステップで取り込まれた前記図面ファイルを記憶す
るステップと、 このステップで記憶された前記図面ファイルのうち、オ
ペレータにより選択された図面ファイルをメモリに読み
込むステップと、 このステップでメモリに読み込まれた図面ファイルの図
面データをベクタデータに変換するステップと、 このステップで変換されたベクタデータの直線線分のう
ち、垂直又は水平方向に対して所定の角度範囲内で最も
長い直線線分を検出するステップと、 このステップで検出された前記直線線分を基準とし、予
め前記メモリ内のデータ処理領域に構築された水平垂直
線分のいずれか一方の線分と前記直線線分とが平行とな
るように前記ベクタデータ全体を移動して傾き補正処理
をするステップと、 このステップで傾き補正されたベクタデータをラスタデ
ータの図面データに変換するステップと、 このステップで変換された図面データを含む前記図面フ
ァイルを予め設定された出力先へ出力し保存するステッ
プとを備えたことを特徴とする図面ファイルのファイリ
ング方法。
2. A step of taking in a drawing file including drawing data composed of raster data, a step of storing the drawing file taken in in this step, and a step of selecting the drawing file stored in this step by an operator. Reading the converted drawing file into the memory; converting the drawing data of the drawing file read into the memory into the vector data into the vector data in this step; Detecting the longest straight line segment within a predetermined angle range with respect to the horizontal direction; and using the straight line segment detected in this step as a reference, the horizontal and vertical lines previously constructed in the data processing area in the memory. The vector data so that either one of the line segments is parallel to the straight line segment. Performing a tilt correction process by moving the entirety; converting the vector data corrected in tilt in this step into drawing data of raster data; presetting the drawing file including the drawing data converted in this step And filing the file to a designated output destination and storing the file.
【請求項3】 前記ラスタデータからなる図面データを
ベクタデータに変換するステップは、前記図面データの
うちの所定範囲のラスタデータのみをベクタデータに変
換するステップであることを特徴とする請求項1記載の
図面ファイルの傾き補正方法。
3. The method according to claim 1, wherein the step of converting the drawing data composed of raster data into vector data is a step of converting only raster data in a predetermined range of the drawing data into vector data. How to correct the inclination of the described drawing file.
【請求項4】 前記所定範囲は、前記図面データの外周
範囲であることを特徴とする請求項3記載の図面ファイ
ルのファイリング方法。
4. The filing method for a drawing file according to claim 3, wherein the predetermined range is an outer peripheral range of the drawing data.
【請求項5】 ラスタデータからなる図面データを含む
図面ファイルを取り込む処理と、 この処理で取り込まれた前記図面ファイルを記憶する処
理と、 この処理で記憶された前記図面ファイルのうち、オペレ
ータにより選択された図面ファイルをメモリに読み込む
処理と、 この処理でメモリに読み込まれた図面ファイルの図面デ
ータをベクタデータに変換する処理と、 この処理で変換されたベクタデータの直線線分のうち、
垂直又は水平方向に対して所定の角度範囲内で最も長い
直線線分を検出する処理と、 この処理で検出された前記直線線分を基準とし、予め前
記メモリ内のデータ処理領域に構築された水平垂直線分
のいずれか一方の線分とと前記直線線分とが平行となる
ように前記ベクタデータ全体を移動して傾き補正をする
処理と、 この処理で傾き補正されたベクタデータをラスタデータ
の図面データに変換する処理と、 この処理で変換された図面データを含む前記図面ファイ
ルを予め設定された出力先へ出力し保存する処理とを備
えた図面ファイルのファイリング処理プログラムを記憶
してなる媒体。
5. A process for importing a drawing file including drawing data composed of raster data, a process for storing the drawing file acquired in this process, and a process selected by an operator from the drawing files stored in this process. Reading the converted drawing file into the memory; converting the drawing data of the drawing file read into the memory into the vector data into the vector data; and processing the linear segments of the vector data converted by the processing.
A process of detecting the longest straight line segment within a predetermined angle range with respect to the vertical or horizontal direction; and, based on the straight line segment detected in this process, is constructed in advance in a data processing area in the memory. Processing for correcting the inclination by moving the entire vector data so that one of the horizontal and vertical line segments and the straight line segment are parallel to each other; Storing a drawing file filing processing program comprising: a process of converting data into drawing data; and a process of outputting and saving the drawing file including the drawing data converted by this process to a preset output destination. Medium.
JP2000350782A 2000-11-17 2000-11-17 Method for correcting inclination of drawing file, filing method and medium for storing its program Pending JP2002157573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000350782A JP2002157573A (en) 2000-11-17 2000-11-17 Method for correcting inclination of drawing file, filing method and medium for storing its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000350782A JP2002157573A (en) 2000-11-17 2000-11-17 Method for correcting inclination of drawing file, filing method and medium for storing its program

Publications (1)

Publication Number Publication Date
JP2002157573A true JP2002157573A (en) 2002-05-31

Family

ID=18823948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000350782A Pending JP2002157573A (en) 2000-11-17 2000-11-17 Method for correcting inclination of drawing file, filing method and medium for storing its program

Country Status (1)

Country Link
JP (1) JP2002157573A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236221A (en) * 2007-03-19 2008-10-02 Canon Inc Image supplying device, printer, their control method, and printing system
KR101385143B1 (en) 2012-06-27 2014-04-15 한국과학기술원 Method and apparatus for recognition object image using gravity

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236221A (en) * 2007-03-19 2008-10-02 Canon Inc Image supplying device, printer, their control method, and printing system
US8169646B2 (en) 2007-03-19 2012-05-01 Canon Kabushiki Kaisha Image-providing apparatus and control method thereof, printing apparatus and control method thereof, and printing system
KR101385143B1 (en) 2012-06-27 2014-04-15 한국과학기술원 Method and apparatus for recognition object image using gravity

Similar Documents

Publication Publication Date Title
US6954282B2 (en) Method and apparatus for processing an image, and storage medium
JPH0896157A (en) Method and device for editing image
JP2002157573A (en) Method for correcting inclination of drawing file, filing method and medium for storing its program
JP3890096B2 (en) Image editing system
US7605944B2 (en) Method of creating a plurality of images by single scanning and apparatus using the same
JPS5890642A (en) Image processing method
JPH0778620B2 (en) Layout scanner device
EP0984395A2 (en) Program storage medium
JPH06251115A (en) Image processor
JPH10191026A (en) Image processing device and method
JP3061701B2 (en) Filing device
JP2006270748A (en) Skew correction method, program, image processing apparatus, and image processing system
JPS6360671A (en) Document picture processor
JP2007174183A (en) Image processing apparatus and image processing method
JP2635312B2 (en) Image processing device
JPH05108879A (en) Method and device for processing image
JPH04276867A (en) Image editing system
JPS5860371A (en) Picture processing method
JP2000235651A (en) Compiling method/device for raster data
JPH0778622B2 (en) Layout scanner device
JPH11164141A (en) Image processor, image processing method and record medium with image processing program recorded therein
JPH07302322A (en) Picture display device
JPH08167041A (en) Drawing layout device
JPH09179285A (en) Form plate inspection device
JP2000099751A (en) Information processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070608

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20070820

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090721

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090918

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091208