We will want to allow people to write their own CV code and run it synchronously with WebXR. They may want to parallelize, but we might be able to just keep it simple.
For a while, we were talking about possibly exposing something like OpenVX (https://www.khronos.org/openvx/) so that apps could initialize native "CV graphics" in JS, but they would run nativing, with the option of adding "nodes" in JS/WebAssembly. We might still want to do that, but this might actually be a separate thing that somehow synchronizes with WebXR.
The basic requirement is that whatever data the platform can provide (and that the UA/user allows access to) gets passed to a method written in JS/WebAssembly. I'm not sure the "best" way to implement this (in polyfill or natively), but the idea of "Vision Workers" was floated by some folks. If we could have efficient shared buffers and worker sync, we could let users set up a worker, WebXR could pass it data and then call the program's rAF, the program would sync up with the worker as late as it can (allowing parallelization) and then get the data.
An initialize implementation would have us put JSARToolkit in a worker and pass WebRTC video frames to it.
We will want to allow people to write their own CV code and run it synchronously with WebXR. They may want to parallelize, but we might be able to just keep it simple.
For a while, we were talking about possibly exposing something like OpenVX (https://www.khronos.org/openvx/) so that apps could initialize native "CV graphics" in JS, but they would run nativing, with the option of adding "nodes" in JS/WebAssembly. We might still want to do that, but this might actually be a separate thing that somehow synchronizes with WebXR.
The basic requirement is that whatever data the platform can provide (and that the UA/user allows access to) gets passed to a method written in JS/WebAssembly. I'm not sure the "best" way to implement this (in polyfill or natively), but the idea of "Vision Workers" was floated by some folks. If we could have efficient shared buffers and worker sync, we could let users set up a worker, WebXR could pass it data and then call the program's rAF, the program would sync up with the worker as late as it can (allowing parallelization) and then get the data.
An initialize implementation would have us put JSARToolkit in a worker and pass WebRTC video frames to it.