I'm trying to segment an object from background in noisy micro CT data. The original 3D volume data looks like this:
theimg = Image3D[vol, "Real", ColorSpace -> "Grayscale",
ColorFunction -> "XRay", Background -> Black]
(where vol
is a 3D matrix imported from a MATLAB file)
ImageDimensions[theimg]
{73, 72, 75}
I first erode away the noise to obtain a seed volume that is within the object of interest:
marker = Binarize[DeleteSmallComponents[Erosion[theimg, 8]]]
(I have also tried using the following for the seed region:)
marker = ImageMultiply[theimg, Binarize[DeleteSmallComponents[Erosion[theimg, 8]]]]
If I use the default MeanEuclidean
method for RegionBinarize
to try to segment the whole object from the background by region growing, the distance parameter seems to have no effect whatsoever on the result, regardless of whether or not I include the optional intensity interval parameter. This does not appear to match the description given in the documentation for RegionBinarize
. Is this some kind of bug or have I misunderstood how this function is supposed to work? What am I doing wrong?
RegionBinarize[theimg, marker, 1*^-100, Method -> "MeanEuclidean"]
RegionBinarize[theimg, marker, 1*^100, Method -> "MeanEuclidean"]
RegionBinarize[theimg, marker, 1*^100, {0, 1000}, Method -> "MeanEuclidean"]
produces the same result, even though I know there are plenty of voxels adjacent to the seed volume with values in the range of 0 to 1000 HU.
When properly segmented, the object should look something like this (the best segmentation I have found thus far):