Enhancing Density Prediction of Agricultural Land Soil through Void Area Curve Analysis

: Thresholding is a digital image analysis method used to distinguish objects from the background in images and it is mainly used for void and density analysis in soil. It is important to select an appropriate thresholding method because the accuracy of void analysis can vary signiﬁcantly depending on the threshold value; however, there is currently no standard for soil density analysis. Therefore, this study proposes an image analysis method for soil density prediction. The experimental process involved collecting soil samples from agricultural lands, encompassing various soil textures including sandy loam, loam, silt loam, and silty clay loam. These samples were then meticulously prepared under controlled conditions, ensuring a comprehensive range of dry densities and water content levels. Digital images of the soil samples were acquired using a Canon EOS100d camera, employing a high-resolution setup that provided precise imaging capabilities. The porosity of the soil image is calculated by various thresholding methods. Based on the analysis results, we propose a void area curve, a new approach that can be applied to the soil density prediction. The void area curve is the relationship curve between the threshold value and porosity of the soil image. The standard deviation of the void area curve showed a high correlation with the dry density of the soil. The standard deviation of the void area curve was used to predict the dry density under various soil texture and water content conditions, and the RMSE was 0.037 t/m 3 . The method of estimating soil density with the standard deviation of the void area curve can be used more generally than the existing analysis method because there is no need to select a speciﬁc threshold value.


Introduction
In agricultural land, the soil density is a factor that greatly affects crop growth [1][2][3].Soil density also greatly influences the pore size, water infiltration, and aeration, which greatly affects the crop growth [4,5].The soil density is obtained through in situ density tests such as the sand cone method, drive cylinder method, and nuclear method [6].All of these methods provide reliable data; however, they are difficult to use in agricultural lands where numerous tests are required.The soil density in agricultural land continuously changes with tillage and agricultural management; as a result, it is necessary to develop a method that can quickly identify soil densities at various points [7,8].Therefore, a new method for density management in agricultural lands is needed.
Soil pores are classified into macropores, mesopores, micropores, ultramicropores, and cryptopores according to their size, with macropores larger than 0.075 mm being highly dependent on soil density [9][10][11].Accordingly, it is possible to predict soil density by observing changes in soil macropores.
Digital image processing (DIP) is receiving great attention as a methodology to replace the existing experimental method.DIP is a process of extracting desired data through the appropriate processing of images [12].DIP enables low cost, rapid, quantitative, versatile, and nondestructive analysis [13][14][15][16][17][18].As an extension of visual observation, DIP is widely used in various fields, such as medicine, aviation, and manufacturing, and is also used to analyze soil characteristics [19][20][21].Examples of soil analysis using DIP include soil constituents [19], soil redoximorphic features [20], particle size distribution [21,22], void distribution analysis [23], crack analysis [15,24], and tensile strength [25].X-ray microtomography creates a three-dimensional, precise image of the inside of a sample with a resolution better than 1 micrometer, enabling noninvasive analysis of the composition and pore space of the sample [26,27].However, such detailed analysis techniques are still expensive for application in the agricultural field.The performance of digital cameras has significantly developed recently.The soil density prediction using commercial level digital cameras will be of great help to agricultural land soil management.For this purpose, Kim et al. [28,29] performed an image analysis of soil density using a commercial-level digital camera with a deep neural network and reported an RMSE of 0.044 to 0.107 t/m 3 using a convolutional neural network and an RMSE of 0.080 t/m 3 using a deep neural network.
Visible-near-infrared (vis-NIR) spectroscopy stands out as a rapid and nondestructive technique, demonstrating its ability to predict soil properties both in laboratory and field settings, as highlighted by studies conducted by Yang et al. [30] and Davari et al. [31].Vis-NIR spectroscopy is commonly incorporated with traditional calibration methods such as partial least squares regression (PLSR), support vector machines regression (SVMR), random forests (RF), or, more recently, neural network techniques to improve accuracy [30].Furthermore, vis-NIR spectroscopy has found utility in predicting soil density.Researchers have achieved this by combining it with gamma-ray attenuation, as demonstrated by Lobsey and Rossel [32], or by employing PLSR algorithms, as evidenced by the investigations of Xu et al. [33] and Katuwal et al. [34].In their study, Lobsey and Rossel [32] successfully calibrated measurements from a gamma-ray attenuation sensor alongside vis-NIR data to predict bulk density, achieving a result with a root mean square error of only 0.055 g/cm 3 .Similarly, Xu et al. [33] reported a moderate R 2 value of 0.63 for bulk density prediction by employing vis-NIR in conjunction with PLSR.Meanwhile, Katuwal et al. [34] demonstrated bulk density prediction within the range of 1.02 to 2.01 g/cm 3 , achieving an R 2 value of 0.46.Despite its cost and time effectiveness [31,35], vis-NIR spectroscopy does pose a challenge due to its reliance on specialized equipment, a limitation that mirrors the constraints associated with X-ray microtomography, thus impeding its widespread adoption in general agricultural fields.
What is necessary for soil density analysis by digital images is to separate voids and soil areas, and thresholding can be used for this purpose.Thresholding is an image processing method mainly used to distinguish between an object and a background in an image [36].In a soil image, the soil solids are the objects and the voids are the background.Abd El-Halim [24] and Peng et al. [15] quantified and analyzed soil cracks by performing thresholding on soil images.Bruneau et al. [14] and Passoni et al. [37] also performed thresholding to analyze the void distribution.Each researcher applied the automatic thresholding method provided by the image processing software or, if necessary, determined the threshold value based on the pixel intensity distribution curve and performed the analysis.The most important factor in thresholding is to determine the threshold value.There are various methods for thresholding; however, there is no standard related to soil analysis [38].Since there is no standard for thresholding methods for soil analysis, the accuracy of the soil density analysis may vary depending on the selection of the thresholding method.Therefore, it is necessary to determine which of the various thresholding methods is suitable for soil density analysis, or to propose an image analysis method suitable for density analysis.
Therefore, this study aims to investigate thresholding methods suitable for soil imagebased density estimation using common digital cameras.For this purpose, soils from agricultural fields were prepared under various water content and dry density conditions and digital images were acquired.The digital images of the soil underwent thresholding using the results of simple thresholding at different threshold values and representative automatic thresholding methods such as the Otsu method and Triangle method.Through the analysis of the threshold images, the limitations of the existing thresholding methods in predicting soil density were analyzed, and based on this, a new analysis method suitable for predicting soil density, the void area curve method, was proposed.The void area curve method is a new analysis method that can overcome the limitations of the existing analysis methods, whose accuracy may vary depending on the selection of the threshold value, and can be widely used for soil density analysis.

Image Acquisition for Soil Samples
The soil samples used in this study were collected from agricultural lands.The condition of the soil samples for image analysis is summarized in Table 1.Soil samples were classified as sandy loam (SL), loam (L), silt loam (SiL), and silty clay loam (SiCL) by the USDA soil classification methods.From SL towards L and SiL, the content of sand gradually decreases and the content of silt increases.SiCL is a soil with a lower content of silt and a higher content of clay compared to SiL.Each soil was oven-dried at 110 ± 5 • C for 24 h and then water was added to adjust the water content to 5, 10, 15, 20, and 25%.The wet soil was then compacted into cylindrical acrylic molds to prepare samples for image acquisition.The size of the mold was 150 mm in diameter and 50 mm in height.The dry density of the soil in the mold was adjusted to 1.1, 1.2, 1.3, and 1.4 t/m 3 .The ranges of dry density and water content were determined in consideration of general field soil conditions.Each soil sample was prepared in triplicate under the same conditions.Therefore, the total number of samples was 240, 60 for each soil.A Canon EOS100d camera (Canon Inc., Tokyo, Japan) was installed in the vertical direction of the soil sample.The size of the image was 5184 horizontal pixels and 3456 vertical pixels, and the resolution was 0.018 mm/pixel.Digital images were acquired under a controlled constant light condition.

Void Area in the Soil Image
Soil mass comprises three phases: solids (soil particles), water, and air.The composition of the volume of the soil mass is shown in Equation (1) [39].
where V t is the total volume, V s is the volume of the solids, V w is the volume of the water, V a is the volume of the air, and V v is the volume of the void.The dry density of the soil is defined as the ratio of the total volume of soil (V t ) to the mass of soil particles (W s ) and represents the degree of compaction.When the soil is compacted, the dry density increases because the void and total volume of the soil decreases.Therefore, if the void of the soil can be quantified, the dry density can be predicted.The voids in the soil can be quantified as the void ratio (e) or porosity (n), which are expressed by Equations ( 2) and (3), respectively [39].
V t is a constant of the sum of V s and V v .Figure 1 shows the change in e and n according to V v when V t is 1.
is a constant of the sum of  and  .Figure 1 shows the change in  and  according to  when  is 1.As  increases, both  and  tend to increase. increases linearly with  , ranging from a minimum of 0 to a maximum of 1.  increases exponentially with respect to  and diverges as  approaches 1. Equations ( 2) and ( 3) can be rewritten by the specific gravity of the soil ( ) and dry density ( ) as Equations ( 4) and (5).
The changes of  and  according to  are shown in Figure 2.  is linearly proportional to  and  .Therefore, if  can be quantified using soil  ,  can be predicted.However, because the volume cannot be obtained from a two- As V v increases, both e and n tend to increase.n increases linearly with V v , ranging from a minimum of 0 to a maximum of 1. e increases exponentially with respect to V v and diverges as V v approaches 1. Equations ( 2) and ( 3) can be rewritten by the specific gravity of the soil (ρ s ) and dry density (ρ d ) as Equations ( 4) and ( 5).
The changes of e and n according to ρ d are shown in Figure 2.
Appl.Sci.2023, 13, x FOR PEER REVIEW 4 of 16 is a constant of the sum of  and  .Figure 1 shows the change in  and  according to  when  is 1.As  increases, both  and  tend to increase. increases linearly with  , ranging from a minimum of 0 to a maximum of 1.  increases exponentially with respect to  and diverges as  approaches 1. Equations ( 2) and ( 3) can be rewritten by the specific gravity of the soil ( ) and dry density ( ) as Equations ( 4) and (5).
The changes of  and  according to  are shown in Figure 2.  is linearly proportional to  and  .Therefore, if  can be quantified using soil  ,  can be predicted.However, because the volume cannot be obtained from a two-  n is linearly proportional to ρ d and V v .Therefore, if n can be quantified using soil V v , ρ d can be predicted.However, because the volume cannot be obtained from a twodimensional soil image, n must be calculated indirectly through an area rather than a volume [40].The porosity in the digital image (n ) based on the area of the void in the digital image rather than the volume is expressed in Equation (6).
n is the porosity in the digital image, A v is the area of the void in the digital image, and A t is the total area of the digital image.The basic unit of area in a digital image is the pixel.Accordingly, Equation ( 6) can be rewritten as Equation (7).
where N void is the number of pixels of the void and N total is the total number of pixels in the digital image.

Image Thresholding
Image thresholding is one of the image segmentation methods.The image thresholding method divides an image into two regions based on a threshold value.The threshold value is an image intensity value between 0 and 255.After thresholding, if the intensity value of the image is greater than the threshold value, it is replaced with 255 (max value).If it is less than the threshold value, it is replaced with 0 (min value) [40].Therefore, a threshold image is a binary image that has only two values of 255 (white) and 0 (black) for each pixel intensity [41].It is important to determine the appropriate threshold value to achieve the desired result because the threshold value determines the outcome of the image thresholding.Image thresholding can be classified as simple thresholding or automatic thresholding.In simple thresholding, the threshold value is determined manually.Alternatively, automatic thresholding is a method of determining the threshold value according to preset algorithms.
In this study, image thresholding was used to distinguish between the soil solid and the void.Three thresholding methods were used to threshold the soil images: simple thresholding, the Otsu method, and the Triangle method.The Otsu method and the Triangle method are representative automatic thresholding methods.The Otsu method is a famous automatic thresholding method that returns a single threshold value determined by minimizing the intraclass intensity variance, or equivalently, by maximizing the interclass variance [42].The Triangle method is an algorithm for finding the end of an image histogram and it determines the threshold value by normalizing the height and dynamic range of the histogram [43].

Image Processing
The binary image obtained as a result of image thresholding is used to compute n .The calculation process of n is as follows.For image processing, we used the OpenCV (Open Computer Vision) library in Python (www.python.org).The OpenCV library includes many functions for image processing, and it also includes the three thresholding methods used in this study [44,45].The original digital image is an RGB image comprising three channels of red, green, and blue.The original digital image was converted into an 8-bit grayscale image.The converted grayscale image was used for thresholding.Image thresholding is performed based on the determined threshold value.In simple thresholding, the threshold value is determined with an arbitrary value, and in the Otsu and Triangle method, it is determined according to each algorithm.Pixels with an image intensity of 255 are a soil solid, and pixels with an image intensity of 0 are a void.Then, N void is determined by counting the pixels with image intensity = 0. Additionally, N void can be computed as the sum of the frequencies in the histogram of a grayscale image that are less than a threshold value.The digital image used in this study has a total of 17,915,904 pixels, 5184 horizontal and 3456 vertical.Therefore, N total is fixed at 17,915,904.Finally, n can be calculated according to Equation (7).

Dry Density Prediction by Thresholding of Soil Images
Figure 3 shows how the soil surface image and histogram change as the  increases.The soil texture is SiL and the water content is 25%.Soil solids are visible in Figure 3a, and voids, which are dark spaces between soil solids, are also present.Under the condition of low  , numerous voids are distributed, and as the  increases, the distribution of the voids decreases.Figure 3b shows the histogram after converting the color image of Figure 3a to grayscale.The histogram is bell shaped, skewed to the right with one peak.For the intensity of the digital images and its histogram, 0 means black and 255 means white.As the  increases, the frequency of the low intensity decreases and the frequency of the high intensity increases in the histogram.The average intensities of the histogram were 81.4,85.5, 89.7, and 91.3, respectively.Comparing Figure 3a,b, the voids were distributed at a low intensity and the soil solid was distributed at a high intensity.
Figure 4 shows the result of thresholding a soil image.Figure 4 shows the result of thresholding a soil image.Figure 4a is an image with a  of 1.1 t/m 3 in Figure 3a converted to grayscale.Figure 4b-f are threshold binary images, which are easier to distinguish between soil solids and voids than in the original grayscale image.Figure 4b,c show thresholding results using the Otsu method and Triangle method, respectively.Because both methods are automatic thresholding, the threshold value was automatically determined by the algorithm.In the case of the Otsu method, the soil solid and voids were well distinguished; however, it was difficult to distinguish them from the results of the Triangle method because the threshold value selected by the Triangle method was 149, which is far from the median value of the histogram.As a result, most of the pixels were classified as a void.Figure 4d-f show the results of simple thresholding with threshold values of 70, 80, and 90, respectively.Increasing the threshold value from 70 to 90 appears to noticeably increase the area of the voids displayed in black pixels on the image.Specifically, as the threshold value increases,  and ′ increase.Therefore, the accuracy of the density prediction will vary according to the threshold value.
Figure 5 shows the calculation results of ′ according to the threshold value.Figure 4a is an image with a ρ d of 1.1 t/m 3 in Figure 3a converted to grayscale.Figure 4b-f are threshold binary images, which are easier to distinguish between soil solids and voids than in the original grayscale image.Figure 4b,c show thresholding results using the Otsu method and Triangle method, respectively.Because both methods are automatic thresholding, the threshold value was automatically determined by the algorithm.In the case of the Otsu method, the soil solid and voids were well distinguished; however, it was difficult to distinguish them from the results of the Triangle method because the threshold value selected by the Triangle method was 149, which is far from the median value of the histogram.As a result, most of the pixels were classified as a void.Figure 4d-f show the results of simple thresholding with threshold values of 70, 80, and 90, respectively.Increasing the threshold value from 70 to 90 appears to noticeably increase the area of the voids displayed in black pixels on the image.Specifically, as the threshold value increases, N void and n increase.Therefore, the accuracy of the density prediction will vary according to the threshold value.
Figure 5 shows the calculation results of n according to the threshold value.
As the threshold value increased, n increased from 0 to 1.This is the same as the possible range of n values as shown in Figure 1.n is almost close to 1 for threshold values of 170 and above.This is because the pixel intensity of a grayscale image is mostly below 170, as shown in Figure 4g.If the threshold value is the same, the result of the thresholding is the same.The threshold values determined by the Otsu method and the Triangle method were 78 and 149, respectively.So, the n calculated from the binary images obtained by the Otsu method and the Triangle method showed the same value as the result of performing simple thresholding at the threshold values 78 and 149.Therefore, the thresholding results in Figure 4 all exist on the curve in Figure 5.Because the value of n is determined by the threshold value, it is necessary to verify whether n has a correlation with ρ d under various threshold values.According to the thresholding method, the result of the n extracted from the same soil image was different, indicating that it is essential to determine an appropriate thresholding method for evaluating soil voids.As the threshold value increased, ′ increased from 0 to 1.This is the same as the possible range of  values as shown in Figure 1.′ is almost close to 1 for threshold values of 170 and above.This is because the pixel intensity of a grayscale image is mostly below 170, as shown in Figure 4g.If the threshold value is the same, the result of the thresholding is the same.The threshold values determined by the Otsu method and the Triangle method were 78 and 149, respectively.So, the ′ calculated from the binary images obtained by the Otsu method and the Triangle method showed the same value as the result of performing simple thresholding at the threshold values 78 and 149.Therefore, the thresholding results in Figure 4 all exist on the curve in Figure 5.Because the value of ′ is determined by the threshold value, it is necessary to verify whether ′ has a correlation with  under various threshold values.According to the thresholding method, the result of the ′ extracted from the same soil image was different, indicating that it is essential to determine an appropriate thresholding method for evaluating soil voids.
Figure 6 shows the relationship of  and ′ calculated with the images of Figure 1.In the Otsu method, as the  increases from 1.1 t/m 3 to 1.2, 1.3, and 1.4 t/m 3 , the threshold values of 78, 80, 84, and 85 were selected, respectively.The coefficient of determination ( ) of simple thresholding was greater than that of the Otsu method.As a result of this example image set, using a single threshold value gave better results than automatically determined by the Otsu method.However, results may vary in other soil conditions.
The correlation coefficients of  and ′ under various soil conditions are summarized in Table 2.In the Otsu method, as the ρ d increases from 1.1 t/m 3 to 1.2, 1.3, and 1.4 t/m 3 , the threshold values of 78, 80, 84, and 85 were selected, respectively.The coefficient of determination (R 2 ) of simple thresholding was greater than that of the Otsu method.As a result of this example image set, using a single threshold value gave better results than automatically determined by the Otsu method.However, results may vary in other soil conditions.
The correlation coefficients of ρ d and n under various soil conditions are summarized in Table 2. Twelve digital images were used to calculate one correlation coefficient.Each set of 12 images was produced by triplicate soil samples with dry densities of 1.1, 1.2, 1.3, and 1.4 t/m 3 under one water content condition.For the Otsu method and Triangle method, n was calculated according to the threshold value automatically selected according to the algorithm.According to Equation ( 5), n and ρ d have a proportional relationship with −1 as the proportionality constant.Therefore, the closer the correlation coefficient is to −1, the better the ρ d prediction using n .Table 2 shows that ρ d and n show a strong negative correlation in all thresholding methods at a water content of 20% or greater, indicating that ρ d can be predicted using n .However, when the water content is less than 15%, there is no correlation or a positive correlation, which means that these threshold methods cannot be used robustly for soil density prediction.Additionally, the determination of most proper threshold values for simple thresholding is still a problem.Therefore, it is necessary to derive new predictors of ρ d .

New Approach for the Dry Density Prediction Using Soil Image Properties
The n calculated with every threshold value through simple thresholding is shown in Figure 7.
most proper threshold values for simple thresholding is still a problem.Therefore, it is necessary to derive new predictors of  .

New Approach for the Dry Density Prediction Using Soil Image Properties
The ′ calculated with every threshold value through simple thresholding is shown in Figure 7. Depending on the threshold value, ′ shows an increasing curve in the form of a cumulative distribution function (CDF).As the  increases, the graph moves downward.At the same threshold value, the higher the  , the lower ′.Because ′ represents the void area in the soil image, the graph of the relationship between the threshold value and ′ was named as the void area curve (VAC).A parameter representing the shape of the VAC was extracted based on the shape determinant factor of CDF.Standard deviation () is the most representative parameter that determines the shape of the CDF.The standard deviation of VAC can be calculated by Equation (8).
where  is the standard deviation of VAC, ′ is ′ at the threshold value = i, ′ is the mean value of ′, and  is the sample size.The relationship between the standard Depending on the threshold value, n shows an increasing curve in the form of a cumulative distribution function (CDF).As the ρ d increases, the graph moves downward.At the same threshold value, the higher the ρ d , the lower n .Because n represents the void area in the soil image, the graph of the relationship between the threshold value and n was named as the void area curve (VAC).A parameter representing the shape of the VAC was extracted based on the shape determinant factor of CDF.Standard deviation (σ) is the most representative parameter that determines the shape of the CDF.The standard deviation of VAC can be calculated by Equation (8).
where σ n is the standard deviation of VAC, n i is n at the threshold value = i, n is the mean value of n , and N is the sample size.The relationship between the standard deviation of VAC and the ρ d for soil SiL under various water content conditions is shown in Figure 8.
Appl.Sci.2023, 13, x FOR PEER REVIEW 11 of 16 deviation of VAC and the  for soil SiL under various water content conditions is shown in Figure 8.  has a strong correlation with  .Compared with the results of simple thresholding, it is at a similar level of correlation; however, it is highly practical in that it does not require the determination of the threshold value.As a result of the analysis, the standard σ n has a strong correlation with ρ d .Compared with the results of simple thresholding, it is at a similar level of correlation; however, it is highly practical in that it does not require the determination of the threshold value.As a result of the analysis, the standard deviation represents the shape of the VAC well.However, it is necessary to verify that the correlation between the standard deviation of VAC and ρ d is consistently maintained under various soil conditions.
Table 3 shows the root mean square error (RMSE) of the ρ d prediction using the soil images.In this study, we aimed to improve the existing density prediction method that depends on the value of the threshold value.Therefore, instead of selecting a single threshold value, n was calculated for all possible threshold values, which is called the void area curve.The shape of the histogram in Figure 4g is unimodal because the object (soil solid) and background (void) are not clearly distinguishable in the digital image of the soil.This study does not seek a thresholding method that can perfectly distinguish between a void and a soil solid, but rather predicts density using features from the relationship between n and the threshold value.This is because the main goal is not to obtain an image with flawless void and soil solid separation, but to obtain a good estimation of the dry density.The void area curve method proposed in this study seems to serve this purpose well.The analysis showed that the standard deviation of the void area curve can be used to predict the ρ d with high accuracy.As shown in Table 3, the accuracy of ρ d prediction varies depending on the threshold value.A major advantage of the method proposed in this study is that it can perform robust analysis, unlike existing methods whose accuracy may vary depending on the threshold value.
The accuracy of the ρ d test and prediction results are summarized in Table 4. Noorany et al. [6] conducted a precise test using a large soil tank with a diameter of 122 cm and a height of 100 cm in laboratory conditions to verify the accuracy of the field density test.In addition, Kim et al. [28,29] performed digital image-based density prediction of soil via a convolutional neural network and deep neural network.The RMSE of ρ d prediction using σ n was 0.037 t/m 3 , which was superior to other experimental methods except sand cone.Additionally, the range of water content during the ρ d tests was 8.3-13.3%;however, in this study, soils with a water content from 5% to 25% were used.In particular, four textures of soil according to the USDA classification method were used.Therefore, the method has a high level of accuracy similar to that of the existing test method even when considering several water contents and soil textures.
As summarized in Table 4, it also showed better accuracy than studies that used deep learning to analyze images.The convolutional neural network had an RMSE of 0.044 to 0.107 t/m 3 , while the deep neural network had an RMSE of 0.080 t/m 3 .This shows that σ n is a better indicator for predicting ρ d than the image features used in the deep learning model.Therefore, the ρ d prediction method using σ n can be widely used as a method for predicting ρ d because it shows a similar level of accuracy to the existing test method and a higher accuracy than other analysis methods.In this study, only one variable (σ n ) was used to predict ρ d .Since various other features can be extracted from soil surface images, it is expected that a multivariate analysis with additional features will improve the accuracy.
Comparing the accuracy of the soil density analysis based on vis-NIR spectroscopy [32][33][34] with the results of this study, the RMSE is lower and the R 2 is higher, indicating good accuracy.Davari et al. [31] reported that vis-NIR spectroscopy and PLSR successfully predicted various soil properties, but the prediction accuracy was poor for bulk density with a validation R 2 of 0.35.The main advantage of the results of this study compared to the analysis based on vis-NIR spectroscopy is that a high level of density prediction is possible with a common digital camera.Given the widespread availability of digital cameras, this could have very broad applications.However, the digital images used in this study were acquired in a laboratory and their applicability in the field is still unknown.Therefore, further research in the field is needed to further enhance the versatility of this study.

Practical Considerations and Limitations
In this study, we proposed the VAC from a soil surface image that can be used to predict the ρ d in agricultural lands.The limitations of this study are summarized as follows.
Four soil textures, SL, L, SiL, and SiCL, were analyzed, ranging from SL with a high sand content to SiCL with a high clay and silt content, but the prediction performance may vary in soils with different textures.In particular, it is considered that the accuracy may decrease in soil textures such as sandy clay, silty clay, and clay where the clay content is higher than SiCL.This is because macropores may not be well represented at higher clay contents.
It is also likely that the accuracy of the prediction will decrease if the digital image quality is poor.The histogram of the sample image presented in Figure 3b shows that the intensity of the pixels is well distributed.If the pixels were over-or under-lighted due to a camera or lighting setup mistake, the histogram would show peaks skewed towards 0 or 255.In this case, the shape of the VAC may be distorted, which will reduce its accuracy.
The study was conducted on soil surface images; therefore, the data acquisition for subsurface soils was limited.Similar to the conventional in situ density test method, image analysis can be attempted after removing the upper soil; however, verification is required.In agricultural soil management, soil properties in the root zone directly affect crop growth [46].Therefore, it is necessary to verify the applicability of the image analysis method to the subsoil region.
Regarding the compaction of the sample, the entire surface layer was compacted in this study to make the surface layer even.In the soil surface layer, compaction may occur by the operation of agricultural machinery [47,48].In addition, it may be difficult to obtain an image when the surface layer is obstructed by vegetation or other obstacles.Therefore, for field applications, it is necessary to exclude unnecessary regions from the surface layer image.
Cameras can show different colors of the same object according to settings such as color temperature and exposure.In this study, digital images were acquired under fixed lighting conditions in an indoor studio.Because the lighting conditions of the agricultural lands continuously change depending on the time of day and weather conditions, it would be desirable to install a darkroom to control the lighting conditions outside the camera.It is necessary to develop a method that can be used universally under various lighting conditions.
In addition, it is necessary to review the optimal resolution of the soil surface image.Unlike other objects, soil is a material whose size affects its properties.Even with the same camera, the size of an object varies depending on the working distance.When shooting from a close distance, the soil solid and void space can be observed in more detail.Conversely, when shooting from a distance, even though a relatively larger area of soil surface can be observed, the resolution is reduced.As a result, a review of the optimal resolution for soil density prediction is needed.

Conclusions
In this study, we introduced the void area curve (VAC) as an innovative approach for accurately predicting soil density based on digital image analysis.The VAC methodology represents a significant departure from conventional techniques, offering a novel perspective on soil density prediction.While our investigation highlighted the Otsu method as the optimal choice among automatic thresholding methods, it was the simplicity and robustness of the n metric calculated through simple thresholding that demonstrated a superior correlation with soil density.Recognizing the inherent complexities associated with threshold value selection, our research addressed this challenge by introducing the VAC.This method not only enhances the precision of soil density predictions but also eliminates the need for manual threshold determination.
A remarkable outcome of our study was the remarkable accuracy achieved in predicting the dry density of soil, through the standard deviation of the VAC.However, it is essential to acknowledge some limitations.The applicability of the VAC method may vary depending on soil types, and further research is needed to explore its performance under diverse geological conditions.Additionally, while the VAC simplifies threshold selection, fine-tuning for specific applications might still be necessary in some cases.In conclusion, the standard deviation of the VAC emerges as a powerful tool with the potential to revolutionize soil density prediction, offering a universally applicable approach.Future analyses should aim to refine the VAC's applicability across soil types and investigate additional factors that may influence its predictive capabilities.

Figure 1 .
Figure 1.Changes in the void ratio and porosity according to the volume composition of the soil mass.

Figure 2 .
Figure 2. Changes in the void ratio and porosity according to dry density.

Figure 1 .
Figure 1.Changes in the void ratio and porosity according to the volume composition of the soil mass.

Figure 1 .
Figure 1.Changes in the void ratio and porosity according to the volume composition of the soil mass.

Figure 2 .
Figure 2. Changes in the void ratio and porosity according to dry density.

Figure 2 .
Figure 2. Changes in the void ratio and porosity according to dry density.
Figure 3 shows how the soil surface image and histogram change as the ρ d increases.

Figure 3 .
Figure 3. Soil images and histogram under various dry densities: (a) original color images and (b) histogram of grayscale images.

Figure 3 .
Figure 3. Soil images and histogram under various dry densities: (a) original color images and (b) histogram of grayscale images.The soil texture is SiL and the water content is 25%.Soil solids are visible in Figure3a, and voids, which are dark spaces between soil solids, are also present.Under the condition of low ρ d , numerous voids are distributed, and as the ρ d increases, the distribution of the voids decreases.Figure3bshows the histogram after converting the color image of Figure3ato grayscale.The histogram is bell shaped, skewed to the right with one peak.For the intensity of the digital images and its histogram, 0 means black and 255 means white.As the ρ d increases, the frequency of the low intensity decreases and the frequency of the high intensity increases in the histogram.The average intensities of the histogram were 81.4,85.5, 89.7, and 91.3, respectively.Comparing Figure3a,b, the voids were distributed at a low intensity and the soil solid was distributed at a high intensity.Figure4shows the result of thresholding a soil image.

Figure 4 .
Figure 4.The thresholding of the sample image: (a) grayscale image, (b) result of the Otsu method, (c) result of the Triangle method, and (d-f) results of simple thresholding.(g) Histogram of (a) and threshold values.

Figure 4 .
Figure 4.The thresholding of the sample image: (a) grayscale image, (b) result of the Otsu method, (c) result of the Triangle method, and (d-f) results of simple thresholding.(g) Histogram of (a) and threshold values.

16 Figure 5 .
Figure 5. ′ of the threshold soil images.The soil images are the same as in Figure 4b-f.′ of the simple thresholding is calculated at one interval of the threshold values from 0 to 255.

Figure 5 .
Figure 5. n of the threshold soil images.The soil images are the same as in Figure 4b-f.n of the simple thresholding is calculated at one interval of the threshold values from 0 to 255.

Figure 6 16 Figure 6 .
Figure 6 shows the relationship of ρ d and n calculated with the images of Figure 1.

Figure 6 .
Figure 6.The relationship of ρ d and n according to thresholding methods.

Figure 7 .
Figure 7. ′ of soil images with various dry densities.

Figure 8 .
Figure 8.The relationship between the dry density and standard deviation of VAC.

Figure 8 .
Figure 8.The relationship between the dry density and standard deviation of VAC.

Table 1 .
Condition of the soil samples for image analysis.

Table 2 .
Correlation coefficient of the dry density and n under various soil conditions.

Table 3 .
RMSE of the dry density prediction by soil images under various soil conditions.

Table 4 .
Accuracy of the dry density test and prediction.