Reference Guide > P Routines > PROFILE Function
  

PROFILE Function
Standard Library function that extracts a profile from an image.
Usage
result = PROFILE(image)
Input Parameters
image — The input image array. May be any type except string or complex.
Returned Value
result — A floating-point vector containing the profile data points. It is of the same data type as image.
Keywords
Nomark — If set to 1, inhibits marking the selected line on the image display.
XStart — The starting x location of the lower-left corner of the image in the window.
YStart — The starting y location of the lower-left corner of the image in the window.
Discussion
To use PROFILE, mark two endpoints on the image display with the cursor by clicking on any mouse button. PROFILE then extracts the values of the image elements along a line connecting the endpoints and returns these values as a floating-point vector.
Example
This example uses the PROFILE function to retrieve a vector of image values.
; Open the file containing the image.
OPENR, unit, GETENV('WAVE_GALL3') + $
   '/demo/gallery3/data/aerial_demo.img',/Get_Lun
; Create an array large enough to hold the image.
img = BYTARR(512, 512)
; Read the image data.
READU, unit, img
; Create a window to display an image from the file.
WINDOW, 0, XSize = 512, YSize = 512
; Display the first image from the file.
TV, img
HIST_EQUAL_CT, img
; Retrieve a profile from the file.
vals = PROFILE(img)
; Examine the type and number of elements in the returned vector.
INFO, vals
; Close the file and free the file unit number.
FREE_LUN, unit
See Also
PROFILES,   TV,   TVSCL

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.