UoA-eResearch / hololens_facial_recognition

A Unity hololens app to detect faces and display their attributes
MIT License
233 stars 53 forks source link

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

Open ck4957 opened 7 years ago

ck4957 commented 7 years ago

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?

neon-ninja commented 7 years ago

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.

neon-ninja commented 7 years ago

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

thepeaknick commented 6 years ago

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

neon-ninja commented 6 years ago

@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.