JPH04255080A - Image input device - Google Patents

Image input device

Info

Publication number
JPH04255080A
JPH04255080A JP3035007A JP3500791A JPH04255080A JP H04255080 A JPH04255080 A JP H04255080A JP 3035007 A JP3035007 A JP 3035007A JP 3500791 A JP3500791 A JP 3500791A JP H04255080 A JPH04255080 A JP H04255080A
Authority
JP
Japan
Prior art keywords
line
data
image
filled
processing
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
JP3035007A
Other languages
Japanese (ja)
Other versions
JP2846486B2 (en
Inventor
Kazuo Watanabe
一雄 渡辺
Shigeru Kakumoto
角本 繁
Mitsuru Fujii
充 藤井
Shigetaka Mizoguchi
溝口 繁孝
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

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To obtain an accurate image by preventing a paint out image part from being contracted at the time of converting a drawing into vector data. CONSTITUTION:Image data from a scanning input part 20 are stored in an image storing part 21. An image operation part 22 executes thinning processing of the image data and then a recognizing processing part 23 obtains the vector data of a linear image part by line tracing processing. Then the image operation part 22 extends the outline of a paint out image part and the processing part 23 executes outline extracting processing based upon the extended result of the outline. When necessary, the processing part 23 erases segments in the outline.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

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

【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が
計算機で処理、取扱可能なベクトルデータとして得られ
る。
[Prior Art] With the spread of so-called CAD systems,
An image input device has been proposed that reads an image drawn on a drawing or the like using a photoelectric conversion element, recognizes the image data (raster data) as a line or outline, converts it into corresponding vector data, and stores it. An outline of image recognition using a conventional image input device will be described below with reference to FIGS. 10 to 13. FIG. 10 is an explanatory diagram of an input target drawing of the image input device. In FIG. 10, 1 indicates a recording paper, and 2 indicates a drawing drawn on the recording paper 1. The drawing 2 is composed of a hatched rectangular filled-in portion (filled-in portion) 3 and two straight lines (line-drawn portion) 4 extending right sideways in both directions from the filled-in portion 3. FIG. 11 is an enlarged view of drawing 2 depicted in FIG. In the figure, the same parts as in FIG. 10 are given the same reference numerals. W1 is the width of the line drawing part 4, W2 and W3 are the widths of the outline of the filled-in drawing part 3 extending in the vertical direction from the line drawing part 3, and the width W2 and the width W3 are equal. Here, the width W1
It is assumed that W2 (W3) includes 11 pixels and width W2 (W3) includes 15 pixels. Such a drawing 2 is first read by a photoelectric conversion element, binarized using a predetermined threshold value, and stored in the image storage unit. This storage is performed using 2 bits (background bit and core line bit), the background bit stores the original image data as it is until the end, and the core line bit stores data obtained during processing. It has become. After being stored in the image storage unit, first, the image data of the background bit is copied to the skeleton bit at the same address. Next, line thinning processing, line tracing processing, and contour line extraction processing are sequentially performed on the image data of the background bits. Since these processes are well known, their outline will only be described using FIGS. 12 and 13. The thinning process is performed using a virtual mask on the image data obtained by the photoelectric conversion element. FIG. 12 is a plan view of the mask. In FIG. 12, 5 indicates a virtual mask, and 9 adjacent to each other
It has three (3×3) areas. 50 indicates the center area of the mask 5. One pixel corresponds to one region. In the thinning process, the image data of the background bits is scanned by the mask 5, for example, in the vertical direction and from left to right in FIG. During this scan, the region 50 is always of interest, and the region 50
When a pixel of 2 is an end, the data of the skeleton bit corresponding to the pixel is set to 0. Note that the term "edge" refers to a state where there are no two or more pixel groups separated within the matrix 5 when the pixels in the area 50 are excluded. For example, if the mask 5 corresponds to position A in FIG. 11, the pixels in each region of the mask 5 will be in the state on the left side in FIG. pixel is the end), the data of the skeleton bit corresponding to the pixel is set to 0. Similarly, when the mask 5 corresponds to position B in FIG. 11, the pixels in the area 50 are the ends, and the data of the skeleton bits thereof are set to 0. Now, to simplify the explanation, if we define, for example, 11 pixels or less as a line drawing part and 12 pixels or more as a filled part, then at the end of the above-mentioned line thinning process, the image data of the core line bit will be shown as a solid line in Figure 13. This is the data shown. FIG. 13 is an enlarged view of the drawing after the thinning process. In the figure, reference numeral 10 indicates a drawing corresponding to the data stored in the core line bit after the thinning process, 13 indicates a filled-in drawing area, and 14 indicates a line drawing area. The drawing (drawing 2 shown in FIG. 11) corresponding to the data stored in the background bits is shown in broken lines. The line drawing portion 14 is a continuous line with a width of one pixel. Next, line tracing processing is performed on the data of this drawing 10. Line tracing processing is also performed using the mask 5 shown in FIG. 12, and when a pixel exists only in the same direction area when viewed from the area 50, it is tracked, and when a pixel appears in the other direction area, that point is tracked. The start point and end point of tracking are stored as vector data in another storage unit. It is believed that such a method of using the mask 5 can be easily understood from the method of using the mask in the above-mentioned line thinning process (the same applies to the outline extraction process described below). In drawing 10, two line drawing sections 14 are stored as vector data. Next, a contour line extraction process is performed on the remaining filled-in portion 13. This contour line extraction process is also carried out using the mask 5 shown in FIG. 12, and the edge of the filled-in image portion 13 is traced when viewed from the area 50, and the pixel direction change point is searched. These conversion points (feature points) are stored in another storage unit as vector data. Through the above processing, drawing 2 shown in FIG. 10 is obtained as vector data that can be processed and handled by a computer.

【0003】0003

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

【0004】0004

【課題を解決するための手段】上記の目的を達成するた
め、本発明は、図面を走査し所定のしきい値で二値化し
画像データとして出力する走査入力部と、これら画像デ
ータを記憶する記憶部と、この記憶部から各画像データ
をとりだして細線化する細線化手段と、この細線化手段
により得られた線画部を追跡し線データとして記憶させ
る線追跡手段と、前記細線化手段により得られた塗り潰
し画部の輪郭をたどり輪郭データとして記憶させる輪郭
線抽出手段とを備えた画像入力装置において、前記輪郭
線抽出手段の抽出対象となる前記輪郭データを前記細線
化手段の細線化の程度に応じて拡張する輪郭拡張手段を
設けたことを特徴とする。又、本発明の他の発明は、上
記画像入力装置において、前記輪郭拡張手段を介し前記
輪郭線抽出手段で得られた輪郭データおよび前記細線化
手段により得られたデータに基づいて当該輪郭内の線分
の有無を検出する検出手段と、この検出手段により線分
が検出されたときこれを消去する消去手段とを設けたこ
とを特徴とする。
[Means for Solving the Problems] In order to achieve the above object, the present invention provides a scanning input section that scans a drawing, binarizes it with a predetermined threshold value, and outputs it as image data, and a device that stores this image data. A storage section, a line thinning means for extracting each image data from the storage section and thinning the line, a line tracing means for tracing the line drawing portion obtained by the line drawing section and storing it as line data, and a line thinning means for In an image input device, the image input device includes a contour line extracting means for tracing the contour of the obtained filled-in image area and storing it as contour data. It is characterized by providing a contour expanding means that expands according to the degree. Another aspect of the present invention is that, in the image input device, information within the contour is calculated based on the contour data obtained by the contour extraction means and the data obtained by the thinning means via the contour expansion means. The present invention is characterized in that it includes a detecting means for detecting the presence or absence of a line segment, and an erasing means for erasing a line segment detected by the detecting means.

【0005】[0005]

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

【0006】[0006]

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

【0007】次に、本実施例の動作を、図2〜図9を参
照しながら説明する。本実施例では、図10に示す図面
よりやや複雑な図3に示す図面を例示して説明する。図
3は図10と同じく画像入力装置の入力対象図面の説明
図である。図3で、1は記録紙、30は記録紙1に描か
れた図面を示す。図面30は、方形の一部が三角形に突
出しハッチングが施された塗り潰し部分(塗り潰し画部
)31と、この塗り潰し画部31から左方向に真横に延
びる1つの直線(線画部)32とで構成されている。 図4は図3に描かれた図面30の拡大図である。図で、
図3と同一部分には同一符号が付してある。W1 〜W
3 は図11に示すものと同一寸法を示す。31aは塗
り潰し画部31の方形部分、31bは塗り潰し画部31
の三角形突出部分である。三角形突出部分31bの先端
部の縦方向寸法は寸法W1 以下となっている。このよ
うな図面30に対して、本実施例では図2に示すフロー
チャートに従って処理が成される。即ち、まず、画像演
算部22は画像記憶部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 explained with reference to FIGS. 2 to 9. This embodiment will be explained using the drawing shown in FIG. 3, which is slightly more complicated than the drawing shown in FIG. 10, as an example. FIG. 3, like FIG. 10, is an explanatory diagram of a drawing to be inputted by the image input device. In FIG. 3, 1 is a recording paper, and 30 is a drawing drawn on the recording paper 1. The drawing 30 consists of a filled part (filled drawing part) 31 in which a part of a rectangle protrudes into a triangular shape and is hatched, and one straight line (line drawing part) 32 extending directly horizontally to the left from this filled drawing part 31. has been done. FIG. 4 is an enlarged view of drawing 30 depicted in FIG. In the figure,
The same parts as in FIG. 3 are given the same reference numerals. W1 ~W
3 indicates the same dimensions as those shown in FIG. 31a is a rectangular portion of the filled-in area 31, and 31b is the filled-in area 31.
This is the triangular protruding part of . The vertical dimension of the tip of the triangular protruding portion 31b is equal to or less than the dimension W1. 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 22 retrieves the image data shown in FIG. 4 from the image storage unit 21, and performs line thinning processing on the image data corresponding to a predetermined line width (11 pixels according to the previous example). be done (
Step S1) shown in FIG. Note that this line thinning process, as well as the line tracing process and outline extraction process to be described later, have been described above, so their explanations will be omitted. FIG. 5 is an enlarged view of the drawing after the line thinning process in step S1. In FIG. 5, 30 indicated by a broken line is the same drawing as shown in FIG. 4, and 40 indicates a figure after the thinning process. 41 is a filled-in portion corresponding to the filled-in portion 31; 42 is a line-drawn portion corresponding to the straight line 32; 43 is a filled-in portion corresponding to the filled-in portion 31;
is a line drawing portion produced as a result of thinning the tip portion of the triangular protrusion 31b. The result of this thinning is stored in the core bit of the image storage section 21. In addition, in FIG. 5, P1 to P4
indicates the tip point of the line drawing, and the coordinates are shown in parentheses.

【0008】次いで、認識処理部23は画像記憶部21
の芯線ビットからデータを取出し、線追跡処理を行う(
手順S2 )。この線追跡処理により、線画部42、4
3が線分として取出され、これらがベクトルデータとし
て座標列データ記憶部24へ記憶される。即ち、先端点
P1 〜P4 の座標(x1 、y1 )〜(x4 、
y4 )が記憶される。この記憶が終了すると、画像記
憶部21の芯線ビットに記憶されていた線画部42、4
3の画像データは消去され、塗り潰し画部41の画像デ
ータのみが残る。次に、画像演算部22は、画像記憶部
21の芯線ビットに残された塗り潰し画部41の画像デ
ータを取出し、その周囲1画素の領域に1画素分のデー
タを追加してゆく太線化処理を行う(手順S3 )。こ
の太線化処理は、細線化処理の回数だけ実施される。1
1画素以下を線画部として認識する上記の例によると、
太線化処理は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、y10は図5、6に示す
座標である。又、アドレスM0 、M6 のデータ「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 stores the image storage section 21.
Extract data from the core line bits and perform line tracing processing (
Step S2). Through this line tracing process, the line drawing parts 42, 4
3 is extracted as a line segment, and these are stored in the coordinate string data storage section 24 as vector data. That is, the coordinates (x1, y1) to (x4,
y4) is stored. When this storage is completed, the line drawing portions 42 and 4 stored in the core line bits of the image storage section 21 are
The image data of 3 is erased, and only the image data of the filled-in area 41 remains. Next, the image calculation unit 22 extracts the image data of the filled-in area 41 left in the core line bit of the image storage unit 21, and performs thick line processing to add one pixel worth of data to a one pixel area around it. (Step S3). This thickening process is performed the same number of times as the thinning process. 1
According to the above example of recognizing one pixel or less as a line drawing part,
The thick line processing will be executed five times. The results of this thick line processing are shown in FIG. FIG. 6 is an enlarged view of the drawing after thickening processing. In FIG. 6, the solid line 31 is a filled-in area that is the same as the filled-in area in the original drawing 30 as a result of the thick line processing, and the broken line 41 is the filled-in area after the thinning process shown in FIG. Further, P4 to P10 indicate feature points (straight line direction change points) of the filled-in image portion 31, and the coordinates thereof are indicated in parentheses. The result of the thick line processing in step S3 is stored again in the skeleton bit of the image storage unit 21. and,
It is checked whether excessive line thickening processing has been performed, and if there is an excessive part, it is corrected (step S4). The above check is performed by the image calculation unit 22 extracting the background bit data and skeleton bit data at the same address from the image storage unit 21 and calculating the AND of them. The result of correction by this operation is stored in the skeleton bit again. In this state, the recognition processing unit 23 extracts the image data of the filled-in image portion from the skeleton bits of the image storage unit 21, and performs a contour extraction process to trace the outline of the filled-in image portion 31 (step S5). Then, each coordinate of the feature points P4 to P10 is sequentially stored as vector data in the coordinate string data storage unit 24.
Store it in Coordinate string data storage unit 24 at this point
The stored data is shown in FIG. FIG. 8 is an explanatory diagram of the contents stored in the coordinate string data storage section 24. In FIG. 8, M0 to M29 are address names, and among the data stored in each address, x1, y1 to x10, and y10 are coordinates shown in FIGS. 5 and 6. Also, data “2” at addresses M0 and M6
” indicates the number of tip points of the line drawing portions 42 and 43, data “8” at address M12 indicates the number of feature points of the filled-in drawing portion 31, and data “0” at addresses M1 and M7 indicates the open figure of the line drawing, address Data “2” in M13 indicates that it is a contour line. That is, addresses M0, M1, addresses M6, M7, and addresses M12, M13 are data representing the line types of the drawing, and the first two between these line type data
The address is the starting point of the line, and the last two addresses are the coordinates of the ending point.

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

【0010】0010

【発明の効果】以上述べたように、本発明では、細線化
処理後のデータに対して輪郭拡張を行ってから輪郭線抽
出処理を行うようにしたので、塗り潰し画部が縮小され
ることはなく、正確な画像を得ることができる。又、太
線化処理により不要なデータが発生しても消去手段によ
りこれを消去するので、最終的に正確なベクトルデータ
を得ることができる。
[Effects of the Invention] As described above, in the present invention, since the outline extraction processing is performed after the outline expansion is performed on the data after the line thinning processing, the filled image area is not reduced. You can get accurate images without any problems. Further, even if unnecessary data is generated due to the thickening process, it is erased by the erasing means, so that accurate vector data can be finally obtained.

【図面の簡単な説明】[Brief explanation of the drawing]

【図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. 1;

【図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 line thinning processing;

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

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

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

【図9】図1に示す座標列データ記憶部の記憶内容説明
図である。
FIG. 9 is an explanatory diagram of the storage contents of the coordinate string data storage section 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 masks used in each process.

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

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

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

20  走査入力部 21  画像記憶部 22  画像演算部 23  認識処理部 24  座標列データ記憶部 20 Scan input section 21 Image storage unit 22 Image calculation section 23 Recognition processing unit 24 Coordinate string data storage unit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  図面を走査し所定のしきい値で二値化
し画像データとして出力する走査入力部と、これら画像
データを記憶する記憶部と、この記憶部から各画像デー
タをとりだして細線化する細線化手段と、この細線化手
段により得られた線画部を追跡し線データとして記憶さ
せる線追跡手段と、前記細線化手段により得られた塗り
潰し画部の輪郭をたどり輪郭データとして記憶させる輪
郭線抽出手段とを備えた画像入力装置において、前記輪
郭線抽出手段の抽出対象となる前記輪郭データを前記細
線化手段の細線化の程度に応じて拡張する輪郭拡張手段
を設けたことを特徴とする画像入力装置。
Claim 1: A scanning input unit that scans a drawing, binarizes it with a predetermined threshold value, and outputs it as image data; a storage unit that stores the image data; and a unit that extracts each image data from the storage unit and thins it. a line tracing means for tracing the line drawing portion obtained by the line thinning means and storing it as line data; and a contour tracing means for tracing the outline of the filled-in drawing portion obtained by the line thinning means and storing it as outline data. An image input device comprising a line extracting means, further comprising a contour expanding means for expanding the contour data to be extracted by the contour extracting means in accordance with the degree of line thinning by the line thinning means. image input device.
【請求項2】  請求項1記載の画像入力装置において
、前記輪郭拡張手段を介し前記輪郭線抽出手段で得られ
た輪郭データおよび前記細線化手段により得られた線デ
ータに基づいて当該輪郭内の線分の有無を検出する検出
手段と、この検出手段により線分が検出されたときこれ
を消去する消去手段とを設けたことを特徴とする画像入
力装置。
2. The image input device according to claim 1, based on the contour data obtained by the contour extracting means and the line data obtained by the thinning means via the contour expanding means, An image input device comprising: a detecting means for detecting the presence or absence of a line segment; and an erasing means for erasing a line segment detected by the detecting means.
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 true JPH04255080A (en) 1992-09-10
JP2846486B2 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 (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
JP2017208014A (en) * 2016-05-20 2017-11-24 日本電気株式会社 Needle type meter detection device, method, and program
JP2020023161A (en) * 2018-06-07 2020-02-13 コンセプト・レーザー・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツング Method for operating apparatus for additively manufacturing three-dimensional object

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5802459B2 (en) * 2011-07-13 2015-10-28 中央発條株式会社 Image processing apparatus, method, and program for calculating shape of spiral spring

Cited By (5)

* 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
JP2017208014A (en) * 2016-05-20 2017-11-24 日本電気株式会社 Needle type meter detection device, method, and program
JP2020023161A (en) * 2018-06-07 2020-02-13 コンセプト・レーザー・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツング Method for operating apparatus for additively manufacturing three-dimensional object
US11440262B2 (en) 2018-06-07 2022-09-13 Concept Laser Gmbh Method for operating an apparatus for additively manufacturing three-dimensional objects

Also Published As

Publication number Publication date
JP2846486B2 (en) 1999-01-13

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
JPH0256707B2 (en)
JPH04255080A (en) Image input device
JPH0130180B2 (en)
JP2878194B2 (en) Partial erasure and partial detection method of image data
JPH01129358A (en) Arithmetic unit for table numerical value
JP2773127B2 (en) Image editing method
JP2587812B2 (en) Figure extraction method
JPH03233787A (en) Character image extracting device
JP2954218B2 (en) Image processing method and apparatus
JPH04156691A (en) Image area extracting method
JPH08180087A (en) Distortion correcting method for graphic
JPH0221629B2 (en)
JPH05290162A (en) Diagram branch point connecting method for image input device
JPS63182780A (en) Picture processing method for drawing reading device
JPH04579A (en) Method for extracting feature point of graphic
JPH06274692A (en) Character extracting device
JPH01189787A (en) Method and device for extracting feature
JPH04109369A (en) Mark recognizing device
JPS63163685A (en) Direction code adding method
JPH057751B2 (en)
JPH0583952B2 (en)
JPH0447867B2 (en)

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