A filter is a mathematical procedure to change the values in a series (1D case) or an image (2D case).  Filters can be designed in hardware in the data capture phase; you will discuss high-pass, low-pass, and band-pass filters in either your electrical engineering or weapons classes.  The filter can be designed to eliminate or enhance aspects of the data, to smooth or sharpen the resulting data stream.  For this lab we will run an averaging filter, using a running average of various numbers of data points (generally an odd number, such as 3, 5, 7, 9 or 11).  The filter will be unweighted, with all the points weighted equally.  We could also weight the filter, generally applying a larger weight to the central observation.  The sum of the weights should equal 1, so that the overall mean of the data stream is not affected.  The smoothing filter will even out natural irregularities in the data or in the sampling hardware, and can provide a more realistic picture of the true data signal in the absence of noise.

 

The diagram below shows the first six steps of filtering a series.  The filter is the top line in each step, the input series the middle line, and the output the third line.  In each case the terms in the filter are multiplied with the terms in the series below them and them summed to give the output.  Note that the first term in the input series has no match in the outputf, and that the same thing will happen at the end of the series.

This is a smoothing, or averaging filter.  You could also have a median filter, or sharpening filters.  In two dimensions, you can apply these to imagery (like selfies).

 

1/3 1/3 1/3              
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5                

 

  1/3 1/3 1/3            
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5 6.5              

 

    1/3 1/3 1/3          
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5 6.5 6.5            

 

      1/3 1/3 1/3        
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5 6.5 6.5 6.3          

  

        1/3 1/3 1/3      
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5 6.5 6.5 6.3 6.2        

 

          1/3 1/3 1/3    
6.2

6.5 6.8 6.2  6.5 6.2 5.9 6.5 5.6 5.9
  6.5 6.5 6.5 6.3 6.2 6.2      

 


last revision 1/11/2017