PANDORE Version 6 | GREYC-IMAGE |
ppolygonalapproximation approximates a given set of piecewise linear curves as 2D polygons. A curve is a chain of non null pixels and of 1 pixel thickness.
The precision of the polygonal approximation is controlled by the parameter error. The greater is the error value the coarser is the approximation and the less there are polygons.
The output image im_out contains a set of 2D lines, each of them use a different color.
Warning: if the contour is not 1 pixel thickness, the operator may have unpredictable behavior. It might be necessary to use the operator ppostthinning to guaranty 1 pixel thickness.
Returns SUCCESS or FAILURE.
Performs a polygonal approximation of the boundaries of tangram pieces:
pbinarization 100 1e30 tangram.pan a.pan pboundary 8 a.pan b.pan ppostthinning b.pan c.pan ppolygonalapproximation 5 c.pan d.pan pbinarization 1 1e30 d.pan out.pan
Approximation polygonale des contours d'une image.
Author: Serge Coudé