Install ilmbase and openexr to default location /usr/local
Compile from within MATLAB:
mex exrread.cpp -lIlmImf -I/usr/local/include/OpenEXR -L/usr/local/lib
mex exrwrite.cpp -lIlmImf -I/usr/local/include/OpenEXR -L/usr/local/lib
mex exrinfo.cpp -lIlmImf -I/usr/local/include/OpenEXR -L/usr/local/lib
If OpenEXR is installed in another location (such as /sw), try these commands:
mex exrread.cpp -lIlmImf -lIex -lImath -lHalf -I/sw/include/OpenEXR -L/sw/lib
mex exrwrite.cpp -lIlmImf -lIex -lImath -lHalf -I/sw/include/OpenEXR -L/sw/lib
mex exrinfo.cpp -lIlmImf -lIex -lImath -lHalf -I/sw/include/OpenEXR -L/sw/lib
-- Usage --
Read image
>> im = exrread(filename);
Read image and alpha channel
>> [im,mask] = exrread(filename);
Image can be 1 or 3 channels of floating-point data
Mask will be 1.0 if there is no alpha channel in the file
Write image
>> exrwrite(im,filename)
Write image with mask in alpha channel
>> exrwrite(im,mask,filename)
Image can be 1 or 3 channels
Mask must be 1 channel the same size as the image
-- Details --
Does not support EXR images with uint16 data or float data
All data is returned as MATLAB type double
Negative, NaN, or Inf values in Y are set to 0 by exrwrite
Negative, NaN, or Inf in RGB or alpha are preserved by exrwrite
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MatlabEXR.zip (7个子文件)
MatlabEXR
exrread.m 405B
exrread.cpp 4KB
exrwrite.m 414B
exrwrite.cpp 3KB
exrinfo.m 341B
exrinfo.cpp 2KB
README.txt 1KB
共 7 条
- 1
资源评论
- 刻师傅2021-03-30这个怎么用呢?
- s54156s42016-09-18下载试试。希望好用。
- redghy1192016-09-22可用,刚好工作上做HDR的东西要用到这个算法。谢谢
xmjdh
- 粉丝: 501
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功