The present invention is a method to detect defects in a process producing a food product by utilizing multivariate image analysis. In one aspect, an image is captured of the food product in the visible spectrum by on-line vision equipment, multivariate image analysis is performed on the image via an algorithm programmed onto a field programmable gate array to determine if a defect exists, a signal is sent to downstream sorting equipment, and the sorting equipment then rejects those food products that contain defects.