LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP USB camera

As you can see in the example VI that I have attached, your algorithm for encoding and decoding the image works perfectly fine. I don't believe that is where your issue lies. Can you verify that the 2D data array being generated from your host, is the same 2D data array that you client is reading from the TCP Read (similar to the example VI I attached)?

Also, you also might try ensuring that you set the "Image Type" on your "IMAQ Create.VI" to the correct value, depending on the type of image you are receiving from the camera.
0 Kudos
Message 11 of 24
(1,903 Views)
As you can see in the example VI that I have attached, your algorithm for encoding and decoding the image works perfectly fine. I don't believe that is where your issue lies. Can you verify that the 2D data array being generated from your host, is the same 2D data array that you client is reading from the TCP Read (similar to the example VI I attached)?

Also, you also might try ensuring that you set the "Image Type" on your "IMAQ Create.VI" to the correct value, depending on the type of image you are receiving from the camera.

Attachment TransmitImage.vi (84 kb)

 

Hi, Thanks for the VI.. I tried le.. And I can ensure that the 2D data array at both the server and client side is the same.. Just dunno why the image still does not comes out.. I also included setting " Image Type" on the "IMAQ Create.VI" the same for both Client and Server.. Any Help?

0 Kudos
Message 12 of 24
(1,894 Views)
Could you please reply with a screenshot showing the data array from both your client and server, and a sample image that you are trying to transmit? When you use this image in the example I posted, are you able to see the "transmitted" image?
0 Kudos
Message 13 of 24
(1,884 Views)

Hi,

    from the screenshot , i'm unable to show u that both 2D array are the same.. Cause somehow there is some latency in the results.. the result will appear at the server first then after 1 or 2 seconds the same result will appear on the client side.. the image i wanna transmit is a live streaming video and is just like the image in the ((server screen))... Regarding the second question, i'm able to see the transmitted image using the example, but the image like keep flickering once in a while.. Hence,  i somehow suspect the problem lies with TCP/Ip connection.. But when i use the TCP/Ip connection for other instrument.. it works perfectly.. Sorry for causing so much problem..

 

Download All
0 Kudos
Message 14 of 24
(1,875 Views)
Can you handle the errors coming from the IMAQ Create and IMAQ ArrayToImage VIs on your client to see if they are throwing any kind of errors? I also noticed that you defined your image as HSL (U32) on your client, and your screenshot shows that your image is RGB (U32). You might also want to try ensuring that these image types on your client and server are consistent.

When you say the example I posted works, but the image flickers, are you capturing from your camera, or are you testing with an example image?
0 Kudos
Message 15 of 24
(1,865 Views)


Errors? So far i'm able to handle the errors.. Oh, i tried defining the image as HSL(U32) for client and server, the result is still the same.. I'm using the image i capture from my camera... Thanks..
0 Kudos
Message 16 of 24
(1,856 Views)
You seem to be only handling the errors from the TCP/IP communication VI's. Can you handle the errors from the IMAQ VI's and let me know if any errors are being thrown from them?
0 Kudos
Message 17 of 24
(1,848 Views)

 
 
Ya, there are some errors thrown from IMAQ VI's at first when i use the ImagetoArray.vi and ArraytoImage.Vi... But this problem no longer exists when i change to ColorArraytoImage.VI and ImagetoColorArray.Vi... Its kinda weird cause i added in indicators and got the results on the client side but the image cannot be shown..
0 Kudos
Message 18 of 24
(1,813 Views)
Instead of receiving a 2d array from your tcp reads, what happens when you create your own simple 3x3 array, fill it in with your own constant values, convert that array to an image, and then try to view the image? If this works, and you can see your image, I would suspect that something strange is going on in your tcp reads/writes.
0 Kudos
Message 19 of 24
(1,798 Views)
No image is shown still despite creating a new array.
0 Kudos
Message 20 of 24
(1,766 Views)