JPH0797410B2 - Image processing method - Google Patents

Image processing method

Info

Publication number
JPH0797410B2
JPH0797410B2 JP1006903A JP690389A JPH0797410B2 JP H0797410 B2 JPH0797410 B2 JP H0797410B2 JP 1006903 A JP1006903 A JP 1006903A JP 690389 A JP690389 A JP 690389A JP H0797410 B2 JPH0797410 B2 JP H0797410B2
Authority
JP
Japan
Prior art keywords
image
differential
contour
point
inspected
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 - Lifetime
Application number
JP1006903A
Other languages
Japanese (ja)
Other versions
JPH02187651A (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 Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP1006903A priority Critical patent/JPH0797410B2/en
Publication of JPH02187651A publication Critical patent/JPH02187651A/en
Publication of JPH0797410B2 publication Critical patent/JPH0797410B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、被検査物の欠け、クラック、汚れなどの欠陥
の有無を検査する外観検査装置の画像処理方法に関する
ものである。
Description: TECHNICAL FIELD The present invention relates to an image processing method of an appearance inspection apparatus for inspecting an inspection object for defects such as chips, cracks, and stains.

[従来の技術] 従来、被検査物の欠け、クラック、汚れなどの欠陥を検
査する欠陥検査装置は、被検査物を撮影するTVカメラか
らの画像信号をA/D変換して得られる画像データを、原
画像データとして原画像メモリに記憶し、原画像メモリ
から読み出されたデータを適当に演算処理して被検査物
の輪郭を認識し、被検査物の欠け、クラック、汚れなど
の欠陥を認識するようになっている。
[Prior Art] Conventionally, a defect inspection apparatus for inspecting defects such as cracks, cracks, and stains on an inspected object is image data obtained by A / D converting an image signal from a TV camera for photographing the inspected object. Is stored as original image data in the original image memory, the data read from the original image memory is appropriately arithmetically processed to recognize the contour of the inspection object, and defects such as chipping, cracks, and stains of the inspection object are detected. To recognize.

すなわち、TVカメラにより被検査物を撮影して画像デー
タとして取り込んだ場合、予め設定された被検査物の準
備位置と、検査する被検査物の実際の位置とがずれてい
る場合が多く、このような場合、被検査物の位置ずれを
補正するために、被検査物の輪郭(または、被検査物内
の基準位置となる模様、凹凸などの輪郭)を正確にとら
えて欠陥検査領域を認識し、この欠陥検査領域内に欠陥
が存在するかどうかを判定するようになっていた。
That is, when a TV camera captures an object to be inspected and captures it as image data, the preset position of the object to be inspected and the actual position of the object to be inspected are often displaced. In such a case, in order to correct the displacement of the inspected object, the defect inspection area is recognized by accurately grasping the outline of the inspected object (or the contour of the reference position or the irregularities of the inspected object). Then, it is determined whether or not a defect exists in this defect inspection area.

例えば、特開昭62−88946号に示されるように、複数の
照明手段を用いて輪郭抽出を確実に行うための画像処理
方法が提案されており、被検査物を複数の照明手段によ
って照明(明照明、暗照明)し、各照明状態でTVカメラ
にてそれぞれ撮影された複数の被検査物画像を論理演算
(論理和)して被検査物の輪郭を認識し、欠陥検査領域
を設定するようになっていた。
For example, as shown in JP-A-62-88946, an image processing method for surely performing contour extraction using a plurality of illumination means has been proposed, and an object to be inspected is illuminated by a plurality of illumination means ( Bright illumination, dark illumination), and logical operation (logical sum) of multiple inspected object images taken by the TV camera in each illumination state to recognize the contour of the inspected object and set the defect inspection area It was like this.

[発明が解決しようとする課題] しかしながら、上述のような従来例の画像処理方法によ
って被検査物の輪郭を認識するものあっては、TVカメラ
で撮影された被検査物画像の輪郭部周辺に、異物やノイ
ズが存在する場合については何ら考慮されておらず、輪
郭部周辺に異物やノイズが存在すると、複数の照明手段
および論理演算をどのように変化させても被検査物の輪
郭が正確に抽出できなくなるという問題があった。
[Problems to be Solved by the Invention] However, in the case of recognizing the contour of the object to be inspected by the conventional image processing method as described above, in the periphery of the edge part of the image of the object to be inspected taken by the TV camera, However, no consideration is given to the presence of foreign matter or noise, and if foreign matter or noise is present around the contour, the contour of the object to be inspected will be accurate no matter how the lighting means and logical operations are changed. There was a problem that it could not be extracted.

本発明は上記の点に鑑みて為されたものであり、その目
的とするところは、TVカメラで撮影された被検査物の原
画像の輪郭部周辺に異物やノイズが存在する場合にあっ
ても、被検査物の輪郭線を探索して被検査物を正確に認
識することができ、しかも、被検査物の輪郭線探索の基
準点を1つの探索ラインで正確かつ簡単に認識すること
ができる画像処理方法を提供することにある。
The present invention has been made in view of the above points, and an object thereof is to detect the presence of foreign matter or noise around the contour portion of the original image of the inspection object photographed by the TV camera. In addition, the contour line of the inspection object can be searched and the inspection object can be accurately recognized, and the reference point for contour line search of the inspection object can be accurately and easily recognized with one search line. An object of the present invention is to provide a possible image processing method.

[課題を解決するための手段] 本発明の請求項1の画像処理方法は、TVカメラで撮影さ
れた被検査物の原画像を演算処理して微分絶対値画像、
微分方向値画像、エッジ画像を求め、各画像に基づいて
被検査物の輪郭線を探索して被検査物の輪郭を認識する
ようにした画像処理方法において、エッジ画像上の任意
の探索開始点から被検査物方向に探索ラインを設定して
エッジフラッグが存在する点を求めて輪郭検査対象点と
し、上記輪郭検査対象点を中心としてN×M画素よりな
る適当な局所並列ウインドウを設定するとともに、上記
局所並列ウインドウの各行についてエッジフラッグの有
無をチェックして総ての行にエッジフラッグが有る場合
に該局所並列ウインドウを輪郭線検査対象領域とし、上
記輪郭線検査対象領域の各エッジフラッグに対応する微
分絶対値を微分画像から抽出するとともに、抽出された
微分絶対値のうち予め設定された微分しきい値よりも大
きいものについて加算して微分絶対値の総和を求め、上
記微分絶対値の総和が予め設定された総和しきい値より
も大きいときに、前記輪郭検査対象点を被検査物の輪郭
線上の点と認識するようにしたものである。
[Means for Solving the Problems] According to the image processing method of claim 1 of the present invention, a differential absolute value image is obtained by performing arithmetic processing on an original image of an inspection object photographed by a TV camera,
In the image processing method in which the differential direction value image and the edge image are obtained, the contour line of the inspection object is searched based on each image to recognize the contour of the inspection object, an arbitrary search start point on the edge image From the above, a search line is set in the direction of the object to be inspected, a point where an edge flag exists is determined as a contour inspection target point, and an appropriate local parallel window consisting of N × M pixels is set around the contour inspection target point. The presence or absence of an edge flag is checked for each row of the local parallel window, and when all rows have an edge flag, the local parallel window is set as a contour line inspection target area, and each edge flag of the contour line inspection target area is set. Extract the corresponding differential absolute value from the differential image, and for the extracted differential absolute value that is greater than the preset differential threshold value. When the sum of the differential absolute values is calculated, the contour inspection target point is recognized as a point on the contour line of the inspection object when the sum of the differential absolute values is larger than a preset sum threshold value. It is the one.

また、請求項2の画像処理方法は、微分絶対値画像上の
任意の探索開始点から被検査物方向に探索ラインを設定
して微分絶対値が予め設定された微分しきい値より大き
い点を求めて輪郭検査対象点とし、上記輪郭検査対象点
に対応する微分方向値を微分方向値画像から抽出し、抽
出された微分方向値が予め設定された微分方向しきい値
範囲内に存在するとき、前記輪郭検査対象点を被検査物
の輪郭線上の点と認識するようにしたものである。
Further, the image processing method according to claim 2 sets a search line in the direction of the inspection object from an arbitrary search start point on the differential absolute value image to set a point at which the differential absolute value is larger than a preset differential threshold value. When the contour inspection target point is obtained and the differential direction value corresponding to the contour inspection target point is extracted from the differential direction value image, and the extracted differential direction value exists within a preset differential direction threshold range. The contour inspection target point is recognized as a point on the contour line of the inspection object.

さらにまた、請求項3の画像処理方法には、エッジ画像
上の任意の探索開始点から被検査物方向に探索ラインを
設定してエッジフラッグが存在する点を求めて輪郭検査
対象点とし、上記輪郭検査対象点に対応する微分絶対値
を微分絶対値画像より抽出するとともに、抽出された微
分絶対値が予め設定された微分しきい値よりも大きいと
きに輪郭検査対象点に対応する微分方向値を微分方向値
画像から抽出し、上記微分方向値が予め設定された微分
方向値範囲内にあるとき、前記輪郭検査対象点を被検査
物の輪郭線上の点と認識するようにしたものである。
Furthermore, in the image processing method according to claim 3, a search line is set in the direction of the inspection object from an arbitrary search start point on the edge image, a point where an edge flag exists is determined as a contour inspection target point, and The differential absolute value corresponding to the contour inspection target point is extracted from the differential absolute value image, and when the extracted differential absolute value is larger than a preset differential threshold value, the differential direction value corresponding to the contour inspection target point Is extracted from the differential direction value image, and when the differential direction value is within a preset differential direction value range, the contour inspection target point is recognized as a point on the contour line of the inspection object. .

さらにまた、請求項4の画像処理方法は、エッジ画像上
の任意の探索開始点から被検査物方向に探索ラインを設
定してエッジフラッグが存在する点を求めて輪郭検査対
象点とし、上記輪郭検査対象点に対応する微分絶対値を
微分絶対画値像より抽出するとともに、抽出された微分
絶対値が予め設定された微分しきい値よりも大きいとき
に輪郭検査対象点に対応する微分方向値を微分方向値画
像から抽出し、原画像上の輪郭検査対象点に対応する点
から微分方向値に対して垂直方向にn画素それぞれ離れ
た点を濃度検査点として両濃度検査点の濃度を原画像か
ら抽出し、一方の濃度検査点の濃度が被検査物に対する
濃度しきい値よりも大きく、かつ他方の濃度検査点の濃
度が背景に対する濃度しきい値よりも小さいとき、前記
輪郭検査対象点を被検査物の輪郭線上の点と認識するよ
うにしたものである。
Furthermore, the image processing method according to claim 4 sets a search line in the direction of the inspection object from an arbitrary search start point on the edge image, obtains a point where an edge flag exists, and sets it as a contour inspection target point. The differential absolute value corresponding to the inspection target point is extracted from the differential absolute image value image, and the differential direction value corresponding to the contour inspection target point when the extracted differential absolute value is larger than a preset differential threshold value. Is extracted from the differential direction value image, and the density inspection points are the original density values of the density inspection points at the points distant from the point corresponding to the contour inspection target point on the original image by n pixels in the direction perpendicular to the differential direction value. The contour inspection target point extracted from the image, when the density of one density inspection point is higher than the density threshold for the inspection object and the density of the other density inspection point is less than the density threshold for the background. To It is obtained so as to recognize a point on the contour line of the test object.

[作 用] 本発明は上述のように構成されており、請求項1の画像
処理方法にあっては、被検査物の輪郭線上の点を探索し
て被検査物の輪郭を認識する画像処理方法において、エ
ッジ画像上で被検査物方向に設定される探索ラインによ
ってエッジフラッグが存在する点を求め、この輪郭検査
対象点を中心として設定された局所並列ウインドウの各
行についてエッジフラッグの有無をチェックし、総ての
行にエッジフラッグが有る場合に該局所並列ウインドウ
を輪郭線検査対象領域とし、また、輪郭線検査対象領域
の各エッジフラッグに対応する微分絶対値のうち予め設
定された微分しきい値よりも大きいものについて加算し
て微分絶対値の総和を求め、上記微分絶対値の総和が予
め設定された総和しきい値よりも大きいときに、前記輪
郭検査対象点を被検査物の輪郭線上の点と認識するよう
にしており、TVカメラで撮影された被検査物の原画像の
輪郭部周辺に異物やノイズが存在する場合にあっても、
被検査物の輪郭線を探索して被検査物を正確に認識する
ことができ、しかも、被検査物の輪郭線探索の基準点を
1つの探索ラインで正確かつ簡単に認識することができ
るようになっている。
[Operation] The present invention is configured as described above, and in the image processing method according to claim 1, image processing for searching a point on the contour line of the inspection object to recognize the contour of the inspection object. In the method, the point where the edge flag exists is found by the search line set in the direction of the object to be inspected on the edge image, and the presence or absence of the edge flag is checked for each row of the local parallel window set around this contour inspection target point. However, if all the rows have edge flags, the local parallel window is set as the contour line inspection target area, and the preset differential of the differential absolute value corresponding to each edge flag of the contour line inspection target area is performed. If the sum of differential absolute values is obtained by adding those larger than a threshold value, the contour inspection is performed when the sum of the differential absolute values is larger than a preset total threshold value. The elephant point has to recognize a point on the contour line of the object to be inspected, even when the foreign matter or noise is present in the contour portion surrounding the original image of the object taken by the TV camera,
It is possible to accurately recognize an object to be inspected by searching the contour line of the object to be inspected, and also to accurately and easily recognize a reference point for contour line search of the object to be inspected with one search line. It has become.

また、請求項2の画像処理方法は、微分絶対値画像上で
設定される探索ラインによって微分絶対値が予め設定さ
れた微分しきい値より大きい点を求め、この輪郭検査対
象点に対応する微分方向値が予め設定された微分方向し
きい値範囲内に存在するとき、前記輪郭検査対象点を被
検査物の輪郭線上の点と認識するようにしたものであ
り、被検査物の輪郭線探索の基準点を正確かつ簡単に認
識することができるようになっている。
Further, the image processing method according to claim 2 obtains a point whose differential absolute value is larger than a preset differential threshold value by a search line set on the differential absolute value image, and differentiates the contour inspection target point. When the direction value is within a preset differential direction threshold value range, the contour inspection target point is recognized as a point on the contour line of the inspection object. The reference point can be recognized accurately and easily.

さらにまた、請求項3の画像処理方法は、エッジ画像上
で設定される探索ラインによってエッジフラッグが存在
する点を求め、この輪郭検査対象点に対応する微分絶対
値が予め設定された微分しきい値よりも大きく、しかも
その点に対応する微分方向値が予め設定された微分方向
値範囲内にあるとき、前記輪郭検査対象点を被検査物の
輪郭線上の点と認識するようにしたものであり、被検査
物の輪郭線探索の基準点を正確かつ簡単に認識すること
ができるようになっている。
Furthermore, the image processing method according to claim 3 obtains a point where an edge flag exists by a search line set on the edge image, and a differential absolute value corresponding to the contour inspection target point is a preset differential threshold. When the differential direction value corresponding to the point is larger than the value and is within the preset differential direction value range, the contour inspection target point is recognized as a point on the contour line of the inspection object. Therefore, the reference point for contour line search of the object to be inspected can be accurately and easily recognized.

更にまた請求項4の画像処理方法は、エッジ画像上の任
意の探索開始点から被検査物方向に探索ラインを設定し
てエッジフラッグが存在する点を求めて輪郭検査対象点
とし、上記輪郭検査対象点に対応する微分絶対値を微分
絶対値画像より抽出するとともに、抽出された微分絶対
値が予め設定された微分しきい値よりも大きいときに輪
郭検査対象点に対応する微分方向値を微分方向値画像か
ら抽出し、原画像上の輪郭検査対象点に対応する点から
微分方向値に対して垂直方向にn画素それぞれ離れた点
を濃度検査点として両濃度検査点の濃度を原画像から抽
出し、一方の濃度検査点の濃度が被検査物に対する濃度
しきい値よりも大きく、かつ他方の濃度検査点の濃度が
背景に対する濃度しきい値よりも小さいとき、前記輪郭
検査対象点を被検査物の輪郭線上の点と認識するように
したものであり、被検査物の輪郭線探索の基準点を正確
かつ簡単に認識することができるようになっている。
Furthermore, the image processing method according to claim 4 sets a search line in the direction of the object to be inspected from an arbitrary search start point on the edge image, obtains a point where an edge flag exists, and sets it as a contour inspection target point. The differential absolute value corresponding to the target point is extracted from the differential absolute value image, and the differential direction value corresponding to the contour inspection target point is differentiated when the extracted differential absolute value is larger than a preset differential threshold value. From the original image, the density of both density inspection points is extracted from the direction value image, and the density inspection points are points separated from the point corresponding to the contour inspection target point on the original image by n pixels in the direction perpendicular to the differential direction value. When the density of one of the density inspection points is larger than the density threshold for the object to be inspected and the density of the other density inspection point is smaller than the density threshold for the background, the contour inspection target point is extracted. Inspection It is obtained by to recognize the point on the contour line of the object, thereby making it possible to accurately recognize and easily a reference point of the contour line searching of the object.

[実施例] 第1図および第2図は本発明に係る外観検査装置の概略
構成を示すもので、照明ランフLaにて斜め方向から照明
された被検査物Oを撮影するTVカメラ1と、上記TVカメ
ラ1から出力される画像信号をA/D変換するA/D変換器2
と、A/D変換された画像データを前処理する前処理回路
3と、前処理された画像データを被検査物Oの原画像と
して記憶する原画像メモリ4と、原画像の各画素に対応
して演算される微分絶対値を記憶する微分絶対値画像メ
モリ5と、演算された微分方向値を記憶する微分方向値
画像メモリ6、原画像の濃度(明るさ)の変化点を線画
として抽出したエッジフラッグを記憶するエッジ画像メ
モリ7と、原画像を演算処理して各メモリ5〜7に所定
のデータを記憶させるとともに、各メモリ4〜7に記憶
されているデータに基づいて被検査物Oの輪郭線を探索
し,被検査物Oの輪郭を認識して被検査物Oの欠陥の有
無をチェックするマイクロプロセッサ(あるいはマイク
ロコンピュータ)8とで形成されている。
[Embodiment] FIGS. 1 and 2 show a schematic structure of an appearance inspection apparatus according to the present invention. A TV camera 1 for photographing an object to be inspected O illuminated obliquely by an illumination lamp La, A / D converter 2 for A / D converting the image signal output from the TV camera 1
A pre-processing circuit 3 for pre-processing A / D converted image data, an original image memory 4 for storing the pre-processed image data as an original image of the inspection object O, and each pixel of the original image Differential absolute value image memory 5 for storing the calculated differential absolute value, differential direction value image memory 6 for storing the calculated differential direction value, and a change point of the density (brightness) of the original image as a line drawing An edge image memory 7 that stores the edge flag, and an original image that is arithmetically processed to store predetermined data in each of the memories 5 to 7, and an object to be inspected based on the data stored in each of the memories 4 to 7. It is formed by a microprocessor (or a microcomputer) 8 that searches the contour line of O, recognizes the contour of the inspection object O, and checks whether the inspection object O has a defect.

以下、上述の外観検査装置の被検査物Oの輪郭認識およ
び欠陥検出について具体的に説明する。
Hereinafter, the outline recognition and the defect detection of the inspection object O of the above-described appearance inspection device will be specifically described.

第3図および第4図は動作説明図であり、まず、テレビ
カメラTV1にて撮影された第3図(a)に示すような被
検査物Oの原画像f1を、マイクロプロセッサ8で演算処
理し、第3図(b)に示すようなエッジ画像f4に変換す
る処理が必要であり、この処理は以下のように行なわれ
る。
3 and 4 are operation explanatory views. First, the microprocessor 8 calculates an original image f 1 of the inspection object O as shown in FIG. 3 (a) taken by the television camera TV1. It is necessary to process and convert it into an edge image f 4 as shown in FIG. 3 (b), and this processing is performed as follows.

まず、被検査物Oを含む空間領域を撮像して得られた原
画像f1は濃淡画像であって、第3図(a)に示すよう
に、被検査物O、欠陥X1、異物X2を含む画像となってい
る。ここに、各画素はたとえば濃度が8ビットで表わさ
れて256階調に設定される。この濃淡画像から被検査物
Oの輪郭線等のエッジを抽出する処理は、「エッジの部
分は濃度変化が大きい部分に対応している」という考え
方を基本にしている。したがって、濃度を微分すること
によってエッジの抽出を行なうのが一般的である。微分
処理は、第4図に示すように、濃淡画像を3×3画素の
局所並列ウインドウWに分割して行なう。つまり、注目
する画素Eと、その画素Eの周囲の8画素A〜D,F〜I
とで局所並列ウインドウWを形成し、局所並列ウインド
ウW内の画素A〜Iの濃度の縦方向の濃度変化ΔVと横
方向の濃度変化Hとを次式によって求め、 ΔV=(A+B+C)−(G+H+I) ΔH=(A+D+G)−(C+F+I) さらに、微分絶対値|eE|と微分方向値∠eEとを次式によ
って求めるのである。
First, the original image f 1 obtained by imaging the spatial region including the inspection object O is a grayscale image, and as shown in FIG. 3A, the inspection object O, the defect X 1 , and the foreign matter X 1 . The image includes 2 . Here, the density of each pixel is represented by, for example, 8 bits and is set to 256 gradations. The process of extracting the edge such as the outline of the inspection object O from the grayscale image is based on the idea that "the edge portion corresponds to a portion where the density change is large". Therefore, it is general to extract the edge by differentiating the density. The differentiation processing is performed by dividing the grayscale image into local parallel windows W of 3 × 3 pixels, as shown in FIG. That is, the pixel E of interest and the eight pixels A to D, F to I around the pixel E
Form a local parallel window W with, and a vertical density change ΔV and a horizontal density change H of the density of the pixels A to I in the local parallel window W are obtained by the following equation, and ΔV = (A + B + C) − ( G + H + I) ΔH = (A + D + G)-(C + F + I) Further, the differential absolute value | e E | and the differential direction value ∠e E are obtained by the following equations.

ただし、A〜Iは対応する画素の濃度を示している。以
上の演算を原画像f1の全画素について行なうことによ
り、被検査物Oの輪郭や欠陥X1、異物X2等が存在してい
るような濃度変化が大きい部分と、その変化の方向とを
抽出することができ、微分絶対値画像f2(6ビット)、
微分方向値画像f3(4ビット)としてそれぞれ微分絶対
値画像メモリ5および微分方向値画像メモリ6に記憶さ
れる。
However, A to I indicate the densities of the corresponding pixels. By performing the above calculation for all the pixels of the original image f 1 , the portion where the density change is large such that the contour of the object to be inspected O, the defect X 1 , the foreign material X 2 and the like are present, and the direction of the change Can be extracted, and the differential absolute value image f 2 (6 bits),
The differential direction value image f 3 (4 bits) is stored in the differential absolute value image memory 5 and the differential direction value image memory 6, respectively.

次に細線化処理が行なわれる。細線化処理は、微分絶対
値が大きいほど濃度変化が大きいことを表わしている点
に着目して行なわれる。すなわち、各画素の微分絶対値
を周囲の画素の微分絶対値と比較し、周囲の画素よりも
大きくなるものを連結していくことにより、1画素の幅
を有したエッジが抽出されるのである。つまり、画面上
の各画素の位置をX−Y座標で表わし、微分絶対値をZ
軸に取れば、微分絶対値を表わす曲面が形成されること
になるのであり、細線化処理は、この曲面における稜線
を求めることに相当する。この段階ではノイズ等による
エッジも含まれているから、適宜しきい値を設定し、し
きい値以上の値のみを採用してノイズ成分を除去する。
Next, thinning processing is performed. The thinning process is performed by paying attention to the fact that the larger the differential absolute value, the larger the density change. That is, an edge having a width of one pixel is extracted by comparing the differential absolute value of each pixel with the differential absolute value of surrounding pixels and connecting those that are larger than the surrounding pixels. . That is, the position of each pixel on the screen is represented by XY coordinates, and the differential absolute value is Z.
If the axis is taken, a curved surface representing the differential absolute value will be formed, and the thinning processing corresponds to obtaining the ridge line on this curved surface. At this stage, an edge due to noise or the like is also included, so a threshold value is appropriately set, and only a value equal to or higher than the threshold value is used to remove the noise component.

細線化処理で得られたエッジ画像f4は、原画像f1のコン
トラストが不十分であるときや、ノイズが多いようなと
きには、不連続線になりやすい。そこで、エッジ延長処
理を行なう。エッジ延長処理は、不連続線の端点から始
めて、注目する画素とその周囲の画素とを比較し、次式
で表わされる評価関数f(eJ)がもっとも大きくなる方
向にエッジを延長し、他の線の端点に衝突するまでこれ
を続けるものである。
The edge image f 4 obtained by the thinning process is likely to be a discontinuous line when the contrast of the original image f 1 is insufficient or when there is a lot of noise. Therefore, edge extension processing is performed. The edge extension processing starts from the end point of the discontinuity line, compares the pixel of interest with the surrounding pixels, extends the edge in the direction in which the evaluation function f (e J ) represented by This continues until it hits the end of the line.

ここに、eOは中心画素の微分データであり、eJは隣接画
素の微分データであって、J=1,2,……、8である。
Here, e O is the differential data of the central pixel, e J is the differential data of the adjacent pixel, and J = 1, 2, ...

以上の処理により、第3図(b)に示すように、被検査
物O、欠陥X1、異物X2等の輪郭線l0〜l2が閉曲線のパタ
ーンとなった1ビット(“1"をエッジフラッグと称す
る)のエッジ画像f4が得られ、エッジ画像メモリ7に記
憶される。
With the above processing, as shown in FIG. 3 (b), 1-bit object to be inspected O, defect X 1, outline l 0 to l 2 such foreign matter X 2 is a pattern of closed curve ( "1" Is referred to as an edge flag), and an edge image f 4 is obtained and stored in the edge image memory 7.

ところで、上述の外観検査装置において、前述したよう
に輪郭線探索の出発点となる基準点Qを正確に設定する
必要があり、以下、本発明に係る基準点Qを設定するた
めの画像処理方法について説明する。
By the way, in the above-described appearance inspection apparatus, it is necessary to accurately set the reference point Q that is the starting point of the contour line search as described above. Hereinafter, the image processing method for setting the reference point Q according to the present invention will be described. Will be described.

第5図は、請求項1の画像処理方法のフローチャート、
第6乃至第9図は動作説明図であり、第6図はTVカメラ
1にて撮影された原画像であり、各画像メモリ4〜7に
は、第7図に示すように各画素(xn,yn)に対応して原
画像データf1(xn,yn)、微分絶対値画像データf2(xn,
yn)、微分方向値画像データf3(xn,yn)、エッジ画像
データf4(xn,yn)が対応(アドレスコードが同一)し
て記憶されている。
FIG. 5 is a flow chart of the image processing method according to claim 1,
6 to 9 are explanatory diagrams of the operation, FIG. 6 is an original image photographed by the TV camera 1, and each image memory 4 to 7 has pixels (xn) as shown in FIG. , yn) corresponding to the original image data f 1 (xn, yn) and the differential absolute value image data f 2 (xn, yn)
yn), differential direction value image data f 3 (xn, yn), and edge image data f 4 (xn, yn) are stored in correspondence (with the same address code).

まず最初に、エッジ画像f4上の任意の探索開始点P(x
p,yp)を設定するとともに、この探索開始点P(xp,y
p)から被検査物方向に探索ラインaを設定してエッジ
フラッグ(f4(x,y)=1)が存在する点を求めて輪郭
検査対象点Q(xq,yq)とする。次に、上記輪郭検査対
象点Q(xq,yq)を中心として第8図に示すようにN×
M画素(実施例では7×5画素)よりなる適当な局所並
列ウインドウWを設定するとともに、第9図に示すよう
に、上記局所並列ウインドウWの各行について走査b1
b7してエッジフラッグの有無をチェックする。ここに、
第8図(a)に示すように、総ての行にエッジフラッグ
が有る場合に該局所並列ウインドウWを輪郭線検査対象
領域とする。なお、第8図(b)に示すように、探索ラ
インa上にエッジフラッグがあっても、局所並列ウイン
ドウWの総ての行にエッジフラッグがない場合には、上
記処理を繰り返して輪郭線検査対象領域を探索する。
First, any search starting point on the edge image f 4 P (x
p, yp) and set the search start point P (xp, y
From p), a search line a is set in the direction of the object to be inspected, and a point at which an edge flag (f 4 (x, y) = 1) exists is obtained and set as a contour inspection target point Q (xq, yq). Next, as shown in FIG. 8, centering on the contour inspection target point Q (xq, yq), N ×
Sets the appropriate local parallel window W formed of (7 × 5 pixels in the example) M pixels, as shown in FIG. 9, the scan for each line of the local parallel window W b 1 ~
b 7 Check for edge flags. here,
As shown in FIG. 8A, when all the rows have edge flags, the local parallel window W is set as the contour line inspection target area. As shown in FIG. 8 (b), even if there is an edge flag on the search line a but there is no edge flag in all the rows of the local parallel window W, the above processing is repeated to repeat the contour line. Search for the area to be inspected.

次に、上述のようにして求められた輪郭線検査対象領域
の各エッジフラッグに対応する微分絶対値f2(xq,yq)
を微分絶対値画像f2から抽出するとともに、抽出された
微分絶対値f2(xq,yq)のうち予め設定された微分しき
い値L2よりも大きいもの(f2(xq,yq)>L2)について
加算して微分絶対値の総和Sを求める。
Next, the differential absolute value f 2 (xq, yq) corresponding to each edge flag of the contour line inspection target area obtained as described above
Is extracted from the differential absolute value image f 2 and the extracted differential absolute value f 2 (xq, yq) is larger than a preset differential threshold L 2 (f 2 (xq, yq)> L 2 ) is added to obtain the sum S of differential absolute values.

次に、上記微分絶対値の総和Sが予め設定された総和し
きい値L2sよりも大きい(S>L2s)ときに、前記輪郭検
査対象点Q(xq,yq)を被検査物Oの輪郭線l0上の点と
判定する。なお、微分絶対値の総和Sが総和しきい値L2
sよりも小さい場合には、輪郭検査対象点Q(xq,yq)を
被検査物Oの輪郭線上の点でないと判定して、上述の処
理を繰り返して基準点を探索する。また、予め設定され
た探索範囲内に上記基準点条件を満たす点がない場合に
は、被検査物Oが存在しないと判定する。
Next, when the sum S of the differential absolute values is larger than a preset sum threshold L 2 s (S> L 2 s), the contour inspection target point Q (xq, yq) is inspected. It is determined to be a point on the contour line l 0 of O. The sum S of the differential absolute values is the sum threshold L 2
If it is smaller than s, it is determined that the contour inspection target point Q (xq, yq) is not a point on the contour line of the inspection object O, and the above-described processing is repeated to search for the reference point. If there is no point satisfying the reference point condition within the preset search range, it is determined that the inspection object O does not exist.

ここに、本実施例にあっては、正確に輪郭線l0上の基準
点抽出を行うために、まず、被検査物Oのエッジが直線
的でかつ連続性があるという特徴に着目し、局所並列ウ
インドウWによってエッジフラッグが総ての行に存在す
るかどうかを判定し、異物、ノイズX2のエッジに基づい
た輪郭線検査領域が設定されないようにしている。次
に、異物、ノイズX2のエッジの微分絶対値が被検査物O
のエッジの微分絶対値よりも一般的に小さい点に着目し
て微分しきい値L2をその中間に設定することにより、異
物、ノイズX2のエッジの微分絶対値を無視するようにな
っている。さらに、異物、ノイズX2のエッジの微分絶対
値が微分しきい値L2を越える数は少なく、その総和Sは
小さくなるという点に着目して、微分しきい値L2よりも
大きい微分絶対値の総和Sは、総和しきい値L2sよりも
大きくなければならないという条件を付加しており、以
上の3条件を満足する点を被検査物Oの輪郭線上の点と
判定することにより、異物、ノイズX2に影響されること
なく輪郭線探索の基準点を1つの探索ラインaで正確か
つ簡単に認識することができる。
Here, in the present embodiment, in order to accurately extract the reference point on the contour line l 0 , firstly, focusing on the feature that the edge of the inspection object O is linear and continuous, It is determined by the local parallel window W whether or not the edge flag exists in all the rows, and the contour line inspection area based on the edge of the foreign matter and noise X 2 is not set. Next, the differential absolute value of the edge of the foreign matter and noise X 2 is the object O to be inspected.
Focusing on a point that is generally smaller than the differential absolute value of the edge of, the differential threshold L 2 is set in the middle, so that the differential absolute value of the edge of the foreign matter and noise X 2 is ignored. There is. Furthermore, focusing on the fact that the number of differential absolute values of the edge of the foreign matter and noise X 2 exceeds the differential threshold L 2 is small, and the sum S thereof is small, the differential absolute value larger than the differential threshold L 2 is obtained. The condition that the total sum S of the values must be larger than the total sum threshold L 2 s is added. By determining the points satisfying the above three conditions as the points on the contour line of the inspection object O, The reference point for contour line search can be accurately and easily recognized with one search line a without being affected by foreign matter and noise X 2 .

第10図は、請求項2の画像処理方法のフローチャート、
第11図は同上の動作説明図であり、まず、第11図に示す
ように、微分絶対値画像f2上の任意の探索開始点P(f2
(xp,yp))から被検査物方向に探索ラインaを設定
し、第15図に示すように、探索ラインa上の各画素Ri
(i=1,2,3,…………)で微分絶対値f2(xp,yp)が予
め設定された微分しきい値L2より大きい点を求めて輪郭
検査対象点Q(xq,yq)とする。次に、輪郭検査対象点
Q(xq,yq)に対応する微分方向値f3(xq,yq)を微分方
向値画像f3から抽出し、抽出された微分方向値f3(xq,y
q)が予め設定された微分方向しきい値[L3a,L3b]範囲
内に存在するかどうかを判定(L3a<f3(xq,yq)<L
3b)し、この判定条件を満足した場合には、この輪郭検
査対象点Q(xq,yq)を被検査物Oの輪郭線l0上の点と
判定(アドレスコードを格納)する。なお、上記判定条
件を満足しない場合には、輪郭検査対象点Q(xq,yq)
を輪郭線l0上の点でないと判定し、次の探索ラインa上
の次の画素Riに対して上述の基準点探索処理を繰り返し
て行い、予め設定された探索範囲内に判定条件を満たす
点がなければ被検査物Oが存在しないと判定する。ま
た、微分方向しきい値範囲は、被検査物Oの輪郭線の微
分方向値を正確に調査し、微分方向しきい値範囲を絞り
込んで設定されるようになっている。
FIG. 10 is a flowchart of the image processing method of claim 2,
FIG. 11 is an operation explanatory view of the same, as shown in FIG. 11, any search starting point on the differential absolute value image f 2 P (f 2
(Xp, yp)), a search line a is set in the direction of the inspection object, and as shown in FIG. 15, each pixel Ri on the search line a is set.
At (i = 1,2,3, ...), a point whose differential absolute value f 2 (xp, yp) is larger than a preset differential threshold L 2 is obtained, and the contour inspection target point Q (xq, yq). Next, contour inspection point Q (xq, yq) differential direction value f 3 (xq, yq) corresponding to extracts from differentiated direction value image f 3, extracted differentiated direction value f 3 (xq, y
q) is within a preset differential direction threshold [L 3 a, L 3 b] range (L 3 a <f 3 (xq, yq) <L
3 b) Then, when this judgment condition is satisfied, it is judged that this contour inspection target point Q (xq, yq) is a point on the contour line l 0 of the inspection object O (the address code is stored). If the above determination conditions are not satisfied, the contour inspection target point Q (xq, yq)
Is not a point on the contour line l 0 , the above-described reference point search processing is repeated for the next pixel Ri on the next search line a, and the determination condition is satisfied within the preset search range. If there is no point, it is determined that the inspection object O does not exist. The differential direction threshold range is set by accurately examining the differential direction value of the contour line of the inspection object O and narrowing down the differential direction threshold range.

第12図は請求項3の画像処理方法の動作を示すフローチ
ャートであり、まず、エッジ画像f4上の任意の探索開始
点Pから被検査物方向に探索ラインaを設定してエッジ
フラッグ(f4(x,y)=1)が存在する点を求めて輪郭
検査対象点Q(xq,yq)とする。次に、この輪郭検査対
象点Q(xq,yq)に対応する微分絶対値f2(xq,yq)を微
分絶対値画像f2より抽出するとともに、抽出された微分
絶対値f2(xq,yq)が予め設定された微分しきい値L2
りも大きいときに輪郭検査対象点Q(xq,yq)に対応す
る微分方向値f3(xq,yq)を微分方向値画像f3から抽出
し、上記微分方向値f3(xq,yq)が予め設定された微分
方向値範囲内(L3a>f3(xq,yq)>L3b)にあるとき、
この輪郭検査対象点Q(xq,yq)を被検査物Oの輪郭線l
0上の点と判定(アドレスコードを格納)する。なお、
上記2つの判定条件を同時に満たさない場合には、輪郭
線l0上の点でないと判定して、上述の探索処理を繰り返
して行い、予め設定された探索範囲内に判定条件を満た
す点がなければ被検査物Oが存在しないと判定する。
FIG. 12 is a flow chart showing the operation of the image processing method of claim 3. First, the search line a is set from the arbitrary search start point P on the edge image f 4 toward the inspected object, and the edge flag (f A point at which 4 (x, y) = 1) exists is determined as a contour inspection target point Q (xq, yq). Next, the differential absolute value f 2 (xq, yq) corresponding to the contour inspection target point Q (xq, yq) is extracted from the differential absolute value image f 2 , and the extracted differential absolute value f 2 (xq, yq) is larger than a preset differential threshold L 2 and the differential direction value f 3 (xq, yq) corresponding to the contour inspection target point Q (xq, yq) is extracted from the differential direction value image f 3. Then, when the differential direction value f 3 (xq, yq) is within the preset differential direction value range (L 3 a> f 3 (xq, yq)> L 3 b),
This contour inspection target point Q (xq, yq) is the contour line l of the object O to be inspected.
Judge as a point above 0 (store address code). In addition,
If the above two determination conditions are not satisfied at the same time, it is determined that the point is not on the contour line l 0 , the above-described search processing is repeated, and there must be a point that satisfies the determination condition within the preset search range. For example, it is determined that the inspection object O does not exist.

第13図(a)は上記実施例の動作を具体的に説明する図
であり、黒色の背景B1,B2の間に白色の被検査物Oが存
在し、背景B2側に異物やノイズX2が多数存在しており、
輪郭線l02を探索により認識したい場合において、探索
点をB2側に設定すると、異物やノイズX2を誤認識し易く
なるので、探索開始点Pを背景B1側に設定するのが望ま
しい。このように探索開始点を背景B1側に設定して、さ
らに、被検査物OのエッジQ1(xq1,yq1)、Q2(xq2,y
q2)の微分絶対値は異物、ノイズX2の微分絶対値よりも
十分大きく、かつ微分しきい値L2を越えており第1の判
定条件を満足しているものとする。いま、輪郭線l01
の点Q1(xq1,yq1)に対応する微分方向値f3(xq1,yq1
が“4"、輪郭線l02上の点Q2(xq2,yq2)に対応する微分
方向値f3(xq2,yq2)が“12"である場合において、第2
の判定条件である微分方向値範囲を“10〜14"に設定し
ておけば、輪郭線l01上の点Q1(xq1,yq1)は第2の判定
条件を満足しないので、両判定条件を満足する輪郭線l
02上の点Q2(xq2,yq2)が被検査物Oの輪郭線探索の基
準点と判定され、微分方向値を考慮することにより適正
な基準点を認識できることになる。なお、本実施例は、
第13図(b)に示すように、内側の輪郭線l02上の点を
認識する場合にも有効である。
FIG. 13 (a) is a diagram for specifically explaining the operation of the above-described embodiment, in which a white object to be inspected O exists between the black backgrounds B 1 and B 2 , and foreign matter or foreign matter is present on the background B 2 side. There are many noises X 2 ,
When recognizing the contour line l 02 by searching, if the search point is set to the B 2 side, it is easy to misrecognize the foreign matter and the noise X 2 , so it is desirable to set the search start point P to the background B 1 side. . In this way, the search start point is set on the background B 1 side, and the edges Q 1 (xq 1 , yq 1 ) and Q 2 (xq 2 , y of the object to be inspected O are further set.
The differential absolute value of q 2 ) is sufficiently larger than the differential absolute value of foreign matter and noise X 2 , and exceeds the differential threshold L 2 , and the first judgment condition is satisfied. Now, the differential direction value f 3 (xq 1 , yq 1 ) corresponding to the point Q 1 (xq 1 , yq 1 ) on the contour line l 01
Is “4” and the differential direction value f 3 (xq 2 , yq 2 ) corresponding to the point Q 2 (xq 2 , yq 2 ) on the contour line l 02 is “12”, the second
If the differential direction value range that is the judgment condition of is set to “10 to 14”, the point Q 1 (xq 1 , yq 1 ) on the contour line l 01 does not satisfy the second judgment condition. Contour line l that satisfies the judgment condition
The point Q 2 (xq 2 , yq 2 ) on 02 is determined as the reference point for contour line search of the inspection object O, and an appropriate reference point can be recognized by considering the differential direction value. In this example,
As shown in FIG. 13 (b), it is also effective when recognizing a point on the inner contour line l 02 .

第14図は、請求項4の画像処理方法のフローチャートで
あり、請求項3の場合と同様に探索ラインa上でエッジ
フラッグが存在する点Q(xq,yq)の微分方向値f3(xq,
yq)を抽出し、第15図に示すように、原画像f1上の輪郭
検査対象点Q(xq,yq)に対応する点から微分方向値f3
(xq,yq)に対して垂直方向にn画素それぞれ離れた点
を濃度検査点R1(xq−n,yq−n)、R2(xq+n,xq+n)
として設定し、これらの濃度検査点R1(xq−n,yq−
n)、R2(xq+n,xq+n)の濃度を抽出し、一方の濃度
検査点R1(xq−n,yq−n)あるいはR2(xq+n,xq+n)
の濃度が被検査O物に対する濃度しきい値L10よりも大
きく、かつ他方の濃度検査点R2(xq+n,yq+n)あるい
はR1(xq−n,xq−n)の濃度が背景Bに対する濃度しき
い値L1Bよりも小さいとき、前記輪郭検査対象点Q(xq,
yq)を輪郭線上の点と判定してアドレスコードを格納
し、輪郭線探索の基準点と認識して輪郭線探索を開始す
るようにしたものである。なお、上記判定条件を満足し
ない場合には、輪郭線l0上の点でないと判定し、上記基
準点探索処理を繰り返して行い、探索範囲内に判定条件
を満足する点がないときには被検査物Oが存在しないと
判定する。
FIG. 14 is a flowchart of the image processing method of claim 4, and similarly to the case of claim 3, the differential direction value f 3 (xq of the point Q (xq, yq) where the edge flag exists on the search line a. ,
yq) is extracted, and as shown in FIG. 15, from the point corresponding to the contour inspection target point Q (xq, yq) on the original image f 1 , the differential direction value f 3
Density inspection points R 1 (xq−n, yq−n) and R 2 (xq + n, xq + n) are points that are n pixels apart from each other in the vertical direction with respect to (xq, yq).
, And these density inspection points R 1 (xq−n, yq−
n), the concentration of R 2 (xq + n, xq + n) is extracted, and one of the concentration inspection points R 1 (xq-n, yq-n) or R 2 (xq + n, xq + n)
Is greater than the concentration threshold L 10 for the object to be inspected, and the concentration of the other concentration inspection point R 2 (xq + n, yq + n) or R 1 (xq-n, xq-n) is the concentration for the background B. When it is smaller than the threshold value L 1B , the contour inspection target point Q (xq,
yq) is determined as a point on the contour line, the address code is stored, the contour line search is started by recognizing it as a reference point for the contour line search. In addition, when the above determination condition is not satisfied, it is determined that the point is not on the contour line l 0 , the reference point search process is repeated, and when there is no point within the search range that satisfies the determination condition, the object to be inspected It is determined that O does not exist.

いま、被検査物Oの濃度が背景Bの濃度に比べて十分に
大きく、異物、ノイズX2の濃度がその中間にあるとすれ
ば、濃度しきい値L1Oを十分大きく設定するとともに、
濃度しきい値L1Bを十分小さく設定すれば、異物、ノイ
ズX2のエッジを被検査物Oの輪郭線と誤判定することが
なく、被検査物Oの輪郭線上の基準点を正確に認識でき
ることになる。なお、異物、ノイズX2の濃度は、一般的
に被検査物Oの濃度よりも十分小さく、背景Bの濃度よ
りも十分大きいので、両濃度しきい値L1O,L1Bは比較的
容易に設定できることになる。
Now, assuming that the density of the object O to be inspected is sufficiently higher than the density of the background B and the density of the foreign matter and the noise X 2 is in the middle thereof, the density threshold L 1O is set sufficiently high, and
If the density threshold L 1B is set to be sufficiently small, the edge of the foreign matter and the noise X 2 will not be erroneously determined as the contour line of the inspection object O, and the reference point on the contour line of the inspection object O will be accurately recognized. You can do it. Since the density of the foreign matter and the noise X 2 is generally sufficiently lower than the density of the inspection object O and sufficiently higher than the density of the background B, both density thresholds L 1O and L 1B can be relatively easily set. It can be set.

[発明の効果] 本発明は上述のように構成されており、TVカメラで撮影
された被検査物の原画像の輪郭部周辺に異物やノイズが
存在する場合にあっても、被検査物の輪郭線を探索して
被検査物を正確に認識することができ、しかも、被検査
物の輪郭線探索の基準点を1つの探索ラインで正確かつ
簡単に認識することができるという効果がある。
EFFECTS OF THE INVENTION The present invention is configured as described above, and even when foreign matter or noise is present around the contour portion of the original image of the inspection object captured by the TV camera, There is an effect that a contour line can be searched for and an object to be inspected can be accurately recognized, and a reference point for contour line search of an object to be inspected can be accurately and easily recognized with one search line.

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

第1図は本発明に係る外観検査装置の概略構成図、第2
図は同上のブロック回路図、第3図および第4図は同上
の動作説明図であり、第3図(a)〜(c)は原画像、
エッジ画像、欠陥部のエッジ画像の一例を示す説明図、
第4図は局所並列ウインドウを示す説明図、第5図乃至
第9図は請求項1の発明の動作説明図、第10図および第
11図は請求項2の発明の一実施例を示す動作説明図、第
12図および第13図は請求項3の発明の動作説明図、第14
図、第15図は請求項4の発明の動作説明図である。 1はTVカメラ、2はA/D変換器、3は前処理回路、4は
原画像メモリ、5は微分絶対値画像メモリ、6は微分方
向値画像メモリ、7はエッジ画像メモリ、8はマイクロ
プロセッサである。
FIG. 1 is a schematic configuration diagram of an appearance inspection device according to the present invention, and FIG.
FIG. 3 is a block circuit diagram of the above, FIGS. 3 and 4 are operation explanatory diagrams of the same, and FIGS. 3A to 3C are original images.
An edge image, an explanatory view showing an example of an edge image of a defective portion,
FIG. 4 is an explanatory view showing a local parallel window, and FIGS. 5 to 9 are explanatory views of the operation of the invention of claim 1, FIG. 10 and FIG.
FIG. 11 is an operation explanatory view showing one embodiment of the invention of claim 2,
12 and 13 are explanatory views of the operation of the invention of claim 3, and FIG.
FIG. 15 and FIG. 15 are operation explanatory views of the invention of claim 4. 1 is a TV camera, 2 is an A / D converter, 3 is a pre-processing circuit, 4 is an original image memory, 5 is a differential absolute value image memory, 6 is a differential direction value image memory, 7 is an edge image memory, and 8 is a micro. It is a processor.

フロントページの続き (56)参考文献 特開 昭61−9769(JP,A) 特開 昭61−126455(JP,A) 特開 昭61−9775(JP,A)Continuation of the front page (56) References JP 61-9769 (JP, A) JP 61-126455 (JP, A) JP 61-9775 (JP, A)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】TVカメラで撮影された被検査物の原画像を
演算処理して微分絶対値画像、微分方向値画像、エッジ
画像を求め、各画像に基づいて被検査物の輪郭線を探索
して被検査物の輪郭を認識するようにした画像処理方法
において、エッジ画像上の任意の探索開始点から被検査
物方向に探索ラインを設定してエッジフラッグが存在す
る点を求めて輪郭検査対象点とし、上記輪郭検査対象点
を中心としてN×M画素よりなる適当な局所並列ウイン
ドウを設定するとともに、上記局所並列ウインドウの各
行についてエッジフラッグの有無をチェックして総ての
行にエッジフラッグが有る場合に該局所並列ウインドウ
を輪郭線検査対象領域とし、上記輪郭検査対象領域の各
エッジフラッグに対応する微分絶対値を微分画像から抽
出するとともに、抽出された微分絶対値のうち予め設定
された微分しきい値よりも大きいものについて加算して
微分絶対値の総和を求め、上記微分絶対値の総和が予め
設定された総和しきい値よりも大きいときに、前記輪郭
検査対象点を被検査物の輪郭線上の点と認識するように
したことを特徴とする画像処理方法。
1. An original image of an object to be inspected taken by a TV camera is arithmetically processed to obtain a differential absolute value image, a differential direction value image and an edge image, and a contour line of the object to be inspected is searched based on each image. In the image processing method for recognizing the contour of the inspected object, a search line is set in the direction of the inspected object from an arbitrary search start point on the edge image to obtain a point where the edge flag exists, and the contour inspection is performed. As a target point, an appropriate local parallel window consisting of N × M pixels centering on the contour inspection target point is set, and the presence or absence of an edge flag is checked for each row of the local parallel window to check the edge flag for all rows. If there is, the local parallel window is set as the contour inspection target area, and the differential absolute value corresponding to each edge flag of the contour inspection target area is extracted from the differential image and extracted. Of the differential absolute values that have been issued, those that are larger than the preset differential threshold value are added to obtain the total sum of differential absolute values, and the total sum of the differential absolute values is greater than the preset total threshold value. At this time, the contour inspection target point is recognized as a point on the contour line of the object to be inspected.
【請求項2】TVカメラで撮影された被検査物の原画像を
演算処理して微分絶対値画像、微分方向値画像、エッジ
画像を求め、各画像に基づいて被検査物の輪郭線を探索
して被検査物の輪郭を認識するようにした画像処理方法
において、微分絶対値画像上の任意の探索開始点から被
検査物方向に探索ラインを設定して微分絶対値が予め設
定された微分しきい値より大きい点を求め輪郭検査対象
点とし、上記輪郭検査対象点に対応する微分方向値を微
分方向値画像から抽出し、抽出された微分方向値が予め
設定された微分方向しきい値範囲内に存在するとき、前
記輪郭検査対象点を被検査物の輪郭線上の点と認識する
ようにしたことを特徴とする画像処理方法。
2. A differential absolute value image, a differential direction value image, and an edge image are obtained by arithmetically processing an original image of the inspection object photographed by a TV camera, and a contour line of the inspection object is searched based on each image. In the image processing method in which the contour of the inspected object is recognized, a differential absolute value is preset by setting a search line in the direction of the inspected object from an arbitrary search start point on the differential absolute value image. A point larger than the threshold value is obtained as a contour inspection target point, a differential direction value corresponding to the contour inspection target point is extracted from the differential direction value image, and the extracted differential direction value is a preset differential direction threshold value. An image processing method, characterized in that, when it exists within a range, the contour inspection target point is recognized as a point on the contour line of the inspection object.
【請求項3】TVカメラで撮影された被検査物の原画像を
演算処理して微分絶対値画像、微分方向値画像、エッジ
画像を求め、各画像に基づいて被検査物の輪郭線を探索
して被検査物の輪郭を認識するようにした画像処理方法
において、エッジ画像上の任意の探索開始点から被検査
物方向に探索ラインを設定してエッジフラッグが存在す
る点を求めて輪郭検査対象点とし、上記輪郭検査対象点
に対応する微分絶対値を微分絶対値画像より抽出すると
ともに、抽出された微分絶対値が予め設定された微分し
きい値よりも大きいときに輪郭検査対象点に対応する微
分方向値を微分方向値画像から抽出し、上記微分方向値
が予め設定された微分方向値範囲内にあるとき、前記輪
郭検査対象点を被検査物の輪郭線上の点と認識するよう
にしたことを特徴とする画像処理方法。
3. An original image of an object to be inspected taken by a TV camera is arithmetically processed to obtain a differential absolute value image, a differential direction value image and an edge image, and a contour line of the object to be inspected is searched based on each image. In the image processing method for recognizing the contour of the inspected object, a search line is set in the direction of the inspected object from an arbitrary search start point on the edge image to obtain a point where the edge flag exists, and the contour inspection is performed. As the target point, the differential absolute value corresponding to the contour inspection target point is extracted from the differential absolute value image, and when the extracted differential absolute value is larger than a preset differential threshold value, the contour inspection target point is set. A corresponding differential direction value is extracted from the differential direction value image, and when the differential direction value is within a preset differential direction value range, the contour inspection target point is recognized as a point on the contour line of the inspection object. Characterized by Image processing method for.
【請求項4】TVカメラで撮影された被検査物の原画像を
演算処理して微分絶対値画像、微分方向値画像、エッジ
画像を求め、各画像に基づいて被検査物の輪郭線を探索
して被検査物の輪郭を認識するようにした画像処理方法
において、エッジ画像上の任意の探索開始点から被検査
物方向に探索ラインを設定してエッジフラッグが存在す
る点を求めて輪郭検査対象点とし、上記輪郭検査対象点
に対応する微分絶対値を微分絶対値画像より抽出すると
ともに、抽出された微分絶対値が予め設定された微分し
きい値よりも大きいときに輪郭検査対象点に対応する微
分方向値を微分方向値画像から抽出し、原画像上の輪郭
検査対象点に対応する点から微分方向値に対して垂直方
向にn画素それぞれ離れた点を濃度検査点として両濃度
検査点の濃度を原画像から抽出し、一方の濃度検査点の
濃度が被検査物に対する濃度しきい値より大きく、かつ
他方の濃度検査点の濃度が背景に対する濃度しきい値よ
りも小さいとき、前記輪郭検査対象点を被検査物の輪郭
線上の点と認識するようにしたことを特徴とする画像処
理方法。
4. A differential absolute value image, a differential direction value image, and an edge image are obtained by arithmetically processing an original image of an object to be inspected taken by a TV camera, and a contour line of the object to be inspected is searched based on each image. In the image processing method for recognizing the contour of the inspected object, a search line is set in the direction of the inspected object from an arbitrary search start point on the edge image to obtain a point where the edge flag exists, and the contour inspection is performed. As the target point, the differential absolute value corresponding to the contour inspection target point is extracted from the differential absolute value image, and when the extracted differential absolute value is larger than a preset differential threshold value, the contour inspection target point is set. A corresponding differential direction value is extracted from the differential direction value image, and both density inspections are performed by using a point that is n pixels away from the point corresponding to the contour inspection target point on the original image in the direction perpendicular to the differential direction value as the density inspection point. Based on the density of points When the density of one density inspection point is larger than the density threshold for the object to be inspected and the density of the other density inspection point is smaller than the density threshold for the background, the contour inspection target point is extracted from the image. An image processing method characterized in that it is recognized as a point on a contour line of an object to be inspected.
JP1006903A 1989-01-14 1989-01-14 Image processing method Expired - Lifetime JPH0797410B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1006903A JPH0797410B2 (en) 1989-01-14 1989-01-14 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1006903A JPH0797410B2 (en) 1989-01-14 1989-01-14 Image processing method

Publications (2)

Publication Number Publication Date
JPH02187651A JPH02187651A (en) 1990-07-23
JPH0797410B2 true JPH0797410B2 (en) 1995-10-18

Family

ID=11651198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1006903A Expired - Lifetime JPH0797410B2 (en) 1989-01-14 1989-01-14 Image processing method

Country Status (1)

Country Link
JP (1) JPH0797410B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2827756B2 (en) * 1992-05-15 1998-11-25 三菱電機株式会社 Defect inspection equipment
DE19836071A1 (en) * 1998-08-10 2000-02-17 Schlafhorst & Co W Process for the detection of thread residues on spinning head sleeves
JP5320216B2 (en) * 2009-08-26 2013-10-23 パナソニック株式会社 Image processing apparatus, image processing system, and image processing method
WO2021133348A1 (en) * 2019-12-24 2021-07-01 Gaziantep Universitesi Rektorlugu An artificial vision system for real-time detection of abrage errors in the yarn coil

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS619769A (en) * 1984-06-25 1986-01-17 Matsushita Electric Works Ltd Picture image processor

Also Published As

Publication number Publication date
JPH02187651A (en) 1990-07-23

Similar Documents

Publication Publication Date Title
JP4230880B2 (en) Defect inspection method
JP3890844B2 (en) Appearance inspection method
JPH0797410B2 (en) Image processing method
JP4293653B2 (en) Appearance inspection method
JPH06103276B2 (en) Surface inspection device
JPH03175343A (en) Method for extracting flaw by inspection appearance
JPH0718812B2 (en) Foreign object detection method
JPH02242382A (en) Defect checking method
JP2686053B2 (en) Defect inspection method by visual inspection
JP2710685B2 (en) Defect detection method by visual inspection
JP3753234B2 (en) Defect detection method
JPH1114317A (en) Appearance inspection method and device
JPH09161056A (en) Inspecting method for inner surface of circular container
JP3494006B2 (en) Appearance inspection method
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JPH11160046A (en) Appearance inspection method
JP3038092B2 (en) Appearance inspection method
JPH0772909B2 (en) Welding condition judgment method by visual inspection
JPH0827841B2 (en) Appearance inspection method
JPH10214327A (en) Method of detecting surface defect using image
JP2564737B2 (en) Automatic magnetic particle flaw detector
JPH07280746A (en) Apparatus for extracting flaw from metal plate surface
JPS61126455A (en) Image processing method
JP2514727B2 (en) Defect inspection method by visual inspection
JPH0581430A (en) Detection of edge

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071018

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081018

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081018

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091018

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091018

Year of fee payment: 14