HDRtools-OpenExr

转:http://blog.csdn.net/lqhbupt/article/details/7917764浏览器

OpenEXR是由工业光魔(Industrial Light& Magic)开发的一种HDR标准。OpenEXR文件的扩展名为.exr。关于EXR图片在Matlab中的使用,能够参考康奈尔大学Edgar Velázquez-Armendáriz所开发的工具HDRITools。下载地址为:https://bitbucket.org/edgarv/hdritools/downloadsapp

HDRITools是一系列处理HDR图片的工具。包括HDR图片浏览器,批处理tonemapper,OpenEXR的基本JNI绑定,以及Matlab读写OpenEXR文件的接口。dom

对于Matlab读写OpenEXR文件的接口,用户能够直接使用已编译好的Matlab代码函数,也能够选择本身手动编译。函数

对于使用预编译文件,能够选择下载:工具

HDRITools-0.3.0-20120419-x64.msi.net

或者blog

HDRITools-0.3.0-20120419-x86.msi接口

根据系统自主选择。图片

下载完毕后进行安装。我选择的彻底安装,安装后matlab代码所在目录为:
C:\ProgramFiles\Cornell PCG\HDRITools\matlabip

在Matlab路径中添加该路径File->Set Path...。便可使用其中的函数。例如,下面这个例子建立一个RGB通道32-bit浮点数的EXR图片。

 

[plain] view plain copy print ?
 
  1. % create new container map  
  2. exr_data = containers.Map();  
  3.   
  4. % create some data  
  5. M = randn(100, 100, 3);  
  6.   
  7. % create channels by creating keys for map  
  8. exr_data('R') = M(:,:,1);  
  9. exr_data('G') = M(:,:,2);  
  10. exr_data('B') = M(:,:,2);  
  11.   
  12. % write exr file with no compression ('none') and 32-bit floats ('single')  
  13. exrwritechannels('random.exr', 'none', 'single', exr_data);  

参考资料:http://michael-stengel.com/blog/?cat=24

本站公众号
   欢迎关注本站公众号,获取更多信息