Metal detectors and X-ray inspection systems for the inspection of granular food