UoA-eResearch / hololens_facial_recognition

A Unity hololens app to detect faces and display their attributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

While the app is running in Hololens, cannot perform live preview on browser at the same time.

ck4957 opened this issue · comments

Hi,
Your project works great and modified it to include face identification as well using face API.
The thing is I want to demo it to a group of people but the app crashes when I start the live preview in the browser. When i looked up for the solution, i found that this is the limitation of MRC https://developer.microsoft.com/en-us/windows/mixed-reality/mixed_reality_capture_for_developers#photo.2Fvideo_camera_access
Would like to know if there is any work around for this problem?

The "solution" is to temporarily toggle off the live stream when the app needs to use the camera. If you were super dedicated, you could in theory script this so that the live stream is dynamically paused when the app requests camera use.

The other alternative is to stream the hologram but not the camera view

@neon-ninja nice idea about dynamically pausing the live stream. Do you have any idea how that can be done?

@goofysth yeah -

  1. Extend the C# application a bit to include a websocket server. Clients should be able to connect to that server - and when there's a tap event, broadcast the presence of that event to all connected clients.
  2. Write some custom javascript (maybe a tampermonkey plugin) - that runs on the mixed reality capture page on the hololens web interface. This script should connect to the websocket server running on the same IP address as the interface. Listen for that broadcast event, and when it occurs, using javascript, temporarily stop the live stream for about 3 seconds? Maybe less, try lower thresholds until it doesn't work.