# Filtering

The Caliper tool uses the projection region to produce a one-dimensional representation of the portion of the image that contains the edges of interest. This one-dimensional projection image will contain not only the edges of interest, but also other edges caused by noise and unwanted information in the original image. Applying a filter to the one-dimensional projection image increases the strength of the edges of interest while at the same time decreasing image noise.

The Caliper tool performs filtering by convolving the one-dimensional projection image with a filter operator. A filter operator is a block of arithmetic operators that is applied sequentially to blocks of pixels within the one-dimensional projection image to produce the pixel values in the filtered image.

The following figure illustrates an example of a simple 3-element filter operator. In this case, the filter operator subtracts the value of each pixel’s left neighbor and adds the value of each pixel’s right neighbor to produce the pixel value in the filtered image.

The filtered image no longer visually resembles the input image. However it does have an important new characteristic: a graph of the filtered pixel values reveals that the peaks in the values, both positive and negative, correspond to the location of the edges within the initial image. The Caliper tool uses these peaks in the filtered image to determine the location of edges in the original image.

In addition to producing an image with peaks that correspond to edges in the input image, image filtering also removes noise and spurious edges from the input image. The following figure illustrates an example where the image contains two true edges along with spurious edges caused by variations in pixel values around the edge. When a filter with a size of 1 is applied to the image, both the edges of interest and spurious edges appear as peaks in the filtered projection image.

The following figure shows the effect of applying a filter with a width of 2. The peaks that correspond to the edges of interest are broader, and most of the spurious peaks from the previous figure are no longer present in the filtered projection image.