Quantcast

How to send IplImage through TCP socket

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to send IplImage through TCP socket

john_ali890
Hi,

I'm trying to get video from a webcam and send it to another computer through a TCP connection. Is there anyone who has done this? If so, can I what the correct way to pass an IplImage image in the send() and receive() functions is?

I've tried many ways and although I can send SOME bytes, I'm not sure if I'm doing the correct thing or not. I tried looking for code samples but I couldnt find any,

Any help will be appreciated.

Tkanks  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to send IplImage through TCP socket

manueladassori
Try with libCurl.
Simple and useful.
Bye
Manu


--- In [hidden email], "john_ali890" <john_ali890@...> wrote:

>
> Hi,
>
> I'm trying to get video from a webcam and send it to another computer through a TCP connection. Is there anyone who has done this? If so, can I what the correct way to pass an IplImage image in the send() and receive() functions is?
>
> I've tried many ways and although I can send SOME bytes, I'm not sure if I'm doing the correct thing or not. I tried looking for code samples but I couldnt find any,
>
> Any help will be appreciated.
>
> Tkanks
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to send IplImage through TCP socket

erikgast
--- In [hidden email], "a_coding_mama" <manueladassori@...> wrote:

>
> Try with libCurl.
> Simple and useful.
> Bye
> Manu
>
>
> --- In [hidden email], "john_ali890" <john_ali890@> wrote:
> >
> > Hi,
> >
> > I'm trying to get video from a webcam and send it to another computer through a TCP connection. Is there anyone who has done this? If so, can I what the correct way to pass an IplImage image in the send() and receive() functions is?
> >
> > I've tried many ways and although I can send SOME bytes, I'm not sure if I'm doing the correct thing or not. I tried looking for code samples but I couldnt find any,
> >
> > Any help will be appreciated.
> >
> > Tkanks
> >
>

It's probably the best to use some library like the one Manu suggested, but if you want to do low level socket programming, you must first send the size of the image data and then the data itself.
On the receiving side you first read the size of the incoming data and with this information you can receive the actual image data.

Erik

Loading...