The Nuralogix DeepAffex™ SDK (DFX SDK) consists of:
libdfx
- a precompiled C library distributed as header files and binarieslibdfxcpp
- a C++ wrapper for libdfx, distributed as C++ source files and header filesThe 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 |
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
).
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.
In a terminal shell, run:
cd cpp
mkdir -p build && cd build
cmake ..
make -j4
In a terminal shell, run:
cd examples
mkdir -p build && cd build
cmake ..
make -j4
./example
The DFX SDK is compiled using Microsoft Visual Studio 2017 (x64). Visual Studio 2015 should also work but it's untested.
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.
In a cmd window, run:
cd cpp
mkdir build && cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
cmake --build . --config Release
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
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.