Sei sulla pagina 1di 6

1. Neighborhood (Typically a rectangle) 2. Predefined operations that are performed on the image pixels encompassed in the neighborhood. 3.

A processed image is generated as the center of the filter visits each pixel in the input image. 4. If the operation performed is linear then it is called as a linear spatial filter else the vice versa. Example : The mechanics of linear spatial filtering using 3 x 3 neighborhood. At any Point (x,y) in the image g(x,y) is the sum of products of the filter coefficients and the image pixels encompassed by the filter

The two mandatory topics in spatial filtering are 1.Correlation 2. Convolution Convolution is a process of moving a filter mask over the image and computing the sum of products at each location. Correlation is also same but the difference is that the filter is first rotated by 180 degrees and then it is shifted.

00010000 f Alignment:

12328 w

00010000 12328 Starting position alignment If the filter is of size m then pad m-1 zeros on either of the sides 0000000100000000 First Correlation first shift second shift fourth shift 0000000100000000 0000000100000000 0000000100000000 12328 12328 12328 sixth shift Final Result 0000000100000000 0000000100000000 12328 12328 full correlation Cropped correlation Result 000823210000 08232100

Potrebbero piacerti anche