1.6 Polyline Profiles


This Polyline Profiles App can be used to produce line profiles for an image/contour plot. The line can be a straight line, polyline, or freehand line.

The built-in Profile Plot in Origin only handles horizontal, vertical, and straight lines. This App is therefore useful for polyline and freehand line profiling.


  1. Create a new matrix by clicking the New Matrix button New Matrix Button.png from Standard Toolbar.
  2. With this matrix window activated, select menu Data: Import From File: Image to Matrix... to import the image <Origin Installation Director>\Samples\Image Processing and Analysis\Flower.jpg into this matrix.
    Polyline Profiles 01.png
  3. Next, we are going to create an image plot. However, this app works for those image plot created from matrix data, but not matrix image. So, we need to convert the image into matrix data first. To do this, choose menu Image: Conversion: Convert to Data. When the dialog opens, set Type to byte(1).
    Polyline Profiles 02.png
  4. Click OK to get the matrix data of the image.
    Polyline Profiles 03.png
  5. Keep the matrix with data active, then select menu Plot: Contour: Image Plot to create an image plot. And use Palettes button in Mini Toolbar to change to GrayScale palette.
    Polyline Profiles 04.png
  6. From Tools toolbar, select the Polyline Tool button Polyline Tool Button.png to draw a polyline on the image plot. It may look like the picture shows below.
    Polyline Profiles 05.png
  7. Click the Polyline Profiles icon Polyline Profiles icon.png from the Apps gallery to open the Polyline Profiles dialog. As you can see, the drawn polyline is Profile Line in the dialog, and the preview graph is also shown for the profiling result.
    Note: Pressing F1 key, the help file for this dialog will pop-up.
    Polyline Profiles 06.png
    Polyline Profiles 07.png
    You can also change the polyline from the image plot, such as rotating, resizing, etc., so to get different profiling result.
  8. Keep the default settings of the dialog, and click OK button. So the preview window will be kept and the result worksheet with the profiling data will be activated.
    Polyline Profiles 08.png

    Note: The result may be different because of the difference between each drawn polyline.