I remember that there was some thread of this sort, but I could not find it, so I hope it's ok to open a new thread.
I want to segment pictures of the brain, i.e. I only want the area within the skull without the bones (all the grey matter/pixels. White parts are bones of the skull).
I have the following two pictures. In the first picture I also want all the grey parts, but you see that there are some white parts intermingled between. So basically the algorithm should segment four different images. In the second pictures it seems to be easier.
Can you guys give me a hint to a function or some examples or threads?
Binarize
or your could do something likeDeleteSmallComponents@MorphologicalBinarize[img, {0.8, 0.9}]
. The first one is another beast because those four segments aren't properly enclosed. $\endgroup$DeleteBorderComponents@ ImageSubtract[i1, Closing[MorphologicalBinarize[i1, {0.9, .99}], 5]]
on the first... wherei1
is the image. $\endgroup$