Luxand FaceSDK – Using with .NET (C# and VB)

You need to have .NET Framework 4.0+ 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 include\.NET\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.FSDKCam namespace for webcam-related functions. You may refer just to FSDK and FSDKCam namespaces 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 FSDK_DetectFace function. To refer to this function in .NET, replace the FSDK_ prefix with FSDK. namespace. Thus, the reference to this function becomes FSDK.DetectFace (note that webcam-specific functions are located in the FSDKCam. namespace; refer to Working with 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 samples\advanced\.NET wrapper directory. The LiveRecognition sample includes projects for Microsoft C# 2005/2008 and Visual Basic .NET 2005/2008 that are using this wrapper.

 

Next chapterUsing CImage class in .NET

Contents

Get in touch

Luxand, Inc.
815 N. Royal St. Suite 202
Alexandria, VA
22314
USA
Freephone:
+1 800 471 5636

Join our newsletter

And always stay informed of the latest company news and events!

Sign up >>

DMCA.com Protection Status