LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send image converted to string to remote pc over tcp/ip

hi,
          I have couple of questions. I have captured images on firewire cameras through CVS 1456. To send them on host PC i have converted an image to string. Now
 
 
1.  How to send the image  converted to string to Host PC via TCP/IP? Please give some example.
2.  How to converted these recived strings back to image if  iwant to proess them.
 
 
thanks in advance.
 
regards,
yashpal
0 Kudos
Message 1 of 15
(11,099 Views)

Hi yashpal,

there are many examples about how to send data over tcp/ip. Use the example finder and search for TCP.
How do you convert your image to string? Can you show an example? I think it is impossible to help you converting it back without this information.

Mike

0 Kudos
Message 2 of 15
(11,098 Views)
Hi, yashpal,
 
You have to transfer via TCP the length of the string, and then string itself.
On the receiver side you will read four bytes (length), then read the string, and after that convert the string into image.
See attached example.
 
best regards,
Andrey.
0 Kudos
Message 3 of 15
(11,084 Views)

If you want speed I'd use UDP... There is no guarantee that packages arrive,
but the throughput is much higher.

Regards,

Wiebe.


0 Kudos
Message 4 of 15
(11,071 Views)
hello mike,
 
               Thanks for the reply. Actually my plan is to capture the images using CVS and do the rest of processing (e.g. measurement, report generation etc.)on the Host PC. I saw there is one VI in Vision development module 'IMAQ flatten image to string' . Can we use this VI to convert the image to string and then transfer that image over TCP /IP to Host PC.then reconvert it to image so that can do the further processing as mentioned above?
 
 
yashpal.
0 Kudos
Message 5 of 15
(11,055 Views)

Hi yashpal,

Andrey Dm…´s example shows what you need.
I´m not sure, but maybe this conversion (see the attached picture) works, too.

Mike



Message Edited by MikeS81 on 04-21-2008 09:15 AM
0 Kudos
Message 6 of 15
(11,027 Views)

Hi MikeS81 

                                 i am Prabhu.G from chennai(india). i saw your attached picture. after traing this image send through TCP/IP program. but sum errors in receiving part. so please check it this one.  i attached this VI & (error)picture. please send me the solution of this.

my mail id:kgp.usic@gmail.com  


0 Kudos
Message 7 of 15
(10,681 Views)

Hi MikeS81 

                                 i am Prabhu.G from chennai(india). i saw your attached picture. after traing this image send through TCP/IP program. but sum errors in receiving part. so please check it this one.  i attached this VI & (error)picture. please send me the solution of this.

my mail id:kgp.usic@gmail.com  

Download All
0 Kudos
Message 8 of 15
(10,678 Views)
You have both send and receive in the same VI. That makes no sense. The sender and receiver should be separate VIs. You run the sender on the computer that's sending the image data, and the receiver on the computer that's receiving the image data. You should go back and look at Andrey's example.
0 Kudos
Message 9 of 15
(10,663 Views)
Are you sure the loaded image is 8 byte image?

Why do you use IMAQ for this? It's much easier and cheaper to use the normal
image file loading functions...

The error you are getting doesn't have anything to do with sending the data
over TCP/IP, but you probably knew that already...

Regards,

Wiebe.


"i want image send on serial port program" <x@no.email> wrote in message
news:1236174009884-864355@exchange.ni.com...
> Hi <a style="font-weight: bold"
href="http://forums.ni.com/ni/view_profile?user.id=88992" target="_blank"
class="auth_text"> MikeS81</a>&nbsp;
>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> i am Prabhu.G from chennai(india). i saw your attached picture. after
> traing this image send through TCP/IP program. but sum errors in
> receiving part. so please check it this one.&nbsp; i attached this VI
&amp;
> (error)picture. please send me the solution of this. my mail
id:kgp.usic@gmail.com&nbsp;&nbsp;
>
>
> imag send tcp.PNG:
> http://forums.ni.com/ni/attachments/ni/170/391620/1/imag send tcp.PNG
>
>
> image tcp.vi:
> http://forums.ni.com/ni/attachments/ni/170/391620/2/image tcp.vi


0 Kudos
Message 10 of 15
(10,660 Views)