Development of a machine vision program to determine the completeness of wrapping plants in the soil Oleksandr V. Kanivets1 , Irina M. Kanivets1 , Tetyana M. Gorda2 and Oleksii A. Burlaka1 1 Poltava State Agrarian University, 1/3 Skovorody Str., Poltava, 36003, Ukraine 2 Poltava Polytechnic College, 83a Pushkin Str., Poltava, 36000, Ukraine Abstract The article analyzes the process of natural restoration of the main component of the soil – humus, as a result of which the dependence of the thickness of the humus layer on the number of plants embedded in the soil was revealed. The technological process of surface tillage requires constant monitoring of the completeness of plant burying. The article analyzes the literature, which showed that machine vision systems are widely used in agriculture, for example, when detecting weeds for spot treatment with herbicides, analyzing citrus forms and diseases, automated counting of roundworms of cut trees, etc. A machine vision system is proposed as a control tool for detecting weeds on the soil surface. The authors proposed their own approach to control the completeness of burying pruned weeds in the soil using machine vision systems. The work of our own program for detecting weeds on the soil surface is described in detail and step by step. The program’s operability was checked on some plant models and its effectiveness of reliable operation was confirmed. Experimental studies were conducted in the laboratory. Based on the results of research in the computer program developed by the authors, the following results were obtained: photos of the soil surface were analyzed; contours of plant models were identified; plant areas and their percentage in relation to the image area were determined, and a message was received on the screen about the presence of weeds on the surface in accordance with agrotechnical standards. Keywords machine vision, soil, Phyton, OpenCV, agriculture, agrotechnical requirements 1. Introduction Mechanical tillage combined with fertilization is one of the most difficult conditions for obtaining high and stable yields. Proper mechanical tillage is important in the system of measures to increase soil fertility in all natural and climatic zones of Ukraine [1]. CS&SE@SW 2021: 4th Workshop for Young Scientists in Computer Science & Software Engineering, December 18, 2021, Kryvyi Rih, Ukraine " k.alex2222@gmail.com (O. V. Kanivets); ira.gorda80@gmail.com (I. M. Kanivets); gtatana343@gmail.com (T. M. Gorda); oleksii.burlaka@pdaa.edu.ua (O. A. Burlaka) ~ https://www.pdaa.edu.ua/people/kanivec-oleksandr-vasylovych (O. V. Kanivets); https://www.pdaa.edu.ua/people/kanivec-irina-mihaylivna (I. M. Kanivets); https://www.pdaa.edu.ua/people/burlaka-oleksiy-anatoliyovych (O. A. Burlaka)  0000-0003-4364-8424 (O. V. Kanivets); 0000-0002-1670-5553 (I. M. Kanivets); 0000-0002-6924-0219 (T. M. Gorda); 0000-0002-2296-7234 (O. A. Burlaka) © 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) 27 The main task of basic and surface tillage is to create favorable conditions for sowing seeds to the optimal depth, growth and development of cultivated plants, preservation and restoration of humus, protection of soil from water and air erosion, destruction of weeds, pathogens and pests of cultivated plants. Modern agriculture can be divided into two large groups – intensive and organic. The main object of agriculture is soil. Soil is an organic structure. It consists of: live biomass, organic remains of plants, animals, microorganisms, products of their metabolism and humus. Dokuchaev [2] noted that if a layer of soil is isolated from virgin soil, then you can see plant roots, grass, beetle burrows, worms, larvae, as well as a small part of the ground. Insects and microorganisms recycle the soil and contribute to the creation of a loose structure. A similar position is defended by Darwin [3]. He notes that the worms began to properly cultivate the soil long before the start of arable units. Yu. A. Slashchalin [4] examined clean ground that was not poisoned by herbicides and pesticides. Research data showed that about 400 kg of bacteria, worms and other microorganisms live on 0.01 hectares of soil. These living organisms process more than 500 kg of humus per year. Humus is an important component of the soil. It is formed during the decomposition of various organic materials by microorganisms, such as roots, stems, leaves of plants, dead invertebrates, etc. The humus content in the soil is an indicator of the level of fertility. Almost all soil properties are directly dependent on the content of organic matter, 90% of which is accounted for by humus. Humus contains more than 95% of all soil nitrogen reserves, 60% phosphorus, up to 80% sulfur, and a significant part of trace elements. The nutrients in humus are not available to plants. Only after its decomposition by microorganisms do nutrients become available to plants [5]. Green plants have the largest biomass and their annual growth exceeds the biomass of invertebrates and microorganisms by several tens or hundreds of times, and vertebrates – by several thousand times. So, young grasses contain a lot of nitrogen, but less enrich the soil with humus. Organic substances of young grasses decompose quickly. Mature plants with a stiff stem contain organic substances that decompose over a long period of time. Therefore, above ground and root litter of higher plants provide the main material from which the organic matter of the soil is formed. It is these components that are used to restore humus. In intensive agriculture, control over the quality of tillage is carried out on the basis of agrotechnical requirements and the establishment of quality indicators. The quality of plowing is evaluated by the timing, depth and uniformity of its implementation, the completeness of the soil overturning, the degree of loosening and clumping, the absence of flaws, the completeness of sod embedding, crop residues, weeds, fertilizers, and the plowing of the field edges. The timeliness of plowing is assessed by comparing the actual time with the established agricultural rules for each specific district. The depth of plowing is measured with a furrow meter or ruler with divisions. Measurements are made in at least 25 places of the bend. A deviation from the specified depth on the plowed field of no more than 5% is allowed when determining the depth on the plowed field. A correction is made for looseness, for which the measured average depth is reduced by 1/4. The quality of turning the slice is determined by a special protractor. For embedding sod, crop 28 residues, weeds and manure in the soil, the soil overturning must be at least 135°. Embedding of crop residues, weeds and the absence of flaws is determined visually along the diagonal of the field. Agrotechnical measures include tillage (stubble husking, winter plowing, pre-sowing cultiva- tion, steam treatment, row-to-row cultivation), periodic mowing of weeds on roadsides, canals, meadows, pastures and mulching of the soil. Many years of agricultural experience show that winter plowing provides higher yields compared to spring plowing. According to research institutions, the spring grain harvest after winter plowing is 25-35% higher than in spring plowing. The advantage of winter cultivation over spring plowing is that during autumn plowing, more moisture and nutrients accumulate in the soil, weeds, pathogens and pests of agricultural crops are destroyed, and the effect of organic and mineral fertilizers applied increases. With the introduction of winter plowing, the stress in the spring period is reduced, which makes it possible to use the machine and tractor fleet completely for spring sowing [6]. When growing cultivated plants, the humus content in the soil is constantly decreasing due to its mineralization. Deep plowing reduces the activity of worms and microorganisms, destroys the structure of the soil, reduces its fertility. During deep plowing, the soil is actively saturated with oxygen. This process activates soil bacteria to break down humus into mineral elements. A thick layer of humus on plowed virgin ground ensures high yields. After a few years, the humus layer decreases. As a result, yields decrease, plant immunity weakens, pests and diseases spread, which leads to the use of fertilizers, herbicides and pestecids [7]. According to [8], with intensive application technologies, 97-99% of insecticides and fungicides and 80-95% of herbicides enter the soil, reservoirs, and air. The negative effect of mineral fertilizers is that when they are systematically applied to the soil, harmful sedentary substances accumulate – heavy metals (arsenic, cadmium, chromium, cobalt, copper, lead, vanadium, zinc, etc.). With each ton of phosphorus applied to the fields, up to 160 kg of fluoride enters the soil, the high concentration of which changes the direction of biological processes in the soil. Plant residues play an important role in differentiating soil indicators by profile: the content of organic matter, the accumulation of which in the soil is the plants themselves with root and crop residues. Under normal conditions, the soil receives 1.5-2 times more organic matter than with organic fertilizers [9]. Among the agrotechnical measures that significantly affect microbiological activity in the soil, mechanical tillage and mulching are among the leading places. When they act on the soil, its agrophysical properties change, which affect the water-air and thermal regimes of the soil. The influence of mechanical processing on the development of soil microflora is manifested through changes in the physical regime of the soil, movement and redistribution of organic substances within the treated layer, improvement of plant growth and development conditions [8]. Thus, there is a need for high-quality tracking of the number of embedded plants in the soil during mechanical processing and its complete closure during mulching. If agrotechnical requirements do not meet, it is necessary to make adjustments to the corresponding technological process. Currently, machine vision systems are widely used not only in the gaming industry, but also in agriculture, namely: for predicting yield, recognizing fruit ripeness, tracking the placement 29 of weeds in the field for applying herbicides, determining the type of plants by the Shape of leaves and stems, etc. Cubero et al. [10] use computer vision to study the color spectrum of citrus fruits to detect defects and diseases. They note that the color of the peel of oranges can indicate a number of dangerous diseases. Machine vision technologies make it possible not only to sort fruits according to commercial strategies, but also to remove unwanted fruits from the conveyor. Similar studies are carried out by Su et al. [11] during the detection of potato defects by machine vision. Choi et al. [12] developed a machine vision system for quantifying citrus fruits that have fallen to the ground. As a result, the system received an algorithm for improving the image for different lighting conditions and estimating the number of drops on the fruit and the mass of citrus fruits. Kefei et al. [13] proposed a quadcopter-based machine vision system for agricultural environ- mental monitoring. The advanced quadcopter recognizes images to monitor the environment of agricultural land. It collects high-definition images in real time. So it’s easy to analyze the state of growth of agricultural crops and regularly monitor the temperature, humidity and other parameters of the atmospheric environment. In turn, Zhang et al. [14] monitors in real time the optimal time for collecting fresh tea leaves. They proposed a method that provides the basic conditions for the future operation and management of tea plantations using information technology, automation and intelligent systems. The task of recognizing roundwood patterns is very important in the woodworking industry. Chiryshev and Atamanova [15] are solving this problem. They show an overview of existing roundwood recognition solutions, their advantages and disadvantages, and describe the features of their own pattern recognition algorithm. Li et al. [16], Seng et al. [17], Ahmed et al. [18] also showed their own research on the use of machine vision systems for recognizing apples, grapes, and determining the position of weeds in the field. A review of literature sources has shown that machine vision systems are widely used in various areas of agriculture, and therefore it can also be applied to determining the complete- ness of plant embedding. The purpose of this publication is to study a method for detecting plants on the soil surface during plowing by means of machine vision to control agrotechnical requirements and warn the operator of a machine-tractor unit in real time about their violation. These studies can also be used to track the quality of mulching in organic farming. 2. Study results Agrotechnical requirements for the completeness of embedding plants in the soil were described by Chernilevskyy et al. [19]. Their essence boils down to the following: the agronomist goes around the plowed field diagonally, finds not embedded plants, puts a meter frame 1 on the plowed field (figure 1) and calculates the area of 2 plants lying on the soil surface per 1 hectare. This method has a number of disadvantages: labor intensity, durability, and inaccuracy. It provides for conducting a study of the quality of embedding plants in the soil by the eye method of a limited part of the bend along the diagonal of the field. At the same time, the completeness of embedding plants in the soil is checked after processing the entire field or part of it, and adjustments to the technological process are made later. 30 Figure 1: Frame for calculating the area of not embedded plants. Since the quality of plants embedding in the soil affects the process of humus formation, all weeds must be pruned and buried. So, the classical method of determining the completeness of embedding plants in the soil needs to be improved using modern digital technologies. The essence of the proposed method for determining the completeness of plant embedding is explained in figure 2: the digital camera 1 is mounted on the tillage machine 3 using auxiliary equipment 2, and its screen is directed to the freshly treated area 4. Digital image clarity is provided by the digital camera stabilization device 5. The camera generates images or frames from the video stream at a given frequency, which are transmitted to a computer or mobile device 6. A computer or mobile device is equipped with software developed on the basis of a machine vision system of our own production [20], which recognizes and highlights the contours of all plants and determines their total area. The total area of images or frames of the video stream is also calculated and the percentage of the resulting areas is determined. The following information is displayed on the computer or mobile device screen: an image with marked plant contours, the total area of the image, the total area of plants, and the percentage of the area of not embedded plants. Author’s computer program “Slidopyt” [20] refers to image processing programs using 31 Figure 2: Scheme of the unit for studying the completeness of embedding plants in the soil by means of machine vision. machine vision tools. The program works according to the following algorithm: • opens the studied image; • defines the area of the entire image; • using a filter and mask, it outlines the entire spectrum of green shades of the plant mass, which is shown in the figure; • enter the found contours in rectangles of the specified thickness and color of lines; • defines the total area of all rectangles; • determines the percentage of the total area of rectangles to the total area of the image; • displays an image with rectangles on plants, the total area of the image itself, the area under plants, and the percentage of not embedded plant mass in the soil. The development of a machine vision system should begin with the installation of the Phyton programming language on a personal computer [21]. As a program code editor, you should use the free version of PyCharm [22]. This program provides for working with images and data arrays, so you need to connect OpenCV [23] and NumPy [24] libraries: import cv2 import numpy as np The OpenCV library contains algorithms for working with images, digital cameras, optical defects, detecting duplicates, analyzing object movement, determining the shape of an object and tracking an object, 3D reconstruction, object segmentation, gesture recognition, etc. In other words, it is a set of data types, functions, and classes for image processing by computer vision algorithms. This is a library with free source code. It is widely used in scientific and commercial projects. NumPy is an open source library for the Python programming language that supports multidimensional arrays. According to the scheme (figure 2) camera 1 takes photos of the plowed soil 4 and transmits the image to the appropriate folder on the PC. Before performing any manipulations with the image, it must first be read from the file. OpenCV uses the imread function for this purpose: 32 while True: img = cv2.imread(’Ground.jpg’) The test file for speech recognition is called "Ground.jpg". Using the OpenCV library, the program read the test image and wrote it under the new name "img". Recognition of green grass on the surface of black plowed soil is rational to filter by color. Color is the property of bodies to reflect or emit visible radiation of a certain spectral composition and intensity. There are different color models: linear, such as RBG, and nonlinear – HSV. Using the HSV model is much more convenient, because the coordinates of this color model are chosen taking into account human perception. HSV (Hue, Saturation, Value) is a color model in which the color coordinates are (figure 3): • Hue – color tone, (for example, red, green, or medium blue). It varies from 0 to 360°. • Saturation varies from 0 to 100 or from 0 to 1. The higher this parameter is, the “cleaner” the color, which is why this parameter is sometimes called color purity. And the closer this parameter is to zero, the closer the color is to neutral gray. • Value (color value) or Brightness. Set in the range from 0 to 100 or from 0 to 1. Figure 3: HSV color model structure. Using the cv2.cvtColor function we transform the color model: hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) Thus, the color model changed from BGR to HSV. We overwrite the data under the new name "hsv". Filtering the green hue is performed by the cv2.inRange function and written to the "mask_green" variable: 33 mask_green = cv2.inRange(hsv, (33, 102, 46), (102, 255,255)) In the function itself, we specify the target image "hsv", as well as the lower and upper limits of the filter. We find the range of the green hue using trackbars: cv.createTrackbar (low_H_name, window_detection_name, low_H, max_value_H, on_low_H_thresh_trackbar) cv.createTrackbar (high_H_name, window_detection_name, high_H, max_value_H, on_high_H_thresh_trackbar) cv.createTrackbar (low_S_name, window_detection_name, low_S, max_value, on_low_S_thresh_trackbar) cv.createTrackbar (high_S_name, window_detection_name, high_S, max_value, on_high_S_thresh_trackbar) cv.createTrackbar (low_V_name, window_detection_name, low_V, max_value, on_low_V_thresh_trackbar) cv.createTrackbar (high_V_name, window_detection_name, high_V, max_value, on_high_V_thresh_trackbar) With the function cv2.findContours we find all the contours of green color and write them in the variable contours: contours, hierarchy = cv2.findContours(mask_green, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) It is advisable to choose the mask_green mask as the target image for searching for contours. The grouping mode is cv2.RETR_TREE, which groups contours into a multilevel hierarchy. The packaging method used cv2.CHAIN_APPROX_SIMPLE, which glues all horizontal, vertical, and diagonal contours together. The found green contours, i.e. plant contours, may not be closed. They do not consist of a single connected line, but of many broken lines. This makes it difficult to calculate the area of contours. To refute the shape of contours, you need to fit them into simple geometric shapes, such as rectangles. The next loop iterates through all the plant contours found in the loop and places them in rectangles: for cnt in contours: rect = cv2.minAreaRect(cnt) box = cv2.boxPoints(rect) box = np.int0(box) area = int((rect[1][0]+1) * (rect[1][1]+1)) if area > 10: cv2.drawContours(img, [box], -1, (0, 0, 255), 2) The cv2.minAreaRect function writes each contour in a rectangle of minimum area and writes it to the "rect" variable. The next function cv2.boxPoints determines the coordinates of the 34 four vertices of the rectangle and writes it to the "box" variable. The np.int0 (box) function rounds the coordinates of the rectangle of the "box" variable. The area is calculated using the int((rect[1][0]+1) * (rect[1][1]+1)) function. 1 pixel thick contour to determine the area runs inside the rectangle. Thus, the actual area is smaller. To eliminate this effect, add 1 pixel to the coordinates of the rectangle vertices. Now the rectangle will run along the outside of the contour. We write the data to the "area" variable. The cv2.drawContours function draws the outlines of the rectangles of the "box" variables in the "img" image. The line thickness is 2 pixels, the color is red. Only contours with an area of more than 10 pixels are displayed. Defining the total area of all contours: square = int(area) + int(square) The "area" and "square" variables are expressed as integers. The initial value of the "square" variable is assigned to 0. The total area of the frame for calculating the percentage of plants to soil is determined in the same way using the method described above. First you need to select a white mask: mask_white = cv2.inRange(hsv, (0, 0, 0), (255, 255, 255)) Write the data to the "mask_white" variable. Find the outline of the entire frame of the "mask_white": contour_w, hierarchy_w = cv2.findContours(mask_white, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) Data on the contour of the frame is written to the "contour_w" variable. Enter the rectangle in the "contour_w" mask and determine its area: for cnt_w in contour_w: rect_w = cv2.minAreaRect(cnt_w) box_w = cv2.boxPoints(rect_w) box_w = np.int0(box_w) area_w = int((rect_w[1][0]+1) * (rect_w[1][1]+1)) if area_w > 10: square_w = int(area_w) + int(square_w) We calculate the percentage of plant area to the total area of the image, i.e. the percentage of not embedded grass: percent = int(square) * 100 / int(square_w) We write the data to the "percent" variable. A certain percentage is compared with agrotechnical requirements [19]: 35 if percent < 95: print("Agrotechnical requirements – Norm") else: print("WARNING!!! It is necessary to adjust the unit!!!") If the variable "percentage" is more than 5%, then the screen displays the inscription: "Agrotechnical requirements – Norm", if less – "WARNING!!! It is necessary to adjust the unit!!!". We display all the defined data on the screen: print("The area under the grass : ", square) print("Total area for analysis : ", square_w) print("The percentage of not embedded grass : ", percent, "%") We show an image of the test soil with marked plant contours: cv2.imshow(’Najdenie rastenia’, img) To test the developed program in the laboratory, we make plant models from green paper. The leaves and stems of plants have different shapes, so we use rectangle, square, triangle, and circle as model shapes. Plant 1 Models and Ruler 2 for displaying the scale are shown in figure 4. Figure 4: Plant models and a ruler to demonstrate the scale. The size and shape of the plant models are as follows: 36 Figure 5: The processing of the test image with a computer program. • rectangle 10×96 mm; • 10×10 mm square; • a right triangle with a leg length of 10 mm; • a circle with a diameter of 25 mm. We check the correct operation of the program using the following method: • upload the image to figure 4 go to the program and determine the percentage of not embedded grass; • print out the image of figure 4 on paper and we make measurements and calculate the percentage of not embedded grass manually; • we compare two indicators. The margin of error should not exceed 3%. 37 The processing of the test image by a computer program is shown in figure 5. The image with plant models has a size of 800×600 pixels. So, the program correctly calculated the total area of the image – 480,000 square pixels. She selected areas of the green spectrum, outlined them, and calculated an area of 88,644 pixels. Each contour was enclosed in a red rectangle of the smallest shape. The percentage of not embedded grass was 18.4675%. Let’s manually determine the areas of the test image. The measurement result is shown in figure 6. Figure 6: Result of manual measurement of the test image. The results of measurements and calculation of the area of each figure are listed in table 1. Table 1 shows that the total area of plant models is 5,291.52 𝑚𝑚2 , and the total area of the image is 33,617.96 𝑚𝑚2 . The percentage of not embedded grass when manually calculating the area of plant models was 15.74% of the total area of the image. Thus, the deviation from the values of the computer program is 2.73%, which does not exceed the error limit. This makes it possible to state that the program correctly determines the area of plant models and can be used in further laboratory studies. Laboratory tests were performed on a ring-type soil channel. In figure 7 shows the process of conducting the experiment. 38 Table 1 Measurement results and calculation of the area of each shape. Item name Side dimensions, 𝑚𝑚 Area, 𝑚𝑚2 Number of objects Total area, 𝑚𝑚2 Rectangle 9.7×96 931.2 4 3,724.8 Triangle 9.8×9.8 48.02 3 144.06 Square 9.7×9.3 90.21 4 360.84 Circle 26 530.91 2 1,061.82 Total 5,291.52 Test image 211.7×158.8 33,617.96 1 33,617.96 Figure 7: Conducting an experiment on a soil channel. 39 The laboratory installation consists of a personal computer (PC) 1 with a computer program installed, a webcam 2, a soil channel 3, and plant models 4. The PC is fixed on the fixed frame of the ground channel. The webcam is mounted on a fixed stable working body and is configured to photograph the soil surface of the channel with plant models. Before starting the experiment, plant models are decomposed on the soil surface. The channel rotates. The stationary working body loosens the ground and presses the plant models. Meanwhile, the webcam takes photos of the soil surface. Photos are saved on your PC in the appropriate folder. A machine vision computer program analyzes each image and shows the recognition results. The process of analyzing the soil surface of the channel with plant models is shown in figure 8. Figure 8: The process of analyzing the soil surface of a channel with plant models. As a result of image analysis, the program recognized all plant models on the soil surface, selected them with contours, and entered each contour in the corresponding red rectangle. The total area of the image was 261,047 square pixels, the area of plant models was 11,340 40 square pixels, and the ratio of plant area to the total area of the photo is 4.34%, which meets agrotechnical requirements. 3. Conclusions and perspectives of further research Soil is an important component of agriculture. Its fertility depends on many factors, including the thickness of the humus layer. The main building material of humus is decomposed and recycled plant remains (weeds). During soil exploitation, the use of herbicides and pesticides, the amount of humus is constantly decreasing. One of the ways to naturally restore soil fertility is to control the process of maximum embedding of weeds during plowing so that not a single plant remains on the surface. Modern agrotechnical requirements control the number of plants on the soil surface after plowing in an “eye-measuring” way by bypassing the diagonal of the field, which is not accurate. The use of our proposed machine vision program during the operation of the arable unit tracks the presence of all plants on the soil surface. Laboratory experiments performed on plant models showed high measurement accuracy. The discrepancy between manual and automated determination of plant areas on the soil surface was only 2.73%., which indicates the effectiveness of the developed program. The program developed by us can also be used in the opposite direction, in particular, during the mulching process, namely: to track the closure of the soil with plant residues. Further research focuses on the influence of light on the quality of object recognition, as well as improving the accuracy of object recognition by constructing better contours. References [1] M. M. Kosinov, P. H. Luzan, Y. V. Machok, Tekhnolohiya vyrobnytstva produktsiyi roslyn- nytstva, Metodychni vkazivky do vykonannya laboratornykh robit dlya studentiv spets. 7.091901, 7.091902, 7.091904, 8.090215, KDTU, Kirovohrad, 1999. [2] V. V. Dokuchaev, Nashi stepi prezhde i teper, Tipografiia E. Evdokimova, Sankt-Peterburg, 1892. URL: https://rusneb.ru/catalog/000199_000009_003630944/. [3] C. Darwin, The Formation of Vegetable Mould Through the Action of Worms, with Obser- vations on their Habits, John Murray, London, 1881. URL: http://darwin-online.org.uk/ EditorialIntroductions/Freeman_VegetableMouldandWorms.html. [4] Pamyatka po primeneniyu organicheskogo zemledeliya na priusadeb- nykh zemlyakh severnykh rayonov Karakalpakstana, Sovmestnyy proyekt PROON i Kanadskogo fonda mestnykh initsiativ, UNDP, 2020. URL: https: //www.uz.undp.org/content/uzbekistan/ru/home/library/environment_energy/ organic-agriculture-is-a-measure-to-increase-the-yield-of-agricu.html. [5] A. V. Solyanikov, Mikroorganizmy v pochve, Molodoy uchenyy 50 (236) (2018) 75–77. URL: https://moluch.ru/archive/236/54777/. [6] I. V. Veselovskyy, V. P. Hudz, V. M. Kaliberda, Osnovy ahronomiyi, 3 ed., Urozhay, Kyiv, 1991. 41 [7] B. Aybergenov, Nulevaya obrabotka pochvy na podverzhennykh zasoleniyu oroshayemykh zemlyakh Yuzhnogo Priaralya, in: Sbornik statey III Mezhdunarodnoy nauchno- prakticheskoy konferentsii «Innovatsionnyye protsessy v APK», Moskva, 2011, p. 3. [8] N. K. Grabak, I. N. Topikha, V. M. Davidenko, I. V. Shevel, Osnovy vedennya silskoho hospodarstva ta okhorona zemel, Professional, Kyiv, 2005. [9] V. Y. Ilchenko, N. O. Ponomarenko, R. H. Ponomarenko, D. M. Butenko, Perevahy ta nedoliky no-till systemy, Konstruyuvannya, vyrobnytstvo ta ekspluatatsiya silsko- hospodarskykh mashyn 43 (2013) 101–108. URL: http://dspace.kntu.kr.ua/jspui/bitstream/ 123456789/2778/1/20.pdf. [10] S. Cubero, W. S. Lee, N. Aleixos, F. Albert, J. Blasco, Automated systems based on machine vision for inspecting citrus fruits from the field to postharvest—a review, Food and Bioprocess Technology 9 (2016) 1623–1639. doi:10.1007/s11947-016-1767-1. [11] Q. Su, N. Kondo, D. F. A. Riza, H. Habaragamuwa, Potato quality grading based on depth imaging and convolutional neural network, Journal of Food Quality 2020 (2020) 8815896. doi:10.1155/2020/8815896. [12] D. Choi, W. S. Lee, R. Ehsani, F. M. Roka, A machine vision system for quantification of citrus fruit dropped on the ground under the canopy, American Society of Agricultural and Biological Engineers 58 (2015) 933–946. doi:10.13031/trans.58.10688. [13] S. Kefei, L. Baoying, L. Hanxu, L. Chen, Agricultural environment monitoring combined with quadrotor aircraft control algorithm, Journal of Engineering Science and Technology Review 12 (2019) 190–200. doi:10.25103/jestr.123.25. [14] L. Zhang, H. Zhang, Y. Chen, S. Dai, X. Li, K. Imou, Z. Liu, M. Li, Real-time monitoring of optimum timing for harvesting fresh tea leaves based on machine vision, International Journal of Agricultural and Biological Engineering 12 (2019) 6–9. doi:10.25165/j.ijabe. 20191201.3418. [15] Y. V. Chiryshev, A. S. Atamanova, Automatic wood log detection based on random decision forests learning algorithm and histogram of oriented gradients, CEUR Workshop Proceedings 1909 (2016) 7–12. URL: http://ceur-ws.org/Vol-1909/paper2.pdf. [16] B. Li, Y. Long, H. Song, Detection of green apples in natural scenes based on saliency theory and Gaussian curve fitting, International Journal of Agricultural and Biological Engineering 11 (2018) 192–198. doi:10.25165/j.ijabe.20181101.2899. [17] K. P. Seng, L.-M. Ang, L. M. Schmidtke, S. Y. Rogiers, Computer vision and machine learning for viticulture technology, IEEE Access 6 (2018) 67494–67510. doi:10.1109/ ACCESS.2018.2875862. [18] F. Ahmed, H. A. Al-Mamun, A. S. M. H. Bari, E. Hossain, P. Kwan, Classification of crops and weeds from digital images: A support vector machine approach, Crop Protection 40 (2012) 98–104. doi:10.1016/j.cropro.2012.04.024. [19] M. S. Chernilevskyy, Y. A. Bilyavskyy, R. B. Kropyvnytskyy, L. I. Vorona, Ahrotekhnichni vymohy ta otsinka yakosti obrobitku gruntu, 2 ed., Zhytomyrskyy natsionalnyy ahroekolo- hichnyy universytet, Zhytomyr, 2012. [20] O. V. Kanivets, I. M. Kanivets, S. V. Liashenko, Kompyuterna prohrama «Slidopyt», Svidotstvo pro reyestratsiyu avtorskoho prava na tvir № 103432 (2021-03-24). [21] JetBrains s.r.o., Welcome to Python.org, 2022. URL: https://www.python.org. [22] PyCharm: the Python IDE for Professional Developers by JetBrains, 2022. URL: https: 42 //www.jetbrains.com/pycharm/. [23] OpenCV team, Home - OpenCV, 2022. URL: https://opencv.org/. [24] NumPy, Numpy, 2021. URL: https://numpy.org/. 43