Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I found the problem.In my construction mat.data and Mat.datastart were not pointing to the same place. Replacing:

Result = Take_Picture(&Frame[ii].data, &BufferID[ii]);

with

unsigned char* p;
Result = Take_Picture(&p, &BufferID[ii]);
Frame[ii] = Mat(Height, Width, CV_16UC1, p);

solved the problem. I will convert this to an answer in a day or two (I am not yet allowed to answer my own questions this fast)

I think I found the problem.In problem. In my construction mat.data and Mat.datastart were not pointing to the same place. Replacing:

Result = Take_Picture(&Frame[ii].data, &BufferID[ii]);

with

unsigned char* p;
Result = Take_Picture(&p, &BufferID[ii]);
Frame[ii] = Mat(Height, Width, CV_16UC1, p);

solved the problem. I will convert this to an answer in a day or two (I am not yet allowed to answer my own questions this fast)

I think I found the problem. In my construction mat.data cv::Mat.data and Mat.datastart cv::Mat.datastart were not pointing to the same place. Replacing:

Result = Take_Picture(&Frame[ii].data, &BufferID[ii]);

with

unsigned char* p;
Result = Take_Picture(&p, &BufferID[ii]);
Frame[ii] = Mat(Height, Width, CV_16UC1, p);

solved the problem. I will convert this to an answer in a day or two (I am not yet allowed to answer my own questions this fast)