RobWorkProject
23.9.11-
|
class representing a 2d contour More...
#include <Contour2D.hpp>
Classes | |
class | Point |
the point description of the contour More... | |
Public Types | |
typedef rw::core::Ptr< Contour2D > | Ptr |
smart pointer type to this class | |
Public Member Functions | |
Contour2D () | |
constructor | |
Contour2D (const rw::math::Vector2D<> ¢er, const std::vector< Point > &contour) | |
constructor More... | |
size_t | size () const |
get nr of conout points on this contour More... | |
Point & | operator[] (size_t i) |
get i'th contour point More... | |
const Point & | operator[] (size_t i) const |
get i'th contour point More... | |
double | calcArea () |
calculates the area of this contour | |
rw::math::Vector2D & | center () |
get contour center | |
const rw::math::Vector2D & | center () const |
get contour center | |
std::vector< Point > & | points () |
get contour point list | |
const std::vector< Point > & | points () const |
get contour point list | |
TriMesh::Ptr | toTriMesh (double height) |
Static Public Member Functions | |
static void | write (Contour2D &objC, std::string file) |
writes a contour to file More... | |
static Contour2D | read (std::string file) |
reads a contour from file More... | |
static double | calcSequenceMoment (const Contour2D &contour, const rw::math::Vector2D<> &c, const int r) |
calculates the r'th sequence moment of an ordered contour More... | |
static double | calcCentralMoments (const Contour2D &contour, const rw::math::Vector2D<> &c, const int r) |
calculates the r'th central moments of the contour More... | |
static Covariance | calcCovarianceMatrix (const Contour2D &contour, const rw::math::Vector2D<> &c) |
Calculates the covariance of the contour "contour" with mean coordinate c. More... | |
static rw::math::Rotation2D | calcOrientation (const Contour2D &contour, const rw::math::Vector2D<> &c) |
calculates the orientation of a contour where the first axis is the longest principal axis posible. | |
static rw::math::Vector2D | calcCentroid (const Contour2D &contour) |
calculates the centroid or the mean of the points in the contour. | |
static double | getCurvature (int idx, int pixelStep, const Contour2D &contour) |
extracts the local curvature around the contour point defined by idx. | |
static rw::math::Vector2D< double > | calcNormal (int idx, int pixelStep, const Contour2D &contour, bool counterClock=true) |
calculate normals of a contour More... | |
static void | recalcNormal (Contour2D &contour) |
recalculate normals of a contour More... | |
static Contour2D::Ptr | getOuterContour (const Contour2D &contour, double resolution) |
extracts the outer contour of a contour More... | |
class representing a 2d contour
|
inline |
constructor
center | |
contour |
|
static |
calculates the r'th central moments of the contour
contour | |
c | [in] center |
r | [in] |
|
static |
Calculates the covariance of the contour "contour" with mean coordinate c.
contour | [in] the contour |
c | [in] the mean of the contour points/coordinates |
|
static |
calculate normals of a contour
idx | |
pixelStep | |
contour | |
counterClock |
|
static |
calculates the r'th sequence moment of an ordered contour
contour | [in] |
c | [in] center |
r | [in] |
|
static |
extracts the outer contour of a contour
contour | [in] contour to find outer contour of. |
resolution | [in] the resolution. |
|
inline |
get i'th contour point
i |
|
inline |
get i'th contour point
i |
|
static |
reads a contour from file
file |
|
static |
recalculate normals of a contour
contour |
|
inline |
get nr of conout points on this contour
TriMesh::Ptr toTriMesh | ( | double | height | ) |
A 3D geometry for a 2D contour of height height.
2D points (x,y) end up as (x, y, 0) in 3D.
|
static |
writes a contour to file
objC | [in] contour to write to file |
file | [in] name of file |