- While much of modern agriculture is based on mass mechanized production, advances in sensing and manipulation technologies may facilitate precision autonomous operations that could improve crop yield and quality while saving energy, reducing manpower, and being environmentally friendly. In this paper, we focus on autonomous spraying in vineyards and present four machine vision algorithms that facilitate selective spraying. In the first set of algorithms we show how statistical measures, learning, and shape matching can be used to detect and localize the grape clusters to guide selected application of hormones to the fruit, but not the foliage. We also present another algorithm for the detection and localization of foliage in order to facilitate precision application of pesticide. All image-processing algorithms were tested on data from movies acquired in vineyards during the growing season of 2008 and their evaluation includes analyses of the potential pesticide and hormone reduction. Results show 90% accuracy of grape cluster detection leading to 30% reduction in the use of pesticides. The database of images is placed on the Internet and available to the public to continue developing the detection algorithms.