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 significantly 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/m3. 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 specific threshold value.