Skip to content

Contours and discrete geometrics estimators

JacquesOlivierLachaud edited this page Jun 24, 2011 · 14 revisions
  • GridCurve<KSpace> : describes a 4-connected oriented interpixel curve, closed or open. For instance, the topological boundary of a simply connected digital shape is a closed GridCurve. This object provides several ranges, each of them are models of CSequences:

    • PointsRange, CodesRange, LinelsRange, ArrowsRange: Each of them provides the following types/methods: - inner type = ConstIterator - ConstIterator begin() const - ConstIterator end() const
    • PointsRange: the ConstIterator is a model of CConstIteratorOnPoint<KSpace::Space> It returns the successive coordinates (KSpace::Space::Point) of the pointels of the grid curve (even the last when the curve is open).
    • CodesRange: the ConstIterator is a model of CConstIteratorOnCode It returns the successive chaincodes (unsigned int in 0-3) of the linels of the grid curve
    • LinelsRange: the ConstIterator is a model of CConstIteratorOnLinel<KSpace> It returns the successive linels (KSpace::SCell) of the grid curve.
    • ArrowsRange: the ConstIterator is a model of CConstIteratorOnArrow<KSpace::Space> It returns the successive arrows corresponding to linels as a std::pair<KSpace::Space::Point,KSpace::Space::Vector> where the point describes the coordinates of the pointel and the vector stands for the displacement.
  • The concept CLocalCurveGeometricEstimator describes an object that can process a CSequence so as to return Quantitys. More precisely, it provides:

    • inner types: Sequence the type of the sequence or range, Quantity the type of the estimated quantity. Note that Sequence should provide an inner type ConstIterator.
    • void init( double h, const Sequence & s, bool closed ) : called once, h is the grid step, s describes the piece to process, closed tells what to do when arriving at s.end().
    • template <typename OutputIterator> void eval( Sequence::ConstIterator itb, Sequence::ConstIterator ite, OutputIterator itw ) : writes estimated quantities from positions itb till ite excluded on the output with *itw++.
    • Quantity eval( Sequence::ConstIterator it) : returns the estimated quantity at position it.