Available in LEADTOOLS Document and Medical Imaging toolkits.
BinaryFilter example for Visual Basic
This example does omni-directional erosion of black objects and repaints the image.
Lead1.BinaryFilter BFLT_EROSION_OMNI Lead1.ForceRepaint