JP4765890B2 - Foreign object detection device - Google Patents

Foreign object detection device Download PDF

Info

Publication number
JP4765890B2
JP4765890B2 JP2006285128A JP2006285128A JP4765890B2 JP 4765890 B2 JP4765890 B2 JP 4765890B2 JP 2006285128 A JP2006285128 A JP 2006285128A JP 2006285128 A JP2006285128 A JP 2006285128A JP 4765890 B2 JP4765890 B2 JP 4765890B2
Authority
JP
Japan
Prior art keywords
image
foreign
foreign substance
foreign object
substance candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006285128A
Other languages
Japanese (ja)
Other versions
JP2008102027A (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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2006285128A priority Critical patent/JP4765890B2/en
Publication of JP2008102027A publication Critical patent/JP2008102027A/en
Application granted granted Critical
Publication of JP4765890B2 publication Critical patent/JP4765890B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Geophysics And Detection Of Objects (AREA)

Description

本発明は、異物検出装置及び異物検出方法に関するものであり、より詳しくは、被検査物である液体を撮影し、その撮影画像を解析して液体中の異物の有無を判定する異物検出装置及び異物検出方法に関する。   The present invention relates to a foreign object detection device and a foreign object detection method. More specifically, the present invention relates to a foreign object detection device that images a liquid that is an object to be inspected and analyzes the captured image to determine the presence or absence of foreign objects in the liquid. The present invention relates to a foreign object detection method.

従来より、液体中の異物混入度合いを調べるために、液体中に含まれる異物などの微粒子を測定する様々な装置及び方法が開発されている。そのような液体中の異物検出装置として使用されるものに、例えば、パーティクルカウンタがある。パーティクルカウンタでは、検査対象の液体を細い透明な管に流し、その管を外側からレーザ光などの照明光源で照射する。そして、管を挟んで照明光源と対峙するように配置された受光素子で照明光を受光する。もし、液体中に異物が混入していれば、その異物で照明光が遮られ、あるいは散乱して受光素子に到達する光量が減少するので、照明光の光量及びパルス数を測定することにより、液体中の微粒子の粒径及び粒子数を測定することができる。
しかし、パーティクルカウンタを用いて測定を行う場合、液体を通す管の直径を受光素子のサイズと同程度に細くする必要があるため、例えば60秒間に約20ml程度の液体しか流すことができない。そのため、測定対象の液体の量が多いと、測定時間が非常に長くなるという問題があった。また、液体中に気泡が含まれる場合、気泡でも照明光の散乱が発生するため、気泡を誤って異物と判定してしまうおそれがあった。
Conventionally, various apparatuses and methods for measuring fine particles such as foreign matters contained in a liquid have been developed in order to examine the degree of foreign matter contamination in the liquid. For example, a particle counter is used as such a foreign matter detection device in a liquid. In the particle counter, a liquid to be inspected is poured into a thin transparent tube, and the tube is irradiated from the outside with an illumination light source such as a laser beam. Then, the illumination light is received by a light receiving element arranged to face the illumination light source with the tube interposed therebetween. If foreign matter is mixed in the liquid, the illumination light is blocked or scattered by the foreign matter, and the amount of light reaching the light receiving element is reduced, so by measuring the amount of illumination light and the number of pulses, The particle size and the number of particles in the liquid can be measured.
However, when measuring using a particle counter, since the diameter of the tube through which the liquid passes needs to be made as thin as the size of the light receiving element, only about 20 ml of liquid can flow for 60 seconds, for example. Therefore, there is a problem that the measurement time becomes very long when the amount of the liquid to be measured is large. In addition, when bubbles are included in the liquid, scattering of illumination light occurs even in the bubbles, and there is a possibility that the bubbles are erroneously determined as foreign matters.

別の方法として、検査対象の液体をペーパーフィルタを通して一定期間流し、その後ペーパーフィルタを取り外して撮影することにより、ペーパーフィルタに付着した異物を検出する装置が使用されている。この装置では、フィルタの径を大きくすることにより、検査対象の液体を一度に大量に流せるため、パーティクルカウンタと比較して短時間で測定を行うことができるという利点がある。しかし、この装置では、測定を行う度にペーパーフィルタを取り換えなければならず、非常に煩雑な手間が必要であった。特に、複数の検査対象物を連続して検査するような製造プロセスの検査工程において、この装置を用いる場合、頻繁にペーパーフィルタを取り換えなければならず、非常に不便であった。   As another method, there is used an apparatus that detects a foreign substance attached to a paper filter by flowing a liquid to be inspected through a paper filter for a certain period of time and then taking a picture after removing the paper filter. In this apparatus, since the liquid to be inspected can be flowed in a large amount at a time by increasing the diameter of the filter, there is an advantage that measurement can be performed in a short time as compared with the particle counter. However, in this apparatus, the paper filter has to be replaced every time measurement is performed, and a very troublesome labor is required. In particular, when this apparatus is used in an inspection process of a manufacturing process in which a plurality of inspection objects are inspected continuously, the paper filter must be frequently replaced, which is very inconvenient.

一方、検査対象の液体を流す管の測定部に検査用窓を設け、その検査用窓に対して照明光を照射し、液体を透過した光又は液体で反射された光を受光して液体を撮像する撮像手段を備え、撮像手段により撮像された映像信号のレベルが急激に変化する部分を、検査対象物の基準レベルと比較することにより、異物をリアルタイムに検出する異物検査システムが開発されている(特許文献1参照)。この異物検査システムは、撮像手段にラインセンサ又はエリアセンサを用いるので、検査用窓の幅もパーティクルカウンタの測定部と比較して広くすることができる。そのため、測定時間も短くて済むという利点がある。さらに、ペーパーフィルタを用いる装置のように、測定の度に部品を交換する必要がなく、煩雑な手間を要しない。   On the other hand, an inspection window is provided in the measuring part of the tube through which the liquid to be inspected flows, and the inspection window is irradiated with illumination light, and the light transmitted through the liquid or the light reflected by the liquid is received to remove the liquid. A foreign substance inspection system has been developed that includes an imaging means for imaging and detects a foreign substance in real time by comparing a portion where the level of a video signal captured by the imaging means changes rapidly with a reference level of an inspection object. (See Patent Document 1). Since this foreign matter inspection system uses a line sensor or an area sensor as the image pickup means, the width of the inspection window can be made wider than that of the measurement unit of the particle counter. Therefore, there is an advantage that the measurement time can be shortened. Furthermore, unlike the apparatus using a paper filter, it is not necessary to replace parts every time measurement is performed, and complicated labor is not required.

しかし、検査システムに液体を投入するときなどにしばしば気泡が発生する。そして、気泡に照射された光は、異物と同様に散乱するため、気泡を含む液体を照明して撮像すると、気泡部分で映像信号が急激に低下する。そのため、特許文献1に記載された異物検査システムでは、パーティクルカウンタと同様に、測定対象の液体中に含まれる気泡を、異物と誤って検出してしまうおそれがあった。   However, bubbles are often generated, for example, when liquid is poured into the inspection system. Since the light applied to the bubbles is scattered in the same manner as the foreign matter, when the liquid containing the bubbles is illuminated and imaged, the video signal rapidly decreases at the bubble portion. For this reason, in the foreign matter inspection system described in Patent Document 1, there is a possibility that bubbles included in the liquid to be measured are erroneously detected as foreign matter, similarly to the particle counter.

そこで、測定の際に要する工数が少なく、短時間で測定することが可能で、且つ検査対象の液体中に気泡が含まれている場合であっても、異物と気泡を区別して、良好な精度で異物を検出することが可能な異物検出装置及び異物検出方法の開発が望まれている。   Therefore, the number of man-hours required for measurement is small, it is possible to measure in a short time, and even if bubbles are contained in the liquid to be inspected, it is possible to distinguish foreign substances from bubbles and have good accuracy. Development of a foreign object detection device and a foreign object detection method capable of detecting foreign objects with the use of the sensor is desired.

特許第3048049号公報Japanese Patent No. 3048049

上記の問題点に鑑み、本発明は、検査対象の液体中に気泡が含まれている場合であっても、異物と気泡を区別して、良好な精度で異物を検出することが可能な異物検出装置及び異物検出方法を提供することを目的とする。
また、本発明は、検査中に部品交換などの手間を要さず、短時間で検査可能な異物検出装置及び異物検出方法を提供することを目的とする。
In view of the above problems, the present invention can detect foreign objects with good accuracy by distinguishing foreign substances from bubbles even when bubbles are included in the liquid to be inspected. An object is to provide an apparatus and a foreign object detection method.
It is another object of the present invention to provide a foreign object detection device and a foreign object detection method that can be inspected in a short time without the need for parts replacement during the inspection.

本発明の請求項1に記載の形態によれば、本発明に係る異物検出装置は、検査対象の液体が流れる測定管(2)に設けられた外部から視認可能な透過部(24)を照明する光源部(3)の発光と同期して、透過部(24)を流れる液体を撮影した検査画像を取得する撮像部(4)と、所定の閾値で2値化することによって検査画像を高輝度領域と低輝度領域に区分し、低輝度領域を、異物候補領域として検出する異物候補領域検出手段(54)と、異物候補領域の円形度を表す特徴量を少なくとも一つ抽出する特徴量抽出手段(55)と、特徴量抽出手段(55)で抽出された少なくとも一つの特徴量が所定の条件を満たす場合、異物候補領域は、異物の像であると判定する判定手段(56)とを有することを特徴とする。
係る構成により、検査中に部品の交換などの手間を要さず、また測定管(2)をパーティクルカウンタのように細くする必要がないので、短時間で検査を行うことができる。また、気泡と異物を区別して認識することができるので、正確に異物を検出することができる。なお、高輝度領域とは、検査画像を取得する際、撮像部(4)で受光した光量が相対的に多い領域を表し、低輝度領域とは、撮像部(4)で受光した光量が相対的に少ない領域を表す。
また特徴量は、異物候補領域の辺縁近傍の輝度差を表す円周輝度差であり、特徴量抽出手段(55)は、異物候補領域の重心位置を求め、重心位置から異物候補領域の幅又は高さの1/2以下の所定距離に存在する複数の画素について、画素値の最大値と最小値の差を算出して円周輝度差とすることが好ましい。
According to the first aspect of the present invention, the foreign object detection device according to the present invention illuminates the transmission part (24) visible from the outside provided in the measurement tube (2) through which the liquid to be inspected flows. In synchronization with the light emission of the light source unit (3), the imaging unit (4) that acquires the inspection image obtained by photographing the liquid flowing through the transmission unit (24), and the inspection image is increased by binarizing with a predetermined threshold value A foreign substance candidate area detecting means (54) for detecting a low luminance area as a foreign substance candidate area by dividing into a luminance area and a low luminance area, and feature quantity extraction for extracting at least one feature quantity indicating the circularity of the foreign substance candidate area Means (55) and determination means (56) for determining that the foreign substance candidate region is a foreign object image when at least one feature quantity extracted by the feature quantity extraction means (55) satisfies a predetermined condition. It is characterized by having.
With such a configuration, it is not necessary to replace parts during inspection, and it is not necessary to make the measuring tube (2) as thin as a particle counter, so that inspection can be performed in a short time. Moreover, since it is possible to distinguish and recognize the bubbles and the foreign matters, the foreign matters can be accurately detected. Note that the high luminance region represents a region where the amount of light received by the imaging unit (4) is relatively large when acquiring the inspection image, and the low luminance region is a relative amount of light received by the imaging unit (4). Represents a small area.
The feature amount is a circumferential luminance difference representing the luminance difference near the edge of the foreign substance candidate region, and the feature amount extraction means (55) obtains the centroid position of the foreign substance candidate region, and the width of the foreign matter candidate region from the centroid position. Alternatively, it is preferable to calculate a difference between the maximum value and the minimum value of the pixel values for a plurality of pixels existing at a predetermined distance of ½ or less of the height to obtain a circumferential luminance difference.

また請求項2に記載のように、特徴量は、異物候補領域の対称性を表す対称度を含み、特徴量抽出手段(55)は、異物候補領域の垂直中心線及び水平中心線の位置を決定し、その垂直中心線を軸として異物候補領域を折り返して重ねたとしたときに異物候補領域同士が重ならない画素数と、水平中心線を軸として異物候補領域を折り返して重ねたとしたときに異物候補領域同士が重ならない画素数の合計を求めて、対称度とすることが好ましい。
称度又は円周輝度差を特徴量として用いることにより、異物又は気泡の像がほぼ真円の形状をしていても、検査画像上においてその大きさが数十画素程度しかないために、対応する異物候補領域がその像の形状を精密に再現できない場合であっても、円形と円形以外の形状とを識別可能な情報を与えることができる。そのため、検査画像の取得に用いる2次元検出器の画素数の増加及びデータ量の増加を抑制することができる。
According to a second aspect of the present invention, the feature amount includes a degree of symmetry representing the symmetry of the foreign substance candidate region, and the feature amount extraction means (55) determines the positions of the vertical center line and the horizontal center line of the foreign matter candidate region. When the foreign matter candidate areas are folded and overlapped with the vertical center line as the axis, the number of pixels where the foreign substance candidate areas do not overlap with each other, and when the foreign matter candidate area is folded and overlapped with the horizontal center line as the axis seeking total number of pixels the candidate region between do not overlap, it is not preferable to symmetry.
By using as a feature pairs Shodo or circumferential luminance difference, even if foreign matter or bubbles image of have a substantially perfect circle shape, because there are only several tens of pixels in size on the test image, Even when the corresponding foreign substance candidate region cannot accurately reproduce the shape of the image, information capable of discriminating between a circle and a shape other than a circle can be given. Therefore, an increase in the number of pixels and an increase in the data amount of the two-dimensional detector used for acquiring the inspection image can be suppressed.

さらに、請求項に記載のように、異物候補領域検出手段(54)は、検査画像の注目画素について、注目画素を含む小領域を設定し、小領域の代表信号値を求めて注目画素に対応する画素の値とすることにより、背景画像を作成し、背景画像と検査画像の差分画像を作成し、差分画像の平均画素値を算出し、平均画素値に基づいて所定の2値化閾値を算出することが好ましい。係る構成により、照明ムラによって検査画像の明るさが局所的に変化する場合でも、異物又は気泡の像以外の部分が誤って異物候補領域として検出されることを防止することができる。 Furthermore, as described in claim 3 , the foreign substance candidate region detection means (54) sets a small region including the target pixel for the target pixel of the inspection image, obtains a representative signal value of the small region, and sets it as the target pixel. By setting the value of the corresponding pixel, a background image is created, a difference image between the background image and the inspection image is created, an average pixel value of the difference image is calculated, and a predetermined binarization threshold is calculated based on the average pixel value Is preferably calculated. With such a configuration, even when the brightness of the inspection image locally changes due to illumination unevenness, it is possible to prevent a part other than a foreign substance or a bubble image from being erroneously detected as a foreign substance candidate area.

さらに、請求項に記載のように、特徴量抽出手段(55)は、少なくとも2種類の特徴量を抽出し、判定手段(56)は、抽出された特徴量の何れかが、各特徴量について予め定められた条件を満たす場合に、異物と判定することが好ましい。 Furthermore, as described in claim 4 , the feature quantity extraction means (55) extracts at least two types of feature quantities, and the determination means (56) determines which one of the extracted feature quantities is each feature quantity. It is preferable to determine as a foreign object when a predetermined condition is satisfied.

さらに、請求項に記載のように、光源部(3)の1回当たりの発光時間が、1回当たりの発光中に液体が移動する移動量が、検査画像において、検査画像の画素の大きさの1/2以下となる時間であることが好ましい。係る構成により、異物又は気泡の像を静止した状態で撮影することができるので、異物候補領域の形状を正確に反映した特徴量を抽出することができる。 Furthermore, as described in claim 5 , the amount of movement of the liquid during the light emission time per light emission of the light source unit (3) is the size of the pixel of the inspection image in the inspection image. It is preferable that the time is ½ or less. With such a configuration, since an image of a foreign object or a bubble can be taken in a stationary state, a feature amount that accurately reflects the shape of the foreign object candidate area can be extracted.

また、の形態によれば、本発明に係る異物検出方法が提供される。その異物検出方法は、検査対象物である液体を照明光源の発光と同期しつつ撮影して検査画像を取得するステップと、検査画像を所定の閾値で2値化した2値化画像を作成し、2値化画像の低輝度領域を、異物候補領域として検出するステップと、異物候補領域の円形度を表す特徴量を少なくとも一つ抽出するステップと、特徴量抽出手段で抽出された少なくとも一つの特徴量が所定の条件を満たす場合、異物候補領域は、異物の像であると判定するステップとを有することを特徴とする。 According to another aspect, a foreign object detection method according to the present invention is provided. The foreign matter detection method includes a step of obtaining an inspection image by photographing a liquid as an inspection object in synchronization with light emission of an illumination light source, and creating a binary image obtained by binarizing the inspection image with a predetermined threshold value. Detecting a low-intensity area of the binarized image as a foreign substance candidate area, extracting at least one feature quantity representing the circularity of the foreign substance candidate area, and at least one extracted by the feature quantity extraction means A step of determining that the foreign object candidate region is an image of a foreign object when the feature amount satisfies a predetermined condition.

なお、上記各手段に付した括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係を示す一例である。   In addition, the code | symbol in the parenthesis attached | subjected to each said means is an example which shows a corresponding relationship with the specific means as described in embodiment mentioned later.

以下、図面を参照しつつ本発明を適用した異物検出装置について詳細に説明する。
本発明を適用した異物検出装置は、一例として、ディーゼルポンプなど、エンジンに燃料を供給する部品の洗浄に用いた軽油などの洗浄液に含まれる、部品に付着した、あるいは部品から剥がれた金属(例えば、鉄、アルミニウム)の破片などの異物(長さ約50μm〜150μm)を検出するために用いられる。本発明を適用した異物検出装置は、その洗浄液を検査用の管に流し、その管を流れる洗浄液を撮影した検査画像を解析して、異物又は気泡の像である可能性のある異物候補領域を検出する。そして、検出された異物候補領域から気泡と異物とで異なる性質を有する傾向のある1以上の特徴量を求め、その特徴量が所定の条件を満たす場合に、異物候補領域に写っている像は異物のものであると判定する。
Hereinafter, a foreign object detection apparatus to which the present invention is applied will be described in detail with reference to the drawings.
As an example, a foreign object detection apparatus to which the present invention is applied includes a metal (for example, a diesel pump or the like) that is included in a cleaning liquid such as light oil used for cleaning a part that supplies fuel to an engine, or that is attached to or peeled off from a part (for example, , Iron, aluminum) and other foreign matters (length of about 50 μm to 150 μm). The foreign object detection apparatus to which the present invention is applied flows the cleaning liquid through an inspection tube, analyzes an inspection image obtained by photographing the cleaning liquid flowing through the tube, and determines a foreign object candidate region that may be an image of a foreign object or a bubble. To detect. Then, one or more feature amounts that tend to have different properties between the bubble and the foreign matter are obtained from the detected foreign matter candidate region, and when the feature amount satisfies a predetermined condition, an image shown in the foreign matter candidate region is It is determined that the object is a foreign object.

図1に、本発明を適用した異物検出装置1の概略構成図を示す。
本発明を適用した異物検査装置1は、上記の判定を行うために、測定管2、光源部3、撮像部4、及び処理部5を有する。
以下、異物検出装置1の各部について詳細に説明する。
FIG. 1 shows a schematic configuration diagram of a foreign object detection apparatus 1 to which the present invention is applied.
The foreign substance inspection apparatus 1 to which the present invention is applied includes a measurement tube 2, a light source unit 3, an imaging unit 4, and a processing unit 5 in order to perform the above determination.
Hereinafter, each part of the foreign material detection apparatus 1 will be described in detail.

測定管2は、洗浄液を一時的に貯留する貯留部21と、貯留部21の最下部に設けられた流出口に取り付けられ、その流出口を開閉する開閉弁22と、開閉弁22に接続され、貯留部21に貯留された洗浄液を流下させる管23とを有する。
貯留部21は、漏斗状に形成され、上方の開口部において、ワーク(ディーゼルポンプ)6を洗浄するために用いられた洗浄液を回収する。また、貯留部21の最下部に設けられた流出口は、開閉弁22により開閉可能となっている。そのため、貯留部21は、開閉弁22を閉じることにより、測定開始前に洗浄液を一時的に貯留して、回収時に発生した洗浄液中の気泡を減少させることができる。
The measuring tube 2 is attached to a storage part 21 for temporarily storing the cleaning liquid, an on-off valve 22 that opens and closes the out-flow outlet, and is connected to the on-off valve 22. And a pipe 23 for flowing down the cleaning liquid stored in the storage unit 21.
The storage unit 21 is formed in a funnel shape, and collects the cleaning liquid used for cleaning the workpiece (diesel pump) 6 in the upper opening. Further, the outlet provided at the lowermost portion of the storage unit 21 can be opened and closed by an on-off valve 22. Therefore, the storage unit 21 can temporarily store the cleaning liquid before the measurement is started by closing the on-off valve 22 to reduce bubbles in the cleaning liquid generated at the time of recovery.

開閉弁22は、処理部5によって開閉制御される。そして、洗浄液の回収時においては、処理部5から弁を閉じる制御信号を受け取って弁を閉じ、洗浄液を貯留部21に貯留させる。一方、測定開始時には処理部5から弁を開ける制御信号を受け取って弁を開け、貯留部21に貯留された洗浄液を管23に流下させる。なお、開閉弁22は、周知の開閉弁を用いて構成できるため、詳細な構成の説明は省略する。   The on-off valve 22 is controlled to open and close by the processing unit 5. When the cleaning liquid is collected, the control signal for closing the valve is received from the processing unit 5, the valve is closed, and the cleaning liquid is stored in the storage unit 21. On the other hand, at the start of measurement, a control signal for opening the valve is received from the processing unit 5, the valve is opened, and the cleaning liquid stored in the storage unit 21 flows down to the pipe 23. In addition, since the on-off valve 22 can be comprised using a known on-off valve, detailed description of a structure is abbreviate | omitted.

管23は、ガラス管、光学プラスチックなどで形成される。また管23の途中に、光源3から照明された照明光を管23を流下する洗浄液に照射し、洗浄液を透過した照明光を撮像部4で受光するための平面透過部24が設けられる。   The tube 23 is formed of a glass tube, optical plastic, or the like. Further, in the middle of the tube 23, a plane transmission unit 24 is provided for irradiating the illumination light illuminated from the light source 3 to the cleaning liquid flowing down the tube 23 and receiving the illumination light transmitted through the cleaning liquid by the imaging unit 4.

図2(a)は、平面透過部24の概略正面図であり、図2(b)は、図2(a)の矢視AA’による平面透過部24の概略断面図である。図2(a)及び(b)に示すように、平面透過部24において、管23は、光源部3と撮像部4を結ぶ直線と略直交する方向に広く、その直線と略平行な方向には薄く形成される。このような平面透過部24を設けることで、洗浄液を透過する照明光の光量低下を抑制することができるとともに、洗浄液中の異物や気泡が重なって撮影される可能性を低下させることができる。本実施形態では、平面透過部24において、管23の内径を、光源部3と撮像部4とを結ぶ直線に略直交する方向に対して14mm、その直線と略平行な方向に対して2mmとした。また、平面透過部24の略中心部には、撮像部4で撮影される検査対象領域25が設定される。本実施形態では、検査対象領域25を、幅8mm×高さ6mmの領域とした。   2A is a schematic front view of the flat transmission portion 24, and FIG. 2B is a schematic cross-sectional view of the flat transmission portion 24 taken along the arrow AA 'in FIG. 2A. As shown in FIGS. 2A and 2B, in the plane transmission part 24, the tube 23 is wide in a direction substantially orthogonal to a straight line connecting the light source part 3 and the imaging part 4, and in a direction substantially parallel to the straight line. Is formed thin. Providing such a plane transmission unit 24 can suppress a decrease in the amount of illumination light that passes through the cleaning liquid, and can also reduce the possibility that foreign objects and bubbles in the cleaning liquid will be photographed. In the present embodiment, in the plane transmission part 24, the inner diameter of the tube 23 is 14 mm with respect to a direction substantially orthogonal to the straight line connecting the light source part 3 and the imaging part 4, and 2 mm with respect to a direction substantially parallel to the straight line. did. In addition, an inspection target region 25 imaged by the imaging unit 4 is set at a substantially central portion of the plane transmission unit 24. In the present embodiment, the inspection target area 25 is an area having a width of 8 mm and a height of 6 mm.

光源部3は、管23を流下する洗浄液を連続的に撮影することが可能なように、一定の時間間隔で管23に設けられた平面透過部24に照明光を照射する。また、被写体となる洗浄液の流下によって、検査画像上で異物又は気泡の像がブレることがないように、光源部3は、1回当たりの発光は非常に短時間で、且つ強い光を照射することが好ましい。例えば、1回当たりの発光時間は、その発光時間中における洗浄液の移動量が、撮像部4によって撮影された検査画像において1/2画素以下となる期間に設定することが好ましい。そこで本実施形態では、光源部3をストロボライトで構成し、1回当たりの発光時間を3.5μ秒に設定した。   The light source unit 3 irradiates the plane transmission unit 24 provided on the tube 23 with illumination light at regular time intervals so that the cleaning liquid flowing down the tube 23 can be continuously photographed. In addition, the light source unit 3 emits intense light in a very short time so that the image of foreign matter or bubbles does not blur on the inspection image due to the flow of the cleaning liquid as the subject. It is preferable to do. For example, it is preferable that the light emission time per time is set to a period in which the moving amount of the cleaning liquid during the light emission time is ½ pixel or less in the inspection image photographed by the imaging unit 4. Therefore, in the present embodiment, the light source unit 3 is composed of a strobe light, and the light emission time per time is set to 3.5 μsec.

撮像部4は、処理部5から受信した制御信号に基づき、光源部3の発光と同期して、管23に設けられた平面透過部24上に設定された検査対象領域25を撮影し、検査画像を取得する。そのために、撮像部4は、CCD、C−MOSセンサなどの光電変換器で構成された2次元検出器と、その2次元検出器上に検査対象領域25の像を結像する結像光学系を有する。本実施形態では、2次元検出器として、1024×768画素のCCDセンサを用いた。撮影光学系は、検査対象領域25をCCD上に結像させ、CCDの1画素が検査対象領域25上の約8μm×約8μmを表すように構成した。また、撮像部4は、約80m秒に1回の割合で撮影を行うものとした。なお、検出器の画素数及び結像光学系の構成は上記に限られず、検出対象となる異物の像が、検査画像上で特徴量を適切に抽出できる大きさとなるように(例えば、検査画像上で平均的な異物の像の面積が数10画素程度となるように)、実施する形態に応じて最適化される。同様に、撮影間隔、撮影対象領域の大きさなども、実施する形態に応じて最適化される。   Based on the control signal received from the processing unit 5, the imaging unit 4 images the inspection target region 25 set on the flat transmission unit 24 provided on the tube 23 in synchronization with the light emission of the light source unit 3. Get an image. For this purpose, the imaging unit 4 includes a two-dimensional detector composed of a photoelectric converter such as a CCD or C-MOS sensor, and an imaging optical system that forms an image of the inspection target region 25 on the two-dimensional detector. Have In this embodiment, a CCD sensor having 1024 × 768 pixels is used as the two-dimensional detector. The imaging optical system was configured such that the inspection target area 25 was imaged on the CCD, and one pixel of the CCD represented about 8 μm × about 8 μm on the inspection target area 25. In addition, the imaging unit 4 performs imaging at a rate of about once every 80 milliseconds. Note that the number of pixels of the detector and the configuration of the imaging optical system are not limited to the above, and the size of the foreign object image to be detected is such that the feature amount can be appropriately extracted on the inspection image (for example, the inspection image The average size of the foreign object image is about several tens of pixels), and is optimized according to the embodiment to be implemented. Similarly, the shooting interval, the size of the shooting target area, and the like are also optimized according to the embodiment to be implemented.

取得された検査画像は、1画素あたり256階調(画素値0〜255)を有し、受光した光量が強いほど大きな画素値を有するものとした。なお、取得された検査画像は、逐次処理部5に送信される。   The acquired inspection image has 256 gradations (pixel value 0 to 255) per pixel, and has a larger pixel value as the amount of received light increases. The acquired inspection image is transmitted to the sequential processing unit 5.

処理部5は、撮像部4から取得した各検査画像に基づいて、異物の像の可能性のある異物候補領域を検出し、異物候補領域から複数の特徴量を抽出し、それら特徴量に基づいて所定の判定処理を行うことにより、異物の有無を判定する。   The processing unit 5 detects a foreign substance candidate region that may be an image of a foreign substance based on each inspection image acquired from the imaging unit 4, extracts a plurality of feature amounts from the foreign matter candidate region, and based on the feature amounts. The presence / absence of a foreign object is determined by performing a predetermined determination process.

図3に、処理部5の機能ブロック図を示す。処理部5は、記憶手段51、制御手段52、通信手段53、異物候補領域検出手段54、特徴量抽出手段55及び判定手段56を有し、例えば、パーソナルコンピュータ(PC)及びその周辺機器で構成される。
以下、処理部5の各部について詳細に説明する。
FIG. 3 shows a functional block diagram of the processing unit 5. The processing unit 5 includes a storage unit 51, a control unit 52, a communication unit 53, a foreign substance candidate region detection unit 54, a feature amount extraction unit 55, and a determination unit 56, and includes, for example, a personal computer (PC) and its peripheral devices. Is done.
Hereinafter, each part of the processing unit 5 will be described in detail.

記憶手段51は、ランダムアクセスメモリ(RAM)、又は磁気ディスク、光ディスク若しくはフラッシュメモリなどの不揮発性メモリで構成され、撮像部4から受信した検査画像を一時的に記憶する。また、記憶手段51は、処理部5の制御を行うプログラムなどを記憶する。   The storage unit 51 includes a random access memory (RAM) or a nonvolatile memory such as a magnetic disk, an optical disk, or a flash memory, and temporarily stores the inspection image received from the imaging unit 4. The storage unit 51 stores a program for controlling the processing unit 5 and the like.

制御手段52は、PCの中央演算装置(CPU)と、リードオンリーメモリ(ROM)、ランダムアクセスメモリ(RAM)などの半導体メモリなどで構成され、CPUに読み込まれたプログラムにしたがって動作し、測定管2、光源部3、撮像部4及び処理部5の各手段を制御する。さらに、通信手段53は、処理部5と、測定管2、光源部3及び撮像部4との間で制御信号及び画像データを送受信する入出力インタフェースであり、USB、SCSI、RS232C、イーサネット(登録商標)などの各種のI/Oポート及びそれらのドライバで構成される。そして、処理部5は、通信手段53を通じて撮像部4から各検査画像を受信する。一方、制御手段52で生成された制御信号は、通信手段53を通じて測定管2、光源部3及び撮像部4へ送信される。さらに、処理部5は、判定手段56で判定された異物の検出結果を通信手段53を通じて、判定結果などの表示を行う操作表示部(図示せず)や、外部の機器へ出力する。あるいは、検査画像上で異物の像と判定された異物候補領域の色を変えた画像を作成し、操作表示部に表示させるようにしてもよい。   The control means 52 is composed of a central processing unit (CPU) of a PC, a semiconductor memory such as a read only memory (ROM), a random access memory (RAM), etc., and operates according to a program read into the CPU. 2, each unit of the light source unit 3, the imaging unit 4, and the processing unit 5 is controlled. Further, the communication unit 53 is an input / output interface that transmits and receives control signals and image data between the processing unit 5, the measurement tube 2, the light source unit 3, and the imaging unit 4. USB, SCSI, RS232C, Ethernet (registration) (Trademark) and other various I / O ports and their drivers. Then, the processing unit 5 receives each inspection image from the imaging unit 4 through the communication unit 53. On the other hand, the control signal generated by the control unit 52 is transmitted to the measurement tube 2, the light source unit 3, and the imaging unit 4 through the communication unit 53. Further, the processing unit 5 outputs the detection result of the foreign matter determined by the determination unit 56 to an operation display unit (not shown) for displaying the determination result or the like or an external device through the communication unit 53. Or you may make it produce the image which changed the color of the foreign material candidate area | region determined with the image of the foreign material on the test | inspection image, and displays it on the operation display part.

異物候補領域検出手段54、特徴量抽出手段55及び判定手段56は、例えばCPU上で実行されるプログラムモジュールとして実装される。あるいは、異物候補領域検出手段54、特徴量抽出手段55及び判定手段56を、CPUと別個に設けられた画像処理用プロセッサなどを備えた専用処理ボードとして実装してもよい。   The foreign object candidate area detection unit 54, the feature amount extraction unit 55, and the determination unit 56 are implemented as program modules executed on the CPU, for example. Alternatively, the foreign object candidate area detection unit 54, the feature amount extraction unit 55, and the determination unit 56 may be mounted as a dedicated processing board including an image processing processor provided separately from the CPU.

異物候補領域検出手段54は、異物又は気泡の像を洗浄液のみが撮影されている領域から区別し、異物候補領域として検出する。
図4に、検査画像の概略図を示す。図4において、検査画像400中に含まれる微小な暗領域401及び402は、それぞれ異物の像及び気泡の像である。洗浄液中に異物又は気泡が存在すると、それらは、照明光を散乱又は吸収する。そのため、図4に示すように、検査画像400上では、異物の像401又は気泡の像402は、画素値が周囲と比較して低下する。そこで、異物候補領域検出手段54は、検査画像を2値化し、2値化によって大多数の画素と異なる値を有する画素値を有する画素の集合領域をラベリングすることにより、異物候補領域を検出する。
The foreign object candidate area detecting means 54 distinguishes the image of the foreign object or the bubble from the area where only the cleaning liquid is photographed, and detects it as a foreign object candidate area.
FIG. 4 shows a schematic diagram of the inspection image. In FIG. 4, minute dark regions 401 and 402 included in the inspection image 400 are a foreign object image and a bubble image, respectively. If foreign matter or bubbles are present in the cleaning liquid, they scatter or absorb the illumination light. Therefore, as shown in FIG. 4, on the inspection image 400, the pixel value of the foreign object image 401 or the bubble image 402 is lower than that of the surrounding area. Therefore, the foreign object candidate area detection unit 54 detects the foreign object candidate area by binarizing the inspection image and labeling a collection area of pixels having pixel values different from the majority of pixels by binarization. .

具体的に、異物候補領域検出手段54は、撮像部4から取得した各検査画像に対し、局所最大値フィルタ処理を行って、背景画像を求める。局所最大値フィルタ処理は、所定のサイズのマスクを、処理対象の画像に対して位置を順次移動させつつ、マスク内の最大値を、マスク中心に位置する画素の画素値として求めるものである。本実施形態では、異物の像401及び気泡の像402よりも大きい領域内で最大値を求め、確実に背景(洗浄液のみの部分)と像401及び402を区別するために、マスクのサイズを31×31画素とした。しかし、検出対象となる異物などの大きさに応じて、より大きなサイズあるいはより小さなサイズのマスクを用いてもよい。   Specifically, the foreign substance candidate region detection unit 54 performs a local maximum value filter process on each inspection image acquired from the imaging unit 4 to obtain a background image. The local maximum value filter process is to obtain the maximum value in the mask as the pixel value of the pixel located at the center of the mask while sequentially moving the position of the mask of a predetermined size with respect to the image to be processed. In the present embodiment, the maximum value is obtained in a region larger than the foreign object image 401 and the bubble image 402, and the mask size is set to 31 in order to reliably distinguish the background (only the cleaning liquid portion) from the images 401 and 402. X 31 pixels. However, a larger or smaller mask may be used depending on the size of a foreign object to be detected.

異物候補領域検出手段54は、背景画像を作成すると、背景画像の各画素から検査画像の対応する各画素の値を引くことにより、差分画像を求める。この差分画像では、照明光の輝度ムラによる画像の全体的な輝度差は相殺され、異物の像401又は気泡の像402など、検査画像上で局所的に低輝度となる画素値を有する領域のみが、差分画像上で大きな画素値を有することとなる。そこで、異物候補領域検出手段54は、差分画像の平均画素値を算出する。そして異物候補領域検出手段54は、算出した平均画素値を2値化閾値として、差分画像の2値化を行って2値化画像を作成する。2値化画像では、異物の像401又は気泡の像402に相当する領域のみ、画素値‘1’を有し、それ以外の画素は、画素値‘0’を有する。   When creating the background image, the foreign substance candidate area detecting unit 54 obtains a difference image by subtracting the value of each corresponding pixel of the inspection image from each pixel of the background image. In this difference image, the overall luminance difference of the image due to the luminance unevenness of the illumination light is canceled out, and only an area having a pixel value that is locally low on the inspection image, such as the foreign object image 401 or the bubble image 402. Will have a large pixel value on the difference image. Therefore, the foreign substance candidate area detection unit 54 calculates the average pixel value of the difference image. Then, the foreign object candidate area detecting unit 54 binarizes the difference image using the calculated average pixel value as a binarization threshold value, and creates a binarized image. In the binarized image, only the region corresponding to the foreign object image 401 or the bubble image 402 has the pixel value “1”, and the other pixels have the pixel value “0”.

異物候補領域検出手段54は、2値化画像を求めると、画素値‘1’の画素に対してラベリング処理を行う。そして、画素値‘1’を有する画素が所定数(例えば、10画素)以上連結した領域を、異物候補領域として検出する。なお、この所定数は、検出対象とする異物の大きさに応じて最適化される。異物候補領域検出手段54は、各異物候補領域を識別するために、異物候補領域ごとに異なるラベル番号Ln(=1,2,...,n)を付す。そして、2値化画像と同サイズのラベル画像を作成する。例えば、ラベル画像において、ラベル番号Lnが付された異物候補領域と対応する画素は、画素値Lnを有する。なお、ラベリング処理は周知の技術であるため、ここでは詳細な説明は省略する。   When obtaining the binarized image, the foreign substance candidate area detecting unit 54 performs a labeling process on the pixel having the pixel value “1”. Then, an area where a predetermined number (for example, 10 pixels) or more of pixels having the pixel value “1” are connected is detected as a foreign substance candidate area. The predetermined number is optimized according to the size of the foreign object to be detected. The foreign substance candidate area detecting means 54 attaches a different label number Ln (= 1, 2,..., N) to each foreign substance candidate area in order to identify each foreign substance candidate area. Then, a label image having the same size as the binarized image is created. For example, in a label image, a pixel corresponding to a foreign substance candidate region with a label number Ln has a pixel value Ln. Since the labeling process is a well-known technique, detailed description is omitted here.

なお、異物候補領域検出手段54は、差分画像の平均値以外の値を2値化閾値として用いてもよい。例えば、差分画像の画素値の累積ヒストグラムを計算し、所定の累積度数(例えば、50%)になった画素値を2値化閾値として用いてもよい。また、局所最大値フィルタ処理を行う代わりに、局所平均値又は局所中央値フィルタ処理を行って背景画像を求めてもよい。あるいは、照明光の輝度ムラが問題にならない程度であれば、直接検査画像から画素値の累積ヒストグラムを求め、所定の累積度数(例えば、5%)になった画素値を2値化閾値として用いてもよい。
またさらに、2値化画像をラベリングする前に、画素値‘1’を有する画素を対象としてモルフォロジーのクロージング演算を行って、不連続点の接続や穴埋め処理を行ってもよい。逆に、オープニング演算を行って、孤立点を除去してもよい。
Note that the foreign substance candidate region detection unit 54 may use a value other than the average value of the difference images as the binarization threshold value. For example, a cumulative histogram of pixel values of the difference image may be calculated, and a pixel value that has a predetermined cumulative frequency (for example, 50%) may be used as the binarization threshold. Further, instead of performing the local maximum value filter processing, a background image may be obtained by performing local average value or local median filter processing. Alternatively, if the luminance unevenness of the illumination light does not cause a problem, a cumulative histogram of pixel values is directly obtained from the inspection image, and a pixel value having a predetermined cumulative frequency (for example, 5%) is used as the binarization threshold value. May be.
Furthermore, before labeling the binarized image, discontinuity connection or hole filling processing may be performed by performing a morphological closing operation on a pixel having a pixel value “1”. Conversely, an open operation may be performed to remove isolated points.

作成された2値化画像、ラベル画像及び異物候補領域の個数(あるいは、ラベル番号Lnの最大値n)は、処理部5の他の手段で使用することができるように、制御手段52を構成するRAMなどのメモリ又は記憶手段51に一時的に記憶される。   The control unit 52 is configured so that the generated binarized image, the label image, and the number of foreign substance candidate regions (or the maximum value n of the label number Ln) can be used by other units of the processing unit 5. Is temporarily stored in a memory such as a RAM or storage means 51.

特徴量抽出手段55は、異物候補領域検出手段54で検出された異物候補領域に基づいて、異物と気泡とで異なる値を有する傾向のある特徴量を算出する。
図5(a)〜(f)に、検査画像における気泡の像と異物の像の例を示す。図5(a)及び(b)において、暗領域501及び502は、それぞれ気泡の像である。また、図5(c)〜(f)における各暗領域503〜506は、それぞれ異物の像である。図5(a)及び(b)に示されるように、気泡は、比較的整った球形をしているため、検査画像上での気泡の像は、相対的に円形に近い形状をしている。一方、異物は、ディーゼルポンプの内壁などから剥がれ落ちた金属片などが主なものと考えられる。そのため、図5(c)〜(f)に示されるように、異物の像は、比較的いびつな形状をしている。
そこで、本実施形態では、特徴量抽出手段55は、異物と気泡とで異なる値を有する傾向のあるものとして、異物候補領域の円形度を表す4種類の指標(フィレ径差、占有率、対称度、円周輝度差)を、特徴量として算出する。なお、それらの特徴量は、各異物候補領域ごとに算出されるが、特徴量抽出手段55は、各異物候補領域について同じ処理を行うため、以下の説明では、一つの異物候補領域からの特徴量抽出について説明する。
The feature quantity extraction unit 55 calculates a feature quantity that tends to have different values for the foreign substance and the bubble based on the foreign substance candidate area detected by the foreign substance candidate area detection unit 54.
FIGS. 5A to 5F show examples of a bubble image and a foreign object image in the inspection image. In FIGS. 5A and 5B, dark areas 501 and 502 are images of bubbles, respectively. In addition, the dark regions 503 to 506 in FIGS. 5C to 5F are images of foreign matters, respectively. As shown in FIGS. 5 (a) and 5 (b), since the bubbles have a relatively regular spherical shape, the image of the bubbles on the inspection image has a shape that is relatively close to a circle. . On the other hand, it is considered that the foreign matter is mainly a metal piece peeled off from the inner wall of the diesel pump. Therefore, as shown in FIGS. 5C to 5F, the image of the foreign material has a relatively irregular shape.
Therefore, in the present embodiment, the feature amount extraction unit 55 assumes that the foreign matter and the bubble tend to have different values, and represents four types of indicators (fillet diameter difference, occupancy rate, symmetry) that indicate the circularity of the foreign matter candidate region. Degree, circumferential luminance difference) is calculated as a feature amount. These feature amounts are calculated for each foreign substance candidate region. Since the feature amount extraction unit 55 performs the same process for each foreign matter candidate region, in the following description, the feature from one foreign matter candidate region is used. The amount extraction will be described.

図6に示すテーブル600を用いて、特徴量抽出手段55が抽出する各特徴量について説明する。
図6において、テーブル600の各列ごとに、一つの特徴について説明されている。また、テーブル600の各行については、上から順に、行601には、抽出する各特徴量の名称が示されている。そして、その下の行602に、各特徴量の説明が記載されている。その下の行603は、気泡の像について、各特徴量の値として想定される値の傾向を示し、最下段の行604は、異物の像について、各特徴量の値として想定される値の傾向を示す。ここで、各特徴量のうち、円周輝度差を除いては、異物候補領域検出手段54で求めた2値化画像あるいはラベル画像から抽出する。円周輝度差は、検査画像から抽出する。
Each feature amount extracted by the feature amount extraction unit 55 will be described using the table 600 shown in FIG.
In FIG. 6, one feature is described for each column of the table 600. For each row of the table 600, the name of each feature quantity to be extracted is shown in the row 601 from the top. A description of each feature amount is described in a row 602 below the row 602. The lower row 603 shows the tendency of the values assumed as the values of each feature amount for the bubble image, and the lowermost row 604 shows the values assumed as the values of the feature amounts for the foreign object image. Show the trend. Here, out of the feature amounts, the circumferential luminance difference is excluded from the binarized image or the label image obtained by the foreign substance candidate region detecting means 54. The circumferential luminance difference is extracted from the inspection image.

まず、フィレ径差Fdは、異物候補領域に外接する長方形の幅と高さの差として求められる。気泡の像は、ほぼ円形となるため、フィレ径差Fdはほぼ0となる。一方、異物の像は、いびつな形状となる可能性が高いため、フィレ径差Fdは0以外の値を取る可能性が高い。特徴量抽出手段55は、フィレ径差Fdを求めるために、2値化画像あるいはラベル画像において、対象となる異物候補領域について、左右上下の各端に位置する画素の座標を求める。そして、異物候補領域の外接長方形の幅を、その領域の右端画素の水平座標値と左端画素の水平座標値の差に基づいて算出する。同様に、異物候補領域の外接長方形の高さを、その領域の下端画素の垂直座標値と上端画素の垂直座標値の差に基づいて算出する。そして、算出した幅と高さの差を求め、フィレ径差Fdとする。   First, the fillet diameter difference Fd is obtained as a difference between the width and height of a rectangle circumscribing the foreign substance candidate region. Since the bubble image is substantially circular, the fillet diameter difference Fd is substantially zero. On the other hand, since the image of the foreign material is likely to be an irregular shape, the fillet diameter difference Fd is likely to take a value other than zero. In order to obtain the fillet diameter difference Fd, the feature amount extraction unit 55 obtains the coordinates of pixels located at the left, right, top, and bottom ends of the target foreign substance candidate region in the binarized image or the label image. Then, the width of the circumscribed rectangle of the foreign substance candidate region is calculated based on the difference between the horizontal coordinate value of the right end pixel and the left end pixel of the region. Similarly, the height of the circumscribed rectangle of the foreign substance candidate region is calculated based on the difference between the vertical coordinate value of the lower end pixel and the vertical coordinate value of the upper end pixel of the region. And the difference of the calculated width and height is calculated | required and it is set as fillet diameter difference Fd.

次に、占有率Prは、異物候補領域の外接長方形の面積に占める、異物候補領域の面積として表される。気泡の像は、ほぼ円形となるため、占有率Prは0.785程度となる。一方、異物の像は、いびつな形状となる可能性が高いため、占有率Prは0.785よりも小さな値を取る可能性が高い。特徴量抽出手段55は、占有率Prを求めるために、上記のフィレ径差Fdの算出に使用した外接長方形の幅と高さを乗じて、外接長方形の面積を算出する。また、特徴量抽出手段55は、2値化画像又はラベル画像の画素値を参照して、外接長方形中の異物候補領域に相当する画素数をカウントし、その合計を異物候補領域の面積とする。そして、特徴量抽出手段55は、異物候補領域の面積を、外接長方形の面積で除して、占有率Prを算出する。   Next, the occupation rate Pr is expressed as the area of the foreign substance candidate region in the area of the circumscribed rectangle of the foreign substance candidate region. Since the bubble image is substantially circular, the occupation rate Pr is about 0.785. On the other hand, since an image of a foreign object is likely to have an irregular shape, the occupation rate Pr is likely to take a value smaller than 0.785. The feature quantity extraction means 55 calculates the area of the circumscribed rectangle by multiplying the width and height of the circumscribed rectangle used for calculating the fillet diameter difference Fd in order to obtain the occupation rate Pr. Also, the feature amount extraction unit 55 refers to the pixel value of the binarized image or the label image, counts the number of pixels corresponding to the foreign substance candidate area in the circumscribed rectangle, and sets the total as the area of the foreign substance candidate area. . Then, the feature amount extraction unit 55 calculates the occupation rate Pr by dividing the area of the foreign substance candidate region by the area of the circumscribed rectangle.

また、対称度Sdは、異物候補領域をその垂直中心線又は水平中心線を軸として折り返したときに、一致しない画素数の総計として表される。気泡の像は、ほぼ円形となるため、垂直方向及び水平方向のどちらにも中心線対称となり、対象度Sdはほぼ0となる。一方、異物の像は、いびつな形状となる可能性が高いため、垂直方向又は水平方向の何れか又は両方について中心線対称とならず、対称度Sdは大きな値を取る可能性が高い。   The degree of symmetry Sd is expressed as the total number of pixels that do not match when the foreign object candidate region is folded around its vertical center line or horizontal center line. Since the image of the bubble is substantially circular, the center line is symmetric in both the vertical and horizontal directions, and the target degree Sd is almost zero. On the other hand, since the image of a foreign object is likely to have an irregular shape, it does not have center line symmetry in either the vertical direction or the horizontal direction or both, and the degree of symmetry Sd is likely to take a large value.

特徴量抽出手段55は、対称度Sdを求めるために、垂直中心線及び水平中心線の位置を求める。そこで、特徴量抽出手段55は、上記のフィレ径差Fdの算出の際に求めた異物候補領域の左右端画素のそれぞれの水平座標値の平均値を、垂直中心線の位置とする。同様に、異物候補領域の上下端画素のそれぞれの垂直座標値の平均値を、水平中心線の位置とする。あるいは、特徴量抽出手段55は、異物候補領域の左端あるいは右端から順に、異物候補領域に含まれる画素の数をカウントし、その合計が異物候補領域の面積の50%に到達したときの水平座標値を、垂直中心線の位置としてもよい。同様に、異物候補領域の上端あるいは下端から順に、異物候補領域に含まれる画素の数をカウントし、その合計が異物候補領域の面積の50%に到達したときの垂直座標値を、水平中心線の位置としてもよい。
垂直中心線が求まると、特徴量抽出手段55は、その垂直中心線を軸として、異物候補領域の右側半分を折り返して、異物候補領域の左側半分と重ねる。そして、重ね合わされた画素のうち、何れか一方のみが異物候補領域に含まれる画素の数をカウントする。同様に、特徴量抽出手段55は、水平中心線を軸として、異物候補領域の下側半分を折り返して、異物候補領域の上側半分と重ねる。そして、重ね合わされた画素のうち、何れか一方のみが異物候補領域に含まれる画素の数をさらにカウントし、その画素の合計を算出する。そして、その合計を対象度Sdとする。
The feature quantity extraction unit 55 obtains the positions of the vertical center line and the horizontal center line in order to obtain the degree of symmetry Sd. Therefore, the feature amount extraction unit 55 sets the average value of the horizontal coordinate values of the left and right end pixels of the foreign substance candidate region obtained when calculating the fillet diameter difference Fd as the position of the vertical center line. Similarly, the average value of the vertical coordinate values of the upper and lower end pixels of the foreign substance candidate area is set as the position of the horizontal center line. Alternatively, the feature amount extraction unit 55 counts the number of pixels included in the foreign substance candidate area in order from the left end or the right end of the foreign substance candidate area, and the horizontal coordinates when the total reaches 50% of the area of the foreign substance candidate area. The value may be the position of the vertical center line. Similarly, in order from the top or bottom of the foreign substance candidate area, the number of pixels included in the foreign substance candidate area is counted, and the vertical coordinate value when the total reaches 50% of the area of the foreign substance candidate area is expressed as the horizontal center line. It is good also as a position.
When the vertical center line is obtained, the feature amount extraction unit 55 folds the right half of the foreign substance candidate area around the vertical center line and overlaps the left half of the foreign substance candidate area. Then, only one of the superimposed pixels counts the number of pixels included in the foreign substance candidate area. Similarly, the feature quantity extraction unit 55 folds the lower half of the foreign substance candidate area around the horizontal center line and overlaps the upper half of the foreign substance candidate area. Then, the number of pixels in which only one of the superimposed pixels is included in the foreign substance candidate region is further counted, and the total of the pixels is calculated. The total is set as the target degree Sd.

最後に、円周輝度差Cbは、異物候補領域の中心から等距離、等間隔の8点において、対応する検査画像の画素値の最大値と最小値の差として表される。気泡は、ほぼ球形となるため、その像において中心からの距離が等しい位置の画素値はほぼ等しいと考えられるため、円周輝度差Cbはほぼ0となる。一方、異物の像は、いびつな形状となる可能性が高いため、円周輝度差Cbは比較的大きな値を取る可能性が高い。特徴量抽出手段55は、円周輝度差Cbを求めるために、まず、2値化画像あるいはラベル画像に基づいて、異物候補領域の重心位置を求める。そして、求められた重心位置を、異物候補領域の中心とする。そして、特徴量抽出手段55は、異物候補領域の中心と対応する検査画像の画素から、上下左右の4方向、及び左上から右下、右上から左下へのそれぞれ斜め45°の4方向に、フィレ径差Fdの算出の際に求めた外接長方形の幅の半分だけ離れた計8画素の位置を特定する。そして、特徴量抽出手段55は、特定した8画素の画素値のうち、最大値と最小値を求め、その差を円周輝度差Cbとする。   Finally, the circumferential luminance difference Cb is expressed as the difference between the maximum value and the minimum value of the corresponding inspection image pixel values at eight points that are equidistant and equally spaced from the center of the foreign substance candidate region. Since the bubbles are almost spherical, the pixel values at the same distance from the center in the image are considered to be almost equal, so the circumferential luminance difference Cb is almost zero. On the other hand, since the image of a foreign object is likely to have an irregular shape, the circumferential luminance difference Cb is likely to take a relatively large value. In order to obtain the circumferential luminance difference Cb, the feature amount extraction unit 55 first obtains the gravity center position of the foreign substance candidate region based on the binarized image or the label image. Then, the obtained barycentric position is set as the center of the foreign substance candidate region. The feature amount extraction unit 55 then fills the fillet in four directions of up and down, left and right, and four directions of 45 ° obliquely from the upper left to the lower right and from the upper right to the lower left from the pixel of the inspection image corresponding to the center of the foreign substance candidate region. The positions of a total of 8 pixels that are separated by half the width of the circumscribed rectangle obtained when calculating the diameter difference Fd are specified. Then, the feature amount extraction unit 55 obtains the maximum value and the minimum value among the specified pixel values of the eight pixels, and sets the difference as the circumferential luminance difference Cb.

なお、上記の例では、円周輝度差Cbを求めるために8点の画素値を調べたが、調べる画素の数は8点に限定されない。例えば、異物候補領域の面積が比較的小さい場合(例えば、30画素以下)には、異物候補領域の中心から上下左右方向に等距離だけ離れた4点の画素値に基づいて、円周輝度差Cbを求めるようにしてもよい。逆に、異物候補領域の面積が比較的大きい場合(例えば、100画素以上)には、調べる画素数を8点よりも多くしてもよい。また、異物候補領域の中心からの距離も、外接長方形の幅の半分に限定されず、外接長方形の高さの半分の値を用いてもよく、あるいは、外接長方形の幅又は高さの何れか小さい方の半分の値を用いてもよい。さらに、外接長方形の幅又は高さの半分よりも、小さな値としてもよい。   In the above example, the pixel values of eight points are examined in order to obtain the circumferential luminance difference Cb, but the number of pixels to be examined is not limited to eight. For example, when the area of the foreign substance candidate area is relatively small (for example, 30 pixels or less), the circumferential luminance difference is based on the pixel values of four points that are equidistant from the center of the foreign substance candidate area in the vertical and horizontal directions. Cb may be obtained. Conversely, when the area of the foreign substance candidate region is relatively large (for example, 100 pixels or more), the number of pixels to be examined may be increased from 8 points. In addition, the distance from the center of the foreign object candidate region is not limited to half the width of the circumscribed rectangle, and may be half the height of the circumscribed rectangle, or may be either the width or the height of the circumscribed rectangle. The smaller half value may be used. Further, the value may be smaller than half of the width or height of the circumscribed rectangle.

これらの特徴量は、異物又は気泡の像がほぼ真円の形状をしていても、検査画像上においてその大きさが数十画素程度しかないために、対応する異物候補領域がその像の形状を精密に再現できない場合であっても、円形と円形以外の形状とを識別可能な情報を与えることができる。そのため、検査画像の取得に用いる2次元検出器の画素数の増加及びデータ量の増加を抑制することができる。   Even if the image of a foreign object or bubble has a substantially circular shape, these feature quantities are only about several tens of pixels on the inspection image, so the corresponding foreign object candidate region has the shape of the image. Even when it is not possible to accurately reproduce, it is possible to give information that can distinguish between a circle and a shape other than a circle. Therefore, an increase in the number of pixels and an increase in the data amount of the two-dimensional detector used for acquiring the inspection image can be suppressed.

特徴量抽出手段55は、各異物候補領域について求めた4種類の特徴量を、対応する異物候補領域に関連付けて、制御手段52を構成するRAMなどのメモリ又は記憶手段51に一時的に記憶する。この関連付けは、例えば、各特徴量Fd、Pr、Sd、Cbと、各異物候補領域に付けられたラベル番号Ln(=1,2,...,n)を要素とする5次元の特徴量ベクトルvf=(Ln,Fd,Pr,Sd,Cb)を生成し、特徴量ベクトル単位で記憶することにより行われる。   The feature quantity extraction unit 55 temporarily stores the four types of feature quantities obtained for each foreign substance candidate area in association with the corresponding foreign substance candidate area in a memory such as a RAM constituting the control unit 52 or the storage unit 51. . This association is, for example, a five-dimensional feature amount having each feature amount Fd, Pr, Sd, Cb and a label number Ln (= 1, 2,..., N) attached to each foreign substance candidate region as an element. A vector vf = (Ln, Fd, Pr, Sd, Cb) is generated and stored in units of feature vectors.

判定手段56は、特徴量抽出手段55で求めた各特徴量に基づいて、それぞれの異物候補領域ごとに、異物の像か気泡の像かを判定する。以下、フローチャートを用いて、具体的な手順を説明する。   Based on the feature amounts obtained by the feature amount extraction unit 55, the determination unit 56 determines whether the image is a foreign object image or a bubble image for each foreign object candidate region. Hereinafter, a specific procedure will be described with reference to a flowchart.

図7は、各異物候補領域が、異物の像か気泡の像かを識別するための判定手順を示すフローチャートである。まず、判定手段56は、識別対象となる異物候補領域について、その異物候補領域のラベル番号Ln(=1,2,...,n)を有する特徴量ベクトルvfを検索し、読み出す(ステップS101)。   FIG. 7 is a flowchart showing a determination procedure for identifying whether each foreign substance candidate region is an image of a foreign object or an image of a bubble. First, the determination unit 56 searches for and reads out the feature vector vf having the label number Ln (= 1, 2,..., N) of the foreign substance candidate area to be identified (step S101). ).

次に、判定手段56は、占有率Prが、所定の範囲内に含まれるか否かを判定する(ステップS102)。本実施形態では、所定の範囲を、0.67<Pr<0.91とした。そして、所定の範囲から外れる場合、判定手段56は、その異物候補領域は異物の像であると判定する。そして、判定手段56は、その異物候補領域を表すラベル番号Lnと関連付けて、異物の像であることを表す判定結果R(=1)をRAMなどの制御手段52を構成するメモリ又は記憶手段51に一時的に記憶する(ステップS106)。一方、所定の範囲内であれば、判定手段56は、フィレ径差Fdを第1の閾値Th1と比較する(ステップS103)。本実施形態では、第1の閾値Th1を1とした。そして、フィレ径差Fdが第1の閾値Th1よりも大きい場合、判定手段56は、その異物候補領域は異物の像であると判定する(ステップS106)。   Next, the determination unit 56 determines whether or not the occupation rate Pr is included in a predetermined range (step S102). In the present embodiment, the predetermined range is set to 0.67 <Pr <0.91. And when it remove | deviates from the predetermined range, the determination means 56 determines with the foreign material candidate area | region being an image of a foreign material. Then, the determination unit 56 associates the determination result R (= 1) representing the image of the foreign object with the label number Ln representing the foreign object candidate area, or the memory or storage unit 51 constituting the control unit 52 such as a RAM. Is temporarily stored (step S106). On the other hand, if it is within the predetermined range, the determination means 56 compares the fillet diameter difference Fd with the first threshold Th1 (step S103). In the present embodiment, the first threshold Th1 is set to 1. When the fillet diameter difference Fd is larger than the first threshold Th1, the determination unit 56 determines that the foreign substance candidate region is a foreign object image (step S106).

ステップS103において、フィレ径差Fdが第1の閾値Th1以下の場合、判定手段56は、(対称度Sd−異物候補領域の面積Sの5%)を、第2の閾値Th2と比較する(ステップS104)。本実施形態では、第2の閾値Th2を10.6とした。そして、(対称度Sd−異物候補領域の面積Sの5%)が第2の閾値Th2よりも大きい場合、判定手段56は、その異物候補領域は異物の像であると判定する(ステップS106)。一方、ステップS104において、(対称度Sd−異物候補領域の面積Sの5%)が第2の閾値Th2以下の場合、円周輝度差Cbを第3の閾値Th3と比較する(ステップS105)。本実施形態では、第3の閾値Th3を20とした。そして、円周輝度差Cbが第3の閾値Th3よりも大きい場合、判定手段56は、その異物候補領域は異物の像であると判定する(ステップS106)。一方、ステップS105において、円周輝度差Cbが第3の閾値Th3以下の場合、判定手段56は、その異物候補領域は、気泡の像であると判定する。そして、判定手段56は、その異物候補領域と関連付けて、気泡の像であることを表す判定結果R(=0)をRAMなどの制御手段52を構成するメモリ又は記憶手段51に一時的に記憶する(ステップS107)。   When the fillet diameter difference Fd is equal to or smaller than the first threshold Th1 in step S103, the determination unit 56 compares (symmetry Sd−5% of the foreign substance candidate region area S) with the second threshold Th2 (step S103). S104). In the present embodiment, the second threshold Th2 is 10.6. If (symmetry Sd−5% of the area S of the foreign object candidate area) is larger than the second threshold Th2, the determination unit 56 determines that the foreign object candidate area is an image of a foreign object (step S106). . On the other hand, when (Symmetry Sd−5% of the foreign substance candidate region area S) is equal to or smaller than the second threshold Th2 in Step S104, the circumferential luminance difference Cb is compared with the third threshold Th3 (Step S105). In the present embodiment, the third threshold Th3 is set to 20. When the circumferential luminance difference Cb is larger than the third threshold Th3, the determination unit 56 determines that the foreign object candidate area is a foreign object image (step S106). On the other hand, when the circumferential luminance difference Cb is equal to or smaller than the third threshold Th3 in step S105, the determination unit 56 determines that the foreign substance candidate region is an image of a bubble. Then, the determination unit 56 temporarily stores the determination result R (= 0) indicating that it is an image of a bubble in association with the foreign object candidate region in the memory or the storage unit 51 constituting the control unit 52 such as a RAM. (Step S107).

なお、各特徴量に対する判定を行う順番は、上記の順番に限られず、任意に入れ替えてもよい。また、各閾値及び所定の範囲は、上記の値に限られず、検出しようとする異物の性質、想定される大きさに応じて最適化される。   Note that the order of determination for each feature amount is not limited to the above order, and may be arbitrarily changed. Each threshold value and the predetermined range are not limited to the above values, and are optimized according to the nature of the foreign substance to be detected and the assumed size.

判定手段56は、全ての異物候補領域について、異物の像か気泡の像かを判定すると、その検査画像に含まれる異物の総数を算出して、通信手段53を通じて図示しない操作表示部へ送信し、ユーザにその検出結果を報知する。   When the determination unit 56 determines whether the image is a foreign object image or a bubble image for all the foreign object candidate areas, the determination unit 56 calculates the total number of foreign objects included in the inspection image and transmits the calculated total number of foreign objects to the operation display unit (not shown) through the communication unit 53. The user is notified of the detection result.

図8を参照しつつ、本発明を適用した異物検出装置1の動作について説明する。なお、異物検出装置1の動作は、処理部5の制御手段52によって制御される。   The operation of the foreign object detection device 1 to which the present invention is applied will be described with reference to FIG. The operation of the foreign object detection device 1 is controlled by the control means 52 of the processing unit 5.

図8に示すように、検査が開始されると、処理部5の制御手段52は、測定管2の開閉弁22に対して弁を開くよう制御信号を送信する。そして、貯留部21に貯留された洗浄液の流下を開始させる(ステップS201)。また、測定開始からの経過時間の計時を開始する。洗浄液の流下が開始されると、光源部3の発光と同期して撮像部4は撮影を行い、検査画像を取得する(ステップS202)。そして、検査画像を処理部5へ送信する。   As shown in FIG. 8, when the inspection is started, the control means 52 of the processing unit 5 transmits a control signal to open the valve to the on-off valve 22 of the measuring tube 2. Then, the flow of the cleaning liquid stored in the storage unit 21 is started (step S201). In addition, the elapsed time from the start of measurement is started. When the flow of the cleaning liquid is started, the imaging unit 4 performs imaging in synchronization with the light emission of the light source unit 3 and acquires an inspection image (step S202). Then, the inspection image is transmitted to the processing unit 5.

処理部5は、通信手段53を通じて検査画像を受信すると、異物候補領域検出手段54において、異物候補領域を検出する(ステップS203)。そして、異物候補領域を表す2値化画像及びラベル画像を作成する。なお、異物候補領域の検出については、上述したとおりである。   When the processing unit 5 receives the inspection image through the communication unit 53, the foreign substance candidate region detection unit 54 detects the foreign substance candidate region (step S203). Then, a binarized image and a label image representing the foreign object candidate area are created. The detection of the foreign object candidate area is as described above.

次に、処理部5の特徴量抽出手段55は、異物の像か気泡の像かの判定対象となる異物候補領域として、ラベル番号Ln(=1,2,...,n)が付された異物候補領域を選択する(ステップS204)。なお、1回目の選択では、Ln=1とする。そして、対象となる異物候補領域から、上記のフィレ径差Fd、占有率Pr、対称度Sd、円周輝度差Cbの4種類の特徴量を抽出する(ステップS205)。なお、各特徴量の抽出方法については、上述した通りである。各特徴量を抽出すると、処理部5の判定手段56は、図7に示したフローに従って、その異物候補領域が、異物の像か気泡の像かを判定し、その判定結果を対象となった異物候補領域と関連付けて記憶する(ステップS206)。   Next, the feature quantity extraction means 55 of the processing unit 5 is assigned a label number Ln (= 1, 2,..., N) as a foreign object candidate area to be determined as a foreign object image or a bubble image. A foreign object candidate area is selected (step S204). In the first selection, Ln = 1. Then, four types of feature quantities, ie, the fillet diameter difference Fd, the occupation ratio Pr, the symmetry degree Sd, and the circumferential luminance difference Cb are extracted from the target foreign substance candidate region (step S205). Note that the feature amount extraction method is as described above. When each feature amount is extracted, the determination unit 56 of the processing unit 5 determines whether the foreign object candidate area is a foreign object image or a bubble image according to the flow shown in FIG. It is stored in association with the foreign object candidate area (step S206).

その後、処理部5の特徴量抽出手段55は、Ln=n(ただしnは、異物候補領域の個数)となったか否か、すなわち、全ての異物候補領域について異物か気泡かの判定処理が終わったか否かを判定する(ステップS207)。そして、特徴量の抽出を終えていない異物候補領域が残っている場合は、Lnを1インクリメントして(ステップS208)、制御をステップS204の前に戻す。そして、ステップS204〜S208の処理を繰り返す。   Thereafter, the feature quantity extraction means 55 of the processing unit 5 finishes the determination process as to whether or not Ln = n (where n is the number of foreign substance candidate areas), that is, whether all foreign substance candidate areas are foreign matters or bubbles. It is determined whether or not (step S207). If there is a foreign substance candidate area for which feature quantity extraction has not been completed, Ln is incremented by 1 (step S208), and control is returned to step S204. Then, the processes in steps S204 to S208 are repeated.

一方、ステップS207において、全ての異物候補領域について、特徴量の抽出が終了している場合、処理部5の制御手段52は、測定開始から所定時間を経過したか否かを判定する(ステップS209)。そして、所定時間を経過していなければ、制御をステップS202の前に戻し、ステップS202〜S209の処理を繰り返す。一方、ステップS209において、制御手段52は、所定時間経過したと判定した場合、異物の総検出数など、検出結果を図示しない操作表示部などに出力する(ステップS210)。そして、処理を終了する。   On the other hand, when the feature amount extraction has been completed for all the foreign substance candidate regions in step S207, the control unit 52 of the processing unit 5 determines whether or not a predetermined time has elapsed from the start of measurement (step S209). ). If the predetermined time has not elapsed, the control is returned to before step S202, and the processes of steps S202 to S209 are repeated. On the other hand, if it is determined in step S209 that the predetermined time has elapsed, the control unit 52 outputs a detection result such as the total number of detected foreign objects to an operation display unit (not shown) or the like (step S210). Then, the process ends.

以上説明してきたように、本発明を適用した異物検出装置1は、測定対象の洗浄液中に気泡が含まれている場合であっても、異物と気泡を区別して、良好な精度で異物を検出することができる。また、パーティクルカウンタと異なり、ある程度口径の大きな管に洗浄液を流しつつ測定を行うので、短時間で測定を行うことができる。   As described above, the foreign matter detection apparatus 1 to which the present invention is applied detects foreign matter with good accuracy by distinguishing foreign matter from bubbles even when the measurement target cleaning liquid contains bubbles. can do. Further, unlike the particle counter, the measurement is performed while flowing the cleaning liquid through a tube having a certain diameter, so that the measurement can be performed in a short time.

なお、上述してきた実施形態は、本発明を説明するためのものであり、本発明は、これらの実施形態に限定されるものではない。
例えば、上記の実施形態では、特徴量として、フィレ径差、占有率、対称度、円周輝度差の4種類のものを用いたが、要求される検出精度に応じて、このうちの1乃至3種類の特徴量のみを用いてもよい。あるいは、上記の特徴量の全てまたは何れかとともに、別の特徴量を組み合わせて用いてもよい。ただし、良好な検出精度を得るためには、異なる観点から異物候補領域の形状の評価を行えるようにするために、上記の特徴量のうちの少なくとも2種類を用いることが好ましい。
The embodiments described above are for explaining the present invention, and the present invention is not limited to these embodiments.
For example, in the above-described embodiment, four types of fillet diameter difference, occupancy ratio, symmetry, and circumferential luminance difference are used as the feature amount. Depending on the required detection accuracy, one to one of these may be used. Only three types of feature values may be used. Alternatively, another feature amount may be used in combination with all or any of the above feature amounts. However, in order to obtain good detection accuracy, it is preferable to use at least two of the above-described feature amounts so that the shape of the foreign substance candidate region can be evaluated from different viewpoints.

また、上記の実施形態では、判定手段56は、各特徴量について、それぞれ異物に該当する条件を満たすか否かを調べ、何れか一つでも異物に該当する場合には、異物と判定し、それ以外の場合には、気泡と判定するようにした。しかし、判定手段56は、別の方法、例えば、判別分析、ニューラルネットワーク、サポートベクトルマシンなどの分類手法を用いて判定を行うこともできる。例えば判別分析を用いる場合には、予め異物又は気泡の像と分かっている異物候補領域をそれぞれ複数準備し、各異物候補領域について求めた特徴量の値に基づいて、所定の統計量(各特徴量の平均値、分散など)を算出して判別関数を作成する。求められた判別関数は、予め記憶手段51に記憶される。そして、判定手段56は、判別対象となる異物候補領域が与えられた場合に、判別関数を記憶手段51から読み込み、判別対象となる異物候補領域から抽出された特徴量をその判別関数に入力し、気泡あるいは異物との判別結果を得る。ニューラルネットワークあるいはサポートベクトルマシンなどの学習システムを用いる場合には、同様に予め異物又は気泡の像と分かっている異物候補領域をそれぞれ複数準備し、各異物候補領域について求めた特徴量の値に基づいて、バックプロパゲーションなど、既知の学習方法を用いてシステムの学習を行う。学習済みのシステムは予め記憶手段51に記憶される。そして、判定手段56は、判別対象となる異物候補領域が与えられた場合に、その学習済みのシステムを記憶手段51から読み込み、判別対象となる異物候補領域から抽出された特徴量をその学習済みのシステムに入力し、気泡あるいは異物との判別結果を得る。   In the above-described embodiment, the determination unit 56 checks whether or not each feature amount satisfies the condition corresponding to the foreign matter, and determines that the feature is a foreign matter if any one of them corresponds to the foreign matter. In other cases, it was determined as a bubble. However, the determination unit 56 can also perform determination using another method, for example, a classification method such as discriminant analysis, neural network, support vector machine, or the like. For example, when discriminant analysis is used, a plurality of foreign substance candidate areas that are known in advance as images of foreign substances or bubbles are prepared in advance, and predetermined statistics (each feature is determined based on the feature value obtained for each foreign substance candidate area. A discriminant function is created by calculating the average value and variance of the quantity. The obtained discriminant function is stored in the storage unit 51 in advance. Then, when the foreign object candidate area to be discriminated is given, the judging means 56 reads the discriminant function from the storage means 51 and inputs the feature quantity extracted from the foreign object candidate area to be discriminated to the discriminant function. The result of discrimination from bubbles or foreign matters is obtained. When using a learning system such as a neural network or a support vector machine, similarly prepare a plurality of foreign substance candidate areas that are known in advance as images of foreign substances or bubbles, and based on the feature value obtained for each foreign substance candidate area. Then, the system is learned using a known learning method such as backpropagation. The learned system is stored in the storage means 51 in advance. Then, when a foreign object candidate area to be discriminated is given, the judging means 56 reads the learned system from the storage means 51 and learns the feature amount extracted from the foreign object candidate area to be discriminated. To obtain the result of discrimination from bubbles or foreign matter.

さらに、本発明は、洗浄液中に含まれる異物の検出以外にも適用することができる。検出対象となる異物が、気泡と異なり球形状でないものが殆どであるような場合には、本発明を好適に適用することができる。   Furthermore, the present invention can be applied in addition to the detection of foreign substances contained in the cleaning liquid. The present invention can be suitably applied to cases where foreign objects to be detected are mostly non-spherical unlike bubbles.

以上のように、本発明の範囲内で、実施される形態に合わせて様々な変更を行うことができる。   As described above, various modifications can be made within the scope of the present invention according to the embodiment to be implemented.

本発明を適用した異物検出装置の概略構成図である。It is a schematic block diagram of the foreign material detection apparatus to which this invention is applied. (a)は、平面透過部の概略正面図であり、(b)は、(a)の矢視AA’による平面透過部の概略断面図である。(A) is a schematic front view of a plane transmission part, (b) is a schematic sectional drawing of the plane transmission part by arrow AA 'of (a). 処理部の機能ブロック図である。It is a functional block diagram of a processing part. 検査画像の概略図である。It is the schematic of a test | inspection image. (a)及び(b)は、検査画像上における気泡の像の例示図であり、(c)〜(f)は、異物の像の例示図である。(A) And (b) is an illustration figure of the image of the bubble on a test | inspection image, (c)-(f) is an illustration figure of the image of a foreign material. 抽出される各特徴量の概略説明図である。It is a schematic explanatory drawing of each feature-value extracted. 判定手段における、異物候補領域の判定手順を示すフローチャートである。It is a flowchart which shows the determination procedure of the foreign material candidate area | region in a determination means. 本発明を適用した異物検出装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the foreign material detection apparatus to which this invention is applied.

符号の説明Explanation of symbols

1 異物検出装置
2 測定管
21 貯留部
22 開閉弁
23 管
24 平面透過部
3 光源部
4 撮像部
5 処理部
51 記憶手段
52 制御手段
53 通信手段
54 異物候補領域検出手段
55 特徴量抽出手段
56 判定手段
DESCRIPTION OF SYMBOLS 1 Foreign object detection apparatus 2 Measuring tube 21 Storage part 22 On-off valve 23 Pipe 24 Plane transmission part 3 Light source part 4 Imaging part 5 Processing part 51 Memory | storage means 52 Control means 53 Communication means 54 Foreign substance candidate area | region detection means 55 Feature quantity extraction means 56 Determination means

Claims (5)

検査対象物である液体の流路を形成し、該流路の少なくとも一部が外部から視認可能な透過部(24)を有する測定管(2)と、
前記透過部(24)を照明する光源部(3)と、
前記光源部(3)の発光と同期して、前記光源部(3)により照明された前記透過部(24)を流れる液体を撮影した検査画像を取得する撮像部(4)と、
所定の閾値で2値化することによって前記検査画像を高輝度領域と低輝度領域に区分し、該低輝度領域を、異物候補領域として検出する異物候補領域検出手段(54)と、
前記異物候補領域の円形度を表す特徴量を少なくとも一つ抽出する特徴量抽出手段(55)と、
前記特徴量抽出手段(55)で抽出された少なくとも一つの前記特徴量が所定の条件を満たす場合、前記異物候補領域は、異物の像であると判定する判定手段(56)と、
を有し、
前記特徴量は、前記異物候補領域の辺縁近傍の輝度差を表す円周輝度差であり、
前記特徴量抽出手段(55)は、前記異物候補領域の重心位置を求め、該重心位置から前記異物候補領域の幅又は高さの1/2以下の所定距離に存在する複数の画素について、画素値の最大値と最小値の差を算出して該円周輝度差とする
ことを特徴とする異物検出装置。
A measuring tube (2) that forms a flow path of a liquid that is an object to be inspected, and at least a part of the flow path has a transmission part (24) that is visible from the outside;
A light source part (3) for illuminating the transmission part (24);
An imaging unit (4) for acquiring an inspection image obtained by photographing the liquid flowing through the transmission unit (24) illuminated by the light source unit (3) in synchronization with light emission of the light source unit (3);
A foreign substance candidate area detection means (54) for binarizing the inspection image into a high luminance area and a low luminance area by binarizing with a predetermined threshold, and detecting the low luminance area as a foreign substance candidate area;
Feature quantity extraction means (55) for extracting at least one feature quantity representing the circularity of the foreign object candidate area;
A determination means (56) for determining that the foreign object candidate area is an image of a foreign object when at least one of the feature values extracted by the feature value extraction means (55) satisfies a predetermined condition;
I have a,
The feature amount is a circumferential luminance difference representing a luminance difference in the vicinity of the edge of the foreign substance candidate region,
The feature amount extraction means (55) obtains the barycentric position of the foreign substance candidate area, and for a plurality of pixels existing at a predetermined distance of 1/2 or less of the width or height of the foreign substance candidate area from the barycentric position, A foreign object detection device characterized in that a difference between a maximum value and a minimum value is calculated to obtain the circumferential luminance difference .
前記特徴量抽出手段(55)は、前記円周輝度差とともに、前記異物候補領域の対称性を表す対称度を抽出し
前記特徴量抽出手段(55)は、前記異物候補領域の垂直中心線及び水平中心線の位置を決定し、該垂直中心線を軸として前記異物候補領域を折り返して重ねたとしたときに前記異物候補領域同士が重ならない画素数と、該水平中心線を軸として前記異物候補領域を折り返して重ねたとしたときに前記異物候補領域同士が重ならない画素数の合計を求めて、該対称度とする、請求項1に記載の異物検出装置。
The feature quantity extraction means (55) extracts a degree of symmetry representing the symmetry of the foreign substance candidate area together with the circumferential luminance difference ,
The feature quantity extraction means (55) determines the positions of the vertical center line and the horizontal center line of the foreign substance candidate area, and the foreign substance candidate when the foreign substance candidate area is folded and overlapped with the vertical center line as an axis. The total number of pixels that do not overlap each other when the foreign substance candidate areas are folded and overlapped around the horizontal center line as an axis, and the degree of symmetry is obtained. The foreign object detection device according to claim 1.
前記異物候補領域検出手段(54)は、前記検査画像の注目画素について、該注目画素を含む小領域を設定し、該小領域の代表信号値を求めて該注目画素に対応する画素の値とすることにより、背景画像を作成し、該背景画像と前記検査画像の差分画像を作成し、該差分画像の平均画素値を算出し、該平均画素値に基づいて前記所定の2値化閾値を算出する、請求項1に記載の異物検出装置。   The foreign substance candidate region detecting means (54) sets a small region including the target pixel for the target pixel of the inspection image, obtains a representative signal value of the small region, and sets the pixel value corresponding to the target pixel. To create a background image, create a difference image between the background image and the inspection image, calculate an average pixel value of the difference image, and set the predetermined binarization threshold based on the average pixel value. The foreign object detection device according to claim 1, wherein the foreign object detection device calculates. 前記特徴量抽出手段(55)は、少なくとも2種類の前記特徴量を抽出し、
前記判定手段(56)は、抽出された前記特徴量の何れかが、各特徴量について予め定められた条件を満たす場合に、異物と判定する、請求項1〜3の何れか一項に記載の異物検出装置。
The feature quantity extraction means (55) extracts at least two types of feature quantities,
The determination unit (56) according to any one of claims 1 to 3 , wherein the determination unit (56) determines that the extracted feature quantity is a foreign object when a predetermined condition is satisfied for each feature quantity. Foreign object detection device.
前記光源部(3)の1回当たりの発光時間が、該1回当たりの発光中に前記液体が移動する移動量が、前記検査画像において、前記検査画像の画素の大きさの1/2以下となる時間である、請求項1〜4の何れか一項に記載の異物検出装置。 The light emission time per time of the light source unit (3) is such that the amount of movement of the liquid during the light emission per time is less than or equal to ½ of the pixel size of the inspection image in the inspection image. The foreign object detection device according to any one of claims 1 to 4 , wherein the foreign object detection device is a period of time.
JP2006285128A 2006-10-19 2006-10-19 Foreign object detection device Expired - Fee Related JP4765890B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006285128A JP4765890B2 (en) 2006-10-19 2006-10-19 Foreign object detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006285128A JP4765890B2 (en) 2006-10-19 2006-10-19 Foreign object detection device

Publications (2)

Publication Number Publication Date
JP2008102027A JP2008102027A (en) 2008-05-01
JP4765890B2 true JP4765890B2 (en) 2011-09-07

Family

ID=39436458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006285128A Expired - Fee Related JP4765890B2 (en) 2006-10-19 2006-10-19 Foreign object detection device

Country Status (1)

Country Link
JP (1) JP4765890B2 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5274903B2 (en) * 2008-06-16 2013-08-28 旭光電機株式会社 Fluid detection sensor
EP2458367B1 (en) * 2010-11-25 2015-08-05 Mettler-Toledo AG Device and method for recognising solid substances in a liquid phase
JP5757724B2 (en) * 2010-12-10 2015-07-29 オリンパス株式会社 Image processing apparatus, image processing method, and image processing program
US9665931B2 (en) * 2011-12-28 2017-05-30 Sunedison Semiconductor Limited (Uen201334164H) Air pocket detection methods and systems
JP6628185B2 (en) * 2016-03-11 2020-01-08 パナソニックIpマネジメント株式会社 Inspection method for transparent objects
JP7034087B2 (en) 2016-12-09 2022-03-11 大塚製薬株式会社 Measuring equipment, measurement anomaly detection method, and program
TWI746907B (en) * 2017-12-05 2021-11-21 日商斯庫林集團股份有限公司 Fume determination method, substrate processing method, and substrate processing equipment
JP7234502B2 (en) * 2018-03-29 2023-03-08 富士通株式会社 Method, Apparatus and Program
JP7501173B2 (en) 2020-07-08 2024-06-18 株式会社ジェイテクト METHOD FOR MANUFACTURING LEARNING MODEL USED IN QUALITY ASSESSMENT, LEARNING SYSTEM, QUALITY ASSESSMENT SYSTEM, AND QUALITY ASSESSMENT METHOD
CN112525920B (en) * 2020-11-23 2023-03-10 山东科技大学 Liquid perspective imaging interference filtering system
CN113279886B (en) * 2021-06-16 2022-11-04 哈尔滨工程大学 Diesel engine high pressure common rail injector cleanliness detection device
JP7076052B1 (en) 2022-02-16 2022-05-26 三菱重工業株式会社 Porosity measuring device and porosity measuring method
CN116997927A (en) * 2022-03-01 2023-11-03 京东方科技集团股份有限公司 Curved substrate bubble detection method and detection system
JP7451631B1 (en) 2022-09-07 2024-03-18 本田技研工業株式会社 Welding part inspection device and welding part inspection method
CN116823835B (en) * 2023-08-30 2023-11-10 山东省永星食品饮料有限公司 Bottled water impurity detection method based on machine vision
CN116862912B (en) * 2023-09-04 2023-11-24 山东恒信科技发展有限公司 Raw oil impurity detection method based on machine vision

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0821798A (en) * 1994-07-06 1996-01-23 Kanegafuchi Chem Ind Co Ltd Method and apparatus for detecting foreign matter
JP2869422B2 (en) * 1995-12-28 1999-03-10 シスメックス株式会社 Device for analyzing particles in fluids
JP4254347B2 (en) * 2003-05-27 2009-04-15 パナソニック電工株式会社 Method and apparatus for detecting foreign matter in liquid in container
JP4581424B2 (en) * 2004-02-24 2010-11-17 パナソニック電工株式会社 Appearance inspection method and image processing apparatus
JP2005315850A (en) * 2004-03-29 2005-11-10 Kgt Inc Three-dimensional position measuring instrument
JP4421396B2 (en) * 2004-06-29 2010-02-24 株式会社ミューチュアル Method for distinguishing bubbles in liquid containers

Also Published As

Publication number Publication date
JP2008102027A (en) 2008-05-01

Similar Documents

Publication Publication Date Title
JP4765890B2 (en) Foreign object detection device
EP2373957B1 (en) Methods for determining a liquid level in a container using imaging
JP6976257B2 (en) Methods and equipment for multi-view characterization
JP6870826B2 (en) Methods and devices configured to quantify samples from lateral multi-viewpoints
ES2123476T3 (en) METHOD FOR EVALUATING THE QUALITY OF SLIDES AND PREPARATION OF SAMPLES.
CN102713582B (en) Inclusion detection in polished gemstones
US8538119B2 (en) Particle image analysis method and apparatus
US20090297007A1 (en) Automated Method and System for Nuclear Analysis of Biopsy Images
JP5414707B2 (en) Analysis equipment
EP1096249A2 (en) Nondestructive inspection method and apparatus
JP2004354100A (en) Method and apparatus for detecting foreign matter in liquid within container
KR20000064473A (en) Boundary Mapping System and Method
KR102074561B1 (en) Apparatus for check in data
JP4517826B2 (en) Liquid level detection method
JP2018105690A (en) Automatic analyzer and automatic analysis method
US7352900B2 (en) Apparatus and method for processing particle images and program product for same
JP2001116703A (en) Method and apparatus for discriminating flotage in container
JP5140679B2 (en) Dispensing device
US9547784B1 (en) Sensor arrangement
JP2005241304A (en) Appearance inspection method
JPH07333197A (en) Automatic surface flaw detector
JPH08145871A (en) Method and device for deviding area of particle picture
JPH0979985A (en) Method and device for judging particle reaction pattern
JP3102926B2 (en) Particle analyzer
CN112129768A (en) Appearance inspection management system, device, method and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110303

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110308

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110401

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110517

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110530

R151 Written notification of patent or utility model registration

Ref document number: 4765890

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20140624

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees