Home:ALL Converter>Reading and displaying openCV IplImage

Reading and displaying openCV IplImage

Ask Time:2013-03-07T19:36:46         Author:askingtoomuch

Json Formatter

On the client side, I create IplImage using openCV and send it as binary data through TCP socket.

IplImage *img = cvCreateImage(cvSize(480, 360), IPL_DEPTH_8U, 4);

After I receive the data on the server, how do it read it and display it?

IplImage *img = ???
cvNamedWindow("image", CV_WINDOW_AUTOSIZE);
cvShowImage("image", img);
cvWaitKey();
cvDestroyWindow("image");

Author:askingtoomuch,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15270148/reading-and-displaying-opencv-iplimage
yy