From version 2021b, Origin introduces a new Image window to load and save images. It employs OpenCV for processing and analysis routines. The new image window is a single-layer window, like the one below. It has an information bar on the top (otherwise you can select View: Show Information to turn it on) and if a video or multi-frame image, a navigation bar at the bottom (or View: Show Navigation to turn it on). It is responsible for almost all image processing performance.
| Single-Frame Image
|| Multi-Frame Image or Video
- Before Origin 2021b, images were stored in the Matrix window and the processing tools were supported by LeadTools. On the other hand, the new Image window is supported by OpenCV for processing and analysis routines.
- The matrix window is a multi-layer window that can contain many sheets. However, an image window has one sheet only.
- The matrix window is responsible for almost all built-in image processing tools. Also, if a process or analysis outputs some data results, such as 2D FFT, the matrix window is used. On the other hand, image window is used in most of image/video processing Apps.
- You can always convert an image window to matrix and reverse back. See below.
Import Images and Videos
Refer to this document page for details.
- Edit: Cut: clear the active image window.
- Edit: Clear: if a ROI is selected, this menu will delete the ROI; if the image window is selected, this menu will clear the window.
- Edit: Copy: if a ROI is selected, this menu will copy all the information of the ROI. If the image window is selected, this menu will copy the image. You can then paste it to a graph window as an object or to an image window.
- Edit: Paste: paste the copied ROI or image.
- View: Information: show/hide the information bar
- View: Navigation: show/hide the Navigation bar
Export Images and Videos
Refer to this page for details.
Basic Operations on Image Window
Besides tools under Image main menu, toolbar buttons and context menus are provided for quickly access to basic manipulations.
- Clicking anywhere inside the image layer will pop up a mini toolbar.
- Single frame Image:
- Multi-frame stacked Image:
Applying Palettes to Grayscale Images
Color palettes can be applied to grayscale images in the Image window.
- Click the Mini Toolbar Gray button , if necessary, to convert an image to grayscale.
- Apply a palette to the grayscale image by clicking the Palette button on the Style toolbar.
- Click the Mini Toolbar Reverse Palette button to reverse application of the chosen palette.
From the Palette list on the Style toolbar, click More Palettes to open the Color Manager dialog box and add more palettes.
||See what you can do with a ROI below.
|Display Actual Size/
Fit to Window
- Display the image in 1:1 pixel mode, OR
- always fit the image to window size.
||Check this to link the image to the source file. See the difference of link and unlink file here.
|Source File Path
||Open a dialog to change the source of the image file. See details of saving and changing the image path here.
Region of Interest
- Click the Add ROI button on minitoolbar
- Click the Rectangle Tool button on ‘’’Tools’’’ toolbar. Drag a rectangle box on the image.
- Double-click on the ROI to:
- Change the ROI name
- Re-position the ROI by specifying XY coordinates of the top-left and bottom-right anchor points.
- Right-click on the ROI to:
- Clip: Available when the image is opened from a graph (e.g. by double-clicking the graph image). This clips the graph image to the Image window ROI. The original graph image size is reduced to the size of the clipped region. To restore the full image in the graph window, right-click outside of the ROI and choose Remove Clipping.
- Crop: Crop Image window image and graph image (if exists) to the ROI. Graph image size and position are kept.
- Copy: Copy the ROI as an image. You can then paste it to other windows inside Origin, e.g. a graph or worksheet window, or to other applications. For multi-frame image, only the active frame is copied.
- Copy Positions: Copy the ROI box coordinates of 4 vertices. You can choose to paste it as plain numbers, or, Paste Position to another ROI box. For the latter option, you can choose to paste only ROI Width/Height, or Horizontal/Vertical location.
- Export ROI: Saves details (e.g. ROI name, position of vertices, etc.) to a .ROI file and later.
- Import ROI: Applies details of a previously-saved ROI, to the selected ROI.
- Create New from XY: Create a new ROI box of arbitrary shape from a set of XY coordinates (boundary) and index data. Support for gray-scale image only.
- Create New: Outputs the ROI to a new Image window.
The degree of image darkening outside of the Image Window ROI is controlled by system variable @IMGDI. Setting @IMGDI = 1000 will cause the outside area to display as black; @IMGDI = 0 turns off darkening. For information on changing the value of a system variable, see this FAQ.
Create Graph from Image
Select menu Image: Plot Image.
- This will create a new graph window and set the current image as its background.
- The created graph window will automatically set layer isometric (Plot Details > layer level > Size tab > Link Axis Length to Scale with X/Y RATIO = 1).
- The graph page is auto-rescaled to fit to layer size.
Learn more about inserting an image to a graph on this page.
Adjustments and Conversion
Besides buttons and menus mentioned above, Origin provides a sets of tools useful in image processing and analysis. They are sub-categorized as follow:
Converting to Matrix and Reversion
As different ways of dataset display and storage, sometimes you need to convert betwenn Image window and Matrix window. Data type can be specified during the conversion, which should take in account when the post-processing has a requirement on the data type.
- Select menu Image: Convert to Matrix to open the Cv2Mat dialog.
Following data types are supported:
||This is the default option. It will take image types and generate one matrix object per image frame always: 8bit gray-scale image will be converted to Byte matrix, and RGB color image to UInt matrix.
Note that it will not handle Alpha Channel and you can pre-preprocess it if needed.
|| Byte matrix: Values frome 0 to 255
|| Unsigned short matrix: values from 0 to 65535
|| Unsigned Int matrix: values from 0 to 4294967295
||32bit Float matrix: values from -3.4X1038 ~ 3.4X1038
||64bit Float matrix: values from -1.7X10308 to 1.7X10308
- You can do it in Python. Below is a sample.
import originpro as op
import numpy as np
ml = op.find_sheet('m')
a = ml.to_np3d()