Automated sorting systems for higher quality and yield