An X-ray scanning apparatus for locating a contaminant in a product, the apparatus comprising: means for generating an X-ray image of the product; means for assigning a grey scale value to a plurality of pixels of said image; characterised by further comprising: means for identifying a plurality of suspect pixels: means adapted to, for each suspect pixel: select two neighbouring pixels in a first direction lying on opposed sides of the suspect pixel and determines which of the first direction pixels has the lowest grey value; select two neighbouring pixels in a second direction lying on opposed sides of the suspect pixel and determines which of the second direction pixels has the lowest grey value; determine a first direction difference value by taking the grey value difference between the lowest grey value first direction pixel and the grey value of the suspect; determine a second direction difference value by taking the grey value difference between the lowest grey value second direction pixel and the grey value of the suspect; weight the first direction difference value in dependence on the grey value of the lowest grey value first direction pixel; weight the second direction difference value in dependence on the grey value of the lowest grey value second direction pixel; determine a first direction score from the weighted first direction difference value; determine a second direction score from the weighted second direction difference value; compare said scores with a threshold value; and identify the suspect pixel as representing a contaminant if said threshold value is exceeded. means for generating an X-ray image of the product; means for assigning a grey scale value to a plurality of pixels of said image; means for identifying a plurality of suspect pixels: means adapted to, for each suspect pixel: select two neighbouring pixels in a first direction lying on opposed sides of the suspect pixel and determines which of the first direction pixels has the lowest grey value; select two neighbouring pixels in a second direction lying on opposed sides of the suspect pixel and determines which of the second direction pixels has the lowest grey value; determine a first direction difference value by taking the grey value difference between the lowest grey value first direction pixel and the grey value of the suspect; determine a second direction difference value by taking the grey value difference between the lowest grey value second direction pixel and the grey value of the suspect; weight the first direction difference value in dependence on the grey value of the lowest grey value first direction pixel; weight the second direction difference value in dependence on the grey value of the lowest grey value second direction pixel; determine a first direction score from the weighted first direction difference value; determine a second direction score from the weighted second direction difference value; compare said scores with a threshold value; and identify the suspect pixel as representing a contaminant if said threshold value is exceeded. means adapted to, for each suspect pixel: select two neighbouring pixels in a first direction lying on opposed sides of the suspect pixel and determines which of the first direction pixels has the lowest grey value; select two neighbouring pixels in a second direction lying on opposed sides of the suspect pixel and determines which of the second direction pixels has the lowest grey value; determine a first direction difference value by taking the grey value difference between the lowest grey value first direction pixel and the grey value of the suspect; determine a second direction difference value by taking the grey value difference between the lowest grey value second direction pixel and the grey value of the suspect; select two neighbouring pixels in a first direction lying on opposed sides of the suspect pixel and determines which of the first direction pixels has the lowest grey value; select two neighbouring pixels in a second direction lying on opposed sides of the suspect pixel and determines which of the second direction pixels has the lowest grey value; determine a first direction difference value by taking the grey value difference between the lowest grey value first direction pixel and the grey value of the suspect; determine a second direction difference value by taking the grey value difference between the lowest grey value second direction pixel and the grey value of the suspect; weight the first direction difference value in dependence on the grey value of the lowest grey value first direction pixel; weight the second direction difference value in dependence on the grey value of the lowest grey value second direction pixel; determine a first direction score from the weighted first direction difference value; determine a second direction score from the weighted second direction difference value; compare said scores with a threshold value; and identify the suspect pixel as representing a contaminant if said threshold value is exceeded. compare said scores with a threshold value; and identify the suspect pixel as representing a contaminant if said threshold value is exceeded.