The importance of agriculture is known to mankind at the start of early human civilization, whereby farming and use of domestic animals created food supplies to people which helped cities to develop. Due to immense growth of population and industrialization, the demand for fruits and vegetables is more than its supply. Considering the wastage factor of modern agriculture, early detection of diseased fruits and vegetables by image processing and its techniques can hugely benefit in preventing rotting and its spread to neighbouring crops. Generally, these diseased fruits and vegetables are plucked by manual inspection. The same work is done by the autonomous robot with pattern and machine learning-based detection and recognition of diseased fruits and vegetables which covers much greater distance in a short period of time. The objective is divided into three stages. Firstly, after some basic pre-processing steps, the local and global features of diseases in fruits and vegetables are extracted using well-known algorithms of pattern recognition in feature extraction phase. Then the techniques like supervised and unsupervised learning are used to categorize them effectively and stored the same in training database. Then secondly, validating is done using k-NN classification and k-NN regression which is a type of instance-based learning. Lastly, after identification of the diseased fruit or vegetable, the robot plucks the target infected object and this cycle continues until it reaches the end of the agricultural land. This is beneficial for people like farmers, gardeners, home makers who have little or no information about the diseased crops which are growing and this invention saves their time and health by increasing the yield of healthy fruits and vegetables. Instead of having an expert agronomist to find out and study the disease every time, the robot can identify it by placing certain algorithms for disease detection. This also reduces the cost for people who cannot invest a large amount money and time for such work.