Abstract:The soil bulk density of the topsoil layer is an important parameter of farmland soil, and it is of great significance to accurately measure and evaluate it. A vehicle-mounted surface soil bulk density detection system based on Raspberry Pi was designed. The system took soil surface images and predicted the surface soil bulk density using easily-obtained soil surface image features. Extracted the Tamura texture feature of the image and the fractal dimension feature of the image. After verification, the roughness, contrast, directionality, and fractal dimension features were highly correlated with soil bulk density, and the correlation coefficients were -0.754, -0.799, -0.806, and -0.849. So these four parameters were selected as the input of the prediction model. SVM regression model, GRNN regression model and Bagging integration model based on SVM and GRNN were used to predict soil bulk density. Based on the correlation analysis between the prediction results of the Bagging integration model of SVM and GRNN and the results obtained by the ring knife method, R 2 reached 0.8641, and the average absolute error (MAE) of the prediction results reached 0.0316g/cm 3, and it had better prediction results than a single SVM regression model and a single GRNN regression model. The field test was carried out using the soil bulk density detection system of farmland topsoil based on Raspberry Pi. And the results showed that the average absolute error (MAE) of the measurement was 0.0412g/cm 3, which was in line with expectations and met the requirements of accurate and rapid detection.