LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transposition of image

I am having this problem in Labview communication in "TCP/IP" and in "Image Display". I used LabVIEW Full development system 8.2 NI vision 8.2 and IMAQ USB.
 
My idea is making a two way video communiaction program in LabVIEW - exchanging image data between two remote computers using TCP/IP where one of them acts as server (listener). I have two program
 "TCP IP Client two way comm threaded compression with append.vi" and
"TCP IP Server two way comm threaded compression with info.vi" .
The first being client and second  acting as server. I acquire image from a USB Camera (using IMAQ USB VIs) then send the image to remote computer by TCP/IP connection.  It takes place both way. The image data gets transmitted correctly. While displaying  it does display correct image(the image from the remote computer) but the image from the local computer is also displayed in between and that happens frequently. The image flickers between the remote and the local camera's image. Stragely this occurrence is random, it often doesnot happen when i run the program for the first time but repeats when I run the program for the second time.
 
Could anyone help me in this regard.
 
Thank you
Aman
0 Kudos
Message 1 of 4
(2,977 Views)

Both VIs create an image with the name "datasocket", acquire from USB to this image and transmit the (image) string via TCP.

The documentation of IMAQ Flatten Image to String says:   "Use the Unflatten from String LabVIEW primitive to convert this string back to an image. If an image has the same name as the flattened image in memory, when the string is unflattened, the contents of the flattened image string are copied to the image. Otherwise, a new image with a unique name is created that contains the contents of the flattened image string."

This matches your what you see: An image received via TCP might get overwritten by a locally acquired USB image.
This is a race condition that you can easily prevent by using different Image Names in your VIs (e.g. Client "ImgA" and Server "ImgB").

Hope this "matches", Guenter

0 Kudos
Message 2 of 4
(2,953 Views)
Thank you very much. Your suggestion worked out
0 Kudos
Message 3 of 4
(2,878 Views)
Thank you very much. Your suggestion worked out 🙂
0 Kudos
Message 4 of 4
(2,878 Views)