JPS58219683A - Detecting method of contour line - Google Patents

Detecting method of contour line

Info

Publication number
JPS58219683A
JPS58219683A JP57103201A JP10320182A JPS58219683A JP S58219683 A JPS58219683 A JP S58219683A JP 57103201 A JP57103201 A JP 57103201A JP 10320182 A JP10320182 A JP 10320182A JP S58219683 A JPS58219683 A JP S58219683A
Authority
JP
Japan
Prior art keywords
data
memory
scanning
contour line
difference
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
JP57103201A
Other languages
Japanese (ja)
Inventor
Masao Murata
村田 正雄
Takashi Anezaki
姉崎 隆
Norio Aoki
青木 則夫
Makoto Watanabe
誠 渡辺
Kunihiko Mototani
本谷 邦彦
Susumu Ide
井手 進
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 JP57103201A priority Critical patent/JPS58219683A/en
Publication of JPS58219683A publication Critical patent/JPS58219683A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To obtain the successive contour line of a binary pattern at a high speed by detecting positions where picture data vary initially from 0 to 1 or reversely successively, calculating differences between the detected positions, and constituting the contour line by data whose difference values are within a specified range. CONSTITUTION:A time-sequence video signal obtained by an image pickup device 1 during a horizontal scan is coded into a binary signal by a binary-coding circuit, whose output is inputted to a picture memory 3. The output of the memory 3 is supplied to horizontal and vertical scanning memories 4 and 5, whose output signals are accessed, word by word; and a poition detecting circuit 6 detects positions where the data initially varies from 0 to 1 or reversely and a difference detecting circuit 7 detects differences between the position and the precedent detected position. When the difference is -1, 0, or +1, the data is stored in the memory 8 as position data constituting the contour line of the binary pattern and when its absolute value is >2, the part data is processed by a scanning condition detecting circuit 9 to employ the resulting position data.

Description

【発明の詳細な説明】 本発明は、たとえばテレビカメラから得られた画像デー
タの処理において、2値ノくターンから輪郭線を検出す
る方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for detecting contour lines from binary turns in the processing of image data obtained, for example, from a television camera.

テレビカメラ等から得た画像データの量は莫大テアルノ
で、マイクロコンピュータ等によって種々の処理を行う
に際しては、画像データの表わすパターンの輪郭線を表
わす集合を得てデータ量を少なくかつ後の画像処理が容
易にできるようにすることが特に重要である。
The amount of image data obtained from a television camera, etc. is enormous, and when performing various processing using a microcomputer, etc., it is necessary to obtain a set representing the outline of the pattern represented by the image data to reduce the amount of data and facilitate subsequent image processing. It is especially important to make it easy to do so.

従来、2値パターンの輪郭線を検出するには次の(1)
や(2)の方法がよく用いられていた。
Conventionally, the following (1) is used to detect the contour line of a binary pattern.
Method (2) was often used.

(1)そのひとつは水平方向の一走査ライン上において
、画像データがOから1へ最初に変化する位置を順次検
出することにより得られた位置データの集合を2値パタ
ーンの輪郭線とする方法である。例えば第1図において
、2値パターンの原画像(イ)に対して水平方向の正の
方向に走査して検出した位置データの集合の2値パター
ンとして(ロ)のようなパターンが得られ、これを輪郭
線としていた。
(1) One method is to use a set of position data obtained by sequentially detecting the position where image data first changes from 0 to 1 on one horizontal scanning line as the outline of a binary pattern. It is. For example, in FIG. 1, a pattern like (b) is obtained as a binary pattern of a set of position data detected by scanning the binary pattern original image (a) in the positive horizontal direction, This was the outline.

し7かしく口)のパターンのB1C1間は、走査方向と
パターンの検出面の傾きが45°未満の角度になってい
るため、不連続線となっている=このためコーナ点を検
出する等の後処理を行えないという欠点があった。また
第2図の(ト)のようなパターンの場合、水平方向から
の走査ではGF間とFI間が検出できない。垂直方向か
ら走査した場合は、前記のようにGH間とEF間が不連
続な輪郭線となる。また通常テレビカメラから入力した
画像データを格納する画像メモリは水平方向に書き込み
と読み出しが容易となっているので、処理を行なう時画
像メモリから垂直方向に走査することは水平方向に走査
するのに比べて1ワ一ド分のビット数程度処理時間がか
かる。
However, the line between B1C1 of the pattern 7) is a discontinuous line because the inclination of the scanning direction and the detection surface of the pattern is less than 45 degrees. The drawback was that post-processing could not be performed. Furthermore, in the case of a pattern like (g) in FIG. 2, the GF and FI intervals cannot be detected by scanning from the horizontal direction. When scanning from the vertical direction, the contour lines between GH and between EF become discontinuous as described above. Also, image memory that stores image data input from a television camera can easily be written to and read out in the horizontal direction, so when performing processing, scanning from the image memory in the vertical direction is easier than scanning in the horizontal direction. In comparison, the processing time is about the same number of bits as one word.

(2)他の方法は第1図の(イΣの点Aを検出し、点A
の周囲8近傍のなかから前に検出した点を除いてデータ
1とOの隣接する位置を検出するという線の追跡法によ
る輪郭線(へ)検出方法である。
(2) Another method is to detect point A of (AΣ) in Figure 1,
This is a contour line detection method using a line tracing method in which adjacent positions of data 1 and O are detected by excluding the previously detected points from the 8 neighborhoods around the .

しかし追跡法は処理プログラムが複雑で難しいうえ、処
理の−・−ドウエアtヒが困難なので処理時間も長くか
かり、マイクロコンピュータ等を1111用い11 用いた機器で実゛用化することは困難である。
However, the tracking method requires a complicated processing program and is difficult, and the processing time is long because it is difficult to perform the processing by hardware, and it is difficult to put it into practice with equipment that uses microcomputers and the like. .

以上述べたように、従来の方法には大きな欠点があって
実用化されなかったυ、実用化されても本発明は、前述
のような点に留意してなされたものであり、2値パター
ンの連続した輪郭線を高速に得ようとするものである。
As mentioned above, the conventional method has major drawbacks and has not been put to practical use. The aim is to obtain continuous contour lines at high speed.

本発明を簡単に述べると、メモリに格納された2値の画
像データを走査するにあたり、水平方向(X方向)また
は垂直方向(Y方向)の−走査ライン上において、画像
データが0から1または1から0へ最初に変化する位置
を順次検出し、前記検出した位置の差分を順次とり、差
分が−1,0゜1の時順次検出した位置データは連続し
た輪郭線を構成するデータの一部として採用し、走査方
向と2値パターンの検出面の傾きが45°以上の角度に
なるとき、すなわち前記差分値の絶対値が2以上の部分
の位置データは他の一方からの走査方向でかつ前記差分
値の符号によって正方向または負方向に走査することに
よって得られた位置データを採用することを基本として
、連続した輪郭線を高速に得ようとするものである。
Briefly describing the present invention, when scanning binary image data stored in a memory, the image data is changed from 0 to 1 or The position that first changes from 1 to 0 is sequentially detected, and the differences between the detected positions are taken sequentially. When the difference is -1,0°1, the sequentially detected position data is one of the data forming a continuous contour line. When the inclination of the detection plane of the binary pattern and the scanning direction is at an angle of 45° or more, that is, the position data of the part where the absolute value of the difference value is 2 or more is determined in the scanning direction from the other side. The present invention is based on the use of position data obtained by scanning in the positive or negative direction depending on the sign of the difference value, and is intended to obtain continuous contour lines at high speed.

以下その一実施例について説明する。第3図において、
テレビカメラ等よシなる撮像装置1により得られた水平
方向走査の時系列の映像信号を2値化処理回路2で2値
化処理し、2値画像データとして画像メモリ3に取込む
。さらに1ワードのビット数に対応した数の2値画像デ
ータがアクセスされる水平方向(X方向)走査用メモリ
4と垂直方向(Y方向)走査用メモリ6に前記画像メモ
リ3から2値画像データを取込む。ここまでの処理はす
べて容易にハードウェア化でき高速に処理できる。
An example of this will be described below. In Figure 3,
A horizontally scanned time-series video signal obtained by an imaging device 1 such as a television camera is binarized by a binarization processing circuit 2 and taken into an image memory 3 as binary image data. Furthermore, the binary image data from the image memory 3 is transferred to a horizontal direction (X direction) scanning memory 4 and a vertical direction (Y direction) scanning memory 6, in which binary image data of a number corresponding to the number of bits of one word is accessed. take in. All of the processing up to this point can be easily implemented in hardware and processed at high speed.

つぎに水平方向走査用メモリ4または垂直方向走査用メ
モリ5から2値画像データを1ワードごとにアクセスし
、そのデータが0から1または1からOへ最初に変化す
るデータをもつアドレス、すなわち位置を順次検出する
という位置検出処理を回路6で行なうとともに順次検出
した位置のその前に検出した位置との差分をとるという
差分検出処理を回路7で行ない、その差分値が−1,0
,1であれば2値パターンの輪郭線を構成する位置デー
タとしてメモリ8に格納し、差分値の絶対値が2以上で
あればその部分のデータとしては回路9にて走査検出処
理を行って、すなわち他の一方の走査方向でかつ前記差
分値の符号によって正方向または負方向に走査すること
により得られた位置データを採用する。
Next, the binary image data is accessed word by word from the horizontal scanning memory 4 or the vertical scanning memory 5, and the address, that is, the position where the data first changes from 0 to 1 or from 1 to O, is accessed. The circuit 6 performs a position detection process of sequentially detecting , and the circuit 7 performs a difference detection process of taking the difference between the sequentially detected position and the previously detected position, and the difference value is -1, 0.
, 1, it is stored in the memory 8 as position data constituting the outline of the binary pattern, and if the absolute value of the difference value is 2 or more, the data of that part is subjected to scanning detection processing in the circuit 9. That is, position data obtained by scanning in the other scanning direction in the positive or negative direction depending on the sign of the difference value is employed.

さらに具体的に述べると、(1)第1図において、2値
パターンの原画像(イ)に対して、最初水平方向走査用
メモリ4をアクセスすることによって、水平方向(X方
向)の正の方向に走査開始点X=Oから走査を行ない、
前記回路6にて位置検出処理を行ない(ロ)K示す位置
データを、および前記回路7にて差分検出処理を行なう
ことによって(ハ)に示す差分をおのおの得ることがで
きる。処理結果はバッファメモリに格納しておく。仲)
のA1B1間。
To be more specific, (1) In FIG. 1, by first accessing the horizontal scanning memory 4 for the binary pattern original image (A), the positive horizontal (X direction) Scanning is performed from the scanning starting point X=O in the direction,
By performing position detection processing in the circuit 6 (b) and position data shown in K, and by performing difference detection processing in the circuit 7, the differences shown in (c) can be obtained. The processing results are stored in buffer memory. Naka)
Between A1B1.

ClDl間、 E1F1間に対応する差分値は−1,0
゜1のいずれかであるので(イ)の表わすパターンの輪
郭線を構成する位置データとしてメモリ8に格納する。
The difference values between ClDl and E1F1 are -1,0
1, it is stored in the memory 8 as position data constituting the outline of the pattern represented by (a).

(ロ)のB1C1間に対応する差分値の絶対値は2なの
で垂直方向走査用メモリ6をアクセスし、符号か−なの
で正方向に走査開始点y=oから走査して前記と同様に
位置検出処理と差分検出処理を行なえばに)のB2C2
間(両端は除く)の位置データとそれに対応する差分値
は0か1なのでその位置データをメモリに格納する。(
ロ)のD1E1間に対応する部分の差分値は4なので垂
直方向の負方向に走査開始点Y = nから走査して、
D1E1間の位置データとそれに対応する差分値を得る
ことができ、この差分値が0なのでこの位置データはメ
モリに格納する。前記走査によって得られた位置データ
の集合をとれば2値パターンの連続した輪郭線(へ)を
得ることができる。またメモリ内の位置データには同じ
ものはない。
Since the absolute value of the difference value corresponding to B1C1 in (b) is 2, the vertical scanning memory 6 is accessed, and since the sign is -, scanning is performed in the positive direction from the scanning starting point y=o, and the position is detected in the same way as above. B2C2 (after performing processing and difference detection processing)
Since the position data between (excluding both ends) and the corresponding difference value are 0 or 1, the position data is stored in the memory. (
Since the difference value of the part corresponding to D1E1 in b) is 4, scan from the scanning start point Y = n in the negative vertical direction,
Position data between D1E1 and the corresponding difference value can be obtained, and since this difference value is 0, this position data is stored in the memory. By taking a set of position data obtained by the scanning, a continuous contour line of a binary pattern can be obtained. Also, no two pieces of position data in memory are the same.

(If)  第2図において、2値パターンの原画像(
ト)に対して、画像データの縁にあるもの、すなわちX
=O、X=m 、Y:O、Y=mのラインノ各/J(7
)1のデータを数え、その値の最も小さなX−Oのライ
ンに沿って最初に検出を行う。すなわち、水平方向の正
の方向に走査開始点X=oから走査をして、(1)のよ
うな位置データを得る。11G、1間に対応する差分値
は(す)から−11なので、回路9にて走査条件検出処
理を行ない垂直方向の正の方向にY=v (IのY座標
)から走査する。このようにすればY=oから位置検出
を行なうよりも処理速度が速くなるだけでなく、後述す
るように検出しにくい部分も検出可能となる。このよう
にして得だ位置データレ)の02F2間(G2は除く)
の差分値は0か1なのでこの位置データをメモリに格納
する。F2I2間(I、は除く)の位置データに対応す
る差分値は一2以下なので、走査条件検出処理回路7に
より水平方向の正の方向にX=u(FのX座標)から走
査する。こうすればx−oから正の方向に走査した時(
ト)の0点等のだめにかくれていたFI部が検出可能と
なる。このようにして得だ位置データ量。13間(13
,F3は除く)に対応する差分値は0か−1なのでこの
位置データはメモリに格納する。前記のようにして得ら
れた位置データの集合をとれば連続した輪郭線(ト)を
得ることができる。    ′ 第1図の(イ)や第2図の(ト)の画像は、部品等の公
知や検査およびコーナ点等の物体の特定位置の検、出を
行なうときに対象画像としてよく表われる。
(If) In Figure 2, the original image of the binary pattern (
), what is on the edge of the image data, that is,
=O, X=m, Y:O, Y=m line no/J(7
) 1 data is counted, and detection is first performed along the X-O line with the smallest value. That is, scanning is performed in the positive horizontal direction from the scanning starting point X=o to obtain position data as shown in (1). Since the difference value corresponding to 11G and 1 is -11 from (su), the circuit 9 performs scanning condition detection processing and scans from Y=v (Y coordinate of I) in the positive vertical direction. In this way, the processing speed is not only faster than when position detection is performed from Y=o, but also parts that are difficult to detect can be detected, as will be described later. In this way, you can obtain position data between 02F2 (excluding G2)
Since the difference value is 0 or 1, this position data is stored in the memory. Since the difference value corresponding to the position data between F2I2 (excluding I) is less than 12, the scanning condition detection processing circuit 7 scans in the positive horizontal direction from X=u (X coordinate of F). In this way, when scanning in the positive direction from x-o (
It becomes possible to detect the FI section that was hidden, such as the 0 point in g). In this way, you can gain a lot of location data. 13 minutes (13
, F3 is excluded) is 0 or -1, so this position data is stored in the memory. By taking a set of position data obtained as described above, a continuous contour line (g) can be obtained. ' The images shown in FIG. 1 (A) and FIG. 2 (G) often appear as target images when inspecting parts, etc., and when detecting and identifying specific positions of objects such as corner points.

このような場合、取込む画像のだいだいの形状は既知で
あり、一方向(実施例では水平方向の正の方向)からの
輪郭線の検出を中心に行なえば十分である場合が多い。
In such cases, the general shape of the image to be captured is known, and it is often sufficient to mainly detect the outline from one direction (in the embodiment, the positive horizontal direction).

また実施例のように中心となる方向からの位置検出処理
と差分検出処理は最初のラインから最後のライン1で−
通り行ってその結果をバッファメモリ等に格納しておき
、差分データの絶対値が2以上のものに対応する位置を
あらかじめ検出しておいて、後の処理をまとめて行なっ
てもよいし、順次検出していく途中で差分値の絶対値が
2以上になれば直に走査条件検出処理に基づく走査を行
ってもよい。
Also, as in the embodiment, the position detection process and the difference detection process from the center direction are performed from the first line to the last line 1.
The results can be stored in a buffer memory, etc., and the positions corresponding to the absolute value of the difference data being 2 or more can be detected in advance, and the subsequent processing can be performed all at once, or sequentially. If the absolute value of the difference value becomes 2 or more during detection, scanning based on the scanning condition detection process may be performed immediately.

この場合バッファメモリとしては小さな容量のものでよ
く、マイクロコンピュータ等を用いてソフト的に処理し
ても、ハードウェアによる処理を行ってもよい。
In this case, the buffer memory may have a small capacity, and the processing may be performed by software using a microcomputer or the like, or by hardware.

以上説明したように本発明によれば次のような効果が得
られる。
As explained above, according to the present invention, the following effects can be obtained.

(1)莫大な画像データの表わすパターンの輪郭線を表
わすデータの集合を得ることによってデータ量を少なく
することができる。
(1) The amount of data can be reduced by obtaining a set of data representing the outline of a pattern represented by a huge amount of image data.

@)同一の位置データを複数個もっことなく連続した輪
郭線を得ることができる。
@) It is possible to obtain continuous contour lines using multiple pieces of the same position data.

(3)ソフ)[よる位置検出を行う時、最初にデータの
変化する点を検出したら、そのラインの位置検出を打切
るので処理時間が短くてすむ。
(3) Software) [When performing position detection according to the method, when the first point where the data changes is detected, the position detection for that line is discontinued, so the processing time is shortened.

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

第1図は画像データの処理例を表わす図であり、(イ)
は原画像、(ロ)とに)は検出した位置データ、(ハ)
と(ホ)は差分値、(へ)は検出データによる輪郭線の
例を示す図、第2図は画像データの他の処理例を表わす
図であり、(ト)は原画像、(力と←)と(ロ)は検出
した位置デ〜り、(1刀とQりと(ワ)は差分値、(力
は検出データによる輪郭線の例を示す図、第3図は本発
明による輪郭線検出方法の処理の流れを示すブロック図
である。 2・・・・・・2値化処理回路、3・・・・・・画像メ
モリ、4・・・・・水平方向走査用メモリ、6・・・・
・・垂直方向走査用メモリ、6・・・・・・位置検出処
理回路、7・・・・・・差分検出処理回路、8・・・・
・・メモリ、9・・印・走査条件検出処理回路。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名山 
      1 (リン
FIG. 1 is a diagram showing an example of image data processing, and (a)
is the original image, (b) and (b) is the detected position data, (c) is the detected position data.
and (E) are difference values, (F) is a diagram showing an example of a contour line based on detected data, FIG. 2 is a diagram showing another example of image data processing, and (G) is an original image, ←) and (b) are the detected position data, (1 sword, Qri and (wa) are the difference values, (force is a diagram showing an example of the contour line based on the detected data, and Figure 3 is the contour line according to the present invention. It is a block diagram showing the flow of processing of the line detection method. 2...Binarization processing circuit, 3... Image memory, 4... Memory for horizontal direction scanning, 6・・・・・・
... Vertical scanning memory, 6... Position detection processing circuit, 7... Difference detection processing circuit, 8...
...Memory, 9...Mark/Scanning condition detection processing circuit. Name of agent: Patent attorney Toshio Nakao and one other name
1 (phosphorus

Claims (1)

【特許請求の範囲】[Claims] 2値パターンの入力画像データを格納するメモリと、水
平方向(X方向)または垂直方向(Y方向)のライン走
査において画像データが0から1または1からOへ最初
に変化する位置を順次検出するステップと、前記検出し
た位置の差分を順次となるステップと、前記差分値より
走査条件を検出するステップとを有し、前記ライン走査
を繰シ返すことによって得られた位置データの集合を2
値パターンの輪郭線とすることを特徴とする輪郭線検出
方法。
A memory that stores binary pattern input image data and sequentially detects the position where the image data first changes from 0 to 1 or from 1 to O in horizontal (X direction) or vertical (Y direction) line scanning. a step of sequentially determining the difference between the detected positions; and a step of detecting a scanning condition from the difference value, and a set of position data obtained by repeating the line scan.
A contour line detection method characterized in that the contour line is a value pattern contour line.
JP57103201A 1982-06-15 1982-06-15 Detecting method of contour line Pending JPS58219683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57103201A JPS58219683A (en) 1982-06-15 1982-06-15 Detecting method of contour line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57103201A JPS58219683A (en) 1982-06-15 1982-06-15 Detecting method of contour line

Publications (1)

Publication Number Publication Date
JPS58219683A true JPS58219683A (en) 1983-12-21

Family

ID=14347898

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57103201A Pending JPS58219683A (en) 1982-06-15 1982-06-15 Detecting method of contour line

Country Status (1)

Country Link
JP (1) JPS58219683A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1987007414A1 (en) * 1986-05-29 1987-12-03 Fanuc Ltd Image processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1987007414A1 (en) * 1986-05-29 1987-12-03 Fanuc Ltd Image processing system

Similar Documents

Publication Publication Date Title
US5081689A (en) Apparatus and method for extracting edges and lines
CN114355467A (en) Detection model establishment and multi-image-based track foreign matter detection method
JPS58219683A (en) Detecting method of contour line
JP2815263B2 (en) Fine line image shaping method
JPH065545B2 (en) Figure recognition device
JPS6055474A (en) Detector for difference between images
JPH0718810B2 (en) Pattern inspection method
JP2959017B2 (en) Circular image discrimination method
JPS58158761A (en) Pattern position detecting method
JPH0624028B2 (en) Position measurement method of feature point corners for pattern recognition
JPS6126716B2 (en)
JPH057752B2 (en)
JP3048718B2 (en) Vertex detector
JPS59206990A (en) Pattern extracting device
JPH041282B2 (en)
JPS58154072A (en) Visual recognizing method
JPH0522598A (en) Picture input device
JPS61145405A (en) Shape recognizing apparatus
JPH0337229B2 (en)
JPH07104137B2 (en) Method of detecting the rotation angle of the target pattern
JPH02222076A (en) Contour line extracting device
JPS63103382A (en) Erase point detector
JPS6140683A (en) Contour tracking device
JPH07104933B2 (en) Image processing device
JPH0827818B2 (en) Rotation angle detection method for character strings