c++ interface of cvCreateImageHeader(), cvSetData()
hi, i want to convert c interface of opencv into c++ interface. such as cvCreateImageHeader
and how can i convert this to c++ interface :
cvSetData( colorimg, (uchar*)colorImageData.planes[0], colorimg->width * 3 * sizeof(uchar) );
cvSetData( depthimg, (short*)depthImageData.planes[0], depthimg->width * sizeof(short) );
cvSetData( UVimg, (float*)depthImageData.planes[2], depthimg->width * sizeof(float) );
in your 3rd case, does depthImageData.planes[2] really hold float data ? no idea, how you acquire this, but the same image having different formats in different planes looks weird to me.
no, in depthImageData.plane[2] i am getting uv image. and in depthImageData[0] i am getting depth image. I want to ask how can i store its data in mat using cv::mat instead of iplimage pointer.
again, does that channel hold float data, or do you want float data ? (2 very different things..)