JPH0771285B2 - Gray image processing method - Google Patents

Gray image processing method

Info

Publication number
JPH0771285B2
JPH0771285B2 JP62016890A JP1689087A JPH0771285B2 JP H0771285 B2 JPH0771285 B2 JP H0771285B2 JP 62016890 A JP62016890 A JP 62016890A JP 1689087 A JP1689087 A JP 1689087A JP H0771285 B2 JPH0771285 B2 JP H0771285B2
Authority
JP
Japan
Prior art keywords
value
line
light amount
light
inspection area
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
JP62016890A
Other languages
Japanese (ja)
Other versions
JPS63185182A (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 JP62016890A priority Critical patent/JPH0771285B2/en
Publication of JPS63185182A publication Critical patent/JPS63185182A/en
Publication of JPH0771285B2 publication Critical patent/JPH0771285B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Closed-Circuit Television Systems (AREA)

Description

【発明の詳細な説明】 (技術分野) 本発明は、被検査物の外観検査に用いる濃淡画像処理方
式に関するものである。
Description: TECHNICAL FIELD The present invention relates to a grayscale image processing system used for visual inspection of an object to be inspected.

(背景技術) 従来、被検査物の表面に対して斜方向から光を照射する
光源と、前記光源による照明下で被検査物の濃淡画像を
撮影するテレビカメラとを設け、得られた濃淡画像を微
分して検査領域内に発生した低コントラストな欠陥を判
定する画像処理方式が提案されている。しかしながら、
低コントラストな欠陥を含む濃淡画像を微分しても、欠
陥部とその周辺の正常部との微分値の差は余り無いの
で、欠陥部の正確なエッジを認識することは困難であ
り、誤判定する場合が多かった。
(Background Art) Conventionally, a grayscale image obtained by providing a light source that obliquely illuminates the surface of the inspection target and a television camera that captures a grayscale image of the inspection target under the illumination of the light source are provided. An image processing method has been proposed in which a low-contrast defect generated in the inspection area is determined by differentiating the image. However,
Even if a grayscale image containing a low-contrast defect is differentiated, there is not much difference in the differential value between the defective part and the surrounding normal part, so it is difficult to recognize the correct edge of the defective part, and misjudgment is made. It was often done.

また、被検査物の表面を分割して得られる複数の比較的
広い領域(数十画像×数十画素)のそれぞれについて明
るさのモード値(最頻値)と最小値の差を求めることに
より外観検査を行う装置が特開昭61-187637号公報に開
示されているが、被検査物の表面を分割して得られる複
数の比較的広い領域のそれぞれについて明るさのモード
値と最小値を求める必要があり、モード値や最小値の計
算回数が多くなるという問題があった。また、モード値
や最小値は前記領域内では一定値となるので、斜照明を
用いた場合には、各領域内の光源に近い部分と光源から
遠い部分とで明るさのモード値が必ずしもその部分の平
均的明るさを代表する値とはならないという問題があっ
た。
In addition, by obtaining the difference between the mode value (mode value) and the minimum value of the brightness for each of a plurality of relatively wide areas (tens of images × tens of pixels) obtained by dividing the surface of the inspection object. An apparatus for performing a visual inspection is disclosed in Japanese Patent Laid-Open No. 61-187637. However, the brightness mode value and the minimum value are set for each of a plurality of relatively wide areas obtained by dividing the surface of the inspection object. There is a problem in that it is necessary to calculate the number of calculations for the mode value and the minimum value. In addition, since the mode value and the minimum value are constant values in the area, when oblique illumination is used, the mode value of the brightness in the area close to the light source and the area far from the light source in each area is not necessarily the same. There is a problem that the average brightness of the part is not a value that is representative.

(発明の目的) 本発明は上述のような点に鑑みてなされたものであり、
その目的とするところは、斜照明を受ける被検査物の表
面の明るさのモード値を簡単な計算により精度良く求め
て検査領域内に発生する低コントラストな欠陥を正確に
識別できるようにして検出精度を高めた濃淡画像処理方
式を提供するにある。
(Object of the Invention) The present invention has been made in view of the above points,
The purpose is to detect the mode value of the brightness of the surface of the object to be inspected that is obliquely illuminated with high accuracy by a simple calculation so that low-contrast defects that occur in the inspection area can be accurately identified. It is to provide a grayscale image processing method with improved accuracy.

(発明の開示) 本発明に係る濃淡画像処理方式にあっては、上記の目的
を達成するために、添付図面に示すように、被検査物2
の表面に対して斜方向から光を照射する光源1と、前記
光源1による照明下で被検査物2の濃淡画像を撮影する
テレビカメラ3とを設け、前記テレビカメラ3にて得ら
れた濃淡画像について検査領域を設定すると共に、該検
査領域内に光の照射方向とは直角な複数のラインb1〜bm
を設定し、光源1に一番近いラインb1についての光量の
モード値M(b1)を最大値、一番遠いラインbmについて
の光量のモード値M(bm)を最小値として検査領域内の
光量の傾きkを算出し、該光量の傾きkを用いて最大値
のラインb1と最小値のラインbmとの間に存在するライン
bjについての光量の推定モード値M(bj)を直接補間に
より求めて、各ラインの推定モード値M(bj)と検査領
域内に設定された各ドット(ai,bj)の光量Lとの差を
算出し、その差が所定のスライス値WSL,BSLを越えるド
ットの総数の大小により被検査物2の良否判定を行うこ
とを特徴とするものである。
DISCLOSURE OF THE INVENTION In the grayscale image processing method according to the present invention, in order to achieve the above object, as shown in the accompanying drawings, the inspection object 2
A light source 1 for irradiating light to the surface of the device from an oblique direction, and a television camera 3 for taking a grayscale image of the inspection object 2 under illumination by the light source 1 are provided, and the grayscale obtained by the television camera 3 is provided. An inspection area is set for an image, and a plurality of lines b 1 to b m perpendicular to the irradiation direction of light are set in the inspection area.
Is set, and the light quantity mode value M (b 1 ) for the line b 1 closest to the light source 1 is set to the maximum value, and the light quantity mode value M (b m ) for the farthest line b m is set to the minimum value. A line k existing between the maximum value line b 1 and the minimum value line b m is calculated by calculating the light amount inclination k in the region.
b j estimation mode values of the amounts of M to (b j) and determined by direct interpolation of the prediction mode values of each line M (b j) and each dot is set to the inspection area (a i, b j) It is characterized in that a difference from the light amount L is calculated, and the quality of the inspection object 2 is judged based on the size of the total number of dots whose difference exceeds a predetermined slice value WSL, BSL.

第1図は本発明の濃淡画像処理方式を用いた物体外観検
査装置の概略構成図である。光源1は、被検査物2をそ
の表面に対して斜方向から照明し、検査領域内に発生す
る低コントラストな欠陥を検出するための照明を行う。
テレビカメラ3は前記光源1による照明下で被検査物2
を撮影する。画像メモリー4はテレビカメラ1で画像化
しデジタル信号に変換した画像データを記憶するメモリ
ーである。CPU5は被検査物2の検査領域を設定したり、
被検査物の欠陥の認識や良否判断を行うものである。
FIG. 1 is a schematic configuration diagram of an object appearance inspection apparatus using a grayscale image processing system of the present invention. The light source 1 illuminates the object 2 to be inspected obliquely with respect to the surface thereof and performs illumination for detecting a low-contrast defect occurring in the inspection area.
The television camera 3 is provided with the inspection object 2 under the illumination of the light source 1.
To shoot. The image memory 4 is a memory for storing image data which is imaged by the television camera 1 and converted into a digital signal. The CPU5 sets the inspection area of the inspection object 2,
It is for recognizing defects of the object to be inspected and for judging quality.

以下、本実施例の動作について説明する。斜照明を行う
光源1とテレビカメラ3とを用いて被検査物2の濃淡画
像を撮影する。テレビカメラ3により得られたアナログ
信号よりなる濃淡画像をA/D変換して、デジタル化され
た画像データを画像メモリー4に記憶する。CPU5では、
この画像データに基づいて、検査領域内の欠陥の認識と
良否判定を下す。
The operation of this embodiment will be described below. A grayscale image of the inspection object 2 is captured using the light source 1 that performs oblique illumination and the television camera 3. A grayscale image composed of an analog signal obtained by the television camera 3 is A / D converted, and digitized image data is stored in the image memory 4. In CPU5,
Based on this image data, the defects in the inspection area are recognized and the quality is judged.

第2図(a)はテレビカメラ3により得られた濃淡画像
6に検査領域7を設定すると共に、検査領域7内に光量
測定のための複数のドットをある一定間隔で設定した様
子を示している。同図において、斜線を施した部分は低
コントラストな欠陥がある部分を示している。第2図
(b)は同図(a)に示す濃淡画像6におけるA−A′
線上の明るさの変化を示す図である。この図に示すよう
に、斜照明を行うことにより、A−A′線上の光量は傾
斜を持っている。
FIG. 2A shows a state in which the inspection area 7 is set in the grayscale image 6 obtained by the television camera 3 and a plurality of dots for measuring the light amount are set in the inspection area 7 at a certain fixed interval. There is. In the same figure, the shaded portion indicates a portion having a low contrast defect. FIG. 2B is AA ′ in the grayscale image 6 shown in FIG.
It is a figure which shows the change of the brightness on a line. As shown in this figure, by performing oblique illumination, the light quantity on the line AA ′ has an inclination.

第3図は、検査領域内に光を照射方向に垂直な方向に設
定されたラインb1〜bmを示している。光源から最も近い
ラインb1と最も遠いラインbmについて光量のモード値
(最頻値)を求め、それぞれをモード値の最大値M
(b1)及び最小値M(bm)とする。ここで、モード値と
は、被検査物2の検査領域内で光の照射方向に垂直に設
定されたラインbj上で、各ドット(ai,bj)の光量デー
タのうち、度数が最も多いデータを意味する。また、各
ドットの光量データとは検査領域内に設定されたドット
の存在する画素についての光量データを意味する。これ
らの最大値M(b1)と最小値M(bm)とから、検査領域
内でのモード値の変化率 を求める。さらに、第3図(b)に示すように、最大値
M(b1)と最小値M(bm)とを結ぶ補間直線上で、各ラ
インj(j=2,…,m−1)についての推定モード値 M(bj)=M(b1)−(j−1)・k を求める。
FIG. 3 shows lines b 1 to b m set in the inspection area in a direction perpendicular to the irradiation direction of light. The mode value (mode) of the light amount is calculated for the line b 1 closest to the light source and the line b m farthest from the light source, and the maximum mode value M
(B 1 ) and the minimum value M (b m ). Here, the mode value means the frequency of the light amount data of each dot (a i , b j ) on the line b j set perpendicularly to the light irradiation direction in the inspection area of the inspection object 2. It means the most data. In addition, the light amount data of each dot means the light amount data of a pixel having a dot set in the inspection area. From the maximum value M (b 1 ) and the minimum value M (b m ) of these, the rate of change of the mode value in the inspection region Ask for. Furthermore, as shown in FIG. 3 (b), the maximum value M (b 1) a minimum value M (b m) and interpolation straight line in connecting each line j (j = 2, ..., m-1) The estimated mode value of M (b j ) = M (b 1 ) − (j−1) · k is calculated.

第4図は1ライン上のドットの存在する位置での光量の
変化を表している。同図において、Lは座標(ai,bj
のドットの光量を示している。また、スライス値WSL,BS
Lは、先に求めたモード値M(bj)とライン上のドット
の光量との差が所定の巾を越えているか否かを調べるた
めの値である。明るい側のスライス値をWSL、暗い側の
スライス値をBSLとする。先に求めた各ラインの推定モ
ード値M(bj)を用いて各ドットの光量が、 (a) M(bj)よりも明るい場合には、 スライス値WSLよりも明るいドットの数 (b) M(bj)よりも暗い場合には、 スライス値BSLよりも暗いドットの数 をそれぞれ合計する。その総数の大小により良否判定を
行う。すなわち、推定モード値M(bj)からの光量差が
スライス値WSL又はBSLを越えるドットの総数が所定値よ
りも多い場合には、低コントラストの欠陥が存在してい
るということであり、被検査物は不良と判定される。
FIG. 4 shows a change in the light amount at a position where dots exist on one line. In the figure, L is a coordinate (a i , b j )
Shows the amount of light of each dot. In addition, slice values WSL, BS
L is a value for checking whether or not the difference between the previously obtained mode value M (b j ) and the light quantity of the dots on the line exceeds a predetermined width. The bright slice value is WSL, and the dark slice value is BSL. When the light amount of each dot is brighter than (a) M (b j ) using the estimated mode value M (b j ) of each line obtained earlier, the number of dots brighter than the slice value WSL (b ) When it is darker than M (b j ), sum the number of dots darker than the slice value BSL. A pass / fail judgment is made according to the total size. That is, if the total number of dots whose light amount difference from the estimated mode value M (b j ) exceeds the slice value WSL or BSL is larger than a predetermined value, it means that there is a defect of low contrast. The inspection item is determined to be defective.

(発明の効果) 本発明は上述のように、被検査物の表面に対して斜方向
から光を照射して、テレビカメラにより被検査物の濃淡
画像を撮影し、この濃淡画像について検査領域内での光
量の変化を推定して、その推定値と実際の光量とのずれ
が大きいドットの総数を求めるようにしたから、検査領
域内に発生する低コントラストな欠陥を正確に識別する
ことができ、欠陥検出の信頼性と精度を向上させること
ができるという効果がある。
(Effects of the Invention) As described above, the present invention irradiates the surface of an inspection object with light from an oblique direction, captures a gray-scale image of the inspection object by a television camera, and inspects this gray-scale image within the inspection area. By estimating the change in the light intensity at each point and calculating the total number of dots with a large deviation between the estimated value and the actual light amount, low-contrast defects that occur in the inspection area can be accurately identified. The effect is that the reliability and accuracy of defect detection can be improved.

また、検査領域内での光量の変化を推定するために、該
検査領域内に光の照射方向とは直角な複数のラインを設
定し、光源に一番近いラインについての光量のモード値
を最大値、一番遠いラインについての光量のモード値を
最小値として検査領域内の光量の傾きを算出しているの
で、斜照明を受ける被検査物の表面の光量分布の特性を
うまく利用して、検査領域内での光量の最大値や最小値
を計算する必要を無くすことができ、また、前記光量の
傾きを用いて最大値のラインと最小値のラインとの間に
存在するラインについての光量の推定モード値を直線補
間により求めるようにしたので、被検査物の表面を分割
して得られる複数の比較的広い領域内でモード値を一定
値とする従来技術に比べると、比較的簡単な計算で精度
良く検査領域内の光量のモード値を求めることができ、
したがって、斜照明を用いた場合における被検査物の外
観検査の精度を高めることができるという効果がある。
Further, in order to estimate the change of the light quantity in the inspection area, a plurality of lines perpendicular to the light irradiation direction are set in the inspection area, and the mode value of the light quantity of the line closest to the light source is set to the maximum. The value, the slope of the light amount in the inspection area is calculated with the mode value of the light amount for the farthest line as the minimum value, so by making good use of the characteristics of the light amount distribution on the surface of the object to be inspected that is obliquely illuminated, It is possible to eliminate the need to calculate the maximum value and the minimum value of the light amount in the inspection area, and use the slope of the light amount to calculate the light amount of the line existing between the maximum value line and the minimum value line. Since the estimated mode value of is calculated by linear interpolation, it is relatively simple as compared with the conventional technique in which the mode value is a constant value in a plurality of relatively wide areas obtained by dividing the surface of the inspection object. Accurately calculated in the inspection area It is possible to obtain the mode value of the quantity,
Therefore, there is an effect that the accuracy of the appearance inspection of the inspection object can be improved when the oblique illumination is used.

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

第1図は本発明の濃淡画像処理方式を用いた物体外観検
査装置の概略構成図、第2図(a)は同上に用いるテレ
ビカメラの撮影画面の一例を示す図、同図(b)は同上
の撮影画面におけるA−A′線上の明るさの変化を示す
図、第3図(a)(b)及び第4図は本発明の動作説明
図である。 1は光源、2は被検査物、3はテレビカメラである。
FIG. 1 is a schematic configuration diagram of an object appearance inspection apparatus using a grayscale image processing system of the present invention, FIG. 2 (a) is a diagram showing an example of a photographing screen of a television camera used in the same, and FIG. FIG. 3A, FIG. 3B, and FIG. 3 which show the change in brightness on the line AA ′ in the same photographing screen are operation explanatory diagrams of the present invention. Reference numeral 1 is a light source, 2 is an inspection object, and 3 is a television camera.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】被検査物の表面に対して斜方向から光を照
射する光源と、前記光源による照明下で被検査物の濃淡
画像を撮影するテレビカメラとを設け、前記テレビカメ
ラにて得られた濃淡画像について検査領域を設定すると
共に、該検査領域内に光の照射方向とは直角な複数のラ
インを設定し、光源に一番近いラインについての光量の
モード値を最大値、一番遠いラインについての光量のモ
ード値を最小値として検査領域内の光量の傾きを算出
し、該光量の傾きを用いて最大値のラインと最小値のラ
インとの間に存在するラインについての光量の推定モー
ド値を直線補間により求めて、各ラインの推定モード値
と検査領域内に設定された各ドットの光量との差を算出
し、その差が所定のスライス値を越えるドットの総数の
大小により被検査物の良否判定を行うことを特徴とする
濃淡画像処理方式。
1. A television camera provided with a light source for irradiating the surface of an object to be inspected with light obliquely, and a television camera for taking a grayscale image of the object to be inspected under illumination by the light source. An inspection area is set for the obtained grayscale image, and a plurality of lines perpendicular to the light irradiation direction are set in the inspection area, and the mode value of the light amount for the line closest to the light source is set to the maximum value, The slope of the light amount in the inspection area is calculated with the mode value of the light amount of the far line being the minimum value, and the slope of the light amount of the light amount of the line existing between the maximum value line and the minimum value line is used. Obtain the estimated mode value by linear interpolation, calculate the difference between the estimated mode value of each line and the light amount of each dot set in the inspection area, and the difference depends on the size of the total number of dots exceeding the predetermined slice value. Inspected Grayscale image processing method and performs quality determination.
JP62016890A 1987-01-27 1987-01-27 Gray image processing method Expired - Lifetime JPH0771285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62016890A JPH0771285B2 (en) 1987-01-27 1987-01-27 Gray image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62016890A JPH0771285B2 (en) 1987-01-27 1987-01-27 Gray image processing method

Publications (2)

Publication Number Publication Date
JPS63185182A JPS63185182A (en) 1988-07-30
JPH0771285B2 true JPH0771285B2 (en) 1995-07-31

Family

ID=11928758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62016890A Expired - Lifetime JPH0771285B2 (en) 1987-01-27 1987-01-27 Gray image processing method

Country Status (1)

Country Link
JP (1) JPH0771285B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4120007A1 (en) * 1991-06-18 1992-12-24 Basf Ag THERMOPLASTIC MOLDING MATERIALS BASED ON PARTICULAR COPOLYAMIDES AND POLYOLEFINS
JPH0576004A (en) * 1991-09-12 1993-03-26 Koji Eto Trigger signal generator and high speed video camera equipped with same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5788298U (en) * 1980-11-18 1982-05-31
JPS6051382A (en) * 1983-08-31 1985-03-22 Fanuc Ltd Window processing system of picture
JPH0772718B2 (en) * 1985-02-15 1995-08-02 株式会社日立製作所 Appearance inspection device

Also Published As

Publication number Publication date
JPS63185182A (en) 1988-07-30

Similar Documents

Publication Publication Date Title
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
JP2008267943A (en) Crack detecting method
JP3688520B2 (en) Surface inspection apparatus and surface inspection method
JP2541735B2 (en) Method and apparatus for diagnosing coating film deterioration
JP3071956B2 (en) Vickers hardness automatic reading device
JPH0771285B2 (en) Gray image processing method
JP2000003436A (en) Device and method for recognizing isar picture
JPH0380258B2 (en)
JP2000132684A (en) External appearance inspecting method
JP5157575B2 (en) Defect detection method
JP3078685B2 (en) Location recognition method
US6597805B1 (en) Visual inspection method for electronic device, visual inspecting apparatus for electronic device, and record medium for recording program which causes computer to perform visual inspecting method for electronic device
JP3260425B2 (en) Pattern edge line estimation method and pattern inspection device
JP2004170374A (en) Apparatus and method for detecting surface defect
JP2638121B2 (en) Surface defect inspection equipment
JP2001235319A (en) Shading correcting apparatus and shading correcting method, and surface inspection apparatus
JP3218875B2 (en) Three-dimensional object shape inspection device
JP2715897B2 (en) IC foreign matter inspection apparatus and method
JP2976796B2 (en) A method of determining the threshold of an area by image analysis
JP3043530B2 (en) Dot pattern inspection equipment
JPH08159712A (en) Pattern recognition method
JP3038092B2 (en) Appearance inspection method
JP3509581B2 (en) Appearance inspection method
JPH0645845Y2 (en) Automatic surface smoothness inspection device
JPH07280746A (en) Apparatus for extracting flaw from metal plate surface

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term