JPH02195485A - Image processor - Google Patents

Image processor

Info

Publication number
JPH02195485A
JPH02195485A JP1015578A JP1557889A JPH02195485A JP H02195485 A JPH02195485 A JP H02195485A JP 1015578 A JP1015578 A JP 1015578A JP 1557889 A JP1557889 A JP 1557889A JP H02195485 A JPH02195485 A JP H02195485A
Authority
JP
Japan
Prior art keywords
edge
data
image
address
memory
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
JP1015578A
Other languages
Japanese (ja)
Inventor
Suguru Ishihara
石原 英
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP1015578A priority Critical patent/JPH02195485A/en
Priority to US07/469,351 priority patent/US5058181A/en
Priority to DE69033046T priority patent/DE69033046T2/en
Priority to EP90101484A priority patent/EP0380090B1/en
Priority to AT90101484T priority patent/ATE179007T1/en
Priority to SG1996008693A priority patent/SG49275A1/en
Publication of JPH02195485A publication Critical patent/JPH02195485A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Abstract

PURPOSE:To increase a processing speed by detecting an edge part for deciding a data value from binary data stored in an image memory, writing the address of the edge part in a memory and calculating the feature of a graphic included in an input image based on the edge address data. CONSTITUTION:An image signal inputted from a camera 1 is converted into a digital signal by an A/D converter 2, the digital signal is sent to the image memory 3 and the contents of the stored image signal is supplied to a binarizing circuit 4 at a prescribed timing. The circuit 4 discriminates the signal at a prescribed level, converts the signal into binary data '1' to '0' and sends the binary data to an edge measuring circuit 5, and a position to be changed from '1' to '0' or from '0' to '1' on a horizontal line is detected and added to an edge information memory 6. The stored data are sent to a CPU 8, a ROM 9, a RAM 10, etc., connected to a data/address bus 7 to calculate the area, centroid and inclination of a graphic. Thus, the hardware processing and software processing are combined to miniaturize the device.

Description

【発明の詳細な説明】 (発明の分野) この発明は、入力された画像中に含まれる図形のエツジ
部を検出し、そのアドレスデータに基いて、図形の面積
9重心、傾き等の特徴量を算出することのできる画像処
理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of the Invention) This invention detects the edges of a figure included in an input image, and based on the address data, detects feature quantities such as the area, center of gravity, and slope of the figure. The present invention relates to an image processing device that can calculate .

(発明の概要) この発明は、入力された画像中に含まれる図形のエツジ
部を検出し、そのアドレスデータに基いて、図形の面積
1重心、傾き等の特徴量を算出する画像処理装置におい
て、処理量の多いエツジ部検出およびそのアドレスデー
タ収集についてを専用のハードウェア回路により処理し
、それ以外の演算等の処理についてをソフトウェア処理
により行なうことにより、処理速度を高速にすると同時
に、装置の小型、低価格を実現したものである。
(Summary of the Invention) The present invention provides an image processing device that detects the edge portion of a figure included in an input image and calculates feature quantities such as the area, center of gravity, and slope of the figure based on the address data. , edge detection and address data collection, which require a large amount of processing, are processed by a dedicated hardware circuit, and other calculations and other processing are performed by software processing. It is small in size and low in price.

(従来技術とその問題点) 従来、この種の画像処理装置では、図形の特徴を抽出す
る方法として、大別すると次の2つの方法がある。
(Prior art and its problems) Conventionally, in this type of image processing apparatus, there are two methods for extracting the features of a figure, which can be broadly classified as follows.

(1)画像データをメモリに取込んだ後、これらデータ
をソフトウェア処理にすることにより、図形の特徴量を
算出する。
(1) After the image data is loaded into the memory, the feature amount of the figure is calculated by subjecting the data to software processing.

(2)外部からの画像データを取り込みながら、あるい
は、一端メモリに取込んだ後、これらのデータをハード
ウェア処理することにより、図形の特徴量を算出する。
(2) Calculate the feature amount of the figure while importing image data from the outside or by processing these data with hardware after importing the data into memory.

しかしながら、(1)のソフトウェア処理の場合、処理
速度が遅いため、算出までの時間がかかりすぎる問題が
ある。
However, in the case of software processing (1), the processing speed is slow, so there is a problem that it takes too much time to calculate.

また、(2)のハードウェア処理の場合、処理速度が早
くなるものの装置が大型、高価になり、しかも汎用性に
乏しくなるという問題がある。
In addition, in the case of (2) hardware processing, although the processing speed is faster, there are problems in that the device is large and expensive, and has poor versatility.

(発明の目的) この発明は上記の問題を解消するためになされたもので
、その目的とするところは、図形の特徴量を短時間に算
出すると同時に、装置自体を小型安価に構成することの
できる画像処理装置を提供することにある。
(Objective of the Invention) This invention was made to solve the above-mentioned problems, and its purpose is to calculate the feature amount of a figure in a short time, and at the same time to make the device itself small and inexpensive. The objective is to provide an image processing device that can.

(発明の構成と効果) この発明は上記目的を達成するために、入力画像内に含
まれる図形についての面積2重心、傾き等の特徴を抽出
する機能を有する画像処理装置において、 画像メモリに記憶されている2値化データから、画像を
構成するライン上において、データ値が判定するエツジ
部を検出し、そのエツジ部のアドレスをエツジ情報メモ
リに書込む、ハード構成のエツジ部検出回路と、 エツジ情報メモリ内のエツジアドレスデータに基き、入
力画像内に含まれる図形の特徴をソフトウェア処理によ
り算出する演算処理部と、を備えたことを特徴とする。
(Structure and Effects of the Invention) In order to achieve the above object, the present invention provides an image processing device having a function of extracting features such as area double center of gravity and inclination of a figure included in an input image, which is stored in an image memory. an edge detection circuit having a hardware configuration, which detects an edge portion determined by a data value on a line forming an image from the binarized data, and writes the address of the edge portion into an edge information memory; The present invention is characterized by comprising an arithmetic processing unit that calculates the features of a figure included in an input image by software processing based on edge address data in an edge information memory.

この発明によれば、処理量の多いエツジ部の検出、およ
びそのアドレスデータの収集については、専用のハード
ウェア回路により処理され、それ以外の演算等の処理に
ついては、ソフトウェア処理により行われることにより
、処理速度が高速になると同時に、小型、低価格に構成
することができる。
According to this invention, detection of edge portions that require a large amount of processing and collection of their address data are processed by a dedicated hardware circuit, and other processing such as calculations is performed by software processing. , the processing speed can be increased, and at the same time, it can be configured to be small and low cost.

また、演算部のソフトウェアの変更が可能であるため、
処理内容の設定に汎用性が増し、装置の用途を増大する
ことができる。
In addition, since the software of the calculation section can be changed,
This increases versatility in setting processing contents and increases the uses of the device.

(実施例) 以下、この発明の実施例を図面に基いて説明する。(Example) Embodiments of the present invention will be described below with reference to the drawings.

第1図は、この発明が適用される画像処理装置の電気的
構成を示すブロック図である。
FIG. 1 is a block diagram showing the electrical configuration of an image processing apparatus to which the present invention is applied.

図において、A/D変換器2は、カメラ1から入ツノさ
れた画像信号をデジタル信号に変換して画像メモリ3に
送る。
In the figure, an A/D converter 2 converts an image signal received from a camera 1 into a digital signal and sends it to an image memory 3.

画像メモリ3は、入力されたデジタル信号を記憶すると
ともに記憶された画像信号の内容を所定のタイミングで
2値化回路4へ送る。
The image memory 3 stores the input digital signal and sends the contents of the stored image signal to the binarization circuit 4 at a predetermined timing.

2値化回路4は、デジタル化された画像信号が人力され
ると、所定のレベルで弁別し、1または0の2値データ
に変換し、エツジ計測回路5に送る。
When the digitized image signal is manually input, the binarization circuit 4 discriminates it at a predetermined level, converts it into binary data of 1 or 0, and sends it to the edge measurement circuit 5.

エツジ計測回路5では、゛画像を構成する1水平ライン
上でのデータの反転部、つまり、1から0、または0か
ら1への変化する位置を検出し、これを図形のエツジ部
と認識し、そのエツジ部に該当するライン上のアドレス
(X座標)を抽出し、エツジ情報メモリ6へ送る。
The edge measuring circuit 5 detects the inverted part of data on one horizontal line that makes up the image, that is, the position where the data changes from 1 to 0 or from 0 to 1, and recognizes this as the edge part of the figure. , extracts the address (X coordinate) on the line corresponding to the edge portion and sends it to the edge information memory 6.

エツジ情報メモリ6では、入力されたエツジアドレスデ
ータが格納され、格納されたデータは適宜、データ/ア
ドレスバス7上に送られる。
The edge information memory 6 stores input edge address data, and the stored data is sent onto the data/address bus 7 as appropriate.

一方、データ/アドレスバス7に接続されたCPU8.
ROM9.RAMl0等により、マイクロコンピュータ
が構成されている。このマイコン部では、データ/アド
レスバス7を介してエツジ情報メモリ6内のエツジアド
レスデータを読出し、画像中にウィンドウとして指定さ
れたエリア内の図形を識別しその図形の面積9重心、傾
き等を算出する処理が行われる。
On the other hand, CPU 8 . connected to data/address bus 7 .
ROM9. A microcomputer is configured by RAMl0 and the like. This microcomputer section reads the edge address data in the edge information memory 6 via the data/address bus 7, identifies the figure in the area designated as a window in the image, and calculates the area, center of gravity, inclination, etc. of the figure. The calculation process is performed.

つまり、この装置では、画像中の図形に関するエツジの
検出、およびそのエツジアドレスデータの書込みまでの
処理を専用のハード回路に分担させ、エツジアドレスデ
ータを読出し、そのデータに基き面積1重心、傾き等を
算出する処理をマイコンに分担させたものである。
In other words, in this device, a dedicated hardware circuit is responsible for detecting edges related to figures in an image and writing the edge address data, reads the edge address data, and based on that data, calculates the area, center of gravity, slope, etc. The process of calculating this is done by a microcomputer.

このように、専用のハード回路を用いてエツジの検出を
する場合、ソフトウェア処理のように1画素ごとの検出
処理と異なり、連続して処理することが可能になり、最
も処理負担の大きいエツジ検出処理についての処理速度
を格段に向上することができる。
In this way, when detecting edges using a dedicated hardware circuit, unlike software processing which detects each pixel, it is possible to perform continuous processing, making it possible to detect edges with the greatest processing load. Processing speed can be significantly improved.

また、エツジアドレスデータ書込以後の処理についてを
マイコン処理にしたことにより、装置がより大型化され
ることなく、安価でしかも、処理上の設定変更について
もプログラム交換等により容易に行なうことができる。
In addition, by using a microcomputer to handle the processing after writing the edge address data, the device does not need to be made larger, is less expensive, and processing settings can be easily changed by exchanging programs. .

次に、エツジアドレスデータを用いて、図形の特徴量を
算出する手順について説明する。
Next, a procedure for calculating feature amounts of a figure using edge address data will be explained.

一般に2次元座標にドツト表示される図形の面積(AR
EA) 、重心(XG、YG) 、主軸角度(θ)は、
次式により求まる。
Generally, the area of a figure (AR
EA), center of gravity (XG, YG), principal axis angle (θ),
It is determined by the following formula.

AREA=ΣΣf (L、  j)         
(1)+ま ただし ΣΣf (i、j)  ・j Σ 1−1 =ΣΣf (1゜ j) ・j2 (ΣΣf (i、j)  ・i)2 」 ΣΣ   t、  j 」 O −ΣΣf (1゜ j) ・j2 SUMX2−ΣΣf (i。
AREA=ΣΣf (L, j)
(1) + ΣΣf (i, j) ・j Σ 1-1 = ΣΣf (1゜j) ・j2 (ΣΣf (i, j) ・i) 2 ” ΣΣ t, j ” O −ΣΣf (1゜j) ・j2 SUMX2−ΣΣf (i.

・ 12 (ΣΣf (i、  j)  ・j)2以後式を見やす
くするため、各項を次のように定義し直す。
・12 (ΣΣf (i, j) ・j) 2 From now on, in order to make the equation easier to read, each term is redefined as follows.

このとき、(2)、  (3)、  (5)(7)式は
次のように表わせる。
At this time, equations (2), (3), (5), and (7) can be expressed as follows.

SUMX−ΣΣf (i。SUMX-ΣΣf (i.

j) 上記各式中のf (i、  j)は、図形が2値化デー
タにより表現されているため0または1である。
j) f (i, j) in each of the above formulas is 0 or 1 because the figure is expressed by binary data.

ここで、具体的な2値画像を例にしたAREA。Here, AREA is taken as an example of a specific binary image.

SUMX、SUMY、SUMXY、SUMX2゜SUM
Y2の求め方を第2図に示す。
SUMX, SUMY, SUMXY, SUMX2゜SUM
Figure 2 shows how to determine Y2.

図に示されるように2値画像の場合、各水平ライン毎に
■1ライン中の計算画素数、■X方向の荷重和、■X方
向の2乗荷重和が求まれば、Y座標をカウンタとして計
算し、順次加算していくことにより、AREA、SUM
X、SUMY、SUMXYSUMX2.SUMY2が求
まる。
As shown in the figure, in the case of a binary image, if the number of calculated pixels in one line, the sum of weights in the X direction, and the sum of square weights in the X direction are found for each horizontal line, the Y coordinate can be calculated using a counter. By calculating as follows and adding them sequentially, AREA, SUM
X, SUMY, SUMXYSUMX2. Find SUMY2.

これらの値を(1)〜(12)式に代入すれば、面積1
重心、主軸角度が求められる。
By substituting these values into equations (1) to (12), the area 1
The center of gravity and principal axis angle are determined.

次に■1ライン中の計算画素数、■X方向の荷重和、■
X方向の2乗荷重和をエツジアドレスデータから算出す
る方法について説明する。
Next, ■ the number of calculated pixels in one line, ■ the sum of weights in the X direction, ■
A method of calculating the sum of square weights in the X direction from edge address data will be explained.

1水平ライン中のパターンにおけるエツジ座標が第3図
のように求められている場合、X方向の荷重和(S n
)と2乗荷重和(Dn)は次のようにして求まる。
When the edge coordinates of a pattern in one horizontal line are determined as shown in Figure 3, the sum of weights in the X direction (S n
) and the sum of square weights (Dn) are determined as follows.

5−(X2+X3+X4+X5) + (Xa +X9 +Xto) + (X12)D−
(X22+X32 +X、2 +X52)+(Xa 2
+x92+Xto2)+ (X122)和と2乗荷重和
は次のように定義できる。
5-(X2+X3+X4+X5) + (Xa +X9 +Xto) + (X12)D-
(X22+X32 +X, 2 +X52)+(Xa 2
+x92+Xto2)+ (X122) The sum and square weighted sum can be defined as follows.

一般に に−OK−0 であるから、パターンのエツジ座標(Xaとxb)が求
まっていれば、そのパターンについての荷重この実施例
では上述したように画像メモリ3の内容が、2値化回路
4により2値化され、1水平ライン毎に、その情報がエ
ツジ計測回路5に入力され、エツジ計測回路5では1水
平ライン中の左から順にO〜1または1〜0の変化点(
画素)を検知し、そのX座標をエツジ情報メモリ6にス
トアする。このエツジ情報メモリ6の内容はCPU10
に読出されるが、その際の読出し順序は右方向からにな
る。
In general, -OK-0, so if the edge coordinates (Xa and xb) of a pattern are determined, the load for that pattern is The information is input to the edge measuring circuit 5 for each horizontal line.
pixel) and stores its X coordinate in the edge information memory 6. The contents of this edge information memory 6 are stored by the CPU 10.
However, the order of reading at that time is from the right side.

またこの実施例では、汎用性を持たせるため第4図に示
すように画面上の任意の矩形領域をウィンドウとして指
定しその内部のエツジ情報を取出している。図ではウィ
ンドウの1ラインについてのみを具体的に示している。
Further, in this embodiment, in order to provide versatility, an arbitrary rectangular area on the screen is designated as a window, as shown in FIG. 4, and edge information inside the window is extracted. In the figure, only one line of the window is specifically shown.

このウィンドウは、左上の座標(Xb、Yb)と大きさ
(Xs、Ys)で定義される。
This window is defined by the upper left coordinates (Xb, Yb) and size (Xs, Ys).

ここでもAREA、SUMX、SUMY、SUMXY、
SUMX2.SUM Y2は次のように計算される。
Here too AREA, SUMX, SUMY, SUMXY,
SUMX2. SUM Y2 is calculated as follows.

ただしEn’=En+Xb (17)〜(22)式を(8)〜(12)式に代入すれ
ば、面積9重心、主軸角度が求めることができる。
However, if En'=En+Xb (17) to (22) are substituted into equations (8) to (12), the area 9 center of gravity and principal axis angle can be determined.

また、(18)、  (20)、  (21)式につい
ては、その計算結果を予めテーブル化して内蔵しておけ
ば計算時間をより短縮することができる。
Furthermore, for formulas (18), (20), and (21), if the calculation results are made into a table and stored in advance, the calculation time can be further reduced.

この実施例では、図形のエツジアドレスをハードウェア
で求め、その情報からソフトウェアで上記のような計算
を行なうことにより、簡単でしかも高速に面積9重心、
主軸角度などの図形特微量を求めることができる。
In this example, the edge address of a figure is determined by hardware, and the above calculation is performed by software from that information, so that the area 9 center of gravity,
Geometric features such as the principal axis angle can be determined.

またさらにソフトウェアを変更することにより図形の周
囲長や穴数、個数等の他の図形特微量についても高速に
求めることができる。
Furthermore, by changing the software, other graphic feature quantities such as the peripheral length of the figure, the number of holes, and the number of pieces can also be determined at high speed.

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

第1図はこの発明に係る画像処理装置の電気的構成を示
すブロック図、第2図は図形の特徴量算出の説明図、第
3図は水平ライン上におけるパターン説明図、第4図は
図面上に設定されるウィンドウの説明図である。 1・・・カメラ 2・・・A/D変換器 3・・・画像メモリ 4・・・2値化回路 5・・・エツジ計測回路 6・・・エツジ情報メモリ 7・・・データ/アドレスバス 8・・・CPU 9・・・ROM 10・・・RAM 第2図 第1 図
FIG. 1 is a block diagram showing the electrical configuration of an image processing device according to the present invention, FIG. 2 is an explanatory diagram of feature amount calculation of a figure, FIG. 3 is an explanatory diagram of a pattern on a horizontal line, and FIG. 4 is a drawing It is an explanatory diagram of a window set above. 1... Camera 2... A/D converter 3... Image memory 4... Binarization circuit 5... Edge measurement circuit 6... Edge information memory 7... Data/address bus 8...CPU 9...ROM 10...RAM Fig. 2 Fig. 1

Claims (1)

【特許請求の範囲】 1、入力画像内に含まれる図形についての面積重心、傾
き等の特徴を抽出する機能を有する画像処理装置におい
て、 画像メモリに記憶されている2値化データから、画像を
構成するライン上において、データ値が判定するエッジ
部を検出し、そのエッジ部のアドレスをエッジ情報メモ
リに書込む、ハード構成のエッジ部検出回路と、 エッジ情報メモリ内のエッジアドレスデータに基き、入
力画像内に含まれる図形の特徴をソフトウェア処理によ
り算出する演算処理部と、 を備えたことを特徴とする画像処理装置。
[Claims] 1. In an image processing device having a function of extracting features such as area center of gravity and slope of figures included in an input image, an image is extracted from binarized data stored in an image memory. A hard-configured edge detection circuit detects the edge portion for which the data value is determined on the constituent lines and writes the address of the edge portion into the edge information memory, and based on the edge address data in the edge information memory, An image processing device comprising: an arithmetic processing unit that calculates features of a figure included in an input image by software processing;
JP1015578A 1989-01-25 1989-01-25 Image processor Pending JPH02195485A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP1015578A JPH02195485A (en) 1989-01-25 1989-01-25 Image processor
US07/469,351 US5058181A (en) 1989-01-25 1990-01-24 Hardware and software image processing system
DE69033046T DE69033046T2 (en) 1989-01-25 1990-01-25 Machine vision system
EP90101484A EP0380090B1 (en) 1989-01-25 1990-01-25 Image processing system
AT90101484T ATE179007T1 (en) 1989-01-25 1990-01-25 IMAGE PROCESSING SYSTEM
SG1996008693A SG49275A1 (en) 1989-01-25 1990-01-25 Image processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1015578A JPH02195485A (en) 1989-01-25 1989-01-25 Image processor

Publications (1)

Publication Number Publication Date
JPH02195485A true JPH02195485A (en) 1990-08-02

Family

ID=11892612

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1015578A Pending JPH02195485A (en) 1989-01-25 1989-01-25 Image processor

Country Status (2)

Country Link
JP (1) JPH02195485A (en)
SG (1) SG49275A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008118748A (en) * 2006-11-01 2008-05-22 Denso Corp Anomaly detection device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58217084A (en) * 1982-06-11 1983-12-16 Fujitsu Ltd Visual device for robot
JPS61202288A (en) * 1985-03-06 1986-09-08 Hitachi Ltd Visual equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58217084A (en) * 1982-06-11 1983-12-16 Fujitsu Ltd Visual device for robot
JPS61202288A (en) * 1985-03-06 1986-09-08 Hitachi Ltd Visual equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008118748A (en) * 2006-11-01 2008-05-22 Denso Corp Anomaly detection device

Also Published As

Publication number Publication date
SG49275A1 (en) 1998-05-18

Similar Documents

Publication Publication Date Title
JPH06142045A (en) Ophthalmic apparatus
JPH0810132B2 (en) Target pattern rotation angle detection method
JP3372111B2 (en) Watt hour meter character recognition device
JPH02195485A (en) Image processor
JPH07209402A (en) Target detecting tracking device
EP0380090B1 (en) Image processing system
JPH0310107A (en) Inspecting method utilizing gradation pattern matching
JP3461143B2 (en) Color image target position detection device
JP3120469B2 (en) Image display method and apparatus
JP2969779B2 (en) Shading image processing device
JP2535704Y2 (en) Shading image processing device
JPH0559547U (en) Image target detection device
JP2513528Y2 (en) Gray image processor
JPH03278195A (en) Number of sheets measuring instrument
JP2843389B2 (en) Bonding ball inspection device
JP3143291B2 (en) Image target detection device
JPH0773331A (en) Image processor
JPH08221578A (en) Moving object counter
JPH02189697A (en) Pattern recognizing device
JPH02196381A (en) Image target detector
JPH0672771B2 (en) Rotational position / direction detector for target
JPH0579661U (en) Image target detection device
JPS62111368A (en) Main axial angle detector
JPH04142676A (en) Binary image conversion method
JPH04216179A (en) Picture processor