<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    as
   </journal-id>
   <journal-title-group>
    <journal-title>
     Agricultural Sciences
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2156-8553
   </issn>
   <issn publication-format="print">
    2156-8561
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/as.2025.162015
   </article-id>
   <article-id pub-id-type="publisher-id">
    as-140516
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Biomedical 
     </subject>
     <subject>
       Life Sciences, Earth 
     </subject>
     <subject>
       Environmental Sciences
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Pixel-by-Pixel Analysis of Soil and Leaf Coverage in Purslane: A CIELAB Approach
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Abel
      </surname>
      <given-names>
       Quevedo-Nolasco
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Graciano-Javier
      </surname>
      <given-names>
       Aguado-Rodríguez
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Francisco-Marcelo
      </surname>
      <given-names>
       Lara-Viveros
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Nadia
      </surname>
      <given-names>
       Landero-Valenzuela
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff3"> 
      <sup>3</sup>
     </xref>
    </contrib>
   </contrib-group> 
   <aff id="aff1">
    <addr-line>
     aHydrosciences, Postgraduate College, Montecillo, Mexico
    </addr-line> 
   </aff> 
   <aff id="aff2">
    <addr-line>
     aBiosciences and Agrotechnology, CYQA, Saltillo, Mexico
    </addr-line> 
   </aff> 
   <aff id="aff3">
    <addr-line>
     aHorticulture, Antonio Narro Agrarian Autonomous University, Saltillo, Mexico
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     13
    </day> 
    <month>
     02
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    16
   </volume> 
   <issue>
    02
   </issue>
   <fpage>
    227
   </fpage>
   <lpage>
    239
   </lpage>
   <history>
    <date date-type="received">
     <day>
      12,
     </day>
     <month>
      December
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      10,
     </day>
     <month>
      December
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      10,
     </day>
     <month>
      February
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    This study utilized a computer application developed in Visual Studio
    <sup>TM</sup> using C# to extract pixel samples (RGB) from multiple images (26 images obtained from August 20, 2024, to September 22, 2024), of a purslane pot taken from a top-down perspective at a distance of 30 cm. These samples were projected into the CIELAB color space, and the extracted pixels were plotted on the a*b* plane, excluding the luminance value. A polygon was then drawn around all the plotted pixels, defining the color to be identified. Subsequently, the application analyzed another image to determine the number of pixels within the polygon. These identified pixels were transformed to white, and the percentage of these pixels relative to the total number of pixels in the image was calculated. This process yielded percentages for brown (soil), green (leaf cover), and pink (stem color). A single polygon was sufficient to accurately identify the green and brown colors in the images. However, due to varying lighting conditions, customized polygons were necessary for each image to accurately identify the stem color. To validate the green polygon’s accuracy in identifying purslane leaves, all leaves in the image were digitized in AutoCAD
    <sup>TM</sup>, and the green area was compared to the total image area to obtain the observed green percentage. The green percentage obtained with the polygon was then compared to the observed green percentage, resulting in an R
    <sup>2</sup> value of 0.8431. Similarly, for the brown color, an R
    <sup>2</sup> value of 0.9305 was found. The stem color was not subjected to this validation due to the necessity of multiple polygons. The R
    <sup>2</sup> values were derived from percentage data obtained by analyzing the total pixels in the images. When sampling to estimate the proportion and analyzing only the suggested sample size of pixels, R
    <sup>2</sup> values of 0.93049 for brown and 0.8088 for green were obtained. The average analysis time to determine the brown soil percentage using the polygon (BP) for 26 images with an average size of 1070 × 1210 pixels was 44 seconds. In contrast, sampling to estimate the proportion reduced the analysis time to 0.9 seconds for the same number of images. This indicates that significant time savings can be achieved while obtaining similar results.
   </abstract>
   <kwd-group> 
    <kwd>
     Automated Color Identification
    </kwd> 
    <kwd>
      C# Application
    </kwd> 
    <kwd>
      Color Space
    </kwd> 
    <kwd>
      Soil Color Identification
    </kwd> 
    <kwd>
      Leaf Coverage
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>In Mexico, there are more than 358 plant species known as “quelites”, where only tender leaves and stems are consumed, including purslane. Its yield is mainly determined by the development of stems and leaves <xref ref-type="bibr" rid="scirp.140516-1">
     [1]
    </xref>. It is worth mentioning that in purslane, some physicochemical properties of the stems differ from those of the leaves <xref ref-type="bibr" rid="scirp.140516-2">
     [2]
    </xref>. For this reason, segmentation of regions of interest is an important pre-processing step in many color image analysis procedures <xref ref-type="bibr" rid="scirp.140516-3">
     [3]
    </xref>. Segmentation of plant objects in digital images is also an important pre-processing step for effective phenotyping by image analysis <xref ref-type="bibr" rid="scirp.140516-3">
     [3]
    </xref>.</p>
   <p>To classify colors in images, some studies have used the CIELAB color format. The CIELAB space, also known as CIELAB, was established by the International Commission on Illumination <xref ref-type="bibr" rid="scirp.140516-4">
     [4]
    </xref>. It is composed of a three-dimensional space with axes L*, a*, and b*. The coordinate a* defines the deflection from the achromatic point for clarity, towards red if a* &gt; 0, and towards green if a* &lt; 0. Similarly, the coordinate b* defines the deviation towards yellow if b* &gt; 0, and towards blue if b* &lt; 0 <xref ref-type="bibr" rid="scirp.140516-5">
     [5]
    </xref>.</p>
   <p>Reference <xref ref-type="bibr" rid="scirp.140516-6">
     [6]
    </xref> used the CIELAB color format without considering the effect of luminosity. In agriculture, this format has been used for tomatoes because classifying tomato ripeness levels manually has several drawbacks, namely requiring a long process, having a low level of accuracy, and being inconsistent <xref ref-type="bibr" rid="scirp.140516-7">
     [7]
    </xref>. Additionally, different strategies have been employed to evaluate color using the CIELAB format, such as <xref ref-type="bibr" rid="scirp.140516-8">
     [8]
    </xref>, who used a color plane in their research utilizing the CIELAB color format. Furthermore, some studies have focused on soil color. This is because soil color is a key indicator of soil properties and conditions, influencing both agronomic and environmental variables. Conventional methods for soil color determination have come under scrutiny due to their limited accuracy and reliability <xref ref-type="bibr" rid="scirp.140516-9">
     [9]
    </xref>.</p>
   <p>Due to the above, this study proposes a strategy to estimate the color percentage of purslane (stems and leaves) and soil color using the CIELAB format for quick results via a computer application.</p>
  </sec><sec id="s2">
   <title>2. Materials and Methods</title>
   <p>The research was conducted at the College of Postgraduates. A pot with purslane seeds was placed in unobstructed sunlight, with soil from a plot located at coordinates 19.4602165, −98.9032438 (latitude and longitude). The pot, with a volume of 5.225 dm<sup>3</sup> (0.1845 ft<sup>3</sup>), contained loam soil analyzed using the tactile method proposed by the USDA-NRCS <xref ref-type="bibr" rid="scirp.140516-10">
     [10]
    </xref>. Watering was applied as needed and supplemented with rainwater.</p>
   <sec id="s2_1">
    <title>2.1. Image Capture</title>
    <p>Pictures were taken from the zenith of the pot, 30 cm above the soil and plants, looking downwards. The images had dimensions of 3060 pixels by 4080 pixels. The images were obtained between August 20, 2024, and September 22, 2024, at 7:00 a.m. (except on September 8th and 18th, when pictures were taken at 5:00 p.m.) to cover the complete cycle of purslane from the emergence of the first leaves to post-flowering. Around midday, taking the photo would result in the user’s shadow appearing in the picture. Therefore, it was decided to take pictures in the morning to avoid this issue. This allowed capturing different shades of green in the leaves and brown in the soil under various lighting conditions (cloudy and sunny days) and soil moisture. As the objective of this study was to identify the green color of the plant (to obtain the leaf area) and the brown color of the soil (to obtain the soil area), it was not necessary to take pictures daily. There were no significant changes in the plant from one day to the next, so pictures were not taken in those days.</p>
   </sec>
   <sec id="s2_2">
    <title>2.2. Image Preparation</title>
    <p>It is worth mentioning that the main interest in the images was to obtain the color percentages only within the pot and around the contour of the leaf area. To prevent brown pixels outside the pot or the contour of the leaf area from being analyzed, a blue background was added around them in all images (<xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>). The blue background was chosen because it is clearly distinct from the brown color and the green of the purslane leaves. This procedure was applied to all the images.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. Original image of the pot with purslane taken on September 1st, 2024 (left), and image modified with a blue color outside the pot and leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="" />
    </fig>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. Original image of the pot with purslane taken on September 1st, 2024 (left), and image modified with a blue color outside the pot and leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId20.jpeg?20250213104446" />
    </fig>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. Original image of the pot with purslane taken on September 1st, 2024 (left), and image modified with a blue color outside the pot and leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId21.jpeg?20250213104446" />
    </fig>
   </sec>
   <sec id="s2_3">
    <title>2.3. Process to Obtain the Percentage of Exposed Brown Soil from Images Using Polygons (BP)</title>
    <p>A methodology similar to that, described by <xref ref-type="bibr" rid="scirp.140516-11">
      [11]
     </xref> was used. An application programmed using C# in Visual Studio 2010™ was utilized, consisting of three menus. The first menu allows opening and displaying an image. Then, pixel sample extraction begins by forming a square of size Z × Z pixels, where Z is defined by the user. The center of the square is indicated by the user by double-clicking on the area of the image that shows the brown color (the place from which the RGB pixel values are extracted). The extracted pixels are marked in white on the original image for visualization (<xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>, left). They are then projected onto the a* - b* plane of the CIELAB color format, discarding luminosity (after converting RGB to CIELAB).</p>
    <p>This process is repeated with several images to identify the different shades of brown under various lighting and soil moisture conditions. In the a* - b* plane, where all the pixels are projected, a polygon is drawn around the identified pixels and their coordinates are obtained (<xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>, right). The resulting polygon for the brown color had the coordinates: 47, 19; 1, −13; −6, −8; −2, −2; 1, 5; 0, 10; 2, 20; 7, 34; 21, 50; 47, 19.</p>
    <fig-group id="fig2" position="float">
     <fig id="fig2" position="float">
      <label>Figure 2</label>
      <caption>
       <title>Figure 2. Areas of extracted pixels from the image marked in white (left), which were projected onto the a*-b* plane of the CIELAB color format (right).--Figure 2. Areas of extracted pixels from the image marked in white (left), which were projected onto the a*-b* plane of the CIELAB color format (right).</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId22.jpeg?20250213104447" />
     </fig>
     <fig id="fig2" position="float">
      <label>Figure 2</label>
      <caption>
       <title>Figure 2. Areas of extracted pixels from the image marked in white (left), which were projected onto the a*-b* plane of the CIELAB color format (right).--Figure 2. Areas of extracted pixels from the image marked in white (left), which were projected onto the a*-b* plane of the CIELAB color format (right).</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId23.jpeg?20250213104447" />
     </fig>
    </fig-group>
    <p>The second menu allows opening an image. The previously constructed polygon, in this case for the brown color, is provided. The image is then analyzed with an algorithm that determines if each pixel in the image is within the polygon (for this, prior transformations from the RGB color format to CIELAB are performed). Only the pixels within the polygon are considered brown. The percentage of exposed brown soil obtained using the polygon (BP) is calculated by dividing the number of brown pixels by the total number of pixels in the image, multiplied by 100. The image is modified by setting the pixels identified as brown to white (<xref ref-type="fig" rid="fig3">
      Figure 3
     </xref>).</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Image without the identified brown color (left) and image with pixels identified as brown changed to white (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="" />
    </fig>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Image without the identified brown color (left) and image with pixels identified as brown changed to white (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId24.jpeg?20250213104447" />
    </fig>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Image without the identified brown color (left) and image with pixels identified as brown changed to white (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId25.jpeg?20250213104447" />
    </fig>
    <p>The third menu allows for analyzing all the images contained in a previously created folder on the computer. The user provides the folder address, the polygon, and the image format (jpg or png). The program generates a text file with the image name, total number of pixels, number of brown pixels, and percentage of brown color obtained using the polygon (BP). A pixel jump can be defined for faster analysis by analyzing a smaller percentage of pixels. If a pixel jump (PJ) of 1 is indicated, the algorithm will go through all pixels in the image one by one, both in rows and columns, thus analyzing 100% of the pixels. However, if the pixel jump (PJ) is 2, the algorithm will go through every two pixels in both rows and columns, analyzing only 25% of the pixels in the image. In this way, by increasing the pixel jump, a smaller number of pixels in the image will be analyzed. Finally, in this menu, the percentage of exposed brown soil (BP) in each image within a folder on the computer can be estimated through proportion sampling. It is worth mentioning that the sample size to estimate the proportion was calculated assuming a 95% confidence level (with P for statistical significance set at 0.05), as proposed by <xref ref-type="bibr" rid="scirp.140516-12">
      [12]
     </xref>, a margin of error of 0.01% (some authors, such as <xref ref-type="bibr" rid="scirp.140516-13">
      [13]
     </xref>, propose a permissible error in the estimate of around 5%, however, since there were no constraints on the cost of samples or time, this stricter error margin was used to ensure a larger sample size and greater precision), and an estimated proportion of 50% (0.5). This proportion was used because the sample size was estimated at various proportions (5%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, and 95%), and the largest sample size was always obtained using the 50% proportion by using the formula to estimate the sample size of a proportion proposed by <xref ref-type="bibr" rid="scirp.140516-14">
      [14]
     </xref>. Since each image size may vary (after coloring the background blue, the image size changed slightly), the sample size differed among images. Using the sample size, pixel sampling in an image was done by applying a regular grid. This procedure involved overlaying a grid on the image, with equidistant lines horizontally and vertically. This way, sampling points were uniformly selected at line intersections (throughout the image), ensuring representative and equitable sampling.</p>
   </sec>
   <sec id="s2_4">
    <title>2.4. Process to Obtain the Percentage of Green Leaf Coverage (GP) from Images</title>
    <p>To obtain the percentage of green leaf coverage (GP), the polygon identified by <xref ref-type="bibr" rid="scirp.140516-11">
      [11]
     </xref>, for this color, was used. However, in the case of purslane, some shades of green were not identified. The same procedure used to identify the brown color mentioned above was applied, but this time for the green color of the purslane leaves. The following polygon was obtained by adjusting three points of the original polygon by <xref ref-type="bibr" rid="scirp.140516-11">
      [11]
     </xref>, to include all shades of green (<xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>, left): −13, 85; −10, 67; −7, 26; −4, 14; −5, 0; −10, −6; −20, −8; −50, −10; −71, 5; −85, 32; −79, 65; −58, 75; −13, 85.</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Polygon plotted in the a*-b* space to identify green pixels of the purslane leaf coverage (left) and polygons obtained to identify pink shades of the purslane stems (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="" />
    </fig>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Polygon plotted in the a*-b* space to identify green pixels of the purslane leaf coverage (left) and polygons obtained to identify pink shades of the purslane stems (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId26.jpeg?20250213104448" />
    </fig>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Polygon plotted in the a*-b* space to identify green pixels of the purslane leaf coverage (left) and polygons obtained to identify pink shades of the purslane stems (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId27.jpeg?20250213104447" />
    </fig>
   </sec>
   <sec id="s2_5">
    <title>2.5. Process to Obtain the Percentage of Exposed Pink Stems (PP) from Images</title>
    <p>
     <xref ref-type="bibr" rid="scirp.140516-"></xref>To determine the soil coverage percentage more accurately, the percentage of exposed pink stems (PP) inside and outside the pot was obtained. The same procedure as previously described was applied here, specifically for the colors of the purslane stems. However, a single polygon that could identify all the stems was not found due to their similarity to the soil color. It is worth mentioning that the polygon was adjusted for each image until the stems were visually identified. The user must ensure that the desired color pixels are correctly identified. A correct polygon is indicated when stem pixels are detected without including non-stem pixels. If the user selects a larger area, soil pixels may be detected, leading to errors. Therefore, 11 different polygons were obtained (<xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>, right) for all the images analyzed (26). It is worth mentioning that visually, the polygons correctly identified the stems in all the images, as shown in <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref>. Additionally, the color of the stems was the only color affected by lighting conditions throughout the day and cloudiness. This is because, in the CIELAB color format, the color of the stems was very similar to the color of the soil used.</p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Color of purslane stems identified under low soil moisture conditions (left) and, high soil moisture conditions (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="" />
    </fig>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Color of purslane stems identified under low soil moisture conditions (left) and, high soil moisture conditions (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId28.jpeg?20250213104448" />
    </fig>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Color of purslane stems identified under low soil moisture conditions (left) and, high soil moisture conditions (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId29.jpeg?20250213104448" />
    </fig>
   </sec>
   <sec id="s2_6">
    <title>2.6. Observed Percentages of Exposed Brown Soil (BO) and Green Leaf Coverage (GO)</title>
    <p>The images were digitized at a 1:1 scale in centimeters using the AutoCAD<sup>TM</sup> program. Then, the total area of each image was calculated in cm<sup>2</sup>. Subsequently, in each image, the contour of all the green leaves of the purslane was digitized (<xref ref-type="fig" rid="fig6">
      Figure 6
     </xref>, center) using the sketch command and a line size of 0.01 cm. The area of each digitized green surface was calculated, and the total green area of each image was determined. To obtain the observed percentage of green leaf coverage (GO), the total area identified as green in AutoCAD<sup>TM</sup> was divided by the total area of the image and multiplied by 100.</p>
    <p>To obtain the observed percentage of brown soil (BO), the contour of the pot was digitized, and when the leaf area protruded, it was also included in the contour (<xref ref-type="fig" rid="fig6">
      Figure 6
     </xref>, right). Therefore, the area of the soil along with the leaf coverage area was obtained. This area was divided by the total area of the image and multiplied by 100 to obtain the percentage of soil plus leaves. Thus, the resulting percentage was subtracted from the observed green leaf coverage percentage (GO) to obtain the observed percentage of exposed brown soil (BO).</p>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 6. Original image (left), digitized green areas with the pot circle marked as a reference (center), and pot contour encompassing brown soil and green leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="" />
    </fig>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 6. Original image (left), digitized green areas with the pot circle marked as a reference (center), and pot contour encompassing brown soil and green leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId30.jpeg?20250213104449" />
    </fig>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 6. Original image (left), digitized green areas with the pot circle marked as a reference (center), and pot contour encompassing brown soil and green leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId31.jpeg?20250213104449" />
    </fig>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 6. Original image (left), digitized green areas with the pot circle marked as a reference (center), and pot contour encompassing brown soil and green leaf area (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId32.jpeg?20250213104449" />
    </fig>
   </sec>
  </sec><sec id="s3">
   <title>3. Results</title>
   <p>The program visually identified the green colors of the leaf area and the brown colors of the soil correctly, as shown for some images under different moisture conditions in <xref ref-type="fig" rid="fig7">
     Figure 7
    </xref>.</p>
   <fig-group id="fig7" position="float">
    <fig id="fig7" position="float">
     <label>Figure 7</label>
     <caption>
      <title>Figure 7. Images with the exterior of the pot covered in blue (A), pixels identified as brown changed to white (B), blue pixels changed to white (C), and pixels identified as green changed to white (D), measured under low (left), medium (center), and high soil moisture conditions (right).--Figure 7. Images with the exterior of the pot covered in blue (A), pixels identified as brown changed to white (B), blue pixels changed to white (C), and pixels identified as green changed to white (D), measured under low (left), medium (center), and high soil moisture conditions (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId33.jpeg?20250213104450" />
    </fig>
    <fig id="fig7" position="float">
     <label>Figure 7</label>
     <caption>
      <title>Figure 7. Images with the exterior of the pot covered in blue (A), pixels identified as brown changed to white (B), blue pixels changed to white (C), and pixels identified as green changed to white (D), measured under low (left), medium (center), and high soil moisture conditions (right).--Figure 7. Images with the exterior of the pot covered in blue (A), pixels identified as brown changed to white (B), blue pixels changed to white (C), and pixels identified as green changed to white (D), measured under low (left), medium (center), and high soil moisture conditions (right).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId34.jpeg?20250213104450" />
    </fig>
   </fig-group>
   <p>To quantitatively validate the color selection process, a plot was created relating the percentage of brown soil color obtained with the polygon (BP) to the observed percentage of brown soil color (BO), obtained with the areas calculated in AutoCAD<sup>TM</sup>. This plot is shown in <xref ref-type="fig" rid="fig8">
     Figure 8
    </xref>.</p>
   <fig id="fig8" position="float">
    <label>Figure 8</label>
    <caption>
     <title>Figure 8. Relationship between the percentage of brown soil color estimated with AutoCAD (BO) and the percentage of brown soil color using the pixel recognition program with the polygon (BP).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId35.jpeg?20250213104450" />
   </fig>
   <p>The percentage of green leaf coverage estimated with the polygon (GP) was plotted against the percentage obtained with AutoCAD<sup>TM</sup> (GO) throughout the analyzed period (<xref ref-type="fig" rid="fig9">
     Figure 9
    </xref>).</p>
   <fig id="fig9" position="float">
    <label>Figure 9</label>
    <caption>
     <title>Figure 9. Relationship between the percentage of green leaf coverage obtained directly with the areas digitized in AutoCAD (GO) and the percentage of green leaf coverage obtained with the polygon found for the green color (GP).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId36.jpeg?20250213104450" />
   </fig>
   <p>It is worth mentioning that the percentage of brown color was also estimated indirectly using the polygons (BPI). This percentage is obtained by starting from 100% and subtracting the percentages of blue color (<xref ref-type="fig" rid="fig1">
     Figure 1
    </xref>, left), green leaf coverage obtained with the polygon (GP), and stems in each image (<xref ref-type="fig" rid="fig5">
     Figure 5
    </xref>). The percentage of brown color estimated indirectly using the polygons (BPI) was plotted against the observed percentage of brown color obtained with AutoCAD (<xref ref-type="fig" rid="fig10">
     Figure 10
    </xref>).</p>
   <fig id="fig10" position="float">
    <label>Figure 10</label>
    <caption>
     <title>Figure 10. Relationship between the observed percentage of brown soil color (BO) and the percentage obtained indirectly using polygons (BPI).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId37.jpeg?20250213104450" />
   </fig>
   <p>Studies are conducted on samples because it is usually impossible to study an entire population. The sample must therefore be representative of the population. This is best ensured by using proper sampling methods. The sample must also be adequate in size, neither too large nor too small <xref ref-type="bibr" rid="scirp.140516-12">
     [12]
    </xref>.</p>
   <p>In this study, the average time to determine the percentage of brown soil color using the polygon (BP) by analyzing 100% of pixels in 26 images, each averaging 1070 × 1210 pixels, was found to be 44 seconds. On the other hand, when sampling was performed to estimate the proportion (BP) using the formula proposed by Daniel <xref ref-type="bibr" rid="scirp.140516-14">
     [14]
    </xref>, the analysis time for the same images was less than 1 second (0.9 seconds). A R<sup>2</sup> value of 0.93049 was obtained by relating the observed percentage of brown soil color (BO) with that obtained using the pixel recognition program and the polygon (BP). It is worth mentioning that the same procedure was used to obtain the R<sup>2</sup>, but instead of using all pixels, sampling was employed to determine BP, resulting in a R<sup>2</sup> of 0.93048.</p>
   <p>Performing the aforementioned procedure for the green color, a R<sup>2</sup> value of 0.8431 was obtained by analyzing all the pixels in the image and 0.8088 by sampling pixels.</p>
   <p>It is necessary to indicate that in all the images, both the brown and green colors were not distributed homogeneously but were concentrated in the center. This can influence the sampling because, with most of the pixels of interest concentrated in the center of the image, there may be an error in accurately determining the color percentage (brown or green). Reference <xref ref-type="bibr" rid="scirp.140516-12">
     [12]
    </xref> mentions that a sample that is smaller than necessary would have insufficient statistical power to answer the primary research question, and a statistically nonsignificant result could merely be because of inadequate sample size (Type 2 or false negative error). To avoid this, determination coefficients (R<sup>2</sup>) were obtained by relating observed data with polygon-derived data for brown and green colors (<xref ref-type="fig" rid="fig11">
     Figure 11
    </xref>) at different pixel intervals.</p>
   <fig id="fig11" position="float">
    <label>Figure 11</label>
    <caption>
     <title>Figure 11. Relationship between pixel jump (PJ) and determination coefficients (obtained between estimated observed brown color percentage, BO, and brown color percentage obtained with the polygon by sampling in the image with the indicated pixel jump) for brown color (B), and determination coefficients (obtained between estimated observed green color percentage and green color percentage obtained with the polygon by sampling in the image with indicated pixel jump) for green color (G).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/3004863-rId38.jpeg?20250213104449" />
   </fig>
  </sec><sec id="s4">
   <title>4. Discussion</title>
   <p>In this study, a methodology was developed and applied to identify and quantify the green and brown colors in images of purslane plants. It was found that the percentage of exposed brown soil (BP) and green leaf coverage (GP) using the polygon in the CIELAB plane showed a high correlation with values obtained using AutoCAD (observed), with an R<sup>2</sup> of 0.93 and 0.84, respectively. This is consistent with Chen et al. <xref ref-type="bibr" rid="scirp.140516-15">
     [15]
    </xref>, who found r values of −0.84 when predicting soil total organic carbon using an L variable from the CIELAB color format. Using the same L variable, Baek et al. <xref ref-type="bibr" rid="scirp.140516-16">
     [16]
    </xref> found an R<sup>2</sup> greater than 0.9 in their study. Similarly, Nuraini et al. <xref ref-type="bibr" rid="scirp.140516-7">
     [7]
    </xref> produced a model that can detect the level of ripeness of tomatoes with an accuracy of 88.194% using the same color format. It is worth mentioning that high R<sup>2</sup> values were obtained despite different lighting and soil moisture conditions, which is consistent with Baek et al. <xref ref-type="bibr" rid="scirp.140516-16">
     [16]
    </xref> who found that CIELAB was suitable for dealing with irregular light conditions in the field. Other authors, such as Schmidt and Ahn <xref ref-type="bibr" rid="scirp.140516-17">
     [17]
    </xref> found L* to be one of the most useful variables in their study. The high correlation between the methods suggests that the polygon-based methodology is a reliable tool for identifying and quantifying colors in plant images.</p>
   <p>A limitation of this study is that the methodology depends on the user’s accuracy in selecting pixels of interest and correctly drawing the polygon in the a*-b* plane, which can introduce variability in results. Future research could focus on automating the pixel selection process and evaluating the methodology in different types of vegetation and environmental conditions. The key to ensuring the methodology works effectively in other crops will be to manage the background color of the image properly. This is because, in this study, the green and brown colors were easily identified as they occupied different areas of the a-b plane in the CIELAB color format. However, for the stem (<xref ref-type="fig" rid="fig4">
     Figure 4
    </xref>, right) and soil (<xref ref-type="fig" rid="fig2">
     Figure 2
    </xref>, right) color, since they were in very close areas, identifying the stems with a single polygon was not possible.</p>
   <p>It is worth mentioning that, regarding the estimation of the brown and green color percentages in the images using the polygon method with pixel jumps, it was found that the R<sup>2</sup> values for the brown color remained constant up to a jump of 75 pixels between each measurement, while for green, they remained constant only up to a jump of just 10 pixels. This was expected because the brown area in the images varied from 19% to 38%, while the green area varied from 3% to 13%, as shown in <xref ref-type="fig" rid="figFigures 8 and 9">
     Figures 8 and 9
    </xref>, respectively. Since the green area is smaller, it is natural to increase the sample size to find the green pixels. When sampling to estimate the proportion with image pixels as proposed by Andrade <xref ref-type="bibr" rid="scirp.140516-12">
     [12]
    </xref>, it was observed that the R<sup>2</sup> value was very similar to that obtained by analyzing all pixels of the image. This indicates that it is better to rely on sampling to estimate the proportion rather than proposing a pixel jump for the images.</p>
   <p>
    <xref ref-type="bibr" rid="scirp.140516-"></xref>According to the results, a practical application of the tool used in this study is the detection of water stress, identification of diseases, and evaluation of soil/weed coverage in a relatively short time for preventive decision-making.</p>
  </sec><sec id="s5">
   <title>5. Conclusions</title>
   <p>In this study, the brown color of the soil and the green color of the purslane leaves were successfully identified with coefficients of determination (R<sup>2</sup>) of 0.9305 and 0.8431, respectively, using a single polygon for each color. However, in the case of the stem color, as they are pink and similar to the soil color, this technique is not suitable since a customized polygon is required for each image.</p>
   <p>Additionally, the analyses suggest that sampling to estimate the proportion proved to be an adequate technique to obtain values for the desired color percentage, compared to those obtained by analyzing all the pixels in the image. This indicates that sampling can be an efficient and accurate alternative.</p>
   <p>The proposed methodology proved to be a reliable and efficient tool for plant image analysis, allowing for precise results in a significantly reduced time when using proportion sampling. However, the accuracy of the method can be affected by variability in pixel selection and polygon drawing, suggesting the need for future research to automate these processes and evaluate the methodology in different types of vegetation and environmental conditions.</p>
   <p>In summary, the polygon-based methodology in the CIELAB color space offers a promising solution for color quantification in agricultural images, contributing to the advancement of phenotyping techniques and image analysis in the field of precision agriculture.</p>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>The authors appreciate the support granted by the National Council of Science, Humanities, and Technology (CONAHCYT) through the project CIR/0027/2022: Strategies for Collecting Rainwater in Semi-Urban Conditions for Agricultural Use. We also thank the Campus Montecillo Postgraduate College for providing the necessary facilities for the development of this research. Additionally, we acknowledge the institutions of the collaborators for providing the conditions for the development of the research.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.140516-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lagunes-Fortiz, E., Villanueva-Verduzco, C., Lagunes-Fortiz, E.R., Zamora-Macorra, E.J., Ávila-Alistac, N. and Villanueva-Sánchez, E. (2021) La densidad de siembra en el crecimiento de la verdolaga. Revista Mexicana de Ciencias Agrícolas, 12, 317-329. &gt;https://doi.org/10.29312/remexca.v12i2.2848
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Desta, M., Molla, A. and Yusuf, Z. (2020) Characterization of Physico-Chemical Properties and Antioxidant Activity of Oil from Seed, Leaf and Stem of Purslane (Portulaca oleracea L.). Biotechnology Reports, 27, e00512. &gt;https://doi.org/10.1016/j.btre.2020.e00512
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kumar, P. and Miklavcic, S.J. (2018) Analytical Study of Colour Spaces for Plant Pixel Detection. Journal of Imaging, 4, Article 42. &gt;https://doi.org/10.3390/jimaging4020042
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Commission Internationale de l’Éclairage (CIE) (1978) Recommendations on Uniform Color Spaces, Color Difference and Psychometric Color Terms. CIE Central Bureau. 
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Domínguez Soto, J.M., Román Gutiérrez, A.D., Prieto García, F. and Acevedo Sandoval, O. (2018) Sistema de Notación Munsell y CIELab como herramienta para evaluación de color en suelos. Revista Mexicana de Ciencias Agrícolas, 3, 141-155. &gt;https://doi.org/10.29312/remexca.v3i1.1489
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Anagnostopoulos, C., Koutsonas, A., Anagnostopoulos, I., Loumos, V. and Kayafas, E. (2005) Tile Classification Using the CIELAB Color Model. In: Sunderam, V.S., van Albada, G.D., Sloot, P.M.A. and Dongarra, J.J., Eds., Computational Science—ICCS 2005, Springer, 695-702. &gt;https://doi.org/10.1007/11428831_86
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nuraini, R., Soares, T.G., Dayurni, P. and Mulyadi, M. (2023) Tomato Ripeness Detection Using Linear Discriminant Analysis Algorithm with CIELAB and HSV Color Spaces. Building of Informatics, Technology and Science (BITS), 5, 523-531. &gt;https://doi.org/10.47065/bits.v5i2.4192
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Suzuki, T., Ito, C., Kitano, K. and Yamaguchi, T. (2024) CIELAB Color Space as a Field for Tracking Color-Changing Chemical Reactions of Polymeric Ph Indicators. ACS Omega, 9, 36682-36689. &gt;https://doi.org/10.1021/acsomega.4c05320
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rizzo, R., Wadoux, A.M.J., Demattê, J.A.M., Minasny, B., Barrón, V., Ben-Dor, E., et al. (2023) Remote Sensing of the Earth’s Soil Color in Space and Time. Remote Sensing of Environment, 299, Article ID: 113845. &gt;https://doi.org/10.1016/j.rse.2023.113845
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     USDA-NRCS (2020) Guide to Texture by Feel. &gt;https://www.nrcs.usda.gov/sites/default/files/2022-11/texture-by-feel.pdf 
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Acuayte-Valdes, E., Barrientos-Priego, A.F., Duran-Peralta, E., Cabrera-Morales, M. and Aguado-Rodríguez, G.J. (2023) CIE L*a*b* Polygon for Quantifying Scab (Sphaceloma perseae) in Avocado Fruit Images. Revista Chapingo Serie Horticultura, 30, 3-15. &gt;https://doi.org/10.5154/r.rchsh.2023.06.004
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Andrade, C. (2020) Sample Size and Its Importance in Research. Indian Journal of Psychological Medicine, 42, 102-103. &gt;https://doi.org/10.4103/ijpsym.ijpsym_504_19
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Singh, A.S. and Masuku, M.B. (2014) Sampling Techniques and Determination of Sample Size in Applied Statistics Research: An Overview. International Journal of Economics, Commerce and Management, 2, 1-22.
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Daniel, J. (2012) Sampling Essentials: Practical Guidelines for Making Sampling Choices. SAGE Publications, Inc. &gt;https://doi.org/10.4135/9781452272047
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, Y., Zhang, M., Fan, D., Fan, K. and Wang, X. (2018) Linear Regression between Cie-Lab Color Parameters and Organic Matter in Soils of Tea Plantations. Eurasian Soil Science, 51, 199-203. &gt;https://doi.org/10.1134/s1064229318020011
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Baek, S.H., Park, K.H., Jeon, J.S. and Kwak, T.Y. (2022) Using the CIELAB Color System for Soil Color Identification Based on Digital Image Processing. Journal of the Korean Geotechnical Society, 38, 61-71. &gt;https://doi.org/10.7843/kgs.2022.38.5.61 
    </mixed-citation>
   </ref>
   <ref id="scirp.140516-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Schmidt, S.A. and Ahn, C. (2021) Analysis of Soil Color Variables and Their Relationships between Two Field-Based Methods and Its Potential Application for Wetland Soils. Science of The Total Environment, 783, Article ID: 147005. &gt;https://doi.org/10.1016/j.scitotenv.2021.147005
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>