Classification of Physical Soil Condition for Plants using Nearest Neighbor Algorithm with Dimensionality Reduction of Color and Moisture Information

Determining the quality of soil is an important task to perform especially on newly opened agricultural land since it may provide significant impact on the growth of plants. One alternative to determine physical soil quality is by visually observe the color of the soil and measure its moisture. This paper designed an embedded system classify soil condition for plants according to the dimensionality reduction of color and moisture information from the soil using k-NN algorithm. The dimension of attribute information was reduced using correlation analysis to achieve lower computational time and lower memory usage on embedded system. In this study, 39 sample of soil from various location were collected and categorized by soil expert using visual observation. In the accuracy testing on the system that used 4 attributes, 100% accuracy was given by 60:40 ratio with 7 neighbors. In contrast, the system that used only 2 attributes, 100% accuracy was given by 60:40 ratio with 5 nearest neighbors. The resource usage testing shown that by using reduced attributes dimension, the resource usage can be lowered as many as 188 bytes on program storage and 192 bytes on global variable usage. Moreover, the average of computation time performed by the system using reduced attribute dimension achieved 5.4 ms compared to the system that used all attributes which achieved 6.2 ms.