DGtalTools  0.9.4
tangentBC

Estimates tangent using a binomial convolver.

Usage: tangentBC [options] –input <fileName>

Allowed options are :

-h [ --help ] display this message
-i [ --input ] arg input file name: FreemanChain (.fc) or a sequence of discrete points (.sdp).
-s [ --GridStep ] arg (=1) Grid step
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 -i $DGtal/examples/samples/contourS.fc -o contourS.png --drawPointOfIndex 0

The tangents can be computed as follows:

$ tangentBC -i $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
resCurvatureBCcontour.png
resTangentBC.png
CCW oriented (index 0=blue pt)resulting tangent (angle)
See also
tangentBC.cpp