TITLE:
Pixel-by-Pixel Analysis of Soil and Leaf Coverage in Purslane: A CIELAB Approach
AUTHORS:
Abel Quevedo-Nolasco, Graciano-Javier Aguado-Rodríguez, Francisco-Marcelo Lara-Viveros, Nadia Landero-Valenzuela
KEYWORDS:
Automated Color Identification, C# Application, Color Space, Soil Color Identification, Leaf Coverage
JOURNAL NAME:
Agricultural Sciences,
Vol.16 No.2,
February
13,
2025
ABSTRACT: This study utilized a computer application developed in Visual StudioTM 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 AutoCADTM, 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 R2 value of 0.8431. Similarly, for the brown color, an R2 value of 0.9305 was found. The stem color was not subjected to this validation due to the necessity of multiple polygons. The R2 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, R2 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.