Saving a Complex Image in NI Vision

Updated Dec 5, 2022

Reported In

Software

  • Vision Development Module

Issue Details

How can I save a complex image to be read by other programs using NI Vision?

Solution

Complex images are typically created when performing a fast fourier transform (FFT) on an image. Pixels in a complex image consist of a real component and an imaginary component. The complex image type can only be saved in AIPD format (internal file format), a National Instruments image data type that cannot be read by other programs. However, you can convert the complex image type into a regular image.

To convert a complex image type to use as a regular image, you can input the complex image into the IMAQ ComplexPlaneToImage VI, which can extract the Real, Imaginary, Magnitude, or Phase planes as a regular image that you can save in standard image formats such as BMP, JPEG, or PNG. See the following document for more information on the IMAQ ComplexPlaneToImage VI: NI Vision 2011 for LabVIEW Help: IMAQ ComplexPlaneToImage VI.

Another possible workaround is to programmatically take a screenshot of the image display and save it to file.  This will not contain any complex information, but it can be saved to a BMP, JPEG, or PNG file.  This workaround is shown in the figure below, and an example is posted here: Developer Zone Example: Save Complex Image to File.