Robotic Weld Image Enhancement Based on Improved Bilateral Filtering and CLAHE Algorithm
Abstract
:1. Introduction
2. Algorithmic Flow
3. Improved CLAHE Algorithm
3.1. Improved Bilateral Filtering
- (1)
- Judge the similarity of the gray value of the pixel and the center point in the filter window based on the similarity. If the absolute value of the difference between the pixel and the center point pixel is less than /3, it is judged that is similar to , and the original value of is retained; otherwise, is 0;
- (2)
- Set the compensation function according to the number of similar points in the window. If the number of window pixels placed at 0 is less than 1/3 of the number of window pixels, set ; otherwise, follow step (3) to set it up;
- (3)
- Introduce variables , , and , which represent the minimum, maximum, and mean values of pixels in the filter window, respectively. Order . If , ; if , ; if , .
3.2. Improved CLAHE Algorithm
- (1)
- The image is divided into continuous, non-overlapping subblocks of , the values of m and n can be 4, 6, 8, 16, etc., and each subblock contains the number of pixels N.
- (2)
- The segmented subblock is processed with a Gaussian mask to obtain an image after secondary noise reduction.
- (3)
- Histogram equilibrium is performed on all subblocks obtained after splitting in step (1) to obtain its grayscale histogram, represented by .
- (4)
- Calculate its clipping amplitude T:
- (5)
- Crop the grayscale histogram and redistribute the image pixels. Each subblock histogram is cropped according to the amplitude T of the crop, and the pixels of the cropped part are reassigned to each gray level with the number of gray levels M. We set the total number of pixels beyond the crop amplitude T to S, and the pixels reassigned at each gray level to K, to obtain Equations (7) and (8).
- (6)
- As shown in Figure 5, the tile area of the original image is uniformized and adjusted, and the mapping relationship between the image pixels and the grayscale conversion function of the tile area is used to perform interpolation operations to solve the gray value of the corresponding pixels at the edge points of the tile area, and the calculation efficiency can be improved. Depending on the number of neighbors, bilinear interpolation is used when the change function is four reference points. When the change function is two points, single-linear interpolation is used. When the change function is a reference point, the gray value of the block is used. The calculation process is as follows, and the enhanced image (x) is obtained.
- (7)
- The gray value of the obtained image after secondary noise reduction and the enhanced image (x) is linearly different, highlighting the detailed high-frequency information, and the enhanced image (x) is obtained.
- (8)
- Finally, the resulting enhanced image (x) and (x) gray values are linearly superimposed to obtain the final enhanced image .
4. Experimental Results
4.1. Subjective Evaluation
4.2. Objective Evaluation
4.2.1. Peak Signal-to-Noise Ratio (PSNR)
4.2.2. Structural Similarity (SSIM)
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wei, H.; Wang, J.; Chen, M. Intersecting Line Trajectory Tracking Control of Robot Manipulators and Dynamic Simulation Based on Machine Vision. In Proceedings of the 2020 7th International Conference on Information Science and Control Engineering (ICISCE), Changsha, China, 18–20 December 2020. [Google Scholar]
- Wang, H.Y.; Li, X.; Li, X.N. Analysis of the application status and development of industrial robots. Mech. Electr. Technol. 2018, 115–117. [Google Scholar] [CrossRef]
- Won, C.S.; Shirani, S. Size-controllable region-of-interest in scalable image representation. IEEE Trans. Image Process. 2010, 20, 1273–1280. [Google Scholar] [PubMed]
- Chen, W.; Xiong, W.; Cheng, J.; Gu, Y.; Li, Y. Robotic Vision Inspection of Complex Joints for Automatic Welding. Int. Conf. Comput. Inf. Sci. 2018, 1, 246–251. [Google Scholar]
- Hou, L.; Zhang, H.; Mu, Y. Research and design of welding seam tracking control system. In Proceedings of the 2020 3rd World Conference on Mechanical Engineering and Intelligent Manufacturing (WCMEIM), Shanghai, China, 4–6 December 2020. [Google Scholar]
- Dos Santos, J.C.M.; Carrijo, G.A.; De Cardoso, C.F.d.S.; Ferreira, J.C.; Sousa, P.M.; Patrocínio, A.C. Fundus image quality enhancement for blood vessel detection via a neural network using CLAHE and Wiener filter. Res. Biomed. Eng. 2020, 36, 107–119. [Google Scholar] [CrossRef]
- Reza, A.M. Realization of the contrast limited adaptive histogram equalization (CLAHE) for real-time image enhancement. J. VLSI Signal Process. Syst. Signal Image. Video Technol. 2004, 38, 35–44. [Google Scholar] [CrossRef]
- Yu, C.; Peng, W.G. Recognition of Wood Plank Based on Local Adaptive Contrast Enhancement Algorithm. Inf. Comput. (Theor. Ed.) 2020, 32, 57–59. [Google Scholar]
- Guo, Y.L.; Dong, L.L.; Xu, W.H. Contrast Enhancement Algorithm for Fusion Edge Information. Infrared Technol. 2019, 41, 616–622. [Google Scholar]
- Fu, Q.Q.; Mehmet, C.; Wu, A.P. An improved algorithm based on CLAHE for ultrasonic well logging image enhancement. Clust. Comput. 2019, 22, 12609–12618. [Google Scholar]
- Zhou, G.F.; Liu, Y.Y.; Li, Z.F. Image enhancement of cloth defect point fused with homomorphic filtering and CLAHE algorithm. J. Zhongyuan Inst. Technol. 2021, 32, 28–33+57. [Google Scholar]
- Liu, Q.L.; Li, X.; Ming, X. Research and Implementation of CLAHE Algorithm Based on Bilinear Interpolation. J. Chengdu Univ. (Nat. Sci. Ed.) 2015, 34, 149–151. [Google Scholar]
- Singh, P.; Mukundan, R.; De Ryke, R. Feature Enhancement in Medical Ultrasound Videos Using Contrast-Limited Adaptive Histogram Equalization. J. Digit Imaging 2020, 33, 273–285. [Google Scholar] [CrossRef]
- Yu, F. Research on Contrast Enhancement Algorithm of Infrared Image Based on Bilateral Filtering. Inf. Logging Mater. 2021, 57–59. [Google Scholar] [CrossRef]
- Zhang, W.X.; Wang, C.G.; Wang, H.C.; Yin, X.F.; Zong, Z.Y. Improved Image Enhancement of CLAHE Cryptocarpus Leaf Slices. J. Agric. Mech. Res. 2022, 25–30. [Google Scholar] [CrossRef]
- Wei, D.Z.; Liang, G.M. Image enhancement algorithm for CLAHE microscopic cells based on improvement. Collections 2018, 10, 111–114. [Google Scholar]
- Shang, D.; Yang, Z.; Zhang, X.; Zheng, L.; Lv, Z. Research on low illumination coal gangue image enhancement based on improved Retinex algorithm. Int. J. Coal Prep. Util. 2022, 1–17. [Google Scholar] [CrossRef]
- Fang, X.; Wang, M.; Shamir, A.; Hu, S.M. Learning Explicit Smoothing Kernels for Joint Image Filtering. Comput. Graph. Forum 2019, 38, 181–190. [Google Scholar] [CrossRef]
- Zhang, Z.Q.; Wang, W.Y. An Improved Bilateral Filtering Algorithm. J. Image Graph. China 2009, 14, 443–447. [Google Scholar]
- Ji, S.H.; Hu, F.Y.; Zhang, W.; Wu, H.W. An Improved Denoising Algorithm for Bilateral Filtered Images. Comput. Eng. Appl. 2015, 51, 185–189. [Google Scholar]
- Yang, Y.L.; Li, J.Y.; Wang, Y.; Yu, Y.Q. Research on Deep Image Restoration Algorithm Based on Improved Bilateral Filtering. Adv. Lasers Optoelectron. 2020, 57, 216–222. [Google Scholar]
- Cheng, E. An Efficient Adaptive Bilateral Filtering Method. Digit. Technol. Appl. 2019. [Google Scholar] [CrossRef]
- Peng, H.L.; Deng, Y.; He, J.W.; Liu, B.; Wang, R.M. Research and Application of Denoising Method Based on Multi-window Adaptive Bilateral Filtering. Geophys. Prospect. Pet. 2019, 58, 63–70. [Google Scholar]
- He, W.; Wu, Q.L.S. Medical X-Ray Image Enhancement Based on Wavelet Domain Homomorphic Filtering and CLAHE. In Proceedings of the 2016 International Conference on Robots & Intelligent System (ICRIS), ZhangJiaJie, China, 27–28 August 2016. [Google Scholar]
- Li, L.; Li, W.J.; Wu, Y.Z. Underwater Image Enhancement Algorithm Based on Red Dark Channel Prior Theory and CLAHE Algorithm. Chin. J. Ship Res. 2019, 175–182. [Google Scholar] [CrossRef]
- Ma, J.Y.; Ye, B.; Wang, S.M. Vein Image Enhancement Algorithm Based on CLAHE and Multi-scale Detail Fusion. Semicond. Optoelectron. 2020. [Google Scholar] [CrossRef]
- Olvera, R.D.P.; Zeron, E.M.; Ortega, J.C.P.; Arreguin, J.M.R.; Hurtado, E.G. A Feature Extraction Using SIFT with a Preprocessing by Adding CLAHE Algorithm to Enhance Image Histograms. In Proceedings of the 2014 International Conference on Mechatronics, Electronics and Automotive Engineering (ICMEAE), Cuernavaca, Mexico, 18–21 November 2014. [Google Scholar]
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
Lu, P.; Huang, Q. Robotic Weld Image Enhancement Based on Improved Bilateral Filtering and CLAHE Algorithm. Electronics 2022, 11, 3629. https://doi.org/10.3390/electronics11213629
Lu P, Huang Q. Robotic Weld Image Enhancement Based on Improved Bilateral Filtering and CLAHE Algorithm. Electronics. 2022; 11(21):3629. https://doi.org/10.3390/electronics11213629
Chicago/Turabian StyleLu, Peng, and Qingjiu Huang. 2022. "Robotic Weld Image Enhancement Based on Improved Bilateral Filtering and CLAHE Algorithm" Electronics 11, no. 21: 3629. https://doi.org/10.3390/electronics11213629
APA StyleLu, P., & Huang, Q. (2022). Robotic Weld Image Enhancement Based on Improved Bilateral Filtering and CLAHE Algorithm. Electronics, 11(21), 3629. https://doi.org/10.3390/electronics11213629