Paddy crop and weed classification using color features for computer vision based precision agriculture


  • Radhika Kamath
  • Mamatha Balachanra
  • Srikanth Prabhu



Weed detection in paddy fields using robotic vision is still a challenging task. The main reason for this being lack of dataset. In this research work, the creation of paddy crop and weeds image dataset has been described. The images were acquired using a digital camera under natu-ral lighting conditions. For every image in the dataset, its annotated image was created using manual annotation. Annotation was carried out after plant segmentation from the soil background. Dataset consists of 300 images. In addition, classification of paddy crop and two types of weeds namely, sedges and grass-type weeds has been done using only color features. Usually, crop and weed discrimination is done using texture, shape and color features. However, using all three features may result in a computationally intensive system. Color features are extracted using a novel approach based on Speeded-up Robust Features (SURF). Random Forest, K-Nearest Neighbors (K-NN) and Least Squares Support Vector Machine (LSSVM) classifiers have been used for the classification of the paddy crop and two types of weeds. An accuracy around 86% was obtained by all the classifiers. This indicates color features can be relied upon in discrimination between paddy crop and sedges and grass-type weeds.


[1] Adams, M. L., Cook, S., & Corner, R., ‘managing uncertainty in site-specific management: what is the best model?’ Precision agriculture, (2000), 2(1), 39-54.

[2], from cows to crops: Computer Vision for Precision Agriculture. Online available at Accessed on 30 November 2016.

[3] Mandal, S. K., & Maity, A., ‘Precision farming for small agricultural farm: Indian scenario’. American Journal of Experimental Agriculture, (2013), 3(1), 200.

[4] Young, S. L., Meyer, G. E., & Woldt, W. E.,’ Future directions for automated weed management in precision agriculture’. In Automation: The future of weed control in cropping systems (2014), (pp. 249-259). Springer Netherlands.

[5] Haug, S., & Ostermann, J., ‘A Crop/Weed Field Image Dataset for the Evaluation of Computer Vision-Based Precision Agriculture Tasks’. In ECCV Workshops (4), (2014), (pp. 105-116).

[6] Ahmed, F., Bari, A. H., Hossain, E., Al-Mamun, H. A., & Kwan, P. ‘Performance analysis of support vector machine and Bayesian classifier for crop and weed classification from digital images’. World Applied Sciences Journal, (2011), 12(4), 432-440.

[7] Lin, F., Zhang, D., Huang, Y., Wang, X., & Chen, X., ‘Detection of Corn and Weed Species by the Combination of Spectral, Shape and Textural Features’. Sustainability, (2017), 9(8), 1335.

[8] Kadir, A., Nugroho, L. E., Susanto, A., & Santosa, P. I., ‘Leaf classification using shape, color, and texture features’. arXiv preprint, (2014), arXiv:1401.4447.

[9] Hemming, J., & Rath, T., ‘PA—Precision agriculture: Computer-vision-based weed identification under field conditions using controlled lighting’. Journal of agricultural engineering research, 78 (3), (2001), 233-243.

[10] Kumar, D. A., & Prema, P., ‘A Novel Approach for Weed Classification using Curvelet Transform and Tamura Texture Feature (CTTTF) with RVM classification’. International Journal of Applied Engineering Research, 11(3), (2016), 1841-1848.

[11] Li, Z., an, Q., & Ji, C., ‘Classification of weed species using artificial neural networks based on color leaf texture feature’. In International Conference on Computer and Computing Technologies in Agriculture, (2008), (pp. 1217-1225). Springer, Boston, MA.

[12] Kumar, D. A., & Prema P., ‘A review on crop and weed segmentation based on digital images’. In Multimedia Processing, Communication and Computing Applications, (2013), (pp. 279-291). Springer, New Delhi.

[13] Kodagoda, S., Zhang, Z., Ruiz, D., & Dissanayake, G., ‘Weed detection and classification for autonomous farming’. Intelligent Production Machines and Systems, (2008).

[14] Agrawal, K. N., Singh, K., Bora, G. C., & Lin, D.,‘Weed recognition using image-processing technique based on leaf parameters’. Journal of Agricultural Science and Technology. B, (2012), 2(8B), 899.

[15] Ehsanirad, A., & Sharath Kumar, Y. H., ‘Leaf recognition for plant classification using GLCM and PCA methods’. Oriental Journal of Computer Science and Technology, (2012), 3(1), 31-36.

[16] Lottes, P., Khanna, R., Pfeifer, J., Siegwart, R., & Stachniss, C, ‘UAV-based crop and weed classification for smart farming’. IEEE International Conference on Robotics and Automation (ICRA), (2017), (pp. 3024-3031). IEEE.

[17] Slaughter, D. C., Giles, D. K., Fennimore, S. A., & Smith, R. F, ‘Multispectral machine vision identification of lettuce and weed seedlings for automated weed control’. Weed Technology, 22(2), (2008), 378-384.

[18] Weis, M., & Gerhards, R., ‘Feature extraction for the identification of weed species in digital images for the purpose of site-specific weed control’. Precision agriculture, 7, (2007), 537-545.

[19] Weis, M., & Sökefeld, M, ‘Detection and identification of weeds’. In Precision, crop protection-the challenge and use of heterogeneity, (2010), (pp. 119-134). Springer, Dordrecht.

[20] Guyer, D. E., Miles, G. E., Schreiber, M. M., Mitchell, O. R., & Vanderbilt, V. C. ‘Machine vision and image processing for plant identification’. Transactions of the ASAE, (1986), 29(6), 1500-1507.

[21] Li, Z., an, Q., & Ji, C, ‘Classification of weed species using artificial neural networks based on color leaf texture feature’. In International Conference on Computer and Computing Technologies in Agriculture, (2008), (pp. 1217-1225). Springer, Boston, MA.

[22] Burks, T. F., Shearer, S. A., & Payne, F. A, ‘Classification of weed species using color texture features and discriminant analyses. Transactions of the ASAE, (2000), 43(2), 441.

[23] Gée, C., Bossu, J., Jones, G., & Truchetet, F, ‘Crop/weed discrimination in perspective agronomic images’. Computers and Electronics in Agriculture, 60(1), (2008), 49-59.

[24] Hemming, J., & Rath, T. ‘PA—precision agriculture: computer-vision-based weed identification under field conditions using controlled lighting’. Journal of agricultural engineering research, 78(3), (2001), 233-243.

[25] El-Faki, M. S., Zhang, N., & Peterson, D. E. ‘Weed detection using color machine vision’. Transactions of the ASAE, 43(6), (2000), 1969.

[26] Gimp. G. N. U. Image manipulation program. ‘User Manual, Edge-Detect Filters, Sobel’. The GIMP Documentation Team, 8(2), (2008), 8-7.

[27] Gonzalez, R. C., & Woods. R. E. Digital image processing, Edition. 2012.

[28] Bay, H., Tuytelaars, T., & Van Gool. Surf: Speeded up robust features. In European conference on computer vision, (2006), (pp. 404-417). Springer, Berlin, Heidelberg.

[29] Breiman, L. ‘Random forests’. Machine learning, 45(1), (2001), 5-32.

[30] Suykens, J. A., & Vandewalle, J., ‘Least squares support vector machine classifiers’. Neural processing letters, 9(3), (1999), 293-300.

[31] Suh, H. K., Hofstee, J. W., & van Henten, E. J. ‘Improved vegetation segmentation with ground shadow removal using an HDR camera’. Precision Agriculture, (2017), 1-20.

[32] Sokolova, M., & Lapalme, G., ‘A systematic analysis of performance measures for classification tasks’. Information Processing & Management, 45(4), (2009), 427-437.

View Full Article: