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

HAL
open science

# Research on Video Image Recognition Technology of Maize Disease Based on the Fusion of Genetic Algorithm and Simulink Platform

Liying Cao, Ying Meng, Jian Lu, Guifen Chen

► To cite this version:

Liying Cao, Ying Meng, Jian Lu, Guifen Chen. Research on Video Image Recognition Technology of Maize Disease Based on the Fusion of Genetic Algorithm and Simulink Platform. 9th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2015, Beijing, China. pp.76-91, 10.1007/978-3-319-48354-2_8 . hal-01614225

HAL Id: hal-01614225

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

Submitted on 10 Oct 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_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research on Video Image Recognition Technology of Maize
Disease Based on the Fusion of Genetic Algorithm and Simulink
Platform

Liying Cao, Ying Meng, Jian Lu, Guifen Chen*

School of Information Technology, Jilin Agricultural University, Changchun 130118
caoliying99@163.com, guifchen@163.com

**Abstract:** In order to improve the segmentation accuracy of maize disease leaves with genetic algorithms and reduce segmentation time, this paper proposed a video image recognition technology of maize disease based on the fusion of genetic algorithm and Simulink simulation platform. The technology firstly uses Simulink simulation platform to process the real-time video data captured, including sharpening, segmenting and smoothing, to improve image clarity and quality; Secondly, it uses genetic algorithm to generate optimization model to determine the optimal image of maize diseases; Finally, it fuses genetic algorithms and Simulink platform to analyze and recognize these optimal images. The study results of maize big-spot disease images show that image grey scale values changes after the process of the fused optimal algorithm so that the characteristics of maize diseases are high lightened and the recognition rate of maize disease video image is improved remarkable. The algorithm provides a valid basis for the identification and the diagnosis and treatment of maize disease.

**Key words:** maize big-spot disease; video image; genetic algorithm; Simulink platform;

# 1. Introduction

Computer image processing technology is an important component in the field of artificial intelligence, and between man and computer basic theory and application technology provides a specific interface. But the application of image processing technology in agricultural engineering research starts late in our country, mainly in the crop disease diagnosis [1-2], agricultural product quality detection [3-4], crop growth status monitoring [5-6], agricultural crops intelligent classification [7], etc. The present study show that using image processing technology not only can detect, stem diameter, leaf area, leaf circumference petiole Angle of crops such as external growth parameters, can also with the fruit surface color and fruit size to judging the fruit maturity, and crop water lack of fertilizer, and so on and so forth [8].

Computer image processing technology in crop production and research of information collection and has a large amount of information, high speed and high precision of significant characteristics and advantages, and solve some manual measurement is difficult to solve the problem.

Domestic started relatively late in the image recognition and processing, but the study of foreign theory made certain optimization, also has obtained certain research results. More mature by identifying plants in the static image texture and color features combined with neural network to achieve for the identification of crop nutrient deficiency. Domestic only video image processing
technology was applied to road traffic and dynamic video processing of events, but applied to crop disease monitoring information has not been reported to see.

## 2. The research method

### 2.1 Simulink

Simulink is a visualization simulation tool of MATLAB, it is a kind of block diagram design based on MATLAB environment, is to realize the dynamic system modeling, simulation and analysis of a software package that is widely used in linear systems, nonlinear systems, digital control and digital signal processing (DSP) in the modeling and simulation. Simulink continuous sampling time and discrete sampling time can be used or two mixed sampling time, it also supports multi-rate system, also is the system of the different parts have different sampling rate. In order to create the dynamic system model and Simulink provides a model block diagram of the graphical user interface (GUI), the creation process can complete just click and drag the mouse operation, it provides a more rapid and straightforward way, and users can immediately see the results of simulation of the system.

### 2.2 Genetic algorithms

Genetic algorithm is also in the field of computer science and artificial intelligence to solve the optimization of a heuristic search algorithm, is a kind of evolutionary algorithms. This heuristic is often used to generate useful solutions to optimization and search problems. Evolutionary algorithm was originally borrowed some phenomenon in evolutionary biology and developed, these phenomena, including heredity, mutation, natural selection and hybridization, etc. Genetic algorithm (ga) in the case of wrong selecting fitness function is likely to converge to local optimum [1], and cannot achieve the global optimal.

In genetic algorithm, the above several characteristics together in a special way: based on the parallel search of chromosome group, with a nature of speculation selection operation, switching operation and mutation operation. This particular combination differentiate between genetic algorithm with other searching algorithm.

### 2.3 Video analyses

Video analysis, IVS (Intelligent Video System), Video analysis technology is the use of computer image analysis technology vision, through the background and target separation and analysis in the scene and track targets within the camera scene. Video content analysis technology based on visual surveillance camera video image analysis, and has the capability of the background to the variety of the filter, by establishing the model of human activity, with the help of the computer's high speed computing power using a variety of filters, ruled out monitoring scene African human interference factors, accurate judgment in video surveillance images in various human activities.
## 2.4 Image classification

Color is a visual feature on the surface of the object, the color of each object has its own particular characteristics, to take some similar color to the same object characteristics, so we can according to the characteristics to distinguish object. The color with color in a feature in image classification can be traced back to the Swain and Ballard color histogram method is put forward. Due to the size of the color histogram is simple and with image, rotation changes not sensitive, got the attention of researchers is widely, now almost all image database system based on the content classification to classify color classification method as an important means, and put forward many improved methods, summarized the main can be divided into two categories: the global color feature index and local color feature index.

# 3. The genetic algorithm with Simulink platform integration of video image recognition technology of corn

## 3.1 Data mining based on genetic algorithm

Using the matlab software platform to maize disease image for processing object, by using the genetic algorithm coding, selection, crossover and mutation in the four basic programming operation, find out the objective function, according to the objective function to find the fitness, according to the fitness retains the image of the optimal selection as the candidate solution, give up the other candidate solutions. After iterative cycle, choose the biggest fitness individual images as the optimal solution output. The specific process as shown in figure 1.
<figure><img src="image_3.png" /><figcaption>Figure 1 Genetic algorithm process</figcaption></figure>

## 3.2 Data collection and data processing

Using GPS to collect boundary figure, spatial data such as sample point; Using high-definition camera fetching looks like the corn field, of video image. Establish a spatial database, relational database, video image library and model library.

## 3.3 SUMILINK platform for data processing

Simulink is a visualization simulation tool of MATLAB, it is a kind of block diagram design based on MATLAB environment; realize the dynamic system modeling, simulation and analysis of a software package. In the MATLAB/SUMILINK Video and Image Processing Block set module library can also be used for the Image Processing.

First of all, establish related model, so that the image is processed with the facts, as shown in figure 2.
<figure><img src="image_4.png" /><figcaption>Figure 2 The image processing model</figcaption></figure>

(1) the image transformation and geometric transformation

Before more complex image processing, need to convert the image first, according to the requirements of each image is converted to the required type; Images of geometric transformation is the image in the size, location and shape of transformation, the collected in the image rotation, translation, mirror to determine the optimal image, in order to deal with. Figure 3 for corn big spot without image processing:

<figure><img src="image_5.png" /><figcaption>Figure 3 corn big spot pathogen figu</figcaption></figure>

Like respectively to rotation and translation: in the face of corn big spot diagram
a) The translation of the image

Image of translation is the most simple geometry transform one of the most common transformation, it is a picture of all the points on the image according to the given offset in a horizontal direction along the x axis, in the vertical direction along the y axis moving, the image the same as the original image size after translation. Set (x₀, y₀) to a point on the original image Δx, image level Δy, amount of translation (x₀, y₀) for vertical translation (x₁, y₁), the points after the translation Coordinates will be, the mathematical relationship between them as shown below, processing of the image as shown in figure 4:

$$x_1 = x_0 + \Delta x$$

$$y_1 = y_0 + \Delta y$$

<figure><img src="image_6.png" /><figcaption>Figure4 Corn big spot pan figure</figcaption></figure>

b) The rotation of the image

Image rotation transform belongs to the location of the image transform, usually in the center of the image as the origin, all the pixels in the image rotation Angle of the same angel. Rotation, tend to change the size of the image. Angel values greater than zero, according to the counterclockwise; Angel value less than zero, according to the clockwise, figure 5 images for angel too values:
<figure><img src="image_7.png" /><figcaption>Figure 5 Rotate30° the figure corn big spot</figcaption></figure>

(2) The signal processing module library

Analysis and enhanced module library (Analysis Enhancement) of Block Matching ), it can be collected by the image sequence or video frames used for motion estimation, also used to remove redundant information, between the video frames in video compression; Edge Detection, Edge Detection), you can use the Sober operator, Roberts operator, Prewitt operator or Canny operator to find objects in the image Edge, reduce the amount of data, and eliminated can think irrelevant information, retained the image important structural properties; Conversion module library (Conversions) automatic threshold (Auto threshold) can be obtained in the gray image into binary image. The use of the rest of the sons of several module library module of image processing.

a)Roberts operator edge detection

For discrete image f(x, y), edge detection operator is used the image of vertical and horizontal difference gradient approximation operator, namely:

$$
\nabla f = (f(x, y) - f(x-1), f(x, y) - f(x, y-1))
$$

In edge detection, the calculation ∇f of each pixel in the image, then the absolute value, the
final threshold operation can be achieved. Robert operator calculation formula is:

$$
R(i, j) = \sqrt{[f(i, j) - f(i+1, j+1)]^2 + [f(i, j+1) - f(i+1, j)]^2}
$$

Roberts operator is composed of the following two templates:
$$ \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} $$

The Roberts operator for processing image is shown in figure 6:

<figure><img src="image_8.png" /><figcaption>Figure6 Roberts operator edge detection figure</figcaption></figure>

b) Prewitt operator edge detection

For complex images, Roberts operator cannot get better image edges, and the need to adopt more sophisticated 3 * 3 operator, can use Prewitt operator.

Is a kind of first order differential operator edge detection, using pixel point up and down, left and right neighboring points of gray level difference, at the edge

The extreme edge detection, remove part of the false edge, has a smooth function to noise. Its principle is in the image space by using two direction template and image neighborhood convolution to complete, the two direction template a horizontal edges detection, a vertical edge detection. For digital images f(x, y), Prewitt operator are defined as follows:

$$ G(i) = \left\| \left[ f(i-1, j-1) + f(i-1, j) + f(i-1, j+1) \right] - \left[ f(i+1, j-1) + f(i+1, j) + f(i+1, j+1) \right] \right\| $$

$$ G(j) = \left\| \left[ f(i-1, j+1) + f(i, j+1) + f(i+1, j+1) \right] - \left[ f(i-1, j-1) + f(i, j-1) + f(i+1, j-1) \right] \right\| $$

Then $P(i, j) = \max[G(i), G(j)]$ or $P(i, j) = G(i) + G(j)$

Prewitt operator is composed of the following two templates:
$$ \begin{bmatrix} -1 & -1 & -1 \\ 0 & 0 & 0 \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 & 1 \\ -1 & 0 & 1 \\ -1 & 0 & 1 \end{bmatrix} $$

The Prewitt operator for processing the image shown in figure 7:

<figure><img src="image_9.png" /><figcaption>Figure 7 Prewitt operator edge detection figure</figcaption></figure>

### c) Sobel edge detection operator

The size of the Sobel operator and Prewitt operator is the same size, is 3 * 3 matrix. Horizontal and vertical, respectively, with image plane convolution, can be calculated the brightness of the horizontal and vertical difference approximation. If S on behalf of the original image, $G_x$ and $G_y$ representing the longitudinal and transverse edge detection of image, its formula is as follows:

$$ G_x = \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \end{bmatrix} \quad G_y = \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \end{bmatrix} $$

Each pixel of the image of the transverse and longitudinal gradient approximation can be used in combination with the following formula, to calculate the size of the gradient.

$$ G = \sqrt{G_x^2 + G_y^2} $$

And then can use the following formula to calculate gradient direction.

$$ \theta = \arctan \left( \frac{G_x}{G_y} \right) $$
By the Sobel operator for processing the image shown in figure 8:

<figure><img src="image_10.png" /><figcaption>Figure 8 Sobel operator edge detection figure</figcaption></figure>

d) The Canny operator edge detection

Canny use of hysteresis threshold.

Hysteresis threshold need two threshold - high threshold and low threshold. Assuming that the image is the important edge in the continuous curve, so that we can track the given the fuzzy part of the curve, and there will be no composition curve to avoid the noise pixels as edges. So we start with a large threshold, which will identify real edge we're pretty sure, using the export in the direction of the information, we started from the real edge at the edge of the image tracking the whole. At the time of tracking, we use a smaller threshold, so that you can trace curve of the fuzzy part until we go back to the beginning.

Once this process is complete, we will get a binary image, each point of said is an edge point.

A achieve sub-pixel accuracy improvement implementation is in the direction of the gradient on the edge of the detection of the second order directional derivative to zero.

$$L_x^2 L_{xx} + 2 L_x L_y L_{xy} + L_y^2 L_{yy} = 0$$

Is it in the direction of the gradient direction of the third order derivative conditions meet the symbol

$$L_x^3 L_{xxx} + 3 L_x^2 L_{xy} L_{xxy} + 3 L_x L_y^2 L_{xyy} + L_y^3 L_{yyy} < 0$$

The Canny operator for processing images as shown in figure 2.6:
<figure><img src="image_11.png" /><figcaption>Figure9 Canny operator edge detection figure</figcaption></figure>

(3) image enhancement of Simulink implementation

Hd camera and remote monitoring system for video quality may not be used, so in video
image enhancement is conducive to further analysis of the image. Image smoothing to highlight
the image of wide area, the low frequency part, trunk or suppress image noise and interference of
high frequency component processing, make the image brightness flat gradient, gradient decrease
mutations, improve image quality. Image sharpening is contrary to the image smooth, used for
compensating the contour image, enhancing image edge and gray level jump part, makes the
image becomes clear. To combine two methods of processing, can improve the quality of the
image better for analysis.

a) The image binarization processing is to the point of the image gray level set to 0 or 255, or the entire image showing a clear black and white effect. About 256 brightness levels of gray image through appropriate threshold selection and can still reflect the overall image and local features of binary images.

The binary processing of image is shown in figure 10:
<figure><img src="image_12.png" /><figcaption>Figure10 Corn big spot binarization figure</figcaption></figure>

b) The original image grey value, make the black white and white black. To obtain the main visual effect is a negative effect of the image. The complementary processing of image is shown in figure 11:

<figure><img src="image_13.png" /></figure>
## 3.4 Maize **disease** image recognition experiment result analysis

For maize disease image recognition research, in view of the common disease types, this paper select maize large spot type test research, which based on Simulink platform building model, after for corn big spot image processing, using the multiple line chart comparison can obviously see the image gray level transformation, differences before and after. To gray-scale transformation technology of the processed image is direct gray-scale transformation methods, corrosion technique the processed image and corn big spot gray image to do comparative analysis, selected pixel values of 343 ~ 340 line corresponds to 122 ~ 134 columns of gray value contrast, one of the A1 is the original line 340, A2 line 340 for after processing, and so on.

Using the above methods of corn after the big spot gray level image processing, test results as shown in figure 12, shown in figure 13

<figure><img src="image_14.png" /><figcaption>Figure 12 Gray level and direct gray-scale transformation after the original image</figcaption></figure>

From the multiple line chart 3.1, using the gray scale transformation technology of direct gray-scale transformation method after processing the image grey value is decreased obviously, and reduce useless blurs the image grey value, instead, to enhance the image resolution highlighted the disease characteristics, is conducive to the identification of diseases.

<figure><img src="image_15.png" /><figcaption>Figure 13 Gray original image and the image after the corrosion</figcaption></figure>
From the point of double line chart 13, using corrosion technology processing after image
grey value increase. With direct gray-scale transformation processing figure, to the contrary, but
corrosion technology can accurately extract the characteristics of large spot disease of maize, to
facilitate the identification of diseases.

4. Results and Discussion

(1) Using the Simulink platform, the algorithm established the reorganization model of maize disease video images, improved image resolution, high lightened disease characteristics and increased the recognition rate of maize diseases.

(2) This paper fused genetic algorithms and Simulink platform effectively and built a model with remote video image analysis and classification reorganization of maize diseases. It gained the texture, color and geometry characteristics of maize diseases through field video image analysis and then established analytical model for all kinds of maize diseases. It monitored effectively the real-time video images of field diseases, processed the video image captured by sharpening, segmenting and smoothing and improved image clarity and quality; It fused genetic algorithms and Simulink platform to resolve and identify the optimal image. Results have shown that image grey scale values changes after the process of the fused optimal algorithm, high lightens the characteristics of maize diseases are high lightened, improves the recognition rate of maize disease video image remarkable and provides a valid basis for the identification and the diagnosis and treatment of maize disease.

Acknowledgments

This work was funded by the National High-Tech Research and Development Plan of China under
Grants Nos.2006AA10A309; The research and application of facilities for the safety of vegetables
production technology based on Internet of Things(2011-Z20); Special funds for grain production
development in Jilin province (an agricultural technology extension project)"research and
application of vegetable security production technology based on facilities of Internet of things
”

Reference

[1] Russ J C. The Image Processing Handbook [M]. CRC Press, 1995.

[2] H. D. Cheng, X. H. Jiang, Y. Sun, et al. Color image segmentation on: advances and prospect [J]. Pattern Recognition, 2001, 34 (7):2259-2281.

[3] Zayas I, Pomeranz Y, Lai F S. Discrimination between arthur and arkan wheat by image analysis[J]. Cereal Chemistry, 1985. 62 (2):478-480.

[4] Yutaka SASAKI, Tsuguo OKAMOTO, Kenji IMOU, ToruTOR. Automatic Diagnosis of Plant Disease [J]. Journal of JSAM. 1999. 61 (2):119-126.

[5] Yutaka SASAKI, Masato SUZUKI. Construction of the Automatic Diagnosis System of
Plant Disease Using Genetic Programming Which Paid Its Attention to Variety[C]. ASAE Meeting Presentation (paper No. 031049), 2003.

[6] El-Helly M, El-Beltagy S., and Rafea A. Image analysis based interface for diagnostic expert systems[A]. Proceedings of the Winter international symposium on information and Communication Technologies[C]. Trinity College Dublin, 2004, 1-6.

[7] Sammany, M, Mohammed El-Beltagy. Optimizing Neural Networks Architecture and Parameters Using Genetic Algorithms for diagnosing Plant Diseases[A]. Proceeding of and International Computer Engineering Conference[C], IEEE (Egypt section), 2006.

[8] Chen Jiajuan, Jishou Wen, such as automatic determination of the extent of the use of computer vision in cotton pests [J] Agricultural Engineering, 2001, 17 (2): 157-160.

[9] Huang Honghua, Cai Jianrong computer vision research to improve detection of Nosema disease [J] Jiangsu University (Natural Science), 2003, 24 (2): 43-46.

[10] Bai Jingfeng Zhao Xuezeng strong tin-rich conifer seedlings and other computer vision feature extraction [J] Northeast Forestry University, 2000, 28 (5): 94-96.

[11] it's the joy, Wu Junhui, Xu Lihong Color Image Segmentation Techniques [J] China Image and Graphics, 2005, 10 (1): 1-10.

[12] it's the joy, Xu Lihong, Wu Junhui Advances in computer vision technology in crop growth monitoring [J] Agricultural Engineering, 2004, 3 (2): 279-283.

[13] Tian Rui grapes based on machine vision automatic identification technology [J] Northeast Forestry University, 2008, V01.36 No.1: 95-97

[14] Mao Han Ping, XU Gui force, Pingping recognition Tomato Nutrient Deficiency of computer vision [J]. Agricultural Machinery, 2003, 34 (2): 73-75.

[15] Mao Han Ping, WU Xue, Li Pingping based on computer vision tomato nutrient deficiency neural network [J] Agricultural Engineering, 2005, 21 (8): 106-109.

[16] XU Gui power, Mao Han Ping, Li Pingping of Leaf color image color feature extraction [J] Agricultural Engineering, 2002, 18 (4): 150-154.

[17] Tianyou Wen, Chang-water, Chenghua Application of SVM in plant disease spot shape recognition [J] Support of Agricultural Engineering, 2004, 20 (3): 134-136.