invisible

changeset 11:d2158a527488

commented out inpaint and painted the missing areas white
author Eleni Maria Stea <eleni@mutantstargoat.com>
date Mon, 04 Nov 2013 21:53:21 +0200
parents a0397f57c07f
children 226073258785
files src/frame.cc
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/src/frame.cc	Mon Nov 04 01:45:51 2013 +0200
     1.2 +++ b/src/frame.cc	Mon Nov 04 21:53:21 2013 +0200
     1.3 @@ -91,20 +91,22 @@
     1.4  	for(int i=0; i<KINECT_DEPTH_HEIGHT * KINECT_DEPTH_WIDTH; i++) {
     1.5  		uint16_t val = *src;
     1.6  		if(val >= 2047) {
     1.7 -			val = 0;
     1.8 +			val = 2047;
     1.9  		}
    1.10  		*dest = val >> 3;
    1.11  		src++;
    1.12  		dest++;
    1.13  	}
    1.14  
    1.15 -//	cv::fastNlMeansDenoising(frame->depth_buf, frame->depth_buf, 7, 21, 3);
    1.16 +//	cv::GaussianBlur(frame->depth_buf, frame->depth_buf, cv::Size(3, 3), 0.5);
    1.17  
    1.18 -	cv::GaussianBlur(frame->depth_buf, frame->depth_buf, cv::Size(3, 3), 0.5);
    1.19 +/*
    1.20 +//Inpaint to fill the regions
    1.21 +//^ val = 0 instead of 2047 and:
    1.22  	cv::Mat mask = 255 - frame->depth_buf;
    1.23  	cv::threshold(mask, mask, 254, 255, 3);
    1.24  	cv::inpaint(frame->depth_buf, mask, frame->depth_buf, 1, cv::INPAINT_NS);
    1.25 -
    1.26 +*/
    1.27  	cv::imshow("foo", frame->depth_buf);
    1.28  	cv::waitKey(30);
    1.29  	has_depth = true;