Main Page   Modules   File List  

pgm2closedcurve.c File Reference

extracts a curve from a binary image More...


Detailed Description

extracts a curve from a binary image

Usage: pgm2closedcurve image.pgm connex [x y [z]] out.curve

Description: Extracts a closed curve from a binary image, that is, a curve with the same starting and ending point. The parameter connex is the connexity of the curve. It may be equal to 4 or 8 in 2D, and to 6, 18 or 26 in 3D. If given, the point (x, y, z) (2D) or (x, y, z) (3D) is taken as the starting point of the curve, and must be a curve point. The output is the text file out.curve, with the following format:
c nbpoints
x1 y1
x2 y2
...
or (3D): C nbpoints
x1 y1 z1
x2 y2 z2
...

The points of the curve may also be valued. This is must be indicated by a value of 40, 80, 60, 180 or 260 for the parameter connex, instead of 4, 8, 6, 18 or 26 respectively. In this case, the output is the text file out.curve, with the following format:
cv nbpoints
x1 y1 v1
x2 y2 v2
...
or (3D): CV nbpoints
x1 y1 z1 v1
x2 y2 z2 v2
...

Types supported: byte 2D, byte 3D

Category: convert geo

Author:
Michel Couprie

Generated on Fri Dec 17 11:59:38 2004 for Pink by doxygen1.2.18