JPS61143884A - Line extractor - Google Patents

Line extractor

Info

Publication number
JPS61143884A
JPS61143884A JP26662784A JP26662784A JPS61143884A JP S61143884 A JPS61143884 A JP S61143884A JP 26662784 A JP26662784 A JP 26662784A JP 26662784 A JP26662784 A JP 26662784A JP S61143884 A JPS61143884 A JP S61143884A
Authority
JP
Japan
Prior art keywords
line
point
connection relationship
memory
connection
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
JP26662784A
Other languages
Japanese (ja)
Inventor
Hideki Shitanda
四反田 秀樹
Teruhiko Hiraishi
平石 輝彦
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP26662784A priority Critical patent/JPS61143884A/en
Publication of JPS61143884A publication Critical patent/JPS61143884A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To extract a line having no break by selecting two connecting relations out of plural ones in case >=3 linear picture points exist nearby and deleting other connecting relations for tracking of a line. CONSTITUTION:A single line conversion processor 2 reads a frame memory 1 and rewrites the contents of the memory 1 when >=3 connecting relations exist. A line tracking device 3 reads successively the memory 1 processed by the processor 2 and searches for the picture element having just a single connecting relation. This picture element is defined as a start and also a notice point. If this notice point has a connecting relation, this point is shifted toward the direction having a connecting relation. Then the connecting relation where the notice point is not deleted after shift is checked and the shift of the notice point is repeated. When this repetitive shift is over, the number of recorded direction codes is checked. Then a line is delivered when the number of the direction codes exceeds a certain level.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、カメラ等の画像入力装置により入力された画
像からa画を作p出し、そのfIJ画から座標列を取シ
出しペンなどで絵・図形を書かせることを目的とする画
像処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention creates an a picture from an image input by an image input device such as a camera, extracts a coordinate string from the fIJ picture, and draws it with a pen or the like. The present invention relates to an image processing device whose purpose is to draw figures.

従来の技術 従来、画像よシ線を抽出する方法としては、「図形の線
画表現の自動作成について(情報処理学会講演論文集1
977、P403〜P404)J  等がある。まず画
像から線を抽出するために、カメラ等より入力した原画
を細線化する。その後、細線化した画像の記録したフレ
ームメモリを左上から順次走査し、線となる画素(以降
、#J画点と称する)を発見した後、その画素の近傍を
調べ、近傍に線画点があれば現在の点の座標を別に用意
したテーブルに記録し、現在の点をフレームメモリから
消去して、前述の近傍の線画点に移る。この処理を、線
画点の近傍にある消去されていない線画点の数が1個で
ある間繰り返し、それ以外になった時にこの処理の繰シ
返しを終了する。終了した時、テーブルに記録された座
標の個数を調べ、ある値以上であれば抽出した線を結果
として出力し、ある値未満であれば不必要である線とし
て出力しない。その後テーブルの記録を消去する。
Conventional technology Conventionally, as a method for extracting lines from an image, there is a method described in ``On the automatic creation of line drawing representations of figures'' (Information Processing Society of Japan Proceedings 1).
977, P403-P404) J, etc. First, in order to extract lines from an image, the original image input from a camera or the like is made into thin lines. After that, the frame memory in which the thinned image was recorded is sequentially scanned from the upper left, and after finding a pixel that forms a line (hereinafter referred to as #J pixel), the vicinity of that pixel is examined, and if there is a line drawing point nearby. For example, the coordinates of the current point are recorded in a separately prepared table, the current point is deleted from the frame memory, and the process moves to the aforementioned nearby line drawing point. This processing is repeated until the number of unerased line drawing points near the line drawing point is one, and when the number becomes other than that, the repetition of this processing is completed. When it is finished, the number of coordinates recorded in the table is checked, and if it is above a certain value, the extracted line is output as a result, and if it is less than a certain value, it is not output as an unnecessary line. Then erase the records in the table.

発明が解決しようとする問題点 従来の方法では、線画点の近傍に3つ以上の線画点のあ
る位置で線が切れるため、途切れの多い線になるという
欠点がある。
Problems to be Solved by the Invention In the conventional method, a line is broken at a position where there are three or more line drawing points in the vicinity of a line drawing point, resulting in a line with many breaks.

問題点を解決するための手段 本発明は、かかる問題を解決するため、近傍に3個以上
の線画点をもつ線画点がある時、それらとの結合関係の
中から適当な選択方法で2個の結合関係を選択し、それ
以外の結合関係を削除して2個の結合関係に変換し、そ
の後、結合関係をもとに線を追跡し、線を抽出する。
Means for Solving the Problem In order to solve this problem, the present invention, when there is a line drawing point that has three or more line drawing points in the vicinity, selects two drawing points from the connection relationship with them using an appropriate selection method. Select the bonding relationship, delete the other bonding relationships and convert them into two bonding relationships, and then trace the line based on the bonding relationship and extract the line.

作  用 本発明は上記の操作によって途切れの少ない線を抽出で
きる。
Function The present invention can extract lines with few breaks by the above-described operation.

実施例 第1図は、本発明の一実施例の線抽出装置の構成図であ
る。第1図の1はフレームメモリであシ、画像の各画素
ごとにその画素の8近傍のどの方向に線画を構成する画
素が存在するかを記録している。この記録は8ビツトで
あり、第2図で定義した方向■に線画を構成する画素が
存在する時、この記録b−1ビット目の値を“1”、そ
れ以外の時゛0″を設定している。第4図は結合関係を
記録するフレームメモリの内容の例である。点Aは3個
の結合関係、点Bは2個の結合関係がある。
Embodiment FIG. 1 is a block diagram of a line extraction device according to an embodiment of the present invention. Reference numeral 1 in FIG. 1 is a frame memory, which records, for each pixel of an image, in which direction of the eight neighborhoods of that pixel a pixel constituting a line drawing exists. This record is 8 bits, and when there is a pixel forming a line drawing in the direction (2) defined in Figure 2, the value of the b-1st bit of this record is set to "1", otherwise it is set to "0". Figure 4 shows an example of the contents of a frame memory for recording connection relationships.Point A has three connection relationships, and point B has two connection relationships.

空欄は、その点が線を構成しない点であることを表現し
、実際は値”0”が書か・れている。
A blank column represents that the point does not constitute a line, and in reality, the value "0" is written.

第1図の2は単線化処理装置であり、フレームメモリを
読み出し、3個以上の結合関係のある時に次に述べる方
法でフレームメモリの内容を書き換える。第3図はその
一例である。点Pは3個以上の結合関係を有する点であ
る。点POk番目の結合関係の方向にnl  画素進ん
だ点、n2画素進んだ点をそれぞれPkl、PF3とす
る。nlくn2である。たとえば第3図では右上方向に
伸びている方向かに=1.下に伸びている方向に=2で
ある。
Reference numeral 2 in FIG. 1 is a single line processing device which reads the frame memory and rewrites the contents of the frame memory in the following manner when there is a connection relationship between three or more lines. Figure 3 is an example. Point P is a point that has three or more connection relationships. Let Pkl and PF3 be a point advanced by nl pixels and a point advanced by n2 pixels in the direction of the point POk-th connection relationship, respectively. nl x n2. For example, in Figure 3, the direction extending toward the upper right = 1. In the downward extending direction = 2.

角をψに1.ψに2とする。直線性は次の評価関係を用
いる。
1 with the angle ψ. Set ψ to 2. The following evaluation relationship is used for linearity.

1ψに1−ψに2+2αにπ1+1ψft1−ψ22+
2σ2πI+1ψに1−ψ21+(2βkK” )πI
但し、αに、α℃、βに2は、それぞれを含む項の絶対
値が最小になる様に−1,0,1の中より選択する。
1ψ to 1-ψ2+2α to π1+1ψft1-ψ22+
2σ2πI+1ψ to 1−ψ21+(2βkK”)πI
However, 2 for α, α°C, and β are selected from −1, 0, and 1 so that the absolute value of the term containing each is the minimum.

前記評価関数の値が最小であるkとlの組み合わせ(k
”ql)を求め、k番目、1番目以外の結合関係を削除
する。結合関係の削除は、画素Pおよび削除すべき結合
関係のあるもう1つの画素に対してなされ、これらの画
素の削除する結合関係に対応する。フレームメモリのビ
ットを0にする事で実現する。第5図は、第4図の結合
関係が単線化処理後、どの様に変更されるかを示したも
のである。点A9点Bの結合関係の削除に伴ない、点A
での第0ピツト、点Bでの第4ピツトが”0”に書き換
えられる。
The combination of k and l (k
"ql)" and delete the connection relationships other than the k-th and 1st connections. Deletion of connection relationships is performed for pixel P and another pixel that has the connection relationship to be deleted, and the deletion of these pixels This corresponds to the connection relationship.This is realized by setting the bit of the frame memory to 0.FIG. 5 shows how the connection relationship shown in FIG. 4 is changed after the single-line processing. With the deletion of the connection relationship between points A and B, point A
The 0th pit at point B and the 4th pit at point B are rewritten to "0".

点Pからn2画素進んだ点に至るまでに結合関係が2個
以外の点Qが発見された場合には、点PからQに至る方
向のコードの列を用いて、そのコード列をn2 個にな
るまで拡張する。表は、拡張の方法を示している。ここ
でNは、点PからQに至る方向コード列の長さであり、
dnはこの列のn番目の方向コードである。本実施例で
はn2−8である。
If a point Q with a connection relationship other than 2 is found before reaching a point n2 pixels ahead from point P, use the code string in the direction from point P to Q to divide that code string into n2 pixels. Expand until . The table shows how to expand. Here, N is the length of the direction code string from point P to Q,
dn is the nth direction code of this column. In this embodiment, it is n2-8.

表 第1図の3は線追跡装置である。線追跡装置は前記単線
化処理装置の処理したフレームメモリを順次読み出し、
ただ1つの結合関係を有する画素を探し、その画素を始
点とする。始点の座標を線追跡装置内のテーブルに記録
し始点を着目点とする。着目点が結合関係をもつならば
、結合関係のもつ方向に着目点を移す。この移動の方向
コードを前述のテーブルに記録する。移動後の着目点に
存在する移動前の着目点への結合関係、および移動前の
着目点に存在する移動後の着目点への結合関係を削除す
る。次に移動後の着目点の削除されていない結合関係を
調べ、前述の着目点の移動を繰り返す。この繰り返しは
、新しい着目点に移って移動前の着目点との結合関係を
削除すると他の結合関係が残らない様な着目点に至るま
で行なわれる。前記の繰り返し終了後、記録されたコー
ドの数を調べ、ある数取上であれば線として出力し、あ
る数未満であれば不必要な線と見なして出力しない。線
追跡装置内のテーブルの記録を削除し、始点の次より新
しい始点となる画素を探し同様の処理を行なう。これを
フレームメモリの最後になるまで繰シ返す。次に、前述
の処理後のフレーム゛す、モリを再度、始めから読み出
し、まだ結合関係の残っている画素を探す。もし存在す
れば、その結合関係は必ず2個である。2個の結合関係
の1個を削除し、その点を始点として前述の処理を行な
う。処理後、始点の次から結合関係の有する画素を探し
、同様の処理を行なう。これをフレームメモリの最後に
なるまで繰り返す。
3 in Table 1 is a line tracing device. The line tracing device sequentially reads out the frame memory processed by the single line processing device,
Find a pixel that has only one connection relationship, and use that pixel as the starting point. Record the coordinates of the starting point in a table in the line tracing device, and use the starting point as the point of interest. If the point of interest has a connection relationship, the point of interest is moved in the direction of the connection relationship. Record the direction code of this movement in the table mentioned above. Delete the connection relationship between the point of interest after the movement and the point of interest before the movement, and the connection relationship between the point of interest before the movement and the point of interest after the movement. Next, the connection relationships of the point of interest that have not been deleted after the movement are checked, and the above-described movement of the point of interest is repeated. This repetition is repeated until a point of interest is reached at which, when moving to a new point of interest and deleting the connection relationship with the previous point of interest, no other connection relationship remains. After the above-mentioned repetition is completed, the number of recorded codes is checked, and if the number is above a certain number, it is output as a line, and if it is less than a certain number, it is regarded as an unnecessary line and is not output. The record in the table in the line tracing device is deleted, and the same process is performed by searching for a pixel that will become a newer starting point after the starting point. This is repeated until the end of the frame memory is reached. Next, the frame memory after the above-described processing is read out again from the beginning, and pixels that still have a connection relationship are searched for. If it exists, the connection relationship is always two. One of the two connection relationships is deleted and the above process is performed using that point as the starting point. After the processing, pixels having a connection relationship are searched for after the starting point, and the same processing is performed. Repeat this until the end of frame memory is reached.

発明の効果 以上述べたように、本発明に−よれば結合関係を記録し
たフレームメ七りを用いて途切れの少ない線を抽出でき
る。
Effects of the Invention As described above, according to the present invention, lines with few breaks can be extracted using a frame system that records connection relationships.

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

第1図は本発明の線抽出装置の構成図、第2図は結合関
係の方向に対して与えられたコードの説明図、第3図は
前述の評価関数中で使用した記号の説明図、第4図は連
結関係の一例f−示を図、、第6図は第4図の連結関係
を単線化処理装置で処理した後の連結関係1示す一関 
   ゛ である。 1・・・・・・フレームメモリ、2・・・・・・単線化
処理装置、3・・・・・・線追跡装置。 第1図 第2図 第3図
FIG. 1 is a block diagram of the line extraction device of the present invention, FIG. 2 is an explanatory diagram of codes given to the directions of connection relationships, and FIG. 3 is an explanatory diagram of symbols used in the above-mentioned evaluation function. Figure 4 shows an example of the connection relationship, and Figure 6 shows the connection relationship 1 after the connection relationship in Figure 4 has been processed by the single line processing device.
It is. 1...Frame memory, 2...Single line processing device, 3...Line tracing device. Figure 1 Figure 2 Figure 3

Claims (2)

【特許請求の範囲】[Claims] (1)画像を構成する各画素と近傍画素との結合関係を
記憶するメモリと、前記メモリを読み出し1画素当り3
方向以上の結合を有する画素の結合関係の中から2方向
のみを選択し、それ以外の方向の結合関係を削除して2
方向以下の結合関係に変換する単線化処理装置と、前記
処理装置の結果から近傍の結合関係を追跡して座標列を
作り出す線追跡装置から構成される線抽出装置。
(1) A memory that stores the connection relationship between each pixel constituting an image and neighboring pixels, and reads out the memory and stores 3 pixels per pixel.
Select only two directions from among the connection relationships of pixels that have connections in more than one direction, and delete the connection relationships in other directions.
A line extraction device comprising a single line processing device that converts into a connection relationship below the direction, and a line tracing device that creates a coordinate string by tracing neighboring connection relationships from the results of the processing device.
(2)単線化処理は最も直線的である2つの方向の結合
関係を選択し、それ以外の方向の結合関係を削除するこ
とを特徴とする特許請求の範囲第1項記載の線抽出装置
(2) The line extracting device according to claim 1, wherein the single line processing selects the most straight connecting relationship in two directions and deletes the connecting relationships in other directions.
JP26662784A 1984-12-18 1984-12-18 Line extractor Pending JPS61143884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26662784A JPS61143884A (en) 1984-12-18 1984-12-18 Line extractor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26662784A JPS61143884A (en) 1984-12-18 1984-12-18 Line extractor

Publications (1)

Publication Number Publication Date
JPS61143884A true JPS61143884A (en) 1986-07-01

Family

ID=17433445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26662784A Pending JPS61143884A (en) 1984-12-18 1984-12-18 Line extractor

Country Status (1)

Country Link
JP (1) JPS61143884A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989004018A1 (en) * 1987-10-26 1989-05-05 Kabushiki Kaisha Komatsu Seisakusho Method of processing image data on road surface cracks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989004018A1 (en) * 1987-10-26 1989-05-05 Kabushiki Kaisha Komatsu Seisakusho Method of processing image data on road surface cracks

Similar Documents

Publication Publication Date Title
US5608858A (en) Method and system for registering and filing image data
EP0033627A2 (en) Method for reading drawings
JPH02277185A (en) Extracting method for rectangle coordinates
JPS6357831B2 (en)
JPS61143884A (en) Line extractor
US5228097A (en) Method for registering image data
JP2735197B2 (en) Graphic input device
JPH0249587B2 (en)
JPH03142691A (en) Table format document recognizing system
JP3070801B2 (en) Drawing management method
JP2675043B2 (en) How to edit drawing data
JP3657725B2 (en) Line figure image processing method
JP2573438B2 (en) Pattern identification method and apparatus
JPS58195884A (en) Indication of display
JPS6063679A (en) Filing system for drawing information
JPS5835663A (en) Picture processing device
JP3037800B2 (en) Attribute assignment method for image data
SU401989A1 (en) USSR Academy of Sciences
JP2519250B2 (en) Sequence logic program generator
JPH0525139B2 (en)
JPH04178879A (en) Method for retrieving drawing
JPH022193B2 (en)
JPH0212577A (en) System for processing transformation of picture element
JPS6322354B2 (en)
JPS63311428A (en) Optimization processing method for segment character data