JP3049997B2 - Shape detection method - Google Patents

Shape detection method

Info

Publication number
JP3049997B2
JP3049997B2 JP5174134A JP17413493A JP3049997B2 JP 3049997 B2 JP3049997 B2 JP 3049997B2 JP 5174134 A JP5174134 A JP 5174134A JP 17413493 A JP17413493 A JP 17413493A JP 3049997 B2 JP3049997 B2 JP 3049997B2
Authority
JP
Japan
Prior art keywords
density
pixel
image
reference area
shape
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.)
Expired - Fee Related
Application number
JP5174134A
Other languages
Japanese (ja)
Other versions
JPH0727537A (en
Inventor
真也 中尾
嘉浩 逸崎
みすゞ 高野
欣司 堀上
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 Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP5174134A priority Critical patent/JP3049997B2/en
Priority to KR1019940016927A priority patent/KR0151235B1/en
Priority to US08/273,142 priority patent/US5642434A/en
Publication of JPH0727537A publication Critical patent/JPH0727537A/en
Application granted granted Critical
Publication of JP3049997B2 publication Critical patent/JP3049997B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、対象物の画像情報に基
づいて所定形状の検出を行う形状検出方法に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shape detecting method for detecting a predetermined shape based on image information of an object.

【0002】[0002]

【従来の技術】以下、従来の形状検出方法について図面
を参照しながら説明する。ここでは従来例として、対象
物内に存在する円孔を検出する場合を説明する。
2. Description of the Related Art A conventional shape detection method will be described below with reference to the drawings. Here, as a conventional example, a case where a circular hole existing in an object is detected will be described.

【0003】図10は従来の形状検出方法のフローチャ
ート、図11は濃度参照領域を示す図、図12は部分濃
度相関値を計算するための係数の例を示す図、図13は
対象物画像を入力する工程の構成要素を示す図、図14
は対象物画像を示す図である。
FIG. 10 is a flowchart of a conventional shape detection method, FIG. 11 is a diagram showing a density reference area, FIG. 12 is a diagram showing examples of coefficients for calculating a partial density correlation value, and FIG. FIG. 14 is a diagram showing components of a process of inputting.
FIG. 3 is a diagram showing an object image.

【0004】更に、図15は対象物画像内での濃度参照
領域の移動を示す図、図16は濃度参照領域内の画素の
画像濃度を示す図、図17は濃度参照領域と円孔が一致
した場合を示す図である。
FIG. 15 is a view showing the movement of a density reference area in an object image, FIG. 16 is a view showing the image density of pixels in the density reference area, and FIG. FIG.

【0005】まずカメラ1の撮像面を複数(=m×n)
の画素に分割し、左上端の画素の位置を示す座標を
(1,1)とし、右下端の画素の位置を示す座標を
(m,n)とする(ステップ1)。
First, a plurality of imaging surfaces of the camera 1 (= m × n)
, And the coordinates indicating the position of the upper left pixel are set to (1, 1), and the coordinates indicating the position of the lower right pixel are set to (m, n) (step 1).

【0006】次に位置(i,j)(但し、1≦i≦m,
1≦j≦n)に存在する注目画素Qに着目する。図11
に示すように、検出形状である円孔2と同一の形状であ
る円3を想定し、円3の円周上及びその近傍に、各々8
個の画素からなる小領域A〜Hを設定する。なお、これ
らの小領域を合わせて濃度参照領域4と呼ぶ(ステップ
2)。
Next, position (i, j) (where 1 ≦ i ≦ m,
Attention is paid to the target pixel Q existing in 1 ≦ j ≦ n). FIG.
As shown in the figure, a circle 3 having the same shape as the circular hole 2 as the detection shape is assumed, and 8
The small areas A to H including the pixels are set. Note that these small areas are collectively referred to as a density reference area 4 (step 2).

【0007】ここで、濃度参照領域4を構成する各画素
の存在位置は、注目画素Qとの相対位置として、図示し
ない主メモリに記憶される。例えば、図11に斜線で示
した小領域Cの内部に存在する画素Rの位置は、(i−
8,j)であると記憶される。
Here, the location of each pixel constituting the density reference area 4 is stored in a main memory (not shown) as a relative position with respect to the target pixel Q. For example, the position of the pixel R existing inside the small area C indicated by oblique lines in FIG.
8, j).

【0008】続いて、濃度参照領域4を構成する各画素
に対して、−1,0,1という係数を設定する(ステッ
プ3)。係数は、図12に示すように小領域A〜Hの内
部に存在する画素のうち、円3の円周の内部に存在する
画素には−1を与える。他方、円3の円周の外部に存在
する画素には1を与える。そして、円3の円周上に跨っ
て存在する画素に対しては0を与える。
Subsequently, coefficients of -1, 0 and 1 are set for each pixel constituting the density reference area 4 (step 3). As for the coefficient, −1 is given to the pixel existing inside the circumference of the circle 3 among the pixels existing inside the small areas A to H as shown in FIG. On the other hand, 1 is given to a pixel existing outside the circumference of the circle 3. Then, 0 is given to the pixels existing over the circumference of the circle 3.

【0009】以上のステップを前段階として行った後、
検出対象である円孔2を内包する対象物5を用意する。
After performing the above steps as a previous stage,
An object 5 containing the circular hole 2 to be detected is prepared.

【0010】まず、円孔2を含む対象物5に対し、リン
グ型照明6により光を照射する(ステップ4)。リング
型照明6は、カメラ1の影が対象物5上に映らないよう
に、カメラ1の下方に配置してある。光の照射により、
対象物5の表面は均一に照らされ、円孔2は図14に示
すように暗い陰となる。
First, the object 5 including the circular hole 2 is irradiated with light by the ring illumination 6 (step 4). The ring-shaped illumination 6 is arranged below the camera 1 so that the shadow of the camera 1 is not reflected on the object 5. By irradiation of light,
The surface of the object 5 is uniformly illuminated, and the circular hole 2 has a dark shadow as shown in FIG.

【0011】次に、カメラ1により対象物5の画像を取
り込み(ステップ5)。このとき、ステップ1で分割し
た各画素に対して離散的な画像濃度値が得られるよう
に、AD変換器7で画像濃度をディジタル値に変換した
後、画像メモリ8に対象物画像9を記憶する(ステップ
6)。
Next, an image of the object 5 is captured by the camera 1 (step 5). At this time, the image density is converted into a digital value by the AD converter 7 so that a discrete image density value is obtained for each pixel divided in step 1, and then the object image 9 is stored in the image memory 8. (Step 6).

【0012】次に図15に示すように、注目画素Qを対
象物画像9の内部で順次移動させる(ステップ7)。こ
のとき、注目画素Qの位置座標(i,j)の変化に伴っ
て、濃度参照領域4を構成する画素の全てが移動する。
即ち、注目画素Qの移動は、濃度参照領域4の移動と同
義である。
Next, as shown in FIG. 15, the target pixel Q is sequentially moved inside the object image 9 (step 7). At this time, as the position coordinates (i, j) of the target pixel Q change, all of the pixels forming the density reference area 4 move.
That is, the movement of the target pixel Q is synonymous with the movement of the density reference area 4.

【0013】そして、注目画素Qの移動位置のそれぞれ
において、ステップ5で小領域A〜H内の各画素に設定
した係数と、それに対応する画素の画像濃度との積(以
下、部分濃度相関値という)を計算する(ステップ
8)。
At each moving position of the target pixel Q, the product of the coefficient set for each pixel in the small areas A to H in step 5 and the image density of the corresponding pixel (hereinafter referred to as the partial density correlation value) Is calculated (step 8).

【0014】更に、部分濃度相関値の総和である濃度相
関値を計算し、図示しない主メモリに格納する(ステッ
プ9)。
Further, a density correlation value, which is the sum of the partial density correlation values, is calculated and stored in a main memory (not shown) (step 9).

【0015】濃度相関値Vは、図16に示すように、小
領域A〜Hの内部に含まれる画素の画像濃度を、a1〜
a8,b1〜b8,c1〜c8,d1〜d8,e1〜e
8,f1〜f8,g1〜g8,h1〜h8とすると、式
1で表すことができる。
As shown in FIG. 16, the density correlation value V represents the image density of the pixels contained in the small areas A to H, a1 to a4.
a8, b1 to b8, c1 to c8, d1 to d8, e1 to e
8, f1 to f8, g1 to g8, and h1 to h8 can be represented by Equation 1.

【0016】 V= a1+a2+a3+a4−a5−a6−a7−a8 +b1+b2+b3 −b6−b7−b8 +c1+c2−c3−c4+c5+c6−c7−c8 −d1 −d3−d4+d5+d6 +d8 −e1−e2−e3−e4+e5+e6+e7+e8 +f1+f2+f3 −f6−f7−f8 −g1−g2+g3+g4−g5−g6+g7+g8 +h1 +h3+h4−h5−h6 −h8 ……(式1) 注目画素Qが、対象物画像9内の所定位置へ移動する度
にステップ7〜ステップ9を繰り返し行う。そして、予
め設定した全ての所定位置への移動を完了した時、濃度
相関値の算出を終了する(ステップ10)。
V = a1 + a2 + a3 + a4-a5-a6-a7-a8 + b1 + b2 + b3-b6-b7-b8 + c1 + c2-c3-c4 + c5 + c6-c7-c8-d1-d3-d4 + d5 + d6 + d8-e1-e2-f3 + e3 + e3 + e5 + e5 -F8 -g1-g2 + g3 + g4-g5-g6 + g7 + g8 + h1 + h3 + h4-h5-h6-h8 (Equation 1) Steps 7 to 9 are repeated each time the target pixel Q moves to a predetermined position in the object image 9. . Then, when the movement to all the predetermined positions set in advance is completed, the calculation of the density correlation value ends (step 10).

【0017】そして、注目画素Qの各移動位置において
計算され、主メモリに格納された濃度相関値のうち、最
大の値を持つものを検索し、そのときの注目画素Qの位
置即ち濃度参照領域4の位置を、検出対象である円孔2
の存在位置として検出する(ステップ11)。
Then, of the density correlation values calculated at each moving position of the pixel of interest Q and stored in the main memory, the one having the maximum value is searched for, and the position of the pixel of interest Q at that time, ie, the density reference area Position of the circular hole 2 to be detected.
(Step 11).

【0018】以下に、濃度相関値が最大となるときの注
目画素Qの位置を似て、検出形状の位置を検出すること
ができる理由、換言すれば濃度相関値が最大となると
き、濃度参照領域4の配置基準である円3が円孔2に一
致する理由を説明する。
Hereinafter, the reason why the position of the detected shape can be detected by resembling the position of the target pixel Q when the density correlation value becomes the maximum, in other words, when the density correlation value becomes the maximum, the density reference is performed. The reason why the circle 3 as the arrangement reference of the region 4 matches the circular hole 2 will be described.

【0019】前述したように小領域A〜H内の各画素に
は係数として、小領域A〜H内にある画素のうち、円3
の円周の内側にある画素に対しては−1を、円3の円周
の外側にある画素に対しては1を割り当てている。従っ
て、ある1つの小領域における部分濃度相関値vは式2
の様に表すことができる。
As described above, each pixel in the small areas A to H is used as a coefficient,
-1 is assigned to the pixels inside the circumference of the circle 3, and 1 is assigned to the pixels outside the circumference of the circle 3. Therefore, the partial density correlation value v in one small area is expressed by the following equation (2).
Can be expressed as

【0020】 v=(円3の外側半分に存在する画素の画像濃度の総和) −(円3の内側半分に存在する画素の画像濃度の総和) ……………(式2) 即ち、式2で表される部分濃度相関値は、「円3の外側
半分に存在する画素の画像濃度の総和」が最大であり、
且つ「円3の内側半分に存在する画素の画像濃度の総
和」が最小である場合に最大となる。
V = (sum of image densities of pixels existing in the outer half of circle 3) − (sum of image densities of pixels existing in the inner half of circle 3) (Equation 2) The partial density correlation value represented by 2 has the largest “sum of image densities of pixels existing in the outer half of circle 3”, and
In addition, when the “sum of the image densities of the pixels existing in the inner half of the circle 3” is the minimum, the value becomes the maximum.

【0021】画像濃度値は、明るい程大きく、暗い程小
さく表されるので、円3の円周の外側が明るい程、そし
て円3の円周の内側が暗い程、1つの小領域における部
分濃度相関値は大きくなる。換言すれば、円3の円周
と、円孔2の円周が一致したとき、その小領域における
部分濃度相関値は最大となる。
Since the image density value is larger as it is brighter and smaller as it is darker, the partial density in one small area is larger as the outside of the circumference of the circle 3 is brighter and as the inside of the circumference of the circle 3 is darker. The correlation value increases. In other words, when the circumference of the circle 3 coincides with the circumference of the circular hole 2, the partial density correlation value in the small area becomes the maximum.

【0022】従って、各小領域において求められる部分
濃度相関値の総和として与えられる濃度相関値は、全て
の小領域A〜Hにおいて部分濃度相関値が最大となると
き、即ち図17に示すように円3が円孔2と一致したと
きに最大となる。
Accordingly, the density correlation value given as the sum of the partial density correlation values obtained in each of the small areas is obtained when the partial density correlation value becomes the maximum in all of the small areas A to H, that is, as shown in FIG. It becomes maximum when the circle 3 coincides with the circular hole 2.

【0023】[0023]

【発明が解決しようとする課題】しかしながら上記従来
の形状検出方法では、対象物画像の内部で、濃度参照領
域と同一の方向或いはそれに近い方向に濃度変化が顕著
な部分が、検出対象以外に存在する場合、誤判定を行い
得るという不都合があった。
However, in the above-described conventional shape detection method, a portion where the density change is remarkable in the same direction as the density reference area or in a direction close to the density reference area exists in the object image other than the detection target. In this case, there is a disadvantage that an erroneous determination can be made.

【0024】本発明は上記課題を解決するもので、対象
物画像内に検出対象以外に濃度変化が顕著な部分が存在
する場合においても、正確に形状検出を行うことができ
る形状検出方法を提供することを目的とする。
The present invention solves the above-mentioned problems, and provides a shape detection method capable of accurately detecting a shape even when there is a portion having a remarkable density change other than the detection target in the object image. The purpose is to do.

【0025】[0025]

【課題を解決するための手段】本発明は上記目的を達成
するために、濃度参照領域を構成する各小領域で求めた
部分濃度相関値を、出力値が入力値以下となる任意の関
数で構成される変換テーブルにより変換した後、その総
和である部分濃度相関値を算出する方法を採用してい
る。
According to the present invention, in order to achieve the above object, a partial density correlation value obtained in each small area constituting a density reference area is calculated by an arbitrary function whose output value is equal to or less than an input value. A method of calculating a partial density correlation value, which is the sum of the data after conversion by the conversion table configured, is adopted.

【0026】[0026]

【作用】本発明は上記方法により、濃度参照領域が対象
物画像内を移動しながら算出した部分濃度相関値が、所
定値以上の大きさを示した場合には、変換テーブルによ
りその値を縮小した後、総和を計算し濃度相関値を求め
る。
According to the present invention, when the partial density correlation value calculated while the density reference area moves in the object image by the above method shows a value equal to or larger than a predetermined value, the value is reduced by a conversion table. After that, the sum is calculated to obtain the concentration correlation value.

【0027】その結果、わずかの数の小領域において部
分濃度相関値が突出することにより、濃度相関値が異常
に大きくなるという事態を生じることがなくなる。
As a result, a situation in which the partial density correlation value protrudes in a small number of small areas and the density correlation value becomes abnormally large does not occur.

【0028】[0028]

【実施例】以下、本発明の実施例について、図面を参照
しながら説明する。なお、従来の形状検出方法と重複す
る箇所については、説明を簡略化する。図1は本発明の
一実施例における形状検出方法のフローチャート、図2
は本実施例の濃度参照領域を示す図、図3は本実施例の
部分濃度相関値を計算するための係数を示す図、図4は
本実施例の濃度参照領域内の画素の画像濃度を示す図で
ある。
Embodiments of the present invention will be described below with reference to the drawings. Note that description of portions overlapping with the conventional shape detection method will be simplified. FIG. 1 is a flowchart of a shape detection method according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating a density reference region of the present embodiment, FIG. 3 is a diagram illustrating coefficients for calculating a partial density correlation value of the present embodiment, and FIG. 4 is a diagram illustrating image densities of pixels in the density reference region of the present embodiment. FIG.

【0029】更に、図5は対象物画像を示す図、図6
(a)は濃度参照領域が円孔に一致する場合を示す図、
図6(b)は濃度参照が長方形の孔のそばにある場合を
示す図、図7は濃度参照領域が円孔に一致する場合に検
出された画像濃度の値を示す図、図8は濃度参照領域が
長方形の孔のそばにある場合に検出された画像濃度の値
を示す図、図9は本実施例の変換テーブルを示す図であ
る。
FIG. 5 is a diagram showing an object image, and FIG.
(A) is a diagram showing a case where a density reference area matches a circular hole,
6B illustrates a case where the density reference is located near the rectangular hole, FIG. 7 illustrates a value of the image density detected when the density reference region matches the circular hole, and FIG. 8 illustrates a density. FIG. 9 is a diagram illustrating a value of an image density detected when the reference region is located near the rectangular hole, and FIG. 9 is a diagram illustrating a conversion table according to the present embodiment.

【0030】まず、従来例と同様に、カメラの撮像面を
複数の画素に分割する(ステップ1)。
First, as in the conventional example, the imaging surface of the camera is divided into a plurality of pixels (step 1).

【0031】次に、図2に示すように、検出形状である
円孔21と同一の形状である円22を想定し、円22の
円周上及びその近傍に、各々8個の画素から成る小領域
Ra〜Rhを設定する。小領域Ra〜Rhを合わせて濃
度参照領域と呼ぶ(ステップ2)。
Next, as shown in FIG. 2, a circle 22 having the same shape as the circular hole 21 as a detection shape is assumed, and eight pixels are formed on and around the circumference of the circle 22. The small areas Ra to Rh are set. The small areas Ra to Rh are collectively referred to as a density reference area (step 2).

【0032】ここで、濃度参照領域を構成する各画素の
存在位置は、注目画素Oとの相対位置として主メモリに
記憶される。
Here, the position of each pixel constituting the density reference area is stored in the main memory as a position relative to the pixel of interest O.

【0033】続いて、濃度参照領域を構成する各画素に
対して、−1,0,1という係数を設定する(ステップ
3)。係数は、図3に示すように、小領域Ra〜Rhの
内部に存在する画素のうち、円22の円周の内部に存在
する画素には−1を与える。他方円22の円周の外部に
存在する画素には1を与える。そして、円22の円周上
に跨って存在する画素に対しては0を与える。
Subsequently, coefficients -1, 0 and 1 are set for each pixel constituting the density reference area (step 3). As shown in FIG. 3, the coefficient gives −1 to a pixel existing inside the circumference of the circle 22 among the pixels existing inside the small regions Ra to Rh. On the other hand, 1 is given to pixels existing outside the circumference of the circle 22. Then, “0” is given to the pixels existing over the circumference of the circle 22.

【0034】以上のステップを前段階として行った後、
検出対象である円孔21と長方形孔23を内包する対象
物24を用意する。
After performing the above steps as a previous stage,
An object 24 containing a circular hole 21 and a rectangular hole 23 to be detected is prepared.

【0035】まず、検出対象である直径Dの円孔21を
含む対象物24に対し、従来例と同様にリング型照明に
より光を照射する(ステップ4)。光の照射により、対
象物24の表面は均一に照らされ、円孔21は暗い陰と
なる。なお、本実施例における対象物24の内部には、
図5に示すように一辺の長さがDである長方形孔23が
存在し、やはり暗い陰となる。
First, the object 24 including the circular hole 21 having a diameter D to be detected is irradiated with light by ring-shaped illumination as in the conventional example (step 4). By the irradiation of light, the surface of the object 24 is uniformly illuminated, and the circular hole 21 becomes a dark shade. In addition, inside the object 24 in the present embodiment,
As shown in FIG. 5, there is a rectangular hole 23 having a side length of D, which is also a dark shadow.

【0036】次にカメラにより対象物24の画像を取り
込む(ステップ5)。このとき、ステップ1で分割した
各画素に対して離散的な濃度値が得られるように、AD
変換器で画像濃度をディジタル値に変換した後、画像メ
モリに対象物画像を記憶する(ステップ6)。
Next, an image of the object 24 is captured by the camera (step 5). At this time, the AD is adjusted so that a discrete density value is obtained for each pixel divided in step 1.
After the image density is converted into a digital value by the converter, the object image is stored in the image memory (step 6).

【0037】次に、注目画素O、即ち濃度参照領域を、
対象物画像の内部で順次移動させる(ステップ7)。そ
して注目画素Oの移動位置のそれぞれにおいて、ステッ
プ3で小領域Ra〜Rh内の各画素に設定した係数と、
それに対応する画素の画像濃度との積(以下、部分濃度
相関値という)を計算する(ステップ8)。
Next, the target pixel O, that is, the density reference area is defined as
It is sequentially moved inside the object image (step 7). Then, at each of the movement positions of the target pixel O, the coefficient set for each pixel in the small areas Ra to Rh in step 3;
The product of the corresponding pixel and the image density (hereinafter, referred to as a partial density correlation value) is calculated (step 8).

【0038】注目画素Oが対象物画像内のある位置に存
在するとき、小領域Ra〜Rhの内部に存在する画素の
画像濃度が、図4に示すように、a1〜a8,b1〜b
8,c1〜c8,d1〜d8,e1〜e8,f1〜f
8,g1〜g8,h1〜h8で与えられるとする。この
ときの小領域Ra〜Rhにおける部分濃度相関値Va,
Vb,Vc,Vd,Ve,Vf,Vg,Vhは、それぞ
れ式3,式4,式5,式6,式7,式8,式9,式10
で表すことができる。
When the target pixel O exists at a certain position in the target object image, the image density of the pixels existing inside the small areas Ra to Rh is set to a1 to a8, b1 to b as shown in FIG.
8, c1 to c8, d1 to d8, e1 to e8, f1 to f
8, g1 to g8 and h1 to h8. At this time, the partial density correlation values Va, in the small areas Ra to Rh,
Vb, Vc, Vd, Ve, Vf, Vg, and Vh are given by Equation 3, Equation 4, Equation 5, Equation 6, Equation 7, Equation 8, Equation 9, and Equation 10, respectively.
Can be represented by

【0039】 Va=a1+a2+a3+a4−a5−a6−a7−a8 ……(式3) Vb=b1+b2+b3 −b6−b7−b8 ……(式4) Vc=c1+c2−c3−c4+c5+c6−c7−c8 ……(式5) Vd=d1 −d3−d4+d5+d6 +d8 ……(式6) Ve=e1−e2−e3−e4+e5+e6+e7+e8 ……(式7) Vf=f1+f2+f3 −f6−f7−f8 ……(式8) Vg=g1−g2+g3+g4−g5−g6+g7+g8 ……(式9) Vh=h1 +h3+h4−h5−h6 −h8 ……(式10) まず従来の形状検出方法により、本実施例における対象
物画像に対して形状検出を試みる。
Va = a1 + a2 + a3 + a4-a5-a6-a7-a8 (Equation 3) Vb = b1 + b2 + b3-b6-b7-b8 (Equation 4) Vc = c1 + c2-c3-c4 + c5 + c6-c7-c8 (Equation 4) 5) Vd = d1-d3-d4 + d5 + d6 + d8 (Equation 6) Ve = e1-e2-e3-e4 + e5 + e6 + e7 + e8 (Equation 7) Vf = f1 + f2 + f3-f6-f7-f8 (Equation 8) Vg = g1- g2 + g3 + g4-g5-g6 + g7 + g8 (Equation 9) Vh = h1 + h3 + h4-h5-h6-h8 (Equation 10) First, an attempt is made to detect the shape of the object image in the present embodiment by a conventional shape detection method.

【0040】注目画素Oが対象物画像の内部を移動し、
図6(a)に示すように、濃度参照領域の設定基準であ
る円22が円孔21に一致したとき、図7に示すような
画像濃度が得られた場合を考える。このとき、式3〜式
10により計算される。小領域Ra〜Rhにおける部分
濃度相関値Va1,Vb1,Vc1,Vd1,Ve1,
Vf1,Vg1,Vh1の値を(表1)に示す。
The target pixel O moves inside the object image,
As shown in FIG. 6A, consider a case where an image density as shown in FIG. 7 is obtained when a circle 22 which is a setting reference of a density reference area matches a circular hole 21. At this time, it is calculated by Expressions 3 to 10. Partial density correlation values Va1, Vb1, Vc1, Vd1, Ve1, in the small areas Ra to Rh.
The values of Vf1, Vg1, and Vh1 are shown in (Table 1).

【0041】[0041]

【表1】 [Table 1]

【0042】故に、円22が円孔21と一致したときに
得られる濃度相関値V1は式11で表される。
Therefore, the density correlation value V1 obtained when the circle 22 coincides with the circular hole 21 is expressed by the following equation (11).

【0043】 V1=Va1+Vb1+Vc1+Vd1+Ve1+Vf1+Vg1+Vh1 =911 ……………(式11) 同様に、図6(b)に示すように、円22の円周が、長
方形孔23の三辺と接した場合を考える。このとき、式
3〜式10により計算される、小領域Ra〜Rhにおけ
る部分濃度相関値Va2,Vb2,Vc2,Vd2,V
e2,Vf2,Vg2,Vh2の値を(表2)に示す。
V1 = Va1 + Vb1 + Vc1 + Vd1 + Ve1 + Vf1 + Vg1 + Vh1 = 911 (Equation 11) Similarly, consider the case where the circumference of the circle 22 contacts three sides of the rectangular hole 23 as shown in FIG. At this time, the partial density correlation values Va2, Vb2, Vc2, Vd2, V in the small areas Ra to Rh, calculated by the equations 3 to 10,
Table 2 shows the values of e2, Vf2, Vg2, and Vh2.

【0044】[0044]

【表2】 [Table 2]

【0045】故に、円22の円周が、長方形孔23の三
辺と接した場合に得られる濃度相関値V2は式12で表
される。
Therefore, the density correlation value V2 obtained when the circumference of the circle 22 is in contact with the three sides of the rectangular hole 23 is expressed by Expression 12.

【0046】 V2=Va2+Vb2+Vc2+Vd2+Ve2+Vf2+Vg2+Vh2 =1003 ……………(式12) 従来の形状検出方法では、V1とV2の大小関係を比較
し、結果として、長方形孔23を検出対象として認識す
る。従って、真の検出対象の部分の他に、大きな濃度変
化を生じる部分が存在する場合に、誤検出を行い得るこ
とが分かる。誤検出の理由は、円22の円周が長方形孔
23の三辺に接した場合に、小領域Ra,Rc,Reで
得られる部分濃度相関値Va2,Vc2,Ve2が、非
常に大きいためである。
V2 = Va2 + Vb2 + Vc2 + Vd2 + Ve2 + Vf2 + Vg2 + Vh2 = 1003 (Formula 12) In the conventional shape detection method, the magnitude relationship between V1 and V2 is compared, and as a result, the rectangular hole 23 is recognized as a detection target. Therefore, it can be seen that erroneous detection can be performed when there is a portion where a large change in density exists in addition to the true detection target portion. The reason for the erroneous detection is that when the circumference of the circle 22 contacts three sides of the rectangular hole 23, the partial density correlation values Va2, Vc2, and Ve2 obtained in the small regions Ra, Rc, and Re are very large. is there.

【0047】次に、本発明の形状検出方法により、本実
施例における対象物画像に対して、形状検出を試みる。
Next, an attempt is made to detect the shape of the object image in this embodiment by the shape detection method of the present invention.

【0048】本発明による形状検出方法では、まず、小
領域Ra〜Rhにおける部分濃度相関値Va〜Vhを求
めた後、後述の式13,式14,式15で定義される関
数で構成される図9に示す変換テーブルにより変換する
(ステップ9)。そして、変換後の部分濃度相関値の総
和として濃度相関値を求める(ステップ10)。
In the shape detection method according to the present invention, first, the partial density correlation values Va to Vh in the small areas Ra to Rh are obtained, and then the functions are defined by the functions defined by the following equations 13, 14, and 15. Conversion is performed using the conversion table shown in FIG. 9 (step 9). Then, a density correlation value is obtained as the sum of the converted partial density correlation values (step 10).

【0049】注目画素Oによる対象物画像の内部の移動
を全て終了した時点(ステップ11)で、濃度相関値が
最大であるときの注目画素Oの位置、即ち円22の位置
を求めることにより、形状検出を行う(ステップ1
2)。
At the point in time when the movement of the inside of the object image by the target pixel O has been completed (step 11), the position of the target pixel O when the density correlation value is the maximum, that is, the position of the circle 22, is obtained. Perform shape detection (Step 1)
2).

【0050】以下で、ステップ9〜ステップ12につい
て説明する。変換前の値Xが、変換テーブルよりF
(X)という値に変換されるとすれば、変換テーブルを
構成する関数は、式13,式14,式15で表される。
Steps 9 to 12 will be described below. The value X before conversion is F
Assuming that the conversion is made to the value (X), the functions constituting the conversion table are represented by Expressions 13, 14, and 15.

【0051】 F(X)=X (X≦200) ……………(式13) F(X)=200+0.5(X−200) (200<X≦400) ……………(式14) F(X)=300 (400<X) ……………(式15) 変換テーブルにより変換した後の部分濃度相関値(ステ
ップ9)は、(表3)及び(表4)で示される。(表
3)は、円22が円孔21と一致したときに得られた部
分濃度相関値(=表1)を変換テーブルにより変換した
値を示す表、(表4)は、円22の円周が長方形孔23
の三辺に一致したときに得られた部分濃度相関値(=表
2)を変換テーブルにより変換した値を示す表である。
F (X) = X (X ≦ 200) (Equation 13) F (X) = 200 + 0.5 (X−200) (200 <X ≦ 400) (Equation 13) 14) F (X) = 300 (400 <X) (Equation 15) The partial density correlation values (step 9) after conversion by the conversion table are shown in (Table 3) and (Table 4). It is. (Table 3) is a table showing values obtained by converting the partial density correlation values (= Table 1) obtained when the circle 22 coincides with the circular hole 21 using the conversion table, and (Table 4) is a circle of the circle 22. The circumference is a rectangular hole 23
7 is a table showing values obtained by converting partial density correlation values (= Table 2) obtained when the three sides coincide with each other using a conversion table.

【0052】[0052]

【表3】 [Table 3]

【0053】[0053]

【表4】 [Table 4]

【0054】故に、円22が円孔21に一致したときの
濃度相関値VF1は式16で、また、円22の円周が長
方形孔23と三辺で接するときの濃度相関値VF2は式
17で表される(ステップ10)。
Therefore, the density correlation value VF1 when the circle 22 coincides with the circular hole 21 is given by equation (16), and the density correlation value VF2 when the circumference of the circle 22 contacts the rectangular hole 23 on three sides is given by equation (17). (Step 10).

【0055】 VF1=F(Va1)+F(Vb1)+F(Vc1)+F(Vd1) +F(Ve1)+F(Vf1)+F(Vg1)+F(Vh1) =911 ……………(式16) VF2=F(Va2)+F(Vb2)+F(Vc2)+F(Vd2) +F(Ve2)+F(Vf2)+F(Vg2)+F(Vh2) =816.5 ……………(式17) 最後に、注目画素Oによる対象物画像の内部の移動を全
て終了した時点(ステップ11)で、濃度相関値の最大
値を求める(ステップ12)。即ち本実施例では、VF
1>VF2となり、検出対象として円孔21が検出され
る。
VF1 = F (Va1) + F (Vb1) + F (Vc1) + F (Vd1) + F (Ve1) + F (Vf1) + F (Vg1) + F (Vh1) = 911 (Formula 16) VF2 = F (Va2) + F (Vb2) + F (Vc2) + F (Vd2) + F (Ve2) + F (Vf2) + F (Vg2) + F (Vh2) = 816.5 (Equation 17) Finally, the target pixel When all the movements inside the object image by O are completed (step 11), the maximum value of the density correlation value is obtained (step 12). That is, in this embodiment, VF
1> VF2, and the circular hole 21 is detected as a detection target.

【0056】[0056]

【発明の効果】以上説明したように、本発明の形状検出
方法によれば、外部からの光の入射や、対象物の状態等
により、撮像面内に検出形状以外に濃度変化が顕著な部
分が存在する場合においても、その部分からの影響をあ
まり受けずに形状検出を正確に行うことができる。
As described above, according to the shape detection method of the present invention, a portion where the density change is remarkable other than the detected shape in the imaging surface due to the incidence of light from the outside or the state of the object. , The shape detection can be performed accurately without being greatly affected by the portion.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例の形状検出方法のフローチャ
ート
FIG. 1 is a flowchart of a shape detection method according to an embodiment of the present invention.

【図2】同実施例の濃度参照領域を示す図FIG. 2 is a diagram showing a density reference area according to the embodiment;

【図3】同実施例の部分濃度相関値を計算するための係
数の例を示す図
FIG. 3 is a view showing an example of coefficients for calculating a partial density correlation value according to the embodiment;

【図4】同実施例の濃度参照領域内の画素の画像濃度を
示す図
FIG. 4 is a diagram showing an image density of a pixel in a density reference area according to the embodiment;

【図5】同実施例の対象物画像を示す図FIG. 5 is a diagram showing an object image according to the embodiment.

【図6】(a)同実施例の濃度参照領域が円孔の側にあ
る場合を示す図 (b)同実施例の濃度参照領域が長方形の孔の側にある
場合を示す図
6A is a diagram showing a case where the density reference region of the embodiment is on the side of a circular hole; FIG. 6B is a diagram showing a case where the density reference region of the embodiment is on the side of a rectangular hole;

【図7】同実施例の濃度参照領域が円孔の側にある場合
に検出された画像濃度の値を示す図
FIG. 7 is a view showing image density values detected when the density reference area of the embodiment is on the side of a circular hole;

【図8】同実施例の濃度参照領域が長方形の孔の側にあ
る場合に検出された画像濃度の値を示す図
FIG. 8 is a view showing image density values detected when the density reference area is located on the side of a rectangular hole in the embodiment.

【図9】同実施例の変換テーブルを示す図FIG. 9 is a view showing a conversion table according to the embodiment;

【図10】従来の形状検出方法のフローチャートFIG. 10 is a flowchart of a conventional shape detection method.

【図11】従来例の濃度参照領域を示す図FIG. 11 is a diagram showing a density reference area according to a conventional example.

【図12】従来例の部分濃度相関値を計算するための係
数の例を示す図
FIG. 12 is a diagram showing an example of a coefficient for calculating a partial density correlation value in a conventional example.

【図13】対象物画像を入力する工程の構成要素を示す
FIG. 13 is a diagram showing components of a process of inputting an object image.

【図14】従来例の対象物画像を示す図FIG. 14 is a diagram showing an object image of a conventional example.

【図15】対象物画像内での濃度参照領域の移動を示す
FIG. 15 is a diagram illustrating movement of a density reference area in an object image.

【図16】従来例の濃度参照領域内の画素の画像濃度を
示す図
FIG. 16 is a diagram illustrating an image density of a pixel in a density reference area according to a conventional example.

【図17】従来例の濃度参照領域と円孔が一致した場合
を示す図
FIG. 17 is a diagram showing a conventional example in which a density reference area and a circular hole coincide with each other.

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

21 円孔 22 円 23 長方形孔 24 対象物 O 注目画素 Ra,Rb,Rc,Rd,Re,Rf,Rg,Rh 小
領域 Va 小領域Raにおける部分濃度相関値 Vb 小領域Rbにおける部分濃度相関値 Vc 小領域Rcにおける部分濃度相関値 Vd 小領域Rdにおける部分濃度相関値 Ve 小領域Reにおける部分濃度相関値 Vf 小領域Rfにおける部分濃度相関値 Vg 小領域Rgにおける部分濃度相関値 Vh 小領域Rhにおける部分濃度相関値 VF1 円22が円孔21に一致したときの濃度相関値 VF2 円22の円周が長方形孔23の三辺に一致した
ときの濃度相関値
21 circular hole 22 circular 23 rectangular hole 24 object O pixel of interest Ra, Rb, Rc, Rd, Re, Rf, Rg, Rh small area Va partial density correlation value in small area Ra Vb partial density correlation value in small area Rb Vc Partial density correlation value in small area Rc Vd Partial density correlation value in small area Rd Ve Partial density correlation value in small area Re Vf Partial density correlation value in small area Rf Vg Partial density correlation value in small area Rg Vh Part in small area Rh Density correlation value VF1 Density correlation value when circle 22 matches circular hole 21 VF2 Density correlation value when circumference of circle 22 matches three sides of rectangular hole 23

───────────────────────────────────────────────────── フロントページの続き (72)発明者 堀上 欣司 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 昭63−124181(JP,A) 特開 平6−243253(JP,A) 特開 平4−174309(JP,A) 特開 平1−143903(JP,A) 特開 昭63−234103(JP,A) (58)調査した分野(Int.Cl.7,DB名) G01B 11/00 - 11/30 G06T 1/00 - 9/20 ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Kinji Horigami 1006 Kazuma Kadoma, Kadoma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (56) References JP-A-63-124181 (JP, A) JP-A-6- 243253 (JP, A) JP-A-4-174309 (JP, A) JP-A-1-143903 (JP, A) JP-A-63-234103 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G01B 11/00-11/30 G06T 1/00-9/20

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 カメラの撮像面を格子状に複数の画素に
分割し、前記撮像面内に注目画素を仮想するとともに、
検出形状の周上に対応する箇所に濃度参照領域として複
数の画素から成る小領域を複数個設定し、前記濃度参照
領域内の各画素の位置を前記注目画素の相対位置として
記憶する第1の工程と、前記濃度参照領域に含まれる各
画素に対し、検出形状の画像濃度に対応した係数を設定
する第2の工程と、検出形状を含む対象物に光を照射
し、前記撮像面内の各画素の画像濃度を検出する第3の
工程と、前記濃度参照領域内の各画素につき、前記第2
の工程で設定した係数と、前記第3の工程で検出した画
像濃度の積を求め、部分濃度相関値として前記濃度参照
領域を構成する小領域毎にこれらの和を求める第4の工
程と、前記部分濃度相関値を、出力値が入力値以下とな
る任意の関数で構成される変換テーブルにより変換する
第5の工程と、前記第5の工程で変換した部分濃度相関
値の総和を求める第6の工程より成り、前記第3の工程
から前記第6の工程までを、前記注目画素の位置を前記
撮像面内で移動させながら繰り返し行い、前記部分濃度
相関値の総和が最大となる前記注目画素の位置を、検出
形状の存在位置として判定する形状検出方法。
1. An image pickup surface of a camera is divided into a plurality of pixels in a grid pattern, and a pixel of interest is imagined in the image pickup surface.
A first method of setting a plurality of small areas including a plurality of pixels as a density reference area at a position corresponding to the periphery of the detection shape and storing the position of each pixel in the density reference area as a relative position of the pixel of interest And a second step of setting a coefficient corresponding to the image density of the detected shape for each pixel included in the density reference area, and irradiating the object including the detected shape with light, A third step of detecting the image density of each pixel; and
A fourth step of calculating the product of the coefficient set in the step and the image density detected in the third step, and calculating the sum of the small areas constituting the density reference area as a partial density correlation value; A fifth step of converting the partial density correlation value by using a conversion table constituted by an arbitrary function whose output value is equal to or smaller than the input value, and a step of obtaining a sum total of the partial density correlation values converted in the fifth step. 6, the steps from the third step to the sixth step are repeatedly performed while moving the position of the pixel of interest within the imaging plane, and the total of the partial density correlation values becomes the maximum. A shape detection method for determining a position of a pixel as an existing position of a detected shape.
【請求項2】 複数の直線の関数を組み合わせた関数で
変換テーブルを構成した請求項1記載の形状検出方法。
2. The shape detecting method according to claim 1, wherein the conversion table is configured by a function obtained by combining a plurality of straight line functions.
JP5174134A 1963-07-14 1993-07-14 Shape detection method Expired - Fee Related JP3049997B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP5174134A JP3049997B2 (en) 1993-07-14 1993-07-14 Shape detection method
KR1019940016927A KR0151235B1 (en) 1963-07-14 1994-07-14 Shape detecting method
US08/273,142 US5642434A (en) 1993-07-14 1994-07-14 Method for shape detection using density correlation valves

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5174134A JP3049997B2 (en) 1993-07-14 1993-07-14 Shape detection method

Publications (2)

Publication Number Publication Date
JPH0727537A JPH0727537A (en) 1995-01-27
JP3049997B2 true JP3049997B2 (en) 2000-06-05

Family

ID=15973258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5174134A Expired - Fee Related JP3049997B2 (en) 1963-07-14 1993-07-14 Shape detection method

Country Status (1)

Country Link
JP (1) JP3049997B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6183587B1 (en) 1997-11-26 2001-02-06 The Procter & Gamble Company Method of making sanitary napkin comprising three dimensionally shaped tube of absorbent material
US6316688B1 (en) 1998-04-27 2001-11-13 The Procter & Gamble Company Sanitary napkin comprising three dimensionally shaped tube of absorbent material
US6475199B1 (en) 1998-04-27 2002-11-05 The Procter & Gamble Company Method of individually packaging a three dimensionally-shaped absorbent article
ATE315257T1 (en) * 2002-03-22 2006-02-15 British Telecomm COMPARISON OF PATTERNS
WO2006030173A1 (en) 2004-09-17 2006-03-23 British Telecommunications Public Limited Company Analysis of patterns
EP1732030A1 (en) 2005-06-10 2006-12-13 BRITISH TELECOMMUNICATIONS public limited company Comparison of patterns
CN101248457B (en) 2005-07-28 2011-07-27 英国电讯有限公司 Image analysis method
EP1798961A1 (en) 2005-12-19 2007-06-20 BRITISH TELECOMMUNICATIONS public limited company Method for focus control

Also Published As

Publication number Publication date
JPH0727537A (en) 1995-01-27

Similar Documents

Publication Publication Date Title
JP5279654B2 (en) Image tracking device, image tracking method, and computer program
CN100367757C (en) Image recognition method and image recognition apparatus
JP3853034B2 (en) Object boundary determination method and apparatus, and recording medium recording object boundary determination program
US20130004082A1 (en) Image processing device, method of controlling image processing device, and program for enabling computer to execute same method
JP3049997B2 (en) Shape detection method
JP2008182725A (en) Pixel interpolating circuit and pixel interpolating method
JP2005250476A (en) Color temperature conversion method and apparatus using correcting function based upon brightness of image pixel
KR101321780B1 (en) Image processing apparatus and image processing method
CN107316298B (en) Real-time measurement method and device for welding gap and electronic equipment
KR0151235B1 (en) Shape detecting method
WO2021130888A1 (en) Learning device, estimation device, and learning method
CN113326735A (en) Multi-mode small target detection method based on YOLOv5
CN113538223A (en) Noise image generation method, noise image generation device, electronic device, and storage medium
JP2022055953A (en) Defect classification device, defect classification method and program
JP2011071925A (en) Mobile tracking apparatus and method
JP2003319120A (en) Abnormality diagnostic apparatus in image recognition system
US20100253770A1 (en) Immunoassay apparatus and method of determining brightness value of target area on optical image using the same
CN110837789B (en) Method and device for detecting object, electronic equipment and medium
KR100404626B1 (en) Solid-state image pick-up device and fingerprint collating apparatus using the same
JP3078157B2 (en) Shape detection method
JP3461143B2 (en) Color image target position detection device
JP2645275B2 (en) Image processing method
JP2006244289A (en) Image recognition device and method
CN112926424B (en) Face shielding recognition method, device, readable medium and equipment
JP2004125664A (en) Phase distribution measuring instrument

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees