Herbal plants have many medicinal properties. Distinguishing different types of medicinal plants from other similar plants and weeds is essential in agriculture. At present, the identification of herbal plants is done visually by experts, which is a tedious, time-consuming and energy intensive. Therefore, the use of new technologies can be a good alternative to laboratory and visual methods. In this research, in order to accurately and quickly identify herbal plants, a machine vision system and machine learning algorithm were performed. After preparing the sample images by the machine vision system, an intelligent image processing algorithm was utilized to extract the features. An optimal SVM algorithm was implemented to classify the features extracted from the plant sample images. 98.99%, which indicated the potential of the proposed method in the diagnosis of herbal plants.