extension joomla, template joomla,banner extension joomla,jomla slider,slider joomla
Median Filter using C++ and OpenCV: Image Processing

Basic Theory

Median filter also reduces the noise in an image like low pass filter, but it is better than low pass filter in the sense that it preserves the edges and other details.  The process of calculating the intensity of a central pixel is same as that of low pass filtering except instead of averaging all the neighbors, we sort the window and replace the central pixel with a median from the sorted window. For example, lets we have a window like this

Now we sort the given window and get the sorted array as [1 1 2 2 3 3 5 6 7]. The median of this array is 4th element i.e 3. Now we replace the central element 7 with 4. That’s it.

Source Code

 

Output

 



Related Article



destination source:https://www.programming-techniques.com/?p=57