Development of agricultural crop monitoring software

. The operation of Bradley's algorithm is simple. After that, we divide the image into several areas alongside d, take the average value of the sum of the values of I m pixels in this area, add the value, and compare the value of each pixel with the obtained result. 1/8 of the image width and 15% of the average pixel brightness across the area. In general, both of these parameters can and should be changed according to the specific situation. Thus, if the size of the object is larger than the area of a square with a side equal to d , then the center of this object can be taken as the background by the algorithm, and the problem is solved by reducing the value of d, but fine details of the image may be lost. This article provides an overview of some research and image processing analysis on the problem of crop and vegetation image recognition. Remote identification of crops and plants and their cultivation, assessment of horticulture status startup projects are presented. A computer vision system for obtaining images from a drone and assessing the condition of a garden is provided. Digitization methods for data processing are considered. Keywords: Horticulture, Plants, Algorithms, Neural networks, Coordinates, Software.


Introduction
Nowadays, recognition and intelligent systems [1] are used in many fields.Examples of this include monitoring and recognition systems related to traffic safety and public safety, smart city, and smart home systems [2,3].
To increase the economic efficiency of production of this system, it is actively used in various sectors of the national economy, including agriculture.Through this system, it will be possible to assess the state of crops, plant cultivation, and horticulture.They use deep learning and computer vision, using image recognition techniques to classify objects and scenes.In the implementation of this system, the implementation of unmanned devices (currently through drones) is developing widely [4,5].
Aerobotics (South Africa) offers a solution to detect damage to garden trees.Artificial intelligence identifies the tree, analyzes leaves, leaf size and structure in high-resolution multispectral images.With the help of the company's products, the farmer can detect and localize plant diseases and insect pest problems in time and take measures to restore trees.Soon, the company plans to add a yield forecast service based on the analysis of the number and size of fruits [6].
The Australian company Flurosat has introduced the FluroSense application for agroanalytics.With its help, it is possible to determine the state of stress, provide nutrients and provide moisture to agricultural crops.Based on the analysis of satellite images, this system identifies areas with plant growth problems.Later, drone inspections of problem areas are additionally carried out.The application can also use images taken from imported drones that have been shot by the customer.Depending on the needs, the client can include weed presence, yield, nitrogen supply maps, differential application recommendations, potential yield estimates and more.Automated data collection and analysis enables timely informed decision-making [7,8].
The American company Skycision offers an iOS solution for monitoring the condition of fields, horticultural crops and vineyards.Skycision simplifies the task of flight planning and automates the monitoring process.The client only needs to indicate the area of interest, and the system will create the flight route itself.It can also upload its own images taken by drones of other companies.After image processing, the client receives the exported georeferenced orthomoses and displays the strengths and weaknesses of the areas.The obtained data can also be exported to GIS systems used by the client.Customized alerts for plant stress, moisture availability, soil condition, weather conditions, etc. help monitor field conditions in real time [9][10][11][12].
The system developed by Skyx includes automatic flight planner, autopilot and sprinkler control systems [13].Crop spraying is done using one or more coordinated drones.First, a preliminary flight is carried out to determine whether the plants are infested with weeds.Based on the received data, the drone's route is automatically planned to avoid obstacles and spray a certain amount of substance.The client can be guided by his photos, based on which the flight plan is also developed.The developer guarantees a reduction in the consumption of chemicals due to the high precision of chemical application.

Materials and Methods
In the startups we saw above, they performed the tasks of processing images taken from drones and recognizing them.
A computer vision system (currently from OpenCV) is used to capture images from the drone and assess the state of the garden.What is OpenCV itself?OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.OpenCV was created to provide a common infrastructure for applications used in computer vision and to accelerate machine perception in commercial products.OpenCV is licensed under the BSD license [5].

Results and Discussion
The library contains more than 2,500 optimized algorithms, including a complete set of classic and modern computer vision and machine learning algorithms.These algorithms can be used to detect and recognize faces, identify objects, classify human movements in videos, track camera movements, track moving objects, extract 3D models of objects, generate 3D point clouds from stereo cameras, and create high-resolution images for each other.The estimated number of downloads of OpenCV is more than 18 million.
When recognizing plants, images of its fruit or leaf are taken and processed.In the field of image processing, deep learning is used for scene analysis and object detection.However, as the scene density increases, the analysis task becomes more complex.Neural networks have been widely used to solve this problem [1].
For example, neural nets in sheep were considered to recognize flowers and leaves of plants (Fig. 1) [2,3]: Artificial neural networks (artificial neural network); Probabilistic neural network; Convolutional neural networks (convolutional neural network); k-nearest neighbor method (k-nearest neighbor); support vector machine (support vector machine) and combined methods.For image processing and image comparison, we convert it to binary number system and this is called benarization.Binarization is the process of converting a color (or grayscale) image into two colors, black and white.The main parameter of such a transformation is the threshold, where t is the value against which the brightness of each pixel is compared.Based on the results of the comparison, the pixel is given the values 0 or 1, there are different binarization methods.They can be conditionally divided into two groups -global and local.In the first case, the threshold value remains unchanged during the binarization process.In the second, the map is divided into regions, each of which has a local (local) border.
The main goal of binarization is to radically reduce the amount of processed data.Simply put, successful binarization makes subsequent image manipulation much simpler.On the other hand, failures in the binarization process can lead to distortions such as broken lines, loss of meaningful details, loss of object integrity, and unpredictable interruption of characters in the image due to noise and background distortions.Different binarization methods have their own weaknesses: for example, the Otsu method can lead to the loss of small details and the sticking of nearby characters, while the Niblack method is prone to spurious objects in the case of low-contrast background irregularities.It follows that each method should be used in its own field.
The Bradley-Roth method compares the threshold value and pixel brightness values and passes the element vpass.The main difficulty in this method lies in finding the boundary marks, which must be reliably separated not only from the background, but also from noise, shadows, glare and other information remnants.Often, for this, they turn to the methods of mathematical statistics.In Bradley's style, we see from the other side -the side of integral images.
In the method of integral images, integral images are not only an effective and fast way (in just one image pass) to find the sum of pixel values, but also an easy way to find the average brightness value in a certain area of the image.
Suppose we have an 8-bit grayscale image (a color image can be converted to grayscale using the formula ).In this case, the value of the integral image element is calculated according to the following formula: Where, S -result of previous iterations of a given pixel position, I -pixel brightness of the image.If the coordinates go outside the picture, they are considered zero.The essence of this method is simply shown in the diagram below (Fig. 2): The key part here is that after constructing the integral matrix of your image, you can quickly calculate the sum of the pixel values of any rectangular area within that image.Let's say quadrilateral ABCD is our area of interest (Fig. 3).Then, the total brightness S in this area is calculated according to the following formula: Where, S(A), S(D),S(B) -S(С) and S(D) -the values of the elements of the integral matrix in the "north-west" direction from the intersections of the sides of this rectangle (Fig. 4): Based on this, we can say that the operation of Bradley's algorithm is simple.After that, we divide the image into several areas along side d, take the average value of the sum of the values of Im pixels in this area, add the value, and compare the value of each pixel with the obtained result.Im+t is our desired threshold value.Bradley and Roth take values of d i t , respectively, 1/8 of the image width and 15% of the average pixel brightness across the area.In general, both of these parameters can and should be changed according to the specific situation.Thus, if the size of the object is larger than the area of a square with a side equal to d, then the center of this object can be taken as the background by the algorithm, and the problem is solved by reducing the value of d, but fine details of the image may be lost.

Conclusions
This article provides an overview of some systems and an analysis of behavior processing.Currently, the development and implementation of this system is an urgent issue.If this system is developed, it will be possible to remotely assess the condition of crops, plants, and horticulture.Remote identification of crops and plants and their cultivation, assessment of horticulture status startup projects are presented.A computer vision system for obtaining images from a drone and assessing the condition of a garden is provided.Digitization methods for data processing were considered.

Fig. 4 .
Fig. 4. Values of the elements of the integral matrix.