Giter Site home page Giter Site logo

angler.js's Introduction

angler.js

is an anaglyph encoder library for the web.

It computes two 3x3 transformation matrices to encode stereoscopic images for 3D color filter glasses.

Try the demo!

Usage

var mc = new angler.MatrixController();

mc.<property> = <value>;
// ...


mc.update();

// [... compute the sum of both linearized input color vectors transformed
// with mc.encoderL and mc.encoderR and gamma correct them. Note that the
// the matrix elements are stored in a Float32Array in column-major order. ]

Effective implementations of that last step vary based on the APIs in use. For Canvas and WebGL see the files

  • app/classes/AnaglyphImageViewer.js and
  • app/classes/AnaglyphVideoPlayer.js.

For a complete list of properties see src/angler/Properties.js and observe the console while running the demo.

How does it work?

The transformation matrices are calculated via linear least squares projection of the 6D stereo input color vector to a 3D output vector, considering spectal properties of the display and the color filters. This approach has originally been published by Eric Dubois in 2001.

I modified his method replacing CIE1931 XYZ with a perceptually uniform RGB color space presented by Joanna Marguier in 2006 and removing the normalization step in the original paper.

The weighting matrix envisioned in the original paper (but very ineffective due to normalization) then allows for further spectral modeling.

References:

License

The library and the bundled tools may be used under the terms of the Apache License Version 2.

The example files in the app/examples directory are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Image: CC-BY-NC-SA

angler.js's People

Contributors

tschw avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.