For my purposes I need to be able to detect a variety objects and their contours on a black background. Using noise/background removal and a threshold operation has worked well so far, but I've run into a problem with objects that blend into the background. They blend in so well the I can't set the threshold value low enough to distinguish the inner parts of the object without also including the background.
What other methods could I use for image segmentation, that work more reliably in a variety of situations (obviously including this one)?