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

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

相关推荐
丫头,冲鸭!!!7 分钟前
B树(B-Tree)和B+树(B+ Tree)
笔记·算法
Re.不晚11 分钟前
Java入门15——抽象类
java·开发语言·学习·算法·intellij-idea
老秦包你会14 分钟前
Qt第三课 ----------容器类控件
开发语言·qt
凤枭香16 分钟前
Python OpenCV 傅里叶变换
开发语言·图像处理·python·opencv
ULTRA??20 分钟前
C加加中的结构化绑定(解包,折叠展开)
开发语言·c++
听忆.27 分钟前
手机屏幕上进行OCR识别方案
笔记
远望清一色37 分钟前
基于MATLAB的实现垃圾分类Matlab源码
开发语言·matlab
confiself1 小时前
大模型系列——LLAMA-O1 复刻代码解读
java·开发语言
XiaoLeisj1 小时前
【JavaEE初阶 — 多线程】Thread类的方法&线程生命周期
java·开发语言·java-ee
杜杜的man1 小时前
【go从零单排】go中的结构体struct和method
开发语言·后端·golang