This paper gives two contributions to the state-of-the-art for viticulture technology research. First, we present a comprehensive review of computer vision, image processing, and machine learning techniques in viticulture. We summarize the latest developments in vision systems and techniques with examples from various representative studies, including, harvest yield estimation, vineyard management and monitoring, grape disease detection, quality evaluation, and grape phenology. We focus on how computer vision and machine learning techniques can be integrated into current vineyard management and vinification processes to achieve industry relevant outcomes. The second component of the paper presents the new GrapeCS-ML database which consists of images of grape varieties at different stages of development together with the corresponding ground truth data (e.g., pH and Brix) obtained from chemical analysis. One of the objectives of this database is to motivate computer vision and machine learning researchers to develop practical solutions for deployment in smart vineyards. We illustrate the usefulness of the database for a color-based berry detection application for white and red cultivars and give baseline comparisons using various machine learning approaches and color spaces. This paper concludes by highlighting future challenges that need to be addressed prior to successful implementation of this technology in the viticulture industry.