Skip to content

Instantly share code, notes, and snippets.

@arclee
arclee / kinect-depth-smoothing.js
Created March 10, 2016 07:42 — forked from whichlight/kinect-depth-smoothing.js
pixel smoothing and moving average in javascript, for Kinect depth frame buffers in https://github.com/whichlight/figure-sketching-kinect/
//from http://www.codeproject.com/Articles/317974/KinectDepthSmoothing
function smoothDepth(arr){
var res = createArray(width,height);
for(var i=2; i< width-2; i++){
for(var j=2; j < height-2; j++){
if(arr[i][j]===0){
var innerBandCount = 0;
var outerBandCount = 0;
var filterCollection = [];