JPH04167081A - Edge feature measuring method - Google Patents
Edge feature measuring methodInfo
- Publication number
- JPH04167081A JPH04167081A JP2291769A JP29176990A JPH04167081A JP H04167081 A JPH04167081 A JP H04167081A JP 2291769 A JP2291769 A JP 2291769A JP 29176990 A JP29176990 A JP 29176990A JP H04167081 A JPH04167081 A JP H04167081A
- Authority
- JP
- Japan
- Prior art keywords
- edge
- density
- image
- density pattern
- mapping
- 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
Links
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、ディジタル画像におけるエツジ特徴の計測方
法に関するものであり、画像処理を用いて物体を認識し
たり計測したりする際に用いられる。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a method for measuring edge features in a digital image, and is used when recognizing or measuring an object using image processing.
(従来の技術)
物体の明るさが変化したりあるいは面の向きが変化する
部分すなわち物体の境界部分を撮像すると、物体の境界
部分は画像中ではステップ状に濃度が変化する部分とな
る。つまり、物体面の性状の変化(反射率と面の向き)
に起因して画像中の濃度が変化する部分がエツジである
。このエツジ特徴の抽出は各種の画像処理の中でも最も
基本的な処理である。エツジ特徴に関する情報は、画像
中の物体の位置を計測したり物体を認識したりする際に
不可欠なものである。(Prior Art) When an image is taken of a part of an object where the brightness changes or the direction of the surface changes, that is, the boundary part of the object, the density of the boundary part of the object changes stepwise in the image. In other words, changes in the properties of the object surface (reflectance and surface orientation)
Edges are areas where the density in an image changes due to Extraction of edge features is the most basic process among various types of image processing. Information regarding edge features is essential when measuring the position of an object in an image or recognizing the object.
エツジはその位置と方向を用いて第1図に示すように特
徴付けられる。第1図では画素の中心位置、すなわち標
本点の位置を原点0にとり、この原点Oを通る水平線を
y軸、垂直線をy軸としている。原点0からエツジeに
垂線を下ろし、このエツジeとの交点をPとする。この
垂線OPの長さをρ(エツジ位置)、垂線OPとy軸と
のなす方向をθ(エツジ方向)として、
p=xcosθ+y sinθ ・・・・・・(1
)によって、ステップエツジを表す。このステップエツ
ジによって2分されるそれぞれの領域を濃度をf、、
f、で表し、f、<f、とする。なお、第1図の破線で
示す部分が画素の境界である。Edges are characterized using their location and orientation as shown in FIG. In FIG. 1, the center position of the pixel, that is, the position of the sample point, is taken as the origin 0, the horizontal line passing through the origin O is taken as the y-axis, and the vertical line is taken as the y-axis. A perpendicular line is drawn from the origin 0 to the edge e, and the point of intersection with this edge e is set as P. The length of this perpendicular line OP is ρ (edge position), and the direction between the perpendicular line OP and the y-axis is θ (edge direction), p=x cos θ + y sin θ (1
) represents a step edge. The density of each area divided into two by this step edge is f,
It is represented by f, and it is assumed that f,<f. Note that the portion indicated by the broken line in FIG. 1 is the pixel boundary.
これまでにエツジ特徴計測方法には数多くのアルゴリズ
ムが提案されている。ここでは従来技術として、これら
の中からHueckelの提案したモデルフィツト型の
エツジ特徴計測方法とテーブル参照によるエツジ特徴計
測方法とを取り上げる。To date, many algorithms have been proposed for edge feature measurement methods. Here, as conventional techniques, we will take up a model fitting type edge feature measurement method proposed by Hueckel and an edge feature measurement method using table reference.
Hueckelの方法は本発明と同様な範晴に属するモ
デルフィツト型の代表的エツジ特徴計測方法であり、ま
たテーブル参照によるエツジ特徴計測方法は画像入力時
の影響を取り除くために予め実験によって補正テーブル
を作成しておくというものである。Hueckel's method is a typical model-fit type edge feature measurement method that belongs to the same category as the present invention, and the edge feature measurement method using table reference requires a correction table to be created in advance through experiments in order to eliminate the influence of image input. The idea is to create one.
まず、ディジタル画素の入力方法とこのときに画像が受
ける影響について説明し、次に上述の2つの従来技術と
その問題点について説明する。First, the method of inputting digital pixels and the effect on the image at this time will be explained, and then the above-mentioned two conventional techniques and their problems will be explained.
(発明が解決しようとする課題)
物体を撮像すると物体からの反射光はカメラのレンズに
よって光電変換素子上に結像され、ここで水平走査を繰
り返しながら時系列的に並んだ1次元の映像信号に変換
される。そして、カメラから出力されたこの映像信号は
A/D変換器でディジタル化、すなわち標本化と量子化
が行われ、2次元の画像として計算機のメモリに入力さ
れる。(Problem to be solved by the invention) When an object is imaged, the reflected light from the object is imaged by the camera lens onto a photoelectric conversion element, where horizontal scanning is repeated and a one-dimensional video signal arranged in time series is generated. is converted to Then, this video signal output from the camera is digitized, that is, sampled and quantized, by an A/D converter, and input into the memory of the computer as a two-dimensional image.
このようにして画像が計算機に入力される場合、画像は
レンズ系や光電変換時の各種の原因により劣化する。When an image is input to a computer in this manner, the image deteriorates due to various causes such as the lens system and photoelectric conversion.
その主な原因は、レンズで結像する際に加えられるぼけ
、ディジタル化する際に垂直走査方向には生じないが水
平走査方向には生じる残像、さらに最近多用される固体
撮像素子カメラにおいて、水平方向と垂直方向で光電変
換素子の形状やピッチが違うために生じる方向による感
度差などである。これらの理由により、物体の境界部分
を撮像しても計算機に入力される画像は理想的なステッ
プエツジにはならない。The main causes of this are blurring that is added when forming an image with a lens, afterimages that occur in the horizontal scanning direction but not in the vertical scanning direction during digitization, and in addition, in solid-state image sensor cameras that are often used these days, This includes sensitivity differences depending on the direction that occur due to differences in the shape and pitch of the photoelectric conversion elements in the vertical direction and the vertical direction. For these reasons, even if the boundary portion of the object is imaged, the image input to the computer will not have an ideal step edge.
Hueckelの考えをステップエツジにあてはめた場
合のエツジモデルを第2図に破線で示す(森 竣工、板
倉栂子:゛画像認識の基板(II)″、pp、 127
−134、オーム社、1990)。この第2図に示すよ
うに、Huecke lの使用したエツジモデルは理想
的なステップエツジモデルemである。エツジ特徴の算
出に用いる計算領域をDとし、Dの中心0を原点とした
ときの座標(x、y)における入力画像の濃度をg(x
、y)とする。ここで、そこでの濃度をm(x、y、
ρ)とするエツジモデルを考える。ただし、ρはエツ
ジ位置、方向、コントラストを示すパラメータ、即ちエ
ツジ特徴である。The edge model when Hueckel's idea is applied to the step edge is shown by the broken line in Figure 2 (Sataka Mori, Toshiko Itakura: ``Image Recognition Substrate (II)'', pp. 127
-134, Ohmsha, 1990). As shown in FIG. 2, the edge model used by Hueckel is an ideal step edge model em. The calculation area used to calculate edge features is D, and the density of the input image at the coordinates (x, y) when the center 0 of D is the origin is g(x
, y). Here, the concentration there is m(x, y,
Consider an edge model with ρ). However, ρ is a parameter indicating edge position, direction, and contrast, that is, an edge feature.
ここで両者の差として、
[fo(g(x、y)−m(x、y、ρ))’dxdy
コ°′” ・・・・・・(2)を考え、第3図に
示す9つの正規直交関数H,(1・0〜8)を用いて解
析的に式(2)を最小にするエツジ特徴を計算している
。すなわち、評価関数E=(e、coso+6.sin
θ)” + e 、cosθ+e、sinθ ・・・・
・・(3)を最小にする条件からエツジ方向θを求め、
この結果を用いてエツジ位置ρなどを求めている。ただ
し、
e+””(1/3)””al ・・・・・・(4)
e、=(1/3)””a、 ・・・・・・(5)e
、=(2/3)”a、 ・・・・・・(6)e、÷2
e、 e、+(a、”+a、”−(am”+a、”)
)/2 ・・・・・・(7)e、−2e、e、+e、
e、+e、e、 ・・・・・・(8)であり、
aI= fD”l (x、 y)g (x+ y) d
x d y 、 1=0−8−−(9)である。Here, as the difference between the two, [fo(g(x, y)-m(x, y, ρ))'dxdy
Considering (2), we can find an edge that analytically minimizes equation (2) using the nine orthonormal functions H, (1.0 to 8) shown in Figure 3. The features are being calculated, that is, the evaluation function E = (e, coso + 6.sin
θ)” + e, cosθ+e, sinθ...
... Find the edge direction θ from the condition that minimizes (3),
This result is used to determine the edge position ρ, etc. However, e+””(1/3)””al...(4)
e, = (1/3)""a, ......(5)e
,=(2/3)”a, ・・・・・・(6)e,÷2
e, e, +(a,"+a,"-(am"+a,")
)/2 ・・・・・・(7) e, -2e, e, +e,
e, +e, e, (8), aI= fD”l (x, y)g (x+ y) d
x dy , 1=0-8--(9).
しかし、入力画像のエツジ濃度パターンは第2図の破線
で示したような理想的なステップエツジモデルemには
ならず、前述の画像劣化のために実線で表すような滑ら
かな濃度パターンの実エツジモデルem’を示す。その
結果、実際の入力画像のエツジ濃度パターンとは一致し
ないエツジモデルに、エツジ近傍画素の濃度パターンを
あてはめることになる。また、式(9)を計算する際、
Hl(x+y)を実現するために計算領域りとして直径
8〜9画素程度の円形領域すなわち50〜60画素が用
いられるために局所的なエツジ特徴を計測することが困
難である。However, the edge density pattern of the input image does not become an ideal step edge model em as shown by the broken line in FIG. em' is shown. As a result, the density pattern of pixels near the edge is applied to an edge model that does not match the edge density pattern of the actual input image. Also, when calculating equation (9),
In order to realize H1(x+y), a circular area with a diameter of about 8 to 9 pixels, that is, 50 to 60 pixels, is used as a calculation area, so it is difficult to measure local edge features.
一方、テーブル参照型としては、特願平2−47247
号(井手他2名二″ディジタル画像に対するエツジ方向
の計測方法″)がある。この方法は、所望の精度を与え
る間隔ゼエッジ位置とエツジ方向の異なる多数の画像を
入力し、この画像から得られたエツジ位置とエツジ方向
と、入力に用いた実際のエツジ位置とエツジ方向との差
を予め補正値として求めておく。このようにして計測さ
れたエツジ位置とエツジ方向から真のエツジ位置とエツ
ジ方向を求めるための補正テーブルを作成する。On the other hand, as a table reference type, Japanese Patent Application No. 2-47247
No. 2 (Ide et al. 2 ``Method for measuring edge direction for digital images''). This method inputs a number of images with different edge positions and edge directions at intervals that give the desired accuracy, and then compares the edge positions and directions obtained from these images with the actual edge positions and edge directions used for input. The difference is determined in advance as a correction value. A correction table is created for determining the true edge position and edge direction from the edge position and edge direction measured in this manner.
この補正テーブルの一例を第4図に示す。An example of this correction table is shown in FIG.
第4図において、横軸、縦軸はそれぞれ計測されたエツ
ジ位置とエツジ方向であり、補正値が等高線表示されて
いる。この方法では、例えばエツジ方向のテーブルを1
°の精度で得るためには角度について360種類の正確
な計測を予め行なわなければならない。In FIG. 4, the horizontal and vertical axes represent the measured edge position and edge direction, respectively, and the correction values are displayed as contour lines. In this method, for example, the table in the edge direction is
In order to obtain an accuracy of 360 degrees, 360 different angle measurements must be made in advance.
また、各エツジ方向毎に、種々のエツジ位置について補
正テーブルを求める必要があることから、効率的に参照
用補正テーブルを作成することが困難である。さらに、
従来の方法はいずれも並列処理が困難なアルゴリズムで
あるために、1つのエツジ画素に着目してエツジ特徴を
求め、次々に着目エツジ画素を移動していくという処理
を繰り返していた。その結果、長い処理時間を要すると
いう問題があった。Further, since it is necessary to obtain correction tables for various edge positions in each edge direction, it is difficult to efficiently create a reference correction table. moreover,
All of the conventional methods use algorithms that are difficult to process in parallel, so the process of focusing on one edge pixel, finding edge features, and moving the edge pixels of interest one after another is repeated. As a result, there was a problem in that a long processing time was required.
(発明の目的)
本発明の目的は、ディジタル画像中のエツジ近傍画素の
濃度パターンから精度良くエツジ特徴を計測する方法を
提供することにある。(Object of the Invention) An object of the present invention is to provide a method for accurately measuring edge features from the density pattern of pixels near edges in a digital image.
(課題を解決するための手段)
本発明は上記課題を解決し目的を達成するためディジタ
ル画像におけるエツジ近傍画素の濃度を用いてエツジ位
置および方向を計測するエツジ特徴計測方法において、
複数のエツジ位置および複数のエツジ方向の組み合わせ
に対し、ディジタル画像を入力する際の点ひろがり関数
を考慮してエツジ近傍画素の濃度パターンへの写像を得
る第1工程と、前記第1工程で算出された複数のエツジ
近傍画素の濃度パターンからエツジ位置およびエツジ方
向への逆写像を、濃度を入力としてエツジ位置およびエ
ツジ方向を出力とする誤差逆伝搬型ニューラルネットを
用いて決定する第2工程と、前記第2工程で決定された
逆写像を用いて、実際に入力した任意の画像においてエ
ツジ近傍画素の濃度パターンからエツジ位置およびエツ
ジ方向を算出する第3工程と、から成ることを特徴とす
る。(Means for Solving the Problems) In order to solve the above problems and achieve the objects, the present invention provides an edge feature measuring method for measuring edge positions and directions using the density of pixels near edges in a digital image.
A first step of obtaining a mapping of edge-nearby pixels to a density pattern by considering a point spread function when inputting a digital image for combinations of multiple edge positions and multiple edge directions; and calculating in the first step. a second step of determining an inverse mapping from the density pattern of a plurality of edge-nearby pixels to the edge position and edge direction using an error backpropagation neural network whose input is the density and whose output is the edge position and edge direction; , a third step of calculating the edge position and edge direction from the density pattern of pixels near the edge in any actually input image using the inverse mapping determined in the second step. .
(作 用)
本発明では、エツジ特徴として従来よりパラメータとし
て用いられてきたエツジ位置とエツジ方向だけではなく
、画像入力時の画像劣化を表す関数として、走査線方向
およびそれと直交する方向の点ひろがり関数を考慮にい
れてステップエツジのモデル化を行う。これにより第2
図の実線で示すように、理想的なステップエツジにぼけ
を加えたより実際的なエツジモデルを用いることができ
る。以下では、このエツジモデルを実エツジモデルem
’と呼ぶ。なお、第2図の破線は従来のステップエツジ
モデルemである。このエツジモデルを用いて次のよう
にエツジ特徴を求める。(Function) In the present invention, in addition to the edge position and edge direction, which have conventionally been used as parameters as edge features, point spread in the scanning line direction and the direction perpendicular thereto is used as a function representing image deterioration during image input. Model the step edge by taking the function into account. This allows the second
As shown by the solid line in the figure, it is possible to use a more realistic edge model in which blur is added to the ideal step edge. Below, we will convert this edge model into a real edge model em
' is called. Note that the broken line in FIG. 2 is the conventional step edge model em. Using this edge model, edge features are determined as follows.
今、エツジ位置とエツジ方向を2次元ベクトルq、エツ
ジ近傍の複数画素の濃度をg(x、y)とし、qからg
(x y y )への写像をA′とし、A′の逆写像
、即ちg(xty)からqへの写像をAとすると、q+
g(xty)、Aの関係は、q”A (g (X+
s 3’ + )9g (Xmy ’:jm)z ”’
t g (Xn ”j t)* ”’)y(X+tyt
)C:D ・・曲(10)と表せる。したがって
、qとg(x、y)との関係を求めことにより写像Aを
決定することができる。Now, let the edge position and edge direction be a two-dimensional vector q, the density of multiple pixels near the edge be g(x, y), and from q to g
Let A' be the mapping to (x y y ), and let A be the inverse mapping of A', that is, the mapping from g(xty) to q, then q+
The relationship between g(xty) and A is q”A (g (X+
s 3' + )9g (Xmy ':jm)z '''
t g (Xn ``j t)* '')y(X+tyt
)C:D...Can be expressed as song (10). Therefore, mapping A can be determined by finding the relationship between q and g(x, y).
一般に、qからg(xty)への写像を求める問題は性
質の良い問題と呼ばれているが、今回のようにその逆問
題は性質の悪い問題に属し、通常、この問題を解くこと
は困難である。上述したように理想的なステップエツジ
についてHueckelによって正規直交関数を用いて
近似的に解かれたが、ぼけなど各種の劣化が加わった実
際の入力画像に対して、エツジ近傍の複数画素の濃度パ
ターンからエツジ位置とエツジ方向とを得る写像Aを解
析的に求めることは困難である。Generally, the problem of finding a mapping from q to g(xty) is called a problem with good properties, but the inverse problem like this one belongs to problems with bad properties, and it is usually difficult to solve this problem. It is. As mentioned above, an ideal step edge was approximately solved by Hueckel using an orthonormal function, but for an actual input image with various deteriorations such as blurring, the density pattern of multiple pixels near the edge is It is difficult to analytically obtain the mapping A that obtains the edge position and edge direction from .
そこで、本発明では次のようにして写像Aを求める。こ
の写像Aを決定するに際し、直接入力画像の濃度g(x
、y)を取り扱う代わりに、実エツジモデルem’より
計算される第2図の実線で示した濃度m(x、y、σ8
.σ9.q)を用いる。ここで、σ8.σ、は、それぞ
れ水平および垂直方向の点ひろがり関数のひろがりであ
る。Therefore, in the present invention, mapping A is obtained as follows. When determining this mapping A, the density g(x
, y), the density m(x, y, σ8
.. σ9. Use q). Here, σ8. σ is the spread of the point spread function in the horizontal and vertical directions, respectively.
今、を番目のエツジ特徴を添字tで表し、評価関数et
として、
et=(Qt A(m(xty+ σ、、 σytqt
)))” ・−・−(11)を考える。qのすべて
の要素に対してetの和の評価関数Eは、
E=Σe、 ・・・・・・(12)を最小にす
る写像Aを決定する。ここで、式(11)および式(1
2)の評価関数に最小平均2乗誤差法が適用できること
に注目し、式(lO)に示したエツジ近傍画素の濃度パ
ターンからエツジ特徴を求める写像Aを、誤差逆伝搬型
ニューラルネットを用いて決定する。このようにして決
定された写像Aを用いて、実際の入力画像についてg(
x、y)すなわちエツジ近傍画素の濃度パターンの写像
を求めることによって、エツジ特徴の計測を行う。Now, the edge feature of is expressed by the subscript t, and the evaluation function et
As, et=(Qt A(m(xty+ σ,, σytqt
)))" ・−・−(11).The evaluation function E of the sum of et for all elements of q is E=Σe, ......The mapping A that minimizes (12) Here, equation (11) and equation (1
Noting that the least mean squared error method can be applied to the evaluation function in 2), the mapping A that calculates the edge feature from the density pattern of pixels near the edge shown in equation (lO) is calculated using an error backpropagation neural network. decide. Using the mapping A determined in this way, g(
Edge characteristics are measured by determining the mapping of density patterns (x, y), that is, density patterns of pixels near the edges.
このように本発明畔、画像入力時の点ひろがり関数を考
慮することによって、実際の入力画像のエツジ濃度パタ
ーンに一致する実エツジモデルを考え、さらに、エツジ
近傍画素の濃度パターンからエツジ特徴への写像をニュ
ーラルネットを用いて得るものである。これにより、−
膜内には解析的に解くことのできない実エツジモデルe
m’を用いてこの写像Aを求めることができる。In this way, the present invention considers the point spread function at the time of image input to create an actual edge model that matches the edge density pattern of the actual input image, and then to map the density pattern of pixels near the edge to edge features. is obtained using a neural network. This results in -
There is a real edge model in the film that cannot be solved analytically.
This mapping A can be obtained using m'.
(実施例)
以下、本発明の実施例をエツジ特徴計測原理、この原理
による計測例の順に第5図ないし第13図及び前記各図
を用いて説明する。(Example) Examples of the present invention will be described below in the order of the edge feature measurement principle and measurement examples based on this principle, using FIGS. 5 to 13 and the above-mentioned figures.
(ア)エツジ特徴計測原理
エツジ特徴計測原理について、エツジのモデル化方法と
エツジ特徴からエツジ近傍画素の濃度パターンへの写像
(A′)の求め方、この逆写像、即ちエツジ近傍画素の
濃度パターンからエツジ特徴への写像Aの求め方の順に
説明する。(A) Edge feature measurement principle Regarding the edge feature measurement principle, how to model edges, how to obtain the mapping (A') from edge features to the density pattern of pixels near the edge, and the inverse mapping of this, that is, the density pattern of pixels near the edge. The method of obtaining the mapping A from to edge features will be explained in order.
(a)エツジのモデル化方法とエツジ特徴からエツジ近
傍画素の濃度パターンへの写像A′の求め方
ステップエツジのモデルとして前述の第1図を用いる。(a) Edge modeling method and how to obtain the mapping A' from edge features to the density pattern of pixels near the edge The above-mentioned FIG. 1 is used as a step edge model.
だだし、エツジ位置ρには、濃度の低い方から高い方へ
の向き原点Oから点Pへの向きと同じ場合に正、逆に反
対の場合は負となるような符号を与える。一方、エツジ
方向θはX軸圧方向からの左まわりの角度を正にとり、
Ooから360” までとする。However, the edge position ρ is given a sign such that it is positive if the direction from the low density side to the high density side is the same as the direction from the origin O to the point P, and is negative if the direction is opposite. On the other hand, the edge direction θ takes a positive angle counterclockwise from the X-axis pressure direction,
From Oo to 360”.
ここで、計算の基準とする画像として、エツジがy軸あ
るいはy軸のいずれか一方と必ず交差する画素をエツジ
画素として定義する。すなわち、画素内を通過するエツ
ジが、
y=Qで一1/2<:x<1/2、
またはx=Oで一1/2<:y<1/2 ・−・
・(13)の条件を満たす場合にその画素はエツジ画素
である。したがって、式(1)と不等式(13)より、
エツジ画素であるためには、エツジ位置ρ、エツジ方向
θは
5ain(−1/21cosθl、−1721sinθ
1)<ρ(wax(1/21cosθ1,1/21si
nθ1)、0°くθ<360°−・−・(14)の条件
を満たす必要がある。このρ、θの範囲を第5図にハツ
チングにより領域として示す。Here, as an image used as a reference for calculation, a pixel whose edge always intersects the y-axis or one of the y-axes is defined as an edge pixel. In other words, the edge passing through the pixel is 11/2<:x<1/2 when y=Q, or 11/2<:y<1/2 when x=O.
- If the condition (13) is satisfied, the pixel is an edge pixel. Therefore, from equation (1) and inequality (13),
In order to be an edge pixel, the edge position ρ and edge direction θ must be 5 ain (-1/21 cos θl, -1721 sin θ
1)<ρ(wax(1/21cosθ1, 1/21si
It is necessary to satisfy the following conditions: nθ1), 0° and θ<360° (14). The range of ρ and θ is shown as a region by hatching in FIG.
このようなステップエツジである場合のエツジ近傍の画
素の濃度g(xs、yl)は、・・・・・・(15)
で計算することができる。ただし、添字Sは標本化され
た画素の中心座標を示しており、ステップエツジ濃度関
数f (x + y )はf、、ycosθ+xsin
θ−ρンOで表される。In the case of such a step edge, the density g(xs, yl) of a pixel near the edge can be calculated as follows (15). However, the subscript S indicates the center coordinates of the sampled pixel, and the step edge density function f (x + y) is f,,ycosθ+xsin
It is expressed as θ−ρnO.
今、レンズのぼけや残像などを含めた画像入力時の点ひ
ろがり関数をh (x * y )とすると、入力画像
におけるエツジ近傍の画素の濃度g(Xs+ys)は、
式(16)のステップエツジ濃度関数f(X、y)と下
記でのべる式(18)の点ひろがり関数h (x +
y )とのたたみ込み計算として得られるので、実エツ
ジモデルの濃度g(Xs+ys)は
Xf(α、β)dadβd x d y −(17
)で求めることができる。ただし、α、βの積分は点ひ
ろがり関数h (x t y )が影響を及ぼす範囲に
ついて行うものとする。この点ひろがり関数は使用する
画像入力システムによって異なる。しかし、通常、レン
ズのぼけの点ひろがり関数は正規分布に近似できること
、また、光電変換は水平、垂直方向で独立で互いに影響
を与えないことから、本発明では点ひろがり関数h(x
、y)をh (x、 y)=I/(2yr a、 a、
) −exp(−172・(x″/ ax”+y”/
cr、”))・・・・・・(18)
で近似する。式(18)において、σ8.σ、はそれぞ
れ水平、垂直方向のひろがりの標準偏差である。Now, if the point spread function when inputting an image including lens blur and afterimages is h (x * y), then the density g (Xs + ys) of pixels near the edges in the input image is:
The step edge concentration function f(X, y) of equation (16) and the point spread function h (x +
y ), the density g(Xs+ys) of the real edge model is obtained as Xf(α,β)dadβd x dy −(17
) can be found. However, it is assumed that the integration of α and β is performed over the range affected by the point spread function h (x ty ). This point spread function varies depending on the image input system used. However, in general, the point spread function of lens blur can be approximated to a normal distribution, and the photoelectric conversion is independent in the horizontal and vertical directions and does not affect each other. Therefore, in the present invention, the point spread function h(x
, y) as h (x, y)=I/(2yr a, a,
) -exp(-172・(x″/ ax″+y″/
cr, ")) (18) In equation (18), σ8.σ is the standard deviation of the spread in the horizontal and vertical directions, respectively.
ステップエツジ濃度関数f(x、y)である式(16)
と点ひろがり関数h (x t y )を示す式(]8
)を式(17)の実エツジモデルの濃度g (xs+
ys)に代入し、水平、垂直それぞれの方向について、
x−3σ8からx+3σ8まで、あるいはV−3σ、か
らy+30、までの範囲について積分することにより実
エツジモデルの各画素の濃度を求める。Equation (16) which is the step edge concentration function f(x,y)
and the equation (]8 showing the point spread function h (x t y )
) as the concentration g (xs+
ys), and for each horizontal and vertical direction,
The density of each pixel of the actual edge model is determined by integrating over the range from x-3σ8 to x+3σ8, or from V-3σ to y+30.
このσ8.σ、は次の関係に注目して計測する。This σ8. σ is measured by paying attention to the following relationship.
線光源の線ひろがり関数は、その線に平行なステップエ
ツジの像の1数機分に等しいという関係が成り立つ(長
尾真監訳: “′ディジタル画像処理″、pp、212
〜216、近代科学社)。したがって、垂直方向すなわ
ちθ=0″と水平方向すなわちθ=90゜のステップエ
ツジを撮像し、計算機に入力する。The relationship holds that the line spread function of a line light source is equal to several step edge images parallel to the line (translation supervised by Makoto Nagao: “Digital Image Processing”, pp. 212)
~216, Kindai Kagakusha). Therefore, step edges in the vertical direction, ie, θ=0″ and in the horizontal direction, ie, θ=90°, are imaged and input into the computer.
そして、このエツジに直交する方向について1数機分を
計算し、画素の座標とそこにおける1数機分値を正規分
布に回帰することによって、この分布の標準偏差として
σ8.σ、を求める。Then, by calculating several planes in the direction orthogonal to this edge, and regressing the coordinates of the pixel and the values for one few planes therein to a normal distribution, the standard deviation of this distribution is set to σ8. Find σ.
(b)エツジ近傍画素の濃度パターンからエツジ特徴へ
の写像Aの求め方
エツジ近傍画素の濃度パターンからエツジ特徴への写像
Aの求め方を第6図に示す。前述したように、式(11
)および(12)の評価関数に最小平均2乗誤差法が適
用できることに注目し、式(11)に示した実エツジモ
デルの濃度パターンからエツジ特徴を求める写像Aを、
3層からなる誤差逆伝搬型ニューラルネットを用いて決
定する。(b) How to find the mapping A from the density pattern of the pixels near the edge to the edge feature FIG. 6 shows how to find the mapping A from the density pattern of the pixels near the edge to the edge feature. As mentioned above, the formula (11
) and (12), the mapping A for calculating edge features from the density pattern of the real edge model shown in equation (11) is expressed as
The determination is made using an error backpropagation neural network consisting of three layers.
第6図に示すように、このニューラルネットの入力層I
Nには実エツジモデルから計算されるエツジ近傍の複数
画素の濃度m(x、、y、、σ8.σ9.q)が入力さ
れる。ところで、エツジ特徴としてエツッジ位置とエツ
ジ方向の他に、エツジコントラストすなわちエツジの濃
度についての情報もある。As shown in Figure 6, the input layer I of this neural network
The density m (x, y, σ8.σ9.q) of a plurality of pixels near the edge calculated from the actual edge model is input to N. By the way, in addition to the edge position and the edge direction, there is also information about the edge contrast, that is, the density of the edge.
しかし、この濃度情報までを含めてモデル化を行うと学
習すべき濃度パターンが膨大な数にのぼる。However, if modeling is performed including this density information, the number of density patterns to be learned will increase to an enormous number.
したがって、エツジのコントラストの変化に対応するた
めに、各濃度パターンにおいて最小濃度が0、最大濃度
が1になるように正規化した正規化濃度を用い、エツジ
画素を中心にそのまわりの8画素すなわち3×3の9画
素の正規化濃度を入力層INに入力する。なお、入力す
る画素の数は9に限るものではなく、入力する画素の数
だけ入力層のユニットを用意すればよい、今回使用する
ニューラルネットでは中間層Hのユニット数は入力層I
Nのユニット数と同数で、各入力層ユニットは全ての中
間層ユニットと結合している。出力層OUTからの出力
は、エツジ位置ρとエツジ方向θである。Therefore, in order to deal with changes in edge contrast, we use normalized densities that are normalized so that the minimum density is 0 and the maximum density is 1 in each density pattern. The normalized density of 9 pixels of 3×3 is input to the input layer IN. Note that the number of input pixels is not limited to 9, and it is sufficient to prepare input layer units equal to the number of input pixels.In the neural network used this time, the number of units in the intermediate layer H is equal to the input layer I.
Each input layer unit is connected to all hidden layer units, with the same number of N units. The output from the output layer OUT is the edge position ρ and the edge direction θ.
今、入力層IN、中間層H2出力層OUTをそれぞれ添
字I、H,Oを用いて表し、さらに、入力層の第iユニ
ットからの出力をvlK、中間層の第jユニットへの入
力をuJ”、両ユニット間の結合の重みW目1″、中間
層の第jユニットにおけるオフセット値をr 、Hとす
ると、これらの関係は次のように表せる。Now, the input layer IN, the hidden layer H2, and the output layer OUT are represented using subscripts I, H, and O, respectively, and the output from the i-th unit of the input layer is vlK, and the input to the j-th unit of the hidden layer is uJ. When the weight of the connection between both units is W1, and the offset values in the j-th unit of the intermediate layer are r and H, these relationships can be expressed as follows.
uj′=ΣWB”V1’+rJ” ・・・・・・(
19)慟
V s”= S (u J”) 叩°°(
20)s(uj”)=1/(1+exp(−2u3”/
c) ・−・−(2t)ここで、Cは定数である。uj′=ΣWB”V1′+rJ” ・・・・・・(
19) V s”= S (u J”)
20) s(uj”)=1/(1+exp(-2u3”/
c) ・−・−(2t) Here, C is a constant.
また、出力層との間の関係も同様に、
u kO=ΣwJk”vj”+ r、0 −・−(z
z)ただし、r 、Oは出力層の第にユニットにおける
オフセット値
■、’= s (uk’) −・−(23
)と表せる。このようなニューラルネットの重み、オフ
セット値を、次のように修正する。Similarly, the relationship with the output layer is as follows: u kO=ΣwJk”vj”+ r, 0 −・−(z
z) However, r and O are the offset values in the first unit of the output layer ■,'= s (uk') −・−(23
) can be expressed as The weights and offset values of such a neural network are modified as follows.
w、−〇−WJ♂0+ ε、δh’V ノ” ””
”(24)wl j”−4W目”+E、δ、Hvlx
、、・−・・(25)’に’−rk’+ 5 、δk
o ・−・−(26)rJ″−4rJ″+ε、
δ? ・・・・・・(27)ただし、ε1.ε7
は学習速度を決めるための定数である。また、1kを教
師信号とすると、修正量δ、。、δIは、 。w, -〇-WJ♂0+ ε, δh'V ノ” ””
"(24) wl j" - 4th W" + E, δ, Hvlx
,...(25)' to '-rk'+5, δk
o ・−・−(26)rJ″−4rJ″+ε,
δ? ......(27) However, ε1. ε7
is a constant for determining the learning speed. Also, if 1k is the teacher signal, the correction amount δ,. , δI is .
δに’=(th−vk。) a s (uk’)/ a
ukO・−・・−(2a)δj″=as(uj”)/
auJ”ΣWj、”δ−・・・・・・(29)で計算さ
れる。to δ'=(th-vk.) a s (uk')/a
ukO・−・・−(2a) δj″=as(uj″)/
auJ"ΣWj,"δ-...(29)
式(21)の値域は0から1までなので、エツジ位置ρ
は−0,5から0.5をOから1に、またエツジ方向θ
もOから360をOから1になるように線形変換した値
を用いる。ニューラルネットの学習には、エツジ位置ρ
の刻みをΔρ画素、エツジ方向θの刻みをΔθ0として
計算した濃度パターンを用いる。この場合、ニューラル
ネットに入力するエツジ特徴の分割数はエツジ位置ρと
エツジ方向θで異なるので、式(29)による修正では
エツジ位置ρ、エツジ方向θを同時に効率的な学習を進
めることができない、そこで、学習速度を速めるために
ここては修正量として、エツジ位置ρとエツジ方向θの
修正量にそれぞれの分割数に比例した重みをかけて学習
を行う。すなわち、式(29)の代わりにδj″−as
(ul”)/au1”・Σα、Wl@”δ、。・・・・
・・(30)を用いる。ただし、k=0.1がそれぞれ
エツジ位置ρとエツジ方向θに対応しているとすると、
α、=(1/Δρ)/(360/Δθ+1/Δρ)α、
=1−α。Since the range of equation (21) is from 0 to 1, the edge position ρ
is -0,5 to 0.5 to O to 1, and edge direction θ
Also, a value obtained by linearly converting O to 360 to O to 1 is used. For neural network learning, the edge position ρ
A density pattern calculated by setting the increments of Δρ pixels as Δθ0 and the increments of θ in the edge direction as Δθ0 is used. In this case, the number of divisions of edge features input to the neural network differs between edge position ρ and edge direction θ, so correction using equation (29) cannot proceed with efficient learning of edge position ρ and edge direction θ at the same time. Therefore, in order to speed up the learning speed, learning is performed by applying weights proportional to the number of divisions to the correction amounts of the edge position ρ and the edge direction θ. That is, instead of equation (29), δj″−as
(ul”)/au1”・Σα, Wl@”δ,...
...(30) is used. However, if k = 0.1 corresponds to the edge position ρ and edge direction θ, respectively,
α, = (1/Δρ)/(360/Δθ+1/Δρ)α,
=1-α.
となる。becomes.
(イ)具体例
以上(ア)でのべたエツジ特徴計測原理に基いて、具体
的なエツジ特徴計測方法を説明する。(B) Specific Example Based on the edge feature measurement principle described above in (A), a specific edge feature measurement method will be explained.
(a)装置
本エツジ特徴計測方法を実施するための装置の概略を第
7図に示す。COD固定撮像素子でなるカメラ1から出
力されるアナログ映像信号は、A/D変換器(回路)で
256階調に量子化されるとともに、水平、垂直方向に
256.240画素に標本化されて計算機のメモリ(回
路)に入力される。なお、今回使用した実験装置では撮
像素子とメモリの画素とはl対lに対応している。(a) Apparatus FIG. 7 schematically shows an apparatus for carrying out the present edge feature measuring method. The analog video signal output from the camera 1, which is a fixed COD image sensor, is quantized into 256 gradations by an A/D converter (circuit) and sampled into 256.240 pixels in the horizontal and vertical directions. It is input into the computer's memory (circuit). In addition, in the experimental device used this time, the image sensor and the memory pixel correspond to each other in a ratio of 1 to 1.
反射率の異なる紙を平板上に貼り付けることにより明る
さがステップ状に変化する物体2を作成し、この物体2
を撮像してエツジ画像を入力した6この物体2は移動ス
テージ3上に載せてベース4に固定されており、カメラ
lの光軸に直交したまま水平方向に移動する。これによ
り、第1図に示した画像中でのエツジ位置ρを変えるこ
とができる。次に、画像中において約20画素離れた2
箇所でエツジ位置を0.1画素の精度で計測する(特願
昭63−196007号、封材 他3名:パエツジ位置
の計測方法”)とともに、2つのエツジ位置ρの実空間
での間隔をマイクロメータ5で0,001wnの精度で
実測した。Create object 2 whose brightness changes stepwise by pasting papers with different reflectances on a flat plate.
This object 2 is placed on a moving stage 3 and fixed to a base 4, and moves in the horizontal direction while remaining perpendicular to the optical axis of the camera l. Thereby, the edge position ρ in the image shown in FIG. 1 can be changed. Next, two pixels located approximately 20 pixels apart in the image.
At the same time, the edge position is measured with an accuracy of 0.1 pixel (Japanese Patent Application No. 196007, Sealing Materials and 3 others: Method for Measuring Edge Position), and the distance between two edge positions ρ in real space is measured. It was actually measured with a micrometer 5 with an accuracy of 0,001wn.
その結果、実空間寸法と画素寸法との比率は、水平、垂
直両方向とも1.062mm/画素であることがわかっ
た。一方、カメラlは回転ステージ6を介してベースに
取付けられており、光軸のまわりに0、loの精度で回
転が行える。これにより、第1図で示したエツジ方向θ
を変えることができる。As a result, it was found that the ratio between the real space dimension and the pixel dimension was 1.062 mm/pixel in both the horizontal and vertical directions. On the other hand, the camera l is attached to the base via a rotation stage 6, and can be rotated around the optical axis with an accuracy of 0 and lo. As a result, the edge direction θ shown in FIG.
can be changed.
これらの移動、回転機構に□より、任意のエツジ特徴を
得ることができる。なお、すべての計測は画像歪の小さ
い画像の中央付近で行った。By using these movement and rotation mechanisms, arbitrary edge characteristics can be obtained. Note that all measurements were performed near the center of the image where image distortion is small.
(b)計測例
具体的なエツジ特徴計測例を説明する。計測は、第1工
程から第3工程までの3工程から成っている。(b) Measurement example A specific example of edge feature measurement will be explained. The measurement consists of three steps, from the first step to the third step.
第1工程
第1工程は、複数のエツジ位置ρおよび複数のエツジ方
向θの組み合わせに対し、ディジタル画像を入力する際
の点ひろがり関数を考慮してエツジ近傍画素の濃度パタ
ーンへの写像A′を得る工程である。そこで、まず式(
18)で示された点ひろがり関数h(x、y)のひろが
りを求める。垂直方向すなわちθ=O°のステップエツ
ジを撮像し、エツジ近傍の水平方向の濃度変化を計測し
た結果を第8図に黒丸印・で示す。また、水平方向すな
わちθ=909のステップエツジを用いて垂直方向の濃
度方向の濃度変化を計測した結果を同じく第8図に白丸
印Oで示す。ここで第8図の横軸は、水平あるいは垂直
方向の画素の座標であり、相対値で示している。式(1
8)の点ひろがり関数の標準偏差σ8.σ、を求めるた
めに、第8図は1数機分を計算し、それを正規分布に回
帰した結果を第9図に示す。ここでは、水平、垂直方向
の1数機分を
d g (x、+0,5yys)/dX=g (Xs
+ 1 t 31’l) g (xs+ ys)
・・・・・・(3I)d g (x、、y
、+0.5)/d y=g(xstys+1)−g(x
s+ys) −−−−−−(32)より算出し
た。第9図の黒丸印・および白丸印Oはそれぞれ垂直方
向、水平方向エツジについて計算された1数機分の値で
ある。式(17)のたたみ込み計算において、分布の周
辺部分に比べ中心付近に大きな重みがかかり点ひろがり
関数の影響が大きく現われることから、1数機分が最大
となる画素を中心にその前後1画素つまり3画素につい
て回帰計算を行った。First step The first step is to map A' to the density pattern of pixels near the edge for combinations of a plurality of edge positions ρ and a plurality of edge directions θ, taking into account the point spread function when inputting a digital image. This is the process of obtaining Therefore, first, the formula (
18) Find the spread of the point spread function h(x, y). The step edges in the vertical direction, that is, θ=O°, were imaged and the density changes in the horizontal direction near the edges were measured. The results are shown in FIG. 8 by black circles. Further, the results of measuring the density change in the vertical density direction using a step edge in the horizontal direction, that is, θ=909, are also shown in FIG. 8 by a white circle O. Here, the horizontal axis in FIG. 8 is the horizontal or vertical pixel coordinates, which are expressed in relative values. Formula (1
8) The standard deviation of the point spread function σ8. In order to find σ, FIG. 8 shows calculations for several machines, and FIG. 9 shows the results of regression to a normal distribution. Here, several planes in the horizontal and vertical directions are d g (x, +0,5yys)/dX=g (Xs
+ 1 t 31'l) g (xs+ys)
・・・・・・(3I)d g (x,,y
, +0.5)/d y=g(xstys+1)-g(x
s+ys) --- Calculated from (32). The black circles and white circles O in FIG. 9 are the values for several planes calculated for the vertical and horizontal edges, respectively. In the convolution calculation of Equation (17), a larger weight is placed near the center of the distribution than in the peripheral parts, and the influence of the point spread function appears to be large. In other words, regression calculations were performed for three pixels.
第9図に示す実線および破線はそれぞれ黒丸印・、白丸
印○にあてはめられた正規分布曲線である。σ8.σ、
の値はエツジ画素内でのエツジ位置ρによって平均値を
中心に約5%変化するので、水平、垂直方向それぞれに
ついてエツジ位置ρを0.1画素ずつ1画素分変化させ
てσ8.σ、を計測し、その平均値である1、03画素
、0.77画素を用いることとした。The solid line and broken line shown in FIG. 9 are normal distribution curves fitted to the black circles and white circles, respectively. σ8. σ,
The value of σ changes by about 5% around the average value depending on the edge position ρ within the edge pixel, so by changing the edge position ρ by 0.1 pixel in each horizontal and vertical direction, σ8. σ was measured, and the average values of 1.03 pixels and 0.77 pixels were used.
このようにして得られた点ひろがり関数とエツジ特徴か
らそれに対応するエツジ近傍画素の濃度パターンが計算
できる。エツジ位置ρを0.1画素刻みで、またエツジ
方向θをl°刻みで変えながら濃度パターンを求める。From the point spread function and edge feature thus obtained, the corresponding density pattern of pixels near the edge can be calculated. A density pattern is obtained while changing the edge position ρ in 0.1 pixel increments and the edge direction θ in 1° increments.
だだし、式(17)の積分計算は、ここでは1画素を水
平、垂直方向それぞれについて11分割してすなわち1
画素を121個の部分領域に分割して行った。なお、濃
度は正規化された値が用いられるので第1図のf、、
f、はいくつでもよ<f、をO,f、を1として計算し
た。However, in the integral calculation of equation (17), one pixel is divided into 11 in each of the horizontal and vertical directions, that is, 1
The pixel was divided into 121 partial regions. Note that since normalized values are used for the concentration, f in Fig. 1.
Any number of f,<f, was calculated with O,f,as 1.
エツジ近傍画素の濃度パターンの計算結果の1例として
、ρ=0でθ=0、ρ=0.2でθ=306の場合を第
10図を示す。この第10図において中央の画素がエツ
ジ画素であり、画素内に書かれている数値は正規化濃度
である。As an example of the calculation result of the density pattern of pixels near the edge, FIG. 10 shows the case where ρ=0 and θ=0, and ρ=0.2 and θ=306. In FIG. 10, the central pixel is an edge pixel, and the numerical value written within the pixel is the normalized density.
第2工程
第2工程は、第1工程で算出された写像A′の逆写像、
即ち、複数のエツジ近傍画素の濃度パターンからエツジ
位置およびエツジ方向への写像Aを、濃度を入力としエ
ツジ位置ρおよびエツジ方向θを出力とする誤差逆伝搬
型ニューラルネットを用いて決定する工程である。エツ
ジ位置ρは一〇、5から0.4画素まで、またエツジ方
向θは0から90°までについて、エツジ位置戸の刻み
Δρを0.1画素、エツジ方向θの刻みΔθを1°とし
て900種類の正規化濃度パターンを入力として500
00回学習を行った。Second step The second step is an inverse mapping of the mapping A' calculated in the first step,
That is, in the step of determining the mapping A from the density pattern of a plurality of edge-nearby pixels to the edge position and edge direction using an error backpropagation neural network whose input is the density and whose outputs are the edge position ρ and the edge direction θ. be. The edge position ρ is from 10, 5 to 0.4 pixels, and the edge direction θ is from 0 to 90 degrees. 500 types of normalized density patterns as input
Learned 00 times.
学習を高速化するために、最初の20000回はエツジ
方向θは56おきとして、0°、 5’ 、 10°
。To speed up learning, the edge direction θ is set every 56 times for the first 20,000 times, and is set to 0°, 5', and 10°.
.
・・・、90°の濃度パターンだけを用い、次の300
00回は学習回数とともにエツジ方向θを1°ずつずら
して5回で1まわりするように、すなわち、0°、5°
、10°、・・・、l’、6°、 Ifo、・・・。..., using only the 90° density pattern, the next 300
00 times, the edge direction θ is shifted by 1° along with the number of learning times so that it goes around once every 5 times, that is, 0°, 5°.
, 10°, ..., l', 6°, Ifo, ....
2°、7°、 12°、・・・、3°、7°、 13°
、・・・。2°, 7°, 12°,..., 3°, 7°, 13°
,...
4°、9’、146.・・・の濃度パターンを繰り返し
用いて1°刻みの学習を行った。式(+9)、 (22
)の重みとオフセット値の初期値はOから1までの間の
乱数を発生させることにより与えた。4°, 9', 146. Learning was performed in 1° increments by repeatedly using the density patterns of... Formula (+9), (22
) were given by generating random numbers between 0 and 1.
また、式(21)および式(24)〜(27)のC9ε
W。In addition, C9ε of formula (21) and formulas (24) to (27)
W.
C7はそれぞれ1,2.0.6.0.6とした。このよ
うな学習により、教師信号とニューラルネットの出力の
差の2乗和すなわち2乗誤差を計算した結果を第11図
(a)に示す。また、各学習回数における全パターン中
の最大エツジ特徴計測誤差の絶対値を第11図(b)に
示す。第11図の横軸はいずれも学習回数であり、第1
1図(a)の縦軸は1回目に計算された結果で正規化し
た2乗誤差を示している。第11図(a)、 (b)に
おいて、破線はエツジ位置ρの結果を、また実線はエツ
ジ方向θの結果を示しており、20回おきにサンプリン
グしたデータを図に示している。第1I図よりニューラ
ルネットは収束しており、50000回学習後のエツジ
位置ρ、エツジ方向θの誤差もそれぞれ最大で0.02
7画素、0.85”と十分な学習が行われていることが
わかる。C7 was set to 1, 2.0.6.0.6, respectively. Through such learning, the sum of squares of the difference between the teacher signal and the output of the neural network, that is, the square error, is calculated, and the results are shown in FIG. 11(a). Furthermore, the absolute value of the maximum edge feature measurement error in all patterns for each number of learning is shown in FIG. 11(b). The horizontal axis in Figure 11 is the number of learning times, and the first
The vertical axis in FIG. 1(a) shows the squared error normalized by the first calculation result. In FIGS. 11(a) and 11(b), the broken line shows the result for the edge position ρ, and the solid line shows the result for the edge direction θ, and the data sampled every 20 times are shown in the figures. As shown in Figure 1I, the neural network has converged, and the errors in edge position ρ and edge direction θ after 50,000 learnings are each up to 0.02.
It can be seen that sufficient learning has been performed with 7 pixels and 0.85''.
この結果、エツジ近傍画素の濃度パターンからエツジ特
徴への写像Aが決定されたことが、わかる。As a result, it can be seen that the mapping A from the density pattern of pixels near the edge to the edge feature has been determined.
第3工程
第3工程は、第2工程で決定された写像Aを用いて、実
際に入力した任意の画像においてエツジ近傍画素の濃度
パターンからエツジ特徴を算出する工程である。実際に
画像を入力しエツジ特徴を計測した結果をエツジ位置、
エツジ方向の順に説明する。Third Step The third step is a step of calculating edge features from the density pattern of pixels near the edge in any actually input image using the mapping A determined in the second step. The result of actually inputting the image and measuring the edge features is the edge position,
The explanation will be given in order of edge direction.
(i)エツジ位置ρの計測
θ=0°すなわち垂直エツジを水平方向に画像中の0.
1画素に相当する実空間での距離として0、106+n
mずつ移動しながらエツジ画像を入力し、エツジ位置ρ
を計測した。約1画素の移動に対して計測した結果を第
12図(a)に示す、第12図の横軸は移動量より計算
されるエツジの画素内で相対的な位置であり、縦軸は入
力画像の3×3画素の正規化濃度を学習後のニューラル
ネットに入力して得られたエツジ位置ρを示している。(i) Measurement of edge position ρ θ=0°, that is, the vertical edge is moved horizontally to 0.0° in the image.
0, 106+n as the distance in real space corresponding to 1 pixel
Input the edge image while moving by m, and set the edge position ρ
was measured. Figure 12(a) shows the measurement results for a movement of approximately one pixel.The horizontal axis in Figure 12 is the relative position within the pixel of the edge calculated from the amount of movement, and the vertical axis is the input. The edge position ρ obtained by inputting the normalized density of 3×3 pixels of the image to the neural network after learning is shown.
白丸印Oは計測値では、実線はOに対して最小2乗法に
より傾き1の直線を引いた結果である。計測結果のばら
つきの標準偏差は0.043画素であり、精度良くエツ
ジ位置が計測されていることがわかる。また、エツジ方
向θ=30″、45″、90aニツイテ、垂直エツジの
場合と同様に0.1画素ずつ約10回すなわち1画素分
移動して計測した結果を第12図(b)。The white circle O is the measured value, and the solid line is the result of drawing a straight line with a slope of 1 from O using the least squares method. The standard deviation of the variation in the measurement results is 0.043 pixels, indicating that the edge positions are measured with high accuracy. Also, in the edge direction θ = 30'', 45'', 90a, the vertical edge was moved about 10 times in 0.1 pixel increments, that is, 1 pixel, and the measurement results are shown in FIG. 12(b).
(c)、 (d)に示す。これらいずれの図においても
白丸印Oは計測値、実線はあてはめられた傾き1の直線
である。それぞれの計測結果のばらつきの標準偏差は0
.016.0,018.0.051画素であり、いずれ
の場合についても本方法により精度良くエツジ位置を計
測できることが確認された。Shown in (c) and (d). In each of these figures, the white circles O are measured values, and the solid lines are fitted straight lines with a slope of 1. The standard deviation of the dispersion of each measurement result is 0
.. 016.0, 018.0.051 pixels, and it was confirmed that the edge position could be measured with high accuracy by this method in both cases.
(ij)エツジ方向θの計測
カメラを光軸のまわり回転させることにより、物体の境
界すなわちエツジ方向θを0°から906まで1″刻み
で変化させてエツジ方向計測実験を行った。その結果を
第13図に示す。この第13図の横軸は設定したエツジ
方向、縦軸は計測されたエツジ方向であり、白丸印Oは
計測値である。#測結果のばらつきの標準偏差は0.6
9’であり、最大値でも1.82°であった。この結果
、本方法によりエツジ方向についても精度良く計測でき
ることが確認された。(ij) Measurement of edge direction θ By rotating the camera around the optical axis, we performed an edge direction measurement experiment by changing the boundary of the object, that is, the edge direction θ, from 0° to 906 in 1″ steps. It is shown in Fig. 13. In Fig. 13, the horizontal axis is the set edge direction, the vertical axis is the measured edge direction, and the white circle mark O is the measured value. #The standard deviation of the dispersion of the measurement results is 0. 6
9', and the maximum value was 1.82°. As a result, it was confirmed that the present method enables accurate measurement in the edge direction as well.
(発明の効果)
以上説明したように、本発明のエツジ特徴計測方法は、
エツジ特徴ととも走査線方向とそれに直交する方向の点
ひろがり関数をもパラメータとして導入することにより
、従来用いられてきた理想的なステップエツジモデルに
比べ、より実際の入力画像に一致して実エツジモデルへ
のあてはめを行っている。この実エツジモデルを用いて
、エツジ特徴からエツジ近傍画素の濃度パターンへの写
像を求め、この逆写像すなわち濃度パターンからエツジ
特徴への変化を、3層構造からなる誤差逆伝搬型ニュー
ラルネットを用いて決定する。そして、実際の計測にお
いては、この求められた逆写像に、入力画像の正規化濃
度パターンを入力してエツジ特徴への変換を行うもので
ある。したがって、本方法は、従来の方法に比べ次のよ
うな利点がある。(Effects of the Invention) As explained above, the edge feature measurement method of the present invention
By introducing edge features as well as point spread functions in the scanning line direction and the direction orthogonal thereto as parameters, the real edge model can more closely match the actual input image than the ideal step edge model that has been used in the past. are being fitted to. Using this real edge model, we calculate the mapping from edge features to the density pattern of pixels near the edge, and calculate the inverse mapping, that is, the change from the density pattern to edge features, using an error backpropagation neural network with a three-layer structure. decide. In actual measurement, the normalized density pattern of the input image is input to the obtained inverse mapping to convert it into an edge feature. Therefore, this method has the following advantages over conventional methods.
(i)誤差逆伝搬型ニューラルネットを用いることによ
り、解析的に解くことのできない実エツジモデルにあて
はめることができる。(i) By using an error backpropagation neural network, it is possible to fit real edge models that cannot be solved analytically.
(ロ)入力画像のエツジ濃度パターンに一致した実エツ
ジモデルへあてはめることから、局所的な情報からでも
エツジ特徴が高精度に計測できる。(b) Since it is applied to a real edge model that matches the edge density pattern of the input image, edge features can be measured with high precision even from local information.
実際にエツジ位置およびエツジ方向を変えながらエツジ
特徴計測実験を行った結果、エツジ位置とエツジ方向の
計測結果のばらつきの標準偏差値はそれぞれ0.016
から0.051画素、0.696であり、高精度にエツ
ジ特徴が計測できることが確認された。As a result of actually conducting an edge feature measurement experiment while changing the edge position and edge direction, the standard deviation value of the dispersion of measurement results for edge position and edge direction was 0.016, respectively.
0.051 pixel and 0.696, confirming that edge features can be measured with high accuracy.
(iii)従来は各エツジ画素について1画素ずつ順番
に処理するために長い処理時間が必要であったが、それ
に対して本方法はニューラルネットの利点の1つである
並列処理の適用が可能なのでエツジ特徴をリアルタイム
に計測できる。(iii) Conventionally, a long processing time was required to sequentially process each edge pixel one by one, but this method allows parallel processing, which is one of the advantages of neural networks, to be applied. Edge characteristics can be measured in real time.
(iv)点ひろがり関数をも考慮してエツジをモデル化
しているので、どのような画像入力装置に対しても画像
入力時の点ひろがり関数を求めることにより、精度良く
エツジ特徴を計測できる。(iv) Since edges are modeled taking into account the point spread function, edge features can be measured with high precision by determining the point spread function at the time of image input for any image input device.
第1図はエツジ特徴を説明するための図、第2図はエツ
ジモデルを説明するための図、第3図はHueckel
が用いた9つの正規直交関数を説明するための図、第4
図は従来技術のテーブル参照によるエツジ特徴計測方法
を説明するための図、第5図はエツジ画素であるために
エツジ特徴が満たすべき条件を示した図、第6図はエツ
ジ近傍画素の濃度パターンからエツジ特徴への写像の求
め方を説明するための図、第7図は本発明を実施するた
めの装置例を示す図、第8図は入力画像におけるエツジ
近傍での濃度変化を示した図、第9図は第8図の1数機
分とこの結果から点ひろがり関数を求める方法を説明す
るための図、第1O図は実エツジモデルを用いて計算さ
れたエツジ近傍画素の濃度パターンの1例を示した図、
第11図はエツジ近傍画素の濃度パターンからエツジ特
徴への写像を決定するためのニューラルネットの学習の
様子を示した図、第12図はエツジ位置の計測結果を示
した図、第13図はエツジ方向の計測結果を示した図で
ある。
l ・・・カメラ、 2 ・・・物体、 3 ・・・移
動ステージ、 4 ・・・ベース、 5 ・・・マイク
ロメータ、 6 ・・・回転ステージ。
特許出願人 日本電信電話株式会社
第2図
第3図
Ho )−II H
2H3H4H5
H6H7Ha
第4図
第5図
エッフ゛万同、θ(@)
第7図
明るさh゛°′°′スフ++フフ゛状Tυ圀俸崖孫 (
&寒)
第9図
第10図
p=o 、 θ=OP=O、e=30’第13図
回転角度 (°)
(a)2乗額左
学習回転 (x10’)
1図
(b)最大拝見
学習回数 (x10’)
(a)θ=0゜
(C)θ=45゜
才多動距離(1シ章)
窮12図
(b)θ=30゜
(d)θ−90’
、9¥D了巨鶴1(西、1)Figure 1 is a diagram to explain the edge features, Figure 2 is a diagram to explain the edge model, and Figure 3 is a Hueckel diagram.
Diagram for explaining the nine orthonormal functions used by
The figure is a diagram for explaining the edge feature measurement method using table reference in the prior art, Figure 5 is a diagram showing the conditions that the edge feature must satisfy in order to be an edge pixel, and Figure 6 is the density pattern of pixels near the edge. 7 is a diagram illustrating an example of an apparatus for implementing the present invention. FIG. 8 is a diagram illustrating density changes near edges in an input image. , Fig. 9 is a diagram for explaining the method of calculating the point spread function from the results of several machines in Fig. 8, and Fig. 10 is a diagram showing one of the density patterns of pixels near the edge calculated using the real edge model. A diagram showing an example,
Figure 11 is a diagram showing how the neural network is trained to determine the mapping from the density pattern of pixels near edges to edge features, Figure 12 is a diagram showing the measurement results of edge positions, and Figure 13 is FIG. 6 is a diagram showing measurement results in the edge direction. l...camera, 2...object, 3...movement stage, 4...base, 5...micrometer, 6...rotation stage. Patent applicant Nippon Telegraph and Telephone Corporation Figure 2 Figure 3 Ho)-II H
2H3H4H5 H6H7Ha Fig. 4 Fig. 5
& cold) Figure 9 Figure 10 p = o, θ = OP = O, e = 30' Figure 13 Rotation angle (°) (a) Squared amount left learning rotation (x10') Figure 1 (b) Maximum Number of viewing studies (x10') (a) θ = 0° (C) θ = 45° hyperactivity distance (Chapter 1) Figure 12 (b) θ = 30° (d) θ-90', 9 yen D Ryo Giant Crane 1 (West, 1)
Claims (1)
エッジ位置および方向を計測するエッジ特徴計測方法に
おいて、 複数のエッジ位置および複数のエッジ方向の組み合わせ
に対し、ディジタル画像を入力する際の点ひろがり関数
を考慮してエッジ近傍画素の濃度パターンへの写像を得
る第1工程と、 前記第1工程で算出された複数のエッジ近傍画素の濃度
パターンからエッジ位置およびエッジ方向への逆写像を
、濃度を入力としてエッジ位置およびエッジ方向を出力
とする誤差逆伝搬型ニューラルネットを用いて決定する
第2工程と、 前記第2工程で決定された逆写像を用いて、実際に入力
した任意の画像においてエッジ近傍画素の濃度パターン
からエッジ位置およびエッジ方向を算出する第3工程と
、 から成ることを特徴とするエッジ特徴計測方法。[Claims] In an edge feature measurement method for measuring edge positions and directions using the density of pixels near edges in a digital image, when inputting a digital image for a combination of a plurality of edge positions and a plurality of edge directions, a first step of obtaining a mapping of pixels near the edge to a density pattern by considering a point spread function; and an inverse mapping from the density pattern of pixels near the edge calculated in the first step to an edge position and an edge direction. a second step in which the density is determined using an error backpropagation neural network that uses the density as input and the edge position and edge direction as output; An edge feature measuring method comprising: a third step of calculating an edge position and an edge direction from a density pattern of pixels near the edge in the image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2291769A JP2925707B2 (en) | 1990-10-31 | 1990-10-31 | Edge feature measurement method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2291769A JP2925707B2 (en) | 1990-10-31 | 1990-10-31 | Edge feature measurement method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH04167081A true JPH04167081A (en) | 1992-06-15 |
| JP2925707B2 JP2925707B2 (en) | 1999-07-28 |
Family
ID=17773186
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2291769A Expired - Fee Related JP2925707B2 (en) | 1990-10-31 | 1990-10-31 | Edge feature measurement method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2925707B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0916779A (en) * | 1995-06-29 | 1997-01-17 | Asia Electron Inc | Fine shape detector |
| GB2328355B (en) * | 1997-08-05 | 2002-04-17 | Canon Kk | Image processing apparatus |
-
1990
- 1990-10-31 JP JP2291769A patent/JP2925707B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0916779A (en) * | 1995-06-29 | 1997-01-17 | Asia Electron Inc | Fine shape detector |
| GB2328355B (en) * | 1997-08-05 | 2002-04-17 | Canon Kk | Image processing apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2925707B2 (en) | 1999-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Moru et al. | A machine vision algorithm for quality control inspection of gears | |
| US6768509B1 (en) | Method and apparatus for determining points of interest on an image of a camera calibration object | |
| JP7292979B2 (en) | Image processing device and image processing method | |
| Wang et al. | Improved performance of multi-view fringe projection 3D microscopy | |
| US5774573A (en) | Automatic visual inspection system | |
| CN108961184A (en) | A kind of bearing calibration of depth image, device and equipment | |
| CN112815843B (en) | On-line monitoring method for printing deviation of workpiece surface in 3D printing process | |
| JPH04500408A (en) | Computerized method for measuring strain distribution on the surface of a deformed body | |
| CN119354981A (en) | A visual inspection and quality assessment method for small aircraft structural parts | |
| CN105913401B (en) | Photogrammetry image brightness compensation method for industrial cameras | |
| DE102016003294A1 (en) | Information processing apparatus, information processing method and storage medium | |
| CN115471777A (en) | Refined water flow velocity field acquisition method and system based on video identification | |
| Hambly et al. | Precision astrometry with SuperCOSMOS | |
| Sara et al. | 3Dino: Configuration for a Micro-Photogrammetric Survey: Applying Dino-Lite microscope for the digitalization of a cuneiform tablet | |
| CN117152461A (en) | A digital image-based color difference detection method for cigarette packaging materials | |
| Yin et al. | High dynamic range 3D laser scanning with the single-shot raw image of a color camera | |
| JPH0762606B2 (en) | Pattern position recognition device | |
| JPH04167081A (en) | Edge feature measuring method | |
| CN112465898B (en) | Object 3D pose tag acquisition method based on checkerboard calibration plate | |
| Sardemann et al. | Accuracy analysis of an oblique underwater laser lightsheet triangulation system | |
| CN114757849A (en) | An imaging method with high dynamic range | |
| CN119960161A (en) | Defocus amount acquisition system, method and device for automatic optimization of microscopic image clarity | |
| CN209279912U (en) | A kind of object dimensional information collecting device | |
| Zhang et al. | Precision detection method for ship shell plate molding based on neural radiance field | |
| Chandler et al. | Automated digital photogrammetry on a shoestring |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090507 Year of fee payment: 10 |
|
| LAPS | Cancellation because of no payment of annual fees |