maxmin-filter

1.0.1 • Public • Published

node-maxmin-filter

Max-Min filter of image implemented in JavaScript. Both in Node.js and browser.

Install

$ npm install maxmin-filter

Usage

I made it as an ndarray module. So, the simplest usage is with get-pixels and save-pixels as below.

const fs = require('fs')
const savePixels = require('save-pixels')
const getPixels = require('get-pixels')
const maxminFilter = require('maxmin-filter')
 
getPixels('src.png', (err, pixels) => {
  if (err) {
    throw err
  }
  let filtered = maxminFilter(pixels)
  savePixels(filtered, 'png').pipe(fs.createWriteStream('dist.png'))
})

API

maxminFilter(pixels[, options])

Returns a thresholded ndarray.

  • pixels - an ndarray whose shape is [width, height, channels].
  • options.size - the filter size.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i maxmin-filter

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • fuji_haruka