# Analysis of Movement Law and Influencing Factors of Hill-Drop Fertilizer Based on SPH Algorithm
## 2 Methodology
### Fertilizer Distribution Detection  
The method of detecting the movement and distribution of fertilizer is the key to the experiment [32], and is also the important research content of this article. This paper used a designed soil sampler to layer fertilizer and soil, and combined the image processing method to detect the fertilizer distribution. The detection method was simple and reliable, and the application range was wide.  
The experiment was conducted in Zhongnong Futong Horticulture Co., Ltd. in Tongzhou District, Beijing in July 2019. Figure 6 shows the situation of the field experiment. The planter was powered by a Foton Lovol M1004-D1 tractor. The fertilizer used was Stanley slow-release fertilizer. The selected corn seed was Zheng Dan 958.  
According to the previous analysis of the factors affecting the movement and distribution of fertilizer, the optimal parameter combination was obtained. The cover depth \(P\) was set to 100 mm, the distance \(L\) between the cover and the opener was set to 140 mm, and the planter's forward speed \(V\) was set to 1.6 m/s, the cover and the fertilizer pipe were set to be center-aligned, the hill-drop fertilizer distance was set to 300 mm, and the opener depth was set to 250 mm.  
Figure 6: Field performance experiment of corn hill-drop fertilizer planter.  
In this paper, the designed soil sampler was used to detect fertilizer. Its diameter was 150 mm, the depth was adjustable, and the maximum adjustable depth was 300 mm. During the experiment, the soil depth was fixed and set to 200 mm.  
The method for obtaining the image of the fertilizer distribution was as follows: based on the pressed ground after the experiment, the center position of the fertilizer was marked every 300 mm, and the soil sampler was aligned with the marked position. The depth of each cut was 200 mm. The soil sampler and the internal soil and fertilizer together were taken out, and these were placed in a direction perpendicular to the planter's forward direction. A rod was rotated to eject the soil in four layers, and the length of each ejection was 20 mm. The ejected soil was scraped out. The soil profiles were photographed and recorded at the soil depths of 180, 160, 140, and 120 mm.  
The collected images were processed with HALCON 12.0 software. The extraction algorithm flow of the fertilizer is shown in Figure 7. The image of the circular area was selected where the soil sampler was located, and the area, diameter, and center coordinate of the specific circular area were calculated. In order to reduce interference, the area where the fertilizer was concentratedly distributed was artificially selected. The RGB image of the selected region was converted into a grayscale image. The image enhancement processing was performed to improve the contrast of the image. The threshold was determined by the gray histogram. The region was segmented and binarized. Based on morphological features such as area and roundness, the region of the fertilizer was further segmented. In order to reduce noise, the image was processed in a circular open operation. The area, centroid coordinate, etc. of the treated fertilizer area were obtained and displayed. The center of the soil sampler is marked as a red dot in Figure 8, and the mass center of the fertilizer is marked as a green dot. It is displayed in the variable window.  
In order to express the distribution of fertilizer in the soil, the offset distance of fertilizer, the fertilizer depth, and the fertilizer amount at each layer were selected as the evaluation index. The offset distance refers to the distance between the mass center of the fertilizer at different layers and the center of the soil sampler. The fertilizer depth refers to the length of the fertilizer distribution in the soil in the vertical direction. The upper part of Figure 8 is a set of fertilizer distribution maps at different soil depths, and the lower part is the processed image.  
Figure 7: Flow chart showing the individual steps of the fertilizer extraction algorithm.