Open luispuig opened 5 years ago
@MarcelKlammer any idea? thanks.
I didn't look into that in much detail.
But a simple test.js that does roughly this:
var brfv4 = brfv4 || {
ENVIRONMENT: "WORKER"
};
self.addEventListener('message', function(e) {
console.log("w", e);
//self.postMessage(e.data);
}, false);
importScripts("BRFv4_JS_TK190218_v4.0.5_trial.js");
initializeBRF(brfv4);
seem to produce no error while loading as a worker.
I don't know when I will have the time to look into it more deeply.
Just added minimalWebcamWorker.html + BRFv4_JS_TK210219_v4.2.0_trial.worker.js
Please take a look and let me know, if that works for you.
@MarcelKlammer thanks for the example.
It seems to load, but it fails when I try to config it:
resolution = new brfv4.Rectangle(0, 0, 640, 480);
BRFManager = new brfv4.BRFManager();
BRFManager.init(resolution, resolution, 'com.tastenkunst.brfv4.js.examples.minimal.webcam');
BRFManager.setMode(brfv4.BRFMode.FACE_TRACKING);
BRFManager.setNumFacesToTrack(1);
BRFManager.setFaceDetectionRoi(resolution);
const size = Math.min(640, 480);
BRFManager.setFaceDetectionParams(size * 0.3, size * 1.0, 12, 8);
BRFManager.setFaceTrackingStartParams(size * 0.3, size * 1.0, 22, 26, 22);
BRFManager.setFaceTrackingResetParams(size * 0.25, size * 1.0, 40, 55, 32);
I can try to isolate the example in a public repository if it makes easy for you to help us.
NOTE: Our version is newer: 4.2.0
Thanks!
Please see my other comment.
I added a working (pun!) worker example. Update the repo and see the files:
minimalWebcamWorker.html BRFv4_JS_TK210219_v4.2.0_trial.worker.js
I didn't understand the comment, sorry :)
I see the example that seems very very interesting: https://github.com/Tastenkunst/brfv4_javascript_examples/blob/master/minimalWebcamWorker.html
I will look into it the first thing in the morning. Thanks!
I am trying to use this trial in a web Worker, we need to improve the performance before moving to a commercial license.
Following a few issues (https://github.com/Tastenkunst/brfv4_javascript_examples/issues/12) (https://github.com/Tastenkunst/brfv4_javascript_examples/issues/45)
I added:
But when I
initializeBRF({...})
an error is thrown:The same error whith JS and WASM versions.