martes, 10 de noviembre de 2015

Segmentation

The Chan-Vese model is defined as follows,


The first term controls the regularity by penalizing the length. The second term penalizes the enclosed area of C to control its size. The third and fourth terms penalize discrepancy between u and f.

Defined H as the Heaviside function and δ the Dirac mass, its distributional derivative,


 To be able to obtain δ, H is regularized as

 So δ is

 where t = φ.

In the function H(φ) we can see the set enclosed by C. So, the length of C is obtained as the total variation of H(φ),

 For fixed φ, the optimal values of c1 and c2 are the region averages
Taking into account where H is defined, we can say that c1 is the average value of the set enclosed by C in the image f, whilst c2 is the average value of the outer points.

 The evolution of φ can be discretized in space,

Where,

and 

  the forward difference in the x dimension

 the backward difference in the x dimension and,


  the central difference in the x dimension.



Knowing that :

is the function in our current iteration and




is the function in the next one,


we can discretize  the derivative as









It means that we can isolate the function in the next iteration as follows,


Results

The parameters used in this results are the same except when it is specified something different: λ1 = λ2 = 1, ε= 1, η= 0.01 and dt = (10^-2 ).
These first examples are obtained using μ= 1 and ν= 0. Videos show on the left how φ evolves, and on the right the curve C that describes in the image f.

 

Effects of μ

The parameter μ is used to penalize the length of C. It means that if μ is small, the length(C) is less penalized, and the curve can be larger and it can fit more accurately the input image. On the other hand, if is larger the boundaries of the curve will be smoother.

In the videos below  we can observe the results using a different μ .

This first case is using μ= 1 and ν = 0.5  The second case is using μ= 0.6 and ν = 0.5, and finally the third case is μ= 0.3 and ν = 0.5. In the first case, as we penalize more the length, it can not fit the shapes as well, in consequence the curve is smoother. In the third case, as we don't penalize too much the length, it can expand more, for this reason we can see that there are selected more shapes that those we want.  With a medium value as we see in the second case, the result is quite better and it fits the shapes that we want.



Effects of ν

The parameter ν  is used to control the size and penalize the area inside C. When ν is too smaller (it could be negative values) the boundary expands to fill the full domain, but if is too larger, the boundary shrinks until it vanishes.

In the videos below we can observe the results by using different ν . We observe that in the first case where μ= 0.5 and ν = 0, as the area is less penalize, the curve expands without fit any shape. In the third case as the area of C is more penalized the curve decreases without fitting any shape and at last it vanishes. In the second case, with a medium value, the curve fits well the shapes.


When it doesn't work

When the mean value inside the curve and the mean value outside are the same ( c1 = c2),  φ doesn't change. In consequence the curve never fit the shapes.

In the video below we can see an example with an image with the same mean values in all the image. We can observe that due to the length restriction, φ goes down, so the length of the curve decreases. Even though, the constants keep the same inside and outside so, the curve can't evolve. It continues the same way until at last the curve vanishes.


No hay comentarios:

Publicar un comentario