List of Module Documentations
- Add QR
- Average
- Blend
- Blur
- Brightness
- Canvas-Resize
- Channel
- Colorbar
- Colormap
- ColorTemperature
- Contrast
- Convolution
- Crop
- DecodeQr
- Dither
- DrawRectangle
- Dynamic
- Edge-Detect
- Exposure
- FisheyeGl
- FlipImage
- Gamma-Correction
- Gradient
- Grid-Overlay
- Histogram
- Import-image
- Invert
- MinifyImage
- Ndvi
- Ndvi-Colormap
- NoiseReduction
- Overlay
- PaintBucket
- ReplaceColor
- Resize
- Rotate
- Saturation
- Segmented-Colormap
- Sharpen
- Text-Overlay
- Threshold
- Tint
- WebGL-Distort
- White-Balance
This module Adds QR corresponding to the given string.
sequencer.loadImage('PATH')
.addSteps('add-qr',options)
.run()
where options
is an object with the following properties:
- size : size of QR code in pixels (default 200)
- qrCodeString : input string to generate QR code
This module is used for averaging all the pixels of the image.
sequencer.loadImage('PATH')
.addSteps('average',options)
.run()
This module is used for blending two images. For More info read: wiki
sequencer.loadImage('PATH')
.addSteps('blend',options)
.run()
where options
is an object with the following properties:
- offset: step of image with which current image is to be blended(Two steps back is -2, three steps back is -3 etc; default -2)
- blendMode: Blending mode to use for blending two images by default it uses the given function
- func: function used to blend two images (default : function(r1, g1, b1, a1, r2, g2, b2, a2) { return [ r1, g2, b2, a2 ] })
More info for different blend modes can be found here
This module uses Opencv.js for detecting and marking blob/region in microscopic images. It requires an opencv.js file to be loaded before using the functionalities which is currently being loaded to the webpage via script.It supports both environments, Node.js and browser for processing.
As the size of opencv.js file is quite large, the future versions will focus on loading it asynchronously, on demand of the the module to optimise performance.
sequencer.loadImage('PATH')
.addSteps('blob-analysis')
.run()
This module is used for applying a Gaussian blur effect.
sequencer.loadImage('PATH')
.addSteps('blur',options)
.run()
where options
is an object with the following property:
- blur : Intensity of Gaussian blur (0 to 5; default 2)
This module is used for changing the brightness of the image.
sequencer.loadImage('PATH')
.addSteps('brightness',options)
.run()
where options
is an object with the following property:
- brightness : brightness of the image in percentage (0 to 100; default 100)
This module is used for resizing the canvas of the image.
sequencer.loadImage('PATH')
.addSteps('canvas-resize',options)
.run()
where options
is an object with the following property:
- width: final width of the canvas (default 1000)
- height: final height of the canvas (default 1000)
- x: x-coordinate of the top left of the image on the canvas (default 500)
- y: y-coordinate of the top left of the image on the canvas (default 500)
This module is used for forming a grayscale image by applying one of the three primary colors.
sequencer.loadImage('PATH')
.addSteps('channel',options)
.run()
where options
is an object with the following property:
- channel : color of the channel (red, green, blue; default green)
This module is used for displaying an image with a colorbar.
sequencer.loadImage('PATH')
.addSteps('colorbar',options)
.run()
where options
is an object with the following properties:
- colormap : Name of the Colormap(default, greyscale, stretched, fastie, brntogrn, blutoredjet, colors16; default: default)
- x : X-position of the image on which the new image is overlayed (default 0)
- y : Y-position of the image on which the new image is overlayed (default 0)
- h : height of resulting cropped image (default : 50% of input image width )
This module is used for mapping brightness values (average of red, green & blue) to a given color lookup table, made up of a set of one more color gradients.
sequencer.loadImage('PATH')
.addSteps('colormap',options)
.run()
where options
is an object with the following property:
- colormap : Name of the Colormap ( greyscale, stretched, fastie, brntogrn, blutoredjet, colors16)
This changes the color temperature of the image.
sequencer.loadImage('PATH')
.addSteps('color-temperature',options)
.run()
where options
is an object with the following property:
- temperature : temperature between 0 - 40,000 kelvin (default 6000)
This module is used for changing the contrast of the image.
sequencer.loadImage('PATH')
.addSteps('contrast',options)
.run()
where options
is an object with the following property:
- contrast : contrast for the given image (-100 to 100; default : 70)
This module is used for performing image-convolution.
sequencer.loadImage('PATH')
.addSteps('convolution',options)
.run()
where options
is an object with the following properties:
- constantFactor : a constant factor, multiplies all the kernel values by that factor (default : 1/9)
- kernelValues : nine space separated numbers representing the kernel values in left to right and top to bottom format(default : 1 1 1 1 1 1 1 1 1)
This module is used to crop an image.
sequencer.loadImage('PATH')
.addSteps('crop',options)
.run();
Where options
is an object having the properties x
, y
, w
, h
. This diagram defines these properties:
options.x
: 0options.y
: 0options.w
: half of image widthoptions.h
: half of image height
This module is used for decoding a QR in image (if present).
sequencer.loadImage('PATH')
.addSteps('decode-qr',options)
.run()
This module approximates a color from a mixture of other colors when the required color is not available, creating illusions of the color that is not present actually.
sequencer.loadImage('PATH')
.addSteps('dither',options)
.run()
where options
is an object with the following property:
- dither : Can select the name of the Dithering Algorithm(default none)
This module helps to draw a rectangle on the image with a starting and ending corner with the specified thickness and color of the border.
sequencer.loadImage('PATH')
.addSteps('draw-rectangle',options)
.run()
where options
is an object with the following properties:
- startingX : starting x position of the rectangle (default 0)
- startingY : starting y position of the rectangle (default 0)
- endX : last x position of the rectangle (default "width")
- endY : last y position of the rectangle (default "height")
- thickness : thickness of the border (default 1)
- color : RGBA values separated by a space (default "0 0 0 255")
This module is used for producing each color channel based on the original image's color.
sequencer.loadImage('PATH')
.addSteps('dynamic',options)
.run()
where options
is an object with the following properties:
- red : expression for red channel (R, G, B and A as inputs; default r)
- green : expression for green channel (R, G, B and A as inputs; default g)
- blue : expression for blue channel (R, G, B and A as inputs; default b)
- monochrome: fallback for other channels if none provided (default : r+g+b/3)
This module is used for detecting images.
sequencer.loadImage('PATH')
.addSteps('edge-detect',options)
.run()
where options
is an object with the following properties:
- blur : Intensity of Gaussian blur (0 to 5; default 2)
- highThresholdRatio : Upper Threshold Ratio ( default : 0.2)
- lowThresholdratio : Lower Threshold Ratio ( default : 0.2)
This module is used for changing the exposure of the image.
sequencer.loadImage('PATH')
.addSteps('exposure',options)
.run()
where options
is an object with the following property:
- exposure: exposure value for the new image (-3 to 4; default 1)
This module is used for correcting Fisheye or Lens Distortion
sequencer.loadImage('PATH')
.addSteps('fisheye-gl',options)
.run()
where options
is an object with the following properties:
- a : a correction (0 to 4; default 1)
- b : b correction (0 to 4; default 1)
- Fx : x correction (0 to 4; default 1)
- Fy : y correction (0 to 4; default 1)
- scale : The ratio to which the original image is to be scaled (0 to 20; default 1.5)
- x : Field of View x (0 to 2; default 1)
- y : Field of View y (0 to 2; default 1)
This module is used for flipping the image on the selected axis.
sequencer.loadImage('PATH')
.addSteps('flip-image',options)
.run()
where options
is an object with the following properties:
- Axis : select the required axis (default : vertical)
This module is used for applying gamma correction.
sequencer.loadImage('PATH')
.addSteps('gamma-correction',options)
.run()
where options
is an object with the following property:
- adjustment : Inverse of actual gamma factor (default 0.2)
This module is used for finding gradient of the image.
sequencer.loadImage('PATH')
.addSteps('gradient',options)
.run()
This adds the grid over an image.
sequencer.loadImage('PATH')
.addSteps('grid-overlay',options)
.run()
where options
is an object with the following property:
- options.x : The value at which the grid line should start in x-axis.
- options.y : The value at which the grid line should start in y-axis.
- color : Color for the grid on the image.
This module is used for calculating histogram of the image.
sequencer.loadImage('PATH')
.addSteps('histogram',options)
.run()
where options
is an object with the following property:
- gradient : boolean value used to toggle gradient along x-axis (true or false; default true)
This module is used for importing a new image and replacing the original with it.
sequencer.loadImage('PATH')
.addSteps('import-image',options)
.run()
where options
is an object with the following property:
- url : url of the new image (local image url or data url;default : "./images/monarch.png")
This module is used for inverting the image.
sequencer.loadImage('PATH')
.addSteps('invert',options)
.run()
This module minifies the image using lossy compression that is the image-dimensions are not lost but the size is reduced.
The module supports jpg/jpeg/webp images in browser; but the node version supports all of the types.
sequencer.loadImage('PATH')
.addSteps('minify-image')
.run()
This module is used for applying ndvi technique to the image.
sequencer.loadImage('PATH')
.addSteps('ndvi',options)
.run()
where options
is an object with the following property:
- filter : filter for NDVI (blue or red; default red)
This module is used for demonstrating ndvi and colormap properties consecutively.
sequencer.loadImage('PATH')
.addSteps('ndvi-colormap',options)
.run()
Noise in an image are atypical pixels that are not representing the color or the exposure of the scene correctly. This Noise Reduction module reduces the noise in the image by using either median filtering or mean filtering techniques to change the RGB value of the pixels to create a smoother and fuller image.
sequencer.loadImage('PATH')
.addSteps('noise-reduction',options)
.run()
where options
is an object with the property method
. options.method
can be:
- Median Filtering: Set the RGB value of the pixel to the median RGB pixel value of all adjacent pixels (maximum 8 adjacent pixels and itself)
- Mean Filtering: Set the RGB value of the pixel to the mean RGB pixel value of all adjacent pixels (maximum 8 adjacent pixels and itself)
This module is used for overlaying an Image over another .
sequencer.loadImage('PATH')
.addSteps('overlay',options)
.run()
where options
is an object with the following properties:
- x : X-position of the image on which the new image is overlayed (default 0)
- y : Y-position of the image on which the new image is overlayed (default 0)
- offset : offset to the step on which the output of the last step is overlayed (default -2)
This module fills any polygonal shape with the specified color in pixels.
sequencer.loadImage('PATH')
.addSteps('paint-bucket',options)
.run()
where options
is an object with the following property:
- startingX : it is the value of the starting x-cordinate (default 10)
- startingY : it is the value of the starting y-cordinate (default 10)
- fillColor : they are four spaced seperated numbers representing the RGBA values of fill-color (default "100 100 100 255")
- tolerance : it is the % tolerance (default 10)
This module is used in replacing the color with grey or any desired color.
sequencer.loadImage('PATH')
.addSteps('replace-color',options)
.run()
where options
is an object with the following properties:
- replaceMethod : replaces with the desired color (default greyscale)
- replaceColor : three space separated numbers representing the RGB values of color to be filled (default "0 0 255")
- color : three space separated numbers representing the RGB values of color to be replaced (default "228 86 81")
- tolerance : it is the % tolerance (default 50)
This module is used for resizing an image.
sequencer.loadImage('PATH')
.addSteps('resize',options)
.run()
where options
is an object with the following property:
- resize : Percentage value of resize (default 125%)
This module is used for rotating an image.
sequencer.loadImage('PATH')
.addSteps('rotate',options)
.run()
where options
is an object with the following property:
- rotate : angular value for rotation in degrees (between 0 and 360; default 0)
This module is used for changing the saturation of the image.
sequencer.loadImage('PATH')
.addSteps('saturation',options)
.run()
where options
is an object with the following property:
- saturation : saturation for the new image (between 0 and 2; default 0)
This module is used to map the pixels of the image to a segmented colormap.
sequencer.loadImage('PATH')
.addSteps('segmented-colormap',options)
.run()
where options
is an object with the property colormap
. options.colormap
can be:
-
"default" : [[0, [0, 0, 255], [38, 195, 195]], [0.5, [0, 150, 0], [255, 255, 0]], [0.75, [255, 255, 0], [255, 50, 50]]]
-
"greyscale" : [[0, [0, 0, 0], [255, 255, 255]], [1, [255, 255, 255], [255, 255, 255]]]
-
"stretched" : [[0, [0, 0, 255], [0, 0, 255]], [0.1, [0, 0, 255], [38, 195, 195]], [0.5, [0, 150, 0], [255, 255, 0]], [0.7, [255, 255, 0], [255, 50, 50]], [0.9, [255, 50, 50], [255, 50, 50]]]
-
"fastie" : [[0, [255, 255, 255], [0, 0, 0]], [0.167, [0, 0, 0], [255, 255, 255]], [0.33, [255, 255, 255], [0, 0, 0]], [0.5, [0, 0, 0], [140, 140, 255]], [0.55, [140, 140, 255], [0, 255, 0]], [0.63, [0, 255, 0], [255, 255, 0]], [0.75, [255, 255, 0], [255, 0, 0]], [0.95, [255, 0, 0], [255, 0, 255]]]
-
A custom array.
This module is used to sharpen the pixels of the image using a 3x3 convolution filter.
sequencer.loadImage('PATH')
.addSteps('sharpen',options)
.run()
where options
is an object with the property sharpenStrength
, which can be set to achieve the desired level of sharpening on the image.
The modules allows to add text to image in both browser and node environment. We have the options to modify the font-size and also support few font-styles. The text color can also be modified.
sequencer.loadImage('PATH')
.addSteps('grid-overlay',options)
.run()
The options can take various attributes like, var options = { text : 'Hello World', size : '12'};
Thresholding is used to create binary images.
sequencer.loadImage('PATH')
.addSteps('threshold',options)
.run()
where options
is an object with the following property:
- threshold : it allows to select the types of thresholding (default "manual thresholding")
- input : it allows to select the range of thresholding value (default 120)
It adds color tint to an image
sequencer.loadImage('PATH')
.addSteps('tint',options)
.run()
where options
is an object with the following property:
- color : RGB values seperated by a space (default "0 0 255")
- factor : amount of tint (default 0.5)
This module is used for transforming the perspective of images based on corner coordinates.
sequencer.loadImage('PATH')
.addSteps('webgl-distort',options)
.run()
where options
is an object with the following property:
- nw: top-left corner x and y coordinates separated by a comma (default "0,100")
- ne: top-right corner x and y coordinates separated by a comma (default "1023,-50")
- se: bottom-right corner x and y coordinates separated by a comma (default "1223,867")
- sw: bottom-left corner x and y coordinates separated by a comma (default "100,767")
This module is used for rendering neutral colors of an image correctly based on the whitest pixel in the image.
sequencer.loadImage('PATH')
.addSteps('white-balance',options)
.run()
where options
is an object with the following property:
- red: red component of the whitest pixel (default 255)
- green: green component of the whitest pixel (default 255)
- blue: blue component of the whitest pixel (default 255)