# Target Recognition of Software Research about Machine System of Accurately Spraying

Yan Shi, Chunmei Zhang, Maogang Li, Haibo Yuan

► To cite this version:

Yan Shi, Chunmei Zhang, Maogang Li, Haibo Yuan. Target Recognition of Software Research about Machine System of Accurately Spraying. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.29-35, 10.1007/978-3-642-18354-6\_5. hal-01563448

HAL Id: hal-01563448

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

Submitted on 17 Jul 2017

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
Target recognition of software research about Machine system

of accurately spraying

Yan Shi¹, Chunmei Zhang², Maogang Li³

1 Department of food engineering, Qingdao Agriculture University, Qingdao, Shandong Province, P. R. China

266109, Tel: 0532-88030446, Email: shiyan517@163.com

2 Xian Air Force engineering University P. R. China,

3 College of Mechanical & Electrical Engineering, Q ingdao Agricultural University, Q ingdao 266109, China;

**Abstract.** The software is used modularity and generic idea, realize target recognition and accurately spraying, it consist of five modules: module of image process, module of identifing the crop from the background of elaphic, module of target recognition and classification of treatment, module of intelligent decision-making and helpness. Image process is made of distortion adjustment, gray strengthen, neighbourhoods average, histogram equalization and median filter; the module of identifing the crop from the background of elaphic is made of division of green strength threshold, division of H hue threshold and segmentation afterwards process and so on; the module of target recognition consist of recognition of fruiter, rice, wheate and target process and area calculating, the module of recognition of fruiter include centre recognition function; the module of intelligent decision-making include information target transmitted. The system has fault-tolerant function and automatically judges the input of image or not, automatically detects input of camera and terminal setting, connection situation of singlechip, creating executable file, breaking away from VC++ then direct running. Limiting surface of software system is friendly, simple clear and satisfy the real-time processing the request.

**Keywords:** precision employing pesticide; image process; the soft of recognition

# 1 Introduction

Precision spraying technology are areas of

precision agriculture, mainly refer to the help of computer vision technology, identify the weed coverage rate and determine the location of weeds. Accordingly the implementation of appropriate, positioning the spraying of herbicides, the absence of regional weed not spraying herbicides. This not only can effectively reduce weeds, improve yield and quality of agricultural products, but also significantly savings in the use of herbicides liang, lower input, protect the ecological environment, have important economic significance and ecological significance.

Many scholars have conducted extensive studies. Won Suk Lee from USA, Claim that they have developed a real-time and between the lines system used to control weeding intelligent robot[1-2]. M.E.R.Paice, P.C.H.Millerdesigned a injection metering system, by changing the mixing ratio of the method to adjust the liquid volume spraying[3-4]. May.Kenzel invented a spray bar height can be adjusted and automatically sprayed herbicides on the target machine system[5]. Nanjing Forestry University, Mao-Cheng Zhao design a system based on Tree features real-time accurate image of the pesticide on the target and can be variable spraying[6]. QIU Bai-jing from Jiangsu University developed a variable spray device, it can be installed in the hardware and software equipment and DGPS for guidance, according to their location automatically adjust the size of spray volume. The equipment includes sprayers, adjust the
controller, the computer console, AgGPS132,
farm tractors and other equipment [7].

Precision of the target application techniques
one of the difficulties is the fast and accurate
identification on the target, target image
acquisition and processing are key part of
machine vision, This article is used modularity
and qeneric idea, realize target recongnition and
accurately spraying, it consist of five modules:
module of image process, module of identifing
the crop from the background of elaphic, module
of target recongnition and classification of
treatment, module of intelligent decision-making
and helpness

## 2 Image Acquisition and Preprocessing

2.1 Image Acquisition

Realize dynamic acquisition with a CCD
camera image in the actual system image was
real-time input computer through image
acquisition card.

## 2.2 Image Preprocessing

As the spraying system image acquisition is in
the outdoor, and the camera installed in the
movement of locomotive, the collection of
images often have many problems, such as the
image edge is too vague and have some images
made unexpected white spots or black spots ,
image distortion, affected by various natural
conditions, such as wind, light, uneven exposure
factors, the input image in the visual effects and
identify possible have so many problems, these
factors resulted in images "quality" problem.
Therefore, the first pre-process the image. In the
pre-processing stage, using distortion correction,
gray transformation enhancement, histogram
equalization algorithm, to improve the image
qualit

3 Image segmentation and target identificatio

**3.1 Image segmentation**

Making weed identification should be based
on different backgrounds to choose a different
recognition method. The weeds on the soil
background recognition can be applied to
spectrum and color of law, according to weed
and background material in the color and
spectral characteristics of the differences in
segmentation. Green weed in the context of
recognition are more complex, the background
of the intensive plants, such as lawn, generally
use shape feature method or texture feature
method. Background of the drilling plant, to
achieve the rapid division of weeds and crops
with position characteristic; background-demand
plants, the shape feature method is more used.

3.2 Target identification

This study, on crop and background
segmentation, used ultra-green method and tone
method, in which the threshold was automatically
determined, greater than the threshold value for
the pixels to give the background color, less
than the threshold value was given the same
color of the pixel.

Such as drilling wheat crop planted artificially,
so its position distribution is the rule - by line of
distribution; and the growth of weeds is natural,
non-regularly distributed between crop rows. In
this study, the division of wheat and weeds used
location characteristics method. Corn crop
demand, 3 ~ 5 leaves, has certain spacing and
line spacing between adjacent plants, plant
leaves overlap to a lesser. Therefore, for corn,
the first extract their shape characteristics, and to
train artificial neural network for recognition.
### 3.3 Segmentation to remove noise

The image segmented more or less has noise. The noise of the area generally consists of several pixels, the form of a point-like. By median filtering method to filter the image processing.

### 3.4 Determine target area

The binary image was divided into 24 squares and was statisticed (where the size of each small square region is just a liquid spray nozzle effective area), statistics for each small box the white pixels and the ratio of black pixels,the ratio is as the volume of the signal box region spray.

Binary image defined area A pesticide is sprayed area that contains the number of pixels. Hypothesis,the size of each square b(x,y) equal M × N, b(x,y)=1,the background is zero, the target area A:

$$A = \sum_{x=0}^{M-1} \sum_{y=0}^{N-1} b(x, y)$$

## 4 Software system design

The system was used Microsoft Visual C++6.0 MFC to generate the basic framework, and then programed with the Win32 API programming language, Microsoft has introduced the development of Win32 environment that is a visual integration of object-oriented programming environment. It is not only a procedural framework for automatic generation of flexible class management, coding and integration interaction interface design, can develop a variety of procedures (application, DLL, ActiveX controls, etc.), but also by a simple set can process framework to generate support for database interface, OLE2, Winsock network, 3D control interface.

### 4.1 System Overview

In the software process taking a good design is important. Rational design of software is not only development cycle short, low cost,but also readable, easy to maintain. On the contrary, free software written in is not only difficult to grasp,but also poor to read , hard to maintain, there may even be unable to complete the code and lead to the situation half-way scrap. The modular software design with high cohesion, low coupling principle of the software is divided into relatively independent of the number of parts in order to separate design and code of preparation, make the structure of the whole system easily understand. Have been introduced earlier in this article all aspects of the VC++ programming, the use of modular programming, can take advantage of all the previous subroutine, after simple treatment can be integrated into the total program.

The software is divided into modularity through function, it consist of five modules: it consist of five modules: module of image process, module of identifing the crop from the background of elaphic, module of target recognition and classification of treatment, module of intelligent decision-making and helpness. Image process is made of distortion adjustment,gray strengthen, neighbourhoods average, histogram equalization and median filter;the module of identifing the crop from the background of elaphic is made of division of green strength threshold, division of H hue threshold and segmentation afterwards process and so on; the module of target recognition consist of recongnition of fruiter, rice,wheate and target process and area calculating,the module of recongnition of fruiter include centre recognition function; the module of intelligent decision-making include information target transmited.

Program was used class-based ideology. In the program the images are a variety of operations and operations in the form of packaging up to
class so that they can work for future expansion.

## 4.2 System Framework

The process is as follows:

(1) Frist, CCD images were collected, then were pretreatment, and binary image was processed with Green features. Crops and the background binary image was obtained.

(2) The image was processed with morphological operations, eliminating a lot of noise.

(3) Judgments are fruit trees, wheat or corn images into the appropriate processing module.

(a) There is tree, tree crown recognition

(b) There is wheat, extracting centerline

(c) There is crop, region marking, according to the distance between the region for regional consolidation, the feature of region of the combined was extracted, on the identification of maize, the input feature vectors extracted BP neural network classifier to judge whether the target.

(4) Calculate Target area and position.

(5) Send information

Total system flow chart as follow:

<figure><img src="image_2.png" /><figcaption>Fig. 2. Total system flow chart</figcaption></figure>

System software build platform as follows:

<figure><img src="image_3.png" /><figcaption>Fig3 system build platform</figcaption></figure>

<caption>Fig. 3. System build platform</caption>

# 5 Summary

This article introduces the identification of software systems. The software system was designed with modular and class ideas. It consisted of five modules: module of image process, module of identifying the crop from the background of elaphic, module of target recognition and classification of treatment, module of intelligent decision-making and helpness. The system has fault-tolerant function and automatically judges the input of image or not, automatically detects input of camera and terminal setting, connection situation of singlechip, creating executable file, breaking away from VC++ then direct running. Limiting surface of software system was friendly, simple clear and satisfy the real-time processing the request.

# References

1. Suk Lee Won. Robotic weed control system for tomatoes using machine vision system and precision chemical application. An ASAE Meeting Presentation, 1997, 3093:1~14.
2. Long Man sheng, Corn seedling weed identification in machine vision research[D]:[Master thesis], Yang Ling : Northwest A&F University, 2002, 3

3. Paice M E, Miller P C H, Bodle JD. An experimental sprayer for the spatially selective application of herbicides J.Agric-Eng. Res., 1995, 60(2):107~116.

4. Zhang Wei. Research on the Technology of PWM Variable Sprayer[D]:[Master thesis].Zhen Jiang, Jiangsu University, 2006:4.

5. May, Kenzel. United State Patent [P].December 1, 1998.

6. Zhao Maocheng; Zheng Jiaqiang. Tree crown recognition and precision toward-target pesticide application[J]. Transactions of The Chinese Society of Agricultural Engineering, 2003 (6):150~153.

7. QIU Bai-jing, LI Hui-fang, WU Chun-du. On variable-rate spraying equipment and its key technology[J]. Journal of Jiangsu University (National Science Edition), 2004,25(2): 97~98.

8. Ge Yu feng. Indoor Pesticide Smart-Targeting Application Simulation System Based on Machine Vision[D] :[Master thesis], Nanjing Forestry University, 2003.