Ask Your Question

carouselification's profile - activity

2016-06-04 01:18:54 -0600 commented answer Using the IR image as a mask for RGB image

Is there an easy way to calculate this scale factor in opencv?

2016-06-03 05:49:31 -0600 commented answer Using the IR image as a mask for RGB image

Thanks for helping getting me started. So using this source code, it does compile and run but I think there is still an issue with the conversion.

cv::Mat(ir->height, ir->width, CV_32FC1, ir->data).copyTo(irmat);
irmat.convertTo(irmat, CV_8U, 1, 0); 
resize(irmat, irmat, cvSize(1920, 1080); 
cv::Mat(depth->height, depth->width, CV_32FC1, depth->data).copyTo(depthmat);
cv::Mat(rgb->height, rgb->width, CV_8UC4, rgb->data).copyTo(rgbmat, irmat);

When running this program, the IR image and the depth image when doing something similar don't match up properly to the rgb image.

2016-06-03 03:25:22 -0600 asked a question Using the IR image as a mask for RGB image

I'm passing the RGB, Depth and IR image through from libfreenect2 to opencv, and I am having trouble working out how to use the the IR image as a mask over the RGB image to remove everything except humans from a video stream.

I've gotten the images from libfreenect2 and converted them to the following image types (based off this post) :

    cv::Mat(rgb->height, rgb->width, CV_8UC4, rgb->data).copyTo(rgbmat);
    cv::Mat(ir->height, ir->width, CV_32FC1, ir->data).copyTo(irmat);
    cv::Mat(depth->height, depth->width, CV_32FC1, depth->data).copyTo(depthmat);

Thanks in advance!

2016-06-03 03:20:32 -0600 received badge  Supporter (source)