Abstract
In some warning applications, such as aircraft taking-off and landing, ship sailing, and traffic guidance in foggy weather, the high definition (HD) and rapid dehazing of images and videos is increasingly necessary. Existing technologies for the dehazing of videos or images have not completely exploited the parallel computing capacity of modern multi-core CPU and GPU, and leads to the long dehazing time or the low frame rate of video dehazing which cannot meet the real-time requirement. In this paper, we propose a parallel implementation and optimization method for the real-time dehazing of the high definition videos based on a single image haze removal algorithm. Our optimization takes full advantage of the modern CPU+GPU architecture, which increases the parallelism of the algorithm, and greatly reduces the computational complexity and the execution time. The optimized OpenCL parallel implementation is integrate into FFmpeg as an independent module. The experimental results show that for a single image, the performance of the optimized OpenCL algorithm is improved approximately 500% compared with the existing algorithm, and approximately 153% over the basic OpenCL algorithm. The 1080p (1920 × 1080) high definition hazy video can also processed at a real-time rate (more than 41 frames per second).
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig1_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig2_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig3_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig4_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig5_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig6_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig7_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig8_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig9_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig10_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig11_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig12_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig13_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig14_HTML.gif)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11042-016-4036-4/MediaObjects/11042_2016_4036_Fig15_HTML.gif)
Similar content being viewed by others
References
AMD APP SDK OpenCL Programming Optimization Guide, http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_OpenCL_Programming_Optimization_Guide2.pdf
AMD APP SDK OpenCL Programming User Guide, http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_OpenCL_Programming_User_Guide2.pdf
Chao CHEN, Xinjue PENG, Lizhuang MA (2016) Real-time and adaptive video dehazing. Comput Eng Appl 52(6):150–155
Fang J, Sips H, Jaaskelainen P et al (2014) Grover: looking for performance improvement by disabling local memory usage in OpenCL kernels. 2014 43nd International Conference on Parallel Processing (ICPP). IEEE Computer Society, pp 162–171
Fang J, Sips H, Varbanescu AL (2013) Quantifying the performance impacts of using local memory for many-core processors. 2013 I.E. 6th International Workshop on Multi-/Many-core Computing Systems (MuCoCoS). IEEE Computer Society, pp 1–10
Fattal R (2008) Single image dehazing. ACM Trans Graph 27(3):1–9
FFmpeg, http://ffmpeg.org/
He K, Sun J, Tang X (2011) Single image haze removal using dark channel prior. Conference on Computer Vision and Pattern Recognition, pp 2341–2353
He K, Sun J, Tang X (2013) Guided image filtering. IEEE Trans Pattern Anal Mach Intell 35(6):1397–1409
Jang B, Schaa D, Mistry P et al (2010) Static memory access pattern analysis on a massively parallel GPU. Proc Pldi ACM
Jang B, Schaa D, Mistry P et al (2010) Exploiting memory access patterns to improve memory performance in data-parallel architectures. IEEE Trans Parallel Distrib Syst 22(1):105–118
Khronos OpenCL Working Group. The OpenCL Specification 1.2, http://www.khronos.org/registry/cl/specs/opencl-1.2.pdf
Leung ST, Zahorjan J (1995) Optimizing data locality by array restructuring. Technical Report TR 95-09-01, University of Washington
Liu Q, Chen M, Zhou D (2013) Fast haze removal from a single image. Control and Decision Conference, pp 3780–3785
Liu Q, Zhang H, Lin M et al (2011) Research on image dehazing algorithms based on physical model. Multimedia Technology (ICMT), 2011 International Conference on. IEEE, pp 467–470
Lv X, Chen W, Shen IF (2010) Real-time dehazing for image and video. Conference on Computer Graphics & Applications. IEEE Computer Society, pp 62–69
NVIDIA, NVIDIA CUDA C Programming Guide 4.2, http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf
Seo S, Lee J, Jo G et al (2013) Automatic OpenCL work-group size selection for multicore CPUs. Parallel Architectures and Compilation Techniques (PACT), 2013 22nd International Conference on. IEEE, pp 387–397
Shen J, Fang J, Sips H et al (2013) Performance traps in OpenCL for CPUs. Parallel, Distributed and Network-Based Processing (PDP), 2013 21st Euromicro International Conference on. IEEE, pp 38–45
Tan RT (2008) Visibility in bad weather from a single image. IEEE Conf. on Computer Vision and Pattern Recognition, pp 1–8
Tarel JP, Hautière N (2009) Fast visibility restoration from a single color or gray level image. Computer Vision, 2009 I.E. 12th International Conference on. IEEE, pp 2201–2208
Thoman P, Kofler K, Studt H et al (2011) Automatic OpenCL device characterization: guiding optimized kernel design. Euro-Par 2011 parallel processing. Springer, Berlin, pp 438–452
Xie B, Guo F, Cai Z (2010) Improved single image dehazing using dark channel prior and multi-scale retinex. Intelligent System Design and Engineering Application (ISDEA), 2010 International Conference on. IEEE, pp 848–851
Xue Y, Ren J, Su H et al (2013) Parallel implementation and optimization of haze removal using dark channel prior based on CUDA. High performance computing. Springer, Berlin, pp 99–109
Zhou L, Qin Z (2011) Uneven cloud and fog removing for satellite remote sensing image. Mechanic Automation and Control Engineering (MACE), 2011 Second International Conference on, pp 5485–5488
Acknowledgments
The authors are grateful to the editors and anonymous reviewers for their helpful feedback. The research was supported in part by the National Natural Science Foundation of China (Grant No. 61672218, Project Name: Virtual Multi-channel Asymmetry Parallel Model and Fair Scheduling Scheme for GPU).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Tan, H., He, X., Wang, Z. et al. Parallel implementation and optimization of high definition video real-time dehazing. Multimed Tools Appl 76, 23413–23434 (2017). https://doi.org/10.1007/s11042-016-4036-4
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-016-4036-4