I am trying to understand the LSM algorithm applied to grayscale image segmentation.
There are essentially 2 things that are blocking me:
1) From my point of view - the level sets - i.e. ''moving'' the 3D surface (that is, conceptually visualizing the grayscale image (say 8 bits/pixel) as a surface whose height is given at each point (pixel $x,y$) by the intensity value of that pixel, through a fixed plane, or the other way around, is exactly the same as performing a thresholding from 0 to 255 (i.e. each "level set" would be all the pixels at threshold value 0,1,2 ...255)?
2) Let $f(x,y)$ be the image function (associating an intensity between 0 and 255 to each point $(x,y)$. The LSM is defined as $$\Gamma = \{(x,y) | \phi(x,y)=0\}$$
However, it does not make sense to me, (from my point of view which is probably wrong, hence my question), that $$\phi(x,y)=0$$ as as the surface has its own height at each point and it would make more sense to me to consider that the plane intersecting the surface is moving from bottom to up, i.e. I can ''accept'' better the formulation given for the level sets:
$$\Gamma = \{(x,y) | \phi(x,y)=c\}$$
and for the example I use, $$c \in [0,255] $$
Question 2 is more like a ''conceptual'' problem, but question 1 is more fundamental, since I cannot seem to see any difference with a simple thresholding.
Rephrased:
Question 1) Can we consider (loosely speaking, as indeed as the li is a set of points not a matrix) that each level curve $$l_i$$ of a level set of an image I
is (in programmatic terms, Matlab syntax): li= (I==i)
? (where i
is the height, in grayscale 8 bits, i
is a number between 1 and 255, and as Matlab uses matrices everywhere, I
is a $n \times m$ matrix and the operation == checks for every pixel in I
if it is equal to i
and the result is a binary image with 0s or 1s, i.e. this is called thresholding, hence my question is LSM the same as thresholding with operator ==
(and the single '=' is the assignment operation of course))
Question 2) Is it essentially (conceptually) the same to imagine moving the shape through a fixed plane, or moving a plane through a fixed 3D shape ?
What I was (in an incorrect way) trying to say is that we can visualize the level curves $$l_i$$ as the white circles on the thresholded image (although not perfect since it is discretized an maybe rounding errors/noise etc but suppose they are continuous) and ideed i do understand that the result of thresholding is a matrix so strictly speaking not equal to a lvl curve. But "loosely" speaking, visualizing the lvl curves do you agree?