question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access to RGB camera using Spin app

See original GitHub issue

Hi, I am also trying to perform tracking based on holojs and Spin capabilities but I can’t find a way to access to the Hololens camera. I notice someone mentioned it before in a closed issue #169:

@Almost-Done @xabuloes Yes I tried too and it works fine with the fix. Just a question, I tested successfully on SampleApps and ThreeJSApps but I can’t make it work on the HoloJSWebViewer, it can’t access the source “camera://local/default” through a Get. Any idea how to connect it to the webcam? (webcam and microphone capabilities added right ) Thanks!

Based on the code example of #169 issue, running on Spin, frame.onload is never called. I guess frame.src = "camera://local/default"; isn’t right or enough. Can you please tell me if there is another way. Thank you for your help.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Almost-Donecommented, Jul 27, 2019

Here’s a JS snippet:

    var imageElement = document.createElement('img');
    imageElement.onload = function(e) {
        let texture = new THREE.Texture( this );
        texture.needsUpdate = true;

        let material = new THREE.MeshBasicMaterial( {  map: texture } );
        let geometry = new THREE.BoxBufferGeometry(0.3, 0.3, 0.3);
        let cube = new THREE.Mesh(geometry, material);
        cube.position.z = -1.5;
        cube.position.y = 1.6;
        scene.add(cube);
    };

    imageElement.src = 'camera://local/default';

After onload fires, you can set the source again to ‘camera://local/default’ and onload will fire again with a new photo. However, this is inefficient; a better way would be to have camera as a source for a Video element and grab frames as needed.

1reaction
Almost-Donecommented, Jul 27, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Spin Access
Step 03: Open the Spin app. Find the Spin Access page by accessing the left hand menu bar. Check your Spin Access application...
Read more >
Spin App
Spin is transforming cities and communities by offering accessible, affordable and sustainable forms of personal mobility.
Read more >
No Frames Received in RealSense Viewer for RGB Camera ...
We have bought the Intel Realsense L515 Camera and wanted to record some 3D-Models with it. Until now I've only been trying to...
Read more >
How to RGB Like a Pro with iCUE - YouTube
Learn the basics of customizing your system-wide RGB lighting and more using CORSAIR iCUE software, with these helpful tips courtesy of ...
Read more >
Preliminary Validation of a Low-Cost Motion Analysis System ...
This paper introduces a low-cost and low computational marker-less motion capture system based on the acquisition of frame images through standard RGB cameras....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found