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

HAL
open science

# Application Analysis of Machine Vision Technology in the Agricultural Inspection

Yang Yang, Yang Zhang, Tian He

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

## To cite this version:

Yang Yang, Yang Zhang, Tian He. Application Analysis of Machine Vision Technology in the Agricultural Inspection. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.316-321, 10.1007/978-3-642-18354-6_38. hal-01563488

HAL Id: hal-01563488

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

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_3.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Application analysis of machine vision technology in the
agricultural inspection

Yang Yang[1] Yang Zhang[2] Tian He[3]

College of Electrical and Mechanical Engineering, East China Jiaotong University, Nanchang,
China
[Hgxszhang@163.com](mailto:Hgxszhang@163.com)

**Abstract:** With the development of agriculture technology, people not only pay more attention to increase agricultural production, but ask more requirements for agricultural products' quality. It promotes all kinds of detection technology applied in agriculture, in which machine visual technology is used widely in the inspection of agricultural products. As the corresponding technology of new sensor is developed, machine visual technology applied in inspection of agricultural products will affect traditional inspection pattern[1]. The current status of machine visual technology applied in inspection of agricultural products will be analyzed in this text. Parts of problems in practical application will be summarized and its future develop direction will be discussed here.

**Key words:** machine visual technology, Inspection of agricultural products, application

# 1. Introduction:

China is a large agricultural country. Agriculture is paid more attention since ancient. Our ancestor has invented a lot of new ways to create the splendid agricultural civilization. With the development of agriculture technology, agricultural modernization raises new requirement for agriculture development, for which the progress of industry offer new technical support. Newly-typed agriculture has changed former whole man-made working style and promoted agriculture to develop toward automation and intelligence[2]. A workman must sharpen his tools first if he is to do his work well. To make the land a large output growth and high quality of crops, we must grasp detection. However, former traditional detection methods have not satisfied the requirement of modern agriculture, which promotes new detection technology applied. Among them machine vision technology can provide efficient and reliable products detection approach. It has prospect in many of the testing technology application in agricultural products.

# 2. Machine visual technology characteristics
## 2.1 system structure and work principle

Machine Vision actually replaces the human eye to do the measuring and judging. Machine vision system is to be up taken by the visual sensor object, which is converted into an image signal, then passed to the image processing system, according to the pixel signal distribution and collection brightness, color and other information, image signal will be converted into digital signals; system will operate the signal features and compared with the data stored in the database, then estimate and determine the relevant features of the results. Characterized increases production flexibility and automation extent, and releases people from some danger, monotony, any error in the liberation of the working environment, and easy to integrate information, easy to implement the system intelligent[3].

A typical industrial machine vision systems including: lighting (Halogen light, LED light source, high frequency fluorescent source, flash source, other special light source), optical lens (CCT camera, microscope head), cameras, image processors, image video capture card, image processing software, monitors, communication / input and output units and so on. The working requirements of machine visual are as follow. One hand, lighting is the key factor to effect the input of machine visual system, which influences the quality of imaging machines and application effect. How to make the light stable in a certain extent is the problem to need to resolve in practical process. On the other hand, ambient light might affect the quality of the images, so adding protective screen is used to reduce the effect of the environmental impact of light. And the requirements of industrial lens: (1) the focal length (2) Target height (3) Image height (4) amplification factor (5) the distance to the target image (6) center/node (7) distortion; According to the different application condition, different resolution cameras are chosen, photographic equipment of different camera. A video capture card is only one component of completed machine vision system, which should be selected according to the interface requirement of camera. Visual processor is the combination of capture card and processor. The processing ability of computer was weak in the past time. It usually needs visual processor to accelerate visual processing tasks. Video capture card now images can be quickly transmission to memory, and computer image processing capacity has greatly improved, so now generally use general-purpose processors and processing software can be realized, the working principle of machine vision as shown in figure 1.
<figure><img src="image_4.png" /><figcaption>Figure 1. Current analysis of agriculture products inspection</figcaption></figure>

## 2.2 The advantages of machine vision

(1) High precision: such measurements do not need to touch, so there is no dangerous and wear on the fragile parts.

(2) continuity: visual system make people suffer from fatigue. Multiple systems can be set to run separately.

(3) cost-effective: With the sharp decline in the price of the computer processor, the visual system operating and maintenance costs are much low.

(4) Flexibility: the visual system can carry out a variety of measurement. When the application changes, the softwares change or simply up grade to meet the new demands.

Machine vision systems have better adaptability than optical sensors or machines. They enable automatic machines to have the diversity, flexibility and reconfigurability. When you need to change the production process, on machine vision for the "tool to replace" just change the software, not to replace expensive hardware. When the reorganization of the production line, visual system often can be reused.

## 3. Currently the main agricultural products inspection includes safety, quality and quantity inspection.

The main agricultural products safety inspection is mainly on pesticide residue (organophosphorus pesticide and carbamate, chrysanthemum ester) and veterinary drug residue (malachite green and nitrofuran, sulfa, chloramphenicol), prohibited additives (lenobuterol hydrochloride, shrek dopamine), the harmful elements (arsenic, the cadmium, lead, mercury), to ensure its safe to eat. The main products quality inspection aims at crop appearance, YanZe, brix, acidity, soft pulp and external damage, the internal defects, grotesque, nutrition, etc chemical index physical
parameters testing. The detection rate of agricultural products mainly guarantee for
high quality and high value-added products, good technical level is the main high-tech
agricultural, have very good market prospect. Agricultural production testing mainly
tells from agricultural economic benefits on macroscopic.

As an important test of agricultural products, a link to the quality inspection is to guarantee the international competitiveness of agricultural products in the market at home and abroad, the important research institutions and equipment manufacturers all focus on the research of this field. In the early time, applying machine visual technology on the research of agriculture products quality has started abroad. Good effect has got in fruits, vegetables and quality detection, which achieve intelligent degree. Detected in the fruit, In 2001, DM Bulanon invented apple picking machine such as hand-machine vision navigation system, analyzed the brightness of the apple and red color difference histograms, guessed the ultimate classification of image segmentation threshold Apple value using the best way. In 2002, Zhao Yan, such as virtual instruments such as basis, pears were detected using machine vision technology pilot study of external quality. Detected in vegetables, in 2004, K. Ninomiya and so developed a three machine vision system consisting of eggplant automatic classification system. In 2004, Zhang Yane machine vision technology for applications such as diagnostic method of nutritional status of greenhouse crops[4]. In 2005, Wang Shuwen such comprehensive use of computer vision technology, BP algorithm, the image of the characteristics of tomato, by eight characteristic parameters of BP algorithm using the new multi-layer feed forward neural network to classify the damage on the tomato.

4.Machine Vision in Agricultural Products of the specific applications

## 4.1 Investigation on grading of Machine vision to the apples’ non-destructive testing

In 1986, U.S. scientists used surface crushing machine vision inspection of apples, while Apple's standards based on their classification, was developed using machine vision to defect detection and classification of apple processing equipment, and verify that the machine vision technology used for the feasibility of damage detection of fruit grading. Current nondestructive testing machine vision fruit grading methods are mainly the following aspects[5]. People using computer vision technology to detect bruising of fruit, according to fruit shape and characteristics of bruising bruising area of measurement established a mathematical model in order to achieve detection of fruit bruising; people use machine vision to the image shadow correction and image segmentation, for no apparent edge of the scratch using near-infrared image recognition; people first use of computer graphics technology for automatic detection of decayed fruit and fruit surface color distribution on the fractal dimension of research.
## 4.2 Color Machine Vision Inspection and Grading applications for agricultural products

The color of agricultural products is one of the important signs of quality. It can tell the fruit ripeness, growth, colour and lustre, etc accurately by machine visual technology. Color test application of general use outdoor natural classification under the condition of the images filmed crops and establish a brightness color information using color information of color image recognition of crop model; It can also use indoor machine vision system for agricultural products, fruit color images in the analysis of the characteristics of agricultural products based on color, with appropriate hue under shaded area percentage of total value of classification method of color.

## 4.3 Applications in the agricultural shape size detection grading

Agricultural appearance not only can affect the size of its appearance and size of the agricultural growth of judgment and knocked wounded and defects, is now in the detection of popular agricultural research direction. Testing analysis of agricultural system mainly includes machine vision hardware platform and software[6]. The processing software flowchart analysis mainly include the following: image input, image preprocessing, feature extraction and recognition, output four varieties. As figure2 shows, test process is an important link of us to the original image acquisition process, including the grey-scale conversion and threshold image analysis is specified approach is analyzed, the contour of key products. Size shape, The work is mainly based on the gray image processing and database are calculated or image data were compared, and the shape and size of agricultural products to analyze the results. In the field of strong LabVIEW test data acquisition, also it for most function of support, good camera with its Vision of visual development module, a method can realize many functions. Therefore we used with mathematical tool calculates LabVIEW Matlab joint development of realizing detection image analysis. Another part of using VC++ series image processing software development, the industrial production manufacturers are given camera VC setups. There are many open-source library's support, such as OpenCV OpenGL, etc., and its weakness is ShouMan, programming, slightly complex maintenance etc[3].
<figure><img src="image_5.png" /><figcaption>Figure 2 detection flowing chart of agricultural products'dimensions</figcaption></figure>

5. Existing problems and the development trend

(1) The agricultural research is static or slower. The accuracy of detection is low generally. To extract useful information from rapid movement of agricultural products, to strengthen the multi image processing method and the hardware structure of identifying algorithm is the main direction of future research in order to solve the problem of low detection and accuracy in existing research[7].

(2) The testing technology combined with nearly infrared technology, technology and image processing GLS, which is used to form a composite products quality inspection and grading and agricultural growth analysis related aspects of the automation management[7].

(3) Computer image processing technology is applied in agricultural grading test research in domestic later than in overseas. There is a large disparity between domestic and overseas whether on hardware or on software. We need references based on the international newest research, to explore the new theory and method, suitable for China's national conditions of agricultural products in automatic detection system, improve the level of agricultural modernization.
References:

1. Ping Li, Junyan Zhu, Yande Liu, Linyuan Yan: Application and Developing Trend of Computer Version Technology in Detection and Classification of Agricultural Products. Acta Agriculturae UniVersitatis Jiangxiensis (2005). ( In Chinese)

2.Ming Hao, Shuoshi Ma: Machine vision based quality inspection of potato. Potato Research Single. Agricultural Research(2009). ( In Chinese)

3. Honghui Rao: Rice seeds based on machine vision Quality Inspection Machine. Agricultural Research.(2009). ( In Chinese)

4.Xiangbo Han, Zhangli Liu: Computer image processing technology in the Inspection and Grading of agricultural products. Journal of Anhui Asri. (2007). ( In Chinese)

5. Yongping Huang, Chenghui Hui: Computer Vision in agricultural products detection. Guangxi of Tropical Agriculture.(2007). ( In Chinese)

6. Xiao Liu, Hong Li: An Improved Color Image Segmentation Algorithm Based on Wavelet Denoising and Regional Growth. Mechatronics.(2009). ( In Chinese)

7. Jinhua Cai: Research and Application of Relative Algorithms in Real-time Automatic Vision Inspection System. Dissertation Submitted to Zhejiang University for the Degree of Doctor of Philosophy.(2005). ( In Chinese)