Automatic adjustment of harrowing intensity in cereals using digital image analysis

Precision farming technologies were implemented into a commercial harrow to increase selectivity of weed harrowing in spring cereals. Digital cameras were mounted before and after the harrow measuring crop cover. Crop soil cover (CSC) was com-puted out of these two images. Eight

were highly dependent on the trial site and varied between trial years. Rasmussen et al. (2008), Van der Weide et al. (2008) and Rasmussen et al. (2009) achieved 80%-90% weed control efficacy against mostly annual broad-leaved weeds in spring cereals.
Harrowing is less effective against larger weeds, annual grasses (e.g. Alopecurus myosuroides Huds) and perennial weeds (e.g. Cirsium arvense L., Elymus repens L.; Terpstra and Kouwenhoven, 1981;Melander et al., 2012). Therefore, it is important to combine weed harrowing with other preventive and curative tactics of weed control, including crop rotations, tillage practices, cover cropping, hoeing and chemical weed control (Hillocks, 2012). The weed control mechanism of harrowing is mainly due to soil burial, but also uprooting plays a role when weeds are small (Kurstjens and Kropff, 2001;Leblanc et al., 2011).
The working mechanism of harrowing implies whole field cultivation and therefore includes risk of crop damage. However, weed harrowing in cereals may also favour crop growth due to a combination of different effects such as soil loosening, reduction of evaporation, soil aeration, nutrient mineralisation and inducing of tillering/ shoot development (Steinmann, 2002). The intensity of harrowing can be regulated by modifying the driving speed, the number of consecutive passes and the tine angle (Rydberg, 1994;Rasmussen and Svenningsen, 1995). The challenge is to achieve a high degree of weed control while keeping crop damage as low as possible. The crop damage is mainly caused by covering plants with excessive amounts of soil (CSC = crop soil cover) or by tearing off parts of the leaves (Jensen et al., 2004;Rasmussen et al., 2009).
For this study, selectivity has been defined as the ratio between percentage of weed control and the percentage of CSC immediately after harrowing. The CSC is the percentage of the crop, which is covered by soil (Rasmussen et al., 2008). This definition does not consider recovering or new germination of weeds after treatment and crop recovery from harrowing. Re-growth of weeds or late germinating weeds may require repeated cultivations, especially in crops with low competitive ability ( Van der Weide et al., 2008). CSC can be measured in real time based on digital image analysis (Rasmussen et al., 2007;Weis et al., 2008;Rueda-Ayala and Gerhards, 2009).
Farmers need supportive tools to adjust harrowing intensity according to crop and soil conditions within and between fields. A wrong harrowing intensity may cause crop damage especially in field sections with light and sandy soil textures and low crop cover. In parts of the field with heavy soils and high crop cover, treatment intensity may be too gentle causing insufficient weed control. Automatic adjustment of harrowing intensity can avoid excessive crop damage and increase WCE (Rueda-Ayala et al., 2013). In recent decades, there have been several attempts to improve mechanical weed control by varying the harrowing intensity (Søgaard, 1998;Engelke, 2001;Rueda-Ayala et al., 2013;2015;Müter et al., 2014). Rueda-Ayala et al. (2013) mounted an electronic soil density sensor on a harrow tine to measure the draught force of the soil at a depth of 2-5 cm. Their decision algorithm decided to harrow more aggressively in areas with dense and heavy soil and with a reduced intensity in field sections with light soil. This principle has been implemented in commercial harrows. It resulted in higher WCE but caused lower crop coverage compared with uniform harrowing intensity. Søgaard (1998) varied the intensity of weed harrowing by changing the working depth of the tines. However, the author did not take into account different crop growth stages and weed densities. Rueda-Ayala et al. (2013) and Peteinatos et al. (2018) measured the weed density before harrowing using a bispectral camera, and Rueda-Ayala et al. (2015) determined weed density with an ultrasonic sensor and included the data in a decision algorithm for site-specific weed harrowing (Rueda-Ayala et al., 2013;2015). They applied the highest intensity of harrowing at locations with high weed density and reduced harrowing intensity in areas with medium and low weed infestation. However, other factors such as the crop coverage remaining immediately after treatment and the soil moisture were not considered in the decision algorithm.
To the current state, none of the developed decision algorithms have been precise enough to adjust tine angle in the new harrows with hydraulic variation on tine angle. Some systems have shown the potential for harrowing automation, but the variety of information needed for a proper adjustment, the complexity of the sensor-and steering systems and the costs associated with such systems might be the reasons for the lack of suitable systems for online control of intensity.
Therefore, the objective of the study was to develop, implement and test a decision algorithm based on continuous camera measurements of the crop coverage before and after harrowing. An image analysis system was designed to calculate the actual CSC during harrowing. A controller was installed on the harrow to analyse the images, compare the actual CSC with a preset threshold value and transfer the decision to the online hydraulic tine angle regulation system for adjusting the harrowing intensity. A threshold value for CSC was derived from previous empirical data of eight field studies in spring cereals. An additional field study was carried out to test whether the online regulation system of harrowing intensity was capable to realise and adjust to the preset threshold values for CSC.

| Experimental site and description of field experiments 1-8
Eight field experiments were conducted in spring wheat, cv. Triso Therefore, seed rates were relatively high with 600 seeds m −2 for spring wheat and 400 seeds m −2 for spring barley. Row spacing was 20 cm for spring wheat and 15 cm for spring barley. Seeding depth was 2-3 cm. Soil type is a Stagnic Luvisol, and soil texture is silty loam and loamy clay. The average annual precipitation is 700 mm, and the average temperature is 8.8°C. The region is characterised by dry weather periods in spring. Experimental fields received no rainfall at least 3 days before harrowing and 3 days after harrowing.
Five experiments (Exps. 1-5) were implemented using a split-plot design with two factors and four repetition blocks ( Table 1). The factor named 'mode of intensity' was arranged in the whole plot. This factor included three modes for varying the harrowing intensity: (a) increasing driving speed, (b) changing angle of tines and (c) increasing number of consecutive passes on the same day as cultivation. Each mode of intensity was used to create five intensity levels. In total, there were four increasingly more aggressive harrowing intensities and one untreated control (intensity zero). The factor 'intensity level' was arranged in the subplots. Each experiment from 1 to 5 comprised 60 plots (3 modes × 5 intensities × 4 replicates). Three further experiments (Exps. 6-8) were implemented using a randomised complete block design with four replicates. The study factor 'harrowing intensity' was set by varying tine angle in five steps (Table 1).
Plots in exps. 6-8 were 12 to 15 m long and 2.5 m wide.
Harrowing was done along crop rows with a 2.5 m wide harrow (Hatzenbichler) with flexible tines (25 mm distance between tines, six rows of tines) and manual adjustment for tine angle and working depth. Since 2018, a hydraulic setting of the tine angle has been used.

| Assessments
Weed density and crop coverage were assessed before and immediately after harrowing. Crop coverage was again measured 14 days after harrowing. Weeds were counted in a 0.1 m 2 frame at four locations per plot. Crop cover was measured with two RGB cameras, model AD-130-GE (JAI Technology), mounted in the front and rear of the harrow at a frame rate of 4 fps from a height of 1 m above ground.
Field of view was 0.2 m 2 . Excessive Green Red Index (ExGR) was calculated out of the three layers of the processed red (R), green (G) and blue (B) images according to Mink et al. (2018) to enhance the contrast between green vegetation and soil. The ExGR (a) is the difference in the Excessive Green Index (ExG) (b) and the Excessive Red Index (ExR) (c). A zero threshold was applied to create a binary image. Weeds were removed from the ExGR image based on size and shape of plants according to Weis et al. (2008) resulting in crop cover ( Figure 1).
CSC is defined as the part of the crop that is covered by soil, after the treatment. Two images, presenting the crop coverage before and after harrowing, provide the necessary information to measure % CSC.
Grain yields were recorded in experiments 1, 2, 6, 7 and 8 in 2 × 10 m subplots in the centre of the plot using a plot combine harvester (Zürn 170, Zürn Harvesting GmbH & Co. KG). Grain yield data are presented for 86% dry weight.

| Decision support system for automatic adjustment of the tine angle by camera control
Empirical data of previous field studies (Table 1) were analysed to determine a threshold for crop soil cover (CSC) in the decision support system (DSS). This threshold was defined as the maximum CSC that the crops could compensate in all experiments 1-8 within 14 days after harrowing. Real-time adjustment of the harrowing intensity was achieved by varying the tine angle. In the DDS, actual CSC value was compared with the threshold value. Data analysis of  If the actual CSC is higher than the preset threshold of 10%, the tine angle was decreased to avoid crop damage. If the CSC was lower than preset threshold, the tine angle was increased to achieve a higher weed control efficacy (Figure 3). The tine angle was adjusted in steps of 15° ( Figure 4). Adjustment of tine angle was realised within less than 1 s.

| Design and control system of the camera steered harrow
Cameras, DSS and controller were integrated in a 6 m wide harrow for decreasing or increasing the tine angle, when the cylinder was fully expanded or compressed. During each start of the automatic mode, the harrow is moving to the highest and lowest intensity points in order to recalibrate the distance sensor on the hydraulic cylinders. After any automatic adjustment of the tine angle, the current harrow position was updated in the controller. A controlling board was designed to allow a manual and automatic mode of the harrow (Figure 6).

| Description of field experiment 9
The ninth field experiment was conducted in winter wheat at Hirrlingen near Tübingen in autumn 2019 to test the accuracy of automatic tine angle control of the Hatzenbichler harrow.
Winter wheat, cv. Patras was sown with 300 seeds m −2 and a row distance of 15 cm. The soil texture was a loamy clay, and the average annual precipitation is 831 mm and the average temperature 8.9°C. The field received no rainfall 3 days before harrowing and 3 days after harrowing. Winter wheat was at 2-3 leaf stage at the time of harrowing. The trial was a 2 × 3 factorial arrangement in a randomised complete block design with three replicate blocks.
The first factor was the mode of tine angle control: a manual and an automatic control. In the manual mode, tine angle was set in the field border next to the experiment and then kept constant for the complete treatment. In the automatic mode, intensity was continuously adjusted according to the actual CSC and the threshold value.
The second factor represented the intensity of harrowing with three levels (light, medium and strong; Table 2).
The experiment contained 18 plots with a size of 25 m × 6 m, each. The driving speed was constantly 8 km hr. Harrowing was done along crop rows. CSC (for verification of conformity with the thresholds) was calculated taking ten images before and after harrowing at random positions in the plot with a digital RGB camera (Panasonic DMC-TZ41) according to Equation (7).
L 0 represents crop coverage before harrowing, and L is the crop coverage measured after harrowing.

| Data analysis
All data were analysed using the RStudio software (Version to improve model fit. The delta method was used to calculate 95% confidence intervals for CSC. An analysis of variance (ANOVA) was performed for the data of experiment 9 and crop recovery data followed by a Tukey HSD (Honestly Significant Difference) test of the means at α ≤ 0.05.
An ANOVA was used because harrowing intensities 0-5 were categorical predictor variables. Prior to the analysis, the data were tested for homogeneity of variance and normal distribution of the residuals.
(7) CSC = 100 * L 0 − L L 0 F I G U R E 3 Example for the decision rules based on CSC calculated from two images before and after harrowing

| Results experiments 1-8
Lack-of-fit test showed that Equations (5) and (6) Figures S1 and S2). Therefore, mode of intensity by speed and number of passes was skipped from the experiments 5-8. Intensity was further on only changed by tine angle in experiments 6-8.
Level of intensity had a strong impact on selectivity. In all experiments, we observed an exponential increase in WCE at low to medium intensities. As expected, higher intensities increased the CSC, but based on Equations (4) and (5), WCE at higher intensities is flatting out towards a plateau. Therefore, selectivity decreased In average, 58% WCE was achieved at 5% CSC (lowest intensity), 75% WCE at 10% CSC and 82% at 20% CSC. Higher than 10% CSC, the benefit (WCE) of increasing intensity was lower due to the cost of crop damage (CSC; Table 3). This was one reason for selecting 10% CSC as threshold in the decision algorithm.
We observed in all eight experiments that crop coverage increased faster in the treated plots compared with the untreated control. Within 14 days after harrowing, crop coverage was always higher at intensities causing 10% CSC than in the untreated plots.
The lowest crop recovery was observed in experiment 2 with 12% CSC. In experiment 8, spring barley could even compensate 41% CSC within 14 days (Table 3; Figure 7). This result indicates that har- Harrowing intensity had no significant effect on grain yield.
Grain yields were also not significantly different from the untreated control (Table 4). It was observed that yields at low harrowing intensity were slightly higher than the untreated controls. Highest intensities of harrowing often resulted in lowest yields.

| Results experiment 9
Automatic tine angle control was more precise than using the manual settings. In the three treatments of automatic adjustment, average CSC varied only 1.5% (Auto 10%) to 3.5% (Auto 30% and Auto 60%) from the preset threshold value. The three automatic treatments differed significantly from each other (Figure 8). The standard error for the automatic modes was 5% for the Auto 10% treatment and 8% for Auto 30% and 17% for Auto 60%, while the standard error in the three manual modes was 18%-20%.

| D ISCUSS I ON
This paper presents a new approach combining digital image analysis with an online control system of automatically adjusting the harrowing intensity in cereals for post-emergent weed control. Different from previous works (Søgaard, 1998;Engelke, 2001;Rueda-Ayala et al., 2013;2015;Müter et al., 2014), the automatic regulation system is less dependent of the crop growth stage, driving speed and soil texture. This working flexibility facilitates the practical use of the new system. It supports famers with little practical experience in weed harrowing to apply the constant intensity.
The decision algorithm is based on the selectivity model by Rasmussen and Svenningsen (1995) and Rasmussen et al. (2008;) with a threshold for maximum % CSC. The aim of this approach was to avoid harrowing intensities that could damage the crop. In other decision algorithms adjusting harrowing intensity to weed density Rueda-Ayala et al., 2015) or soil resistance (Rueda-Ayala et al., 2013), the risk of crop damage was higher, because those systems allowed a higher CSC than 10% to obtain a targeted 80% weed control.
The effects of harrowing on crop and weeds are probably very complex or not fully understood, both for pre-and post-emergent The controlling board of the harrow actuator TA B L E 2 Description of the treatments in the winter wheat experiment treatments. The model by Rasmussen et al. (2008;  these results, a threshold of maximum 10% CSC seems to be in the range of optimal selectivity.
The automatic system of harrow adjustment performed correctly and is robust under heterogeneous field conditions. In the automatic mode, CSC measured from separate images before and after harrowing corresponded well to the threshold value set in the controller with a lower standard deviation than for manual control.
Deviation of the achieved to the threshold CSC value varied from 1.5% to 3%. Standard error increased at higher preset thresholds in the automatic regulation due to the extremely high burial of crop leaves by soil at highest harrowing intensity. However, it was lower than the manual adjustment.  (2011) and Kurstjens and Perdok (2000) reported that weed control efficacy and crop response to weed harrowing strongly vary between site and year. More focus should also be given to the crop response of harrowing concerning crop density, biomass, tillering, ear development, height and yield. One farmer involved in this study increases seed density of cereals and legumes by 10% when post-emergent harrowing is planned.
Technical improvements can increase the performance of the presented system. A separate control of each segment of the harrow with one pair of cameras before and after the tines would take into account smaller variations of crop cover and increase the precision of the treatment. However, it would also increase the costs.
The hydraulic adjustment of tines is relatively slow. It takes approx- A major benefit of the current development is its simplicity and robustness. Variations of tine angle are made based on one simple parameter (CSC) that can be assessed online using low-cost RGB cameras.

ACK N OWLED G EM ENTS
We are grateful to Hans Back, Felix Möcklinghoff, Lisa Engelhardt and Tobias Schiller for conducting field studies and analysing data in their bachelor and master theses. The authors acknowledge the technical support of Hatzenbichler, St. Andrä, Austria, providing a commercial 6 m wide harrow with hydraulic adjustment of tine angle for our studies.

PE E R R E V I E W
The peer review history for this article is available at https://publo ns.com/publo n/10.1111/wre.12458.

O RCI D
Roland Gerhards https://orcid.org/0000-0002-6720-5938 Victor Rueda Ayala https://orcid.org/0000-0002-9159-8276 F I G U R E 8 Mean crop soil cover (CSC) and standard errors measured in winter wheat at Hirrlingen 2019 after harrowing in three manual settings and with three automatic thresholds for CSC. Means with the same letter are not statistically different according to the HSD test at α ≤ 0.05. Man I = low manual adjustment of tine angle (10°), Man II = medium manual adjustment of tine angle (40°), Man III = high manual adjustment of tine angle (70°), Auto 10% = CSC threshold in image recognition software (IRS) is 10%, Auto 30% = CSC threshold in IRS is 30%, Auto 60% = CSC threshold in IRS is 60%