I have an input as a 3D binary image and the preferred output below:
What image processing methods should I look for if I am to have only the spiky object(s) remain, just like the preferred output above?
There are more corners on the borders of your "spiky object", so one approach would be to tune a corner detector for this.
For example, I calculated the determinant of the structure tensor (Mathematica code below) of a distance-transformed image:
Binarizing with hysteresis yields this image, which should be a good starting point for the segmentation algorithm of your choice:
Mathematica code (
At first, i calculate a distance transform of the input image. This creates contrasts over the whole object area (instead of just the border), so the whole object can be detected.
Next I prepare the components of the structure tensor. The filter size for the gaussian derivatives if 5, the window size is 20.
To calculate the corner filter at each pixel, I simply plug these into the symbolic determinant of the structure tensor:
Which is basically the same as:
Converting this to an image and scaling it to 0..1 range yields the corner detector image above.
Finally, binarizing it with the right thresholds gives the final, binary image: