You are on page 1of 12

Research Article

Advances in Mechanical Engineering


2017, Vol. 9(1) 112
The Author(s) 2017
Development of an automatic visual DOI: 10.1177/1687814016686265
journals.sagepub.com/home/ade
grading system for grafting seedlings

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

Date received: 15 April 2016; accepted: 3 December 2016

Academic Editor: ZW Zhong

Introduction manual grafting.2 Furthermore, for most automatic


grafting machines, the grafting speed can reach up to
Grafting is a technique whereby branches or buds from 600 seedlings per hour. However, since the machines
one plant are inserted into the appropriate parts of still require auxiliary manual work, they can only
another plant that has a strong affinity. A branch or achieve a semi-automatic status. The scion and stock
bud to be cultivated (i.e. scion) is encouraged to fuse or
graft onto a strong vital plant (i.e. rootstock) so that
the scion can grow, blossom, and bear fruit using nutri- 1
College of Engineering, Shenyang Agricultural University, Shenyang,
ent soil. Grafting technique can reduce soil-borne dis- China
eases, enhance stress resistance, increase yield and fruit 2
Sansom Institute for Health Research, School of Pharmacy and Medical
quality, and has no effect on the plant quality.1 Sciences, University of South Australia, Adelaide, SA, Australia
3
Currently, the grafting technology is rapidly developing School of Natural and Built Environments, University of South Australia,
Adelaide, SA, Australia
over the world in order to adapt to the needs of agricul-
tural production. At the same time, grafting robot tech- Corresponding authors:
nology has been developed. Some semi-automatic Ruili Wang, College of Engineering, Shenyang Agricultural University,
grafting robots have been developed and commercia- Shenyang 110866, Liaoning, China.
lized for cucumber, tomato, and watermelon in Japan, Email: wangruili@syau.edu.cn
South Korea, the Netherlands, and China. In these Jianghui Dong, School of Natural and Built Environments, University of
countries, the working efficiency of semi-automatic South Australia, Adelaide, SA 5001, Australia.
grafting robots is three times faster than the traditional Email: jianghui.dong@mymail.unisa.edu.au

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

Table 1. The size conversion chart for the grading levels.

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)

The image processing module, which includes both


hardware and software, was used to translate the image
data into grading information as shown in Figure 1(a)
and (b). The module has basically four key techniques:
image preprocessing, extracting image feature, analyz-
ing grading information, and outputting grading infor-
mation. After image processing, grading information
were obtained and sent to the control module.
Figure 2. Measurement results of 100 muskmelon scion
Control module of the visual grading system was seedlings and 100 pumpkin rootstock seedlings: (a) muskmelon
used to drive motors and actuators to conduct the seedlings and (b) pumpkin seedlings.
seedling grading. It is made up of control system
and actuator. The control system composed of
microcontrollerprogrammable logic controller (PLC), sources. Finally, the optimal light source type and light-
input/output (I/O) Relay Board, light-electric sensor, ing system will be obtained.
limit switch, and electric motor (Figure 1(c)). The micro-
controllerPLC is the key component, and it received
grading information of the target seedling which was Technology of the vision grading system
changed to different grading levels. Then the electric Seedling grading. The experimental samples used are two
motors drive the mechanical system and transport the plug trays (5 3 10 points) of muskmelon scion seed-
graded seedling to the designed position. lings and two plug trays (5 3 10 points) of pumpkin
Ashraf et al. tested and compared the effect of blue, seedlings. The vegetation period of muskmelon and
red, and white background light sources in grafting pumpkin is 15 and 7 days, respectively. Corresponding
seedling visual grading system. The results showed that stem diameters of muskmelon scion and pumpkin root-
in order to obtain best contrast ratio, the blue back- stock seedlings were manually inspected, and seedling
ground light source was found superior to other color level was determined.
light sources. However, this work compared the blue Seedling stems of 100 muskmelon scions and 100
background light with natural light in order to achieve pumpkin rootstocks were measured to obtain the distri-
the lowest cost. Selecting a light source should comply bution of the stem diameter sizes, as shown in Figure 2.
with the rules of stability and should provide uniform The range of muskmelon scion seedling stem diameter
illumination and avoid reflections.1 There are no gen- is 2.103.60 mm, and that of pumpkin seedling root-
eral light sources for different targets, but to obtain an stock diameter is 3.254.60 mm.
optimal light source and lighting system, it is necessary Based on the stem diameter ranges, muskmelon
to perform numerous experiments according to the pro- scion seedlings and pumpkin rootstocks seedlings were
fessional experience of researchers. Accordingly, first, divided into four grades. Table 1 shows the different
the requirements for lighting system and size of the levels corresponding to the pixel range and grade of
light source can be determined based on the project tar- stem diameter range for muskmelon and pumpkin.
get. Second, characteristics of the target, such as mate- From Table 1, the levels of A, B, C, and D
rial, shape, and color, should be determined based on were determined by the grading criteria. Accordingly,
the recommended theoretical knowledge. Third, a light A level represents the grafted stem of a small diameter,
source must be selected according to project require- B level represents the grafted stem of a medium-sized
ments and the binding properties of different light diameter, C level represents the grafted stem of bigger
Tian et al. 5

2. Image preprocessing.

Image preprocessing mainly includes four parts, that is,


gray-scale transformation, binary image processing,
noise smoothing, and morphological closing operation.
The preprocessing analysis includes image processing
and obtaining information about the diameter of the
muskmelon scion seedlings.

 Gray-scale transformation. To facilitate image


processing and analysis, the color images are
usually converted into gray scale. In a gray-scale
image, the gray values of the pixels are repre-
sented by one byte. Gray value ranges from 0 to
255. The smaller value of the point is, the
blacker and darker the point is. The greater
value the point, the whiter and lighter the point.
Namely, 0 represents the darkest, 255 represents
Figure 3. Flow chart of seedling grading procedure. the brightest, there is no color information after
the conversion containing only luminance
diameter, and the D level represents the grafted stem of information.
failed grading seedlings, with diameters that are either  Binary processing. Binarization is to set the gray
too large or too small. value pixel image 0 or 255, namely, to show the
visual effect of only black and white. In this arti-
cle, there are obvious differences between the
Procedure of seedling grading. The procedure of seedling image and the background image of grafted
grading includes four key technologies. They are image seedlings, and the image needs binarization
acquisition, image preprocessing, feature information processing.
extraction, and seedling grading (Figure 3). First, con-  Image smoothing. In this article, the main image
trol actuators grabbed the seedlings and put them to consists of pulse noise (salt and pepper noise),
the specified photo location. To ensure that every indi- and the detail of the image is not too much, so
vidual operation was not affected by the immediate removing pulse noise by smoothing processing.
past operations, the system was initialized before the Using the median filter for image operations is
procedure of image acquisition. After image acquisi- an effective mean to suppress noise, especially
tion, the acquired image was transferred to the process- for pulse noise with black and white dots super-
ing unit. Also, to ensure that next steps become easier imposed on the image. The basic principle of
and images are more obvious, the image was extracted. median filtering is first sorting all the pixels in a
Consequently, after preprocessing, information on neighborhood of one pixel in accordance with
seedling stem diameter features is extracted. Finally, the gray value and then selecting the median
classification operations are performed in accordance arrangement to replace the gray values of sur-
with the standard of given grade seedlings. However, rounding pixels with large difference in gray.
the second individual plant seedling will not be pro-  Morphological closing operation. Morphological
cessed until the first one is completed. In this way, the closing operation includes first dilating the bin-
grading of whole batch of grafting seedlings is ary image, and then doing erosion operation for
completed. the processed image. Closing operation can inte-
grate thin holes and narrow gaps in image and
1. Image acquisition. eliminate tiny edges irrelevant to the target. It
makes the contour lines of the target in binary
First, the muskmelon and pumpkin seedling images image to become much smoother.
were obtained using the image acquisition unit. The
muskmelon scions and pumpkin rootstocks were
graded and sent to the designated location in visual 3. Feature information extraction.
grading system by grafting machine. Image processing
suite of the image acquisition unit acquires images of To distinguish the pixels between the target and back-
the seedlings, and the images were sent to the process- ground, the pictures need to first pass the threshold of
ing unit via the image capture card. transformation and then split the image according to
6 Advances in Mechanical Engineering

the threshold value. The pixel is considered to be part lk 7:2 3 13:75


lpixel = = = 0:1375 mm=pixel 1
of the background if the value is greater than or equal N 720
to the predetermined threshold value; otherwise, it is T = nlpixel = 0:1375 n 2
considered the target. It is easy to obtain better results
when the target and the background pixels have a sig- X
W 1
n= f (x, y), y = 0, 1, 2, . . . , H  1 and f (x, y) = 0
nificant difference. After choosing a proper threshold
x=0
value, a muskmelon scion seedling can obtain the
3
threshold value.
The grafting positions of seedlings are on the main where lpixel is the actual size of the seedlings that every
stems, so the standard of grading is in accordance with pixel represents in the horizontal direction (mm), so the
the diameter of the main stem. This study designed a actual size of one pixel is 0.1375 mm; l is the horizontal
relatively simple method of calculation, which mainly size of the camera image sensor chip (mm); N is the
based on the number of pixels of the stem. It uses the total number of horizontal pixels; T is the actual size of
cumulative number of 0-valued pixels across the hori- the seedling stem diameter (mm); n is the total number
zontal direction in each row and then determines the of pixels occupying somewhere in the seedling stem dia-
maximum frequency of the total number of 0-valued meter across the horizontal projection; f(x, y) is the
pixels in all rows. When the maximum frequency is transformed gray value of a pixel at point (x, y); W is
greater than or equal to the minimum height of the stem the width of the picture; and H is the height of picture.
(100 pixels) on behalf of the pixel values, the highest fre- The key of grading is information extraction, and
quency occurs, and the total number of pixels indicates the specific process is shown in Figure 4. The numbers
the required stem diameter. Based on the former analy- of all the 0-gray-value pixels in each row are added up
sis, the actual size of each pixel has been known, so the after preprocessing seedling images. The maximum fre-
diameter of the muskmelon seedlings stem could be quency of 0-gray-value pixels accumulation can accu-
calculated. rately show the size of diameter. The accumulation
Finally, the seedling stem diameter is calculated curve of 0-gray-value pixel numbers in each row is
according to the number of 0-valued pixels; this method shown in Figure 4 for processed image of one seedling.
is shown as follows The line AB represents the 0-gray-value pixels

Figure 4. Information extraction procedure for stem diameter.


Tian et al. 7

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

Figure 5. The acquired images under blue background light


and the natural light conditions: (a) color image with acquisition
conditions of a light blue background, (b) color image collected
under natural light conditions, (c) color image to gray image
with a light blue background, and (d) color image to gray image Figure 6. The variation curve of the gray values along the
under natural light. X-axis at the cutting point.
8 Advances in Mechanical Engineering

Figure 7. Examples of processing grading seedling.

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

Figure 8. Curves of grading seedling.

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

1 3.025 3 0.83 B Success


2 2.8875 2.85 1.32 B Success
3 2.8875 2.9 20.43 B Success
4 3.3 3.25 1.54 C Success
5 2.8875 2.95 22.12 B Success
6 3.1625 3.15 0.40 C(B) Success
7 2 2.9 2 B Failed
8 2 2.2 2 A Failed
10 Advances in Mechanical Engineering

obvious, and the image was much easier to deal with.


In this study, the process of image classification and the
algorithm of seedling grading were described in detail.
The algorithm used is not only simple, but also fast
with high accuracy. It does not only shorten the run-
ning time but also greatly improve the success rate of
the grading; consequently, it laid a solid foundation for
fully automated grafting machine.
It has remained a great challenge to design a simple
and practical visual grading system. To solve this prob-
lem, one possible way is to establish hardware and soft-
ware system of grading system for grafting machine. In
recent years, the computer vision technique is becoming
Figure 9. The statistical diagram of the grading for 100
muskmelon seedlings and pumpkin seedlings. one of the main methods to study grading in industrial,
animal husbandry, fisheries, agriculture, horticulture,
same. Part of the muskmelon scion seedlings automatic and other fields. In fact, the algorithms can distinguish
grading results was compared with the manual mea- the characteristics of the measured object in detail.
surements shown in Table 2. However, the calculation process is too complex. Thus,
The results of the contrast test between the measur- it is not suitable for the grading characteristics extrac-
ing diameter by hand and the classification with the tion of grafting seedling. Furthermore, because of the
machine vision with 100 muskmelon scion seedlings variety of each seedling, some algorithm is very simple
and pumpkin rootstock seedlings are shown in and the results are not accurate in grading seedlings, so
Figure 9. In the result of the measuring diameter by it is difficult to achieve grafting seedling grading.
hand, the number of A level of the seedlings is 22, B Therefore, the simple and practical visual grading sys-
level is 60, C level is 15, and D level is 3. While the tem for the muskmelon grafting machine was put
result of the classification with the machine vision forward.
shows that the number of the A level of the seedlings is In this study, the key techniques were developed to
achieve grading information with the visual grading sys-
21, the B level is 59, the C level is 16, and the D level is
tem. First, after comparisons of background light and
4. And the success rate of the classification is 97%
natural light conditions, the blue background light
(because of the systematic error, the automatic grading
was chosen as the lighting source. Second, the algo-
results of which are the C level, but the manual mea-
rithm of the maximum frequency of the total number of
surement grades it as the B level, the graded result is
0-valued pixels was studied, and pixel measurements of
shown in No. 7 of Table 2). The reason leading to the
the scion and rootstock stem diameters were extracted.
classification failure is the stem was blotted out by
Finally, the contrasting experiments of manual and
the leaves, so the diameter cannot be determined. The
automatic grading were conducted. The results showed
result of the other 100 seedlings is shown in Figure 9.
that visual system meets the design requirements.
Therefore, the success rate of this system on the
From experimental results of Figures 8 and 9, it can
muskmelon and pumpkin seedling grading success rate
be found that the maximum frequency of the total
achieved ;97% and 98%, respectively, and the mea-
number of 0-valued pixels each row is the stem dia-
surement results are basically consistent with the man-
meter of scion and rootstock. The theory of character-
ual measurement results, with a grading error of
istic curve in Figure 8 is using the feature of the stem
between 22.3% and 2.3%, and an average grading
diameter of muskmelon scion for grading. After image
error of 20.57%, which meets the requirements of
acquisition and binary image processing, the number of
design.
all the 0-gray-value pixels in each row is added up.
Finding the maximum frequency of the 0-gray-value
Discussion pixels accumulation is a more accurate method to cal-
culate the size of stem diameter. From the curves of the
In this study, some practical operations of the different first seedling to the sixth seedling, it can be found that
kinds of light sources were conducted and a mass of section AB approximates the straight lines which repre-
images was acquired. The designation of light source sent the cumulative sums of the number of the pixels in
determined the significant degree of target objects in the different heights of the stems whose gray value is
the image. Therefore, the extraction of further informa- zero. Then, the values between section AB with the
tion becomes much easier in the process of image pro- maximum frequency of occurrence can be found, and
cessing. After using the best illumination, the acquired the diameters of the stems can be calculated when each
images were clearer, the target characteristics are more pixel points have been known, which represent the
Tian et al. 11

actual image size. The part ahead point A represents Conclusion


the cumulative sum of the number of pixels of the leaf
In this study, the comparative analysis of a vegetable
crown whose gray value is zero. The part below point
grafting machine and machine vision technology in
B represents the cumulative sum of the number of the
agricultural production was conducted. This study can
pixels of the seedling pot or the seedling cultivates soil
identify that the blue light illumination can be used to
whose gray value is zero. If section AB could be found
capture the best images, based on machine vision and
approximating a straight line with certain length (more
image processing theory. Furthermore, the image pro-
than 100 pixels), the classification is successful.
cessing and corresponding algorithms were designed
Otherwise, the classification is failed. Based on the
and developed using vision system software with Open
standard of classification, if the cumulative sum of the
CV image and video libraries on a Visual C++ pro-
number of the pixels whose gray value is zero is
gramming platform.
between 15 and 26, the grafted seedling is qualified.
For 100 seedlings, an automatic grading test was
And then the accumulation of the number of the pixels
conducted based on a machine vision muskmelon scion
can be calculated, the gray values of the pixels are zero
automatic seedling grading system. The results showed
with the maximum frequency of occurrence. Based on
that the automatic grading results are basically consis-
this accumulation value, the diameter of the seedling
tent with manual measurement results, with a grading
can be easily calculated. Finally, the diameter value
success rate of ;97% and 98% for muskmelon and
was used to judge the level of the seedlings. It cannot
pumpkin, respectively, a grading error of 22.3% to
be found that section AB approximates the straight line
2.3%, and an average grading error of 20.57%. The
from the processed result curves of the seventh and the
test results met the requirements of the design system,
eighth seedlings. So the number of the pixels which rep-
which laid an important foundation for further devel-
resent the diameter cannot be confirmed, as well as the
oping an automatic vegetable grafting machine.
diameter of the seedling cannot be calculated. As a
result, the classifications of the seventh and the eighth
seedlings failed. Declaration of conflicting interests
It is difficult to judge which pixel represents stem The author(s) declared no potential conflicts of interest with
parts, cotyledons parts, or root parts, so the uncer- respect to the research, authorship, and/or publication of this
tainty remains as to the cause of the grading failure. article.
For example, from the result of fourth seedling, the
horizontal number of pixels of 0-valued points is stable Funding
at 22 pixels, and a nearly straight line of the curve
The author(s) disclosed receipt of the following financial sup-
(point A to point B) will be found (Figure 8). The seed-
port for the research, authorship, and/or publication of this
ling vertical height ranges from 160 to 430 pixels. article: This work is supported by the National Natural
Therefore, the vertical height represents the stem part Science Foundation of China (31101076), Excellent Talents
of the muskmelon scion seedlings. The 22 pixels of the Plans in Liaoning Province (LJQ2012061), and Tianzhu
biggest frequency represent the number of pixel points Mountain Scholar in Shenyang Agricultural University
of the muskmelon seedling stem diameter, so the dia- (2014).
meter of this seedling stem is 3.025 mm, belonging to
the B level. The curve shows volatile changes when the References
vertical height is less than 160 pixels or greater than
1. Ali Ashraf M, Kondo N and Shiigi T. Use of machine
430 pixels. The upper part represents leaves and the
vision to sort tomato seedlings for grafting robot. Eng
lower part is root of the muskmelon seedlings. The Agr Environ Food 2011; 4: 119125.
volatile curve is due to seedling leaves and clods on 2. Lee JM, Kubota C, Tsao SJ, et al. Current status of
their roots. From seedlings 7 and 8 of the unsuccessful vegetable grafting: diffusion, grafting techniques, auto-
examples in Figure 7, the total number of horizontal 0- mation. Sci Hortic 2010; 127: 93105.
valued points substantially changed with the height of 3. Aguilera C, Ramos M and Roa G. An automatic grading
muskmelon scion seedlings (Figure 8). system for panels surfaces using artificial vision. Int J
This algorithm is simple and convenient. Compared Comput Commun 2006; 1: 1522.
with the traditional algorithm, this algorithm takes the 4. Fabijanska A and Sankowski D. Computer vision system
midpoint of this segment as diameter, and it is more for high temperature measurement s of surface proper-
ties. Mach Vision Appl 2009; 20: 411421.
accurate. The results showed the grading success rate of
5. Kondo N. Automation on fruit and vegetable grading
grafting on the muskmelon and pumpkin seedling
system and food traceability. Trends Food Sci Tech 2010;
achieves ;98% using this present algorithm and system. 21: 145152.
12 Advances in Mechanical Engineering

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.

You might also like