Classic Filtering

Classic or linear filtering is a mathematical operation called convolution. Convolution involves the multiplication of a group of pixels in the input image with an array of pixels in a convolution kernel (or mask). The output value produced in a spatial convolution operation is a weighted average of each input pixel and its neighboring pixels in the convolution kernel.

Note: Filtering a binary image will produce a grayscale image.

Linear filtering groups a large number of smoothing, sharpening, noise reduction and edge filters. Here are the preestablished kernels:

Mean (3x3)

1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9

Blur (3x3)

0 1/8 0
1/8 4/8 1/8
0 1/8 0

Blur more (3x3)

1/14 2/14 1/14
2/14 2/14 2/14
1/14 2/14 1/14

Sharpen (3x3)

0 -1/4 0
-1/4 8/4 -1/4
0 -1/4 0

Sharpen more (3x3)

-1/4 -1/4 -1/4
-1/4 12/4 -1/4
-1/4 -1/4 -1/4

Defocus (3x3)

1 1 1
1 -7 1
1 1 1

Laplacian 1 (Edge) (3x3)

0 -1 0
-1 4 -1
0 -1 0

Laplacian 2 (Edge) (3x3)

-1 -1 -1
-1 8 -1
-1 -1 -1

Strong Edge (5x5)

-2 -2 -2 -2 -2
-2 -3 -3 -3 -2
-2 -3 53 -3 -2
-2 -3 -3 -3 -2
-2 -2 -2 -2 -2

Outline (5x5)

1 1 1 1 1
1 0 0 0 1
1 0 -16 0 1
1 0 0 0 1
1 1 1 1 1

Emboss (3x3)

-5 0 0
0 1 0
0 0 5

 

Gaussian

Gaussian filters are use to smooth edges (high contrast) and reduce noise. The kernel has a shape of a Gaussian hump.

Note: To get kernels larger than (9x9), press the New Filter button, choose a kernel size and then click on Gaussian kernel.

 

Custom Filter

To open the Custom Filter dialog, press the New Filter button. For removing a custom filter, select the desired filter and press the Delete button.

Kernel size: Define the size of the kernel.

Kernel origin: X and Y position of the kernel origin (the position of the first cell is 0,0).

Divisor: Divide each table value by this number.

Apply Filter: Apply the filter to the current image.

Add Filter: Add the current filter to the filters list (The filter is set permanently to JMicroVision).

 

See also:

Image Factory