I'm trying to implement a simple image segmentation application that accepts an initial contour and evolves it to compute a refined contour in successive iterations. I'm taking some inspiration from the explanation provided here: https://profs.etsmtl.ca/hlombaert/levelset/

I'm having trouble understanding what exactly the author means when he writes the formula for the derivative of the surface with respect to time:

enter image description here

In particular, I am unsure how to compute the left and right side finite difference for every point in the image. While there are countless possibilities for computing the gradient using central differences (Sobel filter, Scharr filter etc.), a quick online search revealed nothing of the sort for computing left and right finite difference.

From what I can understand, one would have to compute the left and right side finite differences separately for the horizontal and vertical directions. So to compute the right side finite difference, one would convolve the image separately with a row filter $[-1, 1]$ centered at -1 and a column filter $[-1, 1]^T$, also centered at -1.

But then the question arises: how to combine the outputs from both these convolution operations. Of course the simple, logical approach would be to compute the L2-norm of the two outputs for each point:

$G=\sqrt{G_x^2 + G_y^2}$

where $G_x$ is the output at $(x,y)$ obtained by convolving the image with the row filter, and $G_y$ is the output obtained by convolving the image with the column filter. But I suspect this is incorrect, since this approach would lead to $G$ always being positive, thus making the $min[0, \Delta^{+x}\phi(i,j)]^2$ term in the first equation above pointless.

Can anyone point out where I'm going wrong and what I should actually be doing?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.