Hi to everyone! I am trying to convert raw image data from my IP camera to cv::Mat. But can't do it properly. My IP camera use it's own library to retrieve images. This function looks like
GetVideoData(hwnd, (char**)&Frame, &dataLen, videofmt,&mediaSpeed);
Frame has a data buffer of type char data[0] in it's struct; Can anybody help me to find out how to convert Frame->data to cv::Mat?
I tried to do it like:
cv::Mat cameraFrame = cv::Mat(h, w, CV_8UC1, Frame->data);
And after i do some processing on this cameraFrame like facerecognition stuff and finally i need to convert proccessed cameraFrame Mat back to char, but dont't know how to do it? Mat uses uchar under the hood.