2016 International Conference on Computational Modeling, Simulation and Applied Mathematics (CMSAM 2016) ISBN: 978-1-60595-385-4
Plant Leaves Edge Detection Using Mean-shift Algorithm and
Wavelet Transform
Dong YANG, Chun-Hua HU
*and Yao ZHOU
College of Information Science and Technology, Nanjing Forest University, Nanjing 210037, China
*Corresponding author
Keywords: Mean shift algorithm, Wavelet transform, The spatial bandwidth, The canny operator, Edge detection.
Abstract. In this paper, a novel edge detection algorithm based on Mean-shift algorithm and wavelet transform is proposed to accurately segment the Leaves in the Leaf overlapped and grain complex situations. Firstly, Mean-shift algorithm of adaptive spatial bandwidth selection was put forward to smooth the plants leaves image Secondly two-dimensional wavelet transform was utilized to enhance contrast ratio. Then the edge of the plant leaf was lastly detected based on Canny operator. Compared with traditional edge detection algorithms, this edge detected by this method has a better continuity and has a higher signal-to-noise ratio.
Introduction
The edge of images includes the inner information of things. Leaf is an important organ of plants. The status of the plant growth, plant diseases and insect pests can be intuitively understood from leaves. Segmentation algorithm for the single leaf has been very mature, but in practical application, plant leaves are overlapping with complex background. The main work is to extract leaves from complicated background, the priority for image feature extraction is the edge extraction[1]. Sobel operator, Robets operator and Prewitt operator are commonly used edge detection operators, these gradient operators can be simply operated, but the anti-jamming performance is poor, these operators are sensitive to noise, so the result is not ideal.Zhang[2] improved the Sobel operator and increased six direction template after preprocessing, the new operator effectively solved the problem of extracting too thick edge, and it raised the accuracy. Considering the traditional Canny operators easily lose weak edges and detect false edges, Zhou[3] put forward an algorithm by adopting adaptive entropy to determine the Canny operator threshold, the result had a better edge connectivity. Lin[4] adopted linear function to define membership function, he used Sugeno fuzzy model for fuzzy reasoning, then detected edge after fuzzy filtering, the method overcome the problem of too many false edges. Hou[5] used RBF kernel to operate SVM training edge detection, the algorithm obtained the satisfactory edge. In this paper, Mean-shift algorithm was employed to smooth the image, then wavelet transform was used to enhance the contrast, in the end, improved Canny operator was used to detect the edge, through experiments contrast, the algorithm in this paper can extract more continuous edge , signal-to-noise ratio is higher than traditional algorithms.
The Method Framework
determined by the selection of high and low threshold, so the Canny operator detects the weak edge easier than other common algorithms[8].
Figure 1. Leaf image segmentation.
Algorithm realization process is shown in Fig.2.
input image
Extract the B channel grayscale
Mean-shiftimage smoothing
Wavelet Contrast enhancement
Canny edge detection
output image
Figure 2. The framework of this algorithm.
Edge Detection Based on Mean-shift and Wavelet transform
Mean-shift Smoothing Algorithm
Suppose n sample points xi(i = 1, … , n) were in d dimension Rd, the basic form of mean-shift vector at the point x is[9]:
Mx =∑∈x− x (1)
S is a high-dimensional ball area radius of h, it is a series of points meeting the relationship of Eq.2
Sx = {y: y − x(y − x)≤ h } (2)
k represents k of n sample points are in S area.
Image Enhancement Method Based on Wavelet Transform
Each layer of wavelet transform decomposes the image into four sub band image: LL, LH, HL, HH [10]. High frequency component contains the main information of images, so high frequency component should be enhanced. After analyzing the details of the scale, enhancement coefficient was chosen to enhance images. The reconstruction of the two-dimensional wavelet transform equation is expressed as:
fx, y = ∑ ∑ ∑ ∑ C m, nψ%&,',(
x, y
&
+ ∑ ∑ D
& ( '
( m, nφ%&,',(x, y
' ,
&- (3)
[image:2.612.255.355.247.411.2]fx, y = ∑ ∑ ∑ ∑ W&,C m, nψ% &,',(
x, y
&
+ ∑ ∑ D
& ( '
( m, nφ%&,',(x, y
' ,
&- (4)
W&, is enhancement coefficient, j is scale factor, i value of 1, 2, 3, represent the HH, HL and LH subband images.
Experiments and Analyzation
The object of this experiment is a poplar sapling in initial stage of plant growth, soil moisture is 70%, and the experiment used Canon digital camera to capture leaf image of 640*480 pixels, then the image is processed in MATLAB 2015b.
The implementation steps in MATLAB 2015b are as follows:
(1) Smoothing B channel gray-scale map by Mean-shift algorithm. Respectively using AandB
(i=1,…,n)to represent the original image and the smoothing image, the specific steps of each pixel point calculation are as follows:
1 initialize j = 1, assign y,= x;
2 calculate y,&2 until convergence, assign convergence value as y,3[11];
3 assign z= 5x6, y,378。
After the test, h6 values of 16, when h7 values of 8 for smoothing, the result is best.
(2) Wavelet transform enhances image contrast. Assuming pixel points of a denoised image constitute the function fx, y, the wavelet enhancement process can be divided into the following three steps:
1 Mallat fast wavelet decomposes the image[12].
2 Set the enhancement coefficient W&, to transform each layer of wavelet coefficients [13] :
WT:x, y = W&,· WT:x, y (5)
3 Perform inverse wavelet transform on the result, then get the enhanced image[14].
4 Canny operator for edge detection, low threshold Th values of 0.3, high threshold Th values of 0.6 to extract the edge of the leaves. The result of each step is shown in Fig.3.
(a)B channel grays-scale map (b)the smoothed image
(c)the enhanced image (d)edge detection results
Figure 3. Algorithm to deal with the results in this paper.
function is polynomial kernel function, threshold is determined byOtsu algorithm, but the edge is not continuous; Fig.4(d) is the result of the algorithm based on Sugeno fuzzy model, the effect has been improved compared with above algorithm, but result still has a small amount of useless texture.
(a)improved Sobel edge detection (b)improved Canny edge detection
(c)SVM edge detection (d)Sugeno fuzzy model checking
Figure 4. Traditional edge detection operator to test results.
By comparing the results, it can be seen that the traditional algorithms extract the discontinuous edge and sometimes introduce too much noise, the edge can not highlight the main outline of the characteristics of leaves. Mean-shift algorithm is employed to smooth images and wavelet analysis is employed to enhance contrast in early work based on the characteristics of plant leaves, the method makes outline of the leaves clear, facilitates later segmentation. So the edge detection algorithm of this paper has a great superiority compared with the traditional algorithm.
Conclusion
This paper proposes an leaf edge detection algorithm adopting Mean-shift smoothing and wavelet transform, the algorithm can adaptively select the airspace bandwidth, and keep the effective edge. Wavelet transform enhancement suppresses noise, keep weak edge and makes an important work for the following image segmentation.
Acknowledgment
This work are founded by the National Natural Science Foundation of China(31300471), the National 863 high tech program of China(2012AA102002-4) and the Priority Academic Program Development of Jiangsu Higher Education Institutions.
References
[1] S. Li, P. Xie, L. Yao. Adaptive Canny algorithm of plant leaves application of image edge detection [J]. Computer knowledge and technology. 2013, (22): 5126-5128.
[2] H. Zhang. Leaf image edge detection based on improved Sobel algorithm [J]. Journal of agricultural mechanization research. 2012, (5): 46 to 48.
[3] P. Zhang, X. C. Li, Y.X. Yang. Fusion four frame difference edge detection of moving targets detection [J]. Journal of electronic technology and software engineering, 2014, (20): 106-107.
[4] K.Y. Lin, H.P.S, Q. Zhou etc. The plant leaf edge detection method based on fuzzy logic technique [J]. Journal of agricultural machinery. 2013, 44 (6): 227-231.
[5] Z.M. CaiRang, M.C. Zhang. Aircraft target recognition method based on structural characteristics [J]. Computer engineering and application. 2013, (4): 174-177.
[7] X.M. Liu, S.C. Wang, J. Zhao. Image enhancement based on wavelet transform and the theory of fuzzy algorithm study [J]. Journal of missiles and guided journal. 2010, (4): 183-186.
[8] X.L. Liu. Underwater target detection algorithm in image research [D]. Qingdao: China ocean university. 2013.
[9] H. Gao. Study of mine monitoring image enhancement based on wavelet transform [J]. Computer and digital engineering, 2015, (4): 707-709 + 732.
[10] H.F. Hou, L.Y. Bai, S.H. Liu. Image edge detection based on support vector machine (SVM) study [J]. Computer engineering and application. 2007, (18): 32-33 + 58.
[11] Y.F. Zhang, Q.X. Zhang, X.H. Feng. Edge detection algorithm based on wavelet packet decomposition [J]. Science and technology innovation and application. 2013, (28): 12-13.
[12] M. Sun. HVS and DWT with the combination of research and implementation of digital steganography technology [J]. Computer engineering and application, 2009 (26): 85-86 + 168.
[13] J. Yang. Low contrast image enhancement method based on wavelet transform [J]. Computer age. 2011. (01): 10-12.