Downsample by a factor of two using sinc interpolation
Downsamples an ndarray by a factor of 2 using sinc interpolation.
Here is a simple example showing how to downsample an image:
var lena = require"luminance"require"lena"var x = require"zeros"256256require"ndarray-downsample2x"x lenarequire"save-pixels"x "png"pipeprocessstdout
And here is the result:
npm install ndarray-downsample2x
Downsamples input by a factor of two storing the result in output.
outputgets the result of downsampling
inputis the array that gets downsampled
input's shape must be divisible by 4 and
output's shape must be one half of
input's along each dimension.
(c) 2013 Mikola Lysenko. MIT License