In-sensor zoom功能调试笔记

和你一起终身学 习,这里是程序员Android

经典好文推荐,通过阅读本文,您将收获以下知识点:

一、In-sensor zoom 概述

二、如何开启 In-sensor zoom

2.1 开启 camxsettings.xml setting

2.2 多摄像头,需要添加特殊的逻辑

2.3 在 MetaTransitionTable 配置 sensorModeGroupId 的范围

2.4 在Sensor.xml 中设置兼容性 INSENSORZOOM

2.5 InSensor zoom log

一、In-sensor zoom 概述

  1. InSensor Zoom 不仅需要高通平台支持,而且需要Camera sensor 模组支持(需要跟Sensor FAE 确认)。

  2. 与正常的zoom 对比,Insensor zoom 使用full remosaic size mode 替换1/4 binng mode, 当zoom > 2x, sensor crop输出2x zoom.

二、如何开启 In-sensor zoom

2.1 开启 camxsettings.xml setting

vendor/qcom/proprietary/camx-common/settings/common/camxsettings.xml

设置 Enable In Sensor Zoom DefaultValue

go 复制代码
<setting>
   <Name>Enable In Sensor Zoom</Name>
   <Help>Settings to enable In sensor Zoom</Help>
   <VariableName>enableInSensorZoom</VariableName>
   <VariableType>BOOL</VariableType>
   <SetpropKey>vendor.debug.camera.enableInSensorZoom</SetpropKey>
   // 设置  Enable In Sensor Zoom DefaultValue 
   <DefaultValue>TRUE</DefaultValue>
   <Dynamic>FALSE</Dynamic>
   <Public>TRUE</Public>
 </setting>
2.2 多摄像头,需要添加特殊的逻辑

oem/qcom/multicamera/chimcxcameraconfig/configs/netrani/netrani.xml

配置 SensorMode Group id 是否否支持 Insensor zoom 1 支持 、0 不支持

go 复制代码
<!-- Transition Modes ============================================================== ====================-->
    <TransitionMode id="0" sensorModeGroupId="0" skipRate="0" physicalDeviceRef="UltrawidePhysicalCam" />
    <TransitionMode id="1" sensorModeGroupId="0" skipRate="0" physicalDeviceRef="WidePhysicalCam" />
    <TransitionMode id="2" sensorModeGroupId="0" skipRate="0" physicalDeviceRef="TelePhysicalCam" />
    <TransitionMode id="3" sensorModeGroupId="1" skipRate="0" physicalDeviceRef="WidePhysicalCam" />
    <TransitionMode id="4" sensorModeGroupId="1" skipRate="0" physicalDeviceRef="TelePhysicalCam" />
    <!-- Transition Tables ==================================================================================-->
2.3 在 MetaTransitionTable 配置 sensorModeGroupId 的范围
go 复制代码
<MetaTransitionTable id="2" metadata="zoomRatio" type="Float">
        <Transition  activeRangeStart="0.6" activeRangeEnd="0.9999"  hysteresisMinFactor="0.0" hysteresisMaxFactor="0.0" transition_modes="(0)"/>
        <Transition  activeRangeStart="1.0" activeRangeEnd="1.9999"  hysteresisMinFactor="0.0" hysteresisMaxFactor="0.0" transition_modes="(1)"/>
        <Transition  activeRangeStart="2.0" activeRangeEnd="2.9999"  hysteresisMinFactor="0.0" hysteresisMaxFactor="0.0" transition_modes="(3)"/>
        <Transition  activeRangeStart="3.0" activeRangeEnd="6.0999"  hysteresisMinFactor="0.0" hysteresisMaxFactor="0.0" transition_modes="(2)"/>
        <Transition  activeRangeStart="6.1" activeRangeEnd="120.01"  hysteresisMinFactor="0.0" hysteresisMaxFactor="0.0" transition_modes="(4)"/>
    </MetaTransitionTable>
2.4 在Sensor.xml 中设置兼容性 INSENSORZOOM

找FAE 要Sensor FAE 要一组 支持remosaic 的insensor zoom 的 resolution

go 复制代码
<!--res5 4624x3472_30fps for QCFA insensorzoom mode with remosaic enable -->
     <!--Frame dimension: contains xStart, yStart, width and height -->
     <frameDimension>
       <xStart>  </xStart>
       <yStart> </yStart>
       <width>4624</width>
       <height>3472</height>
     </frameDimension>
     
      <!--List of features / capabilities supported by sensor -->
      <capability>INSENSORZOOM</capability>
      <transitionGroups>BINCROP43 BINCROP169</transitionGroups>
      <RemosaicTypeInfo>NoRemosaic</RemosaicTypeInfo>
2.5 InSensor zoom log

log 关键字:
SetInSensorZoomInfo|PublishPerFrameSensorMetaData .*resID|ApplySensorUpdate

bEnableInSensorZoomMode: 1 表示成功开启Insensor Zooom

触发Insensorroom 后 会切换对应的senmode 的resolution(比如:从 mode 1-->mode 5 bEnableInSensorZoomMode: 1 )

go 复制代码
bEnableInSensorZoomMode: 1 
 01-01 18:53:41.468933  1501 11723 I CHIUSECASE: [CORE_CFG ] chifeature2graphselector.cpp:7391 SetInSensorZoomInfo() [InSensorZoom] cameraId:0 bEnableInSensorZoomMode: 0zoomStatusChanged = 0 requested zoomState: 1 m_inSensorZoomInfo.zoomState 1 appFrameIndex 91 size 3
 01-01 18:53:41.469350  1501 11723 I CHIUSECASE: [CORE_CFG ] chifeature2graphselector.cpp:7391 SetInSensorZoomInfo() [InSensorZoom] cameraId:3 bEnableInSensorZoomMode: 1zoomStatusChanged = 0 requested zoomState: 2 m_inSensorZoomInfo.zoomState 2 appFrameIndex 91 size 3

mode 1-->mode 5 
 01-01 18:53:28.041499  1501  3338 I CamX    : [CORE_CFG][SENSOR ] camxsensornode.cpp:2266 PublishPerFrameSensorMetaData() Sensor[3] AppliedGains: ReqId[11],... ... resID 1, ContextTypeID: 0
 01-01 18:53:28.185560  1501  3339 I CamX    : [CORE_CFG][SENSOR ] camxsensornode.cpp:2266 PublishPerFrameSensorMetaData() Sensor[3] AppliedGains: ReqId[12],... ... resID 1, ContextTypeID: 0
 01-01 18:53:28.293122  1501  3341 I CamX    : [CORE_CFG][SENSOR ] camxsensornode.cpp:2266 PublishPerFrameSensorMetaData() Sensor[3] AppliedGains: ReqId[13],... ... resID 1, ContextTypeID: 0
 01-01 18:53:28.440977  1501  3341 I CamX    : [CORE_CFG][SENSOR ] camxsensornode.cpp:2266 PublishPerFrameSensorMetaData() Sensor[3] AppliedGains: ReqId[14],... ... resID 1, ContextTypeID: 0
 01-01 18:53:28.775161  1501  3

参考文献:

【腾讯文档】Camera学习知识库

https://docs.qq.com/doc/DSWZ6dUlNemtUWndv

至此,本篇已结束。转载网络的文章,小编觉得很优秀,欢迎点击阅读原文,支持原创作者,如有侵权,恳请联系小编删除,欢迎您的建议与指正。同时期待您的关注,感谢您的阅读,谢谢!

相关推荐
MUTA️14 分钟前
RT-DETR学习笔记(2)
人工智能·笔记·深度学习·学习·机器学习·计算机视觉
好开心3333 分钟前
axios的使用
开发语言·前端·javascript·前端框架·html
codists36 分钟前
《计算机组成及汇编语言原理》阅读笔记:p82-p85
笔记
ladymorgana40 分钟前
【运维笔记】windows 11 中提示:无法成功完成操作,因为文件包含病毒或潜在的垃圾软件。
运维·windows·笔记
又蓝1 小时前
使用 Python 操作 Excel 表格
开发语言·python·excel
oneouto1 小时前
selenium学习笔记(一)
笔记·学习·selenium
余~~185381628001 小时前
稳定的碰一碰发视频、碰一碰矩阵源码技术开发,支持OEM
开发语言·人工智能·python·音视频
Am心若依旧4092 小时前
[c++11(二)]Lambda表达式和Function包装器及bind函数
开发语言·c++
明月看潮生2 小时前
青少年编程与数学 02-004 Go语言Web编程 20课题、单元测试
开发语言·青少年编程·单元测试·编程与数学·goweb
大G哥2 小时前
java提高正则处理效率
java·开发语言