1、配置camera_custom_stero_setting.h
a、增加sensor配置
/vendor/mediatek/proprietary/custom/mt6765/hal/camera/camera_custom_stereo_setting.h
““Name”: “S5K3L6_MAIN_MIPI_RAW”,”
““Capture Size”: {”
““4:3”: [”
"“4160x3120"”
“],”
““16:9”: [”
"“4096x2304"”
“]”
“},”
““IMGOYUV Size”: {”
““4:3”: “4160x3120”,”
"“16:9”: “4096x2304"”
“},”
““RRZOYUV Size”: {”
““4:3”: “2560x1920”,”
"“16:9”: “2560x1440"”
“},”
““SensorScenarioZSD”: {”
““VSDoF”: “Capture”,”
““3rdParty”: “Capture”,”
““MtkDepthmap”: “Capture”,”
““MultiCam”: “Capture””
“},”
““FOV”: {”
““H”: 66.0,”
““V”: 52.2”
“},”
““Calibration”: {”
““Macro Distance”: 100,”
““Infinite Distance”: 5000”
“}”
b、增加sensor combination配置
““Logical Device”:{”
““Name”: “bayerbayer”,”
““Features”: [“VSDoF”]”
“},”
““Sensors”: [“S5K3L6_MAIN_MIPI_RAW”, “GC5025_MIPI_RAW”],”
““Module Type”: 3,”
““Position”: “Rear”,”
““Baseline”: 1.2,”
““LDC”: [“0”]”
“}”
2、配置metadata
在/vendor/mediatek/proprietary/custom/mt6765/hal/imgsensor_metadata/ 增加一个双摄的folder,命名为主摄sensorname+bayerbayer(bayermono)
例如:s5k2p7_mipi_raw_bayerbayer 里面的配置大部分与主摄相同,额外添加一些双摄的metadata,具体可参考6765下s5k2p7_mipi_raw_bayerbayer的配置
3、根据贵司项目的需求配置stereo mode
/vendor/mediatek/proprietary/custom/mt6765/hal/camera/camera_custom_stereo.cpp
// ===============================================
// 0: tk
// 1: pure 3rd
// 2: tk depth + 3rd
// ===============================================
int getStereoModeType()
{
return 0;
}
4、Debug
camera_custom_stereo_setting.h已配置好,可以在开机log中看到如下dualcam的logical device:
10-12 02:55:40.155 607 607 D MtkCam/Util/LogicalDevice: (607)[createDeviceMap] sensorNum : 3
10-12 02:55:40.155 607 607 D CustomLogicalDevice: Parse DEFAULT_STEREO_SETTING in camera_custom_stereo_setting.h
10-12 02:55:40.155 607 607 D CustomLogicalDevice: Name: bayerbayer
10-12 02:55:40.155 607 607 D CustomLogicalDevice: Sensor 0: SENSOR_DRVNAME_S5K3L6_MAIN_TS_MIPI_RAW
10-12 02:55:40.155 607 607 D CustomLogicalDevice: Sensor 1: SENSOR_DRVNAME_GC2375_JK_MIPI_RAW
10-12 02:55:40.155 607 607 D CustomLogicalDevice: NumofCombinSensor 2
10-12 02:55:40.155 607 607 D CustomLogicalDevice: vsdof
metadata有配置好,用mtk camera app打开,能看到如下log:
下adb命令开log:adb shell setprop vendor.debug.mtkcam.loglevel 4
09-05 12:31:38.663009 4073 4073 D CamAp_CameraApiHelper: idList length is 4
09-05 12:31:38.668051 4073 4073 D CamAp_CameraApiHelper: id is 3, physicalCameraIds [0, 2]