linkingvision / rapidvms

rapidvms(open source VMS/NVR Video Management System/ Network Video Recorder) ==> project closed, use https://www.linkingvision.com/usc instead
https://www.linkingvision.com/
Other
432 stars 242 forks source link

convert raw data to cv::Mat #64

Closed ahmadi219 closed 7 years ago

ahmadi219 commented 7 years ago

Hi I want to display current frame that is sending to client (in server) . Which parameter I use to convert it to cv::Mat ? I added these codes in OAPIServer::DataHandler1 method, but it displayed no thing.

cv::Mat my_mat(100, 100, CV_8UC3 , frame.dataBuf); cv::imshow("current frame ", my_mat); cvWaitKey(10);

What Should I do to convert raw data of camera frame to cv::Mat ? and where the raw data of frame is stored ? Is it in VideoFrame or pRecv in this blow code? s32 nRetBody = mpSocket->Recv((void )_pRecv*, len);

Best Regards

xsmart commented 7 years ago

The DataHandler1 is for the encoded frame, you need decode the data

ahmadi219 commented 7 years ago

Hi thanks for your attention When I decode frame with VPlay::PutRawdata, how I can get decoded data ? Best Regards

xsmart commented 7 years ago

all the source code is open, you can get the rawdata