This library intends to provide an easy way to deal with nd-array. This implementation has many advantages since
- it use typed array for fast computation and controled memory comsumption ;
- parameters consistency is well checked ;
- design allows it to work with real as well as complex values ;
- it is easy to use thanks to the object notation.
Many modules are developed
- for nd-array manipulation including value selection and modifications ;
- for arithmetic and boolean operation ;
- for linear algebra ;
- for image processing, such as filtering, FFT, image matching ;
- for statistical processing ; ...
A list of supported functions (not necessarily up to date) may be found here. A brief introduction is available here.
The inspiration is the well known Matlab software though there are some differences in the syntax we used.
Documentation and demos
The documentation can be consulted here. The code is documented using jsduck. Once it is installed just use the command
If you experience problem, be sure that you installed the ruby1.9-dev (or more recent) package and check this page.
Here are links to some demos that have been realized with this project. Note that they have been tested on Firefox and Google Chrome, and not with other browsers. Please be careful as well with large images, they might require large amount of memory and processing might take a lot of time !
- Estimation of illuminants from projections on the planckian locus and other color constancy algorithms
- Color Enhancement in the Wavelet domain
- Image editor (Beta version)
- Plot editor (Beta version)
- Game of life (Beta version)
- Keypoint detector (Beta version)
- Image matching with local descriptors (Alpha version)
- A contrario histogram modes detection (Alpha version)
How to compile and test it
In order to regenerate the modules from the sources, you simply need to use the command
make (Unix system).
To minify the modules and the projects, you have to install uglifyjs. Once it's done, just enter
To test it, just download the modules that you need, they are located in the
The core module is
JSM.js and it is the concatenation of the
Tools.js modules. The other modules such that
Matching.js are independent.
In the directory
./min/ you can find the minified version of the modules.
Nodejs and npm
There is not yet a specific package that can be install with
npm but the modules
JSM.min.js can be imported in nodejs script by using one of these instruction :
var JSM = require('./<path to the modules>/module/JSM.js');;
var JSM = require('./<path to the modules minified>/min/JSM.min.js');.
To be able to read and write images you have to install npm canvas package. To this end, ensure that the following packages are installed (on Ubuntu/Debian) :
- libjpeg8-dev / libjpeg9-dev
Also, do not forget to add the path to nodejs modules, it should look like that :
Here comes a list made of JS library that we found interesting. This list does not pretend to exhaustive and if you would like to see a link to your website added here please send an email.
Content of the JSM project