AUTOMATED SYSTEM FOR MONITORING THE STATE OF VEGETATION COVER BASED ON SATELLITE IMAGES RECOGNITION

. Based on the study of approaches and techniques for assessing the state of vegetation, an automated information system has been developed. It allows to perform vegetation indices’ monitoring of the territory on the basis of satellite images. The automation of their handling with the binding of temperature data is carried out. The program gives the ability to visualize the dynamics of vegetation indices and temperature and to evaluate existing connections and type of connections between the investigated factors.


INTRODUCTION
The development and implementation of measures to maintain and reproduce the state of ecosystems require comprehensive reliable information about their state for a long time. One of the most important tasks of environmental monitoring is condition control. vegetation, depending on a complex of factors [1,2,3]. Accordingly, the monitoring of vegetation cover indicators should also be carried out based on modern integrated research methods. One of them is the use of satellite observations and their combination with other sources of information. [1,4,5]. In particular, the analysis of time series of satellite images can become the basis for creating a system for monitoring the state of vegetation, especially if it includes up-to-date data on the dynamics of climatic factors.
Accordingly, the aim of the work was the development and software implementation of an automated system for monitoring the indicators of the state of the vegetation cover, depending on the temperature dynamics as one of the basic environmental factors [6,7,8].

COVER BASED ON SATELLITE IMAGES
The input data for the study were medium-resolution Landsat space images provided by the US Geological Survey [9,10] and temperature data obtained from meteorological servers [11,12].
To establish vegetation cover indicators, a classical approach was chosen, namely the use of vegetation indices, since it has been proven that their values are closely correlated with the volume of green biomass and can serve as a basis for assessing the seasonal and long-term dynamics of vegetation cover [1,4,13].
In particular, we chose the Normalized Difference Vegetation Index (NDVI) for further inclusion in the model, since it is simple to calculate, has the widest dynamic range among common vegetation indices, and is highly sensitive to changes in vegetation cover [1,7,15].
It is calculated using the following formula: where NIR is the spectral reflectance in the near-infrared region of the spectrum, and RED is the spectral reflectivity in the red spectrum.
To display the NDVI index, a standardized continuous gradient or a discrete scale is used, showing a value in the range from -1..1 in % or the range 0..200 (-100..100), which is more convenient since each unit corresponds to one percent of the configuration indicator. Due to the peculiarity of reflection in the NIR and RED regions of the spectrum, natural objects not associated with vegetation have a fixed NDVI value -from -1 to 0 [1 , 14, 16].

DESIGNING AN INFORMATION SYSTEM FOR PROCESSING SPACE IMAGES
Thus, the designed automated system pursued the goal of simplifying the process of loading input data (satellite images and temperature values), and their transformation into a structured machine-oriented form for further processing and analysis (calculation of vegetation indices, analysis in the temporal aspect and establishing the nature of the relationship between the studied factors). ), by automating these processes using software tools and data processing algorithms.
The following platform-based technologies were chosen to implement the system. NET 4.5, technology -WPF, which is based on the XAML markup language. The object-oriented language C # was chosen as the programming language. The architecture of the system was built on the principle of MVVM. The Data -bindings technology was used to establish a connection between the program's user interface and the business logic. Since the database requirements, in this case, are minimal, we used SQL server compact. Figure 1 shows a diagram of the components involved in the operation of the system; The model is based on three components: a remote weather server that supplies temperature data to the system and is divided into two packages, a satellite imagery server that supplies graphic files of the study area, and an automated system that processes temperature data, satellite images, send requests to remote servers and processes responses.
Thus, the tasks of the system are: • in semi-automatic mode, download satellite images for the selected territory from remote servers and local storage (if necessary); • semi-automatically upload temperature data for the selected area; • form an array of input data; • calculate vegetation indices and perform gradation of the obtained indices by the standard NDVI scale ; • calculate the correlation coefficients of the studied indicators and visualize the data; • implement the ability to process only those images that have not yet been processed, and upload temperature data using the API weather servers for that image being processed.

DATA PROCESSING ALGORITHMS
To start working in the system, the user needs to select the period and territory of the research. To implement the process of automatic formation of an array of input data, the API service of the American Center for Geological Research [10] was used, from which the system automatically downloads satellite images and saves them in a temporary folder. Each image is a raster image in Geo Tiff format, where each pixel has attribute values and geographic coordinates. Analyzing each pixel sequentially, the system sends requests to weather servers [11,12], containing data with temperature indicators for the required period (coinciding with the period for which satellite images are analyzed) as well as the coordinates of weather stations. If there are meteorological stations in the study area, the specified data is automatically loaded. Any territory or period can be chosen for the study (restrictions are stipulated solely by the availability of data on centralized information resources).
Algorithm for constructing a two-dimensional matrix of vegetation indices NDVI. To implement the process of pixel-by-pixel reading of near-infrared (NIR) images and red spectrum (RED) was developed by the NDVI method Calculate NDVI (string path _ Nir, string path _ Red) which receives as parameters the path to images of both spectra (links to images can be obtained by the system from local storage or servers). As a result, this method returns an NDVI-type object containing the value of the image gradation area.
Calculation of new NDVI matrices based on two cycles: the cycle of passing the matrix along the height, and the cycle of passing along the width. This construct calls the Get Number Of Slice (a) method, which returns a pixel gradation number from 1 to 18, and increments the corresponding array value by one.
Attribute values of pixels (in this case, spectral reflectance) can range from 0 to 255, according to grayscale. Therefore, using the formula (1), you can calculate a new pixel value based on two channels obtained from spectral images, and as a result, get a number in the range (-1;+1). The result of the operation of such an algorithm is a new image that reflects the state of the vegetation cover on the site. Each value from the range (-1; +1) has its interpretation.

ОПТИЧНІ ТА ОПТИКО-ЕЛЕКТРОННІ СЕНСОРИ І ПЕРЕТВОРЮВАЧІ В СИСТЕМАХ КЕРУВАННЯ ТА ЕКОЛОГІЧНОГО МОНІТОРИНГУ
97 Listing 1. Loading space images into Image objects public NDVI CalculateNDVI(string path_Nir, string path_Red) { NDVI _ndvi = new NDVI(); //create a new object in which the results of calculations will be written using (Image<Gray, double> gray_imageNir = new Image<Gray, double>(path_Nir)) //Load the infrared spectrum image into the matrix object using ( Image < Gray , double > gray _ imageRed = new Image < Gray , double >( path _ Red )) //load the red spectrum image into the matrix object using ( Image < Gray , double > gray _ image _ sub = ( gray _ imageNir -gray _ imageRed )) //perform the operation of subtracting matrices according to the formula using ( Image < Gray , double > gray _ image _ add = ( gray _ imageNir + gray _ imageRed )) //perform the operation of adding matrices according to the formula using ( Image < Gray , double > gray _ image _ div = new Image < Gray , double > ( gray _ image _ add . Width , gray _ image _ add . Height )) // create an object that will store the resulting matrix } To save matrices, vector data types Image were used, which are included in OpenCV with fields of Gray and double types; the path to the satellite image is set as a parameter. The path is obtained in two ways: 1. path to the file on the local disk; 2. the path to the temporary directory where space images are loaded from a remote server. The scheme of the algorithm for constructing the calculation of NDVI based on GeoTiff is shown in Figure 2

ОПТИЧНІ ТА ОПТИКО-ЕЛЕКТРОННІ СЕНСОРИ І ПЕРЕТВОРЮВАЧІ В СИСТЕМАХ КЕРУВАННЯ ТА ЕКОЛОГІЧНОГО МОНІТОРИНГУ
In the future, gradations are determined based on the resulting NDVI matrix. This algorithm performs a quantitative calculation of the pixel hit values in each gradation. The result of the NDVI calculation is a matrix with values in the range (-1; +1); The range (0; +1) is of practical value and is divided into 18 gradations, any of which refers to one or another group of plants. Each pixel of the resulting matrix is checked for belonging to one of the gradations.
Based on the developed models, a database was generated using the Entity framework. Framework, which is used as an intermediary between the program code and the database, and the LINQ tool, which is used as a tool for processing CRUD ( Create -Read -Update -Delete ) requests.
The result of this stage of the system operation is the formation of a primary data array, which includes NDVI indicators. temperature data Automation of obtaining the specified data and their structuring is an advantage of the created system since existing GIS systems provide for the possibility of simultaneously processing only one satellite image and do not have the capabilities of automated loading of input data and automatic formation of a database. The structure of the received data array is shown in Figure 3. Since space images have a large dimension ( Landsat image extension is on average 8000*8000 pixels), it became necessary to take into account this specificity in the process of developing the system. In particular, during the memory test, a complete "freeze" of the window was found, until the end of the processing process, since the calculations were performed in the main thread. To solve the problem, parallelization of individual blocks was applied, requiring too much time for the main thread. With the breakpoint tool, a block was defined that caused the main thread to hang. Accordingly, the Task object was declared, which, using a lambda expression, puts a block of code into execution in a parallel thread, and as soon as the execution is completed, the additional thread will return the results to the main one.
Also, to solve the problem of large input data dimensions, it was proposed to add the function of "cropping" the image (selecting the desired square). This is also expedient for the reason that, as a rule, in practice, there is no need to process the whole image.
As a result of the system operation, it is possible to obtain time series by NDVI indicator and correlation coefficients between temperature indicators and all studied types of vegetation (NDVI gradations) for the study area for a selected period. The vegetation gradation diagram for the period May-June 2016 for the Chernivtsi region is shown in Figure 4.

CONCLUSIONS
The developed system makes it possible to calculate NDVI indicators based on multi-temporal images obtained from remote servers and temperature data in a semi-automatic mode and accumulate data in a database, which is useful for further analysis of the ecological state of the territory in a certain period. The developed automated system provides the following functionality: • automatic loading of space images from a remote server or local storage; • automatic download of temperature data from weather servers by available satellite images; • calculation of vegetation indices, quantitative assessment of the NDVI area for each of the gradations; • cropping the map according to the area of interest; • saving satellite images, temperature data, and calculation results in the database; • construction of a diagram of changes in the dynamics of areas of gradations of NDVI indicators over time.
The main advantages of the developed system are user convenience since working with input space images requires a significant investment of time and a high level of knowledge of GIS processing technologies. While the designed system allows receiving already processed data in a user-friendly tabular form.
This information and the analytical system have development prospects, in particular, by adding new methods of data analysis and forecasting. In particular, it is possible to expand the functionality of the system by adding analysis methods in temporal and spatial aspects.