DFX SDK

The Nuralogix DeepAffex™ SDK (DFX SDK) consists of:

What is in the archive

The DFX SDK archive you have downloaded includes the following folders:

Folder Description Part of
bin DFX C Dynamic Link Library (Windows only) libdfx
cpp Sources and headers of the C++ wrapper library libdfxcpp
examples Example C++ code libdfxcpp
include DFX C library headers libdfx
lib DFX C shared library / Windows import library libdfx

Building

To build the C++ wrappers you will need CMake and a local OpenCV installation which CMake is able to locate.

Note: If you only want to use the C library (libdfx), you don't need to use OpenCV. The following steps are only needed to use the C++ wrappers (libdfxcpp).

Building on Linux / macOS

Obtaining OpenCV

For the latest version of OpenCV, you can build from GitHub sources.

Optionally, on Ubuntu, a package installation (of an older version of OpenCV) can be done with:

sudo apt install libopencv-dev

In general, we recommend building from sources.

Building libdfxcpp to use in your own application

In a terminal shell, run:

cd cpp
mkdir -p build && cd build
cmake ..
make -j4

Building and running the example

In a terminal shell, run:

cd examples
mkdir -p build && cd build
cmake ..
make -j4
./example

Building on Windows

The DFX SDK is compiled using Microsoft Visual Studio 2017 (x64). Visual Studio 2015 should also work but it's untested.

Obtaining OpenCV

You could compile your own from sources, or download and install the official precompiled binaries. Set an environment variable OpenCV_DIR pointing to the OpenCV build folder.

Building libdfxcpp to use in your own application

In a cmd window, run:

cd cpp
mkdir build && cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
cmake --build . --config Release

Building and running the example

In a cmd window, run:

cd examples
mkdir build && cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
cmake --build . --config Release
copy cpp\Release\dfxcpp.dll Release\
copy ..\..\bin\dfx.dll Release\
copy %OpenCV_DIR%\x64\vc15\bin\*.dll Release\
Release\example.exe

Replace vc15 above with vc14 if you are using VS2015

Example output

The output of running the example is several files which contain the data to be sent to the server. Specifically, the payload0.bin contains the binary payload and properties0.json contains the Server API DataRequest property values describing the payload, for the first chunk.

payload0.bin
properties0.json
metadata0.bin
etc.