Either we paint the stake in a specific color to easily segment it from 2d pictures
Or we identify "cylinders" in the voxel space and remove them in post processing
One other problem is that the filters for greenness don't really work well to keep the stake in the mask. It seems to be possible even with the simple linear filter to keep both, for example in this scan with the filter
G - 0.8B > 0.07 we obtain:
To identify cylinders in the 3D volume, there exist simple agorithms like Hough line transform that could be applied to a Gaussian filtered voxel volume.
It's about time. The options are the following:
One other problem is that the filters for greenness don't really work well to keep the stake in the mask. It seems to be possible even with the simple linear filter to keep both, for example in this scan with the filter G - 0.8B > 0.07 we obtain: