Sei sulla pagina 1di 22

Sort Optimization Algorithm of Median Filtering Based on FPGA

FILTER
Filter is a device that removes some unwanted component in an image or signal. Filters can be classified as Low pass filter, High pass filter, Band pass filter etc They can be designed in following ways
Butterworth Chebyshev Bessel Eleptical

Filters in Image Processing


In image processing, there are two types of filters based on the type of input
Spatial domain filters Frequency domain filters

If input to the filters is given as raw pixel then they are said to be Spatial domain filters If input to the filters is given as fourier transform of the pixel then they are said to be Frequency domain filters

Noise in Image Processing


While transmitting images, the images gets affected by noise The different types of noise are Salt and peper noise, impulse noise, gaussian noise etc

Noise Filtering
Basic Idea: replace each pixel intensity value with an new value taken over a neighborhood of fixed size
Mean filter Median filter

The size of the filter controls degree of smoothing large filter ->large neighborhood ->intensive smoothing

Mean filter
Take the average of intensity values in a m x n region of each pixel (usually m = n) take the average as the new pixel value h(i,j)=1/(m*n)f(k,l), km, ln The normalization factor m,n preserves the range of values of the original image

Median filter
The equation to perform median filter ( x, y ) median{g ( s, t )} f
( s ,t )S xy

Excellent at noise removal, without the smoothing effects that can occur with other type of filters Particularly good when salt and pepper noise is present

Computation of middle value


Replace each pixel value with the median of the gray values in the region of the pixel The following steps are followed
take a 3 x 3 (or 5 x 5 etc.) region centered around pixel (i,j) sort the intensity values of the pixels in the region into ascending order select the middle value as the new value of pixel (i,j)

Existing Techniques
Sorting techniques such as Bubble sort, Selection sort etc.. are used to find median values The disadvantage is it requires more computation time and large area to implement the design It requires about 21 comparison to find the median value

Proposed Technique
The formula to implement median filter is g(x,y)=med[f((x-i),(y-j))] i,j W

We assume that A1>B1>C1 A2>B2>C2 A3>B3>C3

At first we find the minimum value in A1,A2,A3 Next we find the middle value in B1,B2,B3 Last we find the maximum value in C1,C2,C3
Amin=min(A1,A2,A3) Bmed=med(B1,B2,B3) Cmax=max(C1,C2,C3)

To find overall median value fmed=med(Amin,Bmed,Cmax)

Main Block Diagram

Hardware Implementation

Field Programmable Gate Arrays


FPGAs are Programmable Digital logic Chips. Reconfigurable Hardware.

No Analog FPGAs.
Already Fabricated Device Also Called as Programmable ASIC FPGAs have More logic gates, More Speed, Fast to market.

Experimental results

Comparison with mean filtering

Conclusion
The proposed technique reduces comparing from previous 21 to 13 It can filter an image of size 1k*1k in about 20ms
The hardware required is reduced as compared to previous algorithms

Comparison of synthesis reports


Proposed algorithm

Bubble sort algorithm

If any..

Thank you

Potrebbero piacerti anche