  X-ray imaging is a widely used technique for non-destructive inspection of
agricultural food products. One application of X-ray imaging is the autonomous,
in-line detection of foreign objects in food samples. Examples of such
inclusions are bone fragments in meat products, plastic and metal debris in
fish, fruit infestations. This article presents a processing methodology for
unsupervised foreign object detection based on dual-energy X-ray absorptiometry
(DEXA). A foreign object is defined as a fragment of material with different
X-ray attenuation properties than those belonging to the food product. A novel
thickness correction model is introduced as a pre-processing technique for DEXA
data. The aim of the model is to homogenize regions in the image that belong to
the food product and enhance contrast where the foreign object is present. In
this way, the segmentation of the foreign object is more robust to noise and
lack of contrast. The proposed methodology was applied to a dataset of 488
samples of meat products. The samples were acquired from a conveyor belt in a
food processing factory. Approximately 60\% of the samples contain foreign
objects of different types and sizes, while the rest of the samples are void of
foreign objects. The results show that samples without foreign objects are
correctly identified in 97% of cases, the overall accuracy of foreign object
detection reaches 95%.
