How to use SDK with Visual Studio 2017

This tutorial will create a project with Visual Studio 2017 to start using SDK.

You could find the project demo in <sdk>/platforms/projects/vs2017 directory.

Preparation

  • Windows: install the win pack of SDK

Create Project

Open Visual Studio 2017, then File > New > Project,

../_images/1_new_pro.png

Select “Windows Console Application”, set the project’s name and location, click “OK”,

../_images/2_new_pro.png

Finally, you will see the new project like this,

../_images/3_new_pro.png

Config Properties

Right click the project, and open its “Properties” window,

../_images/4_config.png

Change “Configuration” to “All Configurations”, then add the following paths to “Additional Include Directories”,

$(MYNTEYED_SDK_ROOT)\include
$(MYNTEYED_SDK_ROOT)\3rdparty\opencv\build\include
../_images/5_config_include.png

Add the following definitions to “Preprocessor Definitions”,

WITH_OPENCV
WITH_OPENCV3
../_images/6_config_definition.png

Add the following paths to “Additional Library Directories”,

$(MYNTEYED_SDK_ROOT)\lib
$(MYNTEYED_SDK_ROOT)\3rdparty\opencv\build\x64\vc15\lib
../_images/7_config_lib_dir.png

Add the following libs to “Additional Dependencies”,

mynteye_depth.lib
opencv_world343.lib
../_images/8_config_lib.png

Start using SDK

Include the headers of SDK and start using its APIs,

../_images/9_run_x64.png

Select “Release x64” to run the project.