Added documentation for all modules in Modules.md and added a link in info.json of each Module

This commit is contained in:
divy123
2018-12-25 03:59:39 +05:30
parent 23f4851bb5
commit 35b95a68b1
26 changed files with 380 additions and 25 deletions

View File

@@ -68,3 +68,333 @@ where `options` is an object with the following properties:
* 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)
## Average Module (average)
This module is used for averaging all the pixels of the image.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('average',options)
.run()
```
## Blend Module (blend)
This module is used for blending two images .
#### Usage
```js
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)
* func: function used to blend two images (default : function(r1, g1, b1, a1, r2, g2, b2, a2) { return [ r1, g2, b2, a2 ] })
## Blur Module (blur)
This module is used for applying a Gaussian blur effect.
#### Usage
```js
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)
## Brightness Module (brightness)
This module is used for changing the brightness of the image.
#### Usage
```js
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)
## Channel Module (channel)
This module is used for forming a grayscale image by applying one of the three primary colors.
#### Usage
```js
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)
## Colorbar Module (colorbar)
This module is used for displaying an image with a colorbar.
#### Usage
```js
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 )
## Colormap Module (colormap)
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.
#### Usage
```js
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)
## Contrast Module (contrast)
This module is used for changing the contrast of the image.
#### Usage
```js
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)
## Convolution Module (convolution)
This module is used for performing image-convolution.
#### Usage
```js
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)
## DecodeQr Module (decode-qr)
This module is used for decoding a QR in image (if present).
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('decode-qr',options)
.run()
```
## Dynamic Module (dynamic)
This module is used for producing each color channel based on the original image's color.
#### Usage
```js
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)
## Edge Detect Module (edge-detect)
This module is used for detecting images.
#### Usage
```js
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)
## Gamma Correction Module (gamma-correction)
This module is used for applying gamma correction.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('gamma-correction',options)
.run()
```
where `options` is an object with the following property:
* adjustement : Inverse of actual gamma factor (default 0.2)
## Gradient Module (gradient)
This module is used for finding gradient of the image.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('gradient',options)
.run()
```
## Histogram Module (histogram)
This module is used for calculating histogram of the image.
#### Usage
```js
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)
## Import Image Module (import-image)
This module is used for importing a new image and replacing the original with it.
#### Usage
```js
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")
## Invert Module (invert)
This module is used for inverting the image.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('invert',options)
.run()
```
## Ndvi Module (ndvi)
This module is used for applying ndvi technique to the image.
#### Usage
```js
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)
## Ndvi-Colormap Module (ndvi-colormap)
This module is used for demonstrating ndvi and colormap properties consecutively.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('ndvi-colormap',options)
.run()
```
## Overlay Module (overlay)
This module is used for overlaying an Image over another .
#### Usage
```js
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)
## Resize Module (resize)
This module is used for resizing an image.
#### Usage
```js
sequencer.loadImage('PATH')
.addSteps('resize',options)
.run()
```
where `options` is an object with the following property:
* resize : Percentage value of resize (default 125%)
## Rotate Module (rotate)
This module is used for rotating an image.
#### Usage
```js
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)
## saturation Module (saturation)
This module is used for changing the saturation of the image.
#### Usage
```js
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)

View File

@@ -2,5 +2,6 @@
"name": "Average",
"description": "Average all pixel color",
"inputs": {
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -12,5 +12,6 @@
"desc": "Function to use to blend the two images.",
"default": "function(r1, g1, b1, a1, r2, g2, b2, a2) { return [ r1, g2, b2, a2 ] }"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -10,5 +10,6 @@
"max": "5",
"step": "0.25"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -10,5 +10,6 @@
"max": "200",
"step": "1"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -8,5 +8,6 @@
"default": "green",
"values": ["red", "green", "blue"]
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -29,5 +29,6 @@
"default": 10
}
},
"length": 4
"length": 4,
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -8,5 +8,6 @@
"default": "default",
"values": ["default","greyscale","stretched","fastie","brntogrn","blutoredjet","colors16"]
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"desc": "contrast for the new image, typically -100 to 100",
"default": 70
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -15,5 +15,6 @@
"default": "1 1 1 1 1 1 1 1 1",
"placeholder": "1 1 1 1 1 1 1 1 1"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -23,5 +23,6 @@
"desc": "Height of crop",
"default": "(100%)"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"qrval": {
"type": "text"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -22,5 +22,6 @@
"desc": "Expression to return with R, G, B, and A inputs; fallback for other channels if none provided",
"default": "r + g + b"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -17,5 +17,6 @@
"desc": "The low threshold value for the image",
"default": 0.15
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -62,5 +62,6 @@
"desc": "Path to a WebGL vertex shader file",
"default": "(inbuilt)"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"desc": "gamma correction (inverse of actual gamma factor) for the new image",
"default": 0.2
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -1,5 +1,6 @@
{
"name": "Gradient",
"description": "Gives a gradient of the image",
"inputs": {}
"inputs": {},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -11,5 +11,6 @@
"false"
]
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -8,5 +8,6 @@
"desc": "URL of image to import",
"default": "./images/monarch.png"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -2,5 +2,6 @@
"name": "Invert",
"description": "Inverts the image.",
"inputs": {
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -8,5 +8,6 @@
"default": "red",
"values": ["red", "blue"]
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -2,5 +2,6 @@
"name": "NDVI-Colormap",
"description": "Sequentially Applies NDVI and Colormap steps",
"inputs": {},
"length": 2
"length": 2,
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -17,5 +17,6 @@
"desc": "offset to the output of the step on which the output of the last step is overlayed",
"default": -2
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"desc": "Percentage value of the resize",
"default": "125%"
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"desc": "Angular value for rotation in degrees",
"default": 0
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

View File

@@ -7,5 +7,6 @@
"desc": "saturation for the new image between 0 and 2, 0 being black and white and 2 being highly saturated",
"default": 0
}
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}