FILTER.js

Filter.js: Video and Image Processing and Computer Vision Library in pure JavaScript (Browser and Node.js)

FILTER.js

A pure JavaScript Library for Image/Video Processing, Filtering and Computer Vision

This is a library for processing images/video in pure JavaScript using HTML5 features like Canvas, WebWorkers, WebGL and SVG (in progress) or analogs in Node.js.

version 0.9.6

see also:

  • Contemplate a light-weight template engine for Node/XPCOM/JS, PHP, Python, ActionScript
  • HtmlWidget html widgets used as (template) plugins and/or standalone for PHP, Node/XPCOM/JS, Python (can be used as plugins for Contemplate engine as well)
  • Tao A simple, tiny, isomorphic, precise and fast template engine for handling both string and live dom based templates
  • ModelView a light-weight and flexible MVVM framework for JavaScript/HTML5
  • ModelView MVC jQueryUI Widgets plug-n-play, state-full, full-MVC widgets for jQueryUI using modelview.js (e.g calendars, datepickers, colorpickers, tables/grids, etc..) (in progress)
  • Dromeo a flexible, agnostic router for Node/XPCOM/JS, PHP, Python, ActionScript
  • PublishSubscribe a simple and flexible publish-subscribe pattern implementation for Node/XPCOM/JS, PHP, Python, ActionScript
  • Regex Analyzer/Composer Regular Expression Analyzer and Composer for Node/XPCOM/JS, PHP, Python, ActionScript
  • Xpresion a simple and flexible eXpression parser engine (with custom functions and variables support) for PHP, Python, Node/XPCOM/JS, ActionScript
  • GrammarTemplate versatile and intuitive grammar-based templating for PHP, Python, Node/XPCOM/JS, ActionScript
  • Dialect a simple cross-platform SQL construction for PHP, Python, Node/XPCOM/JS
  • Abacus a fast combinatorics and computation library for Node/XPCOM/JS, PHP, Python, ActionScript
  • Asynchronous a simple manager for async, linearised, parallelised, interleaved and sequential tasks for JavaScript
  • RT client-side real-time communication for Node/XPCOM/JS with support for Poll/BOSH/WebSockets

Contents

Filter.js
Filter.js
Filter.js

Live Examples

Browser Support

firefox chrome opera ie nodejs

Credits

Some filters code has been adapted from open source libraries (mostly c, java and flash, plus a couple from javascript libraries), see the comments in the code for details.

Some image processing/computer vision theory, basics and tutorials (see references):

Features

The library dependencies are:

The framework defines an Image Proxy class, which represents an Image, a number of utilities like Color Class, Image Loader classes, Image Codecs, and 17 generic Filter types (some having glsl/svg analogs) plus various Plugins and Extra filters (with support for parallel processing transparently both for browser and nodejs)

  1. AbstractFilter
  2. ColorTableFilter
  3. ColorMatrixFilter (analogous to the ActionScript filter)
  4. ColorMapFilter
  5. AffineMatrixFilter
  6. GeometricMapFilter
  7. DisplacementMapFilter (analogous to ActionScript filter)
  8. ConvolutionMatrixFilter (analogous to the ActionScript filter)
  9. MorphologicalFilter
  10. StatisticalFilter (previously called NonLinearFilter)
  11. BlendFilter
  12. CompositeFilter (an abstraction of a container stack for multiple filters)
  13. AlgebraicFilter (an abstraction of algebraic combination of images or other filter outputs into an output image, to be added)
  14. InlineFilter (create inline filters dynamicaly at run-time using your custom functions)
  15. DimensionFilter
  16. GLSLFilter glsl-based (webgl/node-gl) analogs of at least some of the generic filters (in progress, possibly in next update)
  17. SVGFilter svg-based filters (todo)
  18. Plugins (a number of plugin filters which cover a wide(r) range of functionality and use cases)

Each of the generic filters is prototype but it also includes a number of implementation filters like grayscale , colorize , threshold , gaussBlur , laplace , emboss , gamma, twirl and so on.. (depending on type of filter)

Parallel Processing Support (browser and node) (support parallel procesing/filtering with filter workers in an intuitive and transparent way, see examples)

GPU Processing Support (browser and node, in progress) (support GPU-based parallel procesing/filtering with glsl filters in an intuitive and transparent way)

Image Blending Modes (analogous to PhotoShop blend modes)

The filters, and the way they operate, naturaly represent a system of interconnected nodes which process and interchange (image) data (not necesarily synchronously), a.k.a a signal processing graph system. The result is a streamlined flow for image processing and computer vision in JavaScript.

TIP: You can create your custom build of the library with the filters/plugins you choose.
Each filter and plugin is independent and can be used in a mix-n-match manner, as long as the core classes are always included.
Change the dependencies file(s) to include your own selection of filters and plugins for your custom build

Todo

  • add GLSL (webgl/node-gl) support for various generic Filters (in progress, possibly in next update)
  • add some needed signal processing graph node filters (eg algebraic, switch, delay etc..) (in progress)
  • add active-shape geometric filters, color/histogram-detector filters, .. (todo)
  • add 2d-fft routines, frequency-domain filtering (todo)
  • add SVG, CSS Filters interface support for some Filters (todo)
  • add machine learning (image) segmentation/clustering algorithms (e.g kmeans, kmedoids, connected components, deterministic annealing, svd, jade, ..) [DONE partially]
  • implement some numeric routines (e.g blas, filter routines) using faster asm.js (browser & nodejs) and/or simd.js [DONE partially]
  • make convolutions/statistics faster [DONE partially]
  • add full support for Node.js [DONE]
  • add (generic/native) codec support for image formats, e.g .TGA, .HDR/.RGBE, .GIF, .BMP, .PNG, .JPG/.JPEG etc.. [DONE]
  • add support for Parallel Processing using Web Workers and/or Asynchronous Processing [DONE]
  • use fixed-point arithmetic, micro-optimizations where possible [DONE]
  • add caching of filter parameters where applicable [DONE]
  • increase performance for Opera, IE [DONE partially]

主要指標

概覽
名稱與所有者foo123/FILTER.js
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證
所有者活动
創建於2011-12-23 21:04:16
推送於2025-04-30 15:43:25
最后一次提交2025-04-30 18:43:22
發布數33
最新版本名稱1.13.0 (發布於 )
第一版名稱0.1 (發布於 )
用户参与
星數400
關注者數19
派生數47
提交數505
已啟用問題?
問題數12
打開的問題數1
拉請求數2
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?