A shadow detection and removal method for fruit recognition in natural environments
- 38 Downloads
Effective shadow detection and shadow removal can improve the performance of fruit recognition in natural environments and provide technical support for agricultural intelligence. In this study, a superpixel segmentation method was used to divide an image into multiple small regions. Based on the superpixel segmentation results, the shadow regions and the shadowless regions of the orchard images under natural light were compared and studied. Seven shadow saliency features (SSF) were explored and analyzed for shadow detection. The SSF were used to enhance the shadow characteristics. Then, the genetic algorithm (GA) was used to optimize the parameters, and support vector machine recursive feature elimination (SVM-RFE) was used to determine the best feature combination for shadow detection. According to the best feature combination, the support vector machine (SVM) algorithm was used to determine whether each segment of the superpixel segmentation results belonged to the shadow region. Shadow removal was carried out on each detected shadow region, and a natural light image after shadow removal was obtained. Finally, the accuracy of shadow detection was tested. The experimental results showed that the average accuracy of the shadow detection algorithm in this study was 91.91%. As a result, the precision and recall for fruits recognition after shadow removal generally improved.
KeywordsShadow detection Fruit detection Feature extraction Shadow removal Support vector machine
This work is supported by the Natural Science Foundation of Guangdong (No. 2018A030313330), the Special Funds for the Cultivation of Guangdong College Students’ Scientific and Technological Innovation (“Climbing Program” Special Funds.) (pdjh2019a0073), the National Natural Science Foundation of China (Nos. 31201135, 31571568) and the Science and Technology Plan Project of Guangzhou (201802020032). The authors wish to thank the useful comments of the anonymous reviewers to this paper.
BR and XJ conceived and designed the experiments; BR designed the algorithm; BR, CS and ZZ performed the experiments and analyzed the data; BR, XJ, CS, ZZ, GW, YZ and LX wrote the paper.
Compliance with ethical standards
Conflict of interest
The authors declare that they have no conflicts of interest.
- Adankon, M. M., & Cheriet, M. (2009). Support vector machine. In S. Z. Li & A. Jain (Eds.), Encyclopedia of biometrics (pp. 1303–1308). Boston, MA, USA: Springer.Google Scholar
- Baba, M., Mukunoki, M., & Asada, N. (2004). Shadow removal from a real image based on shadow density. In Proceedings of the ACM SIGGRAPH (pp. 8–12). New York, USA: ACM.Google Scholar
- Finlayson, G. D., Drew, M. S., & Lu, C. (2004). Intrinsic images by entropy minimization. In T. Pajdla & J. Matas (Eds.), Computer vision (ECCV) (pp. 582–595). Berlin, Heidelberg, Germany: Springer.Google Scholar
- Finlayson, G., Fredembach, C., & Drew, M. S. (2007). Detecting illumination in images. In 2007 IEEE 11th international conference on computer vision (ICCV) (pp. 1–8). Los Alamitos, CA, USA: IEEE.Google Scholar
- Finlayson, G. D., Hordley, S. D., & Drew, M. S. (2002). Removing shadows from images. In A. Heyden, G. Sparr, M. Nielsen, & P. Johansen (Eds.), Computer vision (ECCV) (pp. 823–836). Berlin, Heidelberg, Germany: Springer.Google Scholar
- Goldberg, D. E. (1989). Genetic algorithms in search, optimization and machine learning. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc.Google Scholar
- Gonzalez, R. C., & Woods, R. E. (2007). Digital image processing (3rd ed.). Upper Saddle River, NJ, USA: Prentice-Hall Inc.Google Scholar
- Gonzalez, R. C., Woods, R. E., & Eddins, S. L. (2003). Digital image processing using MATLAB. Upper Saddle River, NJ, USA: Prentice-Hall Inc.Google Scholar
- Lalonde, J. F., Efros, A. A., & Narasimhan, S. G. (2010). Detecting ground shadows in outdoor consumer photographs. In K. Daniilidis, P. Maragos, & N. Paragios (Eds.), Computer vision (ECCV) (Vol. 6312, Lecture Notes in Computer Science, pp. 322–335). Berlin, Heidelberg, Germany: Springer.Google Scholar
- Lei, T., Jia, X. H., Zhang, Y. N., He, L. F., Meng, H. Y., & Nandi, A. K. (2018). Significantly fast and robust fuzzy c-means clustering algorithm based on morphological reconstruction and membership filtering. IEEE Transactions on Fuzzy Systems, 26(5), 3027–3041. https://doi.org/10.1109/tfuzz.2018.2796074.CrossRefGoogle Scholar
- MacQueen, J. (1967). Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth berkeley symposium on mathematical statistics and probability (pp. 281–297). Berkeley, CA, USA: University of California Press.Google Scholar
- Matsushita, Y., Nishino, K., Ikeuchi, K., & Sakauchi, M. (2004). Illumination normalization with time-dependent intrinsic images for video surveillance. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(10), 1336–1347. https://doi.org/10.1109/tpami.2004.86.CrossRefPubMedGoogle Scholar
- Mo, N., Zhu, R. X., Yan, L., & Zhao, Z. (2018). Deshadowing of urban airborne imagery based on object-oriented automatic shadow detection and regional matching compensation. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 11(2), 585–605. https://doi.org/10.1109/jstars.2017.2787116.CrossRefGoogle Scholar
- Shen, L., & Yeo, C. (2011). Intrinsic images decomposition using a local and global sparse representation of reflectance. In 2011 IEEE conference on computer vision and pattern recognition (CVPR) (pp. 697–704). Los Alamitos, CA, USA: IEEE.Google Scholar
- Weiss, Y. (2001). Deriving intrinsic images from image sequences. In Proceedings eighth IEEE international conference on computer vision (ICCV 2001) (pp. 68–75). Los Alamitos, CA, USA: IEEE. https://doi.org/10.1109/iccv.2001.937606.
- Wu, T. P., & Tang, C. K. (2005). A Bayesian approach for shadow extraction from a single image. In Tenth IEEE international conference on computer vision (ICCV) (pp. 480–487). Los Alamitos, CA, USA: IEEE.Google Scholar
- Zhu, J. J., Samuel, K. G. G., Masood, S. Z., & Tappen, M. F. (2010). Learning to recognize shadows in monochromatic natural images. In 2010 IEEE conference on computer vision and pattern recognition (pp. 223–230). Los Alamitos, CA, USA: IEEE.Google Scholar