Documentation Center

  • Trial Software
  • Product Updates

Contents

Exporting Data in the Image Acquisition Tool

You can export the data that has been acquired in memory to a MAT-file, the MATLAB® Workspace, VideoWriter, or other options.

To export the acquisition data:

  1. Click the Export Data button in the Preview window to export the last acquisition that was logged to memory.

  2. In the Data Exporter dialog box, select MAT-File, MATLAB Workspace, or one of the other options in the Data Destination field. You can choose Image Tool or Image File for single-frame acquisitions.

    These two options are provided by the Image Processing Toolbox™ software. The Movie Player tool is also provided by the Image Processing Toolbox software and is only available for multiple-frame acquisitions. VideoWriter is part of core MATLAB and is recommended.

  3. If you selected MAT-File or MATLAB Workspace, then enter a name for the new variable in the Variable Name field, and click OK.

  4. If you selected VideoWriter, you need to select a profile from the Profile list. For information on the profiles, see Disk Logging.

    The VideoWriter Parameters dialog box opens after you select a file name and profile and click OK. If you selected Motion JPEG 2000 or Archival as your profile, you can set the Compression Ratio, Frame Rate, Lossless Compression, and MJ2 Bit Depth options. Accept the default values or change them.

    If you selected Motion JPEG AVI as your profile, you can set the Frame Rate and Quality options. Accept the default values or change them.

    If you selected Uncompressed AVI as your profile, you can set the Frame Rate option. Accept the default value or change it.

    VideoWriter Options

    • Compression Ratio is a number greater than 1 that specifies the target ratio between the number of bytes in the input image and the number of bytes in the compressed image. The data is compressed as much as possible, up to the specified target. This is only available for objects associated with Motion JPEG 2000 files. The default is 10.

    • Frame Rate is the rate of playback for the video in frames per second. The default is 30.

    • Lossless Compression is a Boolean value (logical true or false) only available for objects associated with Motion JPEG 2000 files. If you select true, VideoWriter uses reversible mode so that the decompressed data is identical to the input data, and ignores any specified value for CompressionRatio. The default is false for the Motion JPEG 2000 profile, and true for the Archival profile.

    • MJ2 Bit Depth is the number of least significant bits in the input image data, from 1 to 16. This is only available for objects associated with Motion JPEG 2000 files. If you do not specify a value, VideoWriter sets the bit depth based on the input data type. For example, if the input data is an array of uint8 or int8 values, MJ2BitDepth is 8.

    • Quality is a number from 0 to 100. Higher quality numbers result in higher video quality and larger file sizes. Lower quality numbers result in lower video quality and smaller file sizes. Only available for objects associated with the Motion JPEG AVI profile. The default is 75.

  5. If you exported to the MATLAB Workspace, the dialog box closes and the data is saved to the Workspace.

    If you exported to a MAT-File, the dialog box closes and the file is saved to the location you specified in the Data Exporter dialog box.

    If you exported to Image Tool, Image File, or Movie Player, the file immediately opens in that tool.

    If you exported to VideoWriter, the file is created and saved in the location you specified in the Data Exporter dialog box.

Was this topic helpful?