Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

convert char** to cv::Mat

$
0
0
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); But when i am trying to show it with imshow("name",cameraFrame); it looks like gray and very pure image.. [C:\fakepath\Screen.JPG](/upfiles/14548479957166811.jpg)

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>