I am reading this paper Achanta-SLIC Superpixel segmentation where it says that the every superpixel cluster center is located at a distance of S = root(N/k)
and that expected spatial extent of a superpixel is a region of S * S
and the search for similar pixels is done in a spatial region of 2S*2S
.
Can someone please explain me this point as I am stuck at it?
From the paper:
Our algorithm takes as input a desired number of approximately equally-sized superpixels K.
So, let's assume that our SP are approximately squares. You will have K
of them.
For an image with N pixels, the approximate size of each superpixel is therefore N/K pixels
If you divide the image area N
in K
SP, every SP has (almost) N/K
pixels. I.e., the area of each SP is N/K
.
For roughly equally sized superpixels there would be a superpixel center at every grid interval S = sqrt(N/K).
Each SP is assumed to be squared, with area N/K
. The side of the square will then be sqrt(area) = sqrt(N/K) = S
. This means that a SP center is S
far from neighbours's centers.
Since the spatial extent of any superpixel is approximately S^2 (the approximate area of a superpixel)
Well, the side of each square is S
, then its area is S^2
(which is the same as N/K = sqrt(N/K)^2 = S^2
).
we can safely assume that pixels that are associated with this cluster center lie within a 2S × 2S area around the superpixel center
We mentioned that each side of the square will be S
, then each pixels of the SP will lie within the size of half the diagonal from the center sqrt(S/2)
, which is less than the side sqrt(S/2) < S
. But SP are not exactly squares, so we want to be a little more flexible, and say that all pixels lie within the double of this distance: 2S
.