Abstract
Computer has application in every field in our society. It is also used in agriculture for automation, especially in the automatic spray for herbicides. In this paper an algorithm is developed for automatic spray control system. The algorithm is based on erosion followed by watershed segmentation algorithm. This algorithm can detect weeds and also classify it. Currently the algorithm is tested on two types of weeds i.e broad and narrow. The developed algorithm has been tested on these two types of weeds in the lab, which gives a very reliable performance. The algorithm was applied on 200 images stored in a database in the lab, of which 100 images were taken from broad leaf weeds and 100 were taken from narrow leaf weeds. The result showed over 89% results.