A neural network approach to defect detection in oranges