Example Code

Streaming Images from a Compact Vision System to a Local AVI

Code and Documents

Attachment

Overview


This example demonstrates how to stream images from a remote Compact Vision System (CVS) to a local Windows machine through TCP communication. The streamed images are then saved to an AVI file on the local machine.

The attached project, Stream CVS.lvproj, includes two VIs.  Remote.vi, which runs on the CVS, acquires images continuously from a Firewire camera using the high-level acquisition VIs, flattens the images to string data, and sends the data to the local machine through TCP/IP communication.  Local.vi, on the local Windows machine, receives the string data, unflattens it back to images, and saves the images to an AVI file.

 

Instructions

1.  Enter TCP Port, Timeout, Camera Name, and JPEG Quality values on Remote.vi Front Panel.

2.  Enter Remote IP Address and Remote Port values on Local.vi Front Panel.

3.  Enter AVI Frames Per Second value and select various AVI Compression Filter options on Local.vi Front Panel.

4.  Run Remote.vi.

5. Run Local.vi.

6.  When prompted, select AVI file to write to.

7.  To stop acquisition, press STOP button on Local.vi Front Panel.

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors