Parent Topic: STR
The MASK parameter specifies the area within the input channel which will be processed. Only area under mask will be processed and the rest of the image will be unchanged. If a single value is specified, then this value points to a bitmap segment, which define the area to be processed. When four values are specified, these values define the x,y offsets and x,y dimensions of rectangular window within the image to be processed. If defaulted, then entire database is processed.
Sampling may be further restricted using the TRIM parameter, which trims the low and high ends of the sample by specified percentages. This parameter is useful for eliminating outliers or noise.
STR may be used to create completely new lookup table segments or to modify existing lookup table segments. If DBLUT is not specified, a new lookup table segment is created. The database segment name (DBSN) and database segment descriptor (DBSD) must be specified.
If DBLUT is specified, then the lookup table segment is read in and the table values between ISTR(1) and ISTR(2) are overwritten with new values. This allows for the creation of piecewise functions. DBSN and DBSD need not be specified in this case. If DBLUT is not specified, then the lookup table is initialized to zero and appropriate values are overwritten.
If all parameters are defaulted, STR performs the `default enhancement', a square-root function which exaggerates contrast in the low end of the grey-level spectrum. Grey-level values are transformed such that the minimum and maximum grey-level values on the input image are mapped to 0 and 255 respectively on the output image.
When a new lookup table segment is created on the database, a message appears on the terminal giving the segment number of the newly created lookup table. This new segment number is saved in the parameter DBLUT.
You should refer to the FUNCTIONS and ALGORITHM sections for a more in depth description of STR.
EXPO = 0.5 Square root function (default) EXPO = 1 Linear ramp function EXPO = 2 Squaring functionIn general, the user has total control of the parameters which make up the contrast stretch function. All default minimum and maximum input and output values can be overridden by user- specified values (ISTR,OSTR). If ISTR is specified, DBIC is ignored.
EXPO Power exponent (must be positive value)
(default = 0.5)
ISTR(1) Minimum input grey-level value (must be <= ISTR(2))
(default = 0)
ISTR(2) Maximum input grey-level value (must be >= ISTR(1))
(default = 255)
OSTR(1) Minimum output grey-level value
(default = 0)
OSTR(2) Maximum output grey-level value
(default = 255)
If OSTR(1) > OSTR(2), the result is a `negative' image.LCTR and HCTR control the mapping function for input values that are outside the range specified by ISTR:
For X < ISTR(1) F(X) = OSTR(1) if LCTR = "MIN" (default)
F(X) = OSTR(2) if LCTR = "MAX"
F(X) unchanged if LCTR = "OFF"
For X > ISTR(2) F(X) = OSTR(2) if HCTR = "MAX" (default)
F(X) = OSTR(1) if HCTR = "MIN"
F(X) unchanged if HCTR = "OFF"
LCTR or HCTR should only be set to "OFF" when modifying an existing
lookup table segment (DBLUT is specified), so that the table values
outside ISTR are not modified.The area under which the image is sampled to determine the minimum and maximum input values can be restricted to a specified database window or under a specified database (MASK). The low and high ends of this sample can be trimmed (TRIM) by specified percentages to eliminate outliers or noise.