Fungal infection and mycotoxin contamination in agricultural products are a serious food safety issue. The detection of fungal infection and mycotoxin contamination in food products should be in a rapid way. A Near-Infrared (NIR) hyperspectral imaging system was used to detect fungal infection in 2013 crop year canola, wheat, and barley at different periods after inoculation and different concentration levels of ochratoxin A in wheat and barley. Artificially fungal infected (Fungi: Aspergillus glaucus, Penicillium spp.) kernels of canola, wheat and barley, were subjected to single kernel imaging after 2, 4, 6, 8, and 10 weeks post inoculation in the NIR region from 1000 to 1600 nm at 61 evenly distributed wavelengths at 10 nm intervals.The acquired image data were in the three-dimensional hypercube forms, and these were transformed into two-dimensional data. The two-dimensional data were subjected to principal component analysis to identify significant wavelengths based on the highest principal component factor loadings. Wavelengths 1100, 1130, 1250, and 1300 nm were identified as significant for detection of fungal infection in canola kernels, wavelengths 1280, 1300, and 1350 nm were identified as significant for detection of fungal infection in wheat kernels, and wavelengths 1260, 1310, and 1360 nm were identified as significant for detection of fungal infection in barley kernels. The linear, quadratic and Mahalanobis statistical discriminant classifiers differentiated healthy canola kernels with > 95% and fungal infected canola kernels with > 90% classification accuracy. All the three classifiers discriminated healthy wheat and barley kernels with > 90% and fungal infected wheat and barley kernels with > 80% classification accuracy.ii The wavelengths 1300, 1350, and 1480 nm were identified as significant for detection of ochratoxin A contaminated wheat kernels, and wavelengths 1310, 1360, 1480 nm were identified as significant for detection of ochratoxin A contaminated barley kernels. All the three statistical classifiers differentiated healthy wheat and barley kernels and ochratoxin A contaminated wheat and barley kernels with a classification accuracy of 100%. The classifiers were able to discriminate between different durations of fungal infections in canola, wheat, and barley kernels with classification accuracy of more than 80% at initial periods (2 weeks) of fungal infection and 100% at the later periods of fungal infection. Different concentration levels of ochratoxin A contamination in wheat and barley kernels were discriminated with a classification accuracy of > 98% at ochratoxin A concentration level of ≤ 72 ppb in wheat kernels and ≤ 140 ppb in barley kernels and with 100% classification accuracy at higher concentration levels.iii