Skip to content

Commit

Permalink
update ReadMe.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hzcyf committed Sep 14, 2023
1 parent cedcb55 commit 888026f
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 62 deletions.
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OrbbecSDK

![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.6.3-green)

The Orbbec 3D camera product software development kit,fully supports UVC, realizes driver-free plug-and-play, provides low-level and high-level simple and easy-to-use APIs, and helps developers use it flexibly in different scenarios.
Expand Down Expand Up @@ -42,45 +43,66 @@ Windows 10, Ubuntu 16.04/18.04/20.04, ARM Linux 32/64 bit (Raspberry Pi 4B, Jets

## Getting started

* Get source code
### Get source code

```bash
git clone https://github.com/OrbbecDeveloper/OrbbecSDK.git
```

* Build && install
### Environment setup

```bash
cd OrbbecSDK && mkdir build && cd build &&
cmake .. && make -j4
sudo make install # install to /usr/local
# you can run `sudo make uninstall` to uninstall
sudo ldconfig # refresh ld cache
```
* Linux:

* Run examples
Install udev rules file

```bash
# if you use linux, first install udev rules
sudo cp -r ./udev/* /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
cd build/examples/cpp && ./Sample-DepthViewer/OBDepthViewer
# or you can run /usr/local/bin/OBDepthViewer if you install to /usr/local
```
``` bash
cd OrbbecSDK/misc/scripts
sudo chmod +x ./install_udev_rules.sh
./install_udev_rules.sh
```

* Use OrbbecSDK in your CMake project
* Windows:

Timestamp registration: [follow this: obsensor_metadata_win10](misc\scripts\obsensor_metadata_win10.md)

### 4.3 Use OrbbecSDK in your CMake project

Put the OrbbecSDK directory in the subdirectory of your project, and load the OrbbecSDK in your CMakeLists.txt file like this:

```cmake
cmake_minimum_required(VERSION 3.1.15)
project(OrbbecSDKTest)
find_package(OrbbecSDK REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
add_subdirectory("your/path/to/OrbbecSDK")
target_link_libraries(${PROJECT_NAME} OrbbecSDK::OrbbecSDK)
```

* Write your code
## Examples

The sample code is placed in the `./examples` directory, user can be build by CMake.

### Build

```bash
cd OrbbecSDK && mkdir build && cd build &&
cmake .. && cmake --build . --config Release
```

### Run example

Connect Orbbec camera to you machine, and then run this:

``` bash
cd OrbbecSDK/build/bin # build output dir
./OBHelloOrbbec # OBHelloOrbbec.exe on Windows
```

## Documents

Please refer to the examples in the [examples directory](examples) for usage.
* API Reference: Use browse to open [doc/api/English/index.html](doc/api/English/index.html)
* Tutorial: placed in the `doc/tutorial` directory.

## Related links

Expand Down
90 changes: 49 additions & 41 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# OrbbecSDK
![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.6.3-green)

Orbbec 3D相机产品软件开发套件,全面支持UVC,实现免驱动即插即用,提供低层和高层简单易用的API,帮助开发者在不同场景下灵活使用。
Orbbec 3D 相机产品软件开发套件,全面支持 UVC,实现免驱动即插即用,提供低层和高层简单易用的 API,帮助开发者在不同场景下灵活使用。

此外,该SDK通过内置代码兼容Orbbec原有的OpenNI协议设备,开发者可以完全迁移到OrbbecSDK,一套代码即可支持Orbbec的新一代产品和老产品
此外,该 SDK 通过内置代码兼容 Orbbec 原有的 OpenNI 协议设备,开发者可以完全迁移到 OrbbecSDK,一套代码即可支持 Orbbec 的新一代产品和老产品

## 本仓库包含内容

* **library** : OrbbecSDK核心库文件和C/C++头文件。
* **examples** : C/C++示例工程源码
* **doc** : API参考文档和示例文档
* **driver** : Windows设备驱动,用于OpenNI协议设备(Dabai、Dabai DCW、Dabai DW、Astra mini Pro、Astra Pro Plus、A1 Pro、Gemini E、Gemini E Lite、Gemini),使用标准UVC协议的模块则无需安装驱动
* **scripts** : Linux udev规则,用于解决权限问题;Windows时间戳注册脚本,用于解决时间戳和元数据问题。
* **library** : OrbbecSDK 核心库文件和 C/C++ 头文件。
* **examples** : C/C++ 示例工程源码
* **doc** : API 参考文档和示例文档
* **driver** : Windows 设备驱动,用于 OpenNI 协议设备(Dabai、Dabai DCW、Dabai DW、Astra mini Pro、Astra Pro Plus、A1 Pro、Gemini E、Gemini E Lite、Gemini),使用标准 UVC 协议的模块则无需安装驱动
* **scripts** : Linux udev 规则,用于解决权限问题;Windows 时间戳注册脚本,用于解决时间戳和元数据问题。

## 支持平台

Windows 10, Ubuntu 16.04/18.04/20.04, ARM Linux 32/64 bit (Raspberry Pi 4B, Jetson Nano, A311D 等.)

*Windows 11, Ubuntu 22.04 和其他一些Linux平台理论上也支持,但是未经过完整测试”
*Windows 11, Ubuntu 22.04 和其他一些 Linux 平台理论上也支持,但是未经过完整测试”

## 支持产品

| **产品列表** | **固件版本** |
| ** 产品列表 ** | ** 固件版本 ** |
| --- | --- |
| Astra2 | 2.8.20 |
| Gemini2 L | 1.4.32 |
Expand All @@ -44,47 +44,55 @@ Windows 10, Ubuntu 16.04/18.04/20.04, ARM Linux 32/64 bit (Raspberry Pi 4B, Jets

* 获取源码

```bash
git clone https://github.com/OrbbecDeveloper/OrbbecSDK.git
```
```bash
git clone https://github.com/OrbbecDeveloper/OrbbecSDK.git
```

* 编译和安装
* 环境配置
Linux: 安装 udev rules 文件

```bash
cd OrbbecSDK && mkdir build && cd build &&
cmake .. && make -j4
sudo make install # install to /usr/local
# you can run `sudo make uninstall` to uninstall
sudo ldconfig # refresh ld cache
```
``` bash
cd OrbbecSDK/misc/scripts
sudo chmod +x ./install_udev_rules.sh
./install_udev_rules.sh
```
Windows: 时间戳注册: [follow this: obsensor_metadata_win10](misc\scripts\obsensor_metadata_win10.md)


* 编译

```bash
cd OrbbecSDK && mkdir build && cd build &&
cmake .. && cmake --build . --config Release
```

* 运行示例

```bash
# if you use linux, first install udev rules
sudo cp -r ./udev/* /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
cd build/examples/cpp && ./Sample-DepthViewer/OBDepthViewer
# or you can run /usr/local/bin/OBDepthViewer if you install to /usr/local
```

* 在你的工程中使用OrbbecSDK

```cmake
cmake_minimum_required(VERSION 3.1.15)
project(OrbbecSDKTest)
find_package(OrbbecSDK REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} ${OrbbecSDK_LIBS})
target_include_directories(${PROJECT_NAME} ${OrbbecSDK_INCLUDE_DIRS})
```
```bash
cd OrbbecSDK/build/bin # build output dir
./OBHelloOrbbec # OBHelloOrbbec.exe on Windows
```

* 在你的工程中使用 OrbbecSDK

将 OrbbecSDK 拷贝到你的 CMake 工程子目录下,再 CMake 配置中增加如下配置:

```cmake
cmake_minimum_required(VERSION 3.1.15)
project(OrbbecSDKTest)
add_executable(${PROJECT_NAME} main.cpp)
add_subdirectory("your/path/to/OrbbecSDK")
target_link_libraries(${PROJECT_NAME} OrbbecSDK::OrbbecSDK)
```

* 编写代码

请参考示例代码[examples directory](examples) 完成您的应用代码编写。
请参考示例代码 [examples directory](examples) 完成您的应用代码编写。

## 相关链接

* [3D视觉开发者社区](https://developer.orbbec.com.cn/)
* [OrbbecSDK主页](https://developer.orbbec.com.cn/develop_details.html?id=1)
* [3D 视觉开发者社区](https://developer.orbbec.com.cn/)
* [OrbbecSDK 主页](https://developer.orbbec.com.cn/develop_details.html?id=1)

0 comments on commit 888026f

Please sign in to comment.