camera manager功能是OSDK端口功能,与camera emu不一样。camera emu用于集成一个第三方相机负载挂载到M300上,OSDK端口的camera manager是用于对负载端口的相机进行控制。camera manager可以控制M300适配的DJI相机,也支持通过PSDK camera emu接入M300的相机。
camera manager的主要功能支持,拍照/录像、变焦等、可通过API访问并下载相机SD卡中的照片等文件。以主要适配的H20/T机型为例,功能列表如下:
功能(camera manager API) | H20/H20T |
---|---|
设置/获取相机工作模式(DjiCameraManager_SetMode) | √ |
设置/获取相机对焦模式(DjiCameraManager_SetFocusMode) | √ |
设置/获取曝光模式(DjiCameraManager_SetExposureMode) | √ |
设置/获取ISO(DjiCameraManager_SetISO) | √ |
设置/获取光圈(DjiCameraManager_SetAperture) | √ |
设置/获取快门(DjiCameraManager_SetShutterSpeed) | √ |
设置/获取EV(曝光补偿)(DjiCameraManager_SetExposureCompensation) | √ |
设置/获取分接缩放参数(DjiCameraManager_SetTapZoomMultiplier) | √ |
设置/获取分接缩放点(DjiCameraManager_TapZoomAtTarget) | √ |
设置/获取焦点 (DjiCameraManager_SetFocusTarget) | √ |
设置/获取拍摄照片模式(DjiCameraManager_SetShootPhotoMode) | √ |
拍摄单张照片(DjiCameraManager_StartShootPhoto) | √ |
设置/获取间隔拍摄参数(DjiCameraManager_SetPhotoTimeIntervalSettings) | √ |
拍摄间隔照片(DjiCameraManager_StartShootPhoto) | √ |
设置/获取自动包围曝光拍摄参数(DjiCameraManager_SetPhotoAEBCount) | × |
拍摄自动包围曝光照片(DjiCameraManager_StartShootPhoto) | × |
设置/获取连拍参数(DjiCameraManager_SetPhotoBurstCount) | × |
拍摄连拍照片(DjiCameraManager_StartShootPhoto) | × |
录制视频(DjiCameraManager_StartRecordVideo) | √ |
下载文件列表(DjiCameraManager_DownloadFileList) | √ |
下载媒体文件(DjiCameraManager_DownloadFileByIndex) | √ |
删除媒体文件(DjiCameraManager_DeleteFileByIndex) | √ |
说明:
-
camera manager主要是对相机负载的控制,主要是通过给相机下发指令,由相机完成相关动作执行。
-
拍照或录像照片均保存在SD卡中,因为OSDK主要是机载计算机的控制,用户一般不能直接查看,照片或录像文件并不能在机载计算机端预览。
-
OSDK可通过API对文件列表或文件主动下载或删除。
-
不支持的API主要与相机功能、API适配有关。
5.3.2 主要代码文件
sample代码文件
~/Payload-SDK-master/samples/sample_c/module_sample
camera_manager/
├── test_camera_manager.c
└── test_camera_manager.h
lib头文件
dji_camera_manager.h
5.3.3 sample代码实现
widget功能入口
widget线程DjiTest_WidgetInteractionTask中通过宏定义:E_DJI_SAMPLE_INDEX_CAMERA_MANAGER进入camera sample:
T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
E_DjiTestCameraManagerSampleSelect cameraManagerSampleSelect)
参数:
-
mountPosition,相机负载挂载云台位置
-
cameraManagerSampleSelect,选择要测试的相机功能,由枚举E_DjiTestCameraManagerSampleSelect定义
T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
E_DjiTestCameraManagerSampleSelect cameraManagerSampleSelect)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiReturnCode returnCode;
E_DjiCameraType cameraType;
T_DjiCameraManagerFirmwareVersion firmwareVersion;
T_DjiCameraManagerFocusPosData focusPosData;
T_DjiCameraManagerTapZoomPosData tapZoomPosData;
USER_LOG_INFO("Camera manager sample start");
DjiTest_WidgetLogAppend("Camera manager sample start");
USER_LOG_INFO("--> Step 1: Init camera manager module");
DjiTest_WidgetLogAppend("--> Step 1: Init camera manager module");
returnCode = DjiCameraManager_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init camera manager failed, error code: 0x%08X\r\n", returnCode);
goto exitCameraModule;
}
USER_LOG_INFO("--> Step 2: Get camera type and version");
DjiTest_WidgetLogAppend("--> Step 2: Get camera type and version");
returnCode = DjiCameraManager_GetCameraType(mountPosition, &cameraType);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get mounted position %d camera's type failed, error code: 0x%08X\r\n",
mountPosition, returnCode);
goto exitCameraModule;
}
USER_LOG_INFO("Mounted position %d camera's type is [cameraType:%d, i: %d]:%s",
mountPosition,
cameraType, DjiTest_CameraManagerGetCameraTypeIndex(cameraType), s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr);
returnCode = DjiCameraManager_GetFirmwareVersion(mountPosition, &firmwareVersion);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get mounted position %d camera's firmware version failed, error code: 0x%08X\r\n",
mountPosition, returnCode);
goto exitCameraModule;
}
USER_LOG_INFO("Mounted position %d camera's firmware is V%d.%d.%d.%d\r\n", mountPosition,
firmwareVersion.firmware_version[0], firmwareVersion.firmware_version[1],
firmwareVersion.firmware_version[2], firmwareVersion.firmware_version[3]);
E_DjiLiveViewCameraSource liveViewCameraSource;
if (cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_H20T) {
USER_LOG_INFO("--> Step 3: Change camera's live view source");
DjiTest_WidgetLogAppend("--> Step 3: Change camera's live view source");
USER_LOG_INFO("Init live view.");
returnCode = DjiLiveview_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init live view failed, error code: 0x%08X\r\n", returnCode);
goto exitLiveViewModule;
}
USER_LOG_INFO("Set mounted position %d camera's live view source to zoom.\r\n",
mountPosition);
liveViewCameraSource = (cameraType == DJI_CAMERA_TYPE_H20) ? DJI_LIVEVIEW_CAMERA_SOURCE_H20_ZOOM :
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_ZOOM;
returnCode = DjiLiveview_StartH264Stream((uint8_t) mountPosition, liveViewCameraSource, NULL);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set mounted position %d camera's live view source failed,"
"error code: 0x%08X\r\n", mountPosition, returnCode);
goto exitLiveViewSource;
}
}
switch (cameraManagerSampleSelect) {
...
}
初始化
/**
* @brief Initialise camera manager module, and user should call this function
* before using camera manager features.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_Init(void);
API简介:
-
初始化camera manager module,使用camera manager功能前需要先调用此API。
读取相机信息
-
读取相机型号
/**
* @brief Get camera type of the selected camera mounted position.
* @param position: camera mounted position
* @param cameraType: see references of E_DjiCameraType.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCameraType(E_DjiMountPosition position, E_DjiCameraType *cameraType);
API说明:
-
获取指定位置挂载相机的型号。
参数:
-
position,相机负载挂载的位置.
-
cameraType,读到position位置的相机类型
位置参数是输入参数,对应枚举定义
typedef enum {
DJI_MOUNT_POSITION_UNKNOWN = 0,
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1 = 1,
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2 = 2,
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3 = 3,
DJI_MOUNT_POSITION_EXTENSION_PORT = 4
} E_DjiMountPosition;
-
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1: 主云台接口,飞机(M300)朝向左侧,挂单云台时,通常也是这个位置
-
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2:副云台接口,飞机(M300)朝向右侧
-
DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3:上云台接口
-
DJI_MOUNT_POSITION_EXTENSION_PORT: OSDK设备挂载位置,此地方用不到
相机类型枚举定义:
/**
* @brief Camera type.
*/
typedef enum {
DJI_CAMERA_TYPE_UNKNOWN = 0, /*!< Camera type is unknown. */
DJI_CAMERA_TYPE_Z30 = 20, /*!< Camera type is Z30. */
DJI_CAMERA_TYPE_XT2 = 26, /*!< Camera type is XT2. */
DJI_CAMERA_TYPE_PSDK = 31, /*!< Camera type is third party camera based on Payload SDK. */
DJI_CAMERA_TYPE_XTS = 41, /*!< Camera type is XT S. */
DJI_CAMERA_TYPE_H20 = 42, /*!< Camera type is H20. */
DJI_CAMERA_TYPE_H20T = 43, /*!< Camera type is H20T. */
DJI_CAMERA_TYPE_P1 = 50, /*!< Camera type is P1. */
DJI_CAMERA_TYPE_L1, /*!< Camera type is L1. */
} E_DjiCameraType;
说明:
-
DJI_CAMERA_TYPE_PSDK为使用PSDK开发的第三方负载,其他见注释说明。
-
读取相机固件版本
/**
* @brief Get camera firmware version of the selected camera mounted position.
* @param position: camera mounted position
* @param firmwareVersion: see references of T_DjiCameraManagerFirmwareVersion.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFirmwareVersion(E_DjiMountPosition position,
T_DjiCameraManagerFirmwareVersion *firmwareVersion);
API说明:
-
获取指定位置挂载相机的固件版本。
参数:
-
position,相机负载挂载的位置。
-
firmwareVersion,读到position位置的相机固件版本。
定义在dji_camera_manager.h
typedef struct {
uint8_t firmware_version[4];
} T_DjiCameraManagerFirmwareVersion;版本号由4byte组成,存放数组结构,输出时按照V[0].[1].[2].[3]即可对应官方发布的版本号。
切换变焦镜头
切换镜头不是必要的动作,因为H20/T是多镜头相机。部分相机功能与相机特定相关,sample中有用到变焦功能测试,所以此处需要将镜头切换至变焦镜头。
主要API:
/**
* @brief Start the FPV or Camera H264 Stream by selected position.
* @param position: point out which camera to output the H264 stream
* @param source: point out which sub camera to output the H264 stream
* @param callback: callback function that is called in a callback thread when a new h264 frame is received
* @return Execution result.
*/
T_DjiReturnCode DjiLiveview_StartH264Stream(E_DjiLiveViewCameraPosition position, E_DjiLiveViewCameraSource source,
DjiLiveview_H264Callback callback);
API说明:
-
打开指定位置相机的视频流。
参数:
-
position,指定相机挂载位置
-
source,指定相机源(镜头)
-
callback,读取视频流回调
可以发现此API并不是相机功能模块中API,是liveview模块。我们在初始化步骤仅初始化了相机模块,所以在调用此API前需要先初始化实时视频流模块。
/**
* @brief Deinitialize the liveview module.
* @return Execution result.
*/
T_DjiReturnCode DjiLiveview_Init(void);
继续回到切换镜头,实际上这个API有耦合,此处仅需关注第二个参数即可。callback回调用于读取实时视频流,将在liveview模块中详解。
source枚举定义
/**
* @brief Liveview camera stream source.
*/
typedef enum {
DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT = 0,
DJI_LIVEVIEW_CAMERA_SOURCE_H20_WIDE = 1, //H20广角镜头
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_WIDE = 1, //H20T广角镜头
DJI_LIVEVIEW_CAMERA_SOURCE_H20_ZOOM = 2, //H20变焦镜头
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_ZOOM = 2, //H20变焦镜头
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_IR = 3 //H20T红外镜头
} E_DjiLiveViewCameraSource;
说明:
-
H20T比H20多一个红外镜头,具体可以参考H20系列相机产品手册。
功能测试
sample结合widget选择列表,定义了一系列的功能枚举,然后通过switch进入到特定的功能运行,也就是调用5.3.1功能部分介绍对应的API,不同功能使用基本一致,即调用API给相机发送指令即可。以第一个设置快门速度举例
功能枚举定义
typedef enum {
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_SHUTTER_SPEED,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_APERTURE,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_EV,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ISO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_FOCUS_POINT,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_TAP_ZOOM_POINT,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ZOOM_PARAM,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_SINGLE_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_AEB_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_BURST_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_INTERVAL_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_RECORD_VIDEO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_DOWNLOAD_AND_DELETE_MEDIA_FILE,
} E_DjiTestCameraManagerSampleSelect;
设置快门速度(E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_SHUTTER_SPEED)代码实现:
case E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_SHUTTER_SPEED: {
USER_LOG_INFO("--> Function a: Set camera shutter speed to 1/100 s");
DjiTest_WidgetLogAppend("--> Function a: Set camera shutter speed to 1/100 s");
if (cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_H20T) {
USER_LOG_INFO("Set mounted position %d camera's exposure mode to manual mode.",
mountPosition);
returnCode = DjiTest_CameraManagerSetExposureMode(mountPosition,
DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set mounted position %d camera's exposure mode failed,"
"error code: 0x%08X\r\n", mountPosition, returnCode);
goto exitLiveViewSource;
}
} else {
USER_LOG_INFO("Set mounted position %d camera's exposure mode to shutter priority mode.",
mountPosition);
returnCode = DjiTest_CameraManagerSetExposureMode(mountPosition,
DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set mounted position %d camera's exposure mode failed,"
"error code: 0x%08X\r\n", mountPosition, returnCode);
goto exitLiveViewSource;
}
}
USER_LOG_INFO("Set mounted position %d camera's shutter speed to 1/100 s.",
mountPosition);
returnCode = DjiTest_CameraManagerSetShutterSpeed(mountPosition,
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_100);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set mounted position %d camera's shutter speed failed,"
"error code: 0x%08X\r\n", mountPosition, returnCode);
goto exitLiveViewSource;
}
break;
}
设置曝光模式
对PSDK lib API再进行了一次封装,功能:先读取当前曝光模式,如果与预期模式一致,无需再设置。如不一致,再调用设置模式API去设置。
T_DjiReturnCode DjiTest_CameraManagerSetExposureMode(E_DjiMountPosition position,
E_DjiCameraManagerExposureMode exposureMode)
{
T_DjiReturnCode returnCode;
E_DjiCameraManagerExposureMode exposureModeTemp;
returnCode = DjiCameraManager_GetExposureMode(position, &exposureModeTemp);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS &&
returnCode != DJI_ERROR_CAMERA_MANAGER_MODULE_CODE_UNSUPPORTED_COMMAND) {
USER_LOG_ERROR("Get mounted position %d exposure mode failed, error code: 0x%08X",
position, returnCode);
return returnCode;
}
if (exposureModeTemp == exposureMode) {
USER_LOG_INFO("The mounted position %d camera's exposure mode is already what you expected.",
position);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
returnCode = DjiCameraManager_SetExposureMode(position, exposureMode);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS &&
returnCode != DJI_ERROR_CAMERA_MANAGER_MODULE_CODE_UNSUPPORTED_COMMAND) {
USER_LOG_ERROR("Set mounted position %d camera's exposure mode %d failed, current exposure is %d,"
" error code: 0x%08X", position, exposureMode, exposureModeTemp, returnCode);
}
return returnCode;
}
API 举例(set):
/**
* @brief Set camera's exposure mode of the selected camera mounted position.
* @note The different exposure modes define whether aperture, shutter speed,
* ISO can be set automatically or manually. Exposure compensation can be
* changed in all modes except manual mode where it is not settable.
* @param position: camera mounted position
* @param mode: see reference of E_DjiCameraManagerExposureMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetExposureMode(E_DjiMountPosition position,
E_DjiCameraManagerExposureMode mode);
API简介:
-
设置指定挂载位置相机的曝光模式,如果是录像模式,H20/H20T 变焦镜头曝光模式仅支持程序自动曝光,手动曝光,设置快门速度要先设置成手动曝光模式。
参数说明:
-
position,相机挂载位置
-
mode,预期设置的曝光模式
曝光模式枚举定义
/*! @brief the photo action of INTERVAL shooting photo mode
*/
typedef enum {
DJI_CAMERA_MANAGER_EXPOSURE_MODE_PROGRAM_AUTO = 1, /*!< Program mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY = 2, /*!< Shutter priority mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_APERTURE_PRIORITY = 3, /*!< Aperture priority mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL = 4, /*!< Manual mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_UNKNOWN = 0xFF /*!< The camera exposure mode is unknown. */
} E_DjiCameraManagerExposureMode;
设置光圈速度
同样也是对Lib API进行了一次封装,先读取当前快门速度值与预期设置值比对,若不一致才调用API设置。
T_DjiReturnCode DjiTest_CameraManagerSetShutterSpeed(E_DjiMountPosition position,
E_DjiCameraManagerShutterSpeed shutterSpeed)
{
T_DjiReturnCode returnCode;
E_DjiCameraManagerShutterSpeed shutterSpeedTemp;
returnCode = DjiCameraManager_GetShutterSpeed(position, &shutterSpeedTemp);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS &&
returnCode != DJI_ERROR_CAMERA_MANAGER_MODULE_CODE_UNSUPPORTED_COMMAND) {
USER_LOG_ERROR("Get mounted position %d camera's shutter speed failed, "
"error code: 0x%08X.", position, returnCode);
return returnCode;
}
if (shutterSpeedTemp == shutterSpeed) {
USER_LOG_INFO("The mounted position %d camera's shutter speed is already what you expected.",
position);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
returnCode = DjiCameraManager_SetShutterSpeed(position, shutterSpeed);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS &&
returnCode != DJI_ERROR_CAMERA_MANAGER_MODULE_CODE_UNSUPPORTED_COMMAND) {
USER_LOG_ERROR("Set mounted position %d camera's shutter speed %d failed, "
"error code: 0x%08X.", position, shutterSpeed, returnCode);
}
return returnCode;
}
API举例:
/**
* @brief Set camera's shutter value of the selected camera mounted position.
* @note Set the camera shutter speed. The shutter speed should not be set
* slower than the video frame rate when the camera's mode is RECORD_VIDEO.
* For example, if the video frame rate is 30fps, the shutterSpeed must be <=
* 1/30. Precondition: The shutter speed can be set only when the camera
* exposure mode is DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL mode or
* DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY
* @param position: camera mounted position
* @param shutterSpeed: see reference of E_DjiCameraManagerShutterSpeed.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetShutterSpeed(E_DjiMountPosition position,
E_DjiCameraManagerShutterSpeed shutterSpeed);
API简介:
-
设置第指定位置的相机的快门速度
参数说明:
-
position,指定相机挂载位置
-
shutterSpeed,预设定快门值,枚举E_DjiCameraManagerShutterSpeed指定。
设置的快门值应该小于相机出帧速率(单帧图像时间),如果相机视频流帧率为30fps,,那么设置的值需要小于等于 1/30。另外设置shutter speed需要先设置曝光模式为DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL 或DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY
5.3.4 开发注意事项
上述仅通过举例来阅读代码,sample中包含的其他功能API使用也建议阅读。阅读sample代码后,我们将相关信息提取出来。
-
DjiCameraManager_StartShootPhoto是拍照的通用接口,不同的拍照模式通过参数区分。设置模式后,要先对该模式的参数进行设置。比如间隔时间拍照,在调用DjiCameraManager_StartShootPhoto前,除先设置拍照模式,还需要设置间隔时间。
-
PSDK 3.0与M300,camera manager是通过USB通信,所以使用此功能,必须连接双A USB使用。
-
相机功能与相机支持强相关,功能是否支持以及特定功能需要先设定对应的模式,比如工作模式、拍照模式、曝光模式等。还需要确保镜头支持对应的功能,比如变焦镜头、红外镜头等。
-
不同的功能切换时,可能会涉及模式的转换。模式切换时,需要注意切换频率。如果频率太高,可能会导致相机处理不过来,功能触发失败。
-
每个功能API都有一个position参数用于输入挂载位置,即camera manager是用于对指定相机的操作。
-
下载照片文件是OSDK端主动访问相机SD卡并下载,相机照片不能直接保存在机载计算机上。而且OSDK访问相机SD卡时,涉及文件保护,不同使用APP和OSDK同时访问SD卡。
-
评论
0 条评论
请登录写评论。