|
measProfile
|
|
|
|
| Input
|
|
|
| An integer between 1 and 116 specifying the frame number of the image for which the line profile data are to be obtained. Values in the range of 100-116 correspond to hidden frames.
|
|
|
| Channel
|
|
|
| An optional enumerated integer specifying a color channel for which the histogram data are to be obtained. This parameter is disregarded for grayscale images. Must be one of the following values:
|
|
|
| CH_LUM=0 collects the histogram of the luminance of the image using the formula: Lum=0.3R+0.59G+0.11B
|
| CH_RED=1 collects the histogram of the red component of the image.
|
| CH_GREEN=2 collects the histogram of the green component of the image.
|
| CH_BLUE=3 collects the histogram of the blue component of the image.
|
| CH_HUE=4 collects the histogram of the hue component of the image using the HLS color model.
|
| CH_LIGHT=5 collects the histogram of the luminance component of the image using the HLS color model.
|
| CH_SAT=6 collects the histogram of the saturation component of the image using the HLS color model.
|
| CH_IPHASE=7 collects the histogram of the I-Phase component of the image using the YIQ color model.
|
| CH_QUADR=8 collects the histogram of the Quadrature component of the image using the YIQ color model.
|
| Default value: 0
|
|
|
| Mode
|
|
|
| An optional enumerated integer that describes the filter used to smooth the line profile data: Must be one of the following values:
|
|
|
| SM_NONE=0 no smoothing is applied
|
| SM_LOWPASS=1 smoothes the line profile using the lowpass filter
|
| SM_GAUSS=2 smooths the line profile using the Gaussian filter
|
| SM_MEDIAN=3 smooths the line profile using the median filter
|
| Default value: SM_NONE
|
|
|
| Width
|
|
|
| An optional integer between 1 and 51 specifying the window size for the smoothing filter. The bigger this value is, the higher the degree of smoothing:
|
| Default value: 3
|
|
|
| File
|
|
|
| An optional string specifying the name of the ImageWarp data file for saving the line profile data. If this parameter is zero or omitted, the data will not be written to a file.
|
| Default value: 0
|
|
|
|
|
| ERR_OK
|
| The flag set if successful.
|
| ERR_FAILED
|
| The flag set if failed.
|
| ERR_BADFILE
|
| The flag set if the file could not be open.
|
| ERR_NOSPACE
|
| The flag set if there is not enough space to write the file.
|
|
|
|
|
| This set of statements sets and measures the line profile, saving the data to a file.
|
|
|
| setCurDir ("samples")
|
| loadIm (1,"sample8.iwd")
|
| setProfile(1,SH_LINE,10,20,400,500)
|
| measProfile(1, CH_LUM, SM_GAUSS, 7, "profile.dbs")
|
|
|
|
|
| Depending on the calibration settings in the Histogram Preferences, the profile data will be reported in non-calibrated or calibrated units. See setHistAttr for more details.
|