JPH03205540A - Defect detection method - Google Patents

Defect detection method

Info

Publication number
JPH03205540A
JPH03205540A JP133690A JP133690A JPH03205540A JP H03205540 A JPH03205540 A JP H03205540A JP 133690 A JP133690 A JP 133690A JP 133690 A JP133690 A JP 133690A JP H03205540 A JPH03205540 A JP H03205540A
Authority
JP
Japan
Prior art keywords
area
threshold value
defect detection
value
specific range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP133690A
Other languages
Japanese (ja)
Inventor
Jiyunshi Oohashi
大橋 惇志
Mitsuru Funahashi
舟橋 充
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.)
Kubota Corp
Original Assignee
Kubota Corp
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 Kubota Corp filed Critical Kubota Corp
Priority to JP133690A priority Critical patent/JPH03205540A/en
Publication of JPH03205540A publication Critical patent/JPH03205540A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To accurate detect a defect without being affected by variation in lighting state by varying a threshold value so that the area rate in an area wider than a defect detection area is within a specific range. CONSTITUTION:A moving base 3 is moved and stopped so that the visual field of a CCD camera 4 is positioned on the internal surface of the entrance part of a tube body 1 and an image of the entrance part internal surface irradiated by an irradiation device 5 is picked up by the camera 4 to send its video signal to an image processor 6. The window of the processor 6 is widened to the entire visual field of the camera and the threshold value is compared with a brightness value of each picture element to convert the picked-up image in the window into binary data. Then a control arithmetic unit 7 measures the area of a black display part and judges whether or not the area measured value is within the specific range; and the threshold value is increased or decreased until the specific range is entered, and when the measured value enters the specific range, a defect part is displayed with proper size.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は画像処理により被検査対象物の欠陥を検出する
欠陥検出方法に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a defect detection method for detecting defects in an object to be inspected by image processing.

従来の技術 近年では、管体などの被検査対象物の欠陥検出を画像処
理により行うことが生産ラインの検査部門などで実用化
されつつある。管体内面の欠陥検出を行う方法の一例と
しては、管体の内面に照明を照射しながら、CcDカメ
ラで撮像した画像を画像処理装置に出カし、この画像処
理装置により各画素の輝度値を、所定の値に固定された
閾値と比較して2値化し、上記闘値より輝度値が小さい
部分、すなわち、欠陥部分により生じる影の部分を欠陥
部として検出することが行われている。そして、画像処
理装置の欠陥検出の領域(ウィンドウ)内における欠陥
部の面積を計測腰この面積値により管体の良否を判断す
る。
2. Description of the Related Art In recent years, image processing has been put into practical use in inspection departments of production lines to detect defects in objects to be inspected, such as tubes. An example of a method for detecting defects on the inner surface of a tube is to output an image captured by a CCD camera to an image processing device while illuminating the inner surface of the tube, and then output the image taken by a CCD camera to an image processing device, which then calculates the brightness value of each pixel. is compared with a threshold value fixed to a predetermined value and binarized, and a portion whose brightness value is smaller than the threshold value, that is, a shadow portion caused by the defective portion, is detected as a defective portion. Then, the area of the defective portion within the defect detection area (window) of the image processing device is measured, and the quality of the tubular body is determined based on this area value.

発明が解決しようとする課題 しかしながら、上記従来の欠陥検出方法では周囲の明る
さの変化や照明の経年変化により、同じ欠陥であっても
2値化画像が異なるという問題があった。つまり、例え
ば照明状態が悪化する(暗くなる)と、同一欠陥であっ
ても影の部分が大きくなるため、2値化した際、欠陥部
の面積が広がり、管体の良否を判断する際に、誤まった
判断をするおそれがあった。
Problems to be Solved by the Invention However, the conventional defect detection method described above has a problem in that the binarized images of the same defect differ due to changes in ambient brightness or changes in illumination over time. In other words, for example, when the lighting condition worsens (darkens), the shadow area becomes larger even for the same defect, so when binarized, the area of the defect increases, making it difficult to judge whether the tube is good or bad. , there was a risk of making the wrong decision.

本発明は上記問題を解決するもので、周囲の明るさの変
化や照明の経年変化があっても、管体などの被検査対象
物の良否を誤って判断することのない欠陥検出方法を提
供することを目的とするものである。
The present invention solves the above problems, and provides a defect detection method that does not incorrectly judge the quality of an object to be inspected, such as a pipe, even if there are changes in ambient brightness or changes in lighting over time. The purpose is to

課題を解決するための手段 上記問題を解決するために本発明は、欠陥検出を行う前
に、欠陥検出領域より広い領域で2値化部分の各面積割
合を求め、この各面積割合が所定範囲内になるように閾
値を変化させて閾値を設定し、この閾値で欠陥検出領域
を2値化して欠陥検出を行うものである。
Means for Solving the Problems In order to solve the above problems, the present invention calculates each area ratio of the binarized portion in an area wider than the defect detection area before performing defect detection, and sets each area ratio within a predetermined range. The threshold value is set by changing the threshold value so that the value falls within the range of 0.1 to 1.0, and the defect detection area is binarized using this threshold value to perform defect detection.

作用 上記構成において、欠陥検出領域より広い領域で2値化
部分の各面積割合を求め、この各面積割合が所定範囲内
になるように閾値を変化させることにより、周囲の明る
さや照明が明るいときには閾値が高めに設定され、暗い
ときには閾値が低めに設定され、2値化画像において欠
陥部の面積は、周囲の明るさや照明の経年変化などに影
響されることなく適正に検出される。これにより被検査
対象物の良否を誤って判断することは防止される。
Effect In the above configuration, by calculating each area ratio of the binarized part in an area wider than the defect detection area and changing the threshold value so that each area ratio falls within a predetermined range, it is possible to The threshold value is set high, and when it is dark, the threshold value is set low, so that the area of the defective part in the binarized image is properly detected without being affected by surrounding brightness or secular changes in illumination. This prevents erroneously determining whether the object to be inspected is good or bad.

実施例 以下、本発明の一実施例を図面に基づいて説明する。Example Hereinafter, one embodiment of the present invention will be described based on the drawings.

まず、第1図により欠陥検出を行う設備について説明す
る。1は被検査対象物としての管体で、この管体1は複
数対の回転ローラ2により管軸心を中心として回転自在
に保持され、所定の回転ローラ2に取付けたモータ3に
より回転される。これらの回転ローラ2は管軸心に沿う
方向に移動自在の移動台3により支持され、図示しない
駆動装置により、管体1は移動台3とともに管軸心方向
に移動される。4および5は管体1の移動により管体1
内に挿出自在とされているCODカメラおよび照明装置
で、照明装置5の照射箇所がCODカメラ4のカメラ視
野となるように配置されている。CCDカメラ4には画
像処理装置6が接続され、CCDカメラ4の映像信号が
画像処理装置6に出力されるようになっている。画像処
理装置6は通信回線などを介してパーソナルコンピュー
タなどからなる制御演算装置7に接続され、データの受
け渡しが行われる。
First, equipment for detecting defects will be explained with reference to FIG. Reference numeral 1 designates a tube body as an object to be inspected. This tube body 1 is held rotatably around the tube axis by a plurality of pairs of rotating rollers 2, and is rotated by a motor 3 attached to a predetermined rotating roller 2. . These rotating rollers 2 are supported by a movable table 3 that is movable in the direction along the tube axis, and the tube body 1 is moved in the tube axis direction together with the movable table 3 by a drive device (not shown). 4 and 5 are the tube body 1 due to the movement of the tube body 1.
A COD camera and an illumination device that can be freely inserted into the COD camera are arranged so that the irradiation area of the illumination device 5 is in the field of view of the COD camera 4. An image processing device 6 is connected to the CCD camera 4, and a video signal from the CCD camera 4 is output to the image processing device 6. The image processing device 6 is connected to a control/arithmetic device 7, such as a personal computer, via a communication line or the like, and data is exchanged therewith.

次に、欠陥検出方法について第2図に示すフローチャー
トに従って説明する。
Next, the defect detection method will be explained according to the flowchart shown in FIG.

まず、ステップS1で、CCDカメラ4の視野が管体1
の入口部分内面に位置するように移動台3を移動・停止
させ、照明装置5により照射した管体1の入口部分内面
をCCDカメラ4で撮像する。CCDカメラ4の撮像画
像は映像信号として画像処理装置6に入力される。次に
、ステ・ンプS2において画像処理装置6のウインドウ
(表示領域)をカメラ視野X全体に広げ、この状態で、
ステップS3に示すように、ある初期設定された閾値と
各画素の輝度値とを比較し、上記ウインドウ内の撮像画
像を2値化(輝度値が閾値より小さい画素を黒色表示す
るとともに輝度値が閾値より大きい画素を白色表示)す
る。この際、管体1の周囲が明るい場合には、第3図(
a)に示すように、欠陥部aが小さ目に表示されるとと
もに照明されている箇所と照明外箇所との境界部分bは
カメラ視野Xの外周枠に接近した位置となるため、黒色
表示部分の割合が小さく表示される。また、同一箇所を
撮像した場合でも、周囲か暗かったり、照明が経年変化
により劣化していたりした際には、第3図(b)に示す
ように、欠陥部aが太き目に表示されるとともに境界部
分bはカメラ視野Xの外周枠から離れて中央側に寄った
位置となるため、黒色表示部分の割合が大きく表示され
る。ステップS4で制御演算装置7により黒色表示部分
の面積が計測される。ステップS5において、面積計測
値が予め設定された値の範囲内であるか否かを判断する
。この場合に、第3図(a)に示すように計測値が設定
範囲より小さい場合は、ステップS6からステップS7
に進んで、閾値を所定値分増加させて再度ステップS3
に戻り、また、第3図(b)に示すように計測値が設定
値範囲より大きい場合は、ステップS6からステップS
8に進んで、閾値を所定値分減少させて再度ステップS
3に戻る。そして計測値が設定範囲内になるまで閾値の
増減を繰り返す。これにより計測値か設定範囲内となる
と、2値化画像における境界部分bは第3図(C)に示
すような位置となり、欠陥部aは照明状態に影響される
ことなく、適正な大きさで表示される。その後は、ステ
ップS,でウインドを欠陥検出領域yまで小さくして非
照明部分がウインドウ内に無い状態とする。そして、ス
テップSIOで、欠陥検出作業を行う。つまり、管体1
を回転させかつ管軸心方向にも適宜移動させながら、C
CDカメラ4で管体1の内面を順次撮像し、画像処理装
置6により上記設定を行った閾値で2値化処理を行い、
欠陥部aの面積計測を行い、管体1の良否を判断する。
First, in step S1, the field of view of the CCD camera 4 is
The movable table 3 is moved and stopped so as to be positioned on the inner surface of the entrance portion of the tube body 1, and the CCD camera 4 images the inner surface of the entrance portion of the tube body 1 illuminated by the illumination device 5. The image captured by the CCD camera 4 is input to the image processing device 6 as a video signal. Next, in step S2, the window (display area) of the image processing device 6 is expanded to cover the entire camera field of view X, and in this state,
As shown in step S3, a certain initially set threshold value is compared with the brightness value of each pixel, and the captured image in the window is binarized (pixels whose brightness value is smaller than the threshold value are displayed in black, and the brightness value is Pixels larger than the threshold are displayed in white). At this time, if the surroundings of tube body 1 are bright, as shown in Fig. 3 (
As shown in a), the defect part a is displayed smaller and the boundary part b between the illuminated part and the non-illuminated part is located close to the outer frame of the camera field of view X, so that the black display part is The percentage is displayed small. In addition, even when the same location is imaged, if the surrounding area is dark or the lighting has deteriorated over time, the defect area a may appear thicker, as shown in Figure 3(b). At the same time, the boundary portion b is located away from the outer peripheral frame of the camera field of view X and closer to the center, so that a large proportion of the black display portion is displayed. In step S4, the area of the black display portion is measured by the control calculation device 7. In step S5, it is determined whether the area measurement value is within a preset value range. In this case, if the measured value is smaller than the set range as shown in FIG. 3(a), steps S6 to S7
Step S3 is performed again after increasing the threshold value by a predetermined value.
If the measured value is larger than the set value range as shown in FIG. 3(b), step S6 to step S
Proceed to Step 8, decrease the threshold by a predetermined value, and repeat Step S.
Return to 3. The threshold value is then increased or decreased repeatedly until the measured value falls within the set range. As a result, when the measured value falls within the set range, the boundary part b in the binarized image will be at the position shown in Figure 3 (C), and the defect part a will be at an appropriate size without being affected by the illumination condition. is displayed. Thereafter, in step S, the window is reduced to the defect detection area y so that no non-illuminated portion is within the window. Then, in step SIO, defect detection work is performed. In other words, tube body 1
While rotating and moving appropriately in the direction of the tube axis, C
The CD camera 4 sequentially images the inner surface of the tubular body 1, and the image processing device 6 performs binarization processing using the threshold set above.
The area of the defective portion a is measured to determine whether the tubular body 1 is good or bad.

これにより、照明状態の影響を受けることなく欠陥検出
作業を正確に行える。
This allows defect detection work to be performed accurately without being affected by lighting conditions.

なお、上述の閾値設定のためのCCDカメラ撮像位置は
人口部に限るものではなく、入口部から所定距離管体1
内に挿入した位置でもよい。また、被検査対象物として
管体1の場合を示したが、板材などにも適用できる。
Note that the CCD camera imaging position for setting the threshold value described above is not limited to the population area, but is located at a predetermined distance from the entrance area of the tube body 1.
It may be inserted inside. Further, although the case of the tube body 1 is shown as the object to be inspected, the present invention can also be applied to a plate material or the like.

発明の効果 以上のよう本発明によれば、欠陥検出を行う前に、欠陥
検出領域より広い領域で2値化部分の各面積割合を求め
、この各面積割合が所定範囲内になるように閾値を変化
させることにより、照明状態の変化に影響されることな
く欠陥の検出を正確に行うことができ、欠陥検査の信頼
性は向上する。
Effects of the Invention As described above, according to the present invention, before performing defect detection, each area ratio of the binarized portion is determined in an area wider than the defect detection area, and a threshold value is set so that each area ratio falls within a predetermined range. By changing , defects can be detected accurately without being affected by changes in illumination conditions, and the reliability of defect inspection is improved.

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

図面は本発明の一実施例に係るもので、第1図は欠陥検
出設備の概略斜視図、第2図は欠陥検出方法のフローチ
ャート、第3図(a)〜(C)はそれぞれ撮像画像を示
す図である。 1・・・管体(被検査対象物)、4・・・CCDカメラ
(撮像装置)、5・・・照明装置、6・・・画像処理装
置、7・・・制御演算装置、X・・カメラ視野、y・・
・欠陥検出領域。
The drawings relate to one embodiment of the present invention; FIG. 1 is a schematic perspective view of defect detection equipment, FIG. 2 is a flowchart of a defect detection method, and FIGS. 3(a) to (C) each show captured images. FIG. DESCRIPTION OF SYMBOLS 1... Tube body (object to be inspected), 4... CCD camera (imaging device), 5... Illumination device, 6... Image processing device, 7... Control calculation device, X... Camera field of view, y...
・Defect detection area.

Claims (1)

【特許請求の範囲】[Claims] 1、被検査対象物の表面に照明を照射し、撮像装置によ
り撮像した画像を画像処理装置に出力し、この画像処理
装置により各画素の輝度値を閾値と比較して2値化し、
上記閾値より輝度値が小さい箇所を欠陥部として検出す
る欠陥検出方法であって、欠陥検出を行う前に、欠陥検
出領域より広い領域で2値化部分の各面積割合を求め、
この各面積割合が所定範囲内になるように閾値を変化さ
せて閾値を設定し、この閾値で欠陥検出領域を2値化し
て欠陥検出を行う欠陥検出方法。
1. Illuminating the surface of the object to be inspected, outputting the image captured by the imaging device to an image processing device, which compares the brightness value of each pixel with a threshold value and binarizes it,
This is a defect detection method for detecting a location where the luminance value is smaller than the above threshold value as a defective part, and before performing defect detection, the area ratio of each binarized part is calculated in an area wider than the defect detection area,
A defect detection method in which a threshold value is set by changing the threshold value so that each area ratio falls within a predetermined range, and the defect detection area is binarized using the threshold value to perform defect detection.
JP133690A 1990-01-08 1990-01-08 Defect detection method Pending JPH03205540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP133690A JPH03205540A (en) 1990-01-08 1990-01-08 Defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP133690A JPH03205540A (en) 1990-01-08 1990-01-08 Defect detection method

Publications (1)

Publication Number Publication Date
JPH03205540A true JPH03205540A (en) 1991-09-09

Family

ID=11498659

Family Applications (1)

Application Number Title Priority Date Filing Date
JP133690A Pending JPH03205540A (en) 1990-01-08 1990-01-08 Defect detection method

Country Status (1)

Country Link
JP (1) JPH03205540A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0660265A3 (en) * 1993-11-16 1995-12-27 Fuji Electric Co Ltd Apparatus for testing an image of an object to be tested.
JP2002063575A (en) * 2000-08-17 2002-02-28 Japan Computer Science Corp Marine search method using image processing and computer-readable recording medium storing a search program
JP2002195960A (en) * 2000-12-27 2002-07-10 Shibuya Kogyo Co Ltd Ball inspection device and ball inspection method
JP2009025155A (en) * 2007-07-19 2009-02-05 Kubota Matsushitadenko Exterior Works Ltd Method of coating defect inspection

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0660265A3 (en) * 1993-11-16 1995-12-27 Fuji Electric Co Ltd Apparatus for testing an image of an object to be tested.
US5608815A (en) * 1993-11-16 1997-03-04 Fuji Electric Co., Ltd. Device for testing an image of a test object
JP2002063575A (en) * 2000-08-17 2002-02-28 Japan Computer Science Corp Marine search method using image processing and computer-readable recording medium storing a search program
JP2002195960A (en) * 2000-12-27 2002-07-10 Shibuya Kogyo Co Ltd Ball inspection device and ball inspection method
JP2009025155A (en) * 2007-07-19 2009-02-05 Kubota Matsushitadenko Exterior Works Ltd Method of coating defect inspection

Similar Documents

Publication Publication Date Title
CN110570411A (en) A method and device for detecting mura based on coefficient of variation
JPH04166751A (en) Method and apparatus for inspecting defect in bottle and the like
JP5509465B2 (en) Glass bottle inspection equipment
JPH03205540A (en) Defect detection method
JP4581424B2 (en) Appearance inspection method and image processing apparatus
JP3695120B2 (en) Defect inspection method
JP2004361085A (en) Appearance inspection device
JP2002008029A (en) Image inspection device
JPH01307645A (en) Inspecting method for sample
JP3433333B2 (en) Defect inspection method
JP3270336B2 (en) Image quality inspection apparatus for liquid crystal display and inspection method therefor
JP7362324B2 (en) Inspection method, manufacturing method and inspection device for image display device
JPH0735699A (en) Surface defect detection method and apparatus
JP2004286708A (en) Defect detection apparatus, method, and program
JP2001083474A (en) Inspection method of liquid crystal display panel
JP3841882B2 (en) Appearance inspection method and appearance inspection apparatus
JPS62249005A (en) Inspecting deice for abnormality of shape of object
JPH01307875A (en) Defect checking device for long-sized sheet
JP3755319B2 (en) Main subject detection device and apparatus using the same
JP3203607B2 (en) Screen defect detection device
JP3604974B2 (en) Screen inspection method
JPH10206344A (en) Optical nonuniformity inspecting device and optical nonuniformity inspecting method
JP2803388B2 (en) Parts inspection equipment
JPH04364446A (en) Defect inspecting apparatus
KR20240020463A (en) Apparatus for inspecting lead tip of electronic component