Crop State Analysis Using Image Processing

. Agriculture is the primary source of livelihood for the majority of India’s population. In the traditional agriculture system, farmers have to manually check their crops in every section of the farm. This may at times leave some sections unchecked. Due to this, crop health may deteriorate considerably. If may not be treated in time, the farmer will face a huge loss and the crop yield will also reduce. To overcome this problem, a system can be employed to monitor the crops and out the sections where crop condition is worsening. For this, an image processing algorithm can be implemented. Through this system, the received data from the algorithm will be manipulated to enhance the crop’s health.


Introduction
For around 60 percent of India's total population, agriculture is their primary source of income. Agriculture and forestry had a Gross Value Added of Rs. 17 lakh crore (US dollars 225 billion) in Financial Year 20. In Financial Year 20, agricultural and allied sectors accounted for 17.8 percent of India's gross value added (GVA) at current prices. Consumer spending in India would grow by as much as 6.8 percent in 2021, following a pandemic-driven drop. Due to its enormous potential for value addition, notably in the food processing industry, the Indian food industry is poised for massive expansion, increasing its contribution to world food commerce every year. The Indian food and grocery market is the sixth largest in the world, with retail accounting for 70 percent of total sales. The Indian food processing sector, which accounts for 32 percent of the country's overall food market and is rated fifth in terms of production, consumption, export, and predicted growth, is one of the country's largest industries. In Financial Year 21, total agriculture and allied product exports totalled 41.25 billion dollars. In the case of plants, illness is defined as any disturbance of a plant's normal physiological function that results in recognisable symptoms. A symptom is a phenomena that occurs in the presence of something and is used to prove its existence. A pathogen, or any agent that causes disease, causes disease. The majority of the time, pests or illnesses are visible on the plant's leaves or stems [1]. As a result, identifying plant leaves, as well as determining diseases, percentages of disease occurrence, and symptoms of disease assault, is critical to successful crop cultivation.
⇤ e-mail: pkhandagale02@gmail.com ⇤⇤ e-mail: mandareranjikal@gmail.com ⇤⇤⇤ e-mail: siddhiparabs00@gmail.com ⇤⇤⇤⇤ e-mail: garg.bhawana@rait.ac.in Traditional farming is difficult because extreme weather conditions or insects can harm crops, reducing overall crop development. As a result, a drop in crop yields might result in a significant loss of population. Image processing algorithms can be used to solve this challenge. The received data from the algorithm will be altered using this system to improve the crop's health. 1. Determines a crop's condition in early stage. 2. Generates data about farm's every area. 3. It predicts approximate yield of crops. 4. Helps in saving farmer's time.
The next section covers the block diagram of the rover. The third section gives technical insights into all the hardware and software used for the rover. In section 4, the complete design and the components implementation are reviewed. The fifth section will consist of the snaps taken of the constructed rover. The final section consists of the concluding remarks. The references are also mentioned at the end.

Proposed Work
The system consists of Motors controlled by a Motor Driver, ESP-8266 micro-controller, ESP-32 Camera installed on Rover Chassis. The rover connects with the Computer via an Internet of Things application. The ESP-8266 micro-controller connects to the internet by connecting to a Jio-Fi portable hotspot which creates a portable WiFi range. The Computer system runs an application which is responsible for controlling the rover. The application is also responsible for processing the images of the farm, handling the database and representing data in understandable format. When the system is turned on, the rover and the application waits for each of them to connect to the IoT platform. Once they both are connected, the application ask the user to feed the dimensions of the area of farm to be scanned. On this, the application push the user-fed data to rover in-order to set-up the rover. The application waits for set-up process to be completed [2] [3] [5]. On completion of the set-up process, the application send the control signal to the Rover. The control signals are produced respective to the arrow keys pressed by the operator. The rover reads the control signals transmitted by the host computer. The micro-controller on the rover, drives the motors to move the rover in accordance to the keys pressed by the operator. Simultaneously, the rover calculates the time elapsed and finds the distance travelled by the rover. This value of distance travelled is sent back to the host computer. The application on the computer, estimates the location of the rover in the field. After travelling for a particular distance, the application commands the rove to halt and capture image of the farm. The image of the farm is sent to the application where, it calculates the intensities of the Red, Green and Blue light reflected by the leaves of the crops. Depending upon the intensities of colour bands, the application predicts if the crop is health or is going down in terms of health. The application generates a figure of merit for the health condition of the crop. It then enlists this value along with it's respective coordinates in the farm in a database [4]. After completion of scanning the said area of the farm. The application generates an image which highlights the area where crop health might be deteriorating. This report can help the farmer to pay attention to these areas and protect the crops from worsening.
In this paper, a system is proposed which can identify the areas where crop health may be a↵ected. Thus, farmers can produce more yield.

Hardware Implemented
Frame: The frame of a rover is the main structure, or the skeleton upon which the rest of components will be attached.
ESP8266: It is a microcontroller which helps us to connect with the wifi, or send or receive data. With the respective of the project, the ESP is employed as a receiver. It produces PWM signals similar to the signals produced by the receiver output for corresponding values sent by the transmitter. Motors: The motors are the main drain of battery power on your drone. Motor Drivers: It acts as an interface between motors and the control circuits. It takes low current signal and converts it into higher current signal that can drive a motor. Battery: LiPo batteries are the power sources of the rover. LiPo is used because of the high energy density and high discharge rate. JioFi Portable Hotspot: It is a device which creats the wifi signal. It is used to connect our project to the internet and the cloud-based server. ESP32 Cam: It will be used to capture images for processing.

Software Implemented
PyCharm: IDE for developing Python program which controls the motion of the rover and also performs image processing and data visualization. pythonanywhere.com: It is used for creating an IoT platform by using python which helps the rover to connect with the computer.

Design Methodology
The overall system can be classified into two main sections: (a)Rover and (b)Application. The rover has a 2200mAh Li-Po battery which powers the entire system. The rover has an ESP8266 micro-controller as the main controlling element which is responsible for all the movement of the rover. The ESP8266 receives 5V regulated power supply from the 5V pin of the motor driver. 5V from the motor driver circuit is connected to the Vin pin of the micro-controller. The D1 and D2 pins of the micro-controller are assigned to generate signals for controlling the set of motor on the left of the rover. Whereas, pins D12 and D13 are assigned for producing controlling signals for motors which drive the wheels on the right side of the rover. The movement of the rover is controlled by driving the set of wheels in respective pattern to produce left turns, right turns, forward and reverse drive. The D1, D2, D12 and D13 pins are connected to respective pins on the motor driver. The motors are then connected to the respective output pins of the motor driving circuit. Another important component installed of the rover is an ESP-32 Camera. The ESP-32 camera helps the application running on the host computer to capture images of the farm. The ESP-32 camera and the ESP8266 microcontroller connect to an Internet-of-Things(IoT) platform via a Portable hotspot employed on the rover. The Portable hotspot provides internet connectivity to the rover. The process flow of the application can be explained with help of following Flow Diagram: Figure 3. Flowchart On start, the application asks the user to enter a reference name for the session. On next page, the application requires two mandatory fields which represent the length and breadth of the area on the farm to be scanned. On entering the required data the application sends the necessary data to the rover via IoT platform for completing the setup process of the rover. After successful set-up of the rover, the application checks for the successful communication between the rover and the application [6]. The application send control commands to the rover inaccordance to the arrow keys pressed by the operator. The micro-controller on the rover controls the movement of the rover according to the control commands received by the same. Simultaneously, rover transmits the distance travelled by it. Depending on these distance values, the application predicts the co-ordinates of the rover on the farm. On travelling as predefined amount of distance, the application commands the rover to halt and captures the image for processing it [7]. The captures image is processed to find the intensities of red, blue and green light. The application, generates a figure if merit for health condition of the crop in the area scanned. It then stores the co-ordinates and figure of merit in a database [8]. On scanning the said area, the application processes the data in database to generate a report which highlights area with their respective health condition. By reading the generated report, one can predict the areas where crop health might be going down.

Selection Criteria for Components:
To cut down the cost, an 11.1V 2200mAh Li-po Battery was employed in the system. ESP8266 has an on-board WiFi Module. Thus, it proves to be efficient and economical for building a system requiring to connect with the internet. ESP32 CAM is an economical, low power consuming camera which can be easily interfaced with our desired circuitry. Jio-Fi Portable Hotspot was implemented in the system to provide strong internet connectivity while in motion as it was compact and portable.

Results and Discussion
As aimed, the rover scans the defined area of the farm, and calculates the figure of merit which represents qualitative status of health condition of the crops. The report generated by the system highlights the areas on the farm where crop health might be going down.  Figure 5 demonstrates working of the developed system. The report shows colour shades which represents the health condition of the crops in particular area. The red colour represents crops with least qualitative value of crop health, whereas, green colour represents highest qualitative value of crop health. On comparison with sample leaves which represent the crops, a conclusion can be drawn that the generated report image has highlighted the area with wilting leaves as red. On other hand, the area where crops are in good condition is marked with green shade. Thus, the designed system can predict the area where crop health is going down. This report can be used by the farmer to pay more attention to the crops in highlighted areas where crop health is a↵ected. This will in-turn, assist the farmer to save the crops from being damaged before it is late. By saving the crops from being spoilt, farmers can avoid any plant disease from spreading to other area and can increase their crop yield.

Acknowledgements
With great pleasure, we avail this opportunity to express our profound gratitude and deep regards to our Head Of Department of Instrumentation Engineering, RAIT, Dr. Sharad P. Jadhav, for his generous support and constant encouragement. It helped us to work in the right direction to attain the desired objective.

Conclusion
Image Processing can contribute to the foregoing numerous aids a farmer uses to tend his farm. A slight change in a leaf's colour, i.e. a small infection to a crop which could go undetected by naked eye will get detected easily. The use of a rover in the farm will consequently become more present in the near future when more of this systems are bought into action. A farm's crops are the most important aspect of a farmer's living, which will be saved by the implemented machine. The farm's dimensions when entered will get the system connected and the whole farm area will get examined. The farmer once alerted, can keep an eye over the area where the damage is detected. Hence, it will result in crops getting saved for the sake of farmer's convenience. Moreover, the annual yield produced by the farmer will increase. The model could be used by the government that helps farmers with their benefits. In some cases, rover companies can sell the model directly to the farmer. Image Processing is a evolving field with many opportunities for a↵ecting future research. Considering the rover's future scope, a GPS will be added to trak the location of the rover and to recover the rover from a lost location in case of any system failure. As this system works over the surface, measurement of soil moisture level could be done.