I am trying to use the SLIC SuperPixel Segmentation algorithm in ITK.
However, it seems to behave in a strange way, generating areas that contain pixel values with very high intensity variations (for instance the eye region).
Am I missing something, or is this a feature of the algorithm?
My test image has spacing 1.25x1.25, dimension 256x256, and the example code is something like this:
using ImageType = itk::Image<float, 2>; using LabelImageType = itk::Image<unsigned int, 2>; using SLICFilterType = itk::SLICImageFilter<ImageType, LabelImageType>; auto filter = SLICFilterType::New(); filter->SetNumberOfWorkUnits(1); filter->SetSpatialProximityWeight(15.0); filter->SetMaximumNumberOfIterations(60); filter->SetSuperGridSize(15); filter->SetEnforceConnectivity(true); filter->SetInitializationPerturbation(true);