Hi there,
I'm forced to use the Bumblebee stereo algorithm that use the TriclopsImage
and TriclopsImage16
data structures defined by Triclops. I want to convert those structures into a cv::Mat in the fastest way. I've tried with memcpy but it does not work:
Mat srcright(HEIGHT, WIDTH, CV_8UC3);
for (int i = 0; i < HEIGHT; i++) {
memcpy(&srcleft.ptr(i)[0], &rectified_left_color_image.blue[i * rectified_left_color_image.rowinc], WIDTH * sizeof (uchar));
memcpy(&srcleft.ptr(i)[1], &rectified_left_color_image.blue[i * rectified_left_color_image.rowinc], WIDTH * sizeof (uchar));
memcpy(&srcleft.ptr(i)[2], &rectified_left_color_image.blue[i * rectified_left_color_image.rowinc], WIDTH * sizeof (uchar));
}
it produces kind of a shrinked image.