# The Design and Development of Test Platform for Wheat Precision Seeding Based on Image Processing Techniques

Qing Li, Haibo Lin, Yu-Feng Xiu, Ruixue Wang, Chuijie Yi

► To cite this version:

Qing Li, Haibo Lin, Yu-Feng Xiu, Ruixue Wang, Chuijie Yi. The Design and Development of Test Platform for Wheat Precision Seeding Based on Image Processing Techniques. Third IFIP TC 12 International Conference on Computer and Computing Technologies in Agriculture III (CCTA), Oct 2009, Beijing, China. pp.352-358, 10.1007/978-3-642-12220-0_51. hal-01055427

HAL Id: hal-01055427

https://inria.hal.science/hal-01055427

Submitted on 12 Aug 2014

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
THE DESIGN AND DEVELOPMENT OF TEST
PLATFORM FOR WHEAT PRECISION SEEDING
BASED ON IMAGE PROCESSING TECHNIQUES

Qing Li<sup>1</sup>, Haibo Lin<sup>1</sup>, Yu-fengXiu<sup>1</sup>, Ruixue Wang<sup>2</sup>, Chuijie Yi<sup>1,*</sup>

**Abstract:** The test platform of wheat precision seeding based on image processing techniques is designed to develop the wheat precision seed metering device with high efficiency and precision. Using image processing techniques, this platform gathers images of seeds (wheat) on the conveyer belt which are falling from seed metering device. Then these data are processed and analyzed to calculate the qualified rate, reseeding rate and leakage sowing rate, etc. This paper introduces the whole structure, design parameters of the platform and hardware & software of the image acquisition system were introduced, as well as the method of seed identification and seed-space measurement using image's threshold and counting the seed's center. By analyzing the experimental result, the measurement error is less than ±1mm.

**Keywords:** image processing, dropping distance, precision seeding

INTRODUCTION

The precision seeding technique is the combination of technology about
agricultural mechanics and agronomic, which proves to be a practical way to
lower the cost and improve the efficiency. The seed metering device is the
important part in the technology of precision seeding. And the seed metering
device test platform is the main tool to test the seed metering device's
performance. Working state of seed metering device in the field can be
simulated by this test platform so as to perform repeated experiments on the

<footnote n="1">¹ Department of Vehicle and Traffic, Qingdao Technological University, Qingdao, Shandong Province, P. R. China 266033</footnote>

<footnote n="2">² College of Engineering China Agricultural University, Beijing, 10083</footnote>

<footnote>* Corresponding author, Address: Department of Mechanical Engineering, Qingdao Technological University, Qingdao 266033, Shandong Province, P. R. China, Tel: 13963924026,Email:chuijieyi@vip.163.com</footnote>
seeding metering device. Using technology of computer detection, the test platform of wheat precision seeding based on image processing techniques is designed. Through the processing and analysis on the images, the distance between seeds can be measured by the method based on image-binary threshold. By processing the distances of the seeds, the qualified rate, reseeding rate and leakage sowing rate can be given.

# 1. TOTAL STRUCTURE OF TEST PLATFORM AND WORKING PRINCIPLE ON THE SYSTEM OF MEASUREMENT

## 1.1 Total structure of test platform

The total structure is shown in Fig.1.It is composed of test-platform bench, species-bed conveyor, conveyor motor, seed metering device (air-suction seed metering device), drive motor, vacuum pump devices, computer vision detection system. The test-platform bench is 0.7 meters high; roll wheel's space of species-bed conveyor is 2.5 meters long. The bracket-wheel is resettled in upper and lower levels of conveyor belt. The conveyor is joined seamlessly so as to ensure a smooth running, small vibration, low noise to meet the standard laboratory vibration and noise requirements.

<figure><img src="image_2.png" /><figcaption>Fig.1. Total structure of test platform</figcaption></figure>

## 1.2 Principle of measuring system

The seed metering device is installed on the test bench. In the driven of VVVF motor, species-bed conveyor and metering device are relatively uniform operation; seed metering device's inner chamber results a vacuum degree under the vacuum so that the seeds in the box are adsorbed to the seed plate in the negative pressure, then the seeds fall to conveyor belt as
soon as the negative pressure disappears with the rotation of seed plate (coated with the lubricating oil, conveyor belt can paste seeds so that it does not move relative to the conveyor); the seeds' images are collected and transferred to a computer when conveyor pass through the camera, where after which are processed by software, at last realize the measurement of the distance of the seeds.

## 2. CONSTITUTION OF THE IMAGE PROCESSING SYSTEM IN SOFTWARE AND HARDWARE

### 2.1 Constitution of the software

Software is NI Vision module in Labview 8.6 of National Instruments Company. Compile programs for the acquisition and processing using graphical programming language to achieve the purpose of image processing and analysis.

### 2.2 Constitution of the hardware

A Pentium IV computer; IEEE 1394 image acquisition card; CCD monochrome industrial camera: DH-SV1410FM

## 3. IMAGE ANALYSIS AND PROCESSING

### 3.1 Statistical characteristics of image

The overall statistical features of an image can be described by joint probability density function. For discrete digital images, histogram is obtained by statistics of the pixel gray value which can be used to estimate the probability distribution of the image. If we define the first order probability distribution of gray-scale image $f(i, j)$:

$$P(b) = P\{f(i, j) = b\}, 0 \le b < L \quad (1)$$

Where: $b$ is quantization layer value, the number of total layer is $L$. $P(b)$ is approximate value of first-order probability. For the digital image, there is:
$$P(b) = \frac{N(b)}{M} \qquad (2)$$

Where: *M* is the total number of effective pixels in the whole image. *N(b)* is the total number of *b* gray value in the whole image. So we can draw the first-order gray-scale image histogram with gray value as the abscissa and the number of pixels or pixel frequency appearing as the longitudinal coordinates. Fig.2 shows a typical histogram when some light objects appear on a dark background.

<figure><img src="image_3.png" /><figcaption>Fig.2.Curve of typical gray histogram distribution</figcaption></figure>

## 3.2 Binary converting in image processing

There are no clear boundaries between the objects(wheat seed)and background (conveyor of species-bed) because they mix together so we must use an appropriate threshold method to partition the objects. Here, we use the method of setting maximum variance threshold based on discrimination and principle of least square method.The basic idea is: dividing the histogram into two groups in some gray-scale, the gray value shall be the threshold when the variance between the two groups is the largest.

If the gray threshold which is selected is *t*, the gray levels is divided into two groups: $C_0 = \{0, t-1\}$, $C_1 = \{t, S-1\}$, $C_0$ and $C_1$'s probabilities respective are :

$$\omega_0 = \sum_{i=0}^{t-1} P(i) = \omega(t) \qquad (3)$$

$$\omega_1 = \sum_{i=t}^{L-1} P(i) = 1 - \omega(t) \qquad (4)$$

The averages of gray value about $C_0$ and $C_1$ respectively are:
$$q_0 = \sum_{i=0}^{t-1} \frac{iP(i)}{\omega_0} = \frac{q(t)}{\omega(t)} \qquad (5)$$

$$q_1 = \sum_{i=t}^{S-1} \frac{iP(i)}{\omega_1} = \frac{q - q(t)}{1 - \omega(t)} \qquad (6)$$

Where: $q = \sum_{i=0}^{S-1} iP(i)$ is the average gray value of the whole image.

$q(t) = \sum_{i=0}^{t-1} iP(i)$ is the average gray when the threshold is $t$. So interclass variance we can obtain is as follows:

$$\sigma^2(t) = \omega_0(q_0 - q)^2 + \omega_1(q_1 - q)^2 = \frac{[q\omega(t) - q(t)]^2}{\omega(t)[1 - \omega(t)]} \qquad (7)$$

In this way, we regard $t$ as integer variable and take value from 0 to $S-1$ respectively the values, then substitute $t$ into function of $\sigma^2(t)$, and the $t$ shall be the threshold $T$ we desire when $\sigma^2(t)$ is the largest.

### 3.3 Binary converting in image partition

According to the threshold $T$ calculated earlier, we can transform the gray image into binary image. Transformation is as follows: The gray value is 0 when the pixel gray value is less than threshold of $T$; When the pixel gray value is larger than or equal to $T$, the gray value is 1. Fig.3 shows the collection of the original image. Fig.4 shows the binary image with the threshold of $T$.

<figure><img src="image_4.png" /><figcaption>Fig.3.Original image</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig.4.Binary image with the threshold of $T$</figcaption></figure>
## 3.4 Measurement of the spaces of seeds

To measure the distances of seeds, firstly we have to determine the poid of seeds, firstly we have to find the poid of seeds, and then regard this poid as the center of seeds. This article is only concerned about the projector distance of two seeds which are in the sowing centerline. So as long as we calculate coordinates of seeds in this direction, the distances of seeds will be got. Set upper-left corner of image as the origin coordinate, right is the positive X-axis, down is the positive Y-axis. Assuming a seed's coordinates of pixel location is $(x_i, y_i)(i=0, 1, \dots, n-1; j=0, 1, \dots, m-1)$, the center of each seed center's coordinate of $\bar{X}$-axis shall be the result. The equation is as follows:

$$ \bar{X} = \frac{1}{k} \sum_{i=0}^{k} x_i \qquad (8) $$

Where: k is the quantity of pixel about seed's image.

# 4. MEASUREMENT RESULTS AND ERROR ANALYSIS

## 4.1 Measurement results

<table><caption>Table 1. Contrast table of test results</caption><thead><tr><th>Measurement times</th><th>Results of manual measurement (mm)</th><th>Results using this system 1 (mm)</th><th>Deviation 1 (mm)</th><th>Results using this system 2 (mm)</th><th>Deviation 2 (mm)</th></tr></thead><tbody><tr><td>1</td><td>40.21</td><td>40.01</td><td>0.20</td><td>40.02</td><td>0.19</td></tr><tr><td>2</td><td>52.08</td><td>51.25</td><td>0.83</td><td>51.25</td><td>0.83</td></tr><tr><td>3</td><td>45.26</td><td>46.04</td><td>-0.78</td><td>46.04</td><td>-0.78</td></tr><tr><td>4</td><td>78.43</td><td>77.96</td><td>0.47</td><td>77.90</td><td>0.53</td></tr><tr><td>5</td><td>23.15</td><td>23.01</td><td>0.14</td><td>23.02</td><td>0.13</td></tr><tr><td>6</td><td>62.05</td><td>63.02</td><td>-0.97</td><td>63.01</td><td>-0.96</td></tr><tr><td>7</td><td>39.68</td><td>39.19</td><td>0.49</td><td>39.32</td><td>0.36</td></tr><tr><td>8</td><td>40.21</td><td>39.80</td><td>0.41</td><td>39.80</td><td>0.41</td></tr><tr><td>9</td><td>42.13</td><td>42.07</td><td>0.06</td><td>42.07</td><td>0.06</td></tr><tr><td>10</td><td>41.50</td><td>40.78</td><td>0.72</td><td>40.76</td><td>0.74</td></tr></tbody></table>
When the seed plate is in a speed of 40rmp, conveyor belt is in a speed of 0.72m/s, vacuum pump's pressure is -2kp, we intercept a portion of images about the seeds on the conveyor belt, as shown in table 1, lists a set of measurement results using this system and the results of manual measurement results. We carried out two experiments using this system so that to test the system's consistency on the results.

In this test qualified rate is 96.46%; leakage sowing rate is 1.63%; reseeding sowing rate is 1.91%. Table 1 shows measurement results got by this system have a good consistency with the manual measurement results, and the deviations are between ±1mm, which meets the test performance requirements. Further, the results have better consistency when we carry two compared tests using this system.

## 4.2 Error analysis

The measurement results using this system are not exactly the same as the manual measurement results. The reasons for this inconsistency are:

1) Manual measurement has inherent error.

2) Speed quantization error.

# 5. CONCLUSIONS

In this paper, the application of the binary image threshold in the measurement of seeds' distance is studied. Aiming at features of seeds' space, we discuss the collection and processing for images. This system successfully realizes testing the parameters of seed metering device, shortening the test time, reducing the man-made error, increasing the system's ability of anti-interference, making the test data more accurate. At the same time this system simplifies the complexity of the operation and shortens the test's cycle.

## ACKNOWLEDGEMENTS

Funding for this research was provided by Shandong major scientific and technological professional project(2007ZHZX10401). I'm grateful to my teachers for their help in my research.
REFERENCES

Yu Song-lie. China theory and practice of wheat cultivation. Shanghai. Shanghai science and Technology Press. 2006.

He Di, Chen Li-dong and Xie Yu-feng. Experimental Study on the Factors of Seeding Quality about Air-suction Metering Device. Journal of Agricultural Mechanization Research. 2006,1: 175-176,179.

Zhang Yu-jin. Image Partition. Beijing. Science Press. 2001.

SezanM.I. A Peak Detection Algorithm and its Application to Histogram Based Image Data Reduction. Graphical Model and Image Processing. 1985, 47-59.

Jia Yun-de. Machine Vision. Beijing. Science Press. 2000.

GB/T 6973-1986,Single (Precise)Test Method of Seeding Machine.