Enhancing the Image Pre-Processing for Large Fleets Based on a Fuzzy Approach to Handle Multiple Resolutions
Abstract
:1. Introduction
2. Literature Review
2.1. Pre-Processing Tasks
2.2. Fuzzy-Based Image Enhancement
3. Methodology
- Step 1
- This study collected the front camera video data from large fleets.
- Step 2
- The video is split into individual images, and all images contain traffic lights.
- Step 3
- This study conducted pre-processing tasks for image adjustment, including (i) direct RGB adjustment, (ii) histogram equalization with RGB and CIELAB conversion, and (iii) proposed fuzzy enhancement with RGB and CIELAB conversion, which belonged to the pre-processing task. The proposed fuzzy enhancement with brightness adjustment was optional.
- Step 4
- To evaluate the front images and traffic lights, this study used mean squared error (MSE) and peak signal-to-noise ratio (PSNR) evaluation metrics to compare methods of histogram equalization and fuzzy.
- Step 5
- This study labeled the traffic lights, including green, red, yellow, and green left turn, from the images.
- Step 6
- This study employed You Only Look Once version 9 (YOLOv9) for model training. During the training process, the validation set is used to evaluate the model’s performance. Image pre-processing is performed to produce a good training model. This study compared the performance of the original model training with the enhanced image model training by providing three performance-evaluation indicators: (i) observing the impact of epoch on model results, (ii) using validation data to assess the trained model, and (iii) observing changes in the confusion matrix.
- Step 7
- After completing the model training, testing is conducted to evaluate the model’s detection performance.
4. Results
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bommes, M.; Fazekas, A.; Volkenhoff, T.; Oeser, M. Video based intelligent transportation Systems—State of the art and future development. Transp. Res. Procedia 2016, 14, 4495–4504. [Google Scholar] [CrossRef]
- Orozco, M.C.E.; Rebong, C.B. Vehicular training and classification for intelligent transportation system: A deep learning approach using faster R-CNN model. Platero 2019, 180, 36551. [Google Scholar]
- Khan, S.; Adnan, A.; Iqbal, N. Applications of artificial intelligence in transportation. In Proceedings of the 2022 International Conference on Electrical, Computer and Energy Technologies (ICECET), Prague, Czech Republic, 20–22 July 2022; pp. 1–6. [Google Scholar]
- Li, W.; Hsu, C.-Y. GeoAI for large-scale image analysis and machine vision: Recent progress of artificial intelligence in geography. ISPRS Int. J. Geo-Inf. 2022, 11, 385. [Google Scholar] [CrossRef]
- Mu, C.Y.; Kung, P.; Chen, C.F.; Chuang, S.C. Enhancing front-vehicle training in large vehicle fleet management. Remote Sens. 2022, 14, 1544. [Google Scholar] [CrossRef]
- Myagmar-Ochir, Y.; Kim, W. A survey of video surveillance systems in smart city. Electronics 2023, 12, 3567. [Google Scholar] [CrossRef]
- Kutlimuratov, A.; Khamzaev, J.; Kuchkorov, T.; Anwar, M.S.; Choi, A. Applying enhanced real-time monitoring and counting method for effective traffic management in Tashkent. Sensors 2023, 23, 5007. [Google Scholar] [CrossRef]
- Kalyan, S.S.; Pratyusha, V.; Nishitha, N.; Ramesh, T.K. Vehicle detection using image processing. In Proceedings of the 2020 IEEE International Conference for Innovation in Technology (INOCON), Bangluru, India, 6–8 November 2020; pp. 1–5. [Google Scholar]
- Shahriar, M.T.; Li, H. A study of image pre-processing for faster object recognition. arXiv 2020, arXiv:2011.06928. [Google Scholar]
- Liu, Y.; Kong, L.; Chen, G.; Xu, F.; Wang, Z. Light-weight AI and IoT collaboration for surveillance video pre-processing. J. Syst. Archit. 2021, 114, 101934. [Google Scholar] [CrossRef]
- Eamthanakul, B.; Ketcham, M.; Chumuang, N. The traffic congestion investigating system by image processing from CCTV camera. In Proceedings of the 2017 International Conference on Digital Arts, Media and Technology (ICDAMT), Chiang Mai, Thailand, 1–4 March 2017; pp. 240–245. [Google Scholar]
- Kurniawan, A.; Ramadlan, A.; Yuniarno, E.M. Speed monitoring for multiple vehicle using closed circuit television (CCTV) camera. In Proceedings of the 2018 International Conference on Computer Engineering, Network and Intelligent Multimedia (CENIM), Surabaya, Indonesia, 26–27 November 2018; pp. 88–93. [Google Scholar]
- Bui, K.-H.N.; Yi, H.; Cho, J. A Multi-Class Multi-Movement Vehicle Counting Framework for Traffic Analysis in Complex Areas Using CCTV Systems. Energies 2020, 13, 2036. [Google Scholar] [CrossRef]
- Lee, C.; Kim, H.; Oh, S.; Doo, I. A study on building a “real-time vehicle accident and road obstacle notification model” using AI CCTV. Appl. Sci. 2021, 11, 8210. [Google Scholar] [CrossRef]
- Peppa, M.V.; Komar, T.; Xiao, W.; James, P.; Robson, C.; Xing, J.; Barr, S. Towards an end-to-end framework of CCTV-based urban traffic volume training and prediction. Sensors 2021, 21, 629. [Google Scholar] [CrossRef] [PubMed]
- Elmitiny, N.; Yan, X.; Radwan, E.; Russo, C.; Nashar, D. Classification analysis of driver’s stop/go decision and red-light running violation. Accid. Anal. Prev. 2010, 42, 101–111. [Google Scholar] [CrossRef]
- Ho, G.T.S.; Tsang, Y.P.; Wu, C.H.; Wong, W.H.; Choy, K.L. A computer vision-based roadside ooccupation surveillance system for intelligent transport in smart cities. Sensors 2019, 19, 1796. [Google Scholar] [CrossRef]
- Dilek, E.; Dener, M. Computer Vision Applications in Intelligent Transportation Systems: A survey. Sensors 2023, 23, 2938. [Google Scholar] [CrossRef] [PubMed]
- Basheer Ahmed, M.I.; Zaghdoud, R.; Ahmed, M.S.; Sendi, R.; Alsharif, S.; Alabdulkarim, J.; Albin Saad, B.A.; Alsabt, R.; Rahman, A.; Krishnasamy, G. A real-time computer vision based approach to training and classification of traffic incidents. Big Data Cogn. Comput. 2023, 7, 22. [Google Scholar] [CrossRef]
- Abdel-Aty, M.; Wang, Z.; Zheng, O.; Abdelraouf, A. Advances and applications of computer vision techniques in vehicle trajectory generation and surrogate traffic safety indicators. Accid. Anal. Prev. 2023, 191, 107191. [Google Scholar] [CrossRef]
- Clark, A. Pillow (Pil Fork) Documentation. Available online: https://readthedocs.org/projects/pillow/downloads/pdf/latest (accessed on 26 July 2024).
- Ng, J.Y.; Tay, Y.H. Image-based vehicle classification system. arXiv 2012, arXiv:1204.2114. [Google Scholar]
- Al-Shemarry, M.S.; Li, Y. Developing learning-based preprocessing methods for detecting complicated vehicle licence plates. IEEE Access 2020, 8, 170951–170966. [Google Scholar] [CrossRef]
- Shariff, A.M.; Bhatia, R.; Kuma, R.; Jha, S. Vehicle number plate training using python and open cv. In Proceedings of the 2021 International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Greater Noida, India, 4–5 March 2021; pp. 525–529. [Google Scholar]
- Puniani, S.; Arora, S. Performance evaluation of image enhancement techniques. Int. J. Signal Process. Image Process. Pattern Recognit. 2015, 8, 251–262. [Google Scholar] [CrossRef]
- Beti, I.-A.; Herghelegiu, P.-C.; Caruntu, C.-F. Architectural framework to enhance image-based vehicle positioning for advanced functionalities. Information 2024, 15, 323. [Google Scholar] [CrossRef]
- Manana, M.; Tu, C.; Owolawi, P.A. Preprocessed faster RCNN for vehicle training. In Proceedings of the 2018 International Conference on Intelligent and Innovative Computing Applications (ICONIC), Mon Tresor, Mauritius, 6–7 December 2018; pp. 1–4. [Google Scholar]
- Park, K.; Chae, M.; Cho, J.H. Image pre-processing method of machine learning for edge training with image signal processor enhancement. Micromachines 2021, 12, 73. [Google Scholar] [CrossRef] [PubMed]
- Maharana, K.; Mondal, S.; Nemade, B. A review: Data pre-processing and data augmentation techniques. Glob. Transit. Proc. 2022, 3, 91–99. [Google Scholar] [CrossRef]
- Patel, O.; Maravi, Y.P.; Sharma, S. A comparative study of histogram equalization based image enhancement techniques for brightness preservation and contrast enhancement. arXiv 2013, arXiv:1311.4033. [Google Scholar] [CrossRef]
- Tanaka, H.; Taguchi, A. Brightness preserving generalized histogram equalization. In Proceedings of the 2020 IEEE Region 10 Conference (Tencon), Osaka, Japan, 16–19 November 2020; pp. 1397–1400. [Google Scholar]
- Hapsari, R.K.; Utoyo, M.I.; Rulaningtyas, R.; Suprajitno, H. Comparison of histogram based image enhancement methods on iris images. J. Phys. Conf. Ser. 2020, 1569, 022002. [Google Scholar] [CrossRef]
- Dhal, K.G.; Das, A.; Ray, S.; Gálvez, J.; Das, S. Histogram equalization variants as optimization problems: A review. Arch. Comput. Methods Eng. 2021, 28, 1471–1496. [Google Scholar] [CrossRef]
- Vijayalakshmi, D.; Nath, M.K. A novel contrast enhancement technique using gradient-based joint histogram equalization. Circuits Syst. Signal Process. 2021, 40, 3929–3967. [Google Scholar] [CrossRef]
- Ye, B.; Jin, S.; Li, B.; Yan, S.; Zhang, D. Dual histogram equalization algorithm based on adaptive image correction. Appl. Sci. 2023, 13, 10649. [Google Scholar] [CrossRef]
- Pandey, A.K.; Chatla, H.N.; Pandya, M.; Farhan, A.; Rana, A.S. Image edge training using Fuzzy Logic Controller. In Proceedings of the 2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON), New Delhi, India, 1–3 May 2023; pp. 508–513. [Google Scholar]
- Di Martino, F.; Sessa, S. Fuzzy Transform for Image and Video Compression. In Fuzzy Transforms for Image Processing and Data Analysis; Springer: Cham, Switzerland, 2020. [Google Scholar]
- Roopaei, M.; Eghbal, M.K.; Shadaram, M.; Agaian, S. Noise-free rule-based fuzzy image enhancement. Electron. Imaging 2016, 28, art00029. [Google Scholar] [CrossRef]
- Shakeri, M.; Dezfoulian, M.H.; Khotanlou, H.; Barati, A.H.; Masoumi, Y. Image contrast enhancement using fuzzy clustering with adaptive cluster parameter and sub-histogram equalization. Digit. Signal Process. 2017, 62, 224–237. [Google Scholar] [CrossRef]
- Joshi, S.; Kumar, S. Image contrast enhancement using fuzzy logic. arXiv 2018, arXiv:1809.04529. [Google Scholar]
- Mirbolouk, S.; Valizadeh, M.; Amirani, M.C.; Choukali, M.A. A fuzzy histogram weighting method for efficient image contrast enhancement. Multimed. Tools Appl. 2020, 80, 2221–2241. [Google Scholar] [CrossRef]
- Paul, A.; Sutradhar, T.; Bhattacharya, P.; Maity, S.P. Infrared images enhancement using fuzzy dissimilarity histogram equalization. Optik 2021, 247, 167887. [Google Scholar] [CrossRef]
- Paul, A.; Bhattacharya, P.; Maity, S.P. Histogram modification in adaptive bi-histogram equalization for contrast enhancement on digital images. Optik 2022, 259, 168899. [Google Scholar] [CrossRef]
- Chaudhary, S.; Bhardwaj, A.; Rana, P. Image enhancement by linear regression algorithm and sub-histogram equalization. Multimed. Tools Appl. 2022, 81, 29919–29938. [Google Scholar] [CrossRef]
- Ahmed, M.A.; Althubiti, S.A.; de Albuquerque, V.H.C.; dos Reis, M.C.; Shashidhar, C.; Murthy, T.S.; Lydia, E.L. Fuzzy wavelet neural network driven vehicle training on remote sensing imagery. Comput. Electr. Eng. 2023, 109, 108765. [Google Scholar] [CrossRef]
- Zhang, D.; Liu, Y.; Zhao, Y.; Liang, J.; Sun, B.; Chu, S. Algorithm Research on Detail and Contrast Enhancement of High Dynamic Infrared Images. Appl. Sci. 2023, 13, 12649. [Google Scholar] [CrossRef]
- Vijayalakshmi, D.; Nath, M.K. A systematic approach for enhancement of homogeneous background images using structural information. Graph. Models 2023, 130, 101206. [Google Scholar] [CrossRef]
- Acharya, U.K.; Kumar, S. Image sub-division and quadruple clipped adaptive histogram equalization (ISQCAHE) for low exposure image enhancement. Multidimens. Syst. Signal Process. 2023, 34, 25–45. [Google Scholar] [CrossRef]
- Magudeeswaran, V.; Ravichandran, C.G. Fuzzy logic-based histogram equalization for image contrast enhancement. Math. Probl. Eng. 2013, 2013.1, 891864. [Google Scholar] [CrossRef]
- Rana, S.B. Performance evaluation of HE, AHE and fuzzy image enhancement. Int. J. Comput. Appl. 2015, 122. [Google Scholar]
- Kaur, J.; Kaur, A. Image contrast enhancement method based on fuzzy logic and histogram equalization. Int. Res. J. Eng. Technol. 2016, 3, 3089–3096. [Google Scholar]
- Kaur, T.; Sidhu, R.K. Optimized adaptive fuzzy based image enhancement techniques. International Journal of Signal Processing. Image Process. Pattern Recognit. 2016, 9, 11–20. [Google Scholar]
- Kumar, M.; Chatterjee, S.; Zhang, W.; Yang, J.; Kolbe, L.M. Fuzzy theoretic model based analysis of image features. Inf. Sci. 2019, 480, 34–54. [Google Scholar] [CrossRef]
- Onyedinma, E.; Onyenwe, I.; Inyiama, H. Performance Evaluation of Histogram Equalization and Fuzzy image Enhancement Techniques on Low Contrast Images. arXiv 2019, arXiv:1909.03957. [Google Scholar]
- Mayathevar, K.; Veluchamy, M.; Subramani, B. Fuzzy color histogram equalization with weighted distribution for image enhancement. Optik 2020, 216, 164927. [Google Scholar] [CrossRef]
- Khan, M.F.; Goyal, D.; Nofal, M.M.; Khan, E.; Al-Hmouz, R.; Herrera-Viedma, E. Fuzzy-based histogram partitioning for bi-histogram equalisation of low contrast images. IEEE Access 2020, 8, 11595–11614. [Google Scholar] [CrossRef]
- Kabir, M.; Mobin, J.; Hassanat, A.; Rahman, M.S. Image contrast enhancement using fuzzy technique with parameter determination using metaheuristics. arXiv 2023, arXiv:2301.12682. [Google Scholar]
- Tanaka, H.; Taguchi, A. Generalized Differential Gray-level Histogram Equalization. In Proceedings of the 2019 International Symposium on Intelligent Signal Processing and Communication Systems (ISPACS), Taipei, Taiwan, 3–6 December 2019; pp. 1–2. [Google Scholar]
- Raju, G.; Nair, M.S. A fast and efficient color image enhancement method based on fuzzy-logic and histogram. AEU-Int. J. Electron. Commun. 2014, 68, 237–243. [Google Scholar] [CrossRef]
- Kaur, T.; Sidhu, R.K. Performance evaluation of fuzzy and histogram based color image enhancement. Procedia Comput. Sci. 2015, 58, 470–477. [Google Scholar] [CrossRef]
- Jebadass, J.R.; Balasubramaniam, P. Low contrast enhancement technique for color images using interval-valued intuitionistic fuzzy sets with contrast limited adaptive histogram equalization. Soft Comput. 2022, 26, 4949–4960. [Google Scholar] [CrossRef]
- Jebadass, J.R.; Balasubramaniam, P. Color image enhancement technique based on interval-valued intuitionistic fuzzy set. Inf. Sci. 2024, 653, 119811. [Google Scholar] [CrossRef]
- Color Conversions (OpenCV). Available online: https://docs.opencv.org/4.x/de/d25/imgproc_color_conversions.html (accessed on 22 July 2024).
- Phuangsaijai, N.; Jakmunee, J.; Kittiwachana, S. Investigation into the predictive performance of colorimetric sensor strips using RGB, CMYK, HSV, and CIELAB coupled with various data preprocessing methods: A case study on an analysis of water quality parameters. J. Anal. Sci. Technol. 2021, 12, 19. [Google Scholar] [CrossRef]
- Fuzzy Logic—Image Contrast Enhancement. Available online: https://www.kaggle.com/code/nguyenvlm/fuzzy-logic-image-contrast-enhancement/notebook (accessed on 22 July 2024).
- Changing the Contrast and Brightness of an Image! (OpenCV). Available online: https://docs.opencv.org/3.4.1/d3/dc1/tutorial_basic_linear_transform.html (accessed on 22 July 2024).
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar]
- Wang, C.Y.; Yeh, I.H.; Liao, H.Y.M. YOLOv9: Learning what you want to learn using programmable gradient information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
Equipment | ||
---|---|---|
Influencing Factor | CCTV | Mobility |
Source | Fixed region camera | Mobile camera |
Lighting effect | Influenced by the timing (i.e., from 12:00 to 14:00) | Can be affected at any time |
Light source | Fixed source | Fixed and other facilities |
Data | |||||
---|---|---|---|---|---|
Truck | Video | Training | Validation | Testing | |
Quantity | 25 | 417 | 1480 (65.34%) | 357 (15.76%) | 428 (18.90%) |
Total 2265 |
Processing Image Files Using Python Imaging Library (PIL) Version 10.4.0 |
---|
if width ≥ 3840 and height ≥ 2160: return “Ultra HD” elif width ≥ 1920 and height ≥ 1080: return “Full HD” elif width ≥ 1280 and height ≥ 720: return “HD” elif width ≥ 640 and height ≥ 480: return “SD” else: return “Low Resolution” |
Fuzzy Rules |
---|
If input is VB, then output is MB If input is SB, then output is B If input is B, then output is VB If input is D, then output is VD If input is SD, then output is D If input is VD, then output is ED |
Resolution | Process | Method | MSE | PSNR |
---|---|---|---|---|
Low | Convert 640 × 360 to 360 × 360 | HE | 116.4422 | 27.4697 |
Joshi and Kumar’s fuzzy [40] | 116.2785 | 27.4758 | ||
Fuzzy enhancement | 62.5566 | 30.1681 | ||
Fuzzy enhancement with brightness adjustment (adjusted to 7) | 54.2062 | 30.7903 |
Original | Histogram Equalization Enhancement | Joshi and Kumar’s Fuzzy [40] | Fuzzy Enhancement | Fuzzy Enhancement with Brightness Adjustment (Adjusted to 7) | |
---|---|---|---|---|---|
Image |
Class | Images | Instances | Precision | Recall | [email protected] | [email protected]:0.95 | ||||
---|---|---|---|---|---|---|---|---|---|---|
YOLOv9 | YOLOv9 with Fuzzy Enhancement | YOLOv9 | YOLOv9 with Fuzzy Enhancement | YOLOv9 | YOLOv9 with Fuzzy Enhancement | YOLOv9 | YOLOv9 with Fuzzy Enhancement | |||
All | 357 | 381 | 0.861 | 0.928 | 0.884 | 0.891 | 0.898 | 0.919 | 0.694 | 0.708 |
Green | 232 | 0.915 | 0.911 | 0.94 | 0.94 | 0.967 | 0.961 | 0.75 | 0.765 | |
GreenLeft | 4 | 0.729 | 0.923 | 0.688 | 0.75 | 0.685 | 0.766 | 0.511 | 0.514 | |
Yellow | 30 | 0.944 | 0.965 | 0.933 | 0.926 | 0.989 | 0.987 | 0.779 | 0.791 | |
Red | 115 | 0.856 | 0.912 | 0.974 | 0.948 | 0.949 | 0.96 | 0.735 | 0.762 |
Methods | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
YOLOv9 with histogram equalization enhancement | 0.7430 | 0.8736 | 0.8325 | 0.8525 |
YOLOv9 | 0.7500 | 0.8770 | 0.8381 | 0.8571 |
YOLOv9 with fuzzy enhancement | 0.8248 | 0.9169 | 0.8914 | 0.9040 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Mu, C.-Y.; Kung, P. Enhancing the Image Pre-Processing for Large Fleets Based on a Fuzzy Approach to Handle Multiple Resolutions. Appl. Sci. 2024, 14, 8254. https://doi.org/10.3390/app14188254
Mu C-Y, Kung P. Enhancing the Image Pre-Processing for Large Fleets Based on a Fuzzy Approach to Handle Multiple Resolutions. Applied Sciences. 2024; 14(18):8254. https://doi.org/10.3390/app14188254
Chicago/Turabian StyleMu, Ching-Yun, and Pin Kung. 2024. "Enhancing the Image Pre-Processing for Large Fleets Based on a Fuzzy Approach to Handle Multiple Resolutions" Applied Sciences 14, no. 18: 8254. https://doi.org/10.3390/app14188254
APA StyleMu, C.-Y., & Kung, P. (2024). Enhancing the Image Pre-Processing for Large Fleets Based on a Fuzzy Approach to Handle Multiple Resolutions. Applied Sciences, 14(18), 8254. https://doi.org/10.3390/app14188254