optflow-demo: change resolution of wasm build

pull/3471/head
kallaballa 2 years ago
parent c4f4102758
commit 32fe1d1dfa
  1. 5
      src/optflow/optflow.html

@ -108,8 +108,8 @@
<span><button id="captureBtn">Start Capture</button><button id="fullscreenBtn">Fullscreen</button>
</span>
</span>
<canvas id="cameraCanvas" width="1280" height="720" style="display: none;"></canvas>
<video id="video" width="1280" height="720" autoplay style="display: none;"></video>
<canvas id="cameraCanvas" width="1920" height="1080" style="display: none;"></canvas>
<video id="video" width="1920" height="1080" autoplay style="display: none;"></video>
<div class="emscripten" id="status">Downloading...</div>
@ -210,6 +210,7 @@
let videoElement = document.querySelector("#video");
let cameraCanvas = document.querySelector("#cameraCanvas");
function capture() {
let ctx = cameraCanvas.getContext('2d', { willReadFrequently: true });
ctx.drawImage(videoElement, 0, 0, cameraCanvas.width, cameraCanvas.height);

Loading…
Cancel
Save