Applying textural Law’s masks to images using machine learning

ABSTRACT


INTRODUCTION
In the context of the globalization of economic mechanisms in agriculture, the role of food programs is increasing, aimed at solving the problems of providing the population with food, light, and food industrieswith raw materials. In developed countries, commercial agriculture predominates, while traditional forms of agriculture are represented mainly in developing countries. One of the main objectives of the program and plan is the development of the National Agriculture of the Republic of Kazakhstan, increasing the productivity, quality, and sustainability of agricultural products using modern technologies. The successful solution to such a problem requires automated image processing [1]- [4] for agricultural management, which can become a tool for displaying the state and structure of agricultural production and the results of the agricultural inventory. In addition, data reflecting the composition, structure, and state of agriculture in digital form are insufficiently presented. The solution to this problem requires the development of a modern scientific-practical basis for the optimal compilation and prompt updating of digital data on the state of agricultural fields, as well as the creation of updated databases in the interests of agricultural management. In this regard, the developed machine learning methods make it possible to improve numerical indicators when processing images of high spatial resolution on the example of segmentation [5], [6], classification [7], [8], and categorization [9], [10] problems of the nature of vegetation damage. Also, in the future, they can be used in the monitoring system of forestry and agriculture using unmanned aerial vehicles (UAVs). To solve the problems posed in the work, methods of remote sensing data preprocessing, the Laws texture mask method [11] as weights in machine learning, and the clustering method (k-means) were used.
Puri et al. [12] characterized various types of leaves of medicinal plants using a computer classification system. The classification system used by the authors mainly distinguishes between the texture features of various leaves of medicinal plants. To achieve the desired result, the researchers took five classes of different types of plant leaves and extracted their textural features using Loves texture masks, and the support vector machine (SVM) classifier is used for the classification task. In this work, the authors did not consider machine learning methods that make distinguishing between plant leaf types possible.
Yessenova et al. [13] presented an analysis of a non-standard approach to the segmentation of texture regions in aerospace images. The question of the applicability of sets of textural features for the analysis of experimental data to identify characteristic areas in aerospace images, which in the future can be used to identify types of crops, weeds, diseases, and pests, is being investigated. Suitable algorithms were selected and appropriate software tools were created, but machine-learning methods for automated image processing were not considered.
Syed and Suganthi [14] proposed a strategy in which weeds are characterized by a set of shape descriptors. Weeds appear in pictures of an open-air field, which reflect real situations taken from the red, green and blue (RGB) camera. In the approach presented by the authors, four decision methods were adapted to use the best form descriptors as attributes, and a choice was made. The authors did not consider machine learning methods for automated image processing to identify weeds in agriculture.
A review of the results of an experiment on the combined use of spectral and structural features for the classification of vegetation on hyperspectral aerial photographs [15]. The information content of the texture properties displayed in the ENVI package was analyzed in different parts of the spectrum from 400 to 1,000 nm. An example is given where the combined use of spectral and textural features improves the classification accuracy. In this work, the analysis of multispectral images and spectrophotometric coefficients was not carried out. Martinez et al. [16] identified flax and weed patches as structural features in aerial photographs. According to scientific literature, each task definition does not have a unique texture information vector. Also, the article does not specifically mention wheat and did not find any factors negatively affecting its growth. A distinctive feature of this work is the recognition of objects in aerial photographs by their structural features. That is, by analyzing experimental data, we explored the possibility of using sets of texture features to highlight characteristic areas in aerial photographs.

METHOD
In this work, we used the texture search method based on the comparison of the Laws energy characteristics for the sample and the processed image. In a software implementation experiment, Laws texture masks were used as weights in machine learning [17], [18] to find uniform textures in images. The proposed algorithm for calculating texture features is invariant to scale changes Figure 1. The main idea of the algorithm is to calculate energy texture features using local masks at each level. 25 local masks are obtained by pairwise multiplication of one-dimensional vectors L5, E5, S5, W5, and R5 proposed by K. Laws [19]- [21]. Base vectors allow you to calculate a symmetrical weighted local average, and detect edges, spots, waves, and ripples as in (1).

RESULTS AND DISCUSSION
In this work, the reviewed original image was requested from the Planet.com server, which was made from publicly available satellite images of Sentinel-2. Despite the high resolution of the obtained aerial photographs, it is difficult to distinguish homogeneous areas in Figure 2. Therefore, taking into account the effectiveness of the texture masks used in [25], image preprocessing was automated. The matrix obtained as the current 5*5 texture mask is multiplied by the corresponding element of the original image and summed up. The result obtained is placed in the center of the considered current part of the matrix. Thus, a new matrix is created by traversing the entire matrix of the current window. Figure 3 shows the average value of the considered possible 25 texture masks.  Figure 4, i.e., the original image in Figure 4(a), the result of applying the texture mask is L5L5=375.63 in Figure 4(b), the result of applying the texture mask is S5R5=244.63 in Figure 4(c), the result of applying the texture mask is R5L5=221.8 in Figure 4(d), the result of applying the texture mask is R5W5= 1.8 in Figure 4(e), the result of applying the texture mask is R5R5=223.97 in Figure 4(f). As a result, obtained from the L5L5 texture mask at the maximum value, homogeneous areas were well highlighted.
After applying textural masks to the resulting images, the k-means clustering method was applied. The results of the experiment are shown in Figure 5. In the field under consideration, the number of clusters was 5. That is weed foci, unsown fields, wheat seedlings, tillering, and wheat. Due to the limited availability of satellite images, i.e., due to the presence of clouds or technical interference during the required growing season, the amount of data required is small. Therefore, the machine learning method was used for the automatic processing of space images. The texture mask L5L5 was solved informatively from images obtained from the results of the texture energy masking method used as weights in machine learning. The matrix size of this mask is inserted as a weight into the automatic image processing system.

CONCLUSION
As a result of the research performed in this work, the tasks were solved, and the main goal of the work was achieved-the use of the Laws texture mask method in machine learning for automated image processing to classify the nature of crop damage. An algorithm for the selection of homogeneous regions in images with a high spatial resolution under conditions of small samples has been developed. The normalized values of Loves texture masks as weights to the original image in machine learning were calculated. The results of 25 possible texture mask values were evaluated using the standard deviation. As a result of the deviation, 6 texture masks were selected: L5L5, S5R5, R5L5, R5W5, and R5R5. After applying the k-means clustering method to all six images, homogeneous areas were clearly visible in the images. But the maximum accuracy was determined by the result of applying the L5L5 texture mask, which is more informative among the selected masks. The developed algorithm is the basis for creating libraries that can be used as part of software systems for solving a wide range of digital image processing and pattern recognition problems.