PCT No. PCT / JP96 / 03778 Sec. 371 Date Apr. 17, 1998 Sec. 102(e) Date Apr. 17, 1998 PCT Filed Dec. 25, 1996 PCT Pub. No. WO98 / 11456 PCT Pub. Date Mar. 19, 1998This invention provides a contaminant-detecting apparatus having
high selectivity and high sensitivity against a contaminant. A product (1) is conveyed to a point where it is irradiated by x-rays from source (3). An x-
ray detector (4), having a predetermined detection unit width in a direction perpendicularly intersecting the conveying direction, then detects the x-rays transmitted through the product. A storage unit (5) stores a two-dimensional distribution of x-
ray intensity detected by the x-
ray detector as a
transmission image in units of pixels. An average calculation unit (7) performs a sum-or-product operation of a kernel, which is equal to or larger than 7x7 pixels, (9x9 or 11x11), and equal to or smaller than (a pixel count corresponding to +E,fra 1 / 2+EE the predetermined x-ray detection unit width)x(pixel count corresponding to +E,fra 1 / 2+EE the predetermined x-ray detection unit width), and includes a target pixel, in units of pixels of the
transmission image stored in the storage unit by using a predetermined
coefficient matrix, thereby calculating the weighted average over the kernel. A difference calculation unit (8) calculates the difference between the x-ray intensity of the target pixel of the
transmission image stored in the storage unit and the weighted average over the kernel of the target pixel which is calculated by the difference calculation unit. A determination unit (9) compares the difference calculated by the difference calculation unit with predetermined criteria, thereby determining presence / absence of a contaminant in the product to be tested.