From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Array to IMAQ Image without Vision Development Module (VDM)

Code and Documents

Attachment

Download All

Introduction

This VI demonstrates a way of getting an array back into an IMAQ Image type without using the IMAQ Array to Image VI that ships with Vision Development Module (VDM).  It is done by using LabVIEW picture data type and saving the picture to a file.  The picture is then reopened as an IMAQ Image.

Steps to Complete

The VI can be run as is after specifying the file paths to the saved image and the temporary image file.  The IMAQ Read File VI on the far left of the block diagram can be replaced with a Snap (and supporting VI for Snap).  Image processing as an array should be between the IMAQ ColorImageToArray VI and the Draw Unflattened Pixmap VI.  Depending on the type of image, the IMAQ ImagetoArray VI may need to replace the IMAQ ColorImageToArray VI.

Additional Notes

Because this method requires file I/O, it will be slower than the IMAQ Array to Image VI.  Therefore, this method is only useful for post processing, not in-line processing.

Array2ImageNoVDM.png

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

Contributors