Weed Density Detection Method Based on Absolute Feature Corner Points in Field
Abstract
:1. Introduction
- (1)
- To propose a robust weed density identification method comprised of three modules: image preprocessing, crop row detection and weed density detection.
- (2)
- To develop an AFCP algorithm including sub-corner classifier and an absolute corner classifier capable of detecting crop row and the weed position.
- (3)
- To calculate the weed pressure and weed cluster rate.
- (4)
- To validate the proposed method based on AFPC algorithm by applying herbicide on weeds distributed within a corn field.
2. Materials and Methods
2.1. Image Preprocessing
2.1.1. Image Acquisition and Optimal Region Extraction
2.1.2. Graying and Smoothing
2.1.3. OTSU (Maximum between-Cluster Variance) Threshold Image Segmentation
2.1.4. Image Optimization
2.2. Multi-Ridge Crop Row Detection
2.2.1. Harris Corner Detection
2.2.2. Redundant Corners Optimization
2.2.3. Crop Row Corner Detection
Sub-Absolute Corner Detector
- (1)
- Set the sub-absolute corner scanning window as w1 × h1. The window function was the MBB of the connected region, and w1 and h1 were the width and height of the MBB.
- (2)
- Set the horizontal (x-axis) and vertical (y-axis) coordinate component difference functions. Set the point coordinates of different type as: SCC point Con(x,y), SCO point Cc(x,y), SCE point Oc(x,y), SAC point Ca(x,y). The horizontal coordinate component difference function d(x) and the vertical coordinate component difference function d(y) of any SCO and SCC were described as:
- (3)
- Set the classifier. Assuming that the abscissa of the SCO point Cc was the candidate corner point of SAC, the abscissa xCa of SAC was horizontal coordinate when the horizontal component difference between SCO point and SCC was minimum. Similarly, the ordinate yCa was vertical coordinate when the difference between the vertical components was the minimum:
- (4)
- The relative position classification of the corner points in accordance with step 3 was carried out, and the four sub-contrast corner points were classified into four categories according to the position:
- (5)
- Repeat step 3 and 4 until scanning the entire image.
Absolute Corner Detector
- (1)
- Set the distance function D of the SCE, and set and as the SCE to evaluate, then:
- (2)
- Calculate average distance threshold , where was the distance between two adjacent sub-centroids, and n was the total number of SCE.
- (3)
- Perform j times scans and pre-sorting. Search the closest centroid for each SCE in scanning process. If their distance was less than the average distance threshold , then they belonged to one class, otherwise a new class appeared.
- (4)
- Repeat step 2 and 3 until all sub-centroids in the image were classified and the centroid classes were obtained.
- (5)
- Take the absolute corners of each centroid class. The selection method of absolute corners (ACs) was as follows:The vertical distances of all sub-centroids in the class were calculated on the axis y = 0 and the line y = H. Two sub-centroids with the minimum distance were taken. The four absolute corners as candidates were closest to axis y = 0 and closest to straight line y = H.
- (6)
- Remove the pseudo absolute corners. Taking y = 1/2 H as the horizontal central axis, sub-centroid with the smallest Euclidean distance to the line y = 1/2 H was the absolute centroid. Set the angle threshold as . If the angle value between candidate absolute corner and the absolute centroid was in the angle threshold, the candidate absolute corner was deemed to be absolute corner; otherwise, it was discarded and the searching continued.
- (7)
- Repeat step 6 until the absolute corners for all classes were found.
2.2.4. Crop Row Detection
2.3. Weed Density Detection
2.3.1. Crop Line Elimination
2.3.2. Weed Density Calculation
2.4. Field Validation
3. Experiment Results
3.1. Image Preprocessing Experiment
3.2. Crop Row Corner Detection
3.3. Weed Density Parameters and Position
3.4. Field Validation
4. Discussion
4.1. Identification Accuracy and Speed Analysis
4.2. Spraying Herbicide Analysis
5. Conclusions
- (1)
- An AFPC extraction algorithm capable of detecting weed and crop corners was developed, with high detection accuracy and small computation load. In order to improve the processing speed of the AFPC algorithm, this study selected the corner distance as the threshold to filter Harris corners, which reduced processing time.
- (2)
- A sub-corner classifier and an absolute corner classifier were developed to extract the sub-absolute corners and absolute corners. The angle threshold capable of eliminating pseudo-absolute corners was set according to the angle feature of weeds and crop rows. The absolute corners were merged to recognize the weed position without extracting the crop rows directly.
- (3)
- Two weed density parameters were developed to calculate the weed pressure and weed cluster rate. Based on this, the weed distribution condition was evaluated for the entire farmland.
- (4)
- The weed density detection method based on AFPC algorithm was validated in a corn field. Experiment results showed that the method was rapid and accurate, with processing time of 782 ms for an image of 2748 × 576 pixels and the correct rate for identifying weeds was up to 90.3%. In other words, the method this study developed could meet the real-time process requirement and could be used in actual production work.
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Li, J.H.; Wang, J.; Hao, R.Y. The law of weed emergence in cornfield and the method of chemical weeding. Plant Dr. 2018, 31, 54–55. [Google Scholar]
- Wajahat, K.; Francisco, G.R.; Jon, N. Exploiting affine invariant regions and leaf edge shapes for weed detection. Comput. Electron. Agric. 2015, 118, 290–299. [Google Scholar] [CrossRef]
- Xia, C.; Lee, J.M.; Li, Y. Plant leaf detection using modified active shape models. Biosyst. Eng. 2013, 116, 23–35. [Google Scholar] [CrossRef]
- Swain, K.C.; Nørremark, M.; Jørgensen, R.N. Weed identification using an automated active shape matching (AASM) technique. Biosyst. Eng. 2011, 110, 450–457. [Google Scholar] [CrossRef]
- Bakhshipour, A.; Jafari, A.; Nassiri, S.M. Weed segmentation using texture features extracted from wavelet sub-images. Biosyst. Eng. 2017, 157, 1–12. [Google Scholar] [CrossRef]
- Pantazi, X.E.; Moshou, D.; Bravo, C. Active learning system for weed species recognition based on hyperspectral sensing. Biosyst. Eng. 2016, 146, 193–202. [Google Scholar] [CrossRef]
- Guru, D.S.; Sharath Kumar, Y.H.; Manjunath, S. Textural features in flower classification. Math. Comput. Model. 2011, 54, 1030–1036. [Google Scholar] [CrossRef] [Green Version]
- He, D.J.; Qiao, Y.L.; Li, P. Weed recognition based on SVM-DS multi-feature fusion. Trans. Chin. Soc. Agric. Mach. 2013, 44, 182–188. [Google Scholar] [CrossRef]
- Mao, W.H.; Jiang, H.H.; Hu, X.A. Between-row weed detection method based on position feature. Trans. Chin. Soc. Agric. Mach. 2007, 11, 74–76. [Google Scholar] [CrossRef]
- Astrand, B.; Baerveldt, A.J. A vision based row-following system for agricultural field machinery. Mechatronics 2005, 15, 251–269. [Google Scholar] [CrossRef]
- Diao, Z.H.; Diao, C.Y.; Wei, Y. Study on identification and application of wheat diseases in robot system. Jiangsu Agric. Sci. 2017, 45, 192–195. [Google Scholar]
- Zhang, Q.; Huang, X.; Li, B. Detection of rice seedlings rows’ centerlines based on color model and nearest neighbor clustering algorithm. Trans. Chin. Soc. Agric. Mach. 2012, 28, 163–171. [Google Scholar] [CrossRef]
- Meng, Q.K.; Zhang, M.; Yang, G.H. Guidance line recognition of agricultural machinery based on particle swarm optimization under natural illumination. Trans. Chin. Soc. Agric. Mach. 2016, 47, 11–20. [Google Scholar] [CrossRef]
- Huang, S.K.; Qi, L.; Zhang, J. An identification algorithm of weeds among multi-row corn based on the mapping of the corn row’s width. J. China Agric. Univ. 2013, 18, 165–171. [Google Scholar]
- Xu, Y.L.; Gao, Z.M.; Lav, K.; Meng, X.T. A real-time weed mapping and precision herbicide spraying system for row crops. Sensors 2018, 18, 4245. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Li, C. Research on image denoising technology based on three filtering algorithms of MATLAB. Commun. World 2018, 6, 283–284. [Google Scholar]
- Wang, J.; Zhou, Q.; Yin, A.J. Self-adaptive segmentation method of cotton in natural scene by combining improved Otsu with ELM algorithm. Trans. Chin. Soc. Agric. Eng. 2018, 34, 173–180. [Google Scholar]
- Pathak, V.K.; Singh, A.K. Optimization of morphological process parameters in contactless laser scanning system using modified particle swarm algorithm. Measurement 2017, 109, 27–35. [Google Scholar] [CrossRef]
- Hamed, N.; Nader, F.; Morteza, T. A new multiple-point pattern-based unconditional simulation algorithm using morphological image processing tools. J. Pet. Sci. Eng. 2018, 173, 1417–1437. [Google Scholar] [CrossRef]
- Bouchet, A.; Alonso, P.; Pastore, J.I. Fuzzy mathematical morphology for color images defined by fuzzy preference relations. Pattern Recognit. 2016, 60, 720–733. [Google Scholar] [CrossRef]
- Zhao, L.L. Binocular Vision Stereo Matching Based on Harris-SIFT Algorithm. Master’s Thesis, Northeast Petroleum University, Daqing, China, 12 June 2018. [Google Scholar]
- Han, S.Q.; Yu, W.B.; Yang, H.T. An improved Harris corner detection algorithm. J. Changchun Univ. Technol. 2018, 39, 470–474. [Google Scholar]
- Liu, B.C.; Zhao, J.; Sun, Q. Improved Harris corner detection method based on edge. Chin. J. Liq. Cryst. Disp. 2013, 28, 939–942. [Google Scholar] [CrossRef]
- Hu, L.C.; Shi, Z.F.; Pang, K. Improved Harris feature point detection algorithm for image matching. Comput. Eng. 2015, 41, 216–220. [Google Scholar]
- Qiu, W.T.; Zhao, J.; Liu, J. Image matching algorithm combining SIFT with region segmentation. Chin. J. Liq. Cryst. Disp. 2012, 27, 827–831. [Google Scholar] [CrossRef]
- Guo, C.X. Based on Harris Corner Detection Algorithm of Image Stitching Technology Research and Application. Master’s Thesis, Xi’an University of Science and Technology, Xi’an, China, 20 June 2016. [Google Scholar]
- Shao, M.X.; Du, G.C. Image fusion processing based on multi-universe quantum cloning algorithm. Chin. J. Liq. Cryst. Disp. 2012, 27, 837–841. [Google Scholar] [CrossRef]
- Sun, L.S.; Zhang, S.S.; Hou, T. Corner classification of flowchart based on SVM. J. Shaanxi Univ. Sci. 2018, 36, 147–153. [Google Scholar]
- Clauss, P.; Altintas, E.; Kuhn, M. Automatic collapsing of non-rectangular loops. In Proceedings of the Parallel and Distributed Processing Symposium (IPDPS), Orlando, FL, USA, 29 May–2 June 2017. [Google Scholar] [CrossRef] [Green Version]
- Collins, A.; Harris, T.; Cole, M.; Fensch, C. LIRA: Adaptive contention-aware thread placement for parallel runtime systems. In Proceedings of the 5th International Workshop on Runtime and Operating Systems for Supercomputers (ACM), Portland, OR, USA, 16 June 2015. [Google Scholar] [CrossRef] [Green Version]
- Pan, L.J.; Hong, Y.; Feng, Y. A Design of image processing software based on Harris algorithm. Comput. Knowl. Technol. 2014, 10, 6085–6087. [Google Scholar]
- Zhang, C.P.; Wei, X.G. Rectangle detection based on Harris corner. Opt. Precis. Eng. 2014, 22, 2259–2266. [Google Scholar] [CrossRef]
- Wu, X.W.; Xu, W.Q.; Song, Y.Y. A detection method of weed in wheat field on machine vision. Procedia Eng. 2011, 15, 1998–2003. [Google Scholar] [CrossRef] [Green Version]
- Xu, Y.L.; Bao, J.L.; Fu, D.P. Design and experiment of variable spraying system based on multiple combined nozzles. Trans. Chin. Soc. Agric. Eng. 2016, 32, 47–54. [Google Scholar] [CrossRef]
- Mao, W.H.; Wang, H.; Zhao, B. Weed detection method based the centre color of corn seedling. Trans. Chin. Soc. Agric. Eng. 2009, 25, 161–164. [Google Scholar] [CrossRef]
- Li, X.J. Main problems and management strategies of weeds in agricultural fields in China in recent years. Plant Prot. 2018, 44, 82–89. [Google Scholar]
Category | Four Sets of Absolute Corner Coordinate Data | ||||
---|---|---|---|---|---|
Line | First | Second | Third | Fourth | |
xul | 538 | 1070 | 1688 | 2120 | |
yul | 4 | 15 | 15 | 29 | |
xur | 714 | 1316 | 1896 | 2372 | |
yur | 5 | 27 | 33 | 45 | |
xll | 189 | 968 | 1818 | 2442 | |
yll | 570 | 564 | 554 | 568 | |
xlr | 452 | 1248 | 2104 | 2738 | |
ylr | 566 | 568 | 550 | 560 | |
s | —— | 787.5 | 853 | 629 | |
Lwide | 263 | 280 | 286 | 296 | |
Llength | 570.1618 | 572.2526 | 562.354 | 572.4229 | |
Law | 0.225975 | 0.240582 | 0.245737 | 0.254329 | |
Lal | 0.489894 | 0.491691 | 0.483186 | 0.491837 |
P0 | P1 | ||||
---|---|---|---|---|---|
756.5 | 1163.846 | 9723 | 95,505 | 10.18% | 0.61% |
Recognition Algorithm | Correct Rate/% | Error Rate/% | Time/ms |
---|---|---|---|
Paper method | 90.3 | 4.7 | 782 |
DBW algorithm | 78.5 | 5.3 | 1625 |
Reference [2] algorithm | 91.2 | 1.6 | 2980 |
Plant heart color | 68.6 | 11.2 | 550 |
Based online width algorithm | 88.1 | 3.7 | 1483 |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Xu, Y.; He, R.; Gao, Z.; Li, C.; Zhai, Y.; Jiao, Y. Weed Density Detection Method Based on Absolute Feature Corner Points in Field. Agronomy 2020, 10, 113. https://doi.org/10.3390/agronomy10010113
Xu Y, He R, Gao Z, Li C, Zhai Y, Jiao Y. Weed Density Detection Method Based on Absolute Feature Corner Points in Field. Agronomy. 2020; 10(1):113. https://doi.org/10.3390/agronomy10010113
Chicago/Turabian StyleXu, Yanlei, Run He, Zongmei Gao, Chenxiao Li, Yuting Zhai, and Yubin Jiao. 2020. "Weed Density Detection Method Based on Absolute Feature Corner Points in Field" Agronomy 10, no. 1: 113. https://doi.org/10.3390/agronomy10010113
APA StyleXu, Y., He, R., Gao, Z., Li, C., Zhai, Y., & Jiao, Y. (2020). Weed Density Detection Method Based on Absolute Feature Corner Points in Field. Agronomy, 10(1), 113. https://doi.org/10.3390/agronomy10010113