Add frame rate 60

This commit is contained in:
kalman 2018-10-17 11:12:40 +08:00
parent 204fff2175
commit 1f96a6ee29
8 changed files with 10 additions and 7 deletions

View File

@ -14,7 +14,7 @@ There are two control modes, one is through UVC standard protocol, the other is
| Name | Field | Bytes | Default | Min | Max | Stored | Flash Address | Channel | Note | | Name | Field | Bytes | Default | Min | Max | Stored | Flash Address | Channel | Note |
| :--- | :---- | :---- | :------ | :-- | :-- | :----- | :------------ | :------ | :----- | | :--- | :---- | :---- | :------ | :-- | :-- | :----- | :------------ | :------ | :----- |
| Frame rate | frame_rate | 2 | 25 | 10 | √ | 0x21 | XU_CAM_CTRL | values: {10,15,20,25,30,35,40,45,50,55} | | Frame rate | frame_rate | 2 | 25 | 10 | √ | 0x21 | XU_CAM_CTRL | values: {10,15,20,25,30,35,40,45,50,55,60} |
| IMU frequency | imu_frequency | 2 | 200 | 100 | 500 | √ | 0x23 | XU_CAM_CTRL | values: {100,200,250,333,500} | | IMU frequency | imu_frequency | 2 | 200 | 100 | 500 | √ | 0x23 | XU_CAM_CTRL | values: {100,200,250,333,500} |
| Exposure mode | exposure_mode | 1 | 0 | 0 | 1 | √ | 0x0F | XU_CAM_CTRL | 0: enable auto-exposure; 1: manual-exposure | | Exposure mode | exposure_mode | 1 | 0 | 0 | 1 | √ | 0x0F | XU_CAM_CTRL | 0: enable auto-exposure; 1: manual-exposure |
| Max gain | max_gain | 2 | 48 | 0 | 48 | √ | 0x1D | XU_CAM_CTRL | valid if auto-exposure | | Max gain | max_gain | 2 | 48 | 0 | 48 | √ | 0x1D | XU_CAM_CTRL | valid if auto-exposure |

View File

@ -16,7 +16,7 @@
| 名称 | 字段 | 字节数 | 默认值 | 最小值 | 最大值 | 是否储存 | Flash 地址 | 所属通道 | 说明 | | 名称 | 字段 | 字节数 | 默认值 | 最小值 | 最大值 | 是否储存 | Flash 地址 | 所属通道 | 说明 |
| :----- | :----- | :-------- | :-------- | :-------- | :-------- | :----------- | :----------- | :----------- | :----- | | :----- | :----- | :-------- | :-------- | :-------- | :-------- | :----------- | :----------- | :----------- | :----- |
| 图像帧率 | frame_rate | 2 | 25 | 10 | √ | 0x21 | XU_CAM_CTRL | 步进为5即有效值为{10,15,20,25,30,35,40,45,50,55} | | 图像帧率 | frame_rate | 2 | 25 | 10 | √ | 0x21 | XU_CAM_CTRL | 步进为5即有效值为{10,15,20,25,30,35,40,45,50,55,60} |
| IMU 频率 | imu_frequency | 2 | 200 | 100 | 500 | √ | 0x23 | XU_CAM_CTRL | 有效值为{100,200,250,333,500} | | IMU 频率 | imu_frequency | 2 | 200 | 100 | 500 | √ | 0x23 | XU_CAM_CTRL | 有效值为{100,200,250,333,500} |
| 曝光模式 | exposure_mode | 1 | 0 | 0 | 1 | √ | 0x0F | XU_CAM_CTRL | 0开启自动曝光 1关闭 | | 曝光模式 | exposure_mode | 1 | 0 | 0 | 1 | √ | 0x0F | XU_CAM_CTRL | 0开启自动曝光 1关闭 |
| 最大增益 | max_gain | 2 | 48 | 0 | 48 | √ | 0x1D | XU_CAM_CTRL | 开始自动曝光,可设定的阈值 | | 最大增益 | max_gain | 2 | 48 | 0 | 48 | √ | 0x1D | XU_CAM_CTRL | 开始自动曝光,可设定的阈值 |

View File

@ -144,7 +144,7 @@ enum class Option : std::uint8_t {
/** /**
* Image frame rate, must set IMU_FREQUENCY together * Image frame rate, must set IMU_FREQUENCY together
* *
* values: {10,15,20,25,30,35,40,45,50,55}, default: 25 * values: {10,15,20,25,30,35,40,45,50,55,60}, default: 25
*/ */
FRAME_RATE, FRAME_RATE,
/** /**

View File

@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
// Attention: must set FRAME_RATE and IMU_FREQUENCY together, otherwise won't // Attention: must set FRAME_RATE and IMU_FREQUENCY together, otherwise won't
// succeed. // succeed.
// FRAME_RATE values: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 // FRAME_RATE values: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
api->SetOptionValue(Option::FRAME_RATE, 25); api->SetOptionValue(Option::FRAME_RATE, 25);
// IMU_FREQUENCY values: 100, 200, 250, 333, 500 // IMU_FREQUENCY values: 100, 200, 250, 333, 500
api->SetOptionValue(Option::IMU_FREQUENCY, 500); api->SetOptionValue(Option::IMU_FREQUENCY, 500);

View File

@ -224,7 +224,7 @@ void Channels::SetControlValue(const Option &option, std::int32_t value) {
} break; } break;
case Option::FRAME_RATE: { case Option::FRAME_RATE: {
if (!in_range() || if (!in_range() ||
!in_values({10, 15, 20, 25, 30, 35, 40, 45, 50, 55})) !in_values({10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}))
break; break;
XuCamCtrlSet(option, value); XuCamCtrlSet(option, value);
} break; } break;

View File

@ -100,6 +100,9 @@ float get_real_exposure_time(
case 55: case 55:
real_max = 16.325; real_max = 16.325;
break; break;
case 60:
real_max = 15;
break;
default: default:
LOG(ERROR) << "Invalid frame rate: " << frame_rate; LOG(ERROR) << "Invalid frame rate: " << frame_rate;
return exposure_time; return exposure_time;

View File

@ -99,7 +99,7 @@ def main():
# set_option_value # set_option_value
def set_rate(frame_rate=25, imu_frequency=500): # pylint: disable=unused-variable def set_rate(frame_rate=25, imu_frequency=500): # pylint: disable=unused-variable
# FRAME_RATE values: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 # FRAME_RATE values: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
api.set_option_value(mynteye.FRAME_RATE, frame_rate) api.set_option_value(mynteye.FRAME_RATE, frame_rate)
# IMU_FREQUENCY values: 100, 200, 250, 333, 500 # IMU_FREQUENCY values: 100, 200, 250, 333, 500
api.set_option_value(mynteye.IMU_FREQUENCY, imu_frequency) api.set_option_value(mynteye.IMU_FREQUENCY, imu_frequency)

View File

@ -54,7 +54,7 @@
<arg name="contrast" default="-1" /> <arg name="contrast" default="-1" />
<!-- <arg name="contrast" default="127" /> --> <!-- <arg name="contrast" default="127" /> -->
<!-- frame_rate range: {10,15,20,25,30,35,40,45,50,55} --> <!-- frame_rate range: {10,15,20,25,30,35,40,45,50,55,60} -->
<arg name="frame_rate" default="-1" /> <arg name="frame_rate" default="-1" />
<!-- <arg name="frame_rate" default="25" /> --> <!-- <arg name="frame_rate" default="25" /> -->