Available in LEADTOOLS Document and Medical Imaging toolkits.
Despeckle example for C++ 4.0 and later
This example automatically removes specks from the bitmap and repaints the image. Use this on a 1-bit bitmap such as a scanned document.
m_Lead1.Despeckle(); m_Lead1.ForceRepaint();