Imagine we are clustering pixels in an image. If we use Mean Shift Clustering, at least in my understanding, we will embed each pixel into some dimensional space (intensity, rgb, texture, etc) and cluster them. This embedding process, however, inherently destroys the graph structure of the image, which could be quite useful: e.g. neighboring pixels tend to form same semantic cluster.
Is there a way I can preserve this graph structure when using Mean Shift Clustering? You can assume grid like graph structure like a 2D image.
Thanks in advance!