-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Stereolabs | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,47 @@ | ||
# Stereolabs ZED - C# Wrapper | ||
# Stereolabs ZED - C# API (beta) | ||
|
||
This repository shows how to use the ZED SDK functionalities in C#. | ||
|
||
|
||
## Getting started | ||
|
||
- First, download the latest version of the ZED SDK on [stereolabs.com](https://www.stereolabs.com/developers/release/). | ||
- For more information, read the ZED [API documentation](https://www.stereolabs.com/docs/api/index.html). | ||
|
||
## Prerequisites | ||
|
||
- Windows 10 64bits or later | ||
- **Windows** 10 64bits or later | ||
- Visual Studio 2017 with C# extensions | ||
- Cmake 3.8 at least (Support of C#) | ||
- [ZED SDK](https://www.stereolabs.com/developers/release/) and its dependency ([CUDA](https://developer.nvidia.com/cuda-downloads)) | ||
|
||
- [ZED SDK **3.1**](https://www.stereolabs.com/developers/release/) and its dependency ([CUDA](https://developer.nvidia.com/cuda-downloads)) | ||
|
||
## Instructions | ||
|
||
The C++ to C# is done the following way : | ||
- A C interface to the ZED SDK is provided in the Resources folder (sl_zed_interface.dll) | ||
- A .NET wrapper Stereolabs.zed that import the function from the dll interface (must be built) | ||
- You can then use the functions of the .NET wrapper in your program. | ||
The C++ to C# is done the following way : | ||
|
||
- A C interface to the ZED SDK is provided in the Resources folder (*sl_zed_interface.dll*, currently built for ZED SDK 3.1) | ||
- A .NET wrapper `Stereolabs.zed` that import the function from the dll interface (must be built) | ||
- You can then use the functions of the .NET wrapper in your program. | ||
|
||
### Build for .NET Wrapper | ||
Enter the Stereolabs.zed folder and generate the VS solution using cmake. | ||
Use Visual studio 2017 (at least) compiler in x64 mode. | ||
|
||
![Cmake](./Documentation/img/cmake_settings.jpg) | ||
|
||
Press configure and generate. | ||
1. Enter the Stereolabs.zed folder and generate the VS solution using cmake. | ||
**Use Visual studio 2017** (at least) compiler in **x64** mode. | ||
|
||
Open Stereolabs.zed.sln solution and build the solution. | ||
Make sure to build INSTALL so that both sl_zed_interface.dll and Stereolabs.zed.dll are copied into the ZED_SDK_ROOT_DIR/bin folder (usually C:/Program Files(x86)/ZED SDK/bin/). You might need admin rights to do that. | ||
![Cmake](./Documentation/img/cmake_settings.jpg) | ||
|
||
2. Press configure and generate. | ||
3. Open Stereolabs.zed.sln solution and build the solution. | ||
4. Make sure to build INSTALL so that both *sl_zed_interface.dll* and *Stereolabs.zed.dll* are copied into the *ZED_SDK_ROOT_DIR/bin* folder (usually *C:/Program Files(x86)/ZED SDK/bin/*). | ||
You might need admin rights to do that. | ||
|
||
### Build the tutorials | ||
Enter the tutorials folder and generate the Tutorials solution using cmake. | ||
Use the same settings at the .NET wrapper. (x64/ VS2017) | ||
|
||
Open Tutorials.sln solution and build it. | ||
Enter the tutorials folder and generate the Tutorials solution using cmake. | ||
Use the same settings at the .NET wrapper. (x64/ VS2017) | ||
|
||
Open Tutorials.sln solution and build it. | ||
|
||
### Deployment | ||
When the program is built, Stereolabs.zed.dll will be automatically copied into the build folder, because it is DoNet dependency. | ||
When deploying the application, make sure that sl_zed_interface.dll is packaged with the executable files, and shipped on a target PC that has the proper ZED SDK version installed. | ||
|
||
When the program is built, *Stereolabs.zed.dll* will be automatically copied into the build folder, because it is DoNet dependency. | ||
When deploying the application, make sure that *sl_zed_interface.dll* is packaged with the executable files, and shipped on a target PC that has the proper ZED SDK version installed. |