IplImage *kinectDepthImage; kinectDepthImage = cvCreateImage( cvSize(640,480),IPL_DEPTH_16U,1);
/* Here I put the data into the Image */ //Now I want to put it into a buffer ..any of the below 2 lines gives me error cv::WImageBuffer_16u depthBufer(kinectDepthImage); or cv::WImageBuffer1_16u depthBufer(kinectDepthImage);
My error is " /opt/ros/fuerte/include/opencv2/core/wimage.hpp:243: cv::WImage<t>::WImage(IplImage*) [with T = short unsigned int, IplImage = _IplImage]: Assertion `!img || img->depth == Depth()' failed. pass1Aborted (core dumped) "