Identification of apple diseases in digital images by using the Gaining-sharing knowledge-based algorithm for multilevel thresholding