20.5 Working with Images in Matrix Window

Images can be imported to either the Image window or the Matrix window, with some differences in image format support. There is some overlap in processing and analysis capabilities but, in general, the Image window excels at image cropping or video editing tasks while the Matrix window is needed for transformation and analysis operations (see linked list, bottom of page). Either will produce common plot types such as contour, 3D surface or image plots.

Note that you can convert an Image window image to matrix and so it should work to import images to the Image window, do you image cropping there and convert to matrix to complete other operations on the image.

Importing Images to the Matrix

To import an image or image stack to the matrix window:

  1. With the matrix active, choose Data: Import From File: Image to Matrix.
  2. This opens the Image to Matrix (impImage) dialog.
  3. Choose import options and click OK. For information on importing GeoTIFF, see this page.
UG impImage dlg.png

Viewing Matrix Images

The matrix has two View modes. In addition, the matrixsheet can contain more than 65k matrix objects and so there are controls for scrolling and selecting matrix objects.

Data Mode and Image Mode

  • When you import an image to the matrix, you can -- as with any matrix data -- switch between "Data Mode" (View Data Mode) and "Image Mode" (View: Image Mode).
  • However, until converted to data, matrices may contain RGB values (regardless of View mode), as seen in the second window in the sequence below.
  • Performing certain analysis or graphing tasks requires that the matrix first be converted to Z values by choosing Image: Conversion: Convert to Data.
UG matrix image convert.png

For more information, see Image Conversion.

Image Thumbnails and Slider

  • Individual matrix objects can viewed as image thumbnails in the selector region of the matrixsheet.
  • Alternately, you can view individual objects in the data portion of the matrix window by enabling and manipulating a slider control. If the matrix is being viewed in data mode, the slider will display objects as data. If viewed in image mode, the slider will display each object as an image.

In the user interface

To show the selector region and toggle between thumbnails or slider control, use the Mini Toolbar that shows when you hover on an active matrix window.

To display thumbnails:

  1. Right-click on the matrix window title bar and place a check mark beside Show Image Thumbnails.
UG Show Image Thumbnails.png

To replace the thumbnail image view with the slider:

UG MT Matrix Slider Thumbnail.png
  1. Hover in the selector area where the thumbnails display; or in the gray area just to the right of your matrix image. When the pointer displays the Mini Toolbar icon, click to show the toolbar, then click the Slider or Thumbnails button.
  2. To revert to display of image thumbnails, click the button again.
UG Matrix Slider Enabled.png

Note that you can disable display of both thumbnails and slider by clicking the Image Selector button located just to the left of the Slider or Thumbnails button on the Mini Toolbar.

In LabTalk script

See documentation of the wbk.selector and wbk.slider object properties.

When importing multi-frame TIF files, thumbnail/slider display is controlled by system variable @MSS (default value =10):

  • If the sheet contains a single frame, don't show thumbnail/slider.
  • For 1 < frames < 10, show thumbnail
  • For frames > 10, show slider

Extracting Information from the Matrix Image

When viewing matrixsheets or matrix objects in Image Mode (View: Image Mode), you can extract information using the Region-of-Interest (ROI) tools.

Creating Image Plots

Once converted to data, images in a matrix can be plotted as an Image Plot. This displays the data as a 2D plot where each matrix cell corresponds to a "pixel" in the graph.

Related Areas of Matrix Analysis

Working with GeoTIFF

GeoTIFF is a public-domain image format that stores spatial information in a TIFF file and which has applications in mapping. Starting with Origin 2022b, Origin supports import of GeoTIFF files to both matrices and Image windows.

For information on importing and analyzing GeoTIFF images, see GeoTIFF Importing and Processing.

Working with NetCDF

NetCDF is a self-describing, scalable format file for storing arrays of variables. Designed as a flexible format for exchange of scientific data, it is readily adaptable to geographic studies and is widely used in atmospheric and climate science. For information on importing and analyzing NetCDF in Origin, see NetCDF Importing and Processing.

The following sections provide information on working with images in matrix window.