Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated

Streaming Images using Network Streams



Primary Software:
Primary Software Version: 2011
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
How can I use Networks Streams to stream an image across a network?

Solution:
In order to stream an image using Network Streams, you may convert the image to an array of pixel values or directly send the image reference. Refer to the Creating Endpoints and Establishing a Stream section of the Developer Zone Tutorial: Lossless Communication with Network Streams: Components, Architecture, and Performance for more information about streaming the image reference and why it is possible.

To stream image data as an array of pixels, you can use either the IMAQ ImageToArray VI for monochrome images or the IMAQ ColorImageToArray VI for color images. Once this is done, you can use a network stream with the appropriate data type (For example U8, I16, U32). Example code for each endpoint of the network stream can be seen below:

Reader:


Writer:


Downloads for the LabVIEW 2010 and 2013 versions are also attached to this document, and they send the image pixel data with the stop Boolean. The example also includes a simulated acquisition writer VI to allow you to test the connection without a camera connected to the system.

Related Links:
Developer Zone Tutorial: Lossless Communication with Network Streams: Components, Architecture, and Performance
LabVIEW 2013 Help: Streaming Data between Applications
Developer Zone Community: Using Network Streams With IMAQ

Attachments:


2013.zip2013.zip2010.zip2010.zip


Report Date: 05/11/2011
Last Updated: 10/02/2013
Document ID: 5LAITBEJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit