Convert void buffer pointer to Mat
I have a module which receives a void pointer to a buffer. The original data type is uint16.
When I try putting the variable into a Mat, I get weird errors from
Mat imBuff = cv::Mat(628, 314, frame, CV_16U);
like missing '}' which isn't missing.
When I try various conversions using reinterpret_cast, I get cast from 'void*' to 'xxx' loses precision. For example,
Mat imBuff = cv::Mat(628, 314, reinterpret_cast<uint16_t >(frame), CV_16U);
fives 'uint126_t' {aka short unsigned int}' loses precision
Any ideas on how to solve this?
Or, do I have to go back to the source file and change it there?
thanks Ralph