eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.43k stars 1.44k forks source link

How to get image with original resolution from camera video stream? #285

Open mesilov opened 6 years ago

mesilov commented 6 years ago

I need save image when any face detected and send picture to my backend. In example face_camera.html we have resolution with 320x240 but camera has resolution with 1920 x 1080 pixels

    <div class="demo-container">
      <video id="video" width="320" height="240" preload autoplay loop muted></video>
      <canvas id="canvas" width="320" height="240"></canvas>
    </div>

How to get image with original or custom resolution ( 800 x 600 ) from camera video stream?

murat-aka commented 6 years ago

Try:



  <div class="demo-container">
      <video id="video" width="1920" height="1080" preload autoplay loop muted></video>
      <canvas id="canvas" width="800" height="600"></canvas>
    </div>