表示最近发现iphone 5s 用的HDR技术~  刚好又发现opencv 3.0是基于这个的,蛮感兴趣的于是翻译下

Today most digital images and imaging devices use 8 bits per channel thus limiting the dynamic range of the device to two orders of magnitude (actually 256 levels), while human eye can adapt to lighting conditions varying by ten orders of magnitude. When we take photographs of a real world scene bright regions may be overexposed, while the dark ones may be underexposed, so we can’t capture all details using a single exposure. HDR imaging works with images that use more that 8 bits per channel (usually 32-bit float values), allowing much wider dynamic range.

现在大多数图像用的是8比特每通道的图像设备,这限制设备的动态范围于两个数量级(256级),但是人眼可以适应10个数量级的光照变换。当我们照相时,图像亮的地方也许会过度曝光,图像暗的地方曝光不足,因此我们无法通过一次曝光获得所有的细节。HDR图像使用超过8比特每通道(通常是32比特浮点),允许更大的动态范围

There are different ways to obtain HDR images, but the most common one is to use photographs of the scene taken with different exposure values. To combine this exposures it is useful to know your camera’s response function and there are algorithms to estimate it. After the HDR image has been blended it has to be converted back to 8-bit to view it on usual displays. This process is called tonemapping. Additional complexities arise when objects of the scene or camera move between shots, since images with different exposures should be registered and aligned.

现在有许多种不同的方式去获得HDR图像,最常用的方式就是对于同一个场景使用不同的曝光值。把这些曝光值结合起来可以帮助了解你的相机对于环境的适应并可以用于预测。HDR图像生成之后,必须转化为8比特图像用于显示,这个过程叫做tonemapping。如果在照相的时候,物体或者场景移动了,那么计算量就会因为掺入了不同的曝光场景而增加.

In this tutorial we show how to generate and display HDR image from an exposure sequence. In our case images are already aligned and there are no moving objects. We also demonstrate an alternative approach called exposure fusion that produces low dynamic range image. Each step of HDR pipeline can be implemented using different algorithms so take a look at the reference manual to see them all.

在这篇教程里我们会告诉你怎样用曝光图像序列产生并且展示HDR图像。在我们的例子里,图像已经对其且没有运动物体。我们同时展示了另一种方法--exposure fusion,可以产生低动态范围的图像。HDR流程中的每一步都可以用不同的算法,所以可以去看下帮助文档

下面就是opencv教你做出好看的HDR图像的tutorial

http://docs.opencv.org/trunk/doc/tutorials/photo/hdr_imaging/hdr_imaging.html#hdrimaging

这是实验图片序列

这是源代码

#include <opencv2/photo.hpp>
#include <opencv2/highgui.hpp>
#include <vector>
#include <iostream>
#include <fstream>using namespace cv;
using namespace std;void loadExposureSeq(String, vector<Mat>&, vector<float>&);int main(int, char**argv)
{vector<Mat> images;vector<float> times;loadExposureSeq(argv[1], images, times);Mat response;Ptr<CalibrateDebevec> calibrate = createCalibrateDebevec();calibrate->process(images, response, times);Mat hdr;Ptr<MergeDebevec> merge_debevec = createMergeDebevec();merge_debevec->process(images, hdr, times, response);Mat ldr;Ptr<TonemapDurand> tonemap = createTonemapDurand(2.2f);tonemap->process(hdr, ldr);Mat fusion;Ptr<MergeMertens> merge_mertens = createMergeMertens();merge_mertens->process(images, fusion);imwrite("fusion.png", fusion * 255);imwrite("ldr.png", ldr * 255);imwrite("hdr.hdr", hdr);return 0;
}void loadExposureSeq(String path, vector<Mat>& images, vector<float>& times)
{path = path + std::string("/");ifstream list_file((path + "list.txt").c_str());string name;float val;while(list_file >> name >> val) {Mat img = imread(path + name);images.push_back(img);times.push_back(1 / val);}list_file.close();
}

结果

低动态范围图像

合成图像

OpenCV 3.0 高动态范围图像相关推荐

  1. 图像的打开、修改、显示和保存示例(OpenCV 2.0)

    代码如下: #include <opencv2/opencv.hpp> using namespace cv; int main( int argc, char** argv ) {cha ...

  2. OpenCV中的立体图像创建深度图

    OpenCV中的立体图像创建深度图 1. 效果图 2. 源码 参考 这篇博客将介绍如何从立体图像创建深度图. 1. 效果图 原图 VS 视差图效果如下: 可以看到结果受到高度噪音的污染.通过调整 nu ...

  3. 使用OpenCV和Python计算图像的“彩色度”

    使用OpenCV和Python计算图像"彩色度" 1. 效果图 2. 炫彩度量方法是什么? 3. 源代码 参考 你是否尝试过计算每个图像的炫彩值,并根据炫彩值对自己的图像数据集进行 ...

  4. 使用Python,OpenCV+OCR检测护照图像中的机器可读区域(MRZ Machine-Readable Zones)

    使用Python,OpenCV+OCR检测护照图像中的机器可读区域(MRZ Machine-Readable Zones) 1. 效果图 2. 原理 3. 源码 参考 这篇博客将介绍如何只使用基本的图 ...

  5. 使用OpenCV,Python进行图像哈希(差分哈希 dHash)处理

    使用OpenCV,Phthon进行图像哈希处理的一个重要应用是去除重复的图像: 当你有多个相册的图片,进行合并时,so boring,有一些图片是重复的,肉眼来看太难删除了. 图像哈希可以帮助你完美的 ...

  6. 千呼万唤始出来!OpenCV 4.0正式发布!

    作者 | 周强(本文为作者独立观点,转载请联系作者) 来源 | 我爱计算机视觉 OpenCV 4.0 正式版来啦! 重回英特尔的 OpenCV 终于迎来一次大版本更新,增加了诸多新特性,快来一起看看吧 ...

  7. OpenCV实现0到9数字识别OCR

    点击上方"小白学视觉",选择加"星标"或"置顶" 重磅干货,第一时间送达 使用OpenCV对0到9数字进行识别,实现简单OCR功能,基于CA ...

  8. 独家|OpenCV 1.6 改变图像的对比度和亮度!

    翻译:陈之炎 校对:吴金迪本文约2500字,建议阅读5分钟本文为大家介绍了OpenCV改变图像的对比度和亮度. 目标 在本教程中, 你将学习到以下内容: 访问像素值; 用零初始化矩阵; 学习CV :: ...

  9. opencv4 c++ 提取图片中的白色区域_修正!【从零学习OpenCV 4】分割图像——分水岭法...

    点击上方"小白学视觉",选择"星标"公众号重磅干货,第一时间送达 经过几个月的努力,小白终于完成了市面上第一本OpenCV 4入门书籍<OpenCV 4开 ...

  10. python opencv 在线读取网络图片图像资源

    opencv在线读取网络图片图像资源 照例打开opencv3.3.0-python3.6官方文档:  https://docs.opencv.org/master/d8/dfe/classcv_1_1 ...

最新文章

  1. 6 OC中 isa 和 superclass 的总结
  2. 2020 ACM Fellows 名单出炉,13 名华人入选,7 名来自国内!
  3. [原创]java WEB学习笔记86:Hibernate学习之路-- -映射 n-n 关系,单向n-n,双向n-n
  4. 运动估计算法的程序实现_偷天换日,逼真的天空置换算法
  5. python学习之认识字符串
  6. BigDecimal类基础
  7. Promolike Qualtrics Dashboard
  8. BookMarklet:瑞士军刀你用了吗?
  9. power of two java_LeetCode算法题-Power Of Two(Java实现)
  10. 使用 dojo/query
  11. Spring boot admin 升级到2.3.1 遇到的问题总结
  12. 2021瑞安高考成绩查询,温州教育网官网登录入口2021瑞安中考成绩查询中招查分系统...
  13. 【报告分享】人工智能2020:落地挑战与应对.pdf(附下载链接)
  14. 二十七、K8s最小服务漏洞1-PSP
  15. java02动手动脑
  16. 提供SCDN基础版本售卖
  17. 计算机修复开机按什么,电脑蓝屏修复按哪个健?
  18. pcb天线和纯铜天线_PCB天线是什么
  19. python 应用程序无法正常启动 000007b_Win7应用程序无法正常启动0x000007b怎么办?...
  20. 论文阅读:CCX-RAYNET: A CLASS CONDITIONED CONVOLUTIONAL NEURAL NETWORK FOR BIPLANAR X-RAYS TO CT VOLUME

热门文章

  1. 【学习KubeEdge】
  2. 【转】刨根究底字符编码之六——简体汉字编码中区位码、国标码、机内码、外码、字形码的区别及关系
  3. Postgresql计算月天数
  4. 威纶通触摸屏控制台达变频器
  5. 32位系统支持多大内存 Windows32位/64位系统最大支持内存详解
  6. [转载]铁路订票系统的简单设计
  7. matlab简单处理图像
  8. Java获取某年某月的第一天
  9. enum ordinal java_Spring 3.x自动将枚举的ordinal值转换为枚举类型
  10. 类比 -高速缓存Cache/内存/磁盘读写速度类比