JP3871333B2 - Foreign object detection method, foreign object detection program, and foreign object detection device - Google Patents

Foreign object detection method, foreign object detection program, and foreign object detection device Download PDF

Info

Publication number
JP3871333B2
JP3871333B2 JP2003382587A JP2003382587A JP3871333B2 JP 3871333 B2 JP3871333 B2 JP 3871333B2 JP 2003382587 A JP2003382587 A JP 2003382587A JP 2003382587 A JP2003382587 A JP 2003382587A JP 3871333 B2 JP3871333 B2 JP 3871333B2
Authority
JP
Japan
Prior art keywords
image
foreign
foreign substance
ray
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2003382587A
Other languages
Japanese (ja)
Other versions
JP2005147751A (en
Inventor
正英 山崎
裕子 高木
健史 山崎
Original Assignee
アンリツ産機システム株式会社
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 アンリツ産機システム株式会社 filed Critical アンリツ産機システム株式会社
Priority to JP2003382587A priority Critical patent/JP3871333B2/en
Publication of JP2005147751A publication Critical patent/JP2005147751A/en
Application granted granted Critical
Publication of JP3871333B2 publication Critical patent/JP3871333B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

本発明は、被検査物のX線画像を処理して混入異物の有無検出を行う、異物検出方法、異物検出プログラム及び異物検出装置に関する。   The present invention relates to a foreign object detection method, a foreign object detection program, and a foreign object detection apparatus that detect the presence or absence of a mixed foreign object by processing an X-ray image of an inspection object.

食品や各種工業製品の製造ラインでは、混入異物の排除を行うために、X線画像を用いた異物検出が従来から行なわれている。例えば、特許文献1および特許文献2には従来の技術が詳細に説明されている。   In the production line for foods and various industrial products, foreign matter detection using an X-ray image has been conventionally performed in order to eliminate foreign matters. For example, Patent Literature 1 and Patent Literature 2 describe conventional techniques in detail.

図2は従来の典型的な異物検出方法を説明するためのフローチャートである。ステップS10で入力されたX線画像に対し、ステップS30で異物らしさを強調する画像フィルタを用いた異物検出アルゴリズムを適用し、ステップS40で異物検出結果に閾値処理を適用して混入異物の有無検出を行っている。   FIG. 2 is a flowchart for explaining a typical conventional foreign object detection method. In step S30, a foreign object detection algorithm using an image filter that emphasizes the likelihood of a foreign object is applied to the X-ray image input in step S10, and a threshold value process is applied to the foreign object detection result in step S40 to detect the presence or absence of mixed foreign objects. It is carried out.

異物らしさを強調する画像フィルタには各種の画像フィルタが適用可能であるが、細線状異物の検出用としては、小さなカーネルを用いた差分形の画像フィルタが多用されている。例えば、図4のX線画像例に対し、各画素を中心に5×5画素のカーネル領域を想定し、カーネル中心の濃度とカーネル領域内の平均濃度との差を評価し、カーネル領域内の平均濃度よりどれだけ高濃度であるかをカーネル中心の画素に対応する画素の画素値とした差分画像を生成する。   Various image filters can be applied to the image filter that emphasizes the appearance of a foreign object. However, a differential image filter using a small kernel is often used for detecting a fine line foreign object. For example, in the X-ray image example of FIG. 4, assuming a kernel area of 5 × 5 pixels centering on each pixel, the difference between the kernel center density and the average density in the kernel area is evaluated, A difference image is generated with the pixel density of the pixel corresponding to the pixel at the center of the kernel indicating how much higher the density is than the average density.

通常は前記差分画像に対し直ちに閾値処理を適用して混入異物の有無検出を行うが、低コントラストな細線状異物を検出する場合には、通常よりも閾値を下げてラベリングを用いた閾値処理を行う。このとき、ラベリングで細線状のブロブが不必要に分断されてしまわないように、前記差分画像の各画素を中心に3×3画素のカーネル領域内の濃度を平均してから閾値処理を適用している。図5に平均化した差分画像を、図6にラベリングを用いた閾値処理の結果をX線画像の白抜き表示で示す。   Usually, the threshold image is immediately applied to the difference image to detect the presence or absence of mixed foreign matter. However, when detecting a thin line foreign matter having a low contrast, the threshold value processing using labeling is performed by lowering the threshold value than usual. Do. At this time, the threshold processing is applied after averaging the density in the kernel region of 3 × 3 pixels centering on each pixel of the difference image so that the thin line blob is not unnecessarily divided by labeling. ing. FIG. 5 shows the averaged difference image, and FIG. 6 shows the result of threshold processing using labeling in a white display of the X-ray image.

前記のラベリングを用いた閾値処理では画素面積の小さなブロブをノイズとして消去しているが、図6には細線状異物とともに被検査物エッジの一部が多く検出されており、このままでは誤判定となるため閾値を上げざるを得ない。そこで、前記差分画像には異物らしさが強調されていることを考慮して、ブロブの画素面積に代えてブロブの画素体積が小さなブロブを消去するように変更してみると、図7に示す結果が得られる。しかし、図7には細線状異物とともに大きな被検査物エッジが検出されており、誤判定を防止するためには閾値を上げざるを得ない。   In the threshold processing using the labeling, a blob having a small pixel area is erased as noise. However, in FIG. 6, many of the edges of the inspection object are detected together with the thin line foreign matter. Therefore, the threshold value must be increased. Accordingly, in consideration of the fact that the difference image emphasizes the likelihood of a foreign object, the blob pixel area is changed to delete a blob having a small pixel volume instead of the blob pixel area. The result shown in FIG. Is obtained. However, in FIG. 7, a large inspection object edge is detected together with the thin line foreign matter, and the threshold value must be increased in order to prevent erroneous determination.

WO98/11456号公報WO98 / 11456 gazette 特開2001−307069号公報Japanese Patent Laid-Open No. 2001-307069

従来の異物検出方法は、低コントラスト異物と被検査物エッジとの分別が困難であり、細線状異物の検出感度が低い。本発明の課題は、細線状異物の検出感度が高い異物検出方法、異物検出プログラム及び異物検出装置の提供にある。   In the conventional foreign matter detection method, it is difficult to distinguish a low-contrast foreign matter from the edge of the inspection object, and the detection sensitivity of the fine line foreign matter is low. An object of the present invention is to provide a foreign matter detection method, a foreign matter detection program, and a foreign matter detection device that have high detection sensitivity for fine line foreign matter.

前述の課題を解決するために、請求項1に記載の異物検出方法は、被検査物を透過したX線画像を処理して前記被検査物内の混入異物の有無検出を行う異物検出方法において、前記X線画像の濃淡エッジを強調して濃淡エッジ強調画像を生成する段階(S2)と、前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成する段階(S3)と、前記濃淡エッジ強調画像から異物候補抽出用に設定された第1の閾値を用いて異物候補を抽出し、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求め、該評価体積と異物判定用に設定された第2の閾値とを比較して異物性の判定を行う段階(S4)とから構成されており、被検査物内の混入異物の有無検出を行うものである。 In order to solve the above-mentioned problem, the foreign matter detection method according to claim 1 is a foreign matter detection method for processing an X-ray image transmitted through an inspection object to detect the presence or absence of mixed foreign matter in the inspection object. A step (S2) of generating a shaded edge enhanced image by enhancing the shaded edge of the X-ray image, and a mask pattern for masking a linear image generated at the edge portion of the inspection object from the X-ray image. A step (S3) of generating, a foreign object candidate is extracted from the grayscale edge enhanced image using a first threshold value set for extracting the foreign object candidate, and the position of the foreign object candidate is not masked by the mask pattern adding the concentration of foreign matter candidate for, for a pixel being masked obtains a value obtained by subtracting the concentration of foreign matter candidate evaluation volume for determining the foreign matter resistance, the evaluation volume and the foreign matter-size It compares the second threshold value set for use is constructed from a step (S4) for judging the foreign matter resistance, is performed whether detection of contaminating foreign matter in the object to be inspected.

そして、請求項2に記載の異物検出プログラムは、コンピュータに、被検査物を透過したX線画像を処理して前記被検査物内の混入異物の有無検出を行わせる異物検出プログラムにおいて、前記X線画像から濃淡エッジ強調画像を生成させ、前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成させ、前記濃淡エッジ強調画像から異物候補抽出用に設定された第1の閾値を用いて異物候補を抽出させ、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求めさせ、該評価体積と異物判定用に設定された第2の閾値とを比較することにより異物性の判定を行わせる。 The foreign matter detection program according to claim 2 is a foreign matter detection program that causes a computer to process an X-ray image transmitted through an object to be detected to detect the presence or absence of mixed foreign matter in the object. A gray-scale edge enhanced image is generated from a line image, a mask pattern for masking a linear image generated at an edge portion of the inspection object is generated from the X-ray image, and foreign object candidates are extracted from the gray-scale edge enhanced image. A foreign substance candidate is extracted using the set first threshold, the density of the foreign substance candidate is added to a pixel whose position is not masked by the mask pattern, and the masked pixel is a value obtained by subtracting the concentration of foreign matter candidates allowed determined as an evaluation volume for determining the foreign matter resistance, a second threshold value set for determining the evaluation volume and foreign matter To perform the determination of the foreign matter resistance by comparison.

また、請求項3に記載の異物検出装置は、被検査物(3)にX線を照射するX線照射手段(2)と、前記被検査物を透過したX線を受けてデジタル画像化するX線検出器(4)と、該X線検出器から出力されるデジタル画像をX線画像に対数変換して取り込む画像入力手段(5)と、該画像入力手段によって取り込まれたX線画像を画像処理して被検査物に混入している異物の有無を検出する画像処理手段(6)とを有する異物検出装置において、前記画像処理手段は、前記X線画像の濃淡エッジを強調して濃淡エッジ強調画像を生成する濃淡エッジ強調手段(61)と、前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成するマスクパタン生成手段(65)と、前記濃淡エッジ強調画像から異物候補を抽出するための所定値である第1の閾値が設定された第1の閾値設定手段(62)と、異物判定用の所定値である第2の閾値が設定された第2の閾値設定手段(63)と、前記濃淡エッジ強調画像から前記第1の閾値を用いて異物候補を抽出し、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求め、該評価体積と前記第2の閾値とを比較して異物の有無の判定を行う異物判定手段(64)とから構成されている。 Further, the foreign object detection apparatus according to claim 3 receives the X-ray irradiation means (2) for irradiating the inspection object (3) with X-rays and the X-rays transmitted through the inspection object to form a digital image. X-ray detector (4), image input means (5) for taking a digital image output from the X-ray detector by logarithmically converting it into an X-ray image, and an X-ray image taken by the image input means In the foreign matter detection apparatus having image processing means (6) for detecting the presence or absence of foreign matter mixed in the object to be inspected by the image processing, the image processing means emphasizes the shading edge of the X-ray image to Gray level edge enhancement means (61) for generating an edge enhancement image; and mask pattern generation means (65) for generating a mask pattern for masking a linear image generated at the edge portion of the inspection object from the X-ray image. , From the shade-enhanced image First threshold setting means (62) in which a first threshold value that is a predetermined value for extracting an object candidate is set, and a second threshold value in which a second threshold value that is a predetermined value for foreign object determination is set A foreign substance candidate is extracted from the gray level edge-enhanced image using the first threshold value with a setting means (63), and the density of the foreign substance candidate is set for a pixel whose position of the foreign substance candidate is not masked by the mask pattern. For the masked pixel, a value obtained by subtracting the density of the foreign substance candidate is obtained as an evaluation volume for determining the foreign substance property, and the evaluation volume is compared with the second threshold value. And foreign matter determination means (64) for determining the presence or absence of foreign matter.

本発明によれば、低コントラスト異物と被検査物エッジとの分別が可能であり、細線状異物の検出感度が格段に向上する。   According to the present invention, the low-contrast foreign material and the inspection object edge can be distinguished, and the detection sensitivity of the fine line-shaped foreign material is remarkably improved.

以下、本発明の実施の形態を図を参照しながら詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は本発明の異物検出方法を説明するためのフローチャートである。ステップS1で入力されたX線画像に対し、ステップS2でX線画像の濃淡エッジを強調し、ステップS3でX線画像から誤判定防止用のマスクパタンを生成し、ステップS4で第1の閾値処理により抽出した異物候補の評価体積をマスクパタン参照による加減算で求めて第2の閾値処理により異物性を評価して異物かどうかを判定する。   FIG. 1 is a flowchart for explaining the foreign object detection method of the present invention. With respect to the X-ray image input in step S1, the shading edge of the X-ray image is emphasized in step S2, a mask pattern for preventing erroneous determination is generated from the X-ray image in step S3, and the first threshold value is determined in step S4. The evaluation volume of the foreign substance candidate extracted by the process is obtained by addition / subtraction with reference to the mask pattern, and the foreign substance property is evaluated by the second threshold process to determine whether the foreign substance is a foreign object.

例えば図4のX線画像例がステップS1で入力された場合、濃淡エッジ強調画像は図5、マスクパタンは図8、判定結果は図9のようになるが、この実施例について以下に説明する。   For example, when the example of the X-ray image of FIG. 4 is input in step S1, the shaded edge emphasized image is as shown in FIG. 5, the mask pattern is as shown in FIG. 8, and the determination result is as shown in FIG. .

以下の説明では、N×N画素のカーネルを用いた移動平均,最大値,最小値フィルタをそれぞれAve(N),Max(N),Min(N)
と表記し、そのカーネルの移動平均Ave(N)との差分をとった画像フィルタをADBIN(N)と表記し、高濃度部分[B, 255]を対象に移動カーネル内の濃度ヒストグラムの頻度がピークの1/(A+2)以下となったところの高濃度側の濃度で差分をとった画像フィルタをHADBIN
(N, A, B)と表記する。また、閾値Cによる2値化をBIN(C)と表記し、画像の濃度反転をINV(画像)と表記し、2画像の論理積をAND(画像1,画像2)と表記し、”画像→処理1→処理2→...”によって一連の画像処理を示す。
In the following explanation, moving average, maximum value, and minimum value filters using a kernel of N × N pixels are respectively Ave (N), Max (N), and Min (N).
The image filter that takes the difference from the moving average Ave (N) of the kernel is expressed as ADBIN (N), and the frequency of the density histogram in the moving kernel for the high density part [B, 255] HADBIN is an image filter that takes the difference in the density on the high density side where it is 1 / (A + 2) or less of the peak
Indicated as (N, A, B). Also, binarization by threshold C is expressed as BIN (C), density inversion of the image is expressed as INV (image), and the logical product of the two images is expressed as AND (image 1, image 2). A series of image processing is indicated by “→ Process 1 → Process 2 → ...”.

図1のステップS2でX線画像の濃淡エッジを強調する方法は、X線画像→ADBIN(5)→Ave(3)による。ここで生成した濃淡エッジ強調画像をステップS4で閾値処理することになる。予め設定しておくべき第1の閾値(=2)と第2の閾値(=30)の設定ステップは図1に示されていないが、第1の閾値については前記濃淡エッジ強調画像の平均濃度を用いて自動設定することも可能である。   The method for emphasizing the light and dark edges of the X-ray image in step S2 in FIG. 1 is based on the X-ray image → ADBIN (5) → Ave (3). The grayscale edge enhanced image generated here is subjected to threshold processing in step S4. Although the steps of setting the first threshold value (= 2) and the second threshold value (= 30) to be set in advance are not shown in FIG. 1, the average density of the grayscale edge enhanced image is not shown for the first threshold value. It is also possible to set automatically using.

図1のステップS3のマスクパタンは次のようにして生成する。先ず、X線画像→Ave(3) により得た画像の濃度ヒストグラムから、第1ピークと第2ピークとの間のボトムの濃度ibottomを求め、X線画像→BIN(ibottom)→Min(27)→Max(21) により生成した2値画像をパタン1とする。次に、AND(パタン1,X線画像)→HADBIN(N, A, ibottom)→BIN(1)により生成した2値画像をパタン2とする。次に、AND(X線画像,INV(パタン2))→ADBIN(17)→BIN(5)→Min(3)→Max(3) により生成した2値画像をパタン3とする。最後に、AND(AND(パタン1,INV(パタン2)),INV(パタン3))
により生成した2値画像をマスクパタンとする。このマスクパタンは図8に示しているように、被測定物外縁部等のエッジ部分に黒いマスクが生じている。
The mask pattern in step S3 in FIG. 1 is generated as follows. First, the density ibottom of the bottom between the first peak and the second peak is obtained from the density histogram of the image obtained by X-ray image → Ave (3), and X-ray image → BIN (ibottom) → Min (27) → Pattern 1 is a binary image generated by Max (21). Next, a binary image generated by AND (pattern 1, X-ray image) → HADBIN ( N, A, ibottom) → BIN (1) is set as pattern 2. Next, a binary image generated by AND (X-ray image, INV (pattern 2)) → ADBIN (17) → BIN (5) → Min (3) → Max (3) is set as pattern 3. Finally, AND (AND (Pattern 1, INV (Pattern 2)), INV (Pattern 3))
The binary image generated by the above is used as a mask pattern. In this mask pattern, as shown in FIG. 8, a black mask is generated at the edge portion such as the outer edge of the object to be measured.

図1のステップS4では次のようにして異物判定を行う。先ず、ステップS2で生成した濃淡エッジ強調画像から第1の閾値で高濃度ブロブを抽出して異物候補とする。次に、異物候補と同じ位置にあるステップS3で生成したマスクパタンを参照しつつ各異物候補の評価体積を算出する。すなわち、参照マスクパタンが黒でない画素については異物候補の濃度を加算し、参照マスクパタンが黒の画素については異物候補の濃度を減算することによって異物候補毎に評価体積を算出する。最後に、評価体積が第2の閾値よりも大きな異物候補を異物と判定する。図9にこの判定結果をX線画像の白抜き表示で示す。 In step S4 in FIG. 1, foreign matter determination is performed as follows. First, a high density blob is extracted from the grayscale edge enhanced image generated in step S2 with a first threshold value to be a foreign substance candidate. Next, the evaluation volume of each foreign matter candidate is calculated while referring to the mask pattern generated in step S3 at the same position as the foreign matter candidate. That is, the evaluation volume is calculated for each foreign substance candidate by adding the density of the foreign substance candidate for a pixel whose reference mask pattern is not black and subtracting the density of the foreign substance candidate for a pixel whose reference mask pattern is black. Finally, a foreign object candidate whose evaluation volume is larger than the second threshold is determined as a foreign object. FIG. 9 shows the determination result as a white display of the X-ray image.

以上説明したように、本発明による異物検出方法では、マスクパタン参照による評価体積で濃淡エッジ強調画像内の高濃度ブロブの異物性を評価している。このマスクパタン参照により低コントラスト異物と被検査物エッジとの分別が可能となるため、従来のように閾値を上げなくても誤判定を防止することができる。この結果、従来と比べて細線状異物の検出感度を格段に向上させることができる。なお、ここで説明した濃淡エッジ強調の方法およびマスクパタン生成の方法は具体的だが一例に過ぎない。   As described above, in the foreign matter detection method according to the present invention, the foreign matter property of the high density blob in the grayscale edge enhanced image is evaluated by the evaluation volume based on the mask pattern. Since this low-contrast foreign object can be distinguished from the inspection object edge by referring to the mask pattern, erroneous determination can be prevented without increasing the threshold as in the prior art. As a result, it is possible to remarkably improve the detection sensitivity of the thin line foreign matter compared to the conventional case. Note that the gray edge enhancement method and the mask pattern generation method described here are specific but only examples.

図3は、本発明の異物検出装置の実施の形態であるX線を用いた異物検出装置を説明するためのブロック図である。即ち、被測定物3を搬送する搬送手段1と、被測定物3にX線を照射するX線源2と、被測定物3のX線透過像をデジタル画像化するX線検出器4と、これをX線画像に対数変換して取り込む画像入力手段5と、このX線画像を処理して混入異物の有無を判定する画像処理手段6とを備えた異物検出装置である。必要に応じて画像表示手段7を付加しても良い。   FIG. 3 is a block diagram for explaining a foreign matter detection apparatus using X-rays, which is an embodiment of the foreign matter detection apparatus of the present invention. That is, a conveying means 1 that conveys the object to be measured 3, an X-ray source 2 that irradiates the object to be measured 3 with X-rays, an X-ray detector 4 that digitalizes an X-ray transmission image of the object to be measured 3, This is a foreign object detection device including an image input means 5 that takes a logarithmic conversion of this into an X-ray image, and an image processing means 6 that processes the X-ray image and determines the presence or absence of mixed foreign substances. Image display means 7 may be added as necessary.

搬送手段1は、例えばX線を良く透過するベルトコンベアで実現され、対向配置されたX線源2とX線検出器4の間を通して被測定物3を搬送する。X線源2から照射されたX線は、被測定物3による吸収とベルトコンベアによる僅かな吸収を受けてこれらを透過した後、X線検出器4に到達する。   The transport means 1 is realized by, for example, a belt conveyor that transmits X-rays well, and transports the object to be measured 3 between the X-ray source 2 and the X-ray detector 4 that are arranged to face each other. The X-rays irradiated from the X-ray source 2 are absorbed by the object to be measured 3 and slightly absorbed by the belt conveyor, pass through them, and then reach the X-ray detector 4.

X線検出器4は、例えばX線ラインセンサで実現され、被検査物3のX線透過像をデジタル画像化する。このデジタル画像は、X線ラインセンサによる1ライン上のサンプリングピッチと略等しいサンプリングピッチで搬送方向にサンプリングされ、X線透過画像としてメモリー上に取り込まれる。   The X-ray detector 4 is realized by an X-ray line sensor, for example, and converts the X-ray transmission image of the inspection object 3 into a digital image. This digital image is sampled in the transport direction at a sampling pitch substantially equal to the sampling pitch on one line by the X-ray line sensor, and is taken into the memory as an X-ray transmission image.

物質のX線吸収率をα、物質の厚さをLとすると、強度SのX線が当該物質を透過した後の強度S’は、理論上、S’= S・exp(−α・L)と書ける。両辺の対数をとって変形すれば、α・L=log(S)−log(S’)とも書ける。前記X線透過画像はS’の2次元分布に相当し、前述のように対数をとって変形すれば、物質による吸収量α・Lの2次元分布を示すX線吸収画像に変換できる。X線透過画像とX線吸収画像のどちらにも物質による吸収量α・Lという被検査物の物性情報が含まれているが、濃度値が物質による吸収量をストレートに示すX線吸収画像の方がX線吸収率の高い異物の強調や検出には有利である。この場合、例えば被検査物のX線吸収画像において、局所的に高濃度を示す部分や急峻なエッジ部分を異物候補点として扱うことによって異物らしさを評価することができる。   Assuming that the X-ray absorption rate of the substance is α and the thickness of the substance is L, the intensity S ′ after the X-ray of the intensity S is transmitted through the substance is theoretically S ′ = S · exp (−α · L ). If transformation is performed by taking the logarithm of both sides, it can be written as α · L = log (S) −log (S ′). The X-ray transmission image corresponds to a two-dimensional distribution of S ′, and can be converted into an X-ray absorption image showing a two-dimensional distribution of the absorption amount α · L due to a substance by taking a logarithm as described above. Both the X-ray transmission image and the X-ray absorption image include physical property information of the object to be inspected, that is, the amount of absorption α · L due to the substance. This is advantageous for emphasizing and detecting foreign matter having a high X-ray absorption rate. In this case, for example, in an X-ray absorption image of an object to be inspected, it is possible to evaluate the likelihood of a foreign object by treating a part having a high density locally or a sharp edge part as a foreign substance candidate point.

画像入力手段5は、前記X線透過画像をX線吸収画像に対数変換してX線画像とし、画像処理手段6に出力する。この対数変換には、被検査物の物性とX線波長に依存する補正を加えてもよい。   The image input means 5 logarithmically converts the X-ray transmission image into an X-ray absorption image to form an X-ray image and outputs the X-ray image to the image processing means 6. In this logarithmic conversion, correction depending on the physical properties of the inspection object and the X-ray wavelength may be added.

画像処理手段6はパラメータ設定機能を備えたCPU等で、図1を用いて説明した本発明の異物検出方法が実装されており、画像入力手段5から出力されたX線画像の入力を受け予めパラメータ設定された画像処理により混入異物の有無検出を行う。即ち、図1のステップS1で入力されたX線画像に対し、ステップS2でX線画像から平均化差分画像を生成する濃淡エッジ強調手段61と、異物候補抽出用の第1の閾値設定手段62と、異物判定用の第2の閾値設定手段63と、ステップS3で誤判定防止用のマスクパタンを生成するマスクパタン生成手段65と、第1の閾値処理により抽出した異物候補の評価体積をマスクパタン参照による加減算で求めて第2の閾値処理により異物性を評価するステップS4の異物判定手段64とから成る。画像表示手段7を付加する場合は、ステップS4の異物判定結果とともにステップS1で入力されたX線画像を画像表示手段7に出力する。   The image processing means 6 is a CPU or the like having a parameter setting function, and is implemented with the foreign matter detection method of the present invention described with reference to FIG. 1, and receives an X-ray image output from the image input means 5 in advance. Presence / absence of mixed foreign matter is detected by image processing with parameters set. That is, with respect to the X-ray image input in step S1 of FIG. 1, gray level edge enhancement means 61 for generating an averaged difference image from the X-ray image in step S2 and first threshold value setting means 62 for foreign substance candidate extraction. The second threshold value setting means 63 for foreign substance determination, the mask pattern generation means 65 for generating a mask pattern for preventing erroneous determination in step S3, and the evaluation volume of the foreign substance candidate extracted by the first threshold process as a mask. It consists of the foreign matter determination means 64 in step S4 which is obtained by addition / subtraction with reference to the pattern and evaluates the foreign matter by the second threshold processing. When the image display unit 7 is added, the X-ray image input in step S1 is output to the image display unit 7 together with the foreign substance determination result in step S4.

画像表示手段7は、画像処理手段6のステップS4の異物判定結果から異物画像を生成し、これに画像処理手段6のステップS1で入力されたX線画像をOR演算してCRT等に表示する。   The image display means 7 generates a foreign substance image from the foreign substance determination result in step S4 of the image processing means 6, and OR-operates the X-ray image input in step S1 of the image processing means 6 to display it on a CRT or the like. .

本発明の異物検出方法を説明するためのフローチャートである。It is a flowchart for demonstrating the foreign material detection method of this invention. 従来の異物検出方法を説明するためのフローチャートである。It is a flowchart for demonstrating the conventional foreign material detection method. 本発明の異物検出装置の実施の形態を説明するための図である。It is a figure for demonstrating embodiment of the foreign material detection apparatus of this invention. X線画像例である。It is an example of an X-ray image. X線画像例から生成した濃淡エッジ強調画像例である。It is an example of a light / dark edge enhancement image generated from an example of an X-ray image. 濃淡エッジ強調画像例の高濃度ブロブを面積で閾値処理した結果を示した画像である。It is the image which showed the result of having threshold-processed the high density blob of the example of a grayscale edge emphasis image with an area. 濃淡エッジ強調画像例の高濃度ブロブを体積で閾値処理した結果を示した画像である。It is the image which showed the result of carrying out the threshold value process of the high density blob of the example of a grayscale edge emphasis image. X線画像例から本発明による方法で生成したマスクパタンを示した画像である。It is the image which showed the mask pattern produced | generated by the method by this invention from the X-ray image example. 濃淡エッジ強調画像例の高濃度ブロブを本発明による評価体積で閾値処理した結果を示した画像である。It is the image which showed the result of having performed the threshold value process by the evaluation volume by this invention about the high density blob of the example of a grayscale edge emphasis image.

符号の説明Explanation of symbols

1…搬送手段、2…X線源、3…被測定物、4…X線検出器、5…画像入力手段、6…画像処理手段、7…画像表示手段、61…濃淡エッジ強調手段、62…第1の閾値設定手段、63…第2の閾値設定手段、64…異物判定手段、65…マスクパタン生成手段
DESCRIPTION OF SYMBOLS 1 ... Conveyance means, 2 ... X-ray source, 3 ... Object to be measured, 4 ... X-ray detector, 5 ... Image input means, 6 ... Image processing means, 7 ... Image display means, 61 ... Light / dark edge emphasis means, 62 ... 1st threshold value setting means, 63 ... 2nd threshold value setting means, 64 ... Foreign matter determination means, 65 ... Mask pattern generation means

Claims (3)

被検査物を透過したX線画像を処理して前記被検査物内の混入異物の有無検出を行う異物検出方法において、
前記X線画像の濃淡エッジを強調して濃淡エッジ強調画像を生成する段階(S2)と、
前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成する段階(S3)と、
前記濃淡エッジ強調画像から異物候補抽出用に設定された第1の閾値を用いて異物候補を抽出し、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求め、該評価体積と異物判定用に設定された第2の閾値とを比較して異物性の判定を行う段階(S4)とから構成されていることを特徴とする異物検出方法。
In the foreign object detection method for processing the X-ray image transmitted through the inspection object and detecting the presence or absence of the mixed foreign material in the inspection object,
Generating a gray edge-enhanced image by emphasizing the gray edges of the X-ray image (S2);
Generating a mask pattern for masking a linear image generated at an edge portion of the inspection object from the X-ray image (S3);
A foreign substance candidate is extracted from the grayscale edge-enhanced image using a first threshold value set for foreign substance candidate extraction, and the density of the foreign substance candidate is set for a pixel whose position of the foreign substance candidate is not masked by the mask pattern. For the masked pixel, a value obtained by subtracting the density of the foreign substance candidate is obtained as an evaluation volume for judging the foreign substance , and the evaluation volume and the second set for the foreign substance judgment are obtained. A foreign matter detection method comprising: a step (S4) of determining foreign matter by comparing with a threshold value.
コンピュータに、被検査物を透過したX線画像を処理して前記被検査物内の混入異物の有無検出を行わせる異物検出プログラムにおいて、
前記X線画像から濃淡エッジ強調画像を生成させ、
前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成させ、
前記濃淡エッジ強調画像から異物候補抽出用に設定された第1の閾値を用いて異物候補を抽出させ、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求めさせ、該評価体積と異物判定用に設定された第2の閾値とを比較することにより異物性の判定を行わせることを特徴とする異物検出プログラム。
In a foreign object detection program for causing a computer to process an X-ray image transmitted through an inspection object and detect the presence or absence of a foreign object in the inspection object,
Generating a gray edge-enhanced image from the X-ray image;
Generating a mask pattern for masking a linear image generated at an edge portion of the inspection object from the X-ray image;
A foreign substance candidate is extracted from the grayscale edge enhanced image using a first threshold set for foreign substance candidate extraction, and the density of the foreign substance candidate is set for a pixel whose position is not masked by the mask pattern. For the masked pixel, a value obtained by subtracting the density of the foreign substance candidate is obtained as an evaluation volume for determining the foreign substance property , and the evaluation volume and the second set for the foreign substance determination are set. A foreign matter detection program for determining foreign matter by comparing with a threshold value.
被検査物(3)にX線を照射するX線照射手段(2)と、前記被検査物を透過したX線を受けてデジタル画像化するX線検出器(4)と、該X線検出器から出力されるデジタル画像をX線画像に対数変換して取り込む画像入力手段(5)と、該画像入力手段によって取り込まれたX線画像を画像処理して被検査物に混入している異物の有無を検出する画像処理手段(6)とを有する異物検出装置において、
前記画像処理手段は
前記X線画像の濃淡エッジを強調して濃淡エッジ強調画像を生成する濃淡エッジ強調手段(61)と、
前記X線画像から前記被検査物のエッジ部に生じる線状画像をマスクするためのマスクパタンを生成するマスクパタン生成手段(65)と、
前記濃淡エッジ強調画像から異物候補を抽出するための所定値である第1の閾値が設定された第1の閾値設定手段(62)と、
異物判定用の所定値である第2の閾値が設定された第2の閾値設定手段(63)と、
前記濃淡エッジ強調画像から前記第1の閾値を用いて異物候補を抽出し、該異物候補の位置が前記マスクパタンでマスクされていない画素については該異物候補の濃度を加算し、マスクされている画素については該異物候補の濃度を減算することにより得られる値を異物性を判定するための評価体積として求め、該評価体積と前記第2の閾値とを比較して異物の有無の判定を行う異物判定手段(64)とから構成されていることを特徴とする異物検出装置。
X-ray irradiation means (2) for irradiating the inspection object (3) with X-rays, an X-ray detector (4) for receiving X-rays transmitted through the inspection object and converting them into digital images, and the X-ray detection Input means (5) for logarithmically converting a digital image output from the instrument into an X-ray image, and foreign matter mixed in the object to be inspected by image processing the X-ray image acquired by the image input means In the foreign object detection device having image processing means (6) for detecting the presence or absence of
Wherein the image processing means,
A light / dark edge emphasizing means (61) for enhancing a light / dark edge of the X-ray image to generate a light / dark edge enhanced image;
Mask pattern generation means (65) for generating a mask pattern for masking a linear image generated at an edge portion of the inspection object from the X-ray image;
A first threshold value setting means (62) in which a first threshold value that is a predetermined value for extracting a foreign substance candidate from the grayscale edge enhanced image is set;
A second threshold value setting means (63) in which a second threshold value that is a predetermined value for foreign object determination is set;
A foreign substance candidate is extracted from the grayscale edge-enhanced image using the first threshold value, and pixels of which the position of the foreign substance candidate is not masked by the mask pattern are added to the density of the foreign substance candidate and masked. For the pixel, a value obtained by subtracting the density of the foreign substance candidate is obtained as an evaluation volume for determining the foreign substance property , and the evaluation volume is compared with the second threshold value to determine the presence or absence of the foreign substance. A foreign matter detection device comprising foreign matter determination means (64).
JP2003382587A 2003-11-12 2003-11-12 Foreign object detection method, foreign object detection program, and foreign object detection device Expired - Lifetime JP3871333B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003382587A JP3871333B2 (en) 2003-11-12 2003-11-12 Foreign object detection method, foreign object detection program, and foreign object detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003382587A JP3871333B2 (en) 2003-11-12 2003-11-12 Foreign object detection method, foreign object detection program, and foreign object detection device

Publications (2)

Publication Number Publication Date
JP2005147751A JP2005147751A (en) 2005-06-09
JP3871333B2 true JP3871333B2 (en) 2007-01-24

Family

ID=34691622

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003382587A Expired - Lifetime JP3871333B2 (en) 2003-11-12 2003-11-12 Foreign object detection method, foreign object detection program, and foreign object detection device

Country Status (1)

Country Link
JP (1) JP3871333B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006064662A (en) * 2004-08-30 2006-03-09 Anritsu Sanki System Co Ltd Foreign matter detection method, foreign matter detection program, and foreign matter detector

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI524755B (en) * 2008-03-05 2016-03-01 半導體能源研究所股份有限公司 Image processing method, image processing system, and computer program
JP7063680B2 (en) 2018-03-29 2022-05-09 住友化学株式会社 Image processing equipment, foreign matter inspection equipment, image processing method, and foreign matter inspection method
CN108802070A (en) * 2018-04-19 2018-11-13 云南电网有限责任公司电力科学研究院 A kind of X-ray non-destructive testing visual guide method and system
CN117315515B (en) * 2023-11-29 2024-03-15 深圳市大易电气实业有限公司 Visual auxiliary inspection method and system for distribution line

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006064662A (en) * 2004-08-30 2006-03-09 Anritsu Sanki System Co Ltd Foreign matter detection method, foreign matter detection program, and foreign matter detector

Also Published As

Publication number Publication date
JP2005147751A (en) 2005-06-09

Similar Documents

Publication Publication Date Title
JP5297142B2 (en) Foreign object detection method and apparatus
US7689055B2 (en) Method and apparatus for enhancing image acquired by radiographic system
CN115375676A (en) Stainless steel product quality detection method based on image recognition
JP4574478B2 (en) X-ray foreign matter detection method and X-ray foreign matter detection device
JP5616182B2 (en) X-ray inspection equipment
JP4542666B2 (en) Foreign object detection method and apparatus by image processing
JP2005024549A (en) X-ray inspection device
JP2016156647A (en) Inspection device using electromagnetic wave
JP2010107456A (en) X-ray inspection device
JP3871333B2 (en) Foreign object detection method, foreign object detection program, and foreign object detection device
JP2008249413A (en) Defect detection method and device
JP4053032B2 (en) Foreign object detection method, foreign object detection program, and foreign object detection device
JP3955558B2 (en) X-ray inspection equipment
JPWO2019235022A1 (en) Inspection equipment
CN116223543A (en) X-ray inspection device, X-ray inspection system, and X-ray inspection method
JP3898144B2 (en) Foreign matter detection method, recording medium recording foreign matter detection program, and foreign matter detection device
JP4545638B2 (en) X-ray foreign object detection device
JP4545637B2 (en) X-ray foreign object detection device
JP5214290B2 (en) X-ray foreign matter inspection apparatus and method for food
JP2000321220A (en) X-ray foreign object detection method
JP2002074332A (en) Method and device for detecting sealing defect of packing material and packing body
JP2004069384A (en) X-ray foreign material detector, x-ray foreign material detecting method, and x-ray foreign material detecting program
JP2020176893A (en) X-ray inspection device
CN116630425B (en) Intelligent food detection system based on X rays
Shao et al. Automatic segmentation of cracks in X-ray image based on OTSU and fuzzy sets

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060420

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: 20060926

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061016

R150 Certificate of patent or registration of utility model

Ref document number: 3871333

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20121027

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20131027

Year of fee payment: 7

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

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

EXPY Cancellation because of completion of term