PANDORE Version 6 | GREYC-IMAGE |
Performs a non local erosion on image im_in.
Let $f$ be im_in, this algorithm performs iteratively
number_of_iterations times:
$ f(u)^{t+1} = f^t(u) + \min_{v ~ u}(w(u, v) \min(f^t(v) - f^t(u), 0))$
with $u$ a pixel location, $v$ a neighbor of $u$,
$w(u, v)$ the weight between $u$ and $v$ (which can be a similarity
measure, a distance, etc.).
Here we use the exponential similarity measure: $w(u,v)=\exp{ -distance(f(u), f(v))^2 / sigma^2 }$. If you use $w(u, v) = 1$, you get the typical erosion operator.
Returns SUCCESS or FAILURE.
pnonlocalerosion 15 10 8 tangram.pan out.pan
Author: Matthieu Toutain