高通平台点光源(Spotlight)对焦逻辑
更新记录:
V1 2021.01.27 记录高通平台点光源对焦功能调试记录
关键字:
高通Qualcomm,CAF spotlight,点光源,
大概介绍:
生活场景中尤其是路灯、商场这些高亮且又小的光源,不管是密集但是单独稍大的光源,都是点光源,但是当前的BAF针对这种场景的FV计算效果不够好,导致其需要特殊逻辑处理使其对焦清晰,
一般来说高通的默认算法是先检测到是点光源,然后,切换到点光源专门滤波器再去CAF对焦;
因为普通的滤波器针对有过曝region的场景,其FV统计计算误差较大其不稳定,PDAF更是不稳定,因此才需要特殊场景特殊操作;
但是这种设计,比较过渡依赖Bayer filter的设计,一般采用的较高频段的IIR filter,但是不同的点光源其经过滤波器之后的FV表现也是不稳定的,因此为了稳定性,其改善方案是检测到点光源之后推到默认的超焦距位置,一般点光源的场景物距都较远,用景深来覆盖测试场景基本上是可以接受,
那我们要拆分下高通点光源功能有两个:
一、点光源的检测;
整个FOV分为16*16 block的背景亮度检测;
整个FOV分为64*48 block的饱和像素占比检测;
二、点光源的处理;
走专门的spotlight滤波器去搜索FV找peak;
点光源的参数如下:
<spotlightDetection>
<enable>false</enable>
<statsType>1</statsType>
<bgStatsThreshAutoConvertEnable>1</bgStatsThreshAutoConvertEnable>
<bgStatsBrightRegionSatRatioThresh>0.3</bgStatsBrightRegionSatRatioThresh>
<far_flat_th>0.55</far_flat_th>
<marco_flat_th>0.85</marco_flat_th>
<inc_flat_th>1.035</inc_flat_th>
<dec_flat_th>0.978</dec_flat_th>
<spotlight_zone_start_h>4</spotlight_zone_start_h>
<spotlight_zone_end_h>12</spotlight_zone_end_h>
<spotlight_zone_start_v>4</spotlight_zone_start_v>
<spotlight_zone_end_v>12</spotlight_zone_end_v>
<background_zone_start_h>2</background_zone_start_h>
<background_zone_end_h>14</background_zone_end_h>
<background_zone_start_v>2</background_zone_start_v>
<background_zone_end_v>14</background_zone_end_v>
<exposure_index_trigger_th>200</exposure_index_trigger_th>
<background_luma_avg_th>40</background_luma_avg_th>
<region_low_grey_th>30</region_low_grey_th>
<region_low_dark_th>10</region_low_dark_th>
<background_low_grey_pct_th>0.65</background_low_grey_pct_th>
<background_dark_grey_pct_th>0.25</background_dark_grey_pct_th>
<bright_region_luma_delta_background_zone>2</bright_region_luma_delta_background_zone>
<bright_region_luma_delta_spotlight_zone_low_grey>2.5</bright_region_luma_delta_spotlight_zone_low_grey>
<bright_region_luma_delta_spotlight_zone_dark_grey>3</bright_region_luma_delta_spotlight_zone_dark_grey>
<square_cluster_inc_size>1</square_cluster_inc_size>
<vertical_cluster_inc_size>2</vertical_cluster_inc_size>
<horizontal_cluster_inc_size>2</horizontal_cluster_inc_size>
<square_cluster_pct_th>0.8</square_cluster_pct_th>
<vertical_cluster_pct_th>0.2</vertical_cluster_pct_th>
<horizontal_cluster_pct_th>0.2</horizontal_cluster_pct_th>
<spotlight_detect_cnt_th>3</spotlight_detect_cnt_th>
</spotlightDetection>
下面详细介绍该功能及其参数;
以上,点光源的逻辑相对还比较好调试,前提还是看fullsweep是否准确,但是建议让高通加逻辑,检测到点光源之后,直接推到超焦距位置;