Public Lab Research note

Introduction to Image Processing with OpenCV.js

by MaggPi | July 04, 2019 09:04 04 Jul 09:04 | #19987 | #19987

Abstract: The note provides a tutorial for the javascript (js) version of openCV.js image processing software. The tutorial is designed for beginner programmers and provides an introduction to software design techniques as well as how to establish an openCV.js operating environment.


  • OpenCV.js provides a variety of optimized algorithms that can be utilized for computer vision web applications ranging from feature detection to image measurement.

  • This tutorial demonstrates how to use opencv.js asynchronously and without compiling. The goal is to make opencv.js applications more accessible for the beginner user.

  • Software for this tutorial is free and is available at Visual Studio Code and OpenCV.js. Visual Studio Code is demonstrated as a good development environment for Public Lab software applications.

  • This note is part of a larger effort (Public Lab GSOC 2019) to develop openCV applications for Public Lab’s Image Sequencer multi-purpose image processing tool. In order to enable advanced Image Sequencer applications, a standalone opencv.js environment is useful to debug code before integration into Image Sequencer.

Tutorial/Demo Opencv.js tutorial is available via github at The tutorial provides an example of how openCV.js can be used to transform images from color to black and white and reduce image size. A demonstration video of several images is available at


OpenCV.js provides optimized algorithms for several different image processing tasks. This tutorial provided annotated code and demonstrated processing of PNG, TIFF and JPG files as large as 40MB.

References to openCV applications:


Login to comment.