invisible

changeset 10:a0397f57c07f

quick backup - TODO: fix inpaint :p
author Eleni Maria Stea <eleni@mutantstargoat.com>
date Mon, 04 Nov 2013 01:45:51 +0200
parents 6f5f53d0d166
children d2158a527488
files src/frame.cc
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/frame.cc	Mon Nov 04 00:29:14 2013 +0200
     1.2 +++ b/src/frame.cc	Mon Nov 04 01:45:51 2013 +0200
     1.3 @@ -1,6 +1,7 @@
     1.4  #include <GL/gl.h>
     1.5  #include <cxcore.h>
     1.6  #include <opencv2/imgproc/imgproc.hpp>
     1.7 +#include <opencv2/photo/photo.hpp>
     1.8  
     1.9  #include <highgui.h> //TODO remove
    1.10  #include <cv.h> //TODO remove
    1.11 @@ -97,9 +98,15 @@
    1.12  		dest++;
    1.13  	}
    1.14  
    1.15 -	cv::medianBlur(frame->depth_buf, frame->depth_buf, 5);
    1.16 +//	cv::fastNlMeansDenoising(frame->depth_buf, frame->depth_buf, 7, 21, 3);
    1.17 +
    1.18 +	cv::GaussianBlur(frame->depth_buf, frame->depth_buf, cv::Size(3, 3), 0.5);
    1.19 +	cv::Mat mask = 255 - frame->depth_buf;
    1.20 +	cv::threshold(mask, mask, 254, 255, 3);
    1.21 +	cv::inpaint(frame->depth_buf, mask, frame->depth_buf, 1, cv::INPAINT_NS);
    1.22 +
    1.23  	cv::imshow("foo", frame->depth_buf);
    1.24 -	cv::waitKey(100);
    1.25 +	cv::waitKey(30);
    1.26  	has_depth = true;
    1.27  }
    1.28