Usage: pgm2curve image.pgm connex [x y [z]] out.curve
Description: Extracts a curve from a binary image. 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 the beginning of the curve, and must be an end 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