Here's some sample code in MATLAB that should do the trick. This assumes that your image is a grayscale image, and that you are looking to grow the region from the starting point in a "4-connected" manner (i.e. adjacent pixels above, below, left, and right of the current pixel are included in the region).
main.m2074 chars64 lines
gistlibby LogSnag