Add api doc of en

This commit is contained in:
John Zhao 2018-07-10 17:24:10 +08:00
parent d04078068a
commit 725a8c2e57
11 changed files with 2717 additions and 0 deletions

2494
doc/en/api.doxyfile Normal file

File diff suppressed because it is too large Load Diff

11
doc/en/mainpage.md Normal file
View File

@ -0,0 +1,11 @@
# MYNT EYE SDK {#mainpage}
* <a class="el" href="annotated.html">API Classes</a>
* <a class="el" href="modules.html">API Modules</a>
* \link enumerations Enumerations\endlink
* \link datatypes Datatypes\endlink
* \link utils Utiliities\endlink
* \link calibration Intrinsics & Extrinsics\endlink
* <span style="font-weight:bold">Device Specifications</span>
* @subpage specs_data
* @subpage specs_ctrl

View File

@ -0,0 +1,26 @@
# Control Protocols {#spec_control_api}
There are two control modes, one is through UVC standard protocol, the other is through UVC custom protocol with extension unit.
## Standard Protocol
| Name | Field | Bytes | Default | Min | Max | Stored | Flash Address | Note |
| :--- | :---- | :---- | :------ | :-- | :-- | :----- | :------------ | :--- |
| Gain | gain | 2 | 24 | 0 | 48 | √ | 0x12 | valid if manual-exposure |
| Brightness | brightness/exposure_time | 2 | 120 | 0 | 240 | √ | 0x14 | valid if manual-exposure |
| Contrast | contrast/black_level_calibration | 2 | 127 | 0 | 255 | √ | 0x10 | valid if manual-exposure |
## Custom Protocol
| Name | Field | Bytes | Default | Min | Max | Stored | Flash Address | Channel | Note |
| :--- | :---- | :---- | :------ | :-- | :-- | :----- | :------------ | :------ | :----- |
| Frame rate | frame_rate | 2 | 25 | 10 | 60 | √ | 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} |
| 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 exposure time | max_exposure_time | 2 | 240 | 0 | 240 | √ | 0x1B | XU_CAM_CTRL | valid if auto-exposure |
| Desired brightness | desired_brightness | 2 | 192 | 0 | 255 | √ | 0x19 | XU_CAM_CTRL | valid if auto-exposure |
| IR control | ir_control | 1 | 0 | 0 | 160 | × | - | XU_CAM_CTRL | |
| HDR mode | hdr_mode | 1 | 0 | 0 | 1 | √ | 0x1F | XU_CAM_CTRL | 0: 10-bit; 1: 12-bit |
| Zero drift calibration | zero_drift_calibration | | - | - | - | × | - | XU_HALF_DUPLEX | |
| Erase chip | erase_chip | | - | - | - | × | - | XU_HALF_DUPLEX | |

View File

@ -0,0 +1,53 @@
# Control Channels {#spec_control_channel}
| Name | Field | Address | Bandwidth | Node |
| :----- | :----- | :----- | :----- | :----- |
| Camera control channel | XU_CAM_CTRL_CHANNEL | 1 | 3 | |
| Half-Duplex channel | XU_HALF_DUPLEX_CHANNEL | 2 | 20 | |
| IMU write channel | XU_IMUDATA_WRITE_CHANNEL | 3 | 5 | |
| IMU read channel | XU_IMUDATA_READ_CHANNEL | 4 | 2000 | |
| File channel | XU_FILE_CHANNEL | 5 | 2000 | |
## Camera Control Channel
The channel provides get, set and query (min, max, default).
## Half-Duplex Channel
The channel only provides set, such as zero drift correction.
## IMU Channel
The channel is used to request and response IMU data, see @ref spec_imu_data.
## File Channel
The channel is used to read and write device information, image params, and IMU params.
| Name | Header | Size | File | Checksum |
| :--- | :- | :--- | :--- | :-------- |
| Bytes | 1 | 2 | - | 1 |
| Type | uint8_t | uint16_t | - | uint8_t |
| Description | Flags | Content size | Content data | Checksum, XOR of all content bytes |
| Header Bit Subscript | Description |
| :------------------- | :---------- |
| 0 | Device information |
| 1 | Image params |
| 2 | IMU params |
| 3~6 | Undefined |
| 7 | 0: Get; 1: Set |
### File Content Packet
| Name | ID | Size | Content |
| :--- | :- | :--- | :------ |
| Bytes | 1 | 2 | - |
| Type | uint8_t | uint16_t | - |
| Description | Content ID | Content size | Content data |
| File | ID | Max Size |
| :--- | :- | :------- |
| Device information | 1 | 250 |
| Image params | 2 | 250 |
| IMU params | 4 | 500 |

View File

@ -0,0 +1,14 @@
# Device Information {#spec_hardware_info}
| Name | Field | Fixed Value | USB Descriptor | UVC Extension Unit | Bytes | Note |
| :----- | :----- | :-------- | :-------------- | :----------------- | :-------- | :----- |
| VID | vid | 0x04B4 | √ | × | 2 | |
| PID | pid | 0x00F9 | √ | × | 2 | |
| Device name | name | MYNT-EYE-? | √ | √ Get | 16 | MYNT-EYE-S1000 |
| Serial number | serial_number | - | √ | √ Get | 16 | |
| Firmware version | firmware_version | - | √ | √ Get | 2 | major,minor |
| Hardware version | hardware_version | - | × | √ Get | 3 | major,minor,flag |
| Spec version | spec_version | - | × | √ Get | 2 | major,minor |
| Lens type | lens_type | - | × | √ Get/Set | 4 | vendor(2),product(2); default: 0 |
| IMU type | imu_type | - | × | √ Get/Set | 4 | vendor(2),product(2); default: 0 |
| Nominal baseline | nominal_baseline | - | × | √ Get/Set | 2 | unit: mm; default: 0 |

20
doc/en/spec_image_data.md Normal file
View File

@ -0,0 +1,20 @@
# Image Data {#spec_image_data}
| Name | Field | Unit | Bytes | Note |
| :----- | :----- | :----- | :-------- | :----- |
| Frame ID | frame_id | - | 2 | uint16_t; [0,65535] |
| Timestamp | timestamp | 10 us | 4 | uint32_t |
| Exposure Time | exposure_time | 10 us | 2 | uint16_t |
## Image Packet
| Name | Header | Size | Frame ID | Timestamp | Exposure Time | Checksum |
| :--- | :----- | :--- | :------- | :-------- | :------------ | :------- |
| Bytes | 1 | 1 | 2 | 4 | 2 | 1 |
| Type | uint8_t | uint8_t | uint16_t | uint32_t | uint16_t | uint8_t |
| Description | 0x3B | 0x08, content size | Frame ID | Timestamp | Exposure time | Checksum, XOR of all content bytes |
* The image packet will be dropped, if checksum is incorrect.
* The accuracy of the time unit: 0.01 ms / 10 us.
* The timestamp could indicate 11.9 hours, it will accumulate again after overflow.
* The timestamp accumulation starts from the time of power-on, instead of opening.

View File

@ -0,0 +1,23 @@
# Image Params {#spec_image_params}
## Image Intrinsics
| Name | Field | Unit | Bytes | Note |
| :----- | :----- | :----- | :-------- | :----- |
| Image width | width | px | 2 | uint16_t; [0,65535] |
| Image height | height | px | 2 | uint16_t; [0,65535] |
| Focal length | fx | - | 8 | double |
| ^ | fy | - | 8 | double |
| Principal point | cx | - | 8 | double |
| ^ | cy | - | 8 | double |
| Distortion model | model | - | 1 | uint8_t; pinhole,... |
| Distortion coefficients | coeffs[5] | - | 40 | double; k1,k2,p1,p2,k3 |
## Image Extrinsics
Transformation matrix from left image to right image.
| Name | Field | Unit | Bytes | Note |
| :----- | :----- | :----- | :-------- | :----- |
| Rotation matrix | rotation[3][3] | - | 72 | double |
| Translation vector | translation[3] | - | 24 | double |

42
doc/en/spec_imu_data.md Normal file
View File

@ -0,0 +1,42 @@
# IMU Data {#spec_imu_data}
## IMU Request Packet
| Name | Header | Serial Number |
| :--- | :----- | :------------ |
| Bytes | 1 | 4 |
| Type | uint8_t | uint32_t |
| Description | 0x5A | First request should be 0, otherwise the last one |
## IMU Response Packet
The IMU response packet contains multiple IMU packets, and each IMU packet contains multiple IMU segments.
| Name | Header | State | Size | IMU Packets | Checksum |
| :--- | :----- | :---- | :--- | :---------- | :------- |
| Bytes | 1 | 1 | 2 | ... | 1 |
| Type | uint8_t | uint8_t | uint16_t | - | uint8_t |
| Description | 0x5B | 0 is success, others are failed | Content size | IMU packets | Checksum, XOR of all content bytes |
### IMU Packet
The IMU packet is an array of IMU datas.
| Name | Serial Number | Timestamp | Count | IMU Datas |
| :--- | :------------ | :-------- | :---- | :-------- |
| Bytes | 4 | 4 | 1 | ... |
| Type | uint32_t | uint32_t | uint8_t | - |
| Description | Serial number | IMU basic timestamp | The number of IMU datas | IMU datas |
### IMU Segment
| Name | Offset | Frame ID | Accelerometer | Temperature | Gyroscope |
| :--- | :----- | :------- | :------------ | :---------- | :-------- |
| Bytes | 2 | 2 | 6 | 2 | 6 |
| Type | int16_t | uint16_t | int16_t * 3 | int16_t | int16_t * 3 |
| Description | The timestamp offset | Image frame ID | Accel x,y,z values | IMU temperature | Gyro x,y,z values |
* Formula for converting the accel & gyro values to real ones: **real = data * range / 0x10000** .
* ``accel`` default ``range`` is **8 g**, ``gyro`` default ``range`` is **1000 deg/s**.
* Formula for converting the temperature to real value: **real = data / ratio + offset** .
* default ``ratio`` is **326.8**, default ``offset`` is **25℃**.

23
doc/en/spec_imu_params.md Normal file
View File

@ -0,0 +1,23 @@
# IMU Params {#spec_imu_params}
## IMU Intrinsics
| Name | Field | Unit | Bytes | Note |
| :----- | :----- | :----- | :-------- | :----- |
| Scale matrix | acc_scale[3][3] | - | 72 | double |
| ^ | gyro_scale[3][3] | - | 72 | double |
| Zero-drift | acc_drift[3] | - | 24 | double |
| ^ | gyro_drift[3] | - | 24 | double |
| Noise density | acc_noise[3] | - | 24 | double |
| ^ | gyro_noise[3] | - | 24 | double |
| Random walk | acc_bias[3] | - | 24 | double |
| ^ | gyro_bias[3] | - | 24 | double |
## IMU Extrinsics
Transformation matrix from left image to IMU.
| Name | Field | Unit | Bytes | Note |
| :----- | :----- | :----- | :-------- | :----- |
| Rotation matrix | rotation[3][3] | - | 72 | double |
| Translation vector | translation[3] | - | 24 | double |

4
doc/en/specs_ctrl.md Normal file
View File

@ -0,0 +1,4 @@
# Device Control Specification {#specs_ctrl}
* @subpage spec_control_api
* @subpage spec_control_channel

7
doc/en/specs_data.md Normal file
View File

@ -0,0 +1,7 @@
# Device Data Specification {#specs_data}
* @subpage spec_hardware_info
* @subpage spec_image_params
* @subpage spec_imu_params
* @subpage spec_image_data
* @subpage spec_imu_data