Available in LEADTOOLS Document and Medical Imaging toolkits.
MRC Bitmap Functions: Automatic Segmentation
L_MrcSegmentBitmap