A Fast Deployable Instance Elimination Segmentation Algorithm Based on Watershed Transform for Dense Cereal Grain Images
Abstract
:1. Introduction
- We propose an instance segmentation method based on a generative marker-based watershed segmentation algorithm, which overcomes the problems of over-segmentation and under-segmentation for images with dense and small targets.
- The proposed method is extensively evaluated by qualitative and quantitative measures. The results demonstrate the effectiveness and robustness of our method.
- We verify the engineering practicality of our method by counting the size distribution of segmented cereal grains. The results keep a high degree of consistency with the manually sketched ground truth.
- The method proposed in this study has a potential positive effect of getting rid of the reliance on data-driven deep learning algorithms in instance segmentation tasks, which can be regarded as an image processing framework with promising application and rapid deployment in more fields.
2. Materials and Methods
2.1. Cereal Samples and Image Capturing
2.2. Watershed Segmentation Algorithm
2.2.1. Marker-Based Watershed Segmentation Algorithm
2.2.2. An Example of Existing Over-Segmentation and Its Improvements
2.2.3. An Example of Existing Under-Segmentation and Its Improvement
3. Results
3.1. Qualitative Evaluation Results
3.2. Quantitative Evaluation Results
4. Application
5. Discussion
5.1. How Do the Proposed Strategies Work to Solve the Images’ Over-Segmentation and Under-Segmentation
5.2. Advantages and Application Prospects of the Proposed Algorithm
5.3. Limitations
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Singh, S.K.; Vidyarthi, S.K.; Tiwari, R. Machine learnt image processing to predict weight and size of rice kernels. J. Food Eng. 2020, 274, 109828. [Google Scholar] [CrossRef]
- Zhou, H.; Yun, P.; He, Y. Rice appearance quality. In Rice; AACC International: Washington, DC, USA, 2019; pp. 371–383. [Google Scholar] [CrossRef]
- Sharma, N.; Khanna, R. Rice grain quality: Current developments and future prospects. In Recent Advances in Grain Crops Research; Intech Open: London, UK, 2019; p. 105. [Google Scholar] [CrossRef]
- Groote, H.D.; Narrod, C.S.; Kimenju, C.; Bett, C.; Scott, R.P.B.; Tiongco, M.M.; Gitonga, Z. Measuring rural consumers’ willingness to pay for quality labels using experimental auctions: The case of aflatoxin-free maize in Kenya. Agric. Econ. 2016, 47, 33–45. [Google Scholar] [CrossRef]
- Vithu, P.; Moses, J. Machine vision system for food grain quality evaluation: A review. Trends Food Sci. Technol. 2016, 56, 13–20. [Google Scholar] [CrossRef]
- Patrício, D.I.; Rieder, R. Computer vision and artificial intelligence in precision agriculture for grain crops: A systematic review. Comput. Electron. Agric. 2018, 153, 69–81. [Google Scholar] [CrossRef]
- Chen, Y.; Bai, Y.; Zhang, W.; Mei, T. Destruction and construction learning for fine-grained image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 5157–5166. [Google Scholar] [CrossRef]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar] [CrossRef]
- Huang, Z.; Huang, L.; Gong, Y.; Huang, C.; Wang, X. Mask scoring r-cnn. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 6409–6418. [Google Scholar] [CrossRef]
- Bolya, D.; Zhou, C.; Xiao, F.; Lee, Y.J. Yolact: Real-time instance segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Long Beach, CA, USA, 15–20 June 2019; pp. 9157–9166. [Google Scholar] [CrossRef]
- Hafiz, A.M.; Bhat, G.M. A survey on instance segmentation: State of the art. Int. J. Multimed. Inf. Retr. 2020, 9, 171–189. [Google Scholar] [CrossRef]
- Zhang, H.; Tang, Z.; Xie, Y.; Gao, X.; Chen, Q. A watershed segmentation algorithm based on an optimal marker for bubble size measurement. Measurement 2019, 138, 182–193. [Google Scholar] [CrossRef]
- Ji, X.; Li, Y.; Cheng, J.; Yu, Y.; Wang, M. Cell image segmentation based on an improved watershed algorithm. In Proceedings of the 2015 8th International Congress on Image and Signal Processing, Shenyang, China, 14–16 October 2015; pp. 433–437. [Google Scholar] [CrossRef]
- Hamarneh, G.; Li, X. Watershed segmentation using prior shape and appearance knowledge. Image Vis. Comput. 2009, 27, 59–68. [Google Scholar] [CrossRef]
- Vincent, L.; Soille, P. Watersheds in digital spaces: An efficient algorithm based on immersion simulations. IEEE Trans. Pattern Anal. Mach. Intell. 1991, 13, 583–598. [Google Scholar] [CrossRef]
- Meyer, F. Topographic distance and watershed lines. Signal Processing 1994, 38, 113–125. [Google Scholar] [CrossRef]
- Gao, H.; Xue, P.; Lin, W. A new marker-based watershed algorithm. In Proceedings of the 2004 IEEE International Symposium on Circuits and Systems, Vancouver, BC, Canada, 23–26 May 2004. [Google Scholar] [CrossRef]
- Zhang, X.; Jia, F.; Luo, S.; Liu, G.; Hu, Q. A marker-based watershed method for X-ray image segmentation. Comput. Methods Programs Biomed. 2014, 113, 894–903. [Google Scholar] [CrossRef] [PubMed]
- Ng, H.; Ong, S.; Foong, K.; Liu, G.; Hu, Q. Medical image segmentation using k-means clustering and improved watershed algorithm. In Proceedings of the 2006 IEEE Southwest Symposium on Image Analysis and Interpretation, Denver, CO, USA, 26–28 March 2006; pp. 61–65. [Google Scholar] [CrossRef]
- Oo, S.Z.; Khaing, A.S. Brain tumor detection and segmentation using watershed segmentation and morphological operation. Int. J. Res. Eng. Technol. 2014, 3, 367–374. [Google Scholar] [CrossRef]
- Avinash, S.; Manjunath, K.; Kumar, S.S. An improved image processing analysis for the detection of lung cancer using Gabor filters and watershed segmentation technique. In Proceedings of the 2016 International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India, 26–27 August 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Li, G.; Wan, Y. Improved watershed segmentation with optimal scale based on ordered dither halftone and mutual information. In Proceedings of the 2010 3rd International Conference on Computer Science and Information Technology, Chengdu, China, 9–11 July 2010; pp. 296–300. [Google Scholar] [CrossRef]
- Genitha, C.H.; Sowmya, M.; Sri, T. Comparative Analysis for the Detection of Marine Vessels from Satellite Images Using FCM and Marker-Controlled Watershed Segmentation Algorithm. J. Indian Soc. Remote Sens. 2020, 48, 1207–1214. [Google Scholar] [CrossRef]
- National Standard Disclosure System. Available online: https://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=EB37F2E3E8B0C26EBB3A329D6C0E390E (accessed on 8 September 2022).
- Atwood, R.; Jones, J.; Lee, P.; Hench, L. Analysis of pore interconnectivity in bioactive glass foams using X-ray microtomography. Scr. Mater. 2004, 51, 1029–1033. [Google Scholar] [CrossRef]
- Wong, C.F.; Yeo, J.Y.; Gan, S.K.E. APD Colony Counter App: Using Watershed algorithm for improved colony counting. Nat. Methods 2016, 5, 1–3. [Google Scholar] [CrossRef]
- Jiao, S.; Li, X.; Lu, X. An improved Ostu method for image segmentation. In Proceedings of the 2006 8th international Conference on Signal Processing, Guilin, China, 16–20 November 2006. [Google Scholar] [CrossRef]
- Shih, F.C.; Mitchell, O.R. A mathematical morphology approach to Euclidean distance transformation. IEEE Trans. Image Processing 1992, 1, 197–204. [Google Scholar] [CrossRef] [PubMed]
- Norouzi, A.; Rahim, M.S.; Altameem, A.; Saba, T.; Rad, A.E.; Rehman, A.; Uddin, M. Medical image segmentation methods, algorithms, and applications. IETE Tech. Rev. 2014, 31, 199–213. [Google Scholar] [CrossRef]
- Milletari, F.; Navab, N.; Ahmadi, S.A. V-net: Fully convolutional neural networks for volumetric medical image segmentation. In Proceedings of the 2016 Fourth International Conference on 3D Vision, Stanford, CA, USA, 25–28 October 2016; pp. 565–571. [Google Scholar] [CrossRef] [Green Version]
- Fritsch, J.; Kuehnl, T.; Geiger, A. A new performance measure and evaluation benchmark for road detection algorithms. In Proceedings of the 16th International IEEE Conference on Intelligent Transportation Systems, The Hague, The Netherlands, 6–9 October 2013; pp. 1693–1700. [Google Scholar] [CrossRef]
- Menze, M.; Geiger, A. Object scene flow for autonomous vehicles. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 3061–3070. [Google Scholar] [CrossRef]
- Deepika, N.; Vishnu, K. Different techniques for satellite image segmentation. In Proceedings of the 2015 Online International Conference on Green Engineering and Technologies, Coimbatore, India, 27 November 2015; pp. 1–6. [Google Scholar] [CrossRef]
- Su, B.; Noguchi, N. Discrimination of land use patterns in remote sensing image data using minimum distance algorithm and watershed algorithm. Eng. Agric. Environ. Food 2013, 6, 48–53. [Google Scholar] [CrossRef]
MWS (s) | MWES (s) | |||
---|---|---|---|---|
Mean Long–Short Axis Ratio | Total Grains | ||||
---|---|---|---|---|---|
Wheat | Ours | 1.25 | 3.05 | 0.17 | 601 |
Ground truth | 1.23 | 0.16 | 600 | ||
Rice | Ours | 1.91 | 2.63 | 0.39 | 746 |
Ground truth | 1.69 | 2.45 | 0.36 | 750 | |
Sunflower seed | Ours | 3.10 | 12.61 | 0.36 | 124 |
Ground truth | 2.99 | 12.32 | 0.36 | 126 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liang, J.; Li, H.; Xu, F.; Chen, J.; Zhou, M.; Yin, L.; Zhai, Z.; Chai, X. A Fast Deployable Instance Elimination Segmentation Algorithm Based on Watershed Transform for Dense Cereal Grain Images. Agriculture 2022, 12, 1486. https://doi.org/10.3390/agriculture12091486
Liang J, Li H, Xu F, Chen J, Zhou M, Yin L, Zhai Z, Chai X. A Fast Deployable Instance Elimination Segmentation Algorithm Based on Watershed Transform for Dense Cereal Grain Images. Agriculture. 2022; 12(9):1486. https://doi.org/10.3390/agriculture12091486
Chicago/Turabian StyleLiang, Junling, Heng Li, Fei Xu, Jianpin Chen, Meixuan Zhou, Liping Yin, Zhenzhen Zhai, and Xinyu Chai. 2022. "A Fast Deployable Instance Elimination Segmentation Algorithm Based on Watershed Transform for Dense Cereal Grain Images" Agriculture 12, no. 9: 1486. https://doi.org/10.3390/agriculture12091486
APA StyleLiang, J., Li, H., Xu, F., Chen, J., Zhou, M., Yin, L., Zhai, Z., & Chai, X. (2022). A Fast Deployable Instance Elimination Segmentation Algorithm Based on Watershed Transform for Dense Cereal Grain Images. Agriculture, 12(9), 1486. https://doi.org/10.3390/agriculture12091486