JP2846486B2 - Image input device - Google Patents

Image input device

Info

Publication number
JP2846486B2
JP2846486B2 JP3035007A JP3500791A JP2846486B2 JP 2846486 B2 JP2846486 B2 JP 2846486B2 JP 3035007 A JP3035007 A JP 3035007A JP 3500791 A JP3500791 A JP 3500791A JP 2846486 B2 JP2846486 B2 JP 2846486B2
Authority
JP
Japan
Prior art keywords
data
line
image
contour
thinning
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
JP3035007A
Other languages
Japanese (ja)
Other versions
JPH04255080A (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.)
Hitachi Ltd
Via Mechanics Ltd
Original Assignee
Hitachi Ltd
Hitachi Seiko 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 Hitachi Ltd, Hitachi Seiko Ltd filed Critical Hitachi Ltd
Priority to JP3035007A priority Critical patent/JP2846486B2/en
Publication of JPH04255080A publication Critical patent/JPH04255080A/en
Application granted granted Critical
Publication of JP2846486B2 publication Critical patent/JP2846486B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図面等に描かれた画像
を画像データとして入力し、これを計算機で処理、取扱
い可能な数値情報(ベクトルデータ)に変換して記憶す
る画像入力装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image input device for inputting an image drawn on a drawing or the like as image data, converting the image data into numerical information (vector data) that can be processed and handled by a computer, and storing the converted numerical information. .

【0002】[0002]

【従来の技術】いわゆるCADシステムの普及に伴い、
光電変換素子により図面等に描かれた画像を読取り、そ
の画像データ(ラスタデータ)を線又は輪郭として認識
し、相当するベクトルデータに変換して記憶する画像入
力装置が提案されている。以下、従来の画像入力装置に
よる画像認識の概略を図10〜図13を用いて説明す
る。図10は画像入力装置の入力対象図面の説明図であ
る。図10で、1は記録紙、2は記録紙1に描かれた図
面を示す。図面2は、ハッチングが施された方形の塗り
潰し部分(塗り潰し画部)3と、この塗り潰し画部3か
ら両方向に真横に延びる2つの直線(線画部)4とで構
成されている。図11は図10に描かれた図面2の拡大
図である。図で、図10と同一部分には同一符号が付し
てある。W1 は線画部4の幅、W2 、W3 は線画部3か
ら上下方向に延びた塗り潰し画部3の輪郭の幅を示し、
幅W2 と幅W3 とは等しい。ここで、幅W1 は11画素
を含み、幅W2 (W3 )は15画素を含むものとする。
このような図面2は、まず、光電変換素子により読取ら
れ、所定のしきい値により二値化され、画像記憶部に記
憶される。この記憶は2ビット(背景ビットと芯線ビッ
ト)を用いて行われ、背景ビットには原画像データが最
後までそのまま記憶され、芯線ビットには加工処理中途
で得られたデータが記憶されるようになっている。画像
記憶部への記憶後、まず、背景ビットの画像データが同
一アドレスの芯線ビットへ複写される。次に、背景ビッ
トの画像データに対して、細線化処理、線追跡処理、お
よび輪郭線抽出処理が順に行われる。これらの処理は良
く知られているので、図12および図13を用いてその
概略を述べるに留める。細線化処理は、光電変換素子に
より得られた画像データに対して仮想上のマスクを用い
て実施される。図12は当該マスクの平面図である。図
12で、5は仮想上のマスクを示し、互いに隣接する9
つ(3×3)の領域を有する。50はマスク5の中心の
領域を示す。1つの領域には1画素が対応する。細線化
処理においては、背景ビットの画像データがマスク5に
より例えば図10で上下方向にかつ左から右へ走査され
る。この走査の間、領域50が常時注目され、領域50
の画素が端部となるとき、当該画素に相当する芯線ビッ
トのデータが0とされる。なお、前記「端部」は、領域
50の画素を除いたとき、マクス5内で分離された2以
上の画素グループがない場合の状態をいう。例えば、マ
スク5が図11の位置Aに対応する場合、マスク5の各
領域の画素は図12の左側の状態となり、領域50の画
素を抜いても分離された画素グループは生じない(領域
50の画素が端部となる)ので、当該画素に相当する芯
線ビットのデータは0とされる。マスク5が図11の位
置Bに対応する場合も同様に領域50の画素が端部とな
り、その芯線ビットのデータは0とされる。今、説明を
簡単にするため、例えば11画素以下を線画部、12画
素以上を塗り潰し画部と定義しておくと、上記細線化処
理の終了時、芯線ビットの画像データは図13に実線で
示すデータとなる。図13は細線化処理後の図面の拡大
図である。図で、10は細線化処理後に芯線ビットに記
憶されているデータに対応する図面、13は塗り潰し画
部、14は線画部を示す。背景ビットに記憶されている
データに対応する図面(図11に示す図面2)が破線で
示されている。線画部14は1画素幅の連続する線とな
る。次に、この図面10のデータに対して線追跡処理が
実施される。線追跡処理も図12に示すマスク5を用い
て行われ、領域50からみて、同一方向領域にのみ画素
が存在する場合これを追跡し、他方向領域に画素が現れ
たときその点が追跡の終点とし、追跡の始点と終点をベ
クトルデータとして他の記憶部に記憶する。このような
マスク5の使用方法は、上記細線化処理でのマスクの使
用方法から容易に理解されるものと考える(以下の輪郭
線抽出処理においても同じ)。図面10では2つの線画
部14がベクトルデータとして記憶される。次いで、残
りの塗り潰し画部13に対して輪郭線抽出処理が行われ
る。この輪郭線抽出処理も図12に示すマスク5を用い
て実施され、領域50からみて、塗り潰し画部13の端
縁が追跡され、画素の方向変換点が探索される。これら
変換点(特徴点)がベクトルデータとして他の記憶部に
記憶される。以上の処理により、図10に示す図面2が
計算機で処理、取扱可能なベクトルデータとして得られ
る。
2. Description of the Related Art With the spread of CAD systems,
2. Description of the Related Art There has been proposed an image input device which reads an image drawn on a drawing or the like by a photoelectric conversion element, recognizes the image data (raster data) as a line or a contour, converts the image data into corresponding vector data, and stores the converted vector data. Hereinafter, an outline of image recognition by a conventional image input device will be described with reference to FIGS. FIG. 10 is an explanatory diagram of an input target drawing of the image input device. In FIG. 10, reference numeral 1 denotes a drawing drawn on the recording paper 2 and 2 denotes a drawing drawn on the recording paper 1. The drawing 2 includes a hatched rectangular filled portion (filled image portion) 3 and two straight lines (line drawing portions) 4 extending from the filled image portion 3 in both directions. FIG. 11 is an enlarged view of FIG. 2 depicted in FIG. In the figure, the same parts as those in FIG. 10 are denoted by the same reference numerals. W 1 indicates the width of the line drawing portion 4, W 2 and W 3 indicate the width of the outline of the filled image portion 3 extending vertically from the line drawing portion 3,
It is equal to the width W 2 and the width W 3. Here, the width W 1 comprises 11 pixels, the width W 2 (W 3) is intended to include 15 pixels.
Such a drawing 2 is first read by the photoelectric conversion element, binarized by a predetermined threshold value, and stored in the image storage unit. This storage is performed using two bits (background bit and skeleton line bit). The background bit stores original image data as it is until the end, and the skeleton line bit stores data obtained during the processing. Has become. After storing in the image storage unit, first, the image data of the background bit is copied to the core line bit of the same address. Next, thinning processing, line tracing processing, and contour line extraction processing are sequentially performed on the background bit image data. Since these processes are well known, only the outline thereof will be described with reference to FIGS. The thinning processing is performed on image data obtained by the photoelectric conversion element using a virtual mask. FIG. 12 is a plan view of the mask. In FIG. 12, reference numeral 5 denotes a virtual mask,
(3 × 3) areas. Reference numeral 50 denotes a central region of the mask 5. One pixel corresponds to one region. In the thinning process, the image data of the background bit is scanned by the mask 5 in the vertical direction in FIG. During this scanning, the area 50 is always noticed,
, The data of the core line bit corresponding to the pixel is set to 0. Note that the “edge” refers to a state in which two or more pixel groups separated in the mask 5 do not exist when the pixels in the region 50 are excluded. For example, when the mask 5 corresponds to the position A in FIG. 11, the pixels in each region of the mask 5 are in the state on the left side in FIG. 12, and even if the pixels in the region 50 are omitted, no separated pixel group is generated (the region 50). Is the end), and the data of the core line bit corresponding to the pixel is set to 0. Similarly, when the mask 5 corresponds to the position B in FIG. 11, the pixels of the region 50 are at the end, and the data of the core line bit is set to 0. For the sake of simplicity, for example, if 11 pixels or less are defined as a line drawing part and 12 pixels or more are defined as a solid drawing part, the image data of the core bit is indicated by a solid line in FIG. Data. FIG. 13 is an enlarged view of the drawing after the thinning processing. In the drawing, reference numeral 10 denotes a drawing corresponding to the data stored in the core line bits after the thinning processing, 13 denotes a solid image portion, and 14 denotes a line image portion. The drawing (the drawing 2 shown in FIG. 11) corresponding to the data stored in the background bit is indicated by a broken line. The line drawing section 14 is a continuous line having a width of one pixel. Next, a line tracing process is performed on the data of FIG. The line tracing process is also performed by using the mask 5 shown in FIG. 12, and when the pixel is present only in the same direction region as seen from the region 50, this is traced. When the pixel appears in the other direction region, the point is traced. The end point is set, and the start point and the end point of the tracking are stored as vector data in another storage unit. It is considered that such a method of using the mask 5 is easily understood from the method of using the mask in the thinning processing (the same applies to the following contour line extraction processing). In FIG. 10, two line drawing units 14 are stored as vector data. Next, a contour line extraction process is performed on the remaining painted image portion 13. This contour line extraction processing is also performed using the mask 5 shown in FIG. 12, and the edge of the solid image portion 13 is traced from the region 50, and a direction change point of the pixel is searched. These conversion points (feature points) are stored in another storage unit as vector data. By the above processing, Drawing 2 shown in FIG. 10 is obtained as vector data that can be processed and handled by the computer.

【0003】[0003]

【発明が解決しようとする課題】ところで、上記従来技
術においては、細線化処理を行ったデータに対して輪郭
線抽出処理を実施するので、次のような不都合が生じて
いた。これを図14により説明する。図14は塗り潰し
画部の拡大図である。図で、破線3は図11に示す原画
像データに対応する塗り潰し画部、実線13は細線化処
理後のデータに対応する塗り潰し画部である。輪郭線抽
出処理が実施されるのは塗り潰し画部13に対してであ
り、これにより得られるベクトルデータは、図から明ら
かなように原画像データ(塗り潰し画部3のデータ)よ
り縮小されたデータとなる。上記例の場合、線画部4は
細線化処理が5回繰り返されることにより1画素幅の線
画部14となるが、同時に、塗り潰し画部3に対しても
細線化が実施されるので、細線化処理後の塗り潰し画部
13は、その周囲が5画素分削除されたものとなる。し
たがって、図面の塗り潰し画部に対して正確なベクトル
データを得ることができないという問題が生じていた。
本発明の目的は、上記従来技術における課題を解決し、
塗り潰し画部に対しても正確なデータを得ることができ
る画像入力装置を提供するにある。
However, in the above-mentioned prior art, since the contour line extraction processing is performed on the data subjected to the thinning processing, the following inconvenience has occurred. This will be described with reference to FIG. FIG. 14 is an enlarged view of the solid image portion. In the figure, a broken line 3 is a solid image portion corresponding to the original image data shown in FIG. 11, and a solid line 13 is a solid image portion corresponding to the data after the thinning processing. The contour line extraction process is performed on the filled image portion 13, and the vector data obtained by this process is data that is reduced from the original image data (data of the filled image portion 3) as is apparent from the drawing. Becomes In the case of the above example, the line drawing section 4 becomes a line drawing section 14 having a width of one pixel by repeating the thinning processing five times. At the same time, the line drawing section 3 is also subjected to thinning. After the processing, the filled image portion 13 has its surroundings deleted by 5 pixels. Therefore, there has been a problem that accurate vector data cannot be obtained for a solid image portion of the drawing.
An object of the present invention is to solve the above problems in the prior art,
An object of the present invention is to provide an image input device capable of obtaining accurate data even for a solid image portion.

【0004】[0004]

【課題を解決するための手段】上記の目的を達成するた
め、本発明は、図面を走査し所定のしきい値で二値化し
画像データとして出力する走査入力部と、これら画像デ
ータを記憶する記憶部と、この記憶部から各画像データ
をとりだして細線化する細線化手段と、この細線化手段
により得られた線画部を追跡し線データとして記憶させ
る線追跡手段と、前記細線化手段により得られた塗り潰
し画部の輪郭をたどり輪郭データとして記憶させる輪郭
線抽出手段とを備えた画像入力装置において、前記輪郭
線抽出手段の抽出対象となる前記輪郭データを前記細線
化手段の細線化の程度に応じて拡張する輪郭拡張手段を
設けたことを特徴とする。又、本発明の他の発明は、上
記画像入力装置において、前記輪郭拡張手段を介し前記
輪郭線抽出手段で得られた輪郭データおよび前記細線化
手段により得られたデータに基づいて当該輪郭内の線分
の有無を検出する検出手段と、この検出手段により線分
が検出されたときこれを消去する消去手段とを設けたこ
とを特徴とする。
According to the present invention, there is provided a scanning input section for scanning a drawing, binarizing the drawing with a predetermined threshold value, and outputting the image data as image data, and storing the image data. A storage unit, a thinning unit that extracts each image data from the storage unit and thins the line data, a line tracing unit that tracks a line drawing unit obtained by the thinning unit and stores the line drawing data as line data, And an outline extracting means for storing the outline of the obtained painted image portion as traced outline data, wherein the outline data to be extracted by the outline extracting means is subjected to thinning by the thinning means. The present invention is characterized in that a contour expanding means for expanding according to the degree is provided. Further, another aspect of the present invention is the image input device, wherein the contour in the contour is obtained based on the contour data obtained by the contour line extracting means and the data obtained by the thinning means via the contour expanding means. A detection means for detecting the presence or absence of a line segment and an erasing means for erasing a line segment when the detection means detects the line segment are provided.

【0005】[0005]

【作用】輪郭線抽出手段を実行する前に、細線化処理手
段により得られた塗り潰し画部の輪郭を、細線化の程度
に応じて拡張する処理を行い、この拡張された塗り潰し
画部に対して輪郭線抽出処理を行う。又、原図面におい
て、線画部と塗り潰し画部とが接触又は近接している場
合、上記のように塗り潰し画部の拡張を行うと、拡張さ
れた輪郭を構成する閉ループの内部に線画部データが存
在することとなるので、この線画部データを消去する。
Before executing the contour extracting means, a process of extending the contour of the solid image obtained by the thinning processing means in accordance with the degree of thinning is performed. To perform contour line extraction processing. Also, in the original drawing, if the line drawing portion and the filled image portion are in contact with or close to each other, and the fill image portion is extended as described above, the line drawing portion data is stored inside the closed loop forming the expanded outline. Since the line drawing data exists, the line drawing part data is deleted.

【0006】[0006]

【実施例】以下、本発明を図示の実施例に基づいて説明
する。図1は本発明の実施例に係る画像入力装置のブロ
ック図である。図で、20は光電変換素子を備えた走査
入力部であり、記録紙に描かれた図面を読取り、これを
所定のしきい値で二値化した画像データとして出力す
る。21は走査入力部20から出力された画像データを
記憶する画像記憶部である。画像記憶部21は1つの画
像データに対して前述のように背景ビットおよび芯線ビ
ットを有し、走査入力部20からの画像データは背景ビ
ットに記憶される。22は画像演算部であり、画像記憶
部21の背景ビットからとりだした画像データに基づい
て論理演算により細線化処理および後述する輪郭拡張処
理(太線化処理)を行い、その結果は画像記憶部21の
芯線ビットに記憶される。23は認識処理部であり、画
像記憶部21の芯線ビットに記憶されたデータに基づい
て理論演算により前述の線追跡処理、輪郭線抽出処理、
および後述する内線消去処理を行う。24は認識処理部
23の処理により得られたベクトルデータ(座標デー
タ)を記憶する座標列データ記憶部である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the illustrated embodiments. FIG. 1 is a block diagram of an image input device according to an embodiment of the present invention. In the figure, reference numeral 20 denotes a scanning input unit provided with a photoelectric conversion element, which reads a drawing drawn on a recording paper and outputs it as image data binarized by a predetermined threshold value. Reference numeral 21 denotes an image storage unit that stores image data output from the scan input unit 20. The image storage unit 21 has the background bit and the core line bit for one image data as described above, and the image data from the scan input unit 20 is stored in the background bit. Reference numeral 22 denotes an image calculation unit which performs a thinning process and a contour expansion process (thickening process) described later by a logical operation based on the image data extracted from the background bits of the image storage unit 21, and the result is stored in the image storage unit 21. Are stored in the core bit. Reference numeral 23 denotes a recognition processing unit that performs the above-described line tracing processing, contour extraction processing, and theoretical calculation based on the data stored in the core line bits of the image storage unit 21.
Then, an extension elimination process described later is performed. Reference numeral 24 denotes a coordinate sequence data storage unit that stores vector data (coordinate data) obtained by the processing of the recognition processing unit 23.

【0007】次に、本実施例の動作を、図2〜図9を参
照しながら説明する。本実施例では、図10に示す図面
よりやや複雑な図3に示す図面を例示して説明する。図
3は図10と同じく画像入力装置の入力対象図面の説明
図である。図3で、1は記録紙、30は記録紙1に描か
れた図面を示す。図面30は、方形の一部が三角形に突
出しハッチングが施された塗り潰し部分(塗り潰し画
部)31と、この塗り潰し画部31から左方向に真横に
延びる1つの直線(線画部)32とで構成されている。
図4は図3に描かれた図面30の拡大図である。図で、
図3と同一部分には同一符号が付してある。W1 〜W3
は図11に示すものと同一寸法を示す。31aは塗り潰
し画部31の方形部分、31bは塗り潰し画部31の三
角形突出部分である。三角形突出部分31bの先端部の
縦方向寸法は寸法W1 以下となっている。このような図
面30に対して、本実施例では図2に示すフローチャー
トに従って処理が成される。即ち、まず、画像演算部2
2は画像記憶部21から図4に示す画像データを取出
し、これに対して所定線幅(さきの例にしたがって11
画素とする。)に相当する細線化処理が成される(図2
に示す手順S1 )。なお、この細線化処理、および後述
する線追跡処理と輪郭線抽出処理についてはさきに述べ
たので、説明は省略する。図5は手順S1 の細線化処理
後の図面の拡大図である。図5で、破線で示される30
は図4に示すものと同じ図面、40は細線化処理後の図
形を示す。41は塗り潰し画部31に相当する塗り潰し
画部、42は直線32に相当する線画部、43は三角形
突出部31bの先端部分の細線化の結果生じた線画部で
ある。この細線化の結果は、画像記憶部21の芯線ビッ
トに記憶される。なお、図5で、P1 〜P4 は線画部の
先端点を示し、括弧内はその座標を示す。
Next, the operation of this embodiment will be described with reference to FIGS. In the present embodiment, the drawing shown in FIG. 3 which is slightly more complicated than the drawing shown in FIG. 10 will be described as an example. FIG. 3 is an explanatory diagram of an input target drawing of the image input device, similarly to FIG. In FIG. 3, reference numeral 1 denotes a recording sheet, and reference numeral 30 denotes a drawing drawn on the recording sheet 1. The drawing 30 is composed of a hatched portion (filled image portion) 31 in which a part of a rectangle protrudes into a triangle and is hatched, and one straight line (line drawing portion) 32 extending rightward from the filled image portion 31 to the left. Have been.
FIG. 4 is an enlarged view of the drawing 30 depicted in FIG. In the figure,
The same parts as those in FIG. 3 are denoted by the same reference numerals. W 1 to W 3
Indicates the same dimensions as those shown in FIG. Reference numeral 31a denotes a square portion of the filled image portion 31, and reference numeral 31b denotes a triangular projecting portion of the filled image portion 31. Vertical dimension of the distal end portion of the triangular projecting portion 31b has a size W 1 below. In this embodiment, processing is performed on such a drawing 30 according to the flowchart shown in FIG. That is, first, the image calculation unit 2
2 fetches the image data shown in FIG. 4 from the image storage unit 21 and outputs a predetermined line width (11 in accordance with the above example).
Pixels. ) Is performed (FIG. 2).
Procedure S 1 ). Since the thinning processing, the line tracing processing, and the contour extraction processing described later have been described above, the description will be omitted. Figure 5 is an enlarged view of the drawing after the thinning processing steps S 1. In FIG. 5, 30 indicated by a broken line
Is the same drawing as that shown in FIG. 4, and 40 is a figure after the thinning processing. Reference numeral 41 denotes a solid image portion corresponding to the solid image portion 31, reference numeral 42 denotes a line image portion corresponding to the straight line 32, and reference numeral 43 denotes a line image portion resulting from thinning of the distal end portion of the triangular protrusion 31b. The result of the thinning is stored in the core bit of the image storage unit 21. In FIG. 5, P 1 to P 4 indicate the leading end points of the line drawing part, and the parentheses indicate the coordinates.

【0008】次いで、認識処理部23は画像記憶部21
の芯線ビットからデータを取出し、線追跡処理を行う
(手順S2 )。この線追跡処理により、線画部42、4
3が線分として取出され、これらがベクトルデータとし
て座標列データ記憶部24へ記憶される。即ち、先端点
1 〜P4 の座標(x1 、y1 )〜(x4 、y4 )が記
憶される。この記憶が終了すると、画像記憶部21の芯
線ビットに記憶されていた線画部42、43の画像デー
タは消去され、塗り潰し画部41の画像データのみが残
る。次に、画像演算部22は、画像記憶部21の芯線ビ
ットに残された塗り潰し画部41の画像データを取出
し、その周囲1画素の領域に1画素分のデータを追加し
てゆく太線化処理を行う(手順S3 )。この太線化処理
は、細線化処理の回数だけ実施される。11画素以下を
線画部として認識する上記の例によると、太線化処理は
5回実行されることになる。この太線化処理の結果が図
6に示されている。図6は太線化処理後の図面の拡大図
である。図6で、実線で示す31は太線処理の結果元の
図面30の塗り潰し画部と同一となった塗り潰し画部で
あり、破線41は図5に示す細線化処理後の塗り潰し画
部である。又、P4 〜P10は塗り潰し画部31の特徴点
(直線の方向変換点)を示し、括弧内はその座標を示
す。手順S3 の太線化処理の結果は再び画像記憶部21
の芯線ビットへ格納される。そして、過剰の太線化処理
が成されていないか否かチエックされ、過剰部分があれ
ば修正される(手順S4 )。上記チエックは、画像演算
部22が、画像記憶部21の同一アドレスの背景ビット
のデータと芯線ビットのデータを取出し、それらの論理
積を演算することにより行われる。この演算による修正
の結果は再び芯線ビットに格納される。この状態で、認
識処理部23は画像記憶部21の芯線ビットから塗り潰
し画部の画像データを取出し、塗り潰し画部31の輪郭
線を追跡する輪郭線抽出処理を行う(手順S5 )。そし
て、特徴点P4 〜P10の各座標を順にベクトルデータと
して座標列データ記憶部24へ格納する。この時点にお
ける座標列データ記憶部24の記憶データを図8に示
す。図8は座標列データ記憶部24の記憶内容説明図で
ある。図8で、M0〜M29はアドレス名であり、各アド
レスに格納されているデータ中、x1 、y1 〜x10、y
10は図5、6に示す座標である。又、アドレスM0 、M
6 のデータ「2」はそれぞれ線画部42、43の先端点
の数、アドレスM12のデータ「8」は塗り潰し画部31
の特徴点の数を示し、アドレスM1 、M7 のデータ
「0」は線画の開図形、アドレスM13のデータ「2」は
輪郭線であることを示す。即ち、アドレスM0 、M1
アドレスM6 、M7 とアドレスM12、M13とは図面の線
種を表すデータであり、それら線種データ間の最初の2
アドレスが線の始点、最後の2アドレスが終点の座標で
ある。
[0008] Next, the recognition processing section 23 is operated by the image storage section 21.
Then, data is extracted from the core line bit of ( 1 ) and a line tracing process is performed (step S 2 ). By this line tracking processing, the line drawing units 42, 4
3 are extracted as line segments, and these are stored in the coordinate sequence data storage unit 24 as vector data. That is, the coordinates (x 1, y 1) of the center point P 1 ~P 4 ~ (x 4 , y 4) are stored. When this storage is completed, the image data of the line drawing units 42 and 43 stored in the core line bit of the image storage unit 21 is deleted, and only the image data of the solid image unit 41 remains. Next, the image calculation unit 22 takes out the image data of the solid image unit 41 remaining in the core line bits of the image storage unit 21 and adds one pixel data to an area of one pixel around the thick line processing. It is carried out (Step S 3). This thick line processing is performed by the number of times of the thin line processing. According to the above example in which 11 pixels or less are recognized as a line drawing part, the thick line processing is executed five times. The result of this thickening process is shown in FIG. FIG. 6 is an enlarged view of the drawing after the thickening processing. In FIG. 6, reference numeral 31 shown by a solid line denotes a filled image portion which is the same as the original filled image portion of the drawing 30 as a result of the thick line processing, and broken line 41 denotes a filled image portion after the thinning process shown in FIG. P 4 to P 10 indicate characteristic points (straight line direction conversion points) of the solid image portion 31, and the coordinates in parentheses indicate the coordinates. Step S 3 of bolding process results again image storage unit 21
Are stored in the core bit. Then, it is checked whether or not excessive thickening processing has been performed, and if there is an excessive portion, it is corrected (step S 4 ). The checking is performed by the image calculation unit 22 taking out the background bit data and the core line bit data at the same address in the image storage unit 21 and calculating the logical product of them. The result of the correction by this operation is stored again in the core bit. In this state, the recognition processing unit 23 extracts the image data of the fill image portion from the core wire-bit image storage unit 21 performs edge extraction processing for tracking the outline of fill-image portion 31 (Step S 5). Then, the coordinates of the feature points P 4 to P 10 are sequentially stored as vector data in the coordinate sequence data storage unit 24. FIG. 8 shows the data stored in the coordinate sequence data storage unit 24 at this time. FIG. 8 is an explanatory diagram of the stored contents of the coordinate string data storage unit 24. In FIG. 8, M 0 to M 29 are address names, and x 1 , y 1 to x 10 , y in data stored at each address.
Reference numeral 10 denotes the coordinates shown in FIGS. Addresses M 0 , M
The number of 6 data "2" each tip point of the line drawing unit 43, the data "8" in the address M 12 Fill picture 31
The data “0” at addresses M 1 and M 7 indicates an open figure of a line drawing, and the data “2” at address M 13 indicates a contour line. That is, the addresses M 0 , M 1 , the addresses M 6 , M 7 and the addresses M 12 , M 13 are data representing the line types in the drawing, and the first two
The address is the coordinates of the start point of the line, and the last two addresses are the coordinates of the end point.

【0009】ところで、上記図8に示すベクトルデータ
に従って図面を描くと図7に示すような図面が出現す
る。図7は塗り潰し画部31の拡大図である。図で、図
6に示す部分と同一部分には同一符号が付してある。4
20は線画部42の一部を示す。図7から明らかなよう
に、線画部43、420は塗り潰し画部31の領域内に
存在し、全く不要のデータ(ノイズ)である。このよう
な不要のデータは、手順S1 、S2 の細線化処理および
線追跡処理により得られた線画部のデータが、手順S3
の太線化処理による塗り潰し画部の拡大により塗り潰し
画部の領域内に残ってしまったものである。図2に示す
手順S6 では当該不要のデータを消去する処理を行う。
即ち、認識処理部23は、座標列データ記憶部24から
塗り潰し画部の輪郭線データ(図8のアドレスM14〜M
29のデータ)を取出し、これらのデータに対して各線画
部のデータを順次取出して周知の内外判定を行う。線画
部43はその全部が塗り潰し画部31の領域内にあるの
で、そのデータ全てが消去される。又、線画部42はそ
の一部420が領域内にあるので、輪郭線との交点P20
の座標(x20、y20)を見出し、点P20と点P2 との間
の線分を消去する。これら消去が終了した後、消去の結
果のデータが改めて座標列データ記憶部24に格納され
る。この状態における座標列データ記憶部24の内容が
図9に示されている。図9は座標列データ記憶部24の
記憶内容説明図である。図9から明らかなように、消去
されたデータがあると、後続のデータは順次上位のアド
レスに繰り上げ格納される。このように、本実施例で
は、細線化処理後のデータに対して太線化処理を行って
から輪郭線抽出処理を行うようにしたので、塗り潰し画
部が縮小されることはなく、正確な画像を得ることがで
きる。又、太線化処理により不要なデータが発生しても
消去手段によりこれを消去するので、最終的に正確なベ
クトルデータを得ることができる。なお、線画部と塗り
潰し画部との間隔が離れており、太線化処理を行っても
塗り潰し画部領域内に不要データが残らないことが明ら
かな場合には、当然、内線消去は不要である。
By the way, if a drawing is drawn according to the vector data shown in FIG. 8, a drawing as shown in FIG. 7 appears. FIG. 7 is an enlarged view of the painting section 31. In the figure, the same parts as those shown in FIG. 6 are denoted by the same reference numerals. 4
Reference numeral 20 denotes a part of the line drawing unit 42. As is clear from FIG. 7, the line drawing units 43 and 420 are present in the area of the solid image unit 31 and are completely unnecessary data (noise). Such unnecessary data is obtained by converting the data of the line drawing portion obtained by the thinning processing and the line tracing processing in steps S 1 and S 2 into the data in step S 3.
Are left in the area of the filled image portion due to the enlargement of the filled image portion by the thick line processing. In step S 6 shown in FIG. 2 performs a process of erasing the unnecessary data.
That is, the recognition processing unit 23 stores the outline data of the solid image portion (addresses M 14 to M in FIG. 8) from the coordinate sequence data storage unit 24.
29 data), the data of each line drawing part is sequentially taken out of these data, and a well-known inside / outside judgment is performed. Since the entire line drawing section 43 is in the area of the solid image section 31, all the data is erased. In addition, since the line drawing part 42 has a part 420 in the area, the intersection P 20 with the contour line is obtained.
Is found (x 20 , y 20 ), and the line segment between the points P 20 and P 2 is deleted. After the erasure is completed, the data resulting from the erasure is stored in the coordinate sequence data storage unit 24 again. FIG. 9 shows the contents of the coordinate sequence data storage unit 24 in this state. FIG. 9 is an explanatory diagram of the storage contents of the coordinate string data storage unit 24. As is clear from FIG. 9, when there is erased data, the subsequent data is sequentially stored at the higher address. As described above, in the present embodiment, the contour line extraction processing is performed after the thick line processing is performed on the data after the thin line processing, so that the filled image portion is not reduced, and an accurate image Can be obtained. Further, even if unnecessary data is generated by the bolding processing, it is deleted by the erasing means, so that accurate vector data can be finally obtained. In addition, if the interval between the line drawing portion and the filled-in drawing portion is large and it is clear that unnecessary data does not remain in the filled-out drawing portion region even after performing the thickening process, it is needless to say that the line elimination is unnecessary. .

【0010】[0010]

【発明の効果】以上述べたように、本発明では、細線化
処理後のデータに対して輪郭拡張を行ってから輪郭線抽
出処理を行うようにしたので、塗り潰し画部が縮小され
ることはなく、正確な画像を得ることができる。又、太
線化処理により不要なデータが発生しても消去手段によ
りこれを消去するので、最終的に正確なベクトルデータ
を得ることができる。
As described above, according to the present invention, since the contour extraction processing is performed after performing the contour expansion on the data after the thinning processing, it is possible to reduce the size of the solid image portion. And an accurate image can be obtained. Further, even if unnecessary data is generated by the bolding processing, it is deleted by the erasing means, so that accurate vector data can be finally obtained.

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

【図1】本発明の実施例に係る画像入力装置のブロック
図である。
FIG. 1 is a block diagram of an image input device according to an embodiment of the present invention.

【図2】図1に示す装置の動作を説明するフローチャー
トである。
FIG. 2 is a flowchart illustrating the operation of the apparatus shown in FIG.

【図3】入力対象図面を示す平面図である。FIG. 3 is a plan view showing an input target drawing.

【図4】図3に示す図面の拡大図である。FIG. 4 is an enlarged view of the drawing shown in FIG. 3;

【図5】図3に示す図面の細線化処理後の拡大図であ
る。
FIG. 5 is an enlarged view of the drawing shown in FIG. 3 after the thinning processing.

【図6】図3に示す図面の太細線化処理後の塗り潰し画
部の拡大図である。
FIG. 6 is an enlarged view of a solid image portion after the thick and thin line processing of the drawing shown in FIG. 3;

【図7】図3に示す図面の輪郭線抽出処理後の拡大図で
ある。
FIG. 7 is an enlarged view of the drawing shown in FIG. 3 after a contour line extraction process.

【図8】図1に示す座標列データ記憶部の記憶内容説明
図である。
FIG. 8 is an explanatory diagram of storage contents of a coordinate sequence data storage unit shown in FIG.

【図9】図1に示す座標列データ記憶部の記憶内容説明
図である。
FIG. 9 is an explanatory diagram of storage contents of a coordinate sequence data storage unit shown in FIG. 1;

【図10】入力対象図面を示す平面図である。FIG. 10 is a plan view showing an input target drawing.

【図11】図10に示す図面の拡大図である。FIG. 11 is an enlarged view of the drawing shown in FIG. 10;

【図12】各処理に使用されるマスクの説明図である。FIG. 12 is an explanatory diagram of a mask used for each processing.

【図13】図10に示す図面の細線化処理後の拡大図で
ある。
FIG. 13 is an enlarged view of the drawing shown in FIG. 10 after the thinning processing.

【図14】図10に示す図面の細線化処理後の拡大図で
ある。
FIG. 14 is an enlarged view of the drawing shown in FIG. 10 after the thinning processing.

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

20 走査入力部 21 画像記憶部 22 画像演算部 23 認識処理部 24 座標列データ記憶部 Reference Signs List 20 scanning input unit 21 image storage unit 22 image calculation unit 23 recognition processing unit 24 coordinate sequence data storage unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤井 充 神奈川県海老名市上今泉2100番地 日立 精工株式会社内 (72)発明者 溝口 繁孝 神奈川県海老名市上今泉2100番地 日立 精工株式会社内 (56)参考文献 特開 平3−12786(JP,A) 特開 平1−206470(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06T 9/00 - 9/20──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Mitsuru Fujii 2100 Kamiimaizumi, Ebina City, Kanagawa Prefecture Inside Hitachi Seiko Co., Ltd. (72) Inventor Shigetaka Mizoguchi 2100 Kamiimaizumi, Ebina City, Kanagawa Prefecture Inside Hitachi Seiko Co., Ltd. (56) References JP-A-3-12786 (JP, A) JP-A-1-206470 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06T 9/00-9/20

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 図面を走査し所定のしきい値で二値化し
画像データとして出力する走査入力部と、これら画像デ
ータを記憶する記憶部と、この記憶部から各画像データ
をとりだして細線化する細線化手段と、この細線化手段
により得られた線画部を追跡し線データとして記憶させ
る線追跡手段と、前記細線化手段により得られた塗り潰
し画部の輪郭をたどり輪郭データとして記憶させる輪郭
線抽出手段とを備えた画像入力装置において、前記輪郭
線抽出手段の抽出対象となる前記輪郭データを前記細線
化手段の細線化の程度に応じて拡張する輪郭拡張手段を
設けたことを特徴とする画像入力装置。
1. A scanning input unit which scans a drawing and binarizes it with a predetermined threshold value and outputs it as image data, a storage unit for storing these image data, and takes out each image data from this storage unit and thins it. Thinning means, a line tracing means for tracing the line drawing portion obtained by the thinning means and storing it as line data, and a contour for storing the contour of the solid drawing part obtained by the thinning means as tracing contour data An image input device comprising a line extracting unit, wherein an outline extending unit for expanding the outline data to be extracted by the outline extracting unit in accordance with a degree of thinning of the thinning unit is provided. Image input device.
【請求項2】 請求項1記載の画像入力装置において、
前記輪郭拡張手段を介し前記輪郭線抽出手段で得られた
輪郭データおよび前記細線化手段により得られた線デー
タに基づいて当該輪郭内の線分の有無を検出する検出手
段と、この検出手段により線分が検出されたときこれを
消去する消去手段とを設けたことを特徴とする画像入力
装置。
2. The image input device according to claim 1, wherein
Detecting means for detecting the presence or absence of a line segment in the contour based on the contour data obtained by the contour line extracting means and the line data obtained by the thinning means via the contour expanding means; An image input device, comprising: an erasing means for erasing a line segment when the line segment is detected.
JP3035007A 1991-02-06 1991-02-06 Image input device Expired - Fee Related JP2846486B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3035007A JP2846486B2 (en) 1991-02-06 1991-02-06 Image input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3035007A JP2846486B2 (en) 1991-02-06 1991-02-06 Image input device

Publications (2)

Publication Number Publication Date
JPH04255080A JPH04255080A (en) 1992-09-10
JP2846486B2 true JP2846486B2 (en) 1999-01-13

Family

ID=12430034

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3035007A Expired - Fee Related JP2846486B2 (en) 1991-02-06 1991-02-06 Image input device

Country Status (1)

Country Link
JP (1) JP2846486B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013019845A (en) * 2011-07-13 2013-01-31 Chuo Spring Co Ltd Image processing device, method and program for calculating shape of spiral spring

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07136360A (en) * 1993-11-15 1995-05-30 Brother Ind Ltd Embroidery data generating device
JPH10118367A (en) * 1996-10-18 1998-05-12 Brother Ind Ltd Image data processing apparatus and embroidey data processing apparatus
JP6786874B2 (en) * 2016-05-20 2020-11-18 日本電気株式会社 Needle meter detector, method and program
EP3578363B1 (en) * 2018-06-07 2022-09-14 CL Schutzrechtsverwaltungs GmbH Method for operating an apparatus for additively manufacturing three-dimensional objects

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013019845A (en) * 2011-07-13 2013-01-31 Chuo Spring Co Ltd Image processing device, method and program for calculating shape of spiral spring

Also Published As

Publication number Publication date
JPH04255080A (en) 1992-09-10

Similar Documents

Publication Publication Date Title
JP2940936B2 (en) Tablespace identification method
US5075895A (en) Method and apparatus for recognizing table area formed in binary image of document
JP2597006B2 (en) Rectangular coordinate extraction method
CN112364834A (en) Form identification restoration method based on deep learning and image processing
JP2846486B2 (en) Image input device
JP3698867B2 (en) Circular pattern determination method, apparatus and recording medium
JP2002342710A (en) Character segmenting device and character segmenting method used for the same device and its program
JP2010258627A (en) Image processor, image processing method, program, and storage medium
JP2506071B2 (en) Contour tracking device
JP2755299B2 (en) Image processing method
JP2954778B2 (en) Method for connecting line figure branch point of image input device
JP2587812B2 (en) Figure extraction method
JP3190794B2 (en) Character segmentation device
JP2966448B2 (en) Image processing device
JPH0271379A (en) Picture processor
JPH04156691A (en) Image area extracting method
JP2650443B2 (en) Line figure vectorization method
JPH05242297A (en) Character segmenting method
JP2000259826A (en) Method and device for extracting ruled line and recording medium
JPH10312460A (en) Image processing method and high precision image processor
JPH0821059B2 (en) Unnecessary data removal method for character contour generation
JPH01189787A (en) Method and device for extracting feature
JPH08221518A (en) Optical character reader
JPH08185473A (en) Character recognition device
JPH07325921A (en) Device and method for extracting connected area

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19981013

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

Free format text: PAYMENT UNTIL: 20071030

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20081030

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091030

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20091030

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101030

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees