filter(args)
Apply convolution mask filter either to the whole quadrille or at specific (row, col) cell.
Note
Filtering requires color-valued cells, i.e., image-pixelated quadrilles as created by createQuadrille(width, image) or createQuadrille(width, image, coherence).
Examples
filter(mask)
(press f to toggle filtered image; m to toggle mask display; and, s to rescale image)
filter(mask, row, col)
(mouse move to apply filter locally; press r to reset filtered image & s to rescale it)
Syntax
filter(mask, [row], [col])
Parameters
| Param | Description |
|---|---|
mask |
Quadrille: quadrille of numbers representing the convolution mask |
row |
Number: cell row coordinate, if undefined applies filter to the whole quadrille |
col |
Number: cell col coordinate, if undefined applies filter to the whole quadrille |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillemouseRowmouseColtileDisplaywidthclonefilter- p5.js
createCanvasbackgroundcolorloadImagekeyfillbluemapredgreencolorModerectRGB
Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.