PANDORE Version 6 | GREYC-IMAGE |
pdistance computes the distance map to the nearest contour. The output image im_out is a float image where each pixel is set with the distance to the nearest contour point. A contour is a chain of connected non null pixels.
The distance is computed from the specified distance between neighbors: d1, d2 and d3:
+d2 +d1 +d2 +d1 x +d1 +d2 +d1 +d2
For 3D, d3 is the distance between the diagonal neighbors.
If the input image is a graph then distance is computed from the node values.
Returns SUCCESS or FAILURE.
Closed contours yielded by a simple edge detection of tangram.pan:
psobel tangram.pan b.pan pbinarization 50 1e30 b.pan c.pan pskeletonization c.pan d.pan ppostthinning d.pan e.pan pdistance1 1 1 1 e.pan f.pan plocalmaxima 8 f.pan g.pan plabeling 8 g.pan h.pan pinverse f.pan i.pan pwatershed h.pan i.pan j.pan pboundary 8 j.pan out.pan
Calcul d'une image de distance quelconque aux contours.
Author: Régis Clouard