Available in the LEADTOOLS Imaging toolkit.
Median example for C++ 4.0 and later
This example applies a median filter with a 3x3 neighborhood and redisplays the bitmap.
m_Lead1.Median(3); m_Lead1.ForceRepaint();