研究生: |
廖國峰 Liao, Kuo Feng |
---|---|
論文名稱: |
以OpenCL使用GPU加速local tone mapping顯示HDR影像 Using OpenCL with GPU to accelerate local tone mapping for High Dynamic Range Images |
指導教授: |
許雅三
Hsu, Yarsun |
口試委員: |
鐘太郎
JONG, TAI-LANG 邱瀞德 CHIU, CHING-TE |
學位類別: |
碩士 Master |
系所名稱: |
電機資訊學院 - 電機工程學系 Department of Electrical Engineering |
論文出版年: | 2015 |
畢業學年度: | 104 |
語文別: | 英文 |
論文頁數: | 64 |
中文關鍵詞: | 高動態範圍 、繪圖處理單元 、開放式運算語言 、色調映對 |
外文關鍵詞: | GPU, HDR, OpenCL, tone mapping |
相關次數: | 點閱:3 下載:0 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
近年來,HDR影像越來越普遍。許多手機或數位相機均具備拍攝HDR影像的功能。然而,當我們要顯示HDR影像時經常會碰上顯示的問題,若顯示裝置只能顯示有限動態範圍的影像,我們就必須將HDR影做處理來轉變為LDR影像,這個方法就是大眾所知的tone mapping。
本篇論文主要是修改一種local tone-mapping演算法,Adaptive Local Histogram Adjustment (ALHA),來顯示HDR影像。為了要保留較好的細節與對比,使用local tone mapping演算法會比使用global tone mapping演算法來的好。但是,為了保留細節與對比,local tone mapping演算法通常會需要較大量的計算,在顯示一張HDR影像時需要花更多時間。不過,在近幾年,對於GPU的應用越來越多,不僅僅是拿來繪圖而已,使用GPU來做大量計算處理也能得到不少加速。因此,將ALHA這個演算法做平行化並使用GPU來做計算將更容易達到即時顯示HDR影像。
對GPU的使用,目前主要分為兩個主流,CUDA與OpenCL。由於異質系統架構越來越多,我們選擇OpenCL來將ALHA這個演算法實作而不是使用CUDA。因為CUDA僅能使用Nvidia的GPU,而OpenCL則能使用不同平台的CPU或是GPU,在硬體選擇上就顯得彈性許多。
由於ALHA這個演算法能夠被高度平行化,當我們使用GPU來做計算時,能得到不少的加速。以1280*960的影像為例,單純使用CPU做計算跟使用GPU做計算來比較,我們能得到將近63倍的加速。然而,在檔案的輸入與輸出上無法做平行化,這部分成了目前的瓶頸。
Recently, HDR images are becoming more prevalent. Lots of mobile phone or digital camera could take HDR images. However, there is usually a problem when displaying HDR images. The display devices could only display an image with limit dynamic range. Therefore, people develop some methods to transfer HDR images to low dynamic range, which are known as tone mapping.
This work is revised from a local tone-mapping algorithm, Adaptive Local Histogram Adjustment (ALHA), to display high dynamic range (HDR) images. In order to reproduce images with better details and contrast, using the local tone-mapping operators is better than global operators. However, local tone mapping algorithm usually needs a huge amount of computation, it takes a long time to display a HDR image. Designing a highly parallel method and use Graphics Processing Unit (GPU) to accelerate computation would be the possible solutions to achieve a real-time display. In order to run on different heterogeneous systems, we choose OpenCL to implement instead of CUDA. Since CUDA could only use GPUs made by Nvidia, this limits system on choice of hardware.
Since the algorithm (ALHA) could be highly paralleled, we can gain a huge speedup when using GPU as accelerator. For a 1280X960 image, we can gain up to 63x. However, the final bottleneck of speedup is limited to the input and output an image.
[1] N. Corporation, ''Nvidia kepler gk110 architecture whitepaper," 2012.
[2] I. Advanced Micro Devices, \Amd graphics cores next (gcn) architecture whitepaper,"2012.
[3] Duan, Jiang, et al. "Tone-mapping high dynamic range images by novel histogram adjustment." Pattern Recognition 43.5 (2010): 1847-1862.
[4] Tumblin, Jack, and Holly Rushmeier. "Tone reproduction for realistic images."Computer Graphics and Applications, IEEE 13.6 (1993): 42-48.
[5] Ward, Greg. "A contrast-based scalefactor for luminance display." Graphics gems IV (1994): 415-421.
[6] Ferwerda, James A., et al. "A model of visual adaptation for realistic image synthesis." Proceedings of the 23rd annual conference on Computer graphics and interactive techniques. ACM, 1996.
[7] Larson, Gregory Ward, Holly Rushmeier, and Christine Piatko. "A visibility matching tone reproduction operator for high dynamic range scenes."Visualization and Computer Graphics, IEEE Transactions on 3.4 (1997): 291-306.
[8] Drago, Frédéric, et al. "Adaptive logarithmic mapping for displaying high contrast scenes." Computer Graphics Forum. Vol. 22. No. 3. Blackwell Publishing, Inc, 2003.
[9] Qiu, Guoping, Jiang Duan, and Graham D. Finlayson. "Learning to display high dynamic range images." Pattern recognition 40.10 (2007): 2641-2655.
[10] Tumblin, Jack, and Greg Turk. "LCIS: A boundary hierarchy for detail-preserving contrast reduction." Proceedings of the 26th annual conference on Computer graphics and interactive techniques. ACM Press/Addison-Wesley Publishing Co., 1999.
[11] Durand, Frédo, and Julie Dorsey. "Fast bilateral filtering for the display of high-dynamic-range images." ACM transactions on graphics (TOG) 21.3 (2002): 257-266.
[12] Li, Xiaoguang, Kin Man Lam, and Lansun Shen. "An adaptive algorithm for the display of high-dynamic range images." Journal of Visual Communication and Image Representation 18.5 (2007): 397-405.
[13] Li, Yuanzhen, Lavanya Sharan, and Edward H. Adelson. "Compressing and companding high dynamic range images with subband architectures." ACM transactions on graphics (TOG) 24.3 (2005): 836-844.
[14] Reinhard, Erik, et al. "Photographic tone reproduction for digital images." ACM Transactions on Graphics (TOG). Vol. 21. No. 3. ACM, 2002.
[15] Fattal, Raanan, Dani Lischinski, and Michael Werman. "Gradient domain high dynamic range compression." ACM Transactions on Graphics (TOG). Vol. 21. No. 3. ACM, 2002.
[16] Krawczyk, Grzegorz, Karol Myszkowski, and Hans-Peter Seidel. "Computational model of lightness perception in high dynamic range imaging."Electronic Imaging 2006. International Society for Optics and Photonics, 2006.
[17] Lischinski, Dani, et al. "Interactive local adjustment of tonal values." ACM Transactions on Graphics (TOG) 25.3 (2006): 646-653.
[18] Reinhard, Erik. "Parameter estimation for photographic tone reproduction."Journal of graphics tools 7.1 (2002): 45-51.
[19] Phil Rogers. "THE PROGRAMMER’S GUIDE TO THE APU GALAXY." AFDS keynote
[20] OpenCV org. "High Dynamic Range Imaging." [Online]. Available: http://docs.opencv.org/master/d3/db7/tutorial_hdr_imaging.html#gsc.tab=0
[21] HDR images database. [Online] Available: http://www.empamedia.ethz.ch/hdrdatabase/index.php
[22] Tian, Qiyuan, Jiang Duan, and Guoping Qiu. "Gpu-accelerated local tone-mapping for high dynamic range images." Image Processing (ICIP), 2012 19th IEEE International Conference on. IEEE, 2012.
[23] Roch, Benjamin, et al. "Interactive local tone mapping operator with the support of graphics hardware." Proceedings of the 23rd Spring Conference on Computer Graphics. ACM, 2007.