FSHARP -- Sharpening Filter (up to 33x33)

Performs an edge sharpening filter on image data. This filter improves the detail and contrast within an image.

See Also: FAV, FED, FME, FGA, FMO, FPR, FAD, FLE, FSOBEL, FPRE

PARAMETERS

FSHARP is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             1         Int
DBOC     Database Output Channel List            1         Int
FLSZ     Filter Size: Pixels, Lines              1-2       Int
MASK     Area Mask (Window or Bitmap)            0-4       Int

FILE

Specifies the name of the PCIDSK file containing channels to be filtered.

 EASI>FILE="filespec"

DBIC

Specifies the input channel to be filtered.

 EASI>DBIC=i

DBOC

Specifies the output channel for the filtered result.

 EASI>DBOC=j

FLSZ

Specifies the filter size in units of pixels and lines:

 EASI>FLSZ=i,j

MASK

Specifies the area in the input channel which should be processed. This can be one of the following:

 EASI> MASK =                           | process entire channel

 EASI> MASK = xoff,yoff,xsize,ysize     | process window

 EASI> MASK = b                         | process only under bitmap
                                        | stored in segment b

DETAILS

FSHARP uses a subtractive smoothing method to sharpen an image. First, an average filter is applied to the image. The averaged image retains all low spatial frequency information but has its high frequency features, such as edges and lines, attenuated. Consequently, the averaged image is subtracted from its original and the resultant difference image will have only the edges and lines substantially remaining. After the edges are determined in this manner, the difference image is added back to the original to give an edge enhanced image. The resultant image will have clearer high frequency detail; however there is a tendency for noise to be enhanced, as might be expected.

There are five parameters in this program. FILE specifies the input PCI database file. The dimensions of the filter window (FLSZ) must be odd. The minimum filter size is 1 by 3, and the maximum filter size allowed is 33 by 33. The filter window does not need to be square. The input channel (DBIC) can be the same as output channel (DBOC). For 8-bit channels, if the result is less than 0, it will be truncated to 0. If the result is more than 255, it will be truncated to 255.

The MASK parameter specifies the area within the input channel which will be processed. Only area under mask will be filtered 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 filtered. When four values are specified, these values define the x,y offsets and x,y dimensions of rectangular window within the image to be filtered. If defaulted, then entire database is processed.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

EXAMPLE

A bitmap delineating urban land uses is stored in segment 4 of database IRVINE.PIX. A 3x3 sharpening window is to be performed on just the urban features of channel 4. The filtered result is to be saved in channel 8.

 EASI>FILE = "IRVINE.PIX"
 EASI>DBIC = 4                  | Channel to be filtered
 EASI>DBOC = 8                  | Filtered results
 EASI>FLSZ =                    | Default 3x3 filter size.
 EASI>MASK = 11                 | Indicate area to filter.
 EASI>RUN FSHARP
The 16-bit elevation data stored on channel 10 on database IRVINE.PIX is to be sharpened using a 5X5 square filter. The filtered result is to overwrite the original input data.

 EASI>FILE = "IRVINE.PIX"
 EASI>DBIC = 10                 | Input Elevation data
 EASI>DBOC = 10                 | Input data to be overwritten
 EASI>FLSZ = 5,5                | 5x5 filter size. 
 EASI>MASK =                    | Entire database to be filtered
 EASI>RUN FSHARP

About PCI Help Gateway