title: When using the level set method to represent moving interfaces, is there a way to tell when topology has changed?
body: <p>I want to segment a 2D object with known topology (genus 0). For this, I'm using the level set method, defined by a signed distance function (SDF). My question is how can you tell when the SDF changes topology?
  I'm using Matlab.</p>
  
  <p>This is the image I'm trying to segment:</p>
  
  <p><img src="https://i.stack.imgur.com/CwND8.jpg" alt="enter image description here"></p>
  
  <p>This is my current result (plotting the zero isocontours of the level set function):</p>
  
  <p><img src="https://i.stack.imgur.com/uhvok.jpg" alt="enter image description here"></p>
  
  <p>Here is a link to the actual level set function:</p>
  
  <p><a href="https://drive.google.com/file/d/0B4tggnAyFPDtczNxR2x6Nm41bmc/edit?usp=sharing" rel="nofollow noreferrer">link to final SDF</a></p>
  
  <p>My goal is that the zero level set would consist of just one contour, encircling the galaxy. I want to create a detector function which tells me when the topology changes.</p>
  
  <p>I also posted this question to <a href="https://math.stackexchange.com/questions/806874/is-there-a-way-to-check-if-2d-level-set-function-has-changed-from-representing-a">math stack exchange</a>.</p>