Update samples, tools readme and guide doc

This commit is contained in:
John Zhao 2018-04-25 12:28:06 +08:00
parent 44364e7d82
commit 2dc470e14f
4 changed files with 83 additions and 12 deletions

View File

@ -11,12 +11,15 @@
## 依赖 ## 依赖
* [OpenCV](https://opencv.org/),用于显示图像。 * [OpenCV](https://opencv.org/),用于显示图像。
* 编译前可在系统终端Windows 命令提示符)里如下指定 OpenCV 路径,其为 `OpenCVConfig.cmake` 目录:
<!-- ```bash
```cmd # Linux, macOS
>set OpenCV_DIR=C:\opencv export OpenCV_DIR=~/opencv
# Windows
set OpenCV_DIR=C:\opencv
``` ```
-->
## 编译 ## 编译
@ -30,4 +33,11 @@ make samples
```bash ```bash
./samples/_output/bin/device/camera_d ./samples/_output/bin/device/camera_d
# Windows
.\samples\_output\bin\device\camera_d.bat
``` ```
## 结语
更多样例的说明,请见 `samples/README.md`

View File

@ -2,19 +2,39 @@
样例在 `<sdk>/tools` 目录,其提供一些有用的工具。 样例在 `<sdk>/tools` 目录,其提供一些有用的工具。
## 准备 ## 依赖
* [OpenCV](https://opencv.org/),部分工具需要。
* 编译前可在系统终端Windows 命令提示符)里如下指定 OpenCV 路径,其为 `OpenCVConfig.cmake` 目录:
```bash
# Linux, macOS
export OpenCV_DIR=~/opencv
# Windows
set OpenCV_DIR=C:\opencv
```
* Python 第三方库,脚本需要。
```bash
cd tools/
sudo pip install -r requirements.txt
```
## 编译
```bash ```bash
make tools make tools
cd tools/
sudo pip install -r requirements.txt
``` ```
## 录制数据集 ## 录制数据集
```bash ```bash
./tools/_output/bin/dataset/record ./tools/_output/bin/dataset/record
# Windows
.\tools\_output\bin\dataset\record.bat
``` ```
默认录制进 `dataset` 目录,加参数可指定该目录。 默认录制进 `dataset` 目录,加参数可指定该目录。
@ -46,6 +66,8 @@ python tools/analytics/stamp_analytics.py -i dataset -c tools/config/mynteye/myn
\includegraphics[width=0.6\textwidth,keepaspectratio]{stamp_analytics.png} \includegraphics[width=0.6\textwidth,keepaspectratio]{stamp_analytics.png}
\endlatexonly \endlatexonly
> 如果用 ROS ,分析脚本也支持 ROS Bag 格式。
## 结语 ## 结语
如果用 ROS ,分析脚本也支持 ROS Bag 格式。关于 ROS 的录制和分析,请见 `tools/README.md` 设备信息读写、校验码等更多工具的说明,请见 `tools/README.md`

View File

@ -1,5 +1,17 @@
# Samples for MYNT® EYE cameras # Samples for MYNT® EYE cameras
## Prerequisites
[OpenCV](https://opencv.org/),
```bash
# Linux, macOS
export OpenCV_DIR=~/opencv
# Windows
set OpenCV_DIR=C:\opencv
```
## Build ## Build
```bash ```bash
@ -11,4 +23,7 @@ make samples
```bash ```bash
./samples/_output/bin/device/camera_d ./samples/_output/bin/device/camera_d
# Windows
.\samples\_output\bin\device\camera_d.bat
``` ```

View File

@ -2,6 +2,16 @@
## Prerequisites ## Prerequisites
[OpenCV](https://opencv.org/),
```bash
# Linux, macOS
export OpenCV_DIR=~/opencv
# Windows
set OpenCV_DIR=C:\opencv
```
Python packages, Python packages,
```bash ```bash
@ -11,17 +21,22 @@ sudo pip install -r requirements.txt
[ROS](http://www.ros.org/) if using rosbag. [ROS](http://www.ros.org/) if using rosbag.
--- ## Build
## Record data (mynteye dataset)
```bash ```bash
cd <sdk> cd <sdk>
make tools make tools
``` ```
---
## Record data (mynteye dataset)
```bash ```bash
./tools/_output/bin/dataset/record ./tools/_output/bin/dataset/record
# Windows
.\tools\_output\bin\dataset\record.bat
``` ```
## Analytics data (mynteye dataset) ## Analytics data (mynteye dataset)
@ -79,18 +94,27 @@ python tools/analytics/stamp_analytics.py -i mynteye.bag
```bash ```bash
./tools/_output/bin/writer/device_info_writer tools/writer/config/device.info ./tools/_output/bin/writer/device_info_writer tools/writer/config/device.info
# Windows
.\tools\_output\bin\writer\device_info_writer.bat tools\writer\config\device.info
``` ```
### img_params_writer.cc ### img_params_writer.cc
```bash ```bash
./tools/_output/bin/writer/img_params_writer tools/writer/config/img.params ./tools/_output/bin/writer/img_params_writer tools/writer/config/img.params
# Windows
.\tools\_output\bin\writer\img_params_writer.bat tools\writer\config\img.params
``` ```
### imu_params_writer.cc ### imu_params_writer.cc
```bash ```bash
./tools/_output/bin/writer/imu_params_writer tools/writer/config/imu.params ./tools/_output/bin/writer/imu_params_writer tools/writer/config/imu.params
# Windows
.\tools\_output\bin\writer\imu_params_writer.bat tools\writer\config\imu.params
``` ```
--- ---