设计的自动曝光算法得到适当的相机PARAM,剂量是否有意义(Designed auto exposu

2019-11-05 12:28发布

我想从得到的图片:

fnumber=6.3;
iso_list=[100,200,300,400,500,600,700,800];
shutterspeed_list=[1,1/2,1/3,1/4,1/5,1/6];

选择最佳的一对isoshutterspeed基于所述获得具有适当亮度(亮度= 150.0)图像曝光值 。

我想我能解决这样的:

  1. 设置desired_brightness=150.0 ,得到current_brightness基于图片
  2. 获取当前isoshutterspeed ,计算current_ev
  3. brightness_ratio=log2(desired_brightness)/log2(current_brightness)
  4. desired_ev=current_ev*brightness_ratio
  5. 得到shutterspeediso基础上, target_ev

下面是代码:

    def get_target_ev(self,cur_bright,tar_bright,shutterspeed,iso):
       f=6.3       
       bright_ratio=math.log(tar_bright,2)/math.log(cur_bright,2)
       cur_ev=math.log(f*f*shutterspeed,2)+math.log(iso/100.0,2)
       target_ev=cur_ev*bright_ratio
       return target_ev

是否有意义?

文章来源: Designed auto exposure algorithm to get a proper camera param,dose it make sense