How to access a webcam and take a picture with JavaScript

Introduce webcam-easy npm module

Benson Ruan
The Startup

--

Image by Tumisu from Pixabay

Recently, computer vision has been a hot topic, which enables applications to deliver new, engaging user experiences. In order to bring computer vision to the browser, one of the key element is being able to access the webcam with JavaScript.

To contribute to the computer vision open source community, I had built a npm module called ‘webcam-easy‘, which provides an easy to use JavaScript module that can access webcam and take photo.

Below is a demo how I use webcam-easy.js to build a web-app that can turn on webcam and snapshot picture.

source: bensonruan.com

Try it yourself in the link below :

How to use webcam-easy.js

webcam-easy.js a JavaScript module I built for accessing webcam stream, it can allows us to capture a picture from the webcam…

--

--

Benson Ruan
The Startup

Diving into the world of Machine Learning and AI. Turning imagination into reality. About : https://linktr.ee/bensonruan. Support : https://ko-fi.com/bensonruan