Prevent canvas from stretching frame obtained from video element

Viewed 27

enter image description hereI'm using OpenCV JS to do some image processing on video frames. However, when I display the incoming video frame on the canvas, it becomes somewhat stretched. I've attached a screenshot as an example:

The input video (on the left) was captured from a top-down perspective (bird's eye view) but the frame being rendered is somewhat stretched. My question is this: How can I output incoming frames on the canvas with the same perspective view?

0 Answers
Related