Camera Feed | HoloLens


I am using Affectiva package to build my project for the HoloLens. I got the camera feed frames with the help of

The frames are saved as byte[] _latestImageBytes;
in HoloLensCameraStream/HoloLensVideoCaptureExample/Assets/CamStream/Examples/Video Panel Example/Scripts/VideoPanelApp.cs

How to integrate this with the our detector?

Is there any plans to support the HoloLens as a Native Platform?

If anyone has tried the package with the HoloLens; the contribution would be appreciated.


Hi, I’m not aware of anyone who has done HoloLens integration, but the main thing is that you create your Frame objects correctly. Depending on the format of the image data coming from HoloLens API, it might be necessary to do some conversion to the RGBA format expected by the Affectiva SDK.

See for details.


Hi again, I have built the project targeting the HoloLens and I used affdex-native.dll. I have got this in the log (while running it on the HoloLens):

Exception thrown: ‘System.DllNotFoundException’ in Assembly-CSharp.dll
Unable to load DLL ‘affdex-native’: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Affdex.WindowsNativePlatform.affdexProcessFrame(IntPtr handle, IntPtr rgba, Int32 w, Int32 h, Int32 orientation, Single timestamp)
at Affdex.WindowsNativePlatform.ProcessFrame(Byte[] rgba, Int32 w, Int32 h, Orientation orientation, Single timestamp)

Why it is unable to load the DLL?

The other thing is related to the frame process. However, I am using WebCamTexture and it works on the editor (it uses the laptop webcam) but when I run on the HoloLens it does not work.


Hi, regarding the DllNotFoundException, make sure the affdex-native DLL is on the search path at runtime. See the video at, particularly the step at about 17 minutes in, where Visual Studio is configured to copy that DLL to the output dir.


Sorry for bothering you but it is our graduation project :sweat_smile:

I believe the DllNotFoundException has been solved but I got another issue which is:

Failed to load ‘affdex-native.dll’, expected x86 architecture, but was Unknown architecture. You must recompile your plugin for x86 architecture.

I have used the x86 DLL and x86_64 but it gives the same as above.

I have tried to add a reference for Affdex.dll in the project solution but it shows

Note that:
Detector.Initialize: Starting affdex SDK using (MetroPlayerX86) Platform (Application.platform gives MetroPlayerX86)

Is there any plan to support WSAPlayerX86 by affectiva? Or how can I solve this issue?


Sorry, Windows Store Apps are not currently supported, as our SDK is based on .NET Framework rather than .NET Core. Is switching to WindowsPlayer an option?


I don’t think it is doable since the HoloLens just support UWP applications