Chinaunix首页 | 论坛 | 博客
  • 博客访问: 182907
  • 博文数量: 50
  • 博客积分: 1053
  • 博客等级: 少尉
  • 技术积分: 577
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-05 22:55
文章分类

全部博文(50)

文章存档

2016年(2)

2015年(1)

2014年(6)

2012年(11)

2011年(22)

2010年(5)

2009年(3)

我的朋友

分类: C/C++

2014-06-08 21:35:40

【转】High Dynamic Range Imaging

R96944043 周伯相

2.Write a program to assemble an HDR image 2

第一次阅读分析:有印象的是,设计整个程序的流程,还有对于问题的分析处理

 

wps_clip_image-9401

wps_clip_image-18781

One of the picture from the images of different exposures
Exposure time 1/20 sec

The final image from my project #1 by Robertson method
tone mapping by PhotoMatrix

 

Project #1

High dynamic range (HDR) images have much larger dynamic ranges than traditional images' 256 levels. In addition, they correspond linearly to physical irradiance values of the scene.

1.Taking photographs

I take series of pictures with different exposures by using the SONY Cyber-shot DSC-W200 with a tripod.

2.Write a program to assemble an HDR image

Program brief:

Stand-alone executable program created & compiled by visual c++ 2005, with library zlImageLib , zlCore, zlGDIRDev , gsl , jhead

一句话:这里说到了主程序用的相关依赖库

I read the external data by using a file which define as follow:

//Weight table
Weight Triangle
Weight Gauss

//Method used to Recover Radiance map
Method Robertson
Method Debevec

//Source image, auto discover exposure time from EXIF of jpg
Image DSC01218.JPG
Image DSC01219.JPG
...........

//tonemap parameter
ToneExposure 1
ToneScalar 0.8


//for output filename
Response response.txt
HDRImage image.hdr
ToneImage tonemap.hdr

Processing of HDR.exe:

· I use zlImageLib to read source pictures (jpg format), store as unsigned-char images , and use jhead to read exposure time from the EXIF.

· I implement Ward's to do image alignment.

//当前,还不明白,图像对齐?image alignment

wps_clip_image-8677
exposure time 1/2 sec

wps_clip_image-22753

wps_clip_image-9404
exposure time 1/20 sec

wps_clip_image-29530

· Support 2 kind of weight table
wps_clip_image-26541 
Triangle weight table

wps_clip_image-14049

Gauss weight table

一句话:对以上权重table的认识,就是横轴是0-255亮度,纵轴是亮度统计图。

 

· I implement Paul Debevec's method and Mark A. Robertson's method to recovering radiance maps.

· 

Paul Debevec's method:
I translate his matlab code into c++ code, and using to solve SVD problem.
一句话:svd 暂时不知道
wps_clip_image-7853
other image created by Paul Debevec's method

Robertson's method:

wps_clip_image-6469

wps_clip_image-15609
Response curve by Robertson's method

 

 

3.Develop your radiance map using tone mapping

I use Photographic Tone Reproduction:

Find luminance by the following equation:
Lw=0.3R+0.59G+0.11B 

//一句话,这就是rgb 转yuv,我认为。

wps_clip_image-23318

wps_clip_image-23044

wps_clip_image-12951

Source pictures

暂时忽略

Radiance Map

暂时忽略

Recovering HDR Radiance Maps by Robertson's Algorithm in this case.

Final Image

wps_clip_image-17720
Apply tone mapping by Photomatrix

Other artifact

Problem Found

If the intensity of pictures with different exposures are almost the same, we can found some black holes like the following image. I found that both Paul Debevec's method and Robertson's method have the same problem.

一句话:这个环节可以关注

wps_clip_image-8951

I check each pixel of Radiance Maps in RGB channel, if the value is 0, then i check the same pixel of source images. If the intensity of the source image is greater then 128, then i reset the pixel value of Radiance Maps to maximum. the result

//这句话,反复体会

wps_clip_image-18636

wps_clip_image-23110

References

· Paul E. Debevec, Jitendra Malik, , SIGGRAPH 1997.

· Mark A. Robertson, Sean Borman, Robert L. Stevenson, , Journal of Electrinic Imaging April 2003.

· Erik Reinhard, Michael Stark, Peter Shirley, Jim Ferwerda, , SIGGRAPH 2002.

· Greg Ward, ,

 

阅读(2239) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~