文章目录
彩色相机设置
彩色分辨率设置(TY_ENUM_IMAGE_MODE)
cpp
//可基于相机的彩色类型、分辨率来确定 可变参数TY_IMAGE_MODE_BAYER8GB_1280x960
TYSetEnum(hDevice, TY_COMPONENT_RGB_CAM, TY_ENUM_IMAGE_MODE, TY_IMAGE_MODE_BAYER8GB_1280x960);
彩色模拟增益(TY_INT_ANALOG_GAIN)
cpp
TYSetInt(hDevice, TY_COMPONENT_RGB_CAM, TY_INT_ANALOG_GAIN, 4);
彩色曝光(TY_INT_EXPOSURE_TIME)
TYSetInt(hDevice, TY_COMPONENT_RGB_CAM, TY_INT_EXPOSURE_TIME, value);
彩色增益
cpp
TYSetInt(hDevice, TY_COMPONENT_IR_CAM_LEFT, TY_INT_GAIN,value);
彩色畸变
cpp
TYSetBool(hDevice, TY_COMPONENT_IR_CAM_LEFT, TY_BOOL_UNDISTORTION, true);
深度相机
设置深度分辨率(TY_ENUM_IMAGE_MODE)
cpp
//基于相机分辨率来设定对应的
TYSetEnum(hDevice, TY_COMPONENT_DEPTH_CAM, TY_ENUM_IMAGE_MODE, TY_IMAGE_MODE_DEPTH16_640x480);
红外
红外畸变
cpp
TYSetBool(hDevice, TY_COMPONENT_IR_CAM_RIGHT, TY_BOOL_UNDISTORTION, true);
设备
激光自动开关
cpp
TYSetBool(hDevice, TY_COMPONENT_LASER, TY_BOOL_LASER_AUTO_CTRL, true);
激光强度
cpp
//设置前关闭自动开关
TYSetInt(hDevice, TY_COMPONENT_LASER, TY_INT_LASER_POWER, value);
持续生存状态(TY_BOOL_KEEP_ALIVE_ONOFF)
cpp
TYSetBool(hDevice, TY_COMPONENT_DEVICE, TY_BOOL_KEEP_ALIVE_ONOFF, false);
秩序生存状态超时(TY_INT_KEEP_ALIVE_TIMEOUT)
cpp
//2000-30000,单位:毫秒。默认15s
TYSetInt(hDevice, TY_COMPONENT_DEVICE, TY_INT_KEEP_ALIVE_TIMEOUT, value);
触发状态(TY_STRUCT_TRIGGER_PARAM)
cpp
TY_TRIGGER_PARAM trigger;
trigger.mode = TY_TRIGGER_MODE_OFF;
ASSERT_OK(TYSetStruct(hDevice, TY_COMPONENT_DEVICE, TY_STRUCT_TRIGGER_PARAM, &trigger,sizeof(trigger)));
RGBD异步(TY_ENUM_IMAGE_MODE)
cpp
TYSetEnum(hDevice, TY_COMPONENT_DEVICE, TY_ENUM_STREAM_ASYNC, TY_STREAM_ASYNC_ALL);
触发沿设置(TY_ENUM_TRIGGER_POL)
cpp
//上升沿
TYSetEnum(hDevice, TY_COMPONENT_DEVICE, TY_ENUM_TRIGGER_POL, TY_TRIGGER_POL_RISINGEDGE);
cpp
//下降沿
TYSetEnum(hDevice, TY_COMPONENT_DEVICE, TY_ENUM_TRIGGER_POL, TY_TRIGGER_POL_FALLINGEDGE);
获取采图超时时间(TY_INT_CAPTURE_TIME_US)
TYGetInt(hDevice, TY_COMPONENT_DEVICE, TY_INT_CAPTURE_TIME_US, &capture_time)