ABSTRACT Methods and systems for detecting foreign material within an agricultural product stream in real-time, involve illuminating a portion of the agricultural product stream with light spanning a wavelength range including or within near-infrared and/or shortwave infrared wavelengths; scanning a line of the illuminated agricultural product stream to acquire a hyperspectral image of the line, the hyperspectral image of the line having a width of a single pixel; processing the hyperspectral image of the scanned line to obtain spectrum data for one or more pixels of the hyperspectral image of the scanned line; comparing the obtained spectrum data of the one or more pixels to predetermined spectrum data to determine whether the obtained spectrum data is indicative of foreign material within the scanned line of the agricultural product stream.