Can I run the code without showing the green lines?
Closed this issue · 1 comments
weiwanghasbeenused commented
I'm making a page that will respond to video loaded through webcam
I've tried setting opacity to 0 but the video but the stream became really slow
Is there any way that allows me to make the green lines invisible?
Thank you!
austince commented
Are you working from one of the examples? If I assume you're working from this one, here's how:
Remove the drawLoop
and function call:
From this:
function startVideo() {
// start video
vid.play();
// start tracking
ctrack.start(vid);
trackingStarted = true;
// start loop to draw face
drawLoop();
}
function drawLoop() {
requestAnimFrame(drawLoop);
overlayCC.clearRect(0, 0, vid_width, vid_height);
//psrElement.innerHTML = "score :" + ctrack.getScore().toFixed(4);
if (ctrack.getCurrentPosition()) {
ctrack.draw(overlay);
}
}
to this:
function startVideo() {
// start video
vid.play();
// start tracking
ctrack.start(vid);
trackingStarted = true;
}