JP2009229100A - X-ray foreign matter inspection device for food, and method therefor - Google Patents
X-ray foreign matter inspection device for food, and method therefor Download PDFInfo
- Publication number
- JP2009229100A JP2009229100A JP2008071504A JP2008071504A JP2009229100A JP 2009229100 A JP2009229100 A JP 2009229100A JP 2008071504 A JP2008071504 A JP 2008071504A JP 2008071504 A JP2008071504 A JP 2008071504A JP 2009229100 A JP2009229100 A JP 2009229100A
- Authority
- JP
- Japan
- Prior art keywords
- ray
- foreign matter
- inspection
- food
- image data
- 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.)
- Granted
Links
- 238000007689 inspection Methods 0.000 title claims abstract description 111
- 235000013305 food Nutrition 0.000 title claims abstract description 46
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012545 processing Methods 0.000 claims abstract description 45
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 230000005540 biological transmission Effects 0.000 claims abstract description 37
- 230000001678 irradiating effect Effects 0.000 claims abstract description 4
- 239000000126 substance Substances 0.000 claims description 30
- 238000004364 calculation method Methods 0.000 claims description 18
- 238000009826 distribution Methods 0.000 claims description 4
- 238000003860 storage Methods 0.000 claims description 2
- 239000000463 material Substances 0.000 description 9
- 230000032258 transport Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 238000001914 filtration Methods 0.000 description 6
- 238000013500 data storage Methods 0.000 description 5
- 239000011521 glass Substances 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 5
- 239000011347 resin Substances 0.000 description 5
- 229920005989 resin Polymers 0.000 description 5
- 238000012805 post-processing Methods 0.000 description 4
- 230000002950 deficient Effects 0.000 description 3
- 239000006185 dispersion Substances 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 102100036464 Activated RNA polymerase II transcriptional coactivator p15 Human genes 0.000 description 2
- 101000713904 Homo sapiens Activated RNA polymerase II transcriptional coactivator p15 Proteins 0.000 description 2
- 229910004444 SUB1 Inorganic materials 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 239000000470 constituent Substances 0.000 description 2
- 239000002184 metal Substances 0.000 description 2
- 101150080287 SUB3 gene Proteins 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000010894 electron beam technology Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 235000021067 refined food Nutrition 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Images
Abstract
Description
本発明は、食品用X線異物検査装置およびその方法に関し、特に食品などの製品に混入された異物を検出する食品用X線異物検査装置およびその方法に関する。 The present invention relates to a food X-ray foreign substance inspection apparatus and method, and more particularly, to a food X-ray foreign substance inspection apparatus and method for detecting foreign substances mixed in a product such as food.
加工食品などの製品は予め定められた品質に維持するため、製造ラインの後工程で製品に異物が混入していないか検査を行っている。ガラスや樹脂の小片などの微細な異物を目視により検出することは困難であるため、従来X線を用いた異物検査装置が利用されている。 In order to maintain products such as processed foods at a predetermined quality, the products are inspected for foreign matters in the post-production line. Since it is difficult to visually detect fine foreign matters such as glass and resin pieces, a foreign matter inspection apparatus using X-rays has been used.
図10は従来の食品用X線異物検査装置の構成概略を示す図である。図示のようにX線異物検査装置1は、製品の搬送コンベア2上にX線発生部3と、対向する搬送ライン2下にX線検出部4を取り付け、データ処理部5を備えている。
X線発生部3は、食品などの被検査物6にX線を照射している。X線検出部4は、被検査物6を透過したX線を検出している。
FIG. 10 is a diagram showing a schematic configuration of a conventional food X-ray foreign matter inspection apparatus. As shown in the figure, the X-ray foreign
The
このような構成による食品用X線異物検査装置1は、X線発生部3から放射されたX線が被検査物6を透過して対向するX線検出部4で受光される。X線検出部4は、一例として1ラインで素子の1番目から1280番目までスキャン(走査)している。そして被検査物6が搬送コンベア2を移動すると2次元の画像となる。データ処理部5では、X線検出部4のX線画像データが入力されて、予め設定してある異物が混入されたときの基準データなどの閾値と比較して、比較結果に基づいて被検査物6の異物混入の有無を判断している。
In the food X-ray foreign
従来の食品用X線異物検出装置として特許文献1、2が挙げられる。このうち特許文献1は食品パックにX線を照射し、得られたデータから異物を検査する際に、トレンド表示による閾値選定を行っている。このとき閾値を手動で選択している。
また特許文献2は、食品パックにX線を照射し、得られたデータから異物を検査する際に、統計的手法を用いて閾値選定を行い、新たな食品パックを検査するごとに閾値が更新されている。
しかしながら、従来一般の食品用X線異物検査装置では、検出感度が比較的高い金属片は容易に検出することができるが、金属片以外の樹脂、ガラス等の小片は検出し難いという問題があった。これは樹脂、ガラス片などは淡い画像として表示され、異物か否かの判定が難しいためである。また高速なベルトコンベア上でリアルタイムに異物検出処理を行うことは困難であった。 However, a conventional food X-ray foreign substance inspection apparatus can easily detect a metal piece having a relatively high detection sensitivity, but it is difficult to detect small pieces such as resin and glass other than the metal piece. It was. This is because resin, glass pieces, etc. are displayed as pale images and it is difficult to determine whether or not they are foreign objects. Moreover, it has been difficult to perform the foreign object detection process in real time on a high-speed belt conveyor.
また特許文献1に示す異物検出装置では、異常の有無を検出するための基準となる検出リミット値(閾値)をキー操作、すなわち手動により設定している。したがって検査対象が変化するたびに閾値の設定を再設定し直さなければならない。また異物判定の際に、毎回煩わしいパラメータの設定を行わなければならない。
In the foreign object detection device disclosed in
さらに特許文献2に示す異物検出装置では、検査対象数が増加するに従い、閾値が更新され改良されることになるが、データ更新する前の初期状態では誤検出する可能性が高い。
Furthermore, in the foreign substance detection apparatus shown in
そこで本発明は、被検査物中の異物を高精度で検出できる食品用X線異物検査装置およびその方法を提供することを目的としている。
また本発明は、被検査物中の異物の判定処理を高速化できる食品用X線異物検査装置およびその方法を提供することを目的としている。
Accordingly, an object of the present invention is to provide a food X-ray foreign substance inspection apparatus and method that can detect foreign substances in an object to be inspected with high accuracy.
Another object of the present invention is to provide a food X-ray foreign substance inspection apparatus and method that can speed up the process of determining foreign substances in an object to be inspected.
本発明の食品用X線異物検査装置は、被検査物にX線を照射するX線発生部と、前記被検査物を透過した前記X線を検出するX線検出部とを備えた食品用X線異物検査装置において、前記X線検出部が出力したX線透過画像データから分割数の異なる複数の分割画像を生成し、前記分割画像のブロック毎に閾値を算出し2値化して、前記分割画像のピクセル毎の2値化結果に基づいて異物の有無を多数決で判定する画像処理部を備えたことを特徴としている。 An X-ray foreign matter inspection apparatus for food according to the present invention includes a X-ray generation unit that irradiates an inspection object with X-rays, and an X-ray detection unit that detects the X-ray transmitted through the inspection object. In the X-ray foreign substance inspection apparatus, a plurality of divided images having different division numbers are generated from the X-ray transmission image data output by the X-ray detection unit, a threshold value is calculated for each block of the divided images, and binarized. The image processing unit is characterized by determining the presence or absence of a foreign object by majority based on the binarization result for each pixel of the divided image.
この場合において、前記画像処理部は、前記X線検出部から出力された前記X線透過画像データを記憶する記憶手段と、前記X線透過画像データの画像領域を分割数の異なる複数の分割画像に分割する分割手段と、得られた前記分割画像のピクセル毎の2値化結果に基づいて多数決で異物の判定を行う判定手段と、を備えているとよい。
また前記画像処理部は、前記分割画像のブロック毎に濃度ヒストグラムを作成し、前記濃度ヒストグラムに基づいて閾値を算出し2値化する2値化処理手段を備えているとよい。
In this case, the image processing unit stores the X-ray transmission image data output from the X-ray detection unit, and a plurality of divided images having different numbers of divisions of the image area of the X-ray transmission image data. It is preferable that the image forming apparatus includes a dividing unit that divides the image into two and a determination unit that determines a foreign object by majority vote based on the binarization result for each pixel of the obtained divided image.
The image processing unit may include binarization processing means for creating a density histogram for each block of the divided image, calculating a threshold value based on the density histogram, and binarizing the threshold value.
本発明の食品用X線異物検査方法は、搬送ライン上の被検査物にX線を照射して、前記被検査物のX線透過画像データを収集して、前記被検査物の異物を検査する食品用X線異物検査方法において、前記X線透過画像データを分割数の異なる複数の分割画像に分割し、前記分割画像のブロック毎に閾値を算出し2値化し、前記分割画像のピクセル毎の2値化結果に基づいて異物の存在を多数決で判定することを特徴としている。 The X-ray foreign matter inspection method for food according to the present invention irradiates an inspection object on a transport line with X-rays, collects X-ray transmission image data of the inspection object, and inspects the foreign object of the inspection object. In the X-ray foreign substance inspection method for food, the X-ray transmission image data is divided into a plurality of divided images having different division numbers, a threshold value is calculated for each block of the divided images, and binarized. Based on the binarization result, the presence of foreign matter is determined by majority vote.
また本発明の食品用X線異物検査方法は、搬送ライン上の被検査物にX線を照射して、前記被検査物のX線透過画像データを収集して、検査対象内の異物を統計量に基づいた閾値選定を用いて判定する食品用X線異物検査方法において、前記閾値選定は、X線透過量の濃度ヒストグラムを前記異物と前記被検査物の2クラスに分け、その2つのクラスを正規分布と仮定し、平均誤認識率を最小とするような閾値を計算する過程において、前記閾値をkとしたときの分散をσ2 k、各濃度レベルをi、前記閾値をkとしたときの平均をμk、濃度レベルが現れる確率をpiとしたときに
本発明の食品用X線異物検査方法は、搬送ライン上の被検査物にX線を照射して、前記被検査物のX線透過画像データを収集して、被検査物の異物を検査する食品用X線異物検査方法において、前記X線透過画像データを分割数の異なる複数の分割画像に分割し、前記分割画像のブロック毎に、X線透過量の濃度ヒストグラムを前記異物と前記被検査物の2クラスに分け、その2つのクラスを正規分布と仮定し、平均誤認識率を最小とするような閾値を計算する過程において、前記閾値の計算過程において、分散計算を近似式で行い、算出された前記閾値を2値化し、前記分割画像のピクセル毎の2値化結果に基づいて前記異物の存在を多数決で判定することを特徴としている。 In the X-ray foreign matter inspection method for food according to the present invention, X-rays are applied to the inspection object on the transport line, X-ray transmission image data of the inspection object is collected, and the foreign object of the inspection object is inspected. In the X-ray foreign matter inspection method for food, the X-ray transmission image data is divided into a plurality of divided images having different numbers of divisions, and a density histogram of the X-ray transmission amount is determined for each block of the divided images. Dividing into two classes of objects, assuming that the two classes are normal distributions, in the process of calculating a threshold value that minimizes the average misrecognition rate, in the threshold calculation process, variance calculation is performed with an approximate expression, The calculated threshold value is binarized, and the presence of the foreign matter is determined by majority decision based on the binarization result for each pixel of the divided image.
上記構成による本発明の食品用X線異物検査装置によれば、X線透過画像データから分割数の異なる複数の分割画像を生成し、分割画像のブロック毎に閾値を算出し2値化して、分割画像のピクセル毎の2値化結果に基づいて異物の有無を多数決で判定することができる。また検査対象が変化した場合であっても、X線検出部で出力されたX線透過画像データに基づいて閾値を算出しているので、閾値を手動設定あるいは更新する必要がない。検査の初期段階においても異物を誤検出することがない。また検出精度が向上し、樹脂、ガラス等の小片であっても精度良く検出することができる。
また分割画像のピクセル毎の2値化結果に基づいて異物の有無を多数決で判定しているので、異常な異物の候補の絞込みを行い判定の制度が良くなり、誤検出の可能性が低くなる。
According to the X-ray foreign substance inspection apparatus for food of the present invention having the above configuration, a plurality of divided images having different division numbers are generated from X-ray transmission image data, a threshold value is calculated for each block of the divided image, and binarized Based on the binarization result for each pixel of the divided image, the presence or absence of foreign matter can be determined by majority vote. Even when the inspection object changes, the threshold value is calculated based on the X-ray transmission image data output by the X-ray detection unit, and therefore it is not necessary to manually set or update the threshold value. Even in the initial stage of inspection, foreign matters are not erroneously detected. Further, the detection accuracy is improved, and even a small piece such as resin or glass can be detected with high accuracy.
In addition, since the presence / absence of foreign matter is determined by majority decision based on the binarization result for each pixel of the divided image, the determination system is improved by narrowing down abnormal foreign material candidates, and the possibility of erroneous detection is reduced. .
本発明の食品用X線異物検査装置およびその方法の詳細な実施形態を以下添付の図面を参照しながら説明する。
図1は実施形態に係る食品用X線異物検査装置の構成概略を示す図である。図2は実施形態に係る食品用X線異物検査装置のブロック図である。図1に示すように食品用X線異物検査装置10は、被検査物12となる食品などの製品の搬送コンベア14上に取り付けている。搬送コンベア14は、所定の搬送速度で被検査物12を後段の後処理工程へと搬送している。
Detailed embodiments of a food X-ray foreign substance inspection apparatus and method according to the present invention will be described below with reference to the accompanying drawings.
FIG. 1 is a diagram showing a schematic configuration of a food X-ray foreign substance inspection apparatus according to an embodiment. FIG. 2 is a block diagram of the food X-ray foreign substance inspection apparatus according to the embodiment. As shown in FIG. 1, a food X-ray foreign
食品用X線異物検査装置10は、X線発生部20と、X線検出部(ラインセンサ)30と、画像処理部40と、選別部50と、画像表示部60とを主な構成要件としている。
X線発生部20は、搬送コンベア14の横断方向に沿って設けられた円筒状のX線管を用いている。X線管は陰極から電子ビームを陽極ターゲットに照射させてX線を生成している。X線管のX線は後述するX線検出部30に向けて照射している。
The X-ray foreign
The
X線検出部(ラインセンサ)30は、搬送コンベア14上のX線発生部20と対向する搬送コンベア14の下部に設けている。X線検出部30は、X線発生部と同様に搬送コンベア14の横断方向に沿って設けられている。X線検出部30は、被検査物12を透過したX線の透過量に応じた電気信号を出力している。本実施形態では、X線検出部30としてラインセンサを用いている。
The X-ray detection part (line sensor) 30 is provided in the lower part of the
X線検出部30で検出したX線透過画像データは電気的に接続された画像処理部40に入力される。
画像処理部40は、CPUやメモリなどで構成されているが、具体的にはデータ記憶手段41と、画像切り出し手段42、フィルタ処理手段43、画像分割手段44と、2値化処理手段45と、判定手段46を主な構成要件としている。
データ記憶手段41は、X線検出部30で検出された各被検査物のX線透過画像データが入力し記憶される。
The X-ray transmission image data detected by the
The
The data storage means 41 receives and stores X-ray transmission image data of each inspection object detected by the
画像切り出し手段42は、被検査物12と判断可能なあらかじめ大まかな閾値を設定してあり、X線透過画像データ全体の中で、その閾値以下の濃度値を持つデータを被検査物12と異物13の画像データとして切り出す。具体的には、図3(1)に示すようにX線透過画像データのうち、被検査物12の画像データ部分を残し、被検査物12以外の空白部分、すなわち背景を切り出している(図3(2))。
The image cutout means 42 is set in advance with a rough threshold value that can be determined as the
一般にX線検出部30で検出したX線透過画像データは、ノイズが生じている。そこでフィルタ処理手段43は、発生したノイズを除去するとともに異物13を強調して異物13の有無の判定精度を高めるために、フィルタリング処理を行っている。本実施形態のフィルタリング処理は、具体的にメディアンフィルタ、平滑化フィルタ、Max−Minフィルタによる3種類のフィルタ処理を行っている。まずメディアンフィルタは、ある画素の周辺画素の濃度を順に並べて中央値を画素の濃度として、ノイズの除去を行う。
Generally, noise is generated in the X-ray transmission image data detected by the
平滑化フィルタは、ある画素の周辺画素の濃度の平均値をその画素の濃度として、ノイズの除去を行う。
Max−Minフィルタは、ある画素の周辺画素の濃度値の最大値と最小値を取り出し、その差をある画素の濃度値と足し合わせて濃度値として、異物13を強調している(図3(3))。
The smoothing filter removes noise using the average value of the densities of peripheral pixels of a certain pixel as the density of the pixel.
The Max-Min filter takes out the maximum value and the minimum value of the density values of peripheral pixels of a certain pixel, and adds the difference to the density value of a certain pixel as a density value to emphasize the foreign matter 13 (FIG. 3 ( 3)).
画像分割手段44は、フィルタ処理手段によるフィルタ処理後のX線透過画像データを、分割数の異なる複数の分割画像を生成する。分割数は、一例として3×3分割〜9×9分割の7パターンを設定することができる。また分割数は被検査物の画像データに応じてn×n分割、n×m分割など、任意に設定変更可能であり、少なくとも3以上の奇数回に設定している。この奇数回の設定は後述する判定手段46による判定を容易にするためである。
The
2値化処理手段45は、濃淡画像から2値化画像を取得する2値化処理を行っている。具体的に2値化処理手段45は、画像分割手段44により生成した複数の分割数で分割した分割画像のブロック毎に濃度ヒストグラムを作成する。図4は2値化処理における画像データの説明図である。図4(1)に示す濃度ヒストグラムは、横軸に濃度値(明暗)を、縦軸に画素数(頻度)をそれぞれ表示している。図示のように5×5分割の分割画像は、25個のブロックが生成する。そして各ブロックにそれぞれ濃度ヒストグラムを作成する。濃度ヒストグラムは図示のように被検査物の画像に基づいて通常2つの山が生成する。この2つの山の間に生じる谷部分の位置を閾値とし、異物側(濃度の暗い)をクラス1、製品(被検査物)側(濃度の明るい)をクラス2とする。最適な閾値は、数式2に示す評価関数J(k)が最小となる閾値kを求めることで選定される。
ここで数式2中の閾値をkとしたときのクラス1の分散をσ1(k)、クラス2の分散をσ2(k)、クラス1の生起確率をω1(k)、クラス2の生起確率ω2(k)とし、一般に数式2中のクラス1、2の分散σ1(k)、σ2(k)は数式3に示す式を用いて算出する。
ここで数式3の閾値をkとしたときの分散をσ2 k、各濃度レベルをi、閾値をkとしたときの平均をμk、濃度レベルが現れる確率をpiとしている。
数式3を用いる方法によれば、各kについて計算を行う必要があり、最大の濃度レベルをLとしたとき、全体としてLステップの計算が必要となり、全体の計算オーダーがLの二乗に比例することとなる。このことから、算出までに時間がかかり異物検出の処理時間が長時間化してしまうという問題があった。そこで本実施形態では数式4に示すように分散式(数式3)を近似化(数式1)している。
理論的には、
According to the
In theory,
また今回の例においては、各ピクセルの濃度データを12Bitで表現するため最大の濃度レベルLは、4095である。分散の算出時間は理論上最大で1/4095に算出時間が短縮できることとなり、分散を含めた総計算時間の実測値は数式3を用いる方法で約20秒、数式1を用いることで約0.2秒となり約1/100短縮されている。
In this example, since the density data of each pixel is expressed by 12 bits, the maximum density level L is 4095. The calculation time of the dispersion can theoretically be shortened to 1/4095 at maximum, and the actual value of the total calculation time including the dispersion is approximately 20 seconds by the
上記数式1によりブロック毎の閾値を選定し、ブロックの画像データを2値化する。上記数式1による閾値設定は、ブロック毎に必ず設定している。したがって、ブロック中に製品(被検査物)または背景のいずれか一方のみの画像が表示されている場合には、濃度ヒストグラムに山が1つ生じる。本実施形態ではこのような場合であっても閾値を設定することになる。そうすると、異物がない場合であっても、異物があると誤判定することがある。したがってこの誤判定を回避するため以下に示す後処理を行っている。後処理は次の2つの工程からなる。
The threshold value for each block is selected by the
まずブロックの長方形の周が一定以上残るか否かを判断する。具体的には、図4(2)に示すように異物13があると判断されたブロックに対し、ブロックに囲まれた異物13の外周(破線)をAとし、ブロックの外周長さBとする。そしてA/Bの値P1(0<P1<1)が設定パラメータPa以上の場合にはその部分に異物13はなく、背景であると判断する。
設定パラメータPaは、あらかじめ良品の被検査物12のX線透過画像データに基づいて、異物13が検出されない値をパラメータとして設定する。
First, it is determined whether or not the circumference of the block rectangle remains above a certain level. Specifically, as shown in FIG. 4 (2), for a block in which it is determined that there is a
As the setting parameter Pa, a value at which the
次に一定の閾値以上になるか否かを判断する。すなわち良品画像に対して閾値設定を行った場合、ノイズなどにより、濃度ヒストグラムの濃度値が高い部分に閾値が設定され、良品であるにもかかわらず、長方形領域のほとんどの部分が異物13として判定される場合があり、これを避けるためである。具体的には図4(2)に示すように異物13があると判断されたブロックに対し、異物部分の濃度値Cが設定パラメータPb以上の場合にはその部分に異物13はなく、背景であると判断する。設定パラメータPbの設定は、前述の長方形の周の長さと同様にあらかじめ良品の被検査物12のX線透過画像データに基づいて、異物13が検出されない値をパラメータとして設定する。
Next, it is determined whether or not a certain threshold value is exceeded. That is, when a threshold value is set for a non-defective image, a threshold value is set for a portion having a high density value in the density histogram due to noise or the like. This is to avoid this. Specifically, as shown in FIG. 4 (2), when the density value C of the foreign matter portion is greater than or equal to the set parameter Pb with respect to the block in which the
判定手段46は、2値化処理手段45による2値化結果から被検査物12中の異物13の有無を判定する。判定手段46は、奇数枚の分割画像の各座標データ(ピクセル)をすべてチェックし、異物有りと判定された複数の分割画像データの多数決により過半数以上あるとした場合に異物有りと判定する。
The
選別部50は、前記画像処理部40と電気的に接続している。搬送部50は画像処理部40の被検査物中に含まれる異物の検出信号に基づいて、搬送コンベア14上の移動する該等被検査物を搬送コンベア14上から除去する。実施形態の選別部50は、一例として搬送コンベア14上面に選別アーム52を配置している。選別アーム52は、一端を駆動手段に回動可能に取り付けている。この構成により、搬送アーム52は一端を支点に搬送コンベア14上を揺動し、他端で搬送コンベア14上の被検査物を搬送路外へ押し出している。
The sorting
画像表示部60は、画像処理部40と電気的に接続しており、画像処理部40で処理された画像データを表示する。画像表示部60は具体的には、異物の有無を示す被検査物12全体の画像データを表示している。
The
次に、上記構成による食品用X線異物検査装置の検査方法について以下説明する。図5は食品用X線異物検査の異物検査処理手順を示すフローチャートである。
搬送コンベア14上を搬送する被検査物12にX線発生部20からX線を照射する。被検査物12を透過したX線は、X線発生部20と対向するX線検出部30で検出される。X線検出部30は、透過したX線の透過量に応じた電気信号を画像処理部40のデータ記憶手段41に出力する。データ記憶手段41では、前記電気信号をX線透過画像データとして記憶される。
Next, an inspection method of the food X-ray foreign substance inspection apparatus having the above configuration will be described below. FIG. 5 is a flowchart showing a foreign matter inspection processing procedure for food X-ray foreign matter inspection.
X-rays are irradiated from the
図5に示すようにまず記憶領域から演算用メモリにX線透過画像データを転送し(S100)、後段の画像切り出し手段42に入力する。
次に閾値による製品画像の切り出しを行う(S110)。図3(1)に示すようなX線透過画像データのうち、被検査物12の画像データ部分を残し、被検査物12以外の空白部分、すなわち背景を切り出している(図3(2)に示す)。
As shown in FIG. 5, first, the X-ray transmission image data is transferred from the storage area to the calculation memory (S100), and input to the subsequent image cutout means 42.
Next, the product image is cut out based on the threshold (S110). In the X-ray transmission image data as shown in FIG. 3 (1), the image data portion of the
そして切り出したX線透過画像データのフィルタ処理(SUB1)を行う(S120)。図6はフィルタ処理を示すフローチャートである。図示のようにフィルタ処理(SUB1)は、まずメディアンフィルタにより2回のフィルタ処理を行うことにより(S200,210)、異常値(周辺の値に比べて飛び抜けた濃度値)を除去している。 Then, filtering processing (SUB1) of the cut out X-ray transmission image data is performed (S120). FIG. 6 is a flowchart showing the filtering process. As shown in the figure, in the filtering process (SUB1), first, the filtering process is performed twice by the median filter (S200, 210), thereby removing the abnormal value (the density value that is outstanding compared to the surrounding values).
次にこれだけでは濃度値の急な変化を除去できないため、平滑化フィルタをかけて平滑化し取り除く(S220)。
そしてMax−Minフィルタをかけて異物13を強調する(S230)。さらに最後にメディアンフィルタにより2回のフィルタ処理を行い強調されたノイズを除去している(S240,250)。なお実施形態に係るフィルタ処理は、一例であり、画像データに応じてフィルタ処理の回数、組み合わせ、順番等は任意に設定変更することができる。
Next, since it is not possible to remove a sudden change in density value by this alone, it is smoothed and removed by applying a smoothing filter (S220).
The Max-Min filter is applied to emphasize the foreign matter 13 (S230). Finally, the enhanced noise is removed by performing filter processing twice by the median filter (S240, 250). Note that the filter processing according to the embodiment is an example, and the number, combination, order, and the like of the filter processing can be arbitrarily set and changed according to the image data.
次に2値化・判定処理を行う(S130)。図7は2値化・判定処理を示すフローチャートである。
図7に示すようにまず投票する数に応じた演算用メモリを確保する(S300)。次に分割数に応じた動的閾値設定(SUB3)を行う。図8は2値化処理を示すフローチャートである。
Next, binarization / determination processing is performed (S130). FIG. 7 is a flowchart showing binarization / determination processing.
As shown in FIG. 7, first, a memory for calculation corresponding to the number of votes is secured (S300). Next, dynamic threshold setting (SUB3) according to the number of divisions is performed. FIG. 8 is a flowchart showing the binarization process.
図8に示すように、フィルタ処理されたX線透過画像データに対し、分割数の異なる複数の分割画像を生成する(S400)。分割数は、一例として3×3分割〜9×9分割の7パターンを設定することができる。 As shown in FIG. 8, a plurality of divided images having different division numbers are generated for the filtered X-ray transmission image data (S400). As an example of the number of divisions, seven patterns of 3 × 3 divisions to 9 × 9 divisions can be set.
次に分割した分割数のことなる分割画像のそれぞれのブロックに対して閾値を設定する(S410)。画像分割手段44により生成した複数の分割数で分割した分割画像のブロック毎に濃度ヒストグラムを作成する。そして前記数式1を計算過程に利用し、統計的に閾値設定を行う。
Next, a threshold value is set for each block of the divided image having a different number of divisions (S410). A density histogram is created for each block of the divided image divided by a plurality of division numbers generated by the image dividing means 44. Then, the threshold value is statistically set using
前記閾値設定において、異物がないにも係わらず異物があると誤判定したブロックに対して誤判定を回避するための後処理を行う。
まずブロックの長方形の周が一定以上残るか否かを判断する(S420)。図4(2)に示すように異物があると判断されたブロックに対し、ブロックに囲まれた異物の外周(破線)をAとし、ブロックの外周長さBとする。そしてA/Bの値P1(0<P1<1)が設定パラメータPa以上の場合にはその部分に異物はなく、背景であると判断する(S440)。
In the threshold setting, post-processing for avoiding erroneous determination is performed on a block that has been erroneously determined to have foreign matter despite the absence of foreign matter.
First, it is determined whether or not the circumference of the block rectangle remains above a certain level (S420). As shown in FIG. 4 (2), for a block that is determined to have a foreign object, the outer periphery (broken line) of the foreign object surrounded by the block is A and the outer peripheral length B of the block. If the A / B value P1 (0 <P1 <1) is greater than or equal to the set parameter Pa, it is determined that there is no foreign matter and that the background is the background (S440).
一方P1が設定パラメータPaよりも小さい値の場合には、次の工程、すなわち一定の閾値以上になるか否かを判断する(S430)。図4(2)に示すように異物があると判断されたブロックに対し、異物部分の濃度値Cが設定パラメータPb以上の場合にはその部分に異物はなく、背景であると判断する(S440)。 On the other hand, when P1 is a value smaller than the set parameter Pa, it is determined whether or not the next step, that is, a certain threshold value or more (S430). As shown in FIG. 4 (2), if the density value C of the foreign substance portion is greater than or equal to the set parameter Pb with respect to the block determined to have foreign matters, it is determined that there is no foreign matter and that the background is the background (S440). ).
S420で濃度値Cが設定パラメータPbよりも低い値であり、かつ、S430においても設定パラメータよりも低い値の場合には異物があると判断される(S450)。 If the density value C is lower than the setting parameter Pb in S420 and also lower than the setting parameter in S430, it is determined that there is a foreign substance (S450).
次に2値化処理手段45による2値化結果から被検査物12中の異物の有無を判定する。異物の候補が一定以上であるか否かの判定を行う(S320)。奇数枚の分割画像の各座標データ(ピクセル)をすべてチェックし、異物有りと判定された複数の分割画像データの多数決により過半数以上あるとした場合に異物有りと判定する(S340)。図9は分割画像データの説明図である。一例として図示のように3×3分割、4×4分割、5×5分割の分割画像データの場合、4×4分割画像には異物13なしと判定されている。しかし3×3分割および5×5分割画像では、異物13有りと判定されているため、多数決により結果的に異物13有りと判定する。一方、多数決により異物13なしの分割画像が多い場合には結果的に異物なしと判定される(S330)。
Next, the presence or absence of foreign matter in the
画像処理手段40と電気的に接続する画像表示部60で得られた異物があると判定された画像データを表示する(S350)。また異物有りと判定された被検査物の検出信号が選別部50に送られ、選別アーム52により該当する被検査物12を搬送コンベア14上から除去している。
The image data determined to have foreign matter obtained by the
このようなX線異物検査装置によれば、閾値設定時間を大幅に短縮することができ、高い精度で被検査物中の異物を検出することができる。また検査対象が変化した場合であっても、X線検出部で出力されたX線透過画像データに基づいて閾値を設定しているので、閾値を手動設定あるいは更新する必要がない。検査の初期段階においても異物を誤検出することがない。また検出精度が向上し、樹脂、ガラス等の小片であっても精度良く検出することができる。 According to such an X-ray foreign substance inspection apparatus, the threshold setting time can be greatly shortened, and the foreign substance in the inspection object can be detected with high accuracy. Even when the inspection object changes, the threshold value is set based on the X-ray transmission image data output from the X-ray detection unit, so that it is not necessary to manually set or update the threshold value. Even in the initial stage of inspection, foreign matters are not erroneously detected. Further, the detection accuracy is improved, and even a small piece such as resin or glass can be detected with high accuracy.
1………食品用X線異物検査装置、2………搬送コンベア、3………X線発生部、4………X線検出部、5………データ処理部、6………被検査物、10………食品用X線異物検査装置、12………被検査物、13………異物、14………搬送コンベア、20………X線発生部、30………X線検出部(ラインセンサ)、40………画像処理部、41………データ記憶手段、42………画像切り出し手段、43………フィルタ処理手段、44………画像分割手段、45………2値化処理手段、46………判定手段、50………選別部、52………選別アーム、60………画像表示部。
DESCRIPTION OF
Claims (6)
前記X線検出部が出力したX線透過画像データから分割数の異なる複数の分割画像を生成し、前記分割画像のブロック毎に閾値を算出し2値化して、前記分割画像のピクセル毎の2値化結果に基づいて異物の有無を多数決で判定する画像処理部を備えたことを特徴とする食品用X線異物検査装置。 In a food X-ray foreign substance inspection apparatus comprising: an X-ray generation unit that irradiates an X-ray on an inspection object; and an X-ray detection unit that detects the X-ray transmitted through the inspection object.
A plurality of divided images having different numbers of divisions are generated from the X-ray transmission image data output by the X-ray detection unit, a threshold value is calculated for each block of the divided image, and binarized to obtain 2 for each pixel of the divided image. An X-ray foreign substance inspection apparatus for food, comprising an image processing unit for determining the presence or absence of a foreign substance based on a majority result based on a valuation result.
前記画像処理部は、
前記X線検出部から出力された前記X線透過画像データを記憶する記憶手段と、
前記X線透過画像データの画像領域を分割数の異なる複数の分割画像に分割する分割手段と、
得られた前記分割画像のピクセル毎の2値化結果に基づいて多数決で異物の判定を行う判定手段と、
を備えたことを特徴とする食品用X線異物検査装置。 The food X-ray foreign matter inspection device according to claim 1,
The image processing unit
Storage means for storing the X-ray transmission image data output from the X-ray detector;
Division means for dividing the image region of the X-ray transmission image data into a plurality of divided images having different division numbers;
Determination means for determining foreign matter by majority based on the binarization result for each pixel of the obtained divided image;
An X-ray foreign matter inspection apparatus for food, comprising:
前記画像処理部は、
前記分割画像のブロック毎に濃度ヒストグラムを作成し、前記濃度ヒストグラムに基づいて閾値を算出し2値化する2値化処理手段を備えたことを特徴とする食品用X線異物検査装置。 The food X-ray foreign matter inspection device according to claim 1 or 2,
The image processing unit
An X-ray inspection apparatus for food, comprising binarization processing means for creating a density histogram for each block of the divided image, calculating a threshold value based on the density histogram, and binarizing the threshold value.
前記X線透過画像データを分割数の異なる複数の分割画像に分割し、
前記分割画像のブロック毎に閾値を算出し2値化し、
前記分割画像のピクセル毎の2値化結果に基づいて異物の存在を多数決で判定することを特徴とする食品用X線異物検査方法。 In the X-ray inspection method for foods for irradiating the inspection object on the transport line, collecting X-ray transmission image data of the inspection object, and inspecting the foreign object of the inspection object,
Dividing the X-ray transmission image data into a plurality of divided images having different division numbers;
Threshold value is calculated and binarized for each block of the divided image,
An X-ray foreign matter inspection method for food, wherein the presence of foreign matter is determined by majority based on the binarization result for each pixel of the divided image.
前記閾値選定は、X線透過量の濃度ヒストグラムを前記異物と前記被検査物の2クラスに分け、その2つのクラスを正規分布と仮定し、平均誤認識率を最小とするような閾値を計算する過程において、前記閾値をkとしたときの分散をσ2 k、各濃度レベルをi、前記閾値をkとしたときの平均をμk、濃度レベルが現れる確率をpiとしたときに
In selecting the threshold, the density histogram of the amount of X-ray transmission is divided into two classes, the foreign object and the object to be inspected, and the two classes are assumed to be a normal distribution, and a threshold value that minimizes the average misrecognition rate is calculated. In this process, when the threshold is k, the variance is σ 2 k , each density level is i, the average when the threshold is k is μ k , and the probability that the density level appears is p i.
前記X線透過画像データを分割数の異なる複数の分割画像に分割し、
前記分割画像のブロック毎に、X線透過量の濃度ヒストグラムを前記異物と前記被検査物の2クラスに分け、その2つのクラスを正規分布と仮定し、平均誤認識率を最小とするような閾値を計算する過程において、前記閾値の計算過程において、分散計算を近似式で行い、算出された前記閾値を2値化し、前記分割画像のピクセル毎の2値化結果に基づいて前記異物の存在を多数決で判定することを特徴とする食品用X線異物検査方法。 In the X-ray inspection method for foods for irradiating the inspection object on the transport line, collecting X-ray transmission image data of the inspection object, and inspecting the foreign object of the inspection object,
Dividing the X-ray transmission image data into a plurality of divided images having different division numbers;
For each block of the divided image, the density histogram of the amount of X-ray transmission is divided into two classes of the foreign matter and the object to be inspected, and the two classes are assumed to be a normal distribution, and the average error recognition rate is minimized. In the process of calculating the threshold value, in the threshold value calculation process, the variance calculation is performed with an approximate expression, the calculated threshold value is binarized, and the presence of the foreign matter based on the binarization result for each pixel of the divided image A method for inspecting X-ray foreign matter for food, characterized in that determination is made by majority vote.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008071504A JP5214290B2 (en) | 2008-03-19 | 2008-03-19 | X-ray foreign matter inspection apparatus and method for food |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008071504A JP5214290B2 (en) | 2008-03-19 | 2008-03-19 | X-ray foreign matter inspection apparatus and method for food |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009229100A true JP2009229100A (en) | 2009-10-08 |
JP5214290B2 JP5214290B2 (en) | 2013-06-19 |
Family
ID=41244691
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008071504A Active JP5214290B2 (en) | 2008-03-19 | 2008-03-19 | X-ray foreign matter inspection apparatus and method for food |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5214290B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011196778A (en) * | 2010-03-18 | 2011-10-06 | Anritsu Sanki System Co Ltd | X-ray foreign matter detector |
JP2016170110A (en) * | 2015-03-13 | 2016-09-23 | 株式会社イシダ | X-ray inspection device |
JP2019164156A (en) * | 2018-02-14 | 2019-09-26 | 株式会社イシダ | Inspection apparatus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07286974A (en) * | 1994-04-18 | 1995-10-31 | Toshiba Corp | Wettability measuring device and method |
JP2005172510A (en) * | 2003-12-09 | 2005-06-30 | Ishida Co Ltd | Radiation foreign matter inspection apparatus and radiation foreign matter inspection method |
JP2007024835A (en) * | 2005-07-21 | 2007-02-01 | Anritsu Sanki System Co Ltd | Method and apparatus for detecting foreign substance by x-ray |
JP2007218749A (en) * | 2006-02-17 | 2007-08-30 | Hitachi Zosen Corp | Method and apparatus for discriminating matter |
JP2007333562A (en) * | 2006-06-15 | 2007-12-27 | Anritsu Sanki System Co Ltd | X-ray foreign matter detector |
-
2008
- 2008-03-19 JP JP2008071504A patent/JP5214290B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07286974A (en) * | 1994-04-18 | 1995-10-31 | Toshiba Corp | Wettability measuring device and method |
JP2005172510A (en) * | 2003-12-09 | 2005-06-30 | Ishida Co Ltd | Radiation foreign matter inspection apparatus and radiation foreign matter inspection method |
JP2007024835A (en) * | 2005-07-21 | 2007-02-01 | Anritsu Sanki System Co Ltd | Method and apparatus for detecting foreign substance by x-ray |
JP2007218749A (en) * | 2006-02-17 | 2007-08-30 | Hitachi Zosen Corp | Method and apparatus for discriminating matter |
JP2007333562A (en) * | 2006-06-15 | 2007-12-27 | Anritsu Sanki System Co Ltd | X-ray foreign matter detector |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011196778A (en) * | 2010-03-18 | 2011-10-06 | Anritsu Sanki System Co Ltd | X-ray foreign matter detector |
JP2016170110A (en) * | 2015-03-13 | 2016-09-23 | 株式会社イシダ | X-ray inspection device |
JP2019164156A (en) * | 2018-02-14 | 2019-09-26 | 株式会社イシダ | Inspection apparatus |
US11977036B2 (en) | 2018-02-14 | 2024-05-07 | Ishida Co., Ltd. | Inspection device |
Also Published As
Publication number | Publication date |
---|---|
JP5214290B2 (en) | 2013-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4317566B2 (en) | X-ray inspection apparatus and method for generating image processing procedure of X-ray inspection apparatus | |
US7260177B2 (en) | X-ray inspection apparatus | |
JP4574478B2 (en) | X-ray foreign matter detection method and X-ray foreign matter detection device | |
JP2007017163A (en) | Evaluation method of granular product | |
JP2016156647A (en) | Inspection device using electromagnetic wave | |
JP2010107456A (en) | X-ray inspection device | |
JP5243008B2 (en) | X-ray foreign object detection device | |
JP5214290B2 (en) | X-ray foreign matter inspection apparatus and method for food | |
JP2005003480A (en) | X-ray examination apparatus | |
JP3917129B2 (en) | X-ray inspection equipment | |
JP3955558B2 (en) | X-ray inspection equipment | |
JP2007071789A (en) | Chestnut quality inspection method | |
JP2005031069A (en) | X-ray inspection apparatus | |
JP3828843B2 (en) | X-ray foreign object detection device, X-ray foreign object detection method, and X-ray foreign object detection program | |
US20210295488A1 (en) | Image processing apparatus for image inspection, image processing method, and storage medium | |
JP4170366B2 (en) | X-ray inspection equipment | |
JP4545638B2 (en) | X-ray foreign object detection device | |
JP3860144B2 (en) | X-ray inspection equipment | |
JP3871333B2 (en) | Foreign object detection method, foreign object detection program, and foreign object detection device | |
JP4291123B2 (en) | Radiation foreign matter inspection apparatus and radiation foreign matter inspection method | |
JP3955559B2 (en) | X-ray inspection equipment | |
JP2000321220A (en) | X-ray foreign object detection method | |
JP2008175691A (en) | X-ray inspection apparatus and inspection method | |
JP4566940B2 (en) | Inspection apparatus and PTP sheet manufacturing apparatus | |
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: 20101029 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20101029 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120530 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120604 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120703 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20120802 |
|
RD13 | Notification of appointment of power of sub attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7433 Effective date: 20120802 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20120802 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120823 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20120823 |
|
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: 20130219 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130227 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5214290 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: 20160308 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 |
|
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 |