Version0 /
imageFilters ModuleModule to filter images. The specific filters provided by this module depend on the host implementation of the module. The filters provided in the Ptolemy II/Nashorn host are documented in the auto-generated doc file for the current version of the host implementation. Those filters are provided by Jerry Huxtable, licensed under the Apache License, Version 2.0. The code is available at http://www.jhlabs.com/ip/filters. This module defines two functions, a filter() function that takes an image, a filter name, and an options object, and returns a modified image, and a filters() function that returns an array of filter names implemented on the host. FunctionsThe following functions are implemented by this module:
UsageTo filter a single image from the default camera (for example to invert the colors), you can do this: var cameras = require("cameras"); var imageFilters = require("imageFilters"); var camera = new cameras.Camera(); camera.open(); var image = camera.snapshot(); camera.close(); var modifiedImage = imageFilters.filter(image, "Invert"); // Use default options. See Also
Back to Optional JavaScript Modules |