Luxand FaceSDK v8.3 Developer's Guide

Using with .NET (C# and VB)

You need to have .NET Framework 4.8+ on your system.

For Microsoft .NET applications, you need to add the .NET component into your project.

Follow these steps to add the component in Visual Studio 2010+:

  • Select Project - Add Reference - Browse
  • Choose the file Wrappers\dotNET\bin\FaceSDK.NET.dll
  • Add the following statement to the beginning of your application:
using Luxand

After that you may use the methods of the Luxand.FSDK namespace for general FaceSDK functions, and Luxand.Camera class for webcam-related functions. You may refer just to FSDK namespace if using Luxand is specified.

Once FaceSDK.NET.dll is added to the references, it will be redistributed automatically with your application, so no specific deployment actions are required. However you need to redistribute facesdk.dll (or libfsdk.so on Linux / libfsdk.dylib on macOS) with your application.

By default, the documentation refers to C/C++ declarations of FaceSDK functions. For example, the function to detect a face is referred to as FSDKDetectFace function. To refer to this function in .NET, replace the `FSDKprefix withFSDK.namespace. Thus, the reference to this function becomesFSDK.DetectFace(note that webcam-specific functions are located in theLuxand.Camera` class; refer to Working with Web Cameras for details).

If you are using an older version of .NET (for example, 2.0, 3.0 or 3.5) or just need a component for a specific .NET version, you may use the source code available in the Wrappers\dotNET directory.