Professional Documents
Culture Documents
Subo Tian1, Zifan Wang1, Jifeng Yang1, Zichen Huang1, Ruili Wang1,
Liping Wang2 and Jianghui Dong3
Abstract
In this study, a visual grading system of vegetable grafting machine was developed. The study described key technology of
visual grading system of vegetable grafting machine. First, the contrasting experiment was conducted between acquired
images under blue background light and natural light conditions, with the blue background light chosen as lighting source.
The Visual C++ platform with open-source computer vision library (Open CV) was used for the image processing.
Subsequently, maximum frequency of total number of 0-valued pixels was predicted and used to extract the measure-
ments of scion and rootstock stem diameters. Finally, the developed integrated visual grading system was experimented
with 100 scions and rootstock seedlings. The results showed that success rate of grading reached up to 98%. This shows
that selection and grading of scion and rootstock could be fully automated with this developed visual grading system.
Hence, this technology would be greatly helpful for improving the grading accuracy and efficiency.
Keywords
Visual grading system, vegetable grafting machine, machine vision, grafting machine, image processing
Creative Commons CC-BY: This article is distributed under the terms of the Creative Commons Attribution 3.0 License
(http://www.creativecommons.org/licenses/by/3.0/) which permits any use, reproduction and distribution of the work without
further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/en-us/nam/
open-access-at-sage).
2 Advances in Mechanical Engineering
plants must be classified so that the same size of seed- seedlings grafting. The main objectives of this study are
lings can be placed properly in contact with each other as follows: (1) to design an automatic visual grading
in the process of grafting. In this way, it can reduce the system which will include image acquisition module,
organizations bare area and loss of tissue fluid, and image processing module, and control module; (2) to
also survival rate of the grafted seedlings can be choose appropriate light sources in the image acquisi-
guaranteed. tion module; and (3) to conduct grading test of musk-
Machine vision is widely used in many fields, such as melon scions and rootstocks using the automatic visual
industrial, animal husbandry, fisheries, agriculture, and grading system.
horticulture. In recent years, the applications of
machine vision have been deeply studied in various
fields, for instance, in grading of panel surfaces,3 high Materials and methods
temperature measurements of surface properties,4 auto- Experimental equipment
matic grading system for fresh fruits, vegetables, areca
nuts, eggs, and others.513 Moreover, researchers in The experimental equipment includes a light source
recent have presented some algorithms for processing device, PC computer, and DaVinci image processing
images, which is the core of machine vision.1417 kit model (EL-DM6437; produced at Beijing DaSheng
Ebrahimi et al. presented the image processing algo- Precision Instrument Co., Ltd). A blue light-emitting
rithms in many research fields. The main algorithm diode (LED) panel backlighting was used as an illumi-
includes color space conversion, gray-scale transforma- nation source with three strength grades, that is, high,
tion, image binarization, noise smoothing, and mor- medium, and low. In this experiment, the blue LED
phological operations.1822 The machine vision system panel backlighting strength was adjusted to medium
of automatic grafting machine has still many shortcom- grade from the light source controller and obtained
ings, and many problems are unsolved like lower accu- luminous flux of 1000 lumens.
racy. Different algorithms of image processing The DaVinci kit consists of image capture card,
technology have been adopted in many fields, for exam- color digital camera, lens, and image processing soft-
ple, support vector machine (SVM).15,19,21 Although ware. The camera has focal length with a range of
these algorithms can distinguish the characteristics of 3.985.8 mm, a charge-coupled device (CCD) image
measured object in detail, the calculation process is too sensor chip with size ratio of 1/1.6 in (7.2 3 4.8 mm),
complex, so it is not suitable for grading characteristics and lens with diameter of 46 mm. The PC is a Lenovo
extraction of grafting seedling. Furthermore, because desktop with good laboratory performance and has
of the variety of each seedling, those algorithms are not Window XP operating system, an i5 3.20 GHZ CPU
accurate in grading seedlings for some machine vision processor, and 1 TB hard disk with 4 GB memory.
system. Also a comparison of natural and artificial light Experimental parameters considered, which are the
source has not been reported.1,23,24 For this reason, it is same with that of camera calibration, are as follows:
important and necessary to develop the simple and distance between camera lens and seedling (190 mm),
practical visual grading system for the muskmelon distance between blue background light source and
grafting machine. seedling (70 mm), image distance (13.82 mm), focal
Currently, semi-automatic grafting machines have length (12.88 mm), and image resolution acquisition
been developed, while the fully automatic grafting (720 3 480 pixels).
machines are still in development process.2325 On com-
parison, a fully automatic grafting machine is supposed The automatic visual grading system for grafting
to have higher grafting requirement than semi-auto-
matic. For instance, the diameter of rootstocks and
seedlings
scions should be the same. Therefore, the fundamental The automatic visual grading system for this work con-
requirement of the fully automatic machine is to use sists of three modules: the image acquisition module,
the machine vision technology for grading seedling. image processing module, and control module
However, the human identification for grading of root- (Figure 1(a)(c)).
stocks and scions is labor-intensive and has a low graft- The image acquisition module was used to obtain
ing efficiency. This will greatly decrease the survival digital images of the target seedling, and it is composed
rate. In previous studies, most designs are to use sun- of light source, EL-DM6437 image processing kits, and
light, but sunlight has a strong instability. It will change image acquisition card (Figure 1(a)). First, the light
with time or weather change. In that way, the sharp- source produces blue LED background light and the
ness, contrast, brightness, and other factors of the color camera captures image of seedling under the blue
taken out image will be greatly affected. LED background light conditions. The image acquisi-
The aim of this study is to develop an automatic tion card stored the image data and output them to the
visual grading system of vegetable grafting machine for processing module.
Tian et al. 3
Figure 1. Procedure of visual grading system, (b) image acquisition and processing module, and (c) control module.
4 Advances in Mechanical Engineering
Level A B C D
Diameter range of muskmelon 2.06 < d1 \2.61 2.61 < d1 < 3.16 3.16\d1 < 3.58 d1 \2.06 or d1 . 3.58
scion seedling stem d1 (mm)
Pixel range of muskmelon scion 15 < n1 \19 19 < n1 < 23 23\n1 < 26 n1 \15 or n1 . 26
seedling stems n1 (pixel)
Diameter range of pumpkin 3.30 < d2 \3.71 3.71 < d2 < 4.13 4.13\d2 < 4.54 d2 \3.30 or d2 . 4.54
rootstocks seedling stem d2
(mm)
Pixel range of pumpkin 24 < n2 \27 27 < n2 < 30 30\n2 < 33 n2 \24 or n2 . 33
rootstocks seedling stems n2
(pixel)
2. Image preprocessing.
accumulation in different columns of the stem in the was approximately found to be 130, whereas the gray
seedling image. The part above point A represents the value of the background was approximately 180, show-
accumulation of leaf crown. The part below point B ing a difference of nearly 50. The gray value of musk-
represents the accumulation of the number of the pixels melon seedlings in blue background light was
of the seedling pot or the cultivate soil. Find the value concentrated at 40, but its background gray value was
with a largest frequency of occurrence within section up to 180, showing a large difference.
AB, which represents the number of the pixels of the From this experiment, the contrast of the blue back-
seedlings diameter. ground light was obtained to be better than the contrast
If section AB could be found approximating a of the natural light condition, so the scheme used in this
straight line with certain length (more than 100 pixels), study incorporates the blue background light.
the classification is successful. Otherwise, the classifica-
tion failed. Then based on the standard of classifica-
tion, if the cumulative sum of the number of the pixels Seedling grading
whose gray value is zero is from 15 to 26, the grafted The automatic grading system of grafted seedlings from
seedling is qualified. And then calculate the cumulative the muskmelon grafting machine is based on the
sum of the number of the pixels whose gray value is machine vision system. The grafted seedlings include
zero with a largest frequency of occurrence. With this the muskmelon scion seedlings and pumpkin rootstock
cumulative sum, the diameter of the seedling can be seedlings. The grading method of the muskmelon
easily calculated. Finally, the diameter is used to judge scions and pumpkin rootstocks is similar, so this
the level of a seedling. experiment only used muskmelon scion seedlings to
verify the grading.
Rows present eight different images of seedling.
Results Seedlings 16 are examples of successful grading, and
Light source selection seedlings 7 and 8 are examples of unsuccessful grading.
Three columns display the processing steps of the same
In this study, the natural light and blue light were used image, that is origin color image, smoothing image,
as lighting source. The contrast effects are shown in and morphologic processing.
Figure 5. Figure 7 shows the series of processing steps of suc-
Based on the processing in Figure 5, the gray value cessful and unsuccessful grading examples of muskme-
curve of the cutting point of grafted muskmelon seed- lon scion seedlings. Seedlings 16 are examples of
lings in the horizontal direction could be obtained, and successful grading, and seedlings 7 and 8 are examples
the results are shown in Figure 6. The gray value of of unsuccessful grading. The results of classification are
muskmelon seedlings under natural light conditions shown by the curves in Figure 8. From the curves of the
first seedling to the sixth seedling, section AB can be
found to approximate the straight lines which represent
the cumulative sums of the number of the pixels in the
different heights of the stems whose gray value is zero.
Then, the values between sections A and B with the
largest frequency of occurrence can be found, and the
diameters of the stems can be calculated. While it can- muskmelon scion seedling stem diameter was manually
not be found that section AB approximates the straight inspected to judge whether the grading system was cor-
line from the processed result curves of the seventh and rect. The automatic grading process of the 100 musk-
the eighth seedlings. So the number of the pixels which melon scion seedlings and 100 pumpkin seedlings used
represents the diameter cannot be confirmed, as well as the same operation. According to the grading criteria,
the diameter of the seedling cannot be calculated. As a 100 muskmelon scion and 100 pumpkin rootstock seed-
result, the classifications of the seventh and the eighth lings were counted, and the results of the automatic
seedlings are failed. grading are shown in Figure 9. From Table 2, the num-
After automatic grading by visual system, the seed- ber of various grades of muskmelon scion seedlings
ling level was verified and the corresponding and pumpkin rootstock seedlings are basically the
Tian et al. 9
Table 2. The comparison of the system grading results and manual grading.
No. Experimental results (mm) Manual measurement values (mm) Size error % Grading level Grading results
6. Al Ohali Y. Computer vision based date fruit grading 16. Wu Y, Li D, Li Z, et al. Fast processing of foreign fiber
system: design and implementation. J King Saud Univ: images by image blocking. Inf Process Agr 2014; 1: 213.
Comp Inf Sci 2011; 23: 2936. 17. Zhang D, Lillywhite KD, Lee D-J, et al. Automatic
7. ElMasry G, Cubero S, Molto E, et al. In-line sorting of shrimp shape grading using evolution constructed fea-
irregular potatoes by using automated computer-based tures. Comput Electron Agr 2014; 100: 116122.
machine vision system. J Food Eng 2012; 112: 6068. 18. Liming X and Yanchao Z. Automated strawberry grad-
8. Huang K-Y. Detection and classification of areca nuts ing system based on image processing. Comput Electron
with machine vision. Comput Math Appl 2012; 64: Agr 2010; 71: S32S39.
739746. 19. Mizushima A and Lu R. An image segmentation method
9. Makky M and Soni P. Development of an automatic for apple sorting and grading using support vector
grading machine for oil palm fresh fruits bunches (FFBs) machine and Otsus method. Comput Electron Agr 2013;
based on machine vision. Comput Electron Agr 2013; 93: 94: 2937.
129139. 20. Ebrahimi E, Mollazade K and Babaei S. Toward an auto-
10. Omid M, Soltani M, Dehrouyeh MH, et al. An expert matic wheat purity measuring device: a machine vision-
egg grading system based on machine vision and artificial based neural networks-assisted imperialist competitive
intelligence techniques. J Food Eng 2013; 118: 7077. algorithm approach. Measurement 2014; 55: 196205.
11. DeCost BL and Holm EA. A computer vision approach 21. Kurtulmusx F and Kavdir I. _ Detecting corn tassels using
for automated analysis and classification of microstruc- computer vision and support vector machines. Expert
tural image data. Comp Mater Sci 2015; 110: 126133. Syst Appl 2014; 41: 73907397.
12. Saad FSA, Ibrahim MF, Shakaff AYM, et al. Shape and 22. Manickavasagan A, Al-Mezeini NK and Al-Shekaili HN.
weight grading of mangoes using visible imaging. Comput RGB color imaging technique for grading of dates. Sci
Electron Agr 2015; 115: 5156. Hortic 2014; 175: 8794.
13. Nandi CS, Tudu B and Koley C. A machine vision-based 23. Cui Y, Wang X, Xu L, et al. Automatic detection for
maturity prediction system for sorting of harvested man- external features of grafting seedlings based on machine
goes. IEEE T Instrum Meas 2014; 63: 17221730. vision. Nongye Jixie Xuebao/T Chinese Soc Agr Mach
14. Barbedo JGA. Using digital image processing for count- 2014; 45: 8995.
ing whiteflies on soybean leaves. J Asia-Pacific Entomol 24. Zhang L, He H and Wu C. Vision method for measuring
2014; 17: 685694. grafted seedling properties of vegetable grafted robot.
15. Sun C, Liu T, Ji C, et al. Evaluation and analysis the Nongye Gongcheng Xuebao/T Chinese Soc Agr Eng 2015;
chalkiness of connected rice kernels based on image pro- 31: 3238.
cessing technology and support vector machine. J Cereal 25. Chen S, Chiu YC and Chang YC. Development of a
Sci 2014; 60: 426432. tubing-grafting robotic system for fruit-bearing vegetable
seedlings. Appl Eng Agr 2010; 26: 707714.