DGtalTools  1.2.0
tangentBC

Estimates tangent using a binomial convolver.

Usage: tangentBC [options] –input <fileName>

Allowed options are :

Positionals:
1 TEXT:FILE REQUIRED input file name: FreemanChain (.fc) or a sequence of discrete points (.sdp).
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE REQUIRED input file name: FreemanChain (.fc) or a sequence of discrete points (.sdp).
--GridStep FLOAT=1 Grid step (default 1.0)
Note
The file may contain several freeman chains.

Example:

We consider as input shape the freeman chain of the DGtal/examples/sample directory. The contour can be displayed with displayContours :

$ displayContours $DGtal/examples/samples/contourS.fc contourS.png --drawPointOfIndex 0

The tangents can be computed as follows:

$ tangentBC $DGtal/examples/samples/contourS.fc > tangentsBC.dat
$ gnuplot
gnuplot> plot [] [-1.2:1.2]'tangentsBC.dat' using 1:3 w lines title "tangents with Binomial Convolution estimator"

You should obtain such a result:

contour curvature
CCW oriented (index 0=blue pt) resulting tangent (angle)
See also
tangentBC.cpp