Image Sequencer is a sequential Image Processing and analysis system for browser, Node.js and the command line. It is non destructive in the sense that a new Image is created after each processing step. It is targeted towards people trying to run analysis on scientific imagery for their research.
A module
is a single image processing step that is applied to all the Images loaded into sequenceer. Some of these modules are baked into sequencer by commiting their code into the sequencer source itself. To make this system more scalable I have implemented a new module system which allows for modules to be distributed via npm separately and consumed into sequencer dynamically.
An example of this is the new Invert module
The following commands can be used to install modules which are distributed via npm:
CLI
sequencer --install-module "invert image-sequencer -invert"
This command installs the npm package image-sequencer-invert
then adds it as a dependency of Image Sequencer locally and loads this new module into sequencer for usage.
Node.js
sequencer.saveNewModule("path to files")
sequencer.loadNewModule("module name")
In the Browser context the modules can be included as script files.
A Module must follow a basic format which makes it compatible with Image Sequencer. This summer I worked on minimizing the amount of code required inside a module, a lot of redundancy was eliminated and the default UI functions are now called automatically rather than the module having to call them.
Old Module Structure: New Module Structure:
Image Sequencer encodes the applied sequence of steps and their settings into a compact string which is then appended to the URL. Following are the methods associated with stringifying and JSONifying a sequence.
sequencer.toString() // String for the sequence currently loaded
sequencer.importString() // Imports the stringified sequence
sequencer.toJSON() // returns the current sequence in JSON
sequencer.importJSON() // imports a JSON sequence
A simple exaple of a stringified sequence is channel{channel:green},blur{blur:2}
Sequences can also be saved. In the browser the following button can be used
Inside the cli the new --save-sequence
option can be used
With the work done this summer it is now possible to reuse module code by consuming various modules into one meta-module
. These meta-modules have their own meta-data and their inputs are the inputs of their constituent steps. I have made a Colorbar
meta module which adds a colorbar to the image.
See it in action here colorbar{}
A meta module expands itself into its constituent steps giving them proper inputs at runtime itself which enables them to be loaded from the URL itself.
A lot of other goals were achieved which include:
Optimizing sequencer.run
method so all the steps are not re-run every time steps are added or removed.
Named exports in the CLI which enable output Images to be exported to a desired location with a desired name and a desired extension
sequencer -i "./something.png" -o "./example.jpg" -s "invert"
An addition to the UI which enables the user to see the pixel value of an ndvi image by hovering on a particular location
A grunt plugin which enables Image sequence4r to be run with grunt - grunt-image-sequencer
During the later part of my project I created various FTO issues and we were lucky to welcome some newcomers on the project.
List of all first timer issues
For contribution guidelines please checkout contributing.md
For further reading please do checkout the Readme
I was able to accomplish a lot of core work this summer which itself adds some great features and sets the platform for future work. I would like to thank google and publiclab for this awesome opportunity which made my summer a blast. Also thanks to all the mentors who have been supporting and reviewing my work.
For now I would continue to work on Image Sequencer but now that summer is over I will shift my focus more towards boosting our community and welcoming even more people to the project. Once again thanks a lot to everyone involved :)