<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Development of a machine vision program to determine the completeness of wrapping plants in the soil</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Oleksandr V. Kanivets</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Irina M. Kanivets</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tetyana M. Gorda</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksii A. Burlaka</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Poltava Polytechnic College</institution>
          ,
          <addr-line>83a Pushkin Str., Poltava, 36000</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Poltava State Agrarian University</institution>
          ,
          <addr-line>1/3 Skovorody Str., Poltava, 36003</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>27</fpage>
      <lpage>43</lpage>
      <abstract>
        <p>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 efectiveness 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.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;machine vision</kwd>
        <kwd>soil</kwd>
        <kwd>Phyton</kwd>
        <kwd>OpenCV</kwd>
        <kwd>agriculture</kwd>
        <kwd>agrotechnical requirements</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Mechanical tillage combined with fertilization is one of the most dificult 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 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>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.</p>
      <p>Modern agriculture can be divided into two large groups – intensive and organic. The main
object of agriculture is soil.</p>
      <p>Soil is an organic structure. It consists of: live biomass, organic remains of plants, animals,
microorganisms, products of their metabolism and humus.</p>
      <p>
        Dokuchaev [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] 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 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. He notes that the worms began to properly cultivate the
soil long before the start of arable units.
      </p>
      <p>
        Yu. A. Slashchalin [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] 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.
      </p>
      <p>
        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 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. 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 stif 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.
      </p>
      <p>In intensive agriculture, control over the quality of tillage is carried out on the basis of
agrotechnical requirements and the establishment of quality indicators.</p>
      <p>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
lfaws, the completeness of sod embedding, crop residues, weeds, fertilizers, and the plowing of
the field edges.</p>
      <p>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.</p>
      <p>The quality of turning the slice is determined by a special protractor. For embedding sod, crop
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
ifeld.</p>
      <p>Agrotechnical measures include tillage (stubble husking, winter plowing, pre-sowing
cultivation, steam treatment, row-to-row cultivation), periodic mowing of weeds on roadsides, canals,
meadows, pastures and mulching of the soil.</p>
      <p>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.</p>
      <p>
        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 efect 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 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        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 [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        According to [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], with intensive application technologies, 97-99% of insecticides and fungicides
and 80-95% of herbicides enter the soil, reservoirs, and air. The negative efect 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.
      </p>
      <p>
        Plant residues play an important role in diferentiating 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 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Among the agrotechnical measures that significantly afect 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 afect 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
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>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.</p>
      <p>
        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
of weeds in the field for applying herbicides, determining the type of plants by the Shape of
leaves and stems, etc. Cubero et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] 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. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] during the detection of potato defects
by machine vision.
      </p>
      <p>
        Choi et al. [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] 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
diferent lighting conditions and estimating the number of drops on the fruit and the mass of
citrus fruits.
      </p>
      <p>
        Kefei et al. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] proposed a quadcopter-based machine vision system for agricultural
environmental 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. [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] 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.
      </p>
      <p>
        The task of recognizing roundwood patterns is very important in the woodworking industry.
Chiryshev and Atamanova [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] 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. [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], Seng et al. [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], Ahmed et al. [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] 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.
      </p>
      <p>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
completeness 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.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Study results</title>
      <p>
        Agrotechnical requirements for the completeness of embedding plants in the soil were described
by Chernilevskyy et al. [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. 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.
      </p>
      <p>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.</p>
      <p>Since the quality of plants embedding in the soil afects 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.</p>
      <p>
        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 [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], 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.
      </p>
      <p>
        Author’s computer program “Slidopyt” [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] refers to image processing programs using
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.
      </p>
      <p>
        The development of a machine vision system should begin with the installation of the Phyton
programming language on a personal computer [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. As a program code editor, you should use
the free version of PyCharm [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>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</p>
      <p>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.</p>
      <p>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:
while True:
img = cv2.imread(’Ground.jpg’)</p>
      <p>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".</p>
      <p>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.</p>
      <p>There are diferent 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.</p>
      <p>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.</p>
      <p>• Value (color value) or Brightness. Set in the range from 0 to 100 or from 0 to 1.</p>
      <sec id="sec-2-1">
        <title>Using the cv2.cvtColor function we transform the color model:</title>
        <p>hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)</p>
        <p>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:</p>
        <p>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)</p>
        <p>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)</p>
        <p>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.</p>
        <p>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 dificult to calculate the area of
contours. To refute the shape of contours, you need to fit them into simple geometric shapes,
such as rectangles.</p>
        <p>
          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[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][0]+1) * (rect[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]+1))
if area &gt; 10:
cv2.drawContours(img, [box], -1, (0, 0, 255), 2)
        </p>
        <p>
          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
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[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][0]+1) * (rect[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]+1)) function. 1 pixel thick contour to determine the area runs
inside the rectangle. Thus, the actual area is smaller. To eliminate this efect, 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.
        </p>
        <p>Defining the total area of all contours:
square = int(area) + int(square)</p>
        <p>The "area" and "square" variables are expressed as integers. The initial value of the "square"
variable is assigned to 0.</p>
        <p>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.</p>
        <p>First you need to select a white mask:
mask_white = cv2.inRange(hsv, (0, 0, 0), (255, 255, 255))</p>
      </sec>
      <sec id="sec-2-2">
        <title>Write the data to the "mask_white" variable. Find the outline of the entire frame of the "mask_white":</title>
        <p>contour_w, hierarchy_w = cv2.findContours(mask_white, cv2.RETR_TREE,
cv2.CHAIN_APPROX_SIMPLE)</p>
      </sec>
      <sec id="sec-2-3">
        <title>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:</title>
        <p>
          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[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][0]+1) * (rect_w[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ][
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]+1))
if area_w &gt; 10:
square_w = int(area_w) + int(square_w)
        </p>
        <p>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)</p>
      </sec>
      <sec id="sec-2-4">
        <title>We write the data to the "percent" variable. A certain percentage is compared with agrotechnical requirements [19]:</title>
        <p>if percent &lt; 95:
print("Agrotechnical requirements – Norm")
else: print("WARNING!!! It is necessary to adjust the unit!!!")</p>
        <p>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!!!".</p>
        <p>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, "%")</p>
      </sec>
      <sec id="sec-2-5">
        <title>We show an image of the test soil with marked plant contours:</title>
        <p>cv2.imshow(’Najdenie rastenia’, img)</p>
        <p>To test the developed program in the laboratory, we make plant models from green paper.
The leaves and stems of plants have diferent 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.</p>
      </sec>
      <sec id="sec-2-6">
        <title>The size and shape of the plant models are as follows:</title>
        <p>• 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.</p>
        <p>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%.
The processing of the test image by a computer program is shown in figure 5.</p>
        <p>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%.</p>
        <p>Let’s manually determine the areas of the test image. The measurement result is shown in
ifgure 6.</p>
        <p>The results of measurements and calculation of the area of each figure are listed in table 1.</p>
        <p>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.</p>
        <p>Laboratory tests were performed on a ring-type soil channel. In figure 7 shows the process
of conducting the experiment.</p>
        <p>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.</p>
        <p>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
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.</p>
        <p>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.</p>
        <p>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.</p>
        <p>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
efectiveness 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.</p>
        <p>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.
//www.jetbrains.com/pycharm/.
[23] OpenCV team, Home - OpenCV, 2022. URL: https://opencv.org/.
[24] NumPy, Numpy, 2021. URL: https://numpy.org/.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>M. M. Kosinov</surname>
            ,
            <given-names>P. H.</given-names>
          </string-name>
          <string-name>
            <surname>Luzan</surname>
            ,
            <given-names>Y. V.</given-names>
          </string-name>
          <string-name>
            <surname>Machok</surname>
          </string-name>
          ,
          <article-title>Tekhnolohiya vyrobnytstva produktsiyi roslynnytstva, Metodychni vkazivky do vykonannya laboratornykh robit dlya studentiv spets</article-title>
          .
          <volume>7</volume>
          .
          <issue>091901</issue>
          ,
          <issue>7</issue>
          .091902,
          <issue>7</issue>
          .091904,
          <issue>8</issue>
          .090215,
          <string-name>
            <surname>KDTU</surname>
          </string-name>
          , Kirovohrad,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V. V.</given-names>
            <surname>Dokuchaev</surname>
          </string-name>
          ,
          <article-title>Nashi stepi prezhde i teper, Tipografiia E</article-title>
          . Evdokimova,
          <string-name>
            <surname>Sankt-Peterburg</surname>
          </string-name>
          ,
          <year>1892</year>
          . URL: https://rusneb.ru/catalog/000199_000009_
          <fpage>003630944</fpage>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C.</given-names>
            <surname>Darwin</surname>
          </string-name>
          ,
          <article-title>The Formation of Vegetable Mould Through the Action of Worms, with Observations on their Habits, John Murray</article-title>
          , London,
          <year>1881</year>
          . URL: http://darwin-online.org.uk/ EditorialIntroductions/Freeman_VegetableMouldandWorms.html.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>[4] Pamyatka po primeneniyu organicheskogo zemledeliya na priusadebnykh zemlyakh severnykh rayonov Karakalpakstana, Sovmestnyy proyekt PROON i Kanadskogo fonda mestnykh initsiativ</article-title>
          ,
          <source>UNDP</source>
          ,
          <year>2020</year>
          . URL: https: //www.uz.undp.org/content/uzbekistan/ru/home/library/environment_energy/ organic
          <article-title>-agriculture-is-a-measure-to-increase-the-yield-of-agricu</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Solyanikov</surname>
          </string-name>
          , Mikroorganizmy v pochve,
          <source>Molodoy uchenyy 50 (236)</source>
          (
          <year>2018</year>
          )
          <fpage>75</fpage>
          -
          <lpage>77</lpage>
          . URL: https://moluch.ru/archive/236/54777/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>I. V.</given-names>
            <surname>Veselovskyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. P.</given-names>
            <surname>Hudz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Kaliberda</surname>
          </string-name>
          , Osnovy ahronomiyi, 3 ed.,
          <string-name>
            <surname>Urozhay</surname>
          </string-name>
          , Kyiv,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>B.</given-names>
            <surname>Aybergenov</surname>
          </string-name>
          ,
          <article-title>Nulevaya obrabotka pochvy na podverzhennykh zasoleniyu oroshayemykh zemlyakh Yuzhnogo Priaralya, in: Sbornik statey III Mezhdunarodnoy nauchnoprakticheskoy konferentsii «Innovatsionnyye protsessy v APK»</article-title>
          , Moskva,
          <year>2011</year>
          , p.
          <fpage>3</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>N. K.</given-names>
            <surname>Grabak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. N.</given-names>
            <surname>Topikha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Davidenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. V.</given-names>
            <surname>Shevel</surname>
          </string-name>
          ,
          <article-title>Osnovy vedennya silskoho hospodarstva ta okhorona zemel</article-title>
          , Professional, Kyiv,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>V. Y.</given-names>
            <surname>Ilchenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. O.</given-names>
            <surname>Ponomarenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Ponomarenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Butenko</surname>
          </string-name>
          ,
          <article-title>Perevahy ta nedoliky no-till systemy, Konstruyuvannya, vyrobnytstvo ta ekspluatatsiya silskohospodarskykh mashyn 43 (</article-title>
          <year>2013</year>
          )
          <fpage>101</fpage>
          -
          <lpage>108</lpage>
          . URL: http://dspace.kntu.kr.ua/jspui/bitstream/ 123456789/2778/1/20.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Cubero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. S.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Aleixos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Albert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Blasco</surname>
          </string-name>
          ,
          <article-title>Automated systems based on machine vision for inspecting citrus fruits from the field to postharvest-a review</article-title>
          ,
          <source>Food and Bioprocess Technology</source>
          <volume>9</volume>
          (
          <year>2016</year>
          )
          <fpage>1623</fpage>
          -
          <lpage>1639</lpage>
          . doi:
          <volume>10</volume>
          .1007/s11947-016-1767-1.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Su</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kondo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. F. A.</given-names>
            <surname>Riza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Habaragamuwa</surname>
          </string-name>
          ,
          <article-title>Potato quality grading based on depth imaging and convolutional neural network</article-title>
          ,
          <source>Journal of Food Quality</source>
          <year>2020</year>
          (
          <year>2020</year>
          )
          <article-title>8815896</article-title>
          . doi:
          <volume>10</volume>
          .1155/
          <year>2020</year>
          /8815896.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D.</given-names>
            <surname>Choi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. S.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Ehsani</surname>
          </string-name>
          ,
          <string-name>
            <surname>F. M. Roka,</surname>
          </string-name>
          <article-title>A machine vision system for quantification of citrus fruit dropped on the ground under the canopy</article-title>
          ,
          <source>American Society of Agricultural and Biological Engineers</source>
          <volume>58</volume>
          (
          <year>2015</year>
          )
          <fpage>933</fpage>
          -
          <lpage>946</lpage>
          . doi:
          <volume>10</volume>
          .13031/trans.
          <volume>58</volume>
          .10688.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kefei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Baoying</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Hanxu</surname>
          </string-name>
          , L. Chen,
          <article-title>Agricultural environment monitoring combined with quadrotor aircraft control algorithm</article-title>
          ,
          <source>Journal of Engineering Science and Technology Review</source>
          <volume>12</volume>
          (
          <year>2019</year>
          )
          <fpage>190</fpage>
          -
          <lpage>200</lpage>
          . doi:
          <volume>10</volume>
          .25103/jestr.123.25.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , H. Zhang,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Imou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <article-title>Real-time monitoring of optimum timing for harvesting fresh tea leaves based on machine vision</article-title>
          ,
          <source>International Journal of Agricultural and Biological Engineering</source>
          <volume>12</volume>
          (
          <year>2019</year>
          )
          <fpage>6</fpage>
          -
          <lpage>9</lpage>
          . doi:
          <volume>10</volume>
          .25165/j.ijabe.
          <volume>20191201</volume>
          .3418.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Y. V.</given-names>
            <surname>Chiryshev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Atamanova</surname>
          </string-name>
          ,
          <article-title>Automatic wood log detection based on random decision forests learning algorithm and histogram of oriented gradients</article-title>
          ,
          <source>CEUR Workshop Proceedings</source>
          <year>1909</year>
          (
          <year>2016</year>
          )
          <fpage>7</fpage>
          -
          <lpage>12</lpage>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-1909/paper2.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>B.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Long</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <article-title>Detection of green apples in natural scenes based on saliency theory and Gaussian curve fitting</article-title>
          ,
          <source>International Journal of Agricultural and Biological Engineering</source>
          <volume>11</volume>
          (
          <year>2018</year>
          )
          <fpage>192</fpage>
          -
          <lpage>198</lpage>
          . doi:
          <volume>10</volume>
          .25165/j.ijabe.
          <volume>20181101</volume>
          .2899.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>K. P.</given-names>
            <surname>Seng</surname>
          </string-name>
          , L.
          <string-name>
            <surname>-M. Ang</surname>
            ,
            <given-names>L. M.</given-names>
          </string-name>
          <string-name>
            <surname>Schmidtke</surname>
            ,
            <given-names>S. Y.</given-names>
          </string-name>
          <string-name>
            <surname>Rogiers</surname>
          </string-name>
          ,
          <article-title>Computer vision and machine learning for viticulture technology</article-title>
          ,
          <source>IEEE Access 6</source>
          (
          <year>2018</year>
          )
          <fpage>67494</fpage>
          -
          <lpage>67510</lpage>
          . doi:
          <volume>10</volume>
          .1109/ ACCESS.
          <year>2018</year>
          .
          <volume>2875862</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ahmed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. A.</given-names>
            <surname>Al-Mamun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S. M. H.</given-names>
            <surname>Bari</surname>
          </string-name>
          , E. Hossain,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kwan</surname>
          </string-name>
          ,
          <article-title>Classification of crops and weeds from digital images: A support vector machine approach</article-title>
          ,
          <source>Crop Protection</source>
          <volume>40</volume>
          (
          <year>2012</year>
          )
          <fpage>98</fpage>
          -
          <lpage>104</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.cropro.
          <year>2012</year>
          .
          <volume>04</volume>
          .024.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Chernilevskyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. A.</given-names>
            <surname>Bilyavskyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Kropyvnytskyy</surname>
          </string-name>
          ,
          <string-name>
            <surname>L. I. Vorona</surname>
          </string-name>
          ,
          <article-title>Ahrotekhnichni vymohy ta otsinka yakosti obrobitku gruntu, 2 ed</article-title>
          .,
          <source>Zhytomyrskyy natsionalnyy ahroekolohichnyy universytet, Zhytomyr</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>O. V.</given-names>
            <surname>Kanivets</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. M.</given-names>
            <surname>Kanivets</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. V.</given-names>
            <surname>Liashenko</surname>
          </string-name>
          , Kompyuterna prohrama «Slidopyt»,
          <article-title>Svidotstvo pro reyestratsiyu avtorskoho prava na tvir № 103432 (</article-title>
          <year>2021</year>
          -03-24).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <article-title>JetBrains s</article-title>
          .r.o., Welcome to Python.org,
          <year>2022</year>
          . URL: https://www.python.org.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <article-title>PyCharm: the Python IDE for Professional Developers by JetBrains</article-title>
          ,
          <year>2022</year>
          . URL: https:
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>